中间部分
Showing
7 changed files
with
295 additions
and
276 deletions
src/api/server.js.js
0 → 100644
| 1 | import request from '@/utils/request' | ||
| 2 | |||
| 3 | /** | ||
| 4 | * 营业收入 | ||
| 5 | * @returns {*} | ||
| 6 | */ | ||
| 7 | export function getYS001() { | ||
| 8 | return request({ | ||
| 9 | method: 'post', | ||
| 10 | data: { | ||
| 11 | 'INTERFACEID': 'YS001', | ||
| 12 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 13 | } | ||
| 14 | }) | ||
| 15 | } | ||
| 16 | |||
| 17 | /** | ||
| 18 | * 应收余额 | ||
| 19 | * @returns {*} | ||
| 20 | */ | ||
| 21 | export function getYS002() { | ||
| 22 | return request({ | ||
| 23 | method: 'post', | ||
| 24 | data: { | ||
| 25 | 'INTERFACEID': 'YS002', | ||
| 26 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 27 | } | ||
| 28 | }) | ||
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 现金余额 | ||
| 33 | * @returns {*} | ||
| 34 | */ | ||
| 35 | export function getYS003() { | ||
| 36 | return request({ | ||
| 37 | method: 'post', | ||
| 38 | data: { | ||
| 39 | 'INTERFACEID': 'YS003', | ||
| 40 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 41 | } | ||
| 42 | }) | ||
| 43 | } | ||
| 44 | |||
| 45 | /** | ||
| 46 | * DSO天数 | ||
| 47 | * @returns {*} | ||
| 48 | */ | ||
| 49 | export function getYS004() { | ||
| 50 | return request({ | ||
| 51 | method: 'post', | ||
| 52 | data: { | ||
| 53 | 'INTERFACEID': 'YS004', | ||
| 54 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 55 | } | ||
| 56 | }) | ||
| 57 | } | ||
| 58 | |||
| 59 | /** | ||
| 60 | * (五)董事会得分、领导重点关注 | ||
| 61 | * @returns {*} | ||
| 62 | */ | ||
| 63 | export function getYS005() { | ||
| 64 | return request({ | ||
| 65 | method: 'post', | ||
| 66 | data: { | ||
| 67 | 'INTERFACEID': 'YS005', | ||
| 68 | 'USERCONTEXT': 'a6c49439-f01c-0292-1757-30563fb41c77' | ||
| 69 | } | ||
| 70 | }) | ||
| 71 | } |
| 1 | import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' | 1 | import {ElMessage, ElMessageBox, ElNotification, ElLoading} from 'element-plus' |
| 2 | import {useStorage} from "@vueuse/core/index"; | 2 | import {useStorage} from "@vueuse/core/index"; |
| 3 | 3 | ||
| 4 | const language= useStorage('language',0) | 4 | const language = useStorage('language', 0) |
| 5 | let loadingInstance | 5 | let loadingInstance |
| 6 | 6 | ||
| 7 | export default { | 7 | export default { |
| 8 | // 消息提示 | 8 | // 消息提示 |
| 9 | msg(content) { | 9 | msg(content) { |
| 10 | ElMessage.info(content) | 10 | ElMessage.info(content) |
| 11 | }, | 11 | }, |
| 12 | // 错误消息 | 12 | // 错误消息 |
| 13 | msgError(content) { | 13 | msgError(content) { |
| 14 | ElMessage.error(content) | 14 | ElMessage.error(content) |
| 15 | }, | 15 | }, |
| 16 | // 成功消息 | 16 | // 成功消息 |
| 17 | msgSuccess(content) { | 17 | msgSuccess(content) { |
| 18 | ElMessage.success(content) | 18 | ElMessage.success(content) |
| 19 | }, | 19 | }, |
| 20 | // 警告消息 | 20 | // 警告消息 |
| 21 | msgWarning(content) { | 21 | msgWarning(content) { |
| 22 | ElMessage.warning(content) | 22 | ElMessage.warning(content) |
| 23 | }, | 23 | }, |
| 24 | // 弹出提示 | 24 | // 弹出提示 |
| 25 | alert(content) { | 25 | alert(content) { |
| 26 | return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips') | 26 | return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips') |
| 27 | }, | 27 | }, |
| 28 | // 错误提示 | 28 | // 错误提示 |
| 29 | alertError(content) { | 29 | alertError(content) { |
| 30 | return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips', { type: 'error' }) | 30 | return ElMessageBox.alert(content, language.value == 0 ? language.value == 0 ? '系统提示' : 'Tips' : 'Tips', {type: 'error'}) |
| 31 | }, | 31 | }, |
| 32 | // 成功提示 | 32 | // 成功提示 |
| 33 | alertSuccess(content) { | 33 | alertSuccess(content) { |
| 34 | return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'success' }) | 34 | return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'success'}) |
| 35 | }, | 35 | }, |
| 36 | // 警告提示 | 36 | // 警告提示 |
| 37 | alertWarning(content) { | 37 | alertWarning(content) { |
| 38 | return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'warning' }) | 38 | return ElMessageBox.alert(content, language.value == 0 ? '系统提示' : 'Tips', {type: 'warning'}) |
| 39 | }, | 39 | }, |
| 40 | // 通知提示 | 40 | // 通知提示 |
| 41 | notify(content) { | 41 | notify(content) { |
| 42 | return ElNotification.info(content) | 42 | return ElNotification.info(content) |
| 43 | }, | 43 | }, |
| 44 | // 错误通知 | 44 | // 错误通知 |
| 45 | notifyError(content) { | 45 | notifyError(content) { |
| 46 | return ElNotification.error(content) | 46 | return ElNotification.error(content) |
| 47 | }, | 47 | }, |
| 48 | // 成功通知 | 48 | // 成功通知 |
| 49 | notifySuccess(content) { | 49 | notifySuccess(content) { |
| 50 | return ElNotification.success(content) | 50 | return ElNotification.success(content) |
| 51 | }, | 51 | }, |
| 52 | // 警告通知 | 52 | // 警告通知 |
| 53 | notifyWarning(content) { | 53 | notifyWarning(content) { |
| 54 | return ElNotification.warning(content) | 54 | return ElNotification.warning(content) |
| 55 | }, | 55 | }, |
| 56 | // 确认窗体 | 56 | // 确认窗体 |
| 57 | confirm(content) { | 57 | confirm(content) { |
| 58 | return ElMessageBox.confirm(content, language.value==0 ? '系统提示' :'Tips', { | 58 | return ElMessageBox.confirm(content, language.value == 0 ? '系统提示' : 'Tips', { |
| 59 | confirmButtonText: language.value==0 ? '确定' :'OK', | 59 | confirmButtonText: language.value == 0 ? '确定' : 'OK', |
| 60 | cancelButtonText: language.value==0 ? '取消' :'Cancel', | 60 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 61 | type: 'warning' | 61 | type: 'warning' |
| 62 | }) | 62 | }) |
| 63 | }, | 63 | }, |
| 64 | // 提交内容 | 64 | // 提交内容 |
| 65 | prompt(content) { | 65 | prompt(content) { |
| 66 | return ElMessageBox.prompt(content, language.value==0 ? '系统提示' :'Tips', { | 66 | return ElMessageBox.prompt(content, language.value == 0 ? '系统提示' : 'Tips', { |
| 67 | confirmButtonText: language.value==0 ? '确定' :'OK', | 67 | confirmButtonText: language.value == 0 ? '确定' : 'OK', |
| 68 | cancelButtonText: language.value==0 ? '取消' :'Cancel', | 68 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 69 | type: 'warning' | 69 | type: 'warning' |
| 70 | }) | 70 | }) |
| 71 | }, | 71 | }, |
| 72 | // 打开遮罩层 | 72 | // 打开遮罩层 |
| 73 | loading(content) { | 73 | loading(content) { |
| 74 | loadingInstance = ElLoading.service({ | 74 | loadingInstance = ElLoading.service({ |
| 75 | lock: true, | 75 | lock: true, |
| 76 | text: content, | 76 | text: content, |
| 77 | background: 'rgba(0, 0, 0, 0.7)' | 77 | background: 'rgba(0, 0, 0, 0.7)' |
| 78 | }) | 78 | }) |
| 79 | }, | 79 | }, |
| 80 | // 关闭遮罩层 | 80 | // 关闭遮罩层 |
| 81 | closeLoading() { | 81 | closeLoading() { |
| 82 | loadingInstance.close() | 82 | loadingInstance?.close() |
| 83 | } | 83 | } |
| 84 | } | 84 | } | ... | ... |
| 1 | import { | 1 | import { |
| 2 | createWebHistory, | 2 | createWebHistory, |
| 3 | createWebHashHistory, | 3 | createWebHashHistory, |
| 4 | createRouter | 4 | createRouter |
| 5 | } from 'vue-router' | 5 | } from 'vue-router' |
| 6 | /* Layout */ | 6 | /* Layout */ |
| 7 | import Layout from '@/layoutPc' | 7 | import Layout from '@/layoutPc' |
| ... | @@ -38,101 +38,103 @@ import {ElMessage} from "element-plus"; | ... | @@ -38,101 +38,103 @@ import {ElMessage} from "element-plus"; |
| 38 | 38 | ||
| 39 | // 公共路由 | 39 | // 公共路由 |
| 40 | export const constantRoutes = [ | 40 | export const constantRoutes = [ |
| 41 | { | 41 | { |
| 42 | path: '/redirect', | 42 | path: '/redirect', |
| 43 | component: Layout, | 43 | component: Layout, |
| 44 | hidden: true, | 44 | hidden: true, |
| 45 | children: [ | ||
| 46 | { | ||
| 47 | path: '/redirect/:path(.*)', | ||
| 48 | component: () => import('@/views/redirect/index') | ||
| 49 | } | ||
| 50 | ] | ||
| 51 | }, | ||
| 52 | { | ||
| 53 | path: '/:pathMatch(.*)*', | ||
| 54 | component: () => import('@/views/error/404'), | ||
| 55 | hidden: true | ||
| 56 | }, | ||
| 57 | { | ||
| 58 | path: '/401', | ||
| 59 | component: () => import('@/views/error/401'), | ||
| 60 | hidden: true | ||
| 61 | }, | ||
| 62 | { | ||
| 63 | path: '/index', | ||
| 64 | redirect: '/' | ||
| 65 | }, | ||
| 66 | { | ||
| 67 | path: '/', | ||
| 68 | component: Layout, | ||
| 69 | children: [ | ||
| 70 | { | ||
| 71 | path: '', | ||
| 72 | component: () => import('@/viewsPc/home'), | ||
| 73 | name: 'home' | ||
| 74 | }, | ||
| 75 | { | ||
| 76 | path: 'center', | ||
| 77 | component: () => import('@/viewsPc/center/index'), | ||
| 78 | children: [ | 45 | children: [ |
| 79 | { | 46 | { |
| 80 | path: 'myInfo', | 47 | path: '/redirect/:path(.*)', |
| 81 | component: () => import('@/viewsPc/center/myInfo'), | 48 | component: () => import('@/views/redirect/index') |
| 82 | name: 'myInfo', | 49 | } |
| 83 | meta: {title: '个人中心'} | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | path: 'myPassword', | ||
| 87 | component: () => import('@/viewsPc/center/myPassword'), | ||
| 88 | name: 'myPassword', | ||
| 89 | meta: {title: '修改密码'} | ||
| 90 | } | ||
| 91 | ] | 50 | ] |
| 92 | } | 51 | }, |
| 93 | ] | 52 | { |
| 94 | } | 53 | path: '/:pathMatch(.*)*', |
| 54 | component: () => import('@/views/error/404'), | ||
| 55 | hidden: true | ||
| 56 | }, | ||
| 57 | { | ||
| 58 | path: '/401', | ||
| 59 | component: () => import('@/views/error/401'), | ||
| 60 | hidden: true | ||
| 61 | }, | ||
| 62 | { | ||
| 63 | path: '/index', | ||
| 64 | redirect: '/' | ||
| 65 | }, | ||
| 66 | { | ||
| 67 | path: '/', | ||
| 68 | component: Layout, | ||
| 69 | children: [ | ||
| 70 | { | ||
| 71 | path: '', | ||
| 72 | component: () => import('@/viewsPc/home'), | ||
| 73 | name: 'home' | ||
| 74 | }, | ||
| 75 | { | ||
| 76 | path: 'center', | ||
| 77 | component: () => import('@/viewsPc/center/index'), | ||
| 78 | children: [ | ||
| 79 | { | ||
| 80 | path: 'myInfo', | ||
| 81 | component: () => import('@/viewsPc/center/myInfo'), | ||
| 82 | name: 'myInfo', | ||
| 83 | meta: {title: '个人中心'} | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | path: 'myPassword', | ||
| 87 | component: () => import('@/viewsPc/center/myPassword'), | ||
| 88 | name: 'myPassword', | ||
| 89 | meta: {title: '修改密码'} | ||
| 90 | } | ||
| 91 | ] | ||
| 92 | } | ||
| 93 | ] | ||
| 94 | } | ||
| 95 | ] | 95 | ] |
| 96 | 96 | ||
| 97 | const router = createRouter({ | 97 | const router = createRouter({ |
| 98 | // history: createWebHistory(import.meta.env.VITE_APP_CONTEXT_PATH), | 98 | // history: createWebHistory(import.meta.env.VITE_APP_CONTEXT_PATH), |
| 99 | history: createWebHashHistory(import.meta.env.VITE_APP_CONTEXT_PATH), | 99 | history: createWebHashHistory(import.meta.env.VITE_APP_CONTEXT_PATH), |
| 100 | routes: constantRoutes, | 100 | routes: constantRoutes, |
| 101 | scrollBehavior(to, from, savedPosition) { | 101 | scrollBehavior(to, from, savedPosition) { |
| 102 | if (savedPosition) { | 102 | if (savedPosition) { |
| 103 | return savedPosition | 103 | return savedPosition |
| 104 | } else { | 104 | } else { |
| 105 | return {top: 0} | 105 | return {top: 0} |
| 106 | } | ||
| 106 | } | 107 | } |
| 107 | } | ||
| 108 | }) | 108 | }) |
| 109 | NProgress.configure({showSpinner: false}) | 109 | NProgress.configure({showSpinner: false}) |
| 110 | 110 | ||
| 111 | router.beforeEach((to, from, next) => { | 111 | router.beforeEach((to, from, next) => { |
| 112 | NProgress.start() | 112 | NProgress.start() |
| 113 | if (getToken()) { | ||
| 114 | // 判断当前用户是否已拉取完user_info信息 | ||
| 115 | if (!useUserStore().user) { | ||
| 116 | isRelogin.show = true | ||
| 117 | useUserStore().getInfo().then(() => { | ||
| 118 | isRelogin.show = false | ||
| 119 | next() // hack方法 确保addRoutes已完成 | ||
| 120 | }).catch(err => { | ||
| 121 | useUserStore().logOut().then(() => { | ||
| 122 | ElMessage.error(err) | ||
| 123 | next({path: '/'}) | ||
| 124 | }) | ||
| 125 | }) | ||
| 126 | } else { | ||
| 127 | next() | ||
| 128 | } | ||
| 129 | } else { | ||
| 130 | // 没有token | ||
| 131 | next() | 113 | next() |
| 132 | } | 114 | // if (getToken()) { |
| 115 | // // 判断当前用户是否已拉取完user_info信息 | ||
| 116 | // if (!useUserStore().user) { | ||
| 117 | // | ||
| 118 | // isRelogin.show = true | ||
| 119 | // useUserStore().getInfo().then(() => { | ||
| 120 | // isRelogin.show = false | ||
| 121 | // next() // hack方法 确保addRoutes已完成 | ||
| 122 | // }).catch(err => { | ||
| 123 | // useUserStore().logOut().then(() => { | ||
| 124 | // ElMessage.error(err) | ||
| 125 | // next({path: '/'}) | ||
| 126 | // }) | ||
| 127 | // }) | ||
| 128 | // } else { | ||
| 129 | // next() | ||
| 130 | // } | ||
| 131 | // } else { | ||
| 132 | // // 没有token | ||
| 133 | // next() | ||
| 134 | // } | ||
| 133 | }) | 135 | }) |
| 134 | 136 | ||
| 135 | router.afterEach((to) => { | 137 | router.afterEach((to) => { |
| 136 | NProgress.done() | 138 | NProgress.done() |
| 137 | }) | 139 | }) |
| 138 | export default router | 140 | export default router | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| 1 | import { defineConfig, loadEnv } from 'vite' | 1 | import {defineConfig, loadEnv} from 'vite' |
| 2 | import path, { resolve } from 'path' | 2 | import path, {resolve} from 'path' |
| 3 | import createVitePlugins from './vite/plugins' | 3 | import createVitePlugins from './vite/plugins' |
| 4 | import inject from '@rollup/plugin-inject' | 4 | import inject from '@rollup/plugin-inject' |
| 5 | import commonjs from '@rollup/plugin-commonjs' | 5 | import commonjs from '@rollup/plugin-commonjs' |
| 6 | // import legacy from '@vitejs/plugin-legacy' | ||
| 7 | 6 | ||
| 8 | // https://vitejs.dev/config/ | 7 | export default defineConfig(({mode, command}) => { |
| 9 | export default defineConfig(({ mode, command }) => { | 8 | const env = loadEnv(mode, process.cwd()) |
| 10 | const env = loadEnv(mode, process.cwd()) | 9 | return { |
| 11 | return { | 10 | // 部署生产环境和开发环境下的URL。 |
| 12 | // 部署生产环境和开发环境下的URL。 | 11 | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 |
| 13 | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 | 12 | base: env.VITE_APP_CONTEXT_PATH, |
| 14 | base: env.VITE_APP_CONTEXT_PATH, | 13 | plugins: [ |
| 15 | plugins: [ | 14 | createVitePlugins(env, command === 'build'), |
| 16 | createVitePlugins(env, command === 'build'), | 15 | commonjs(), |
| 17 | commonjs(), | 16 | inject({ |
| 18 | inject({ | 17 | include: ['node_modules/**'], |
| 19 | include: ['node_modules/**'], | 18 | 'window.katex': 'katex', |
| 20 | 'window.katex': 'katex', | 19 | 'window.Quill': ['@vueup/vue-quill', 'Quill'] |
| 21 | 'window.Quill': ['@vueup/vue-quill', 'Quill'] | 20 | }) |
| 22 | }) | 21 | ], |
| 23 | // legacy({ | 22 | resolve: { |
| 24 | // targets: ['defaults', 'not IE 11'], // 需要兼容的目标列表,可以设置多个 | 23 | alias: { |
| 25 | // additionalLegacyPolyfills: ['regenerator-runtime/runtime'], | 24 | // 设置路径 |
| 26 | // renderLegacyChunks: true, | 25 | '~': path.resolve(__dirname, './'), |
| 27 | // polyfills: [ | 26 | // 设置别名 |
| 28 | // 'es.symbol', | 27 | '@': path.resolve(__dirname, './src'), |
| 29 | // 'es.array.filter', | 28 | '/@': path.resolve(__dirname, './src') |
| 30 | // 'es.promise', | 29 | }, |
| 31 | // 'es.promise.finally', | 30 | // https://cn.vitejs.dev/config/#resolve-extensions |
| 32 | // 'es/map', | 31 | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] |
| 33 | // 'es/set', | ||
| 34 | // 'es.array.for-each', | ||
| 35 | // 'es.object.define-properties', | ||
| 36 | // 'es.object.define-property', | ||
| 37 | // 'es.object.get-own-property-descriptor', | ||
| 38 | // 'es.object.get-own-property-descriptors', | ||
| 39 | // 'es.object.keys', | ||
| 40 | // 'es.object.to-string', | ||
| 41 | // 'web.dom-collections.for-each', | ||
| 42 | // 'esnext.global-this', | ||
| 43 | // 'esnext.string.match-all' | ||
| 44 | // ] | ||
| 45 | // }) | ||
| 46 | ], | ||
| 47 | resolve: { | ||
| 48 | // https://cn.vitejs.dev/config/#resolve-alias | ||
| 49 | alias: { | ||
| 50 | // 设置路径 | ||
| 51 | '~': path.resolve(__dirname, './'), | ||
| 52 | // 设置别名 | ||
| 53 | '@': path.resolve(__dirname, './src'), | ||
| 54 | '/@': path.resolve(__dirname, './src') | ||
| 55 | }, | ||
| 56 | // https://cn.vitejs.dev/config/#resolve-extensions | ||
| 57 | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] | ||
| 58 | }, | ||
| 59 | // vite 相关配置 | ||
| 60 | server: { | ||
| 61 | port: 5180, | ||
| 62 | host: true, | ||
| 63 | open: true, | ||
| 64 | proxy: { | ||
| 65 | // https://cn.vitejs.dev/config/#server-proxy | ||
| 66 | '/dev-api/ztx-train': { | ||
| 67 | // target: 'http://123.60.96.243:1896/stage-api', | ||
| 68 | target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 69 | changeOrigin: true, | ||
| 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') | ||
| 71 | }, | ||
| 72 | '/dev-api/ztx-match': { | ||
| 73 | // target: 'http://192.168.1.118:8083', | ||
| 74 | target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 75 | changeOrigin: true, | ||
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | ||
| 77 | }, | 32 | }, |
| 78 | '/dev-api/ztx-webSite': { | 33 | // vite 相关配置 |
| 79 | target: 'https://wdsfwuxicenter.com/stage-api/', | 34 | server: { |
| 80 | changeOrigin: true, | 35 | port: 5180, |
| 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 36 | host: true, |
| 37 | open: true, | ||
| 38 | proxy: { | ||
| 39 | '/dev-api/portal': { | ||
| 40 | // target: 'http://116.63.185.147:8088', | ||
| 41 | target: 'https://ff9451fo0879.vicp.fun', | ||
| 42 | changeOrigin: true, | ||
| 43 | rewrite: (p) => p.replace(/^\/dev-api\/portal/, '') | ||
| 44 | } | ||
| 45 | } | ||
| 82 | }, | 46 | }, |
| 83 | '/dev-api': { | 47 | css: { |
| 84 | // target: 'http://192.168.1.207:5511/', | 48 | postcss: { |
| 85 | target: 'https://jijin.wtwuxicenter.com/stage-api', | 49 | plugins: [ |
| 86 | changeOrigin: true, | 50 | { |
| 87 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 51 | postcssPlugin: 'internal:charset-removal', |
| 52 | AtRule: { | ||
| 53 | charset: (atRule) => { | ||
| 54 | if (atRule.name === 'charset') { | ||
| 55 | atRule.remove() | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | ] | ||
| 61 | } | ||
| 88 | }, | 62 | }, |
| 89 | '/ticket': { | 63 | build: { |
| 90 | // target: 'http://192.168.1.131:8098/', | 64 | rollupOptions: { |
| 91 | // target: 'http://192.168.1.131:8081/', | 65 | input: { |
| 92 | target: 'https://jijin.wtwuxicenter.com/h5/', | 66 | main: resolve(__dirname, 'index.html') |
| 93 | // target: 'https://ticketh5.wdsfwuxicenter.com/h5/', | ||
| 94 | changeOrigin: true, | ||
| 95 | rewrite: (p) => p.replace(/^\/ticket/, '') | ||
| 96 | } | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | // fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file | ||
| 100 | css: { | ||
| 101 | postcss: { | ||
| 102 | plugins: [ | ||
| 103 | { | ||
| 104 | postcssPlugin: 'internal:charset-removal', | ||
| 105 | AtRule: { | ||
| 106 | charset: (atRule) => { | ||
| 107 | if (atRule.name === 'charset') { | ||
| 108 | atRule.remove() | ||
| 109 | } | 67 | } |
| 110 | } | ||
| 111 | } | 68 | } |
| 112 | } | ||
| 113 | ] | ||
| 114 | } | ||
| 115 | }, | ||
| 116 | build: { | ||
| 117 | // target: 'es2015', | ||
| 118 | rollupOptions: { | ||
| 119 | input: { | ||
| 120 | main: resolve(__dirname, 'index.html') | ||
| 121 | } | 69 | } |
| 122 | } | ||
| 123 | } | 70 | } |
| 124 | } | ||
| 125 | }) | 71 | }) | ... | ... |
-
Please register or sign in to post a comment