| | |
| | | VITE_APP_POWERJOB_ADMIN = '/powerjob' |
| | | |
| | | # 生产环境 |
| | | # VITE_APP_BASE_API = '/prod-api' |
| | | VITE_APP_BASE_API = '/prod-api' |
| | | |
| | | # app |
| | | VITE_APP_BASE_API = '/service/api' |
| | | # VITE_APP_BASE_API = '/service/api' |
| | | |
| | | # 是否在打包时开启压缩,支持 gzip 和 brotli |
| | | VITE_BUILD_COMPRESS = gzip |
| | |
| | | </div> |
| | | </div> |
| | | <script type="module" src="/src/main.ts"></script> |
| | | <script type="module" src="./vconsole.js"> </script> |
| | | <script> |
| | | import VConsole from 'vconsole' |
| | | |
| | | Window.VConsole |
| | | // var vc = new VConsole({ |
| | | // disableLogScrolling: false, |
| | | // defaultPlugins: ["system", "network"], |
| | | // log: { maxLogNumber: 200 }, |
| | | // }); |
| | | window.JavaScriptMe.getAppCenterToken(); |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | "path-to-regexp": "6.2.0", |
| | | "pinia": "2.0.22", |
| | | "screenfull": "6.0.0", |
| | | "vconsole": "^3.15.1", |
| | | "vform3-builds": "3.0.8", |
| | | "vue": "3.2.45", |
| | | "vue-cropper": "1.0.3", |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | |
| | | import axios from 'axios'; |
| | | import useSettingsStore from '@/store/modules/settings' |
| | | import { handleThemeStyle } from '@/utils/theme' |
| | |
| | | import { setToken } from "@/utils/auth"; |
| | | import usePermissionStore from "@/store/modules/permission"; |
| | | import { isHttp } from "@/utils/validate"; |
| | | import VConsole from 'vconsole' |
| | | let vc: any = null; |
| | | const initVconsole = () => { |
| | | console.log('vcvcvvcvc') |
| | | // if (env.currentEnv !== env.ENV_ENUM.PRODUCT) { |
| | | vc = new VConsole({ |
| | | disableLogScrolling: false, |
| | | defaultPlugins: ["system", "network"], |
| | | log: { maxLogNumber: 200 }, |
| | | }); |
| | | // } |
| | | }; |
| | | const appStore = useAppStore(); |
| | | const size = computed(() => appStore.size as any); |
| | | |
| | |
| | | // 初始化主题样式 |
| | | handleThemeStyle(useSettingsStore().theme) |
| | | }) |
| | | // initVconsole() |
| | | |
| | | }) |
| | | </script> |
| | |
| | | */ |
| | | export function logout() { |
| | | return request({ |
| | | // url: '/auth/logout', |
| | | // url: '/3d4af489bc4f4c11bfd3d0dbdf88309b/' + window.JavaScriptMe.getAppCenterToken(), |
| | | url: '/3d4af489bc4f4c11bfd3d0dbdf88309b', |
| | | url: '/auth/logout', |
| | | method: 'post' |
| | | }); |
| | | } |
| | |
| | | // 获取用户详细信息 |
| | | export function getInfo(): AxiosPromise<UserInfo> { |
| | | return request({ |
| | | // url: '/system/user/getInfo', |
| | | // url: '/d9dddbc6667d49ddbaa6371dfd612e96/' + window.JavaScriptMe.getAppCenterToken(), |
| | | url: '/d9dddbc6667d49ddbaa6371dfd612e96', |
| | | url: '/system/user/getInfo', |
| | | method: 'get' |
| | | }); |
| | | } |
| | |
| | | // 获取租户列表 |
| | | export function getTenantList(): AxiosPromise<TenantInfo> { |
| | | return request({ |
| | | // url: '/auth/tenant/list', |
| | | // url: '/77b4670b1ecb40bf939469932b11c41e/' + window.JavaScriptMe.getAppCenterToken(), |
| | | url: '/77b4670b1ecb40bf939469932b11c41e', |
| | | url: '/auth/tenant/list', |
| | | headers: { |
| | | isToken: false |
| | | }, |
| | |
| | | // 获取路由 |
| | | export function getRouters(): AxiosPromise<RouteRecordRaw[]> { |
| | | return request({ |
| | | // url: '/system/menu/getRouters', |
| | | // url: '/1aac492a29424d95875e8bd69166679a/' + window.JavaScriptMe.getAppCenterToken(), |
| | | url: '/1aac492a29424d95875e8bd69166679a', |
| | | url: '/system/menu/getRouters', |
| | | method: 'get' |
| | | }); |
| | | } |
| | |
| | | // 根据参数键名查询参数值 |
| | | export function getConfigKey(configKey: string): AxiosPromise<String> { |
| | | return request({ |
| | | // url: '/system/config/configKey/' + configKey, |
| | | // url: '/99ddd33a79184380847225751799f213/' + window.JavaScriptMe.getAppCenterToken() + '/' + configKey, |
| | | url: '/99ddd33a79184380847225751799f213/' + configKey, |
| | | url: '/system/config/configKey/' + configKey, |
| | | method: 'get' |
| | | }); |
| | | } |
| | |
| | | // 查询OSS对象存储列表 |
| | | export function listOss(query: OssQuery): AxiosPromise<OssVO[]> { |
| | | return request({ |
| | | // url: '/resource/oss/list', |
| | | // url: '/905d4cedbbe442f6adb5729b32d277fc/' + window.JavaScriptMe.getAppCenterToken(), |
| | | url: '/905d4cedbbe442f6adb5729b32d277fc', |
| | | url: '/resource/oss/list', |
| | | method: 'get', |
| | | params: query |
| | | }); |
| | |
| | | } |
| | | export function createUser(winIp: string | number | Array<string | number>) { |
| | | return request({ |
| | | // url: '/auth/auto' , |
| | | // url: '/7a7d5106ba8b4859b3e9f550b03f6179/' + window.JavaScriptMe.getAppCenterToken() , |
| | | url: '/7a7d5106ba8b4859b3e9f550b03f6179', |
| | | url: '/auth/auto' , |
| | | method: 'get', |
| | | params: winIp |
| | | }); |
| | |
| | | let downloadLoadingInstance: LoadingInstance; |
| | | export default { |
| | | async oss(ossId: string | number) { |
| | | // const url = baseURL + '/resource/oss/download/' + ossId; |
| | | // const url = baseURL + '/56e038d545bb4fa3834d03c368d74118/' + window.JavaScriptMe.getAppCenterToken() + '/' + ossId; |
| | | const url = baseURL + '/56e038d545bb4fa3834d03c368d74118/' + ossId; |
| | | const url = baseURL + '/resource/oss/download/' + ossId; |
| | | downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); |
| | | try { |
| | | const res = await axios({ |
| | |
| | | ElMessage.error(errMsg); |
| | | }, |
| | | async ossDown(ossId: string | number,pawd:string) { |
| | | // const url = baseURL + '/resource/oss/download/' + ossId +'/' + pawd; |
| | | // const url = baseURL + '/56e038d545bb4fa3834d03c368d74118/' + window.JavaScriptMe.getAppCenterToken() +'/' + ossId +'/' + pawd; |
| | | const url = baseURL + '/56e038d545bb4fa3834d03c368d74118/' + ossId +'/' + pawd; |
| | | |
| | | const url = baseURL + '/resource/oss/download/' + ossId +'/' + pawd; |
| | | downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); |
| | | try { |
| | | const res = await axios({ |
| | |
| | | } |
| | | |
| | | const randomSixDigitNumber = getRandomSixDigitNumber(); |
| | | import VConsole from 'vconsole' |
| | | let vc: any = null; |
| | | const initVconsole = () => { |
| | | console.log('vcvcvvcvc') |
| | | // if (env.currentEnv !== env.ENV_ENUM.PRODUCT) { |
| | | vc = new VConsole({ |
| | | disableLogScrolling: false, |
| | | defaultPlugins: ["system", "network"], |
| | | log: { maxLogNumber: 200 }, |
| | | }); |
| | | // } |
| | | }; |
| | | |
| | | |
| | | onMounted(async () => { |
| | | // initVconsole() |
| | | // myMethod(); |
| | | // callNativeMethod(); |
| | | // alert(window); |
| | | // console.log("window.JavaScriptMe.getAppCenterToken()",window.JavaScriptMe.getAppCenterToken()) |
| | | window.JavaScriptMe.getAppCenterToken(); |
| | | // alert("window.JavaScriptMe.getAppCenterToken();") |
| | | let obj = { |
| | | username: randomSixDigitNumber |
| | | } |
| | |
| | | open: true, |
| | | proxy: { |
| | | [env.VITE_APP_BASE_API]: { |
| | | // target: 'http://80.36.32.176:8080', |
| | | target: 'http://80.36.32.176:8080', |
| | | // target: 'http://127.0.0.1:8080', |
| | | // target: 'http://80.36.32.176:8080', |
| | | // target: 'http://162.14.79.111:2023', |
| | | target: 'http://esb.ydjw.sc', |
| | | // target: 'http://esb.ydjw.sc', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '') |
| | | } |