ソースを参照

chore: bigmember 迁移到 vite

zhangyuhan 1 年間 前
コミット
cedb3efbab
48 ファイル変更420 行追加1469 行削除
  1. 4 4
      apps/bigmember_pc/.env.development
  2. 3 3
      apps/bigmember_pc/.env.production
  3. 3 3
      apps/bigmember_pc/.env.test
  4. 14 17
      apps/bigmember_pc/.eslintrc.cjs
  5. 0 14
      apps/bigmember_pc/babel.config.js
  6. 28 96
      apps/bigmember_pc/config/proxy.js
  7. 20 25
      apps/bigmember_pc/index.html
  8. 26 32
      apps/bigmember_pc/package.json
  9. 5 7
      apps/bigmember_pc/src/api/axios.js
  10. 2 2
      apps/bigmember_pc/src/api/index.js
  11. 0 29
      apps/bigmember_pc/src/api/mock.js
  12. 0 200
      apps/bigmember_pc/src/api/mock/commodity$couponInfo.json
  13. 0 415
      apps/bigmember_pc/src/api/mock/commodity$detail.json
  14. 0 9
      apps/bigmember_pc/src/api/mock/commodity$price.json
  15. 0 27
      apps/bigmember_pc/src/api/mock/use$isAdd.json
  16. 1 1
      apps/bigmember_pc/src/components/chart/ProgressChart.vue
  17. 1 1
      apps/bigmember_pc/src/components/common/BigMemberEmpty.vue
  18. 6 3
      apps/bigmember_pc/src/components/common/Empty.vue
  19. 1 1
      apps/bigmember_pc/src/components/contact-info/ContactInfo.vue
  20. 4 4
      apps/bigmember_pc/src/components/forecast/ForeCast.vue
  21. 4 4
      apps/bigmember_pc/src/components/medical/FollowList.vue
  22. 1 1
      apps/bigmember_pc/src/components/push-list/DistributorSearch.vue
  23. 1 1
      apps/bigmember_pc/src/components/push-list/MedicalList.vue
  24. 1 1
      apps/bigmember_pc/src/components/push-list/PotentialList.vue
  25. 2 2
      apps/bigmember_pc/src/components/push-list/ProjectProgressList.vue
  26. 1 1
      apps/bigmember_pc/src/components/subscribe-overview/index.vue
  27. 1 1
      apps/bigmember_pc/src/components/work-desktop/UserInfo.vue
  28. 5 2
      apps/bigmember_pc/src/main.js
  29. 2 2
      apps/bigmember_pc/src/router/router.js
  30. 5 1
      apps/bigmember_pc/src/utils/globalFunctions.js
  31. 1 1
      apps/bigmember_pc/src/views/Home.vue
  32. 2 2
      apps/bigmember_pc/src/views/PotentialList.vue
  33. 2 2
      apps/bigmember_pc/src/views/ProjectProgress.vue
  34. 1 1
      apps/bigmember_pc/src/views/analysisReport/MarketAnalysisResult.vue
  35. 1 1
      apps/bigmember_pc/src/views/customer/Buyer.vue
  36. 1 1
      apps/bigmember_pc/src/views/ent-intel/MyClient.vue
  37. 1 1
      apps/bigmember_pc/src/views/medical/institutionFollowed.vue
  38. 1 1
      apps/bigmember_pc/src/views/my-property/coupon.vue
  39. 2 2
      apps/bigmember_pc/src/views/portrayal/EntPortrayal.vue
  40. 2 2
      apps/bigmember_pc/src/views/portrayal/EntSearchPortrayal.vue
  41. 2 2
      apps/bigmember_pc/src/views/portrayal/UnitPortrayal.vue
  42. 1 1
      apps/bigmember_pc/src/views/portrayal/components/EntForm.vue
  43. 1 1
      apps/bigmember_pc/src/views/portrayal/components/EntHistoryForm.vue
  44. 1 1
      apps/bigmember_pc/src/views/project/AttendBiddingList.vue
  45. 137 0
      apps/bigmember_pc/vite.config.js
  46. 1 1
      apps/jy-pc/package.json
  47. 2 2
      package.json
  48. 120 538
      pnpm-lock.yaml

+ 4 - 4
apps/bigmember_pc/.env.development

@@ -1,5 +1,5 @@
 NODE_ENV=development
-VUE_APP_BASE_API='/bigmember'
-VUE_APP_BASE_URL='/swordfish/page_big_pc'
-VUE_APP_MOCK=false
-VUE_APP_BASE_PUBLIC='/'
+VITE_APP_BASE_API='/bigmember'
+VITE_APP_BASE_URL='/swordfish/page_big_pc'
+VITE_APP_MOCK=false
+VITE_APP_BASE_PUBLIC='/'

+ 3 - 3
apps/bigmember_pc/.env.production

@@ -1,4 +1,4 @@
 NODE_ENV=production
-VUE_APP_BASE_API='/bigmember'
-VUE_APP_BASE_URL='/page_big_pc'
-VUE_APP_BASE_PUBLIC='/page_big_pc/'
+VITE_APP_BASE_API='/bigmember'
+VITE_APP_BASE_URL='/page_big_pc'
+VITE_APP_BASE_PUBLIC='/page_big_pc/'

+ 3 - 3
apps/bigmember_pc/.env.test

@@ -1,4 +1,4 @@
 NODE_ENV=production
-VUE_APP_BASE_API='/bigmember/'
-VUE_APP_BASE_URL='/swordfish/page_big_pc'
-VUE_APP_BASE_PUBLIC='/page_big_pc/'
+VITE_APP_BASE_API='/bigmember/'
+VITE_APP_BASE_URL='/swordfish/page_big_pc'
+VITE_APP_BASE_PUBLIC='/page_big_pc/'

+ 14 - 17
apps/bigmember_pc/.eslintrc.cjs

@@ -1,25 +1,22 @@
 /* eslint-env node */
 require("@rushstack/eslint-patch/modern-module-resolution");
 module.exports = {
-  root: true,
-  env: {
-    node: true
-  },
-  extends: [
-    'plugin:vue/essential',
-    '@vue/standard'
-  ],
-  globals: {
+  "root": true,
+  "globals": {
     loginflag: true,
     $: true,
+    JyObj: true,
+    _hmt: true,
     vComponentChart: true
   },
-  parserOptions: {
-    parser: 'babel-eslint'
+  "rules": {
+    'no-console': 'warn',
+    'no-debugger': 'warn',
+    'eqeqeq': 'warn',
+    indent: ['error', 2, {
+      SwitchCase: 1
+    }],
+    quotes: ['error', 'single']
   },
-  rules: {
-    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
-    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
-    'eqeqeq': 'warn'
-  }
-}
+  "extends": ["plugin:vue/essential", "eslint:recommended", "@vue/eslint-config-prettier", "plugin:storybook/recommended"]
+};

+ 0 - 14
apps/bigmember_pc/babel.config.js

@@ -1,14 +0,0 @@
-module.exports = {
-  presets: [
-    '@vue/cli-plugin-babel/preset'
-  ],
-  plugins: [
-    [
-      'component',
-      {
-        libraryName: 'element-ui',
-        styleLibraryName: 'theme-chalk'
-      }
-    ]
-  ]
-}

+ 28 - 96
apps/bigmember_pc/config/proxy.js

@@ -1,100 +1,32 @@
+const PrefixAPIS = [
+  '/subVipPortrait/winner',
+  '/bigmember',
+  '/jypay',
+  '/entnicheNew',
+  '/OnlineCourses',
+  '/entbase',
+  '/publicapply',
+  '/subscribepay',
+  '/salesLeads',
+  '/privatedata',
+  '/leadGeneration',
+  '/jyCoupon',
+  '/front',
+  '/jymessageCenter',
+  '/userCenter',
+  '/jyMerge',
+  '/jyapi',
+  // 资源
+  '/commonFunctions',
+  '/common-module'
+]
+
 exports.getProxyOfDomain = function (domain) {
-  return {
-    // 反爬虫接口代理
-    // '/subVipPortrait/winner': {
-    //   target: domain,
-    //   changeOrigin: true,
-    //   logLevel: 'debug'
-    // },
-    '^/bigmember': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug',
-      pathRewrite: {
-        '^/bigmember': '/bigmember'
-      }
-    },
-    '^/jypay': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/entnicheNew': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/OnlineCourses': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/entbase': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/jyapi': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/publicapply': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/subscribepay': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/salesLeads': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/privatedata': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/leadGeneration': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/jyCoupon': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/front': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/jymessageCenter': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/userCenter': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/jyMerge': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    },
-    '^/commonFunctions': {
-      target: domain,
-      changeOrigin: true,
-      logLevel: 'debug'
-    }
-  }
+  const proxy = PrefixAPIS.reduce((a,b) => {
+    a[b] = domain
+    return a
+  }, {})
+  return proxy
 }
 
 exports.getProxyOfIp = function (ip) {

+ 20 - 25
apps/bigmember_pc/public/index.html → apps/bigmember_pc/index.html

@@ -1,12 +1,12 @@
 <!DOCTYPE html>
-<html>
+<html lang="zh-CN">
   <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <link rel="icon" href="/favicon.ico">
     <title>剑鱼标讯</title>
-    <% if (process.env.NODE_ENV === 'development') { %>
+    <% if (isDev) { %>
       <link ignore href="https://jybx2-webtest.jydev.jianyu360.com/css/bootstrap.min.css" rel="stylesheet">
       <link ignore href="https://jybx2-webtest.jydev.jianyu360.com/css/bootswatch.min.css" rel="stylesheet">
       <link ignore href="https://jybx2-webtest.jydev.jianyu360.com/css/font.css?v=6302" rel="stylesheet">
@@ -27,45 +27,40 @@
       <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
     <% } %>
 
-    <!-- 使用CDN的CSS文件 -->
-    <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.9.28/iconfont.css">
-    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/v-charts/1.19.0/style.min.css />
-    <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
-    <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
-    <% } %>
-    <!-- 使用CDN的JS文件 -->
-    <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
-    <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
-    <% } %>
-    <% if (process.env.NODE_ENV === 'production') { %>
+      <!-- 使用CDN的CSS文件 -->
+      <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.9.28/iconfont.css">
+
+      <!-- 使用CDN的CSS文件 -->
+      <% for (var i in cdn && cdn.css) { %>
+      <link rel="stylesheet" href="<%= cdn.css[i] %>" />
+      <% } %>
+      <!-- 使用CDN的JS文件 -->
+      <% for (var i in cdn && cdn.js) { %>
+      <script type="text/javascript" src="<%= cdn.js[i] %>"></script>
+      <% } %>
+
+      <% if (!isDev) { %>
       <link href='/css/reset.css?v=6302' rel="stylesheet" type="text/css"/>
       <link href='/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
       <script src="/antiRes/js/mainHook.js"></script>
       <script src="/common-module/chart-module/js/chart-common.js"></script>
     <% } %>
-    <% if (process.env.NODE_ENV === 'development') { %>
+      <% if (isDev) { %>
       <!-- test--- 加载 公共js方法 -->
-      <script src="//cdn-common.jianyu360.com/cdn/lib/lodash/4.17.21/lodash.min.js"></script>
        <script defer src="/common-module/chart-module/js/chart-common.js"></script>
-       <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js"></script>
-       <script src=//cdn-common.jianyu360.com/cdn/lib/echarts/4.8.0/echarts.min.js></script>
-       <script src=//cdn-common.jianyu360.com/cdn/lib/v-charts/1.19.0/index.min.js></script>
-       <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/v-charts/1.19.0/style.min.css />
      <% } %>
   </head>
   <style>
     .big-member-page {
       margin: 0 auto;
     }
-    body.big-transparent{
-      background-color: transparent!important;
-    }
   </style>
-  <body>
+  <body style="background-color: #f2f2f4;">
     <noscript>
-      <strong>We're sorry but app1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+      <strong>JavaScript enabled. Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
+    <script type="module" src="/src/main.js"></script>
     <!-- built files will be auto injected -->
   </body>
 </html>

+ 26 - 32
apps/bigmember_pc/package.json

@@ -1,30 +1,26 @@
 {
-  "name": "app",
+  "name": "bigmember",
   "version": "0.1.0",
   "private": true,
   "scripts": {
-    "serve": "vue-cli-service serve --port 8081",
-    "build": "vue-cli-service build --mode production",
-    "build:linux": "rm -rf node_module/.cache && vue-cli-service build",
-    "build:test": "vue-cli-service build --mode test",
-    "lint": "vue-cli-service lint --fix",
-    "analyzer": "use_analyzer=true vue-cli-service build --mode production",
-    "analyze": "cross-env use_analyzer=true vue-cli-service build --mode production"
+    "dev": "vite",
+    "build": "vite build",
+    "preview": "vite preview --port 4173",
+    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
   },
   "dependencies": {
-    "@jianyu/easy-fix-sub-app": "^0.0.1",
-    "@jianyu/easy-inject-qiankun": "^0.1.10",
+    "@jianyu/easy-fix-sub-app": "^0.0.2",
+    "@jianyu/easy-inject-qiankun": "^0.1.11",
     "@jianyu/icon": "^0.1.7",
     "@jianyu/reset.css": "~0.1.1",
-    "core-js": "^3.4.3",
     "dayjs": "^1.11.7",
     "echarts": "4.8.0",
-    "element-ui": "workspace:^",
+    "element-ui": "^2.15.16-rc",
     "excellentexport": "^3.8.1",
-    "jquery": "^3.6.0",
     "js-cookie": "^3.0.1",
     "lodash": "^4.17.21",
     "moment": "^2.29.1",
+    "qs": "^6.11.2",
     "svga": "^2.0.6",
     "v-charts": "1.19.0",
     "vue-cookies": "^1.7.4",
@@ -32,24 +28,22 @@
     "vuex": "^3.6.2"
   },
   "devDependencies": {
-    "@vue/cli-plugin-babel": "^4.1.0",
-    "@vue/cli-plugin-eslint": "~4.5.0",
-    "@vue/cli-plugin-router": "^4.1.0",
-    "@vue/cli-service": "^4.1.2",
-    "@vue/eslint-config-standard": "^5.1.2",
-    "babel-eslint": "^10.1.0",
-    "babel-plugin-component": "^1.1.1",
-    "cross-env": "^7.0.3",
-    "eslint": "^6.7.2",
-    "eslint-plugin-import": "^2.20.2",
-    "eslint-plugin-node": "^11.1.0",
-    "eslint-plugin-promise": "^4.2.1",
-    "eslint-plugin-standard": "^4.0.0",
-    "eslint-plugin-vue": "^6.2.2",
-    "sass": "^1.26.5",
-    "sass-loader": "^8.0.2",
-    "vue-cli-plugin-single-spa": "^1.0.1",
-    "vue-template-compiler": "^2.6.10",
-    "webpack-bundle-analyzer": "^4.4.1"
+    "vite-plugin-require": "^1.1.14",
+    "@rushstack/eslint-patch": "^1.1.0",
+    "@vitejs/plugin-legacy": "^4.0.4",
+    "@vitejs/plugin-vue2": "^2.2.0",
+    "@vue/eslint-config-prettier": "^7.0.0",
+    "autoprefixer": "^10.4.14",
+    "eslint": "^8.5.0",
+    "eslint-plugin-vue": "^9.0.0",
+    "jquery": "^3.6.0",
+    "prettier": "^2.5.1",
+    "sass": "^1.63.2",
+    "terser": "^5.14.2",
+    "unplugin-vue-components": "^0.25.1",
+    "vite": "^4.3.9",
+    "vite-plugin-ejs": "^1.6.4",
+    "vite-plugin-externals": "^0.6.2",
+    "vite-plugin-legacy-qiankun": "^0.0.12"
   }
 }

+ 5 - 7
apps/bigmember_pc/src/api/axios.js

@@ -1,10 +1,10 @@
 import axios from 'axios'
-import mock from '@/api/mock'
 
-console.log('[debug]当前环境:', process.env)
+console.log('[debug]当前环境:', import.meta.env)
 const service = axios.create({
-  baseURL: process.env.VUE_APP_BASE_API
+  baseURL: import.meta.env.VITE_APP_BASE_API
 })
+
 service.interceptors.request.use(config => {
   // 在请求发送之前做一些事
   return config
@@ -17,7 +17,7 @@ service.interceptors.request.use(config => {
 // 添加一个返回拦截器
 service.interceptors.response.use(response => {
   // 此处添加响应拦截
-  if (process.env.NODE_ENV === 'production' && response.config && !response.config.noIntercept && !window.$noIntercept) {
+  if (import.meta.env.NODE_ENV === 'production' && response.config && !response.config.noIntercept && !window.$noIntercept) {
     const noPermissionText = ['未登录', '需要登录', '需要登录!']
     const noPermission = noPermissionText.includes(response.data.error_msg)
     if (noPermission) {
@@ -27,6 +27,4 @@ service.interceptors.response.use(response => {
   return response.data
 })
 
-const useMock = process.env.NODE_ENV === 'development' && process.env.VUE_APP_MOCK === 'true'
-
-export default useMock ? mock : service
+export default service

+ 2 - 2
apps/bigmember_pc/src/api/index.js

@@ -11,7 +11,7 @@ import qs from 'qs'
 // jquery请求
 const ajax = config => new Promise((resolve, reject) => {
   // 获取url参数
-  const url = config.baseURL ? config.baseURL + config.url : process.env.VUE_APP_BASE_API + config.url
+  const url = config.baseURL ? config.baseURL + config.url : import.meta.env.VITE_APP_BASE_API + config.url
 
   const ajaxConf = {
     url: url,
@@ -54,7 +54,7 @@ const ajax = config => new Promise((resolve, reject) => {
     },
     success: res => {
       // 此处添加响应拦截
-      if (process.env.NODE_ENV === 'production' && config && !config.noIntercept && !window.$noIntercept) {
+      if (import.meta.env.NODE_ENV === 'production' && config && !config.noIntercept && !window.$noIntercept) {
         const noPermissionText = ['未登录', '需要登录', '需要登录!']
         const noPermission = noPermissionText.includes(res.error_msg)
         if (noPermission) {

+ 0 - 29
apps/bigmember_pc/src/api/mock.js

@@ -1,29 +0,0 @@
-const files = require.context('@/api/mock', false, /\.json$/)
-const mocks = {}
-files.keys().forEach(key => {
-  const tempK = '/' + key.replace(/\$/g, '/').replace(/(\.\/|\.json)/g, '')
-  mocks[tempK] = files(key)
-})
-
-function mock (config) {
-  return new Promise(resolve => {
-    setTimeout(() => {
-      const result = {
-        data: mocks[config.url]
-      }
-      // Toast.clear()
-      try {
-        console.log('[debug]当前mock', config, result.data)
-        if (!result.data.error_msg) {
-          // Toast(result.data.msg)
-        }
-      } catch (e) {
-        console.log('[debug]当前mock', config)
-        console.log(e)
-      }
-      resolve(result.data)
-    }, Math.random() * 3 * 1000 + 2000)
-  })
-}
-
-export default mock

+ 0 - 200
apps/bigmember_pc/src/api/mock/commodity$couponInfo.json

@@ -1,200 +0,0 @@
-{
-  "data": [
-    {
-      "title": "超级订阅",
-      "desc": "续费超级订阅",
-      "extend": null,
-      "sku": [
-        {
-          "productId": 1012,
-          "name": "超级订阅10月",
-          "info": "10月",
-          "choosed": false,
-          "lotteryId": 11028,
-          "activityId": 569,
-          "originalPrice": 6666,
-          "discountPrice": 5555,
-          "discountAmount": 1111,
-          "activity": [
-            {
-              "activityId": 569,
-              "title": "开发测试满折",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 1,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满200元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 1028,
-                  "activityId": 569,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 20000,
-                  "reduce": 0,
-                  "discount": 7,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                },
-                {
-                  "title": "满200元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 11028,
-                  "activityId": 569,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 20000,
-                  "reduce": 0,
-                  "discount": 7,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 570,
-              "title": "开发测试限时折扣",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 1676390400,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676390400,
-                  "endtime": 1676995200,
-                  "type": 4,
-                  "stockNumber": 10,
-                  "lotteryId": 1647,
-                  "activityId": 570,
-                  "usable": true,
-                  "choosed": true,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.1,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                },
-                {
-                  "title": "",
-                  "starttime": 1676390400,
-                  "endtime": 1676995200,
-                  "type": 4,
-                  "stockNumber": 10,
-                  "lotteryId": 31647,
-                  "activityId": 2570,
-                  "usable": false,
-                  "choosed": true,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.1,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 621,
-              "title": "超级订阅满赠",
-              "desc": "",
-              "starttime": 1676875560,
-              "endtime": -62135596800,
-              "type": 2,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "超级订阅7天",
-                  "starttime": 1676875560,
-                  "endtime": 1676908800,
-                  "type": 2,
-                  "stockNumber": 5,
-                  "lotteryId": 1717,
-                  "activityId": 621,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0,
-                  "promotionalPrice": 0,
-                  "time": 7,
-                  "timeType": 1
-                },
-                {
-                  "title": "超级订阅7天",
-                  "starttime": 1676875560,
-                  "endtime": 1676908800,
-                  "type": 2,
-                  "stockNumber": 5,
-                  "lotteryId": 51717,
-                  "activityId": 3621,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0,
-                  "promotionalPrice": 0,
-                  "time": 7,
-                  "timeType": 1
-                }
-              ]
-            },
-            {
-              "activityId": 622,
-              "title": "f测试",
-              "desc": "",
-              "starttime": 1676908800,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676908800,
-                  "endtime": 1677081600,
-                  "type": 4,
-                  "stockNumber": 4,
-                  "lotteryId": 1718,
-                  "activityId": 622,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.4,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            }
-          ]
-        }
-      ]
-    }
-  ],
-  "error_code": 0,
-  "error_msg": ""
-}

+ 0 - 415
apps/bigmember_pc/src/api/mock/commodity$detail.json

@@ -1,415 +0,0 @@
-{
-  "data": [
-    {
-      "title": "超级订阅",
-      "desc": "续费超级订阅",
-      "extend": null,
-      "sku": [
-        {
-          "productId": 1012,
-          "name": "超级订阅1月",
-          "info": "1月",
-          "choosed": false,
-          "lotteryId": 88500,
-          "activityId": 99500,
-          "originalPrice": 3800,
-          "discountPrice": 380,
-          "discountAmount": 3420,
-          "activity": [
-            {
-              "activityId": 99500,
-              "title": "满减活动-活动开始-有库存",
-              "desc": "",
-              "starttime": 1674208148,
-              "endtime": 1705744148,
-              "type": 0,
-              "stockNumber": 10,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满20元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 88500,
-                  "activityId": 99500,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 2000,
-                  "reduce": 0,
-                  "tag": "立减1000",
-                  "discount": 99500,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 99501,
-              "title": "满减活动-活动未开始-有库存",
-              "desc": "",
-              "starttime": 1684576148,
-              "endtime": 1705744148,
-              "type": 0,
-              "stockNumber": 10,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满减活动-活动未开始-有库存 -- 满20元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 88501,
-                  "activityId": 99501,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 2000,
-                  "reduce": 0,
-                  "discount": 99501,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 99502,
-              "title": "开发测试满折",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 1,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满200元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 88502,
-                  "activityId": 99502,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 20000,
-                  "reduce": 0,
-                  "discount": 99502,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 570,
-              "title": "开发测试限时折扣",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 1676390400,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676390400,
-                  "endtime": 1676995200,
-                  "type": 4,
-                  "stockNumber": 10,
-                  "lotteryId": 1647,
-                  "activityId": 570,
-                  "usable": true,
-                  "choosed": true,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.1,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 621,
-              "title": "超级订阅满赠",
-              "desc": "",
-              "starttime": 1676875560,
-              "endtime": -62135596800,
-              "type": 2,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "超级订阅7天",
-                  "starttime": 1676875560,
-                  "endtime": 1676908800,
-                  "type": 2,
-                  "stockNumber": 5,
-                  "lotteryId": 1717,
-                  "activityId": 621,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0,
-                  "promotionalPrice": 0,
-                  "time": 7,
-                  "timeType": 1
-                }
-              ]
-            },
-            {
-              "activityId": 622,
-              "title": "f测试",
-              "desc": "",
-              "starttime": 1676908800,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676908800,
-                  "endtime": 1677081600,
-                  "type": 4,
-                  "stockNumber": 4,
-                  "lotteryId": 1718,
-                  "activityId": 622,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.4,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            }
-          ]
-        },
-        {
-          "productId": 1013,
-          "name": "超级订阅1季",
-          "info": "1季",
-          "choosed": false,
-          "lotteryId": 1647,
-          "activityId": 570,
-          "originalPrice": 9900,
-          "discountPrice": 990,
-          "discountAmount": 8910,
-          "activity": [
-            {
-              "activityId": 569,
-              "title": "开发测试满折",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 1,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满200元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 1028,
-                  "activityId": 569,
-                  "usable": false,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 20000,
-                  "reduce": 0,
-                  "discount": 7,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 570,
-              "title": "开发测试限时折扣",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 1676390400,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676390400,
-                  "endtime": 1676995200,
-                  "type": 4,
-                  "stockNumber": 10,
-                  "lotteryId": 1647,
-                  "activityId": 570,
-                  "usable": true,
-                  "choosed": true,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.1,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 621,
-              "title": "超级订阅满赠",
-              "desc": "",
-              "starttime": 1676875560,
-              "endtime": -62135596800,
-              "type": 2,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "超级订阅7天",
-                  "starttime": 1676875560,
-                  "endtime": 1676908800,
-                  "type": 2,
-                  "stockNumber": 5,
-                  "lotteryId": 1717,
-                  "activityId": 621,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0,
-                  "promotionalPrice": 0,
-                  "time": 7,
-                  "timeType": 1
-                }
-              ]
-            }
-          ]
-        },
-        {
-          "productId": 1014,
-          "name": "超级订阅1年",
-          "info": "1年",
-          "choosed": true,
-          "lotteryId": 1647,
-          "activityId": 570,
-          "originalPrice": 38000,
-          "discountPrice": 3800,
-          "discountAmount": 34200,
-          "activity": [
-            {
-              "activityId": 569,
-              "title": "开发测试满折",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 1,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "满200元打7折",
-                  "starttime": 1676706423,
-                  "endtime": 1677570423,
-                  "type": 1,
-                  "stockNumber": 0,
-                  "lotteryId": 1028,
-                  "activityId": 569,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 1422923,
-                  "full": 20000,
-                  "reduce": 0,
-                  "discount": 0.7,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 570,
-              "title": "开发测试限时折扣",
-              "desc": "",
-              "starttime": 1676390400,
-              "endtime": -62135596800,
-              "type": 4,
-              "preStartTime": 1676390400,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "",
-                  "starttime": 1676390400,
-                  "endtime": 1676995200,
-                  "type": 4,
-                  "stockNumber": 10,
-                  "lotteryId": 1647,
-                  "activityId": 570,
-                  "usable": true,
-                  "choosed": true,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0.1,
-                  "promotionalPrice": 0,
-                  "time": 0,
-                  "timeType": 0
-                }
-              ]
-            },
-            {
-              "activityId": 621,
-              "title": "超级订阅满赠",
-              "desc": "",
-              "starttime": 1676875560,
-              "endtime": -62135596800,
-              "type": 2,
-              "preStartTime": 0,
-              "isAppointment": 0,
-              "discount": [
-                {
-                  "title": "超级订阅7天",
-                  "starttime": 1676875560,
-                  "endtime": 1676908800,
-                  "type": 2,
-                  "stockNumber": 5,
-                  "lotteryId": 1717,
-                  "activityId": 621,
-                  "usable": true,
-                  "choosed": false,
-                  "UserLotterId": 0,
-                  "full": 0,
-                  "reduce": 0,
-                  "discount": 0,
-                  "promotionalPrice": 0,
-                  "time": 7,
-                  "timeType": 1
-                }
-              ]
-            }
-          ]
-        }
-      ]
-    }
-  ],
-  "error_code": 0,
-  "error_msg": ""
-}

+ 0 - 9
apps/bigmember_pc/src/api/mock/commodity$price.json

@@ -1,9 +0,0 @@
-{
-  "data": {
-    "originalPrice": 9999,
-    "discountPrice": 8888,
-    "discountAmount": 1111
-  },
-  "error_code": 0,
-  "error_msg": ""
-}

+ 0 - 27
apps/bigmember_pc/src/api/mock/use$isAdd.json

@@ -1,27 +0,0 @@
-{
-  "error_code": 0,
-  "error_msg": "",
-  "data": {
-    "combo": "自定义",
-    "entname": "2222",
-    "isSubCount": false,
-    "isUsed": true,
-    "is_member_trial": false,
-    "memberStatus": 5,
-    "power": [
-      1,
-      12,
-      13,
-      15,
-      4,
-      5,
-      10,
-      14,
-      3,
-      6,
-      7,
-      8,
-      9
-    ]
-  }
-}

+ 1 - 1
apps/bigmember_pc/src/components/chart/ProgressChart.vue

@@ -51,7 +51,7 @@
             </div>
           </div>
         </div>
-        <empty :images="require('@/assets/images/empty/jy-back.png')" v-else>
+        <empty images="jy-back.png" v-else>
           <div class="flex-c-c center">
             <span>该时间范围暂无首次合作过的客户</span>
           </div>

+ 1 - 1
apps/bigmember_pc/src/components/common/BigMemberEmpty.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="empty-index-container" :class="classfuncType?'reportempty':''">
     <div class="empty-content-position">
-      <el-image v-if="imgShow" :src="require('@/assets/images/bmempty.png')"></el-image>
+      <el-image v-if="imgShow" :src="import('@/assets/images/bmempty.png')"></el-image>
       <div class="empty-main">
         <slot class="default">
           <slot name="tipText">{{ tip }}</slot>

+ 6 - 3
apps/bigmember_pc/src/components/common/Empty.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="empty-container" :class="{ mtb60 }">
     <div class="empty-content-position" :class="[directions]">
-      <el-image v-if="images" :src="images"></el-image>
+      <el-image v-if="images" :src="imgURL"></el-image>
       <div class="empty-main">
         <slot name="default">{{ tip }}</slot>
         <slot name="button"></slot>
@@ -12,6 +12,7 @@
 
 <script>
 import { Image } from 'element-ui'
+import { getAssetsFile } from '@/utils'
 export default {
   name: 'empty',
   components: {
@@ -36,8 +37,7 @@ export default {
     images: {
       type: String,
       default () {
-        // return require('@/assets/images/empty.png')
-        return require('@/assets/images/empty/jy-back.png')
+        return 'jy-back.png'
       }
     }
   },
@@ -45,6 +45,9 @@ export default {
     // 对row、column包装,避免与bootstrap类名冲突
     directions () {
       return `v-${this.direction}`
+    },
+    imgURL () {
+      return getAssetsFile(`empty/${this.images}`)
     }
   }
 }

+ 1 - 1
apps/bigmember_pc/src/components/contact-info/ContactInfo.vue

@@ -54,7 +54,7 @@
     </div>
     <!-- 搜索 重构dom img会有短暂白底占位因此不使用v-else使用v-show -->
     <div class="nodata" v-show="!showContact || (!currentShowList || currentShowList.length === 0)">
-      <Empty  :images="require('@/assets/images/empty/jy-back.png')" style="margin-bottom: 0;">
+      <Empty  images="jy-back.png" style="margin-bottom: 0;">
         <div slot="default" style="text-align:center">
           <span>{{emptyText}}</span>
         </div>

+ 4 - 4
apps/bigmember_pc/src/components/forecast/ForeCast.vue

@@ -275,7 +275,7 @@
       <el-button v-if="resetStatus" class="add-btn" type="primary" slot="button" @click="goResetFilter">重置筛选</el-button>
       <el-button v-if="goSetStatus" class="add-btn" type="primary" slot="button" @click="setKey">前往订阅设置</el-button>
     </Empty>
-    <Empty v-else-if="showEmpty && potenCode == 1" :images="require('@/assets/images/empty/jy-cry.png')">
+    <Empty v-else-if="showEmpty && potenCode == 1" images="jy-cry.png">
       <div name="default">
         <div class="poten_tip">暂未设置订阅关键词,无法进行预测</div>
         <div class="setKeyWords" v-if="!info.isSubCount">
@@ -348,7 +348,7 @@ export default {
       isFollow: '1',
       potenCode: 0,
       tips: '', // 空状态提示
-      tipimages: require('@/assets/images/empty/jy-cry.png'),
+      tipimages: 'jy-cry.png',
       dialog: {
         group: false
       },
@@ -823,10 +823,10 @@ export default {
     getEntListTips () {
       if (this.myDataObj && !this.myDataObj.match && !this.myDataObj.group && this.myDataObj.initTotal === 0) {
         this.tips = '暂无企业情报信息,前往企业搜索关注企业'
-        this.tipimages = require('@/assets/images/empty/jy-back.png')
+        this.tipimages = import('@/assets/images/empty/jy-back.png')
       } else if (this.myDataObj && this.myDataObj.list.length === 0 && this.myDataObj.initTotal !== 0) {
         this.tips = '暂无匹配数据'
-        this.tipimages = require('@/assets/images/empty/jy-back.png')
+        this.tipimages = import('@/assets/images/empty/jy-back.png')
       }
     },
     changeTime (data) {

+ 4 - 4
apps/bigmember_pc/src/components/medical/FollowList.vue

@@ -60,7 +60,7 @@
         </li>
       </ul>
     </div>
-    <Empty v-show="showEmpty" :images="require('@/assets/images/empty/jy-back.png')">
+    <Empty v-show="showEmpty" images="jy-back.png">
       <div name="default">{{ getTipText }}</div>
     </Empty>
     <div class="el-pagination-container" v-show="!showEmpty">
@@ -142,7 +142,7 @@ export default {
       },
       isFollow: '1',
       tips: '', // 空状态提示
-      tipimages: require('@/assets/images/empty/jy-cry.png'),
+      tipimages: import('@/assets/images/empty/jy-cry.png'),
       dialog: {
         group: false
       },
@@ -335,10 +335,10 @@ export default {
     getEntListTips () {
       if (this.myDataObj && !this.filter.match && !this.filter.group && this.myDataObj.initTotal === 0) {
         this.tips = '暂未认领任何经销商'
-        this.tipimages = require('@/assets/images/empty/jy-back.png')
+        this.tipimages = import('@/assets/images/empty/jy-back.png')
       } else if (this.myDataObj && this.myDataObj.list.length === 0 && this.myDataObj.initTotal !== 0) {
         this.tips = '暂无匹配数据'
-        this.tipimages = require('@/assets/images/empty/jy-back.png')
+        this.tipimages = import('@/assets/images/empty/jy-back.png')
       }
     }
   }

+ 1 - 1
apps/bigmember_pc/src/components/push-list/DistributorSearch.vue

@@ -41,7 +41,7 @@
           </div>
         </div>
       </div>
-      <empty v-if="showEmpty" :images="require('@/assets/images/empty/jy-smile.png')">
+      <empty v-if="showEmpty" images="jy-smile.png">
         <!-- <div v-if="isAllFirst">
           <span>选择条件,立即挖掘</span>
         </div> -->

+ 1 - 1
apps/bigmember_pc/src/components/push-list/MedicalList.vue

@@ -42,7 +42,7 @@
       </div>
       <!-- 认领添加标签 -->
       <v-popper ref="popperRef" @getClientList="refreshClaim"></v-popper>
-      <empty v-if="showEmpty" :images="require('@/assets/images/empty/jy-smile.png')">
+      <empty v-if="showEmpty" images="jy-smile.png">
         <div v-if="isAllFirst">
           <span></span>
         </div>

+ 1 - 1
apps/bigmember_pc/src/components/push-list/PotentialList.vue

@@ -53,7 +53,7 @@
           </div>
         </div>
       </div>
-      <empty v-if="showEmpty" :images="require('@/assets/images/empty/jy-smile.png')">
+      <empty v-if="showEmpty" images="jy-smile.png">
         <div v-if="isAllFirst">
           <span>选择条件,立即挖掘</span>
         </div>

+ 2 - 2
apps/bigmember_pc/src/components/push-list/ProjectProgressList.vue

@@ -43,13 +43,13 @@
           </span>
         </template>
       </article-item>
-      <empty v-show="showEmpty && !nullProjectTips" :images="require('@/assets/images/empty/jy-back.png')">
+      <empty v-show="showEmpty && !nullProjectTips" images="jy-back.png">
         <div class="flex-c-c center">
           <span>暂无项目进度信息,前往招标搜索关注项目</span>
           <button class="null_tips_btn" @click="jumpPage" v-if="!biMode">添加关注项目</button>
         </div>
       </empty>
-      <empty v-show="nullProjectTips && showEmpty" :images="require('@/assets/images/empty/jy-back.png')">
+      <empty v-show="nullProjectTips && showEmpty" images="jy-back.png">
         <div class="flex-c-c center">
           <span>暂无匹配数据</span>
         </div>

+ 1 - 1
apps/bigmember_pc/src/components/subscribe-overview/index.vue

@@ -275,7 +275,7 @@ export default {
     .detail-drawer{
       .el-drawer__body {
         position: relative;
-        overflow-X: hidden;
+        overflow-x: hidden;
         border-top:1px solid #f2f2f2;
       }
       .el-dialog__close{

+ 1 - 1
apps/bigmember_pc/src/components/work-desktop/UserInfo.vue

@@ -13,7 +13,7 @@
     </div>
     <div class="combo">
       <div class="item-headimg">
-        <img v-if="info.member_status" :src="require(`../../assets/images/big-${info.member_status}.png`)" alt="">
+        <img v-if="info.member_status" :src="import(`../../assets/images/big-${info.member_status}.png`)" alt="">
       </div>
       <div>
         <h3 class="item-title c-name">大会员{{info.combo}}</h3>

+ 5 - 2
apps/bigmember_pc/src/main.js

@@ -1,11 +1,13 @@
-import '@jianyu/easy-inject-qiankun/src/pre-mount'
+import '@jianyu/easy-inject-qiankun/src/pre-mount.js'
 import Vue from 'vue'
 import App from './App.vue'
 import store from './store/'
 import router from './router/'
 import '@jianyu/reset.css/reset-pc.scss'
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
 import { easySubAppRegister } from '@jianyu/easy-inject-qiankun'
-import { fixGetComputedStyle } from '@jianyu/easy-fix-sub-app/lib/getComputedStyle'
+import { fixGetComputedStyle } from '@jianyu/easy-fix-sub-app/lib/getComputedStyle.js'
 import VueCookies from 'vue-cookies'
 import { Loading, Message, MessageBox } from 'element-ui'
 import echarts from 'echarts'
@@ -20,6 +22,7 @@ import JyIcon from '@jianyu/icon' // 需要单独引入icon/index.css
 Vue.use(VueCookies)
 Vue.use(Loading.directive)
 Vue.use(Toast)
+Vue.use(ElementUI)
 Vue.use(MetaInfo).use(JyIcon)
 
 Vue.prototype.$modalHelper = ModalHelper

+ 2 - 2
apps/bigmember_pc/src/router/router.js

@@ -8,13 +8,13 @@ import myProperty from './my-property'
 import order from './modules/order'
 import analyse from './modules/analyse'
 
-if (process.env.NODE_ENV !== 'production') {
+if (import.meta.env.NODE_ENV !== 'production') {
   Vue.use(VueRouter)
 }
 
 const router = new VueRouter({
   mode: 'history',
-  base: window.__POWERED_BY_QIANKUN__ ? window.__QIANKUN_ROUTER_BASE : process.env.VUE_APP_BASE_URL,
+  base: window.__POWERED_BY_QIANKUN__ ? window.__QIANKUN_ROUTER_BASE : import.meta.env.VITE_APP_BASE_URL,
   routes: [
     ...routers,
     ...workspace,

+ 5 - 1
apps/bigmember_pc/src/utils/globalFunctions.js

@@ -685,4 +685,8 @@ export function calcShadowRootEvent(e) {
     }
   }
   return event;
-}
+}
+
+export function getAssetsFile (url) {
+  return new URL(`../assets/images/${url}`, import.meta.url).href
+}

+ 1 - 1
apps/bigmember_pc/src/views/Home.vue

@@ -45,7 +45,7 @@ export default {
   },
   data () {
     return {
-      topImg: require('@/assets/images/bg_1.png'),
+      topImg: import('@/assets/images/bg_1.png'),
       navItem: [
         {
           text: '中标企业预测',

+ 2 - 2
apps/bigmember_pc/src/views/PotentialList.vue

@@ -91,13 +91,13 @@ export default {
     return {
       topInfo: {
         c: {
-          img: require('@/assets/images/item_3.png'),
+          img: import('@/assets/images/item_3.png'),
           icon: 'top-c',
           text: '潜在客户挖掘',
           desc: '潜在客户'
         },
         r: {
-          img: require('@/assets/images/item_1.png'),
+          img: import('@/assets/images/item_1.png'),
           icon: 'top-r',
           text: '潜在竞争对手 / 合作伙伴挖掘'
         }

+ 2 - 2
apps/bigmember_pc/src/views/ProjectProgress.vue

@@ -77,13 +77,13 @@ export default {
     return {
       topInfo: {
         c: {
-          img: require('@/assets/images/item_11.png'),
+          img: import('@/assets/images/item_11.png'),
           icon: 'project-c',
           text: '项目进度监控',
           desc: ''
         },
         r: {
-          img: require('@/assets/images/item_1.png'),
+          img: import('@/assets/images/item_1.png'),
           icon: 'top-r',
           text: '潜在竞争对手 / 合作伙伴挖掘'
         }

+ 1 - 1
apps/bigmember_pc/src/views/analysisReport/MarketAnalysisResult.vue

@@ -351,7 +351,7 @@ import { moneyUnit, dateFormatter, formatPrice } from '@/utils/globalFunctions'
 import { workDeskTop } from '@/utils/mixins/in-workdesktop'
 import ProjectDetailsList from './components/ProjectDetailsList.vue'
 function getImgForVipUpgrade (name, bg = false, suffix = '.png') {
-  return require('@/assets/images/report/' + (bg ? 'bg/' : '') + name + suffix)
+  return import('@/assets/images/report/' + (bg ? 'bg/' : '') + name + suffix)
 }
 export default {
   name: 'analysis-report-result',

+ 1 - 1
apps/bigmember_pc/src/views/customer/Buyer.vue

@@ -62,7 +62,7 @@
       <unit-list title="即将到期项目" :bidparams="bidInfoParams" v-if="listShow.expire" @list="getList(arguments)"></unit-list>
       <!-- 招标动态 -->
       <unit-list id="biddding-information" title="招标动态" :bidparams="bidInfoParams" v-if="listShow.bid" @list="getList(arguments)"></unit-list>
-      <Empty v-show="emptyShow" :images="require('@/assets/images/empty/jy-chagrin.png')">
+      <Empty v-show="emptyShow" images="jy-chagrin.png">
         <div slot="default" style="text-align:center">
           <span>对不起,没有匹配到相关信息,</span><br/>
           <span>修改时间范围或换个搜索词试试吧</span>

+ 1 - 1
apps/bigmember_pc/src/views/ent-intel/MyClient.vue

@@ -92,7 +92,7 @@
                 </el-pagination>
               </div>
             </div>
-            <Empty v-show="showEmpty" :images="require('@/assets/images/empty/jy-back.png')">
+            <Empty v-show="showEmpty" images="jy-back.png">
               <div name="default">{{showTips}}</div>
               <el-button
                 v-if="showAddButton"

+ 1 - 1
apps/bigmember_pc/src/views/medical/institutionFollowed.vue

@@ -52,7 +52,7 @@
               </el-pagination>
             </div>
           </div>
-          <Empty v-show="showEmpty" :images="require('@/assets/images/empty/jy-back.png')">
+          <Empty v-show="showEmpty" images="jy-back.png">
             <div name="default">{{ showTips }}</div>
           </Empty>
         </div>

+ 1 - 1
apps/bigmember_pc/src/views/my-property/coupon.vue

@@ -47,7 +47,7 @@ export default {
   },
   data: function () {
     return {
-      img: require('@/assets/images/pc_12.png'),
+      img: import('@/assets/images/pc_12.png'),
       tabActiveName: 'notUsed',
       tabList: [
         {

+ 2 - 2
apps/bigmember_pc/src/views/portrayal/EntPortrayal.vue

@@ -120,7 +120,7 @@
                 <MaskCard @click="openBigPage(item)" v-for="(item, k) in getVipUpgradeMap"
                   :key="k + item.button + item.title" :k="k" :item="item"></MaskCard>
               </div>
-              <Empty v-show="emptyShow" :images="require('@/assets/images/empty/jy-back.png')">
+              <Empty v-show="emptyShow" images="jy-back.png">
                 <div slot="default" style="text-align:center">
                   <!-- <span>对不起,没有匹配到相关信息,</span><br /> -->
                   <!-- <span>修改时间范围或换个搜索词试试吧</span> -->
@@ -158,7 +158,7 @@ import { getEntWinnerSelect, distributorClaim, distributorUnClaimed, isClaimed }
 import { pointType } from '@/utils/mixins/calc-point-type'
 
 function getImgForVipUpgrade (name, bg = false, suffix = '.png') {
-  return require('@/assets/images/vip/' + (bg ? 'bg/mask/' : '') + name + suffix)
+  return import('@/assets/images/vip/' + (bg ? 'bg/mask/' : '') + name + suffix)
 }
 
 export default {

+ 2 - 2
apps/bigmember_pc/src/views/portrayal/EntSearchPortrayal.vue

@@ -120,7 +120,7 @@
             <div class="chart-box p-l-r-32">
               <EntChart @showEmpty="showEmpty" @loadingChart="loadingChart" :entId="eId" :params="bidInfoParams" :active="activeName"
                 v-on:entInfo="getEntInfo" v-show="!emptyShow"></EntChart>
-              <Empty v-show="emptyShow" :images="require('@/assets/images/empty/jy-back.png')">
+              <Empty v-show="emptyShow" images="jy-back.png">
                 <div slot="default" style="text-align:center">
                   <span>当前条件下暂无中标项目,无法进行中标分析</span>
                 </div>
@@ -225,7 +225,7 @@ import {
 } from '@/api/modules'
 
 function getImgForVipUpgrade (name, bg = false, suffix = '.png') {
-  return require('@/assets/images/vip/' + (bg ? 'bg/mask/' : '') + name + suffix)
+  return import('@/assets/images/vip/' + (bg ? 'bg/mask/' : '') + name + suffix)
 }
 
 export default {

+ 2 - 2
apps/bigmember_pc/src/views/portrayal/UnitPortrayal.vue

@@ -185,7 +185,7 @@
         <MaskCard @click="openBigPage(k, item)" v-for="(item, k) in getBigUpgradeMap" :key="k + item.button + item.title"
           :k="k" :item="item" :islogin="loginFlag" @click_nologin="clickNologin"></MaskCard>
       </div>
-      <Empty v-show="emptyShow" :images="require('@/assets/images/empty/jy-back.png')">
+      <Empty v-show="emptyShow" images="jy-back.png">
         <div slot="default" style="text-align:center">
           <!-- <span>对不起,没有匹配到相关信息,</span><br />
           <span>修改时间范围或换个搜索词试试吧</span> -->
@@ -278,7 +278,7 @@ import { mapGetters, mapState } from 'vuex'
 
 function getImgForBigUpgrade (name, bg = false, suffix = '.png') {
   const temp = (bg ? 'bg/' : '') + name + suffix
-  return require('@/assets/images/big/' + temp)
+  return import('@/assets/images/big/' + temp)
 }
 
 /* eslint-disable */

+ 1 - 1
apps/bigmember_pc/src/views/portrayal/components/EntForm.vue

@@ -10,7 +10,7 @@
       </li>
     </ul>
     <div class="nodata" v-else>
-      <Empty  :images="require('@/assets/images/empty/jy-back.png')">
+      <Empty images="jy-back.png">
         <div slot="default" style="text-align:center">
           <span>暂无数据</span>
         </div>

+ 1 - 1
apps/bigmember_pc/src/views/portrayal/components/EntHistoryForm.vue

@@ -29,7 +29,7 @@
     </div>
     </div>
     <div class="nodata" v-else>
-      <Empty  :images="require('@/assets/images/empty/jy-back.png')">
+      <Empty  images="jy-back.png">
         <div slot="default" style="text-align:center">
           <span>暂无数据</span>
         </div>

+ 1 - 1
apps/bigmember_pc/src/views/project/AttendBiddingList.vue

@@ -85,7 +85,7 @@
             </el-pagination>
           </div>
         </div>
-        <empty v-else :images="require('@/assets/images/empty/jy-back.png')">
+        <empty v-else images="jy-back.png">
           <div class="flex-c-c center">
             <span>暂无数据</span>
           </div>

+ 137 - 0
apps/bigmember_pc/vite.config.js

@@ -0,0 +1,137 @@
+import { resolve } from "path";
+
+import {defineConfig} from 'vite'
+import legacy from '@vitejs/plugin-legacy'
+import vue2 from '@vitejs/plugin-vue2'
+import {ViteEjsPlugin} from "vite-plugin-ejs";
+import {viteExternalsPlugin} from 'vite-plugin-externals'
+import { getProxyOfDomain } from './config/proxy'
+import { legacyQiankun } from 'vite-plugin-legacy-qiankun'
+import vitePluginRequire from "vite-plugin-require";
+
+const baseCDN = {
+  css: [
+    '//cdn-common.jianyu360.com/cdn/lib/v-charts/1.19.0/style.min.css'
+  ],
+  js: [
+    '//cdn-common.jianyu360.com/cdn/lib/echarts/4.8.0/echarts.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/v-charts/1.19.0/index.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/jquery/3.5.1/jquery.min.js',
+    '//res.wx.qq.com/open/js/jweixin-1.6.0.js'
+  ]
+}
+
+const prodCDN = {
+  js: [
+    '//cdn-common.jianyu360.com/cdn/lib/vue/2.7.14/vue.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/vue-router/3.6.5/vue-router.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/vuex/3.6.2/vuex.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/axios/0.27.2/axios.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/lodash/4.17.21/lodash.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/dayjs/1.11.8/dayjs.min.js',
+    '//cdn-common.jianyu360.com/cdn/lib/js-cookie/2.2.1/js.cookie.min.js'
+  ]
+}
+
+function getCDN () {
+  const isDev = process.env.NODE_ENV === 'development'
+  if (isDev) {
+    return baseCDN
+  } else {
+    const allCDN = Object.assign({}, baseCDN)
+    allCDN.css = allCDN.css.concat(prodCDN.css || [])
+    allCDN.js = allCDN.js.concat(prodCDN.js || [])
+    return allCDN
+  }
+}
+
+function getExternals () {
+  const isDev = process.env.NODE_ENV === 'development'
+
+  if (isDev) {
+    return {}
+  }
+
+  return {
+    vue: 'Vue',
+    'vue-router': 'VueRouter',
+    vuex: 'Vuex',
+    axios: 'axios',
+    lodash: '_',
+    // 解决画像visualMap不显示问题
+    // echarts: 'echarts',
+    // moment: 'moment',
+    jquery: '$'
+  }
+}
+
+export default defineConfig({
+  build: {
+    outDir: 'page_big_pc',
+    rollupOptions: {
+      external: [
+        '/common-module/chart-module/js/chart-common.js',
+        '/qr?url=/stl/wxSubscrbePage'
+      ]
+    }
+  },
+  optimizeDeps: {
+    exclude: [
+      '/common-module/chart-module/js/chart-common.js'
+    ]
+  },
+  plugins: [
+    vue2(),
+    ViteEjsPlugin(
+      {
+        cdn: getCDN(),
+        assets: {
+          version: Date.now()
+        }
+      }
+    ),
+    viteExternalsPlugin(getExternals()),
+    legacy({
+      targets: ['ie >= 11'],
+      additionalLegacyPolyfills: ['regenerator-runtime/runtime']
+    }),
+    legacyQiankun({
+      name: 'bigMemberSubApp',
+      devSandbox: true
+    }),
+    vitePluginRequire()
+  ],
+  resolve: {
+    alias: [
+      // {
+      //   find: /^~/,
+      //   replacement: "",
+      // },
+      {
+        find: "~@",
+        replacement: resolve(__dirname, "src"),
+      },
+      {
+        find: "@",
+        replacement: resolve(__dirname, "src"),
+      },
+    ],
+    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
+  },
+  css: {
+    preprocessorOptions: {
+      scss: {
+        additionalData: `
+          @import "@/assets/style/_mixin.scss";
+          @import "@/assets/style/_variables.scss";
+        `
+      }
+    }
+  },
+  server: {
+    port: 8080,
+    proxy: getProxyOfDomain('https://jybx-webtest.jydev.jianyu360.com')
+  }
+})
+

+ 1 - 1
apps/jy-pc/package.json

@@ -15,7 +15,7 @@
     "@jianyu/easy-inject-qiankun": "^0.1.10",
     "@tinymce/tinymce-vue": "^3.2.8",
     "core-js": "^3.6.5",
-    "element-ui": "workspace:^",
+    "element-ui": "^2.15.16-rc",
     "lodash": "^4.17.21",
     "moment": "^2.29.1",
     "qs": "^6.10.3",

+ 2 - 2
package.json

@@ -18,7 +18,7 @@
     "build:mobile": "pnpm --filter jy-mobile run build",
     "dev:work": "pnpm --filter work-bench run serve",
     "build:work": "pnpm --filter work-bench run build",
-    "dev:bigmember": "pnpm --filter bigmember run serve",
+    "dev:bigmember": "pnpm --filter bigmember run dev",
     "build:bigmember": "pnpm --filter bigmember run build",
     "dev:jy-pc": "pnpm --filter web-pc run serve",
     "build:jy-pc": "pnpm --filter web-pc run build"
@@ -39,7 +39,7 @@
     "inquirer": "^9.1.5",
     "prettier": "^3.1.0",
     "typescript": "^5.0.2",
-    "vite": "^4.3.1"
+    "vite": "^4.3.9"
   },
   "engines": {
     "node": ">=16",

ファイルの差分が大きいため隠しています
+ 120 - 538
pnpm-lock.yaml


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません