Procházet zdrojové kódy

Merge pull request #590 from John-Hong/release-3.19.0-vue3

vue2 升级到 vue3
Tron před 9 měsíci
rodič
revize
3233f98965
100 změnil soubory, kde provedl 2990 přidání a 4963 odebrání
  1. 3 5
      .prettierrc.js
  2. 1 1
      .yarnrc
  3. 0 10
      babel.config.js
  4. 389 0
      build-util.js
  5. 70 0
      index.html
  6. 32 44
      package.json
  7. 44 13
      post-build.js
  8. 19 19
      postcss.config.js
  9. 99 273
      src/App.vue
  10. 3 11
      src/api/request.js
  11. 0 90
      src/common/js/clientInit.js
  12. 0 483
      src/common/js/stomp.js
  13. 0 12
      src/components/Login/Login.vue
  14. 6 3
      src/components/checkCarPopup/checkCarPopup.vue
  15. 1 1
      src/components/info/blue-perfectinfo.vue
  16. 2 2
      src/components/info/perfectInfo.vue
  17. 41 49
      src/components/install.js
  18. 1 1
      src/components/newMemberPoints/index.vue
  19. 11 7
      src/components/plate-number/plateNumber.vue
  20. 39 58
      src/components/scroll-view/scroll-view.vue
  21. 1 1
      src/components/wx-points-auth/wx-points-auth.vue
  22. 1 2
      src/components/wx-points-commit/wx-points-commit.vue
  23. 0 17
      src/extension.js
  24. 31 17
      src/kui/components/k-button/k-button.vue
  25. 1001 0
      src/kui/components/k-card/k-card-new.vue
  26. 261 111
      src/kui/components/k-card/k-card.vue
  27. 156 0
      src/kui/theme/theme.less
  28. 77 0
      src/kui/utils/gogocodeTransfer.js
  29. 0 15
      src/lib/stompjs/index.js
  30. 0 108
      src/lib/stompjs/stomp-node.js
  31. 0 489
      src/lib/stompjs/stomp.js
  32. 18 55
      src/main.js
  33. 0 89
      src/manifest.json
  34. 0 96
      src/mixins/login.js
  35. 0 1041
      src/pages.json
  36. 1 1
      src/pages/login/login.vue
  37. 0 2
      src/pages/parkingFee/mixins/parkingFee.js
  38. 2 2
      src/pages/parkingFee/mixins/parkingFeeDetail.js
  39. 2 2
      src/pages/parkingFee/mixins/parkingFeePaperCoupon.js
  40. 1 1
      src/pages/parkingFee/mixins/vehicleManagement.js
  41. 1 2
      src/pages/parkingFeeV2/Discounts/index.js
  42. 5 5
      src/pages/parkingFeeV2/Discounts/index.less
  43. 2 2
      src/pages/parkingFeeV2/Discounts/index.vue
  44. 48 0
      src/pages/parkingFeeV2/composition/useCoreFeatures.js
  45. 4 1
      src/pages/parkingFeeV2/mixins/base.js
  46. 26 19
      src/pages/parkingFeeV2/mixins/parkingFee.js
  47. 22 33
      src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js
  48. 1 88
      src/pages/parkingFeeV2/mixins/parkingFeeDetail.js
  49. 0 25
      src/pages/parkingFeeV2/mixins/parkingFeeDetailSuccess.js
  50. 1 1
      src/pages/parkingFeeV2/mixins/parkingFeeDiscounts.js
  51. 8 18
      src/pages/parkingFeeV2/mixins/parkingFeeList.js
  52. 5 4
      src/pages/parkingFeeV2/mixins/parkingFeePaperCoupon.js
  53. 2 0
      src/pages/parkingFeeV2/mixins/parkingFeePayment.js
  54. 1 1
      src/pages/parkingFeeV2/mixins/parkingFeeSuccess.js
  55. 3 1
      src/pages/parkingFeeV2/mixins/parkingFindCar.js
  56. 4 9
      src/pages/parkingFeeV2/mixins/parkingFindCarFirst.js
  57. 17 9
      src/pages/parkingFeeV2/mixins/parkingReceipt/parkingApplication.js
  58. 0 1
      src/pages/parkingFeeV2/mixins/parkingReceipt/parkingInvoice.js
  59. 5 2
      src/pages/parkingFeeV2/mixins/parkingReceipt/parkingInvoiceImage.js
  60. 28 54
      src/pages/parkingFeeV2/mixins/parkingReceipt/parkingOrderDetail.js
  61. 22 23
      src/pages/parkingFeeV2/mixins/parkingReceipt/parkingReceipt.js
  62. 2 0
      src/pages/parkingFeeV2/mixins/vehicleAddOrEdit.js
  63. 14 199
      src/pages/parkingFeeV2/mixins/vehicleManagement.js
  64. 20 20
      src/pages/parkingFeeV2/parkingFee.vue
  65. 10 9
      src/pages/parkingFeeV2/parkingFeeCoupon.vue
  66. 10 10
      src/pages/parkingFeeV2/parkingFeeDetail.vue
  67. 14 14
      src/pages/parkingFeeV2/parkingFeeDetailSuccess.vue
  68. 7 7
      src/pages/parkingFeeV2/parkingFeeDiscounts.vue
  69. 32 24
      src/pages/parkingFeeV2/parkingFeeList.vue
  70. 27 11
      src/pages/parkingFeeV2/parkingFeeMsg.vue
  71. 3 7
      src/pages/parkingFeeV2/parkingFeePaperCoupon.vue
  72. 1 2
      src/pages/parkingFeeV2/parkingFeePayment.vue
  73. 1 1
      src/pages/parkingFeeV2/parkingFeeSuccess.vue
  74. 1 2
      src/pages/parkingFeeV2/parkingFindCar.vue
  75. 1 1
      src/pages/parkingFeeV2/parkingFindCarFirst.vue
  76. 1 1
      src/pages/parkingFeeV2/parkingReceipt/parkingInvoiceImage.vue
  77. 1 1
      src/pages/parkingFeeV2/parkingReceipt/parkingInvoiceImages.vue
  78. 7 25
      src/pages/parkingFeeV2/parkingReceipt/parkingOrderDetail.vue
  79. 10 21
      src/pages/parkingFeeV2/parkingReceipt/parkingReceipt.vue
  80. 24 13
      src/pages/parkingFeeV2/qrCodeLicensedCar.vue
  81. 1 1
      src/pages/parkingFeeV2/vehicleAddOrEdit.vue
  82. 10 44
      src/pages/parkingFeeV2/vehicleManagement.vue
  83. 72 0
      src/plugins/AppInit.js
  84. 0 58
      src/project.config.json
  85. 0 7
      src/project.private.config.json
  86. 13 270
      src/routes/index.js
  87. 1 1
      src/routes/indexV2.js
  88. 0 2
      src/store/cachedViews.js
  89. 43 43
      src/store/index.js
  90. 1 1
      src/store/order/paperCoupon.js
  91. 2 2
      src/store/order/points.js
  92. 1 1
      src/store/order/utils.js
  93. 21 11
      src/styles/common.less
  94. 1 1
      src/utils/common.js
  95. 53 1
      src/utils/common/function.js
  96. 0 37
      src/utils/common/websocket.js
  97. 59 33
      src/utils/filters.js
  98. 7 31
      src/utils/index.js
  99. 0 621
      src/utils/location.js
  100. 1 1
      src/utils/log.js

+ 3 - 5
prettier.config.js → .prettierrc.js

@@ -1,9 +1,8 @@
-'use strict';
-
-module.exports = {
+export default {
   singleQuote: true,
   printWidth: 280,
-  //   tabWidth: 2,
+  arrowParens: 'always',
+  tabWidth: 2,
 };
 
 // module.exports = {
@@ -96,4 +95,3 @@ module.exports = {
 // //     }
 // //   ]
 // // }
-

+ 1 - 1
.yarnrc

@@ -1 +1 @@
-registry "https://nexus-internal.kerryonvip.com/repository/kerry-npm-group/"
+registry "https://nexus-internal.kerryonvip.com/repository/kerry-npm-group/"

+ 0 - 10
babel.config.js

@@ -1,10 +0,0 @@
-module.exports = {
-    "plugins": [
-        "@babel/plugin-proposal-optional-chaining",
-        ['import', {
-            libraryName: 'vant',
-            libraryDirectory: 'es',
-            style: true
-          }, 'vant']
-    ]
-}

+ 389 - 0
build-util.js

@@ -0,0 +1,389 @@
+/* eslint-disable no-useless-escape */
+const os = require('os');
+const path = require('path');
+const crypto = require('crypto');
+const fs = require('fs-extra');
+
+const UNI_PLATFORM = process.env.UNI_PLATFORM || 'h5';
+const NODE_ENV = process.env.NODE_ENV || 'production';
+/**
+ * 完整版本号,例如:3.9.0-16751-d1195b1d-20240605.0345
+ * 通过环境变量传入
+ * */
+const VUE_APP_LONG_VERSION_NAME = process.env.VUE_APP_LONG_VERSION_NAME || '';
+
+/**
+ * 环境,编译生产包时值为 prod
+ * 通过环境变量传入
+ * */
+const VUE_APP_STAGE = process.env.VUE_APP_STAGE || '';
+const __PROD__ = NODE_ENV === 'production';
+const CDN_URL = process.env.CDN_URL;
+
+/**
+ * yarn dev:mp-weixin 时,需要在本地启动 http server 来承载写在 css 中的静态资源,此变量为 http server 的端口。
+ *
+ * 通过环境变量传入,不传时默认值为 5002
+ *
+ * 如果提示端口被占用(很大可能是之前的dev server异常退出了)
+ * 可以用 lsof -i:5000 查看是哪个进程占用,
+ * 然后用 kill -9 [pid] 杀掉该进程
+ */
+const IMAGES_SERVER_PORT = process.env.IMAGES_SERVER_PORT || '5002';
+
+/** yarn dev:mp-weixin 时用到的本地 http server 地址 */
+const localPath = `http://${getLocalIP()}:${IMAGES_SERVER_PORT}/`;
+
+/**
+ * CDN 地址,build 时用到。
+ * 如无需使用CDN(比如H5平台有时会不适用CDN),则打包时使用类似 CDN_URL= yarn build:h5 的命令
+ * */
+const publicPath =
+  CDN_URL !== undefined
+    ? CDN_URL
+    : VUE_APP_STAGE === 'prod'
+    ? 'https://static.kerryprops.com.cn/kip/temporary-parking-frontend/'
+    : 'https://static-le.kerryprops.com.cn/kip/temporary-parking-frontend/';
+
+const isWin = /^win/.test(process.platform);
+const normalizePath = (pathIn) => (isWin ? pathIn.replace(/\\/g, '/') : pathIn);
+
+/** 临时文件夹,编译生产包时,静态资源会被拷贝到该文件夹中,Jenkins 会将该文件中的文件上传到 CDN */
+const CDN_UPLOAD_FOLDER = 'temp';
+
+const REGEX_IMG = /\.(gif|jpe?g|png|svg)$/;
+const REGEX_FONT = /\.(woff2?|eot|ttf|otf)$/;
+const DIR_ASSET = 'static';
+const DIR_IMG = 'img';
+const DIR_FONTS = 'fonts';
+
+/** 获取本级 IP */
+function getLocalIP() {
+  const ifaces = Object.values(os.networkInterfaces());
+  for (const iface of ifaces) {
+    for (const alias of iface) {
+      if (alias.internal || alias.family !== 'IPv4') continue;
+      return alias.address;
+    }
+  }
+}
+
+/**
+ * 计算文件的 hash 值,返回包含 hash 值的文件路径
+ * 注意:只能处理这几类文件:png|jpe?g|gif|svg|ttf
+ * @param {string} resourcePath 文件在磁盘上的物理路径
+ * @param {string} outputPath 待替换的输出路径,比如 static/img/abc.png
+ * @returns 替换过的输出路径,比如 static/img/abc.65d956cc.png
+ */
+function getFilePathWithHash(resourcePath, outputPath) {
+  const buffer = fs.readFileSync(resourcePath);
+  const hash = crypto
+    .createHash('md5')
+    .update(buffer)
+    .digest('hex')
+    .slice(0, 8);
+  return outputPath.replace(/\.(png|jpe?g|gif|svg|ttf)$/, `.${hash}.$1`);
+}
+
+function formatImageUrl(url, filePath) {
+  if (UNI_PLATFORM === 'app') {
+    return url;
+  }
+  // console.log(filePath);
+
+  const origin = __PROD__ ? publicPath : localPath;
+  const absolutePath = url.startsWith('/')
+    ? path.resolve('src', url.slice(1))
+    : path.resolve(path.dirname(filePath), url);
+  const href = origin + path.relative('src', absolutePath).replace(/\\/g, '/');
+  // console.log(absolutePath);
+  return __PROD__ ? getFilePathWithHash(absolutePath, href) : href;
+}
+
+/**
+ * 返回当前git repo的header的commit id
+ * @returns commit id,例如 fe40cff4c4a9b55eaf215ac79a0c37c079b067cd
+ * @see https://stackoverflow.com/a/56975550/196519
+ */
+function gitHash() {
+  try {
+    const rev = fs
+      .readFileSync('.git/HEAD')
+      .toString()
+      .trim()
+      .split(/.*[: ]/)
+      .slice(-1)[0];
+    if (rev.indexOf('/') === -1) {
+      return rev;
+    } else {
+      return fs
+        .readFileSync('.git/' + rev)
+        .toString()
+        .trim();
+    }
+  } catch (e) {
+    // eslint-disable-next-line no-console
+    console.log(e);
+    return 'git_hash_error';
+  }
+}
+
+/**
+ * 根据配置替换文件内容
+ * @param {{path: string, replace:[{reg: RegExp, replacement: string}]}} config
+ */
+const fileContentReplace = function (config) {
+  let content = fs.readFileSync(config.path).toString();
+  config.replace.forEach((n) => {
+    content = content.replace(n.reg, n.replacement);
+  });
+  // fs.writeFileSync(gradlePath + '2', gradle);
+  fs.writeFileSync(config.path, content);
+};
+
+/**
+ * 1. 在 ios app 的 AppInfo.xcconfig 中写入 versionName 和 versionCode
+ * 2. 在 android app 的 build.gradle 中写入 versionName、versionCode 和 fileName
+ */
+const updateVersionCode = function () {
+  if (!VUE_APP_LONG_VERSION_NAME) {
+    // eslint-disable-next-line no-console
+    console.log('NO VUE_APP_LONG_VERSION_NAME, skip updateVersionCode()');
+    return;
+  }
+
+  const arr = VUE_APP_LONG_VERSION_NAME.split('-');
+  const versionName = arr[0];
+  const versionCode = arr[1];
+  if (!versionName || !versionCode) {
+    // eslint-disable-next-line no-console
+    console.log('missing versionName or versionCode, skip updateVersionCode()');
+    return;
+  }
+
+  const env = VUE_APP_STAGE == 'prod' ? 'PROD' : 'DEV';
+  const fileName = `KIPUI-${env}-${VUE_APP_LONG_VERSION_NAME}`;
+
+  let config = {
+    path: 'android/KIP-UI/simpleDemo/build.gradle',
+    replace: [
+      // { reg: /applicationId\s"(.*)"/, replacement: 'applicationId "' + buildConfigs[option.configuration].appId + '"' },
+      {
+        reg: /versionCode\s([\d\.]{1,})/,
+        replacement: 'versionCode ' + versionCode,
+      },
+      {
+        reg: /versionName\s"([\d\.]{1,})"/,
+        replacement: 'versionName "' + versionName + '"',
+      },
+      {
+        reg: /outputFileName\s=\s"(.*)"/,
+        replacement: 'outputFileName = "' + fileName + '.apk"',
+      },
+    ],
+  };
+
+  fileContentReplace(config);
+  // eslint-disable-next-line no-console
+  console.log('updateVersionCode(): build.gradle DONE !');
+
+  config = {
+    path: 'ios/HBuilder-Hello/AppInfo.xcconfig',
+    replace: [
+      // { reg: /PRODUCT_NAME\s=\s(.*)/, replacement: 'PRODUCT_NAME = ' + buildConfigs[option.configuration].appName },
+      // { reg: /PRODUCT_BUNDLE_IDENTIFIER\s=\s(.*)/, replacement: 'PRODUCT_BUNDLE_IDENTIFIER = ' + buildConfigs[option.configuration].appId },
+      {
+        reg: /MARKETING_VERSION\s=\s([\d\.]{1,})/,
+        replacement: 'MARKETING_VERSION = ' + versionName,
+      },
+      {
+        reg: /CURRENT_PROJECT_VERSION\s=\s([\d\.]{1,})/,
+        replacement: 'CURRENT_PROJECT_VERSION = ' + versionCode,
+      },
+    ],
+  };
+
+  fileContentReplace(config);
+  // eslint-disable-next-line no-console
+  console.log('updateVersionCode(): AppInfo.xcconfig DONE !');
+};
+
+/**
+ * 开发时,将【images文件夹下的图片】和【字体文件】的 url 转换为本地 http server 的地址
+ *
+ * build 时,将图片和字体的 url 转换为 CDN 地址,同时把文件 copy 到 temp 文件夹
+ * @param {string} url url
+ * @param {string} resourcePath 绝对路径
+ * @returns 转换后的 url
+ */
+const filePathHandler = (url, resourcePath) => {
+  // 01. 处理 images 文件夹下的图片,包括 src/images/ 文件夹和 node_modules/@kip/ui-mobile 各组件中的 images 文件夹
+  if (/images\//.test(resourcePath)) {
+    if (!__PROD__) {
+      // 开发时,用本地的 http server 来 host 静态资源
+      // http://localhost:5000/src/images/abc/efg/hij.png
+      return localPath + normalizePath(path.relative(__dirname, resourcePath));
+    } else {
+      // build 时,返回 CDN 地址,同时把文件 copy 到 temp 文件夹,
+      // jenkins 会上传这些图片
+      const tempPath = '/static/img/' + path.basename(resourcePath);
+      const tempPathHashed = getFilePathWithHash(resourcePath, tempPath);
+      fs.copy(resourcePath, './' + CDN_UPLOAD_FOLDER + tempPathHashed);
+
+      // https://cdn.abc.com/static/img/hij.3677dgae.png
+      return publicPath + tempPathHashed;
+    }
+
+    // 02. 处理字体文件
+  } else if (/\.(woff2?|eot|ttf|otf)(\?.*)?$/i.test(resourcePath)) {
+    if (!__PROD__) {
+      // 开发时,用本地的 http server 来 host 静态资源
+      // http://localhost:5000/node_modules/@kip/ui-mobile/components/k-icon/kuiicons.ttf
+      return localPath + normalizePath(path.relative(__dirname, resourcePath));
+    } else {
+      // build 时,返回 CDN 地址,同时把文件 copy 到 temp 文件夹,
+      // jenkins 会上传这些字体
+      const tempPath = '/static/fonts/' + path.basename(resourcePath);
+      const tempPathHashed = getFilePathWithHash(resourcePath, tempPath);
+      fs.copy(resourcePath, './' + CDN_UPLOAD_FOLDER + tempPathHashed);
+
+      // https://cdn.abc.com/static/fonts/kuiicons.65d956cc.ttf
+      return publicPath + tempPathHashed;
+    }
+  }
+
+  // 03. 其他情况返回相对路径
+  return (
+    '/' + normalizePath(path.relative(process.env.UNI_INPUT_DIR, resourcePath))
+  );
+};
+
+/**
+ * 开发时,将 css 中的 url 转换为本地 http server 的地址
+ *
+ * build 时,返回 CDN 地址,同时把文件 copy 到 temp 文件夹
+ * @param {string} resourcePath 绝对路径
+ * @param {string} url css 中的原始 url
+ * @returns 转换后的 url
+ */
+const postcssUrlHandler = (resourcePath, url) => {
+  // postcss-url 穿过来的 url 是 '@/images/home/css.png' 时,
+  // resourcePath 会是 '/Users/joel.bh.zhang/Documents/Repo-template/uniapp-vue3-vite-clean/src/pages/index/@/images/home/css.png'
+  // 需要处理一下
+  if (url.startsWith('@')) {
+    resourcePath = path.join(__dirname, './src/' + url.substring(1));
+    console.log('after replace @ with ./src/ ==>', resourcePath);
+  }
+
+  // postcss-url 穿过来的 url: '/static/logo.png', 时,
+  // resourcePath 会是 '/Users/joel.bh.zhang/Documents/Repo/ui-mobile/src/pages/index/static/logo.png',
+  // 需要处理一下
+  if (url.startsWith('/')) {
+    resourcePath = path.join(__dirname, './src' + url);
+    console.log('after replace start / with ./src/ ==>', resourcePath);
+  }
+
+  // 01. 处理 images 文件夹下的图片,包括 src/images/ 文件夹和 node_modules/@kip/ui-mobile 各组件中的 images 文件夹
+  if (/\.(gif|jpe?g|png|svg)(\?.*)?$/.test(resourcePath)) {
+    if (!__PROD__) {
+      // 开发时,用本地的 http server 来 host 静态资源
+      // http://localhost:5000/src/images/abc/efg/hij.png
+      return localPath + normalizePath(path.relative(__dirname, resourcePath));
+    } else {
+      // build 时,返回 CDN 地址,同时把文件 copy 到 temp 文件夹,
+      // jenkins 会上传这些图片
+      const tempPath = '/static/img/' + path.basename(resourcePath);
+      const tempPathHashed = getFilePathWithHash(resourcePath, tempPath);
+      fs.copy(resourcePath, './' + CDN_UPLOAD_FOLDER + tempPathHashed);
+
+      // https://cdn.abc.com/static/img/hij.3677dgae.png
+      return publicPath + tempPathHashed;
+    }
+
+    // 02. 处理字体文件
+  } else if (/\.(woff2?|eot|ttf|otf)(\?.*)?$/i.test(resourcePath)) {
+    if (!__PROD__) {
+      // 开发时,用本地的 http server 来 host 静态资源
+      // http://localhost:5000/node_modules/@kip/ui-mobile/components/k-icon/kuiicons.ttf
+      return localPath + normalizePath(path.relative(__dirname, resourcePath));
+    } else {
+      // build 时,返回 CDN 地址,同时把文件 copy 到 temp 文件夹,
+      // jenkins 会上传这些字体
+      const tempPath = '/static/fonts/' + path.basename(resourcePath);
+      const tempPathHashed = getFilePathWithHash(resourcePath, tempPath);
+      fs.copy(resourcePath, './' + CDN_UPLOAD_FOLDER + tempPathHashed);
+
+      // https://cdn.abc.com/static/fonts/kuiicons.65d956cc.ttf
+      return publicPath + tempPathHashed;
+    }
+  }
+
+  // 03. 其他情况返回相对路径
+  return (
+    '/' + normalizePath(path.relative(process.env.UNI_INPUT_DIR, resourcePath))
+  );
+};
+
+/**
+ * 处理 vite 在编译的时候出现  use-window-z-index.mjs 被
+ *        Could not resolve "../composables/use-window-z-index.mjs" from "node_modules/vant/es/config-provider/ConfigProvider.mjs"
+ *        file: /Users/sysadmin/code/kerry_project/temporary-parking-frontend/node_modules/vant/es/config-provider/ConfigProvider.mjs
+ *    这个问题主要是在 vite.config.js 中配置了 define: {global: 'window'} 导致的
+ * @param {string} params.scanDir 相对路径: node_modules/vant
+ * @returns 
+ */
+function handleGlobalFiles({
+  scanDir
+}) {
+  return {
+    name: 'handle-global-files',
+    buildStart() {
+      if(scanDir) {
+        const rootDir = `${scanDir}`; // 指定你的源代码根目录
+        // 递归函数,遍历所有子目录
+        function traverseDirectory(dir) {
+          const files = fs.readdirSync(dir);
+          files.forEach(file => {
+            const fullPath = path.join(dir, file);
+            const stat = fs.statSync(fullPath);
+
+            if (stat.isDirectory()) {
+              // 如果是目录,递归处理
+              traverseDirectory(fullPath);
+            } else if (file.includes('global') && !fs.existsSync(file)) {
+              // 如果文件名包含 'global' 并且还没有被创建的话
+              const content = fs.readFileSync(fullPath, 'utf-8');
+              const newContent = content.replace(/global/g, 'window');
+              const newFileName = file.replace('global', 'window');
+              const newFilePath = path.join(dir, newFileName);
+              // 拷贝一份新的文件
+              fs.writeFileSync(newFilePath, newContent, 'utf-8');
+            }
+          });
+        }
+        // 开始遍历根目录
+        traverseDirectory(rootDir);
+      }
+    }
+  };
+}
+
+module.exports = {
+  IMAGES_SERVER_PORT,
+  getLocalIP,
+  getFilePathWithHash,
+  formatImageUrl,
+  gitHash,
+  updateVersionCode,
+  localPath,
+  publicPath,
+  filePathHandler,
+  postcssUrlHandler,
+  REGEX_IMG,
+  REGEX_FONT,
+  DIR_ASSET,
+  DIR_IMG,
+  DIR_FONTS,
+  CDN_UPLOAD_FOLDER,
+  handleGlobalFiles,
+};

+ 70 - 0
index.html

@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>临时停车</title>
+    <script>
+      // CONFIGURATIONS_PLACEHOLDER
+  
+      if (/dev-/.test(window?.injectConfig?.api) || window.location.href.indexOf(8080) > -1) {
+        window.injectConfig = {
+          ...window.injectConfig,
+          api: 'https://qa-crm-kpl.kerryprops.com.cn',
+          TRACKING_API_URL:
+            'https://qa-tracking-cip.kerryplus.com/sa?project=kerry_tracking',
+          profileApi: 'https://qa-apim.kerryplus.com/c/api',
+          qaPayment: 'https://qa-payment.kerryonvip.com',
+        };
+      }
+      window.isAlipayClient = false
+      // const userAgent = window.navigator.userAgent.toLowerCase()
+      // if(!/miniprogram/g.test(userAgent)) {
+      //   document.getElementsByTagName('title')[0].innerText= '临时停车'
+      // }
+    </script>
+     <script>
+      try {
+        // 或者使用配置参数来初始化,详情见文档
+        // 开发环境和qa环境 打开debug
+        // const debug = /dev-t?-?|qa-t?-?|sl-t?-?|2486/.test(window.location.origin);
+        let debug = false;
+        const keys = ['https://dev-','https://qa-','https://lt-','https://sl-','http://127.0.0.1', 'http://localhost:8080'];
+        keys.forEach(key => {
+          if(!debug && window.location.origin.indexOf(key) > -1) {
+            debug = true
+          }
+        })
+        if (debug) {
+          const script = document.createElement('script');
+          script.src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';
+          document.head.appendChild(script);
+          script.addEventListener('load', () => {
+            setTimeout(() => {
+              window.vConsole = new window.VConsole();
+            }, 200);
+          });
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) ) {
+        // https://developers.weixin.qq.com/community/develop/doc/000ae2cb950808f90d8bc415551800
+        window.H5_LAUNCH_URL = location.href;
+      }
+    </script>
+    <!--引入https://appx/web-view.min.js, 如该 H5 页面需要同时在非支付宝客户端内使用,为避免该请求404,可参考以下写法 -->
+    <script>
+      if (navigator.userAgent.indexOf('AlipayClient') > -1) {
+        document.writeln('<script src="https://appx/web-view.min.js"' + '>' + '<' + '/' + 'script>');
+        window.isAlipayClient = true
+      } else {
+        document.writeln('<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"' + '>' + '<' + '/' + 'script>');
+      }
+    </script>
+  </head>
+  <body>
+    <div id="app"></div>
+    <script type="module" src="./src/main.js"></script>
+  </body>
+</html>

+ 32 - 44
package.json

@@ -4,55 +4,43 @@
   "private": true,
   "scripts": {
     "serve": "cross-env NODE_ENV=dev vue-cli-service serve",
-    "build": "vue-cli-service build && node post-build.js",
-    "build2": "vue-cli-service build",
-    "test:h5": "cross-env UNI_PLATFORM=h5 jest -i"
+    "dev": "vite",
+    "preview": "vite preview",
+    "build": "vite build && node post-build.js",
+    "local:build": "vite build",
+    "format": "prettier --write"
   },
   "dependencies": {
-    "@better-scroll/core": "^2.4.2",
-    "@better-scroll/observe-dom": "^2.4.2",
-    "@better-scroll/pull-up": "^2.4.2",
-    "axios": "^0.27.2",
-    "crypto-js": "^4.1.1",
-    "js-md5": "^0.7.3",
-    "lodash": "^4.17.21",
-    "moment": "^2.29.4",
-    "sa-sdk-javascript": "^1.24.13",
-    "uuid": "^9.0.0",
-    "vant": "^2.12.50",
-    "vconsole": "^3.15.0",
-    "vue": "^2.7.14",
-    "vue-router": "^3.6.5",
-    "vuex": "^3.6.2"
+    "@better-scroll/core": "^2.5.1",
+    "@better-scroll/observe-dom": "^2.5.1",
+    "@better-scroll/pull-up": "^2.5.1",
+    "axios": "^1.7.2",
+    "crypto-js": "^4.2.0",
+    "dayjs": "^1.11.12",
+    "js-md5": "^0.8.3",
+    "qs": "^6.12.2",
+    "sockjs-client": "^1.6.1",
+    "uuid": "^10.0.0",
+    "vant": "^3.6.12",
+    "vue": "^3.4.34",
+    "vue-router": "^4.4.0",
+    "vuex": "^4.1.0"
   },
   "devDependencies": {
-    "@babel/core": "^7.18.13",
-    "@babel/plugin-proposal-optional-chaining": "^7.18.9",
-    "@babel/runtime": "~7.17.9",
-    "@vue/cli-plugin-babel": "~4.5.15",
-    "@vue/cli-service": "~4.5.15",
+    "@rollup/plugin-commonjs": "^26.0.1",
+    "@vitejs/plugin-vue": "^4.6.2",
     "autoprefixer": "^9.8.8",
-    "babel-plugin-import": "^1.13.5",
-    "cross-env": "^7.0.2",
-    "http-proxy-middleware": "^2.0.6",
-    "jest": "^25.4.0",
-    "less": "^4.1.3",
-    "less-loader": "^7.3.0",
-    "mini-types": "*",
-    "miniprogram-api-typings": "*",
-    "postcss": "^8.4.18",
-    "postcss-comment": "^2.0.0",
-    "postcss-import": "^15.0.0",
-    "postcss-loader": "^4.3.0",
-    "postcss-nested": "^5.0.6",
-    "postcss-px-to-viewport": "^1.1.1",
-    "postcss-style-px-to-viewport": "^2.9.1",
-    "prettier": "^2.8.3",
-    "sass": "^1.56.2",
-    "sass-loader": "^10.4.1",
-    "terser-webpack-plugin": "^4",
-    "vue-template-compiler": "^2.7.14",
-    "webpack": "^4.36.0"
+    "cross-env": "^7.0.3",
+    "fs-extra": "^7.0.1",
+    "less": "^4.2.0",
+    "postcss": "^8.4.47",
+    "postcss-px-to-viewport-8-plugin": "^1.2.5",
+    "prettier": "^3.3.3",
+    "rollup-plugin-visualizer": "^5.12.0",
+    "sass": "^1.77.8",
+    "vite": "^4.5.3",
+    "vite-plugin-compression": "^0.5.1",
+    "vite-plugin-style-vw-loader": "^1.0.7"
   },
   "browserslist": [
     "Android >= 4.4",

+ 44 - 13
post-build.js

@@ -1,19 +1,41 @@
 // post-build.js
 'use strict';
 const fs = require('fs');
+// import fs from 'node:fs'
+
+const CDN_URL = process.env.CDN_URL || '';
+
+/**
+ * CDN 地址,build 时用到。
+ * 如无需使用CDN(比如H5平台有时会不适用CDN),则打包时使用类似 CDN_URL= yarn build:h5 的命令
+ * */
+const publicPath =
+  CDN_URL !== undefined
+    ? CDN_URL
+    : VUE_APP_STAGE === 'prod'
+    ? 'https://static.kerryprops.com.cn/kip/temporary-parking-frontend'
+    : 'https://static-le.kerryprops.com.cn/kip/temporary-parking-frontend';
 
 /**
- * 获取当前所在的 git commit 的 commit id
- * @returns {string} 执行成功时返回 commit id;否则返回 git_hash_error
- * https://stackoverflow.com/a/56975550/196519
+ * 返回当前git repo的header的commit id
+ * @returns commit id,例如 fe40cff4c4a9b55eaf215ac79a0c37c079b067cd
+ * @see https://stackoverflow.com/a/56975550/196519
  */
-const git_hash = () => {
+function gitHash() {
   try {
-    const rev = fs.readFileSync('.git/HEAD').toString().trim().split(/.*[: ]/).slice(-1)[0];
+    const rev = fs
+      .readFileSync('.git/HEAD')
+      .toString()
+      .trim()
+      .split(/.*[: ]/)
+      .slice(-1)[0];
     if (rev.indexOf('/') === -1) {
       return rev;
     } else {
-      return fs.readFileSync('.git/' + rev).toString().trim();
+      return fs
+        .readFileSync('.git/' + rev)
+        .toString()
+        .trim();
     }
   } catch (e) {
     // eslint-disable-next-line no-console
@@ -23,25 +45,34 @@ const git_hash = () => {
 }
 
 /**
- * 插入 build info 到 index.html 中
+ * 更新 build:h5 生成的 html
+ * 1. 写入 build 信息
+ * 2. 更新 uni.css 的地址为 CDN 地址
  */
 const updateIndexHtml = () => {
   const htmlPath = 'dist/index.html';
   let html = fs.readFileSync(htmlPath).toString();
+
+  // 写入 build 信息
   html += '\r\n<!-- ';
   html = html + '\r\n build time:' + new Date().toUTCString() + '; ';
-  // process.env.BUILD_NUMBER 是 Jenkins 执行 job 时传入的 env
   html = html + '\r\n BUILD_NUMBER:' + process.env.BUILD_NUMBER + '; ';
-  html = html + '\r\n GIT_COMMIT:' + git_hash() + '; ';
+  html = html + '\r\n GIT_COMMIT:' + gitHash() + '; ';
   html += '\r\n -->';
 
+  // uni-app 会把 uni.css 注入到 index.html 中,但是是放在 /static/ 下面,需要替换为 CDN 地址
+  html = html.replace(/"(\/static\/uni\..+\.css)"/gm, `"${publicPath}$1"`);
+
   fs.writeFileSync(htmlPath, html);
-  // eslint-disable-next-line no-console
-  console.log(`Insert timestamp and env into index.html. -- DONE`);
-}
+  console.log(`insert timestamp and env into index.html.`);
+};
 
 const postBuild = () => {
   updateIndexHtml();
 }
 
-postBuild();
+try {
+  postBuild();
+} catch (err) {
+  console.log(77, err);
+}

+ 19 - 19
postcss.config.js

@@ -1,24 +1,24 @@
-module.exports = {
+module.exports =  {
     plugins: {
         'autoprefixer': {},
-        "postcss-px-to-viewport": {
-            viewportWidth: 750,     // (Number) The width of the viewport. 750, 375
-            // viewportHeight: 1334,    // (Number) The height of the viewport.
-            viewportHeight: 1624,    // (Number) The height of the viewport.
-            unitPrecision: 3,       // (Number) The decimal numbers to allow the REM units to grow to.
-            viewportUnit: 'vw',     // (String) Expected units.
-            selectorBlackList: ['.ignore', '.hairlines'],  // (Array) The selectors to ignore and leave as px.
-            minPixelValue: 1,       // (Number) Set the minimum pixel value to replace.
-            mediaQuery: false,       // (Boolean) Allow px to be converted in media queries.
-            exclude: [
-                /node_modules/,
-                // /src\/kui\/components\/k-tab/, 
-                /src\/kui\/components\/k-illustration/,
-                /src\/components\/wx-points-commit/,
-            ], // 设置忽略文件,用正则做目录名匹配
-            // exclude: [/node_modules/, /src\/kui/], // 设置忽略文件,用正则做目录名匹配
-            landscape: false, // 是否处理横屏情况
-            propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
+        'postcss-px-to-viewport-8-plugin': {
+          viewportWidth: 750,     // (Number) The width of the viewport. 750, 375
+          // viewportHeight: 1334,    // (Number) The height of the viewport.
+          viewportHeight: 1624,    // (Number) The height of the viewport.
+          unitPrecision: 3,       // (Number) The decimal numbers to allow the REM units to grow to.
+          viewportUnit: 'vw',     // (String) Expected units.
+          selectorBlackList: ['.ignore', '.hairlines'],  // (Array) The selectors to ignore and leave as px.
+          minPixelValue: 1,       // (Number) Set the minimum pixel value to replace.
+          mediaQuery: false,       // (Boolean) Allow px to be converted in media queries.
+          exclude: [
+            /node_modules/,
+            // /src\/kui\/components\/k-tab/, 
+            /src\/kui\/components\/k-illustration/,
+            /src\/components\/wx-points-commit/,
+          ], // 设置忽略文件,用正则做目录名匹配
+          // exclude: [/node_modules/, /src\/kui/], // 设置忽略文件,用正则做目录名匹配
+          landscape: false, // 是否处理横屏情况
+          propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
         },
     }
 

+ 99 - 273
src/App.vue

@@ -1,10 +1,14 @@
 <template>
   <div>
-    <!-- <div @click="scanQRCode">scanQRCode</div> -->
-    <keep-alive v-if="isInit" :include="cachedViews" :max="15">
-      <router-view :key="key" />
-    </keep-alive>
-    <div v-else>
+    <router-view v-if="isInit" v-slot="{ Component, route }">
+      <keep-alive :include="cachedViews">
+        <component
+          :is="Component"
+          :key="route.path"
+        />
+      </keep-alive>
+    </router-view>
+    <div v-if="!isInit">
       <br />
       <br />
       <van-skeleton title :row="3" />
@@ -23,282 +27,104 @@
     <wx-points-commit ref="wxPointsCommit"></wx-points-commit>
   </div>
 </template>
-<script>
-import loginMinix from '@/mixins/login';
-import { 
-  getIsMin, getIsWxh5, getUrlParams, initEnv, requestInit, 
-  wssInit, theCommunicationBetweenWechatAndH5IsNormal, 
-  isReloadBefore, getsTheCurrentTopic, alipayClientInit,
-  localStorageInit, setToken, windowSendInit, getQuery
-} from '@/utils/index.js';
+<script setup>
+import { onBeforeMount, ref, watch, computed } from 'vue';
+import { useStore } from 'vuex';
+import { useRoute, useRouter } from 'vue-router';
+
+// import loginMinix from '@/mixins/login';
+import { getIsMin, getIsWxh5, getUrlParams, initEnv, requestInit, alipayClientInit, localStorageInit, setToken, windowSendInit, getQuery } from '@/utils/index.js';
 import uni from '@/utils/uniHooks';
 import { getAppIdByGroupIdAndMallId } from '@/utils/index.js';
-import sensorsFn from '@/plugins/sensors';
-import {getTokenById} from '@/utils/api-kip'
-import { initWxJsSdkConfig } from '@/utils/login';
+import { getTokenById } from '@/utils/api-kip';
 
-export default {
-  mixins: [loginMinix],
-  async created() {
-    
-    await initEnv();
-    await requestInit();
-    await this.init();
-    // await sensorsFn(); // 埋点初始化
-    // 初始化环境变量
-  },
-  computed: {
-    cachedViews() {
-      return this.$store.state.cachedViews.cachedViews;
-    },
-    passLogin() {
-      return this.$store.state.passLogin;
-    },
-    key() {
-      return this.$route.path;
-    },
-    isInit() {
-      return this.$store.state.isInit;
-    },
-  },
-  watch: {
-    cachedViews() {
-      console.log('cachedViews(打印已经缓存的页面)', this.cachedViews);
-    },
-    $route: {
-      immediate: true,
-      handler(route) {
-        const {
-          name,
-          meta: { keepAlive },
-        } = route;
-        if (name && keepAlive) {
-          this.$store.commit('cachedViews/ADD_CACHED_VIEW', route);
-        }
-      },
-    },
-  },
-  methods: {
-    scanQRCode() {
-      try {
-        // 验证 jsdk
-        this.$wx.scanQRCode({
-          desc: 'scanQRCode desc',
-          needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-          // scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
-          success: ( res ) => {
-            console.log(237,res);
-            // runScanFn(res);∑
-            // this.formMsg.deviceCode = res.resultStr;
-          },
-          error: ( res ) => {
-            console.log(242,res);
-          },
-        });
-      } catch (err) {
-        console.log(99, err);
-      }
-      
-    },
-    async init() {
-      window.isWxV2 = false
-      windowSendInit()
-      // this.$store.commit('SET_IS_INIT', true);
-      // return
-      // 微信重构改造 第二版本
-      if(window.location.href.indexOf('tparking/wxV2') > -1) {
-        localStorageInit();
-        window.isWxV2 = true
-        
-        uni.showLoading({
-          title: '加载中',
-        });
-        console.log(window.location.search);
-        
-        const options = getQuery(window.location.href)
-        // 获取 token
-        let accessToken = ''
-        if(options.sessionId) {
-          accessToken = await getTokenById({
-            tokenId: options.sessionId
-          })
-        }
-        this.$store.dispatch('baseInitV2', {
-          options: {
-            ...options,
-            accessToken: accessToken
-          },
-          callback: () => {
-            console.log(108, this.$route);
-            this.$store.commit('SET_IS_INIT', true);
-            // 缓存
-            // this.$store.commit('cachedViews/ADD_CACHED_VIEW', {
-            //   name: 'wxV2'
-            // });
-            // 无感积分逻辑
-            // this.wxEasyPointsCommitStatusInit();
-          },
-        });
-        return
-      }
-      uni.setStorageSync('env', window.env);
-      // 如果是支付宝小程序:初始化
-      if (this.isAlipayClient) {
-        setToken()
-        localStorageInit();
-        windowSendInit()
-        try {
-          this.$store.commit('SET_IS_INIT', false);
-          const options = await alipayClientInit();
-          await this.$store.dispatch('baseInit', {
-            options,
-            callback: () => {
-              this.$store.commit('SET_IS_INIT', true);
-              // 无感积分逻辑
-              // this.wxEasyPointsCommitStatusInit();
-            },
-          });
-        } catch (err) {
-          console.log(err);
-        }
-        return
-      }
-      // 如果是微信小程序。初始化wss
-      if (getIsMin()) {
-        // 如果刷新之后没有与微信小程序建立链接则提示用户,关闭小程序重新进入
-        const isReloadLoop = await isReloadBefore();
-        if (isReloadLoop) {
-          uni.removeStorageSync('isReload');
-            const { theme } = getsTheCurrentTopic();
-            this.$dialog({
-              title: '温馨提示',
-              message: '当前网络异常,请重新进入小程序',
-              confirmButtonColor: this.$theme[theme].primaryColor,
-            });
-            return;
-          /* const isReload = await theCommunicationBetweenWechatAndH5IsNormal();
-          if (isReload) {
-            uni.removeStorageSync('isReload');
-            const { theme } = getsTheCurrentTopic();
-            this.$dialog({
-              title: '温馨提示',
-              message: '当前网络异常,请重新进入小程序',
-              confirmButtonColor: this.$theme[theme].primaryColor,
-            });
-            return;
-          } */
-        }
-        if (window.location.href.indexOf('cryptojs') > -1) {
-          return;
-        }
-        setToken();
-        localStorageInit();
-        this.$store.commit('SET_IS_INIT', false);
-        try {
-          const options = await wssInit();
-          this.$store.dispatch('baseInit', {
-            options,
-            callback: () => {
-              this.$store.commit('SET_IS_INIT', true);
-              // 无感积分逻辑
-              // this.wxEasyPointsCommitStatusInit();
-            },
-          });
-        } catch (err) {
-          console.log(err);
-        }
-      }
-      // 如果是微信公众号
-      if (getIsWxh5()) {
-        // 判断用户是否登录
-        this.micromessengerInit();
-      }
-    },
-    micromessengerInit() {
-      this.$store.commit('SET_IS_INIT', false);
-      let path = '';
-      let [groupId, mallId] = window.location.pathname.split('/').filter((elm) => elm);
-      // return;
-      // 如果groupId 是 tparking
-      if (groupId === 'tparking') {
-        [path, groupId, mallId] = window.location.pathname.split('/').filter((elm) => elm);
-      }
-      if (!groupId || !mallId) {
-        groupId = uni.getStorageSync('groupId');
-        mallId = uni.getStorageSync('mallId');
-      }
+// 使用 Vuex
+const store = useStore();
+const route = useRoute();
+const router = useRouter();
 
-      this.$store.commit('SET_GROUP_ID', groupId);
-      this.$store.commit('SET_MALL_ID', mallId);
-      // 设置appid
-      const appid = getAppIdByGroupIdAndMallId({
-        groupId,
-        mallId,
-        type: 'appid',
-      });
-      uni.setStorageSync('appid', appid);
-      // 如果用户没有openid
-      const openid = uni.getStorageSync('openid');
+onBeforeMount(async () => {
+  await initEnv();
+  await requestInit();
+  await pageInit();
+});
+
+const pageInit = async () => {
+  window.isWxV2 = false;
+  windowSendInit();
+  // 微信重构改造 第二版本
+  if (window.location.href.indexOf('tparking/wxV2') > -1) {
+    localStorageInit();
+    window.isWxV2 = true;
 
-      const query = getUrlParams();
-      // return;
-      // 设置openid
-      this.$nextTick(() => {
-        this.$store.commit('SET_IS_INIT', true);
-        if (openid && openid !== 'undefined') {
-          this.$store.commit('SET_OPENID', openid);
-          // 用户选择不登录
-          if (this.isLogin !== 'loginDenied') {
-            this.$store.commit('SET_IS_INIT', false);
-            setTimeout(() => {
-              this.$store.commit('SET_IS_INIT', true);
-            }, 700);
-            // 判断用户是否需要登录
-            this.checkIsLogin(() => {
-              this.$store.commit('SET_IS_INIT', true);
-              // window.location.reload();
-              this.$store.dispatch('getUserDetail');
-              this.$store.commit('SET_MEMBER', uni.getStorageSync('member'));
-              // 无感积分逻辑
-              this.wxEasyPointsCommitStatusInit();
-              // uni.getStorageSync();
-            });
-          }
-        } else {
-          // 前往授权页面
-          if (this.$route.path.indexOf('openWx') < 0) {
-            let openWxPath = 'openWx';
-            if (this.$route.fullPath === '/') {
-              openWxPath = `/${groupId}/${mallId}/openWx`;
-            }
-            this.$router.push({
-              path: openWxPath,
-              query,
-            });
-          }
-        }
+    uni.showLoading({
+      title: '加载中',
+    });
+    console.log(window.location.search);
+
+    const options = getQuery(window.location.href);
+    // 获取 token
+    let accessToken = '';
+    if (options.sessionId) {
+      accessToken = await getTokenById({
+        tokenId: options.sessionId,
+      });
+    }
+    await store.dispatch('baseInitV2', {
+      options: {
+        ...options,
+        accessToken: accessToken,
+      },
+      callback: () => {
+        console.log(108, route);
+        store.commit('SET_IS_INIT', true);
+      },
+    });
+    return;
+  }
+  uni.setStorageSync('env', window.env);
+  // 如果是支付宝小程序:初始化
+  if (window.isAlipayClient) {
+    setToken();
+    localStorageInit();
+    windowSendInit();
+    try {
+      store.commit('SET_IS_INIT', false);
+      const options = await alipayClientInit();
+      await store.dispatch('baseInit', {
+        options,
+        callback: () => {
+          store.commit('SET_IS_INIT', true);
+        },
       });
-    },
-    // 无感积分相关
-    async wxEasyPointsCommitStatusInit() {
-      return;
-      this.$refs.wxPointsCommit.open();
-      // 判断用户是否登陆
-      if (uni.getStorageSync('openid') && uni.getStorageSync('member') && uni.getStorageSync('member') !== {}) {
-        const easyPointsCommitStatus = await getWxEasyPointsCommitStatus();
-        if (easyPointsCommitStatus) {
-          this.$refs.wxPointsCommit.open();
-        }
-      }
-    },
-  },
+    } catch (err) {
+      console.log(err);
+    }
+    return;
+  }
 };
+
+
+// 使用 watch 来监控 route 的变化
+watch(route, (newRoute) => {
+  const { name, meta: { keepAlive } } = newRoute;
+  if (name && keepAlive) {
+    store.commit('cachedViews/ADD_CACHED_VIEW', newRoute);
+  }
+}, { immediate: true });
+
+// 使用 watch 来监控缓存视图的变化
+const cachedViews = computed(() => store.state.cachedViews.cachedViews);
+watch(cachedViews, (newCachedViews) => {
+  console.log('cachedViews(打印已经缓存的页面)', newCachedViews);
+}, { immediate: true });
+
+
+// 定义计算属性
+const passLogin = computed(() => store.state.passLogin);
+const key = computed(() => route.path);
+const isInit = computed(() => store.state.isInit);
 </script>
-<style lang="less">
-/* 如果有其他引入,合并即可,该文件最好放第一行 */
-// @import '@kip/ui-mobile/theme/theme.css';
-@import '~@/kui/theme/theme.css';
-</style>
 
 <style>
 page {

+ 3 - 11
src/api/request.js

@@ -1,20 +1,11 @@
-import Vue from 'vue'
 import uni from '@/utils/uniHooks';
 import { getUTMSource } from '@/utils/utils';
-import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
+import axios from 'axios';
 import { md } from '@/utils/common'
-// import { Message } from 'element-ui';
-// import { jumpLogin } from '@/utils';
-// import { Loading } from 'element-ui';
-// import { ElLoadingComponent } from 'element-ui/types/loading';
-// import vm from "@/main";
 import { Toast, Dialog, Switch } from 'vant';
-// import vue from 'vue';
 import store from '@/store';
 import { backLbsHome, getsTheCurrentTopic, toLogin, isEmpty } from "@/utils";
 import kipTheme from '@/kui/theme/theme'
-// import { v4 as uuidv4 } from 'uuid';
-// import { wxToLoginCallback } from '@/utils/index.js'
 let loadingInstance = null;
 let requestNum = 0;
 
@@ -73,6 +64,7 @@ const addLoading = () => {
     // 展示加载中的状态
     loadingInstance = Toast.loading({
       message: '正在努力加载中....',
+      className: 'USERshowLoadingToast',
     });
   }
 };
@@ -88,7 +80,7 @@ function XUser(config) {
     userId: store.state?.kipUserId || '', // K+用户ID
     // userId: '2c9d85868652dee50186532bdbbb0001', // K+用户ID
     // sourceType: 'WECHAT',
-    sourceType: Vue.prototype.isAlipayClient ? 'ALIPAY' : 'WECHAT',
+    sourceType: window.isAlipayClient ? 'ALIPAY' : 'WECHAT',
     // phoneNumber: '18521563898',
     phoneNumber: store.state?.mobile || '', // 终端用户ID, 微信端传openId, 支付宝小程序传阿里userId, APP传KIP的userId
     // projectId: store.state.projectId || '4028e3817c2b3f79017c2b48c54c0000', // 楼盘id

+ 0 - 90
src/common/js/clientInit.js

@@ -1,90 +0,0 @@
-// H5
-// 微信小程序: KIP
-// 微信小程序: CRM
-/*
-* 1、如果是小程序的话,接入 socket
-* 2、如果是h5,获取用户的 openid
-* 3、初始化 socket
-* */
-
-import { createAxiosByinterceptors } from "@/api/request";
-import Stomp from '@/lib/stompjs';
-import loginMinix from '@/mixins/login';
-import { Decrypt, Encrypt } from '@/utils/crypto';
-import { getIsMin, getIsWxh5, getUrlParams } from '@/utils/index.js';
-import SockJS from '@/utils/sockjs';
-import uni from '@/utils/uniHooks';
-import { getAppIdByGroupIdAndMallId } from '@/utils/index.js';
-
-
-export function initEnv() {
-  const href = window.location.href;
-  console.log('当前页面的url地址  ', href);
-  if (/dev-|8080/.test(href)) {
-    // window.env = 'qa';
-    // window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
-    // window.api = 'qaApi';
-    window.env = 'dev';
-    window.profileApi = 'https://dev-gateway-kip.kerryonvip.com/api';
-    window.api = 'devApi';
-    return;
-  }
-  if (/qa-/.test(href)) {
-    window.env = 'qa';
-    window.api = 'qaApi';
-    window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
-    return;
-  }
-  window.env = 'prod';
-  window.profileApi = 'https://apim.kerryplus.com/c/api';
-  window.api = 'api';
-}
-export function requestInit() {
-  window.requestms = createAxiosByinterceptors({
-    baseURL: `${window.profileApi}/temporary-parking-service`,
-  });
-}
-
-// websocket 链接
-export function  getUrl() {
-  // 如果 kerry+ 这边的访问环境是 sl 或者 lt,需要把 wss 指向 qa 环境。
-  const href = `${window.location.href}`;
-  if (/dev-|8080/.test(href)) {
-    return 'https://qa-crm-kpl.kerryprops.com.cn/xcrm-api';
-  }
-  if (/qa-/.test(href)) {
-    return 'https://qa-crm-kpl.kerryprops.com.cn/xcrm-api';
-  }
-  // return 'https://qa-crm-kpl.kerryprops.com.cn/xcrm-api';
-  return `https://crm.kerryplus.com/xcrm-api`;
-}
-
-export function  createWS() {
-  return new Promise((resolve, reject) => {
-    try {
-      const socket = new SockJS(
-        `${this.getUrl()}/hafengWebsocket?token=${window.token}`
-      );
-      window.stompClient = Stomp.over(socket);
-      window.stompClient.debug = null;
-      this.windowSendInit();
-      window.stompClient.connect({}, (frame) => {
-        // 请求 projectId
-        window.toWXSendMsg({
-          type: 'getProjectId',
-          options: {},
-        });
-        window.subscribe('projectId', (options) => {
-          resolve(options);
-        });
-      });
-    } catch (err) {
-      reject(err);
-    }
-  });
-}
-
-
-export function  clientInit() {
-
-}

+ 0 - 483
src/common/js/stomp.js

@@ -1,483 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-
-/*
-   Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
-
-   Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
-   Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
- */
-
-(function() {
-  var Byte, Client, Frame, Stomp,
-    __hasProp = {}.hasOwnProperty,
-    __slice = [].slice;
-
-  Byte = {
-    LF: '\x0A',
-    NULL: '\x00'
-  };
-
-  Frame = (function() {
-    var unmarshallSingle;
-
-    function Frame(command, headers, body) {
-      this.command = command;
-      this.headers = headers != null ? headers : {};
-      this.body = body != null ? body : '';
-    }
-
-    Frame.prototype.toString = function() {
-      var lines, name, skipContentLength, value, _ref;
-      lines = [this.command];
-      skipContentLength = this.headers['content-length'] === false ? true : false;
-      if (skipContentLength) {
-        delete this.headers['content-length'];
-      }
-      _ref = this.headers;
-      for (name in _ref) {
-        if (!__hasProp.call(_ref, name)) continue;
-        value = _ref[name];
-        lines.push("" + name + ":" + value);
-      }
-      if (this.body && !skipContentLength) {
-        lines.push("content-length:" + (Frame.sizeOfUTF8(this.body)));
-      }
-      lines.push(Byte.LF + this.body);
-      return lines.join(Byte.LF);
-    };
-
-    Frame.sizeOfUTF8 = function(s) {
-      if (s) {
-        return encodeURI(s).match(/%..|./g).length;
-      } else {
-        return 0;
-      }
-    };
-
-    unmarshallSingle = function(data) {
-      var body, chr, command, divider, headerLines, headers, i, idx, len, line, start, trim, _i, _j, _len, _ref, _ref1;
-      divider = data.search(RegExp("" + Byte.LF + Byte.LF));
-      headerLines = data.substring(0, divider).split(Byte.LF);
-      command = headerLines.shift();
-      headers = {};
-      trim = function(str) {
-        return str.replace(/^\s+|\s+$/g, '');
-      };
-      _ref = headerLines.reverse();
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        line = _ref[_i];
-        idx = line.indexOf(':');
-        headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1));
-      }
-      body = '';
-      start = divider + 2;
-      if (headers['content-length']) {
-        len = parseInt(headers['content-length']);
-        body = ('' + data).substring(start, start + len);
-      } else {
-        chr = null;
-        for (i = _j = start, _ref1 = data.length; start <= _ref1 ? _j < _ref1 : _j > _ref1; i = start <= _ref1 ? ++_j : --_j) {
-          chr = data.charAt(i);
-          if (chr === Byte.NULL) {
-            break;
-          }
-          body += chr;
-        }
-      }
-      return new Frame(command, headers, body);
-    };
-
-    Frame.unmarshall = function(datas) {
-      var data;
-      return (function() {
-        var _i, _len, _ref, _results;
-        _ref = datas.split(RegExp("" + Byte.NULL + Byte.LF + "*"));
-        _results = [];
-        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-          data = _ref[_i];
-          if ((data != null ? data.length : void 0) > 0) {
-            _results.push(unmarshallSingle(data));
-          }
-        }
-        return _results;
-      })();
-    };
-
-    Frame.marshall = function(command, headers, body) {
-      var frame;
-      frame = new Frame(command, headers, body);
-      return frame.toString() + Byte.NULL;
-    };
-
-    return Frame;
-
-  })();
-
-  Client = (function() {
-    var now;
-
-    function Client(ws) {
-      this.ws = ws;
-      this.ws.binaryType = "arraybuffer";
-      this.counter = 0;
-      this.connected = false;
-      this.heartbeat = {
-        outgoing: 10000,
-        incoming: 10000
-      };
-      this.maxWebSocketFrameSize = 16 * 1024;
-      this.subscriptions = {};
-    }
-
-    Client.prototype.debug = function(message) {
-      var _ref;
-      return console.log(message);
-    };
-
-    now = function() {
-      if (Date.now) {
-        return Date.now();
-      } else {
-        return new Date().valueOf;
-      }
-    };
-
-    Client.prototype._transmit = function(command, headers, body) {
-      var out;
-      out = Frame.marshall(command, headers, body);
-      if (typeof this.debug === "function") {
-        this.debug(">>> " + out);
-      }
-      while (true) {
-        if (out.length > this.maxWebSocketFrameSize) {
-          this.ws.send(out.substring(0, this.maxWebSocketFrameSize));
-          out = out.substring(this.maxWebSocketFrameSize);
-          if (typeof this.debug === "function") {
-            this.debug("remaining = " + out.length);
-          }
-        } else {
-          return this.ws.send(out);
-        }
-      }
-    };
-
-    Client.prototype._setupHeartbeat = function(headers) {
-      var serverIncoming, serverOutgoing, ttl, v, _ref, _ref1;
-      if ((_ref = headers.version) !== Stomp.VERSIONS.V1_1 && _ref !== Stomp.VERSIONS.V1_2) {
-        return;
-      }
-      _ref1 = (function() {
-        var _i, _len, _ref1, _results;
-        _ref1 = headers['heart-beat'].split(",");
-        _results = [];
-        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
-          v = _ref1[_i];
-          _results.push(parseInt(v));
-        }
-        return _results;
-      })(), serverOutgoing = _ref1[0], serverIncoming = _ref1[1];
-      if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {
-        ttl = Math.max(this.heartbeat.outgoing, serverIncoming);
-        if (typeof this.debug === "function") {
-          this.debug("send PING every " + ttl + "ms");
-        }
-        this.pinger = Stomp.setInterval(ttl, (function(_this) {
-          return function() {
-            _this.ws.send(Byte.LF);
-            return typeof _this.debug === "function" ? _this.debug(">>> PING") : void 0;
-          };
-        })(this));
-      }
-      if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {
-        ttl = Math.max(this.heartbeat.incoming, serverOutgoing);
-        if (typeof this.debug === "function") {
-          this.debug("check PONG every " + ttl + "ms");
-        }
-        return this.ponger = Stomp.setInterval(ttl, (function(_this) {
-          return function() {
-            var delta;
-            delta = now() - _this.serverActivity;
-            if (delta > ttl * 2) {
-              if (typeof _this.debug === "function") {
-                _this.debug("did not receive server activity for the last " + delta + "ms");
-              }
-              return _this.ws.close();
-            }
-          };
-        })(this));
-      }
-    };
-
-    Client.prototype._parseConnect = function() {
-      var args, connectCallback, errorCallback, headers;
-      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
-      headers = {};
-      switch (args.length) {
-        case 2:
-          headers = args[0], connectCallback = args[1];
-          break;
-        case 3:
-          if (args[1] instanceof Function) {
-            headers = args[0], connectCallback = args[1], errorCallback = args[2];
-          } else {
-            headers.login = args[0], headers.passcode = args[1], connectCallback = args[2];
-          }
-          break;
-        case 4:
-          headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3];
-          break;
-        default:
-          headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3], headers.host = args[4];
-      }
-      return [headers, connectCallback, errorCallback];
-    };
-
-    Client.prototype.connect = function() {
-      var args, errorCallback, headers, out;
-      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
-      out = this._parseConnect.apply(this, args);
-      headers = out[0], this.connectCallback = out[1], errorCallback = out[2];
-      if (typeof this.debug === "function") {
-        this.debug("Opening Web Socket...");
-      }
-      this.ws.onmessage = (function(_this) {
-        return function(evt) {
-          var arr, c, client, data, frame, messageID, onreceive, subscription, _i, _len, _ref, _results;
-          data = typeof ArrayBuffer !== 'undefined' && evt.data instanceof ArrayBuffer ? (arr = new Uint8Array(evt.data), typeof _this.debug === "function" ? _this.debug("--- got data length: " + arr.length) : void 0, ((function() {
-            var _i, _len, _results;
-            _results = [];
-            for (_i = 0, _len = arr.length; _i < _len; _i++) {
-              c = arr[_i];
-              _results.push(String.fromCharCode(c));
-            }
-            return _results;
-          })()).join('')) : evt.data;
-          _this.serverActivity = now();
-          if (data === Byte.LF) {
-            if (typeof _this.debug === "function") {
-              _this.debug("<<< PONG");
-            }
-            return;
-          }
-          if (typeof _this.debug === "function") {
-            _this.debug("<<< " + data);
-          }
-          _ref = Frame.unmarshall(data);
-          _results = [];
-          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-            frame = _ref[_i];
-            switch (frame.command) {
-              case "CONNECTED":
-                if (typeof _this.debug === "function") {
-                  _this.debug("connected to server " + frame.headers.server);
-                }
-                _this.connected = true;
-                _this._setupHeartbeat(frame.headers);
-                _results.push(typeof _this.connectCallback === "function" ? _this.connectCallback(frame) : void 0);
-                break;
-              case "MESSAGE":
-                subscription = frame.headers.subscription;
-                onreceive = _this.subscriptions[subscription] || _this.onreceive;
-                if (onreceive) {
-                  client = _this;
-                  messageID = frame.headers["message-id"];
-                  frame.ack = function(headers) {
-                    if (headers == null) {
-                      headers = {};
-                    }
-                    return client.ack(messageID, subscription, headers);
-                  };
-                  frame.nack = function(headers) {
-                    if (headers == null) {
-                      headers = {};
-                    }
-                    return client.nack(messageID, subscription, headers);
-                  };
-                  _results.push(onreceive(frame));
-                } else {
-                  _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled received MESSAGE: " + frame) : void 0);
-                }
-                break;
-              case "RECEIPT":
-                _results.push(typeof _this.onreceipt === "function" ? _this.onreceipt(frame) : void 0);
-                break;
-              case "ERROR":
-                _results.push(typeof errorCallback === "function" ? errorCallback(frame) : void 0);
-                break;
-              default:
-                _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled frame: " + frame) : void 0);
-            }
-          }
-          return _results;
-        };
-      })(this);
-      this.ws.onclose = (function(_this) {
-        return function() {
-          var msg;
-          msg = "Whoops! Lost connection to " + _this.ws.url;
-          if (typeof _this.debug === "function") {
-            _this.debug(msg);
-          }
-          _this._cleanUp();
-          return typeof errorCallback === "function" ? errorCallback(msg) : void 0;
-        };
-      })(this);
-      return this.ws.onopen = (function(_this) {
-        return function() {
-          if (typeof _this.debug === "function") {
-            _this.debug('Web Socket Opened...');
-          }
-          headers["accept-version"] = Stomp.VERSIONS.supportedVersions();
-          headers["heart-beat"] = [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',');
-          return _this._transmit("CONNECT", headers);
-        };
-      })(this);
-    };
-
-    Client.prototype.disconnect = function(disconnectCallback, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      this._transmit("DISCONNECT", headers);
-      this.ws.onclose = null;
-      this.ws.close();
-      this._cleanUp();
-      return typeof disconnectCallback === "function" ? disconnectCallback() : void 0;
-    };
-
-    Client.prototype._cleanUp = function() {
-      this.connected = false;
-      if (this.pinger) {
-        Stomp.clearInterval(this.pinger);
-      }
-      if (this.ponger) {
-        return Stomp.clearInterval(this.ponger);
-      }
-    };
-
-    Client.prototype.send = function(destination, headers, body) {
-      if (headers == null) {
-        headers = {};
-      }
-      if (body == null) {
-        body = '';
-      }
-      headers.destination = destination;
-      return this._transmit("SEND", headers, body);
-    };
-
-    Client.prototype.subscribe = function(destination, callback, headers) {
-      var client;
-      if (headers == null) {
-        headers = {};
-      }
-      if (!headers.id) {
-        headers.id = "sub-" + this.counter++;
-      }
-      headers.destination = destination;
-      this.subscriptions[headers.id] = callback;
-      this._transmit("SUBSCRIBE", headers);
-      client = this;
-      return {
-        id: headers.id,
-        unsubscribe: function() {
-          return client.unsubscribe(headers.id);
-        }
-      };
-    };
-
-    Client.prototype.unsubscribe = function(id) {
-      delete this.subscriptions[id];
-      return this._transmit("UNSUBSCRIBE", {
-        id: id
-      });
-    };
-
-    Client.prototype.begin = function(transaction) {
-      var client, txid;
-      txid = transaction || "tx-" + this.counter++;
-      this._transmit("BEGIN", {
-        transaction: txid
-      });
-      client = this;
-      return {
-        id: txid,
-        commit: function() {
-          return client.commit(txid);
-        },
-        abort: function() {
-          return client.abort(txid);
-        }
-      };
-    };
-
-    Client.prototype.commit = function(transaction) {
-      return this._transmit("COMMIT", {
-        transaction: transaction
-      });
-    };
-
-    Client.prototype.abort = function(transaction) {
-      return this._transmit("ABORT", {
-        transaction: transaction
-      });
-    };
-
-    Client.prototype.ack = function(messageID, subscription, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      headers["message-id"] = messageID;
-      headers.subscription = subscription;
-      return this._transmit("ACK", headers);
-    };
-
-    Client.prototype.nack = function(messageID, subscription, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      headers["message-id"] = messageID;
-      headers.subscription = subscription;
-      return this._transmit("NACK", headers);
-    };
-
-    return Client;
-
-  })();
-
-  Stomp = {
-    VERSIONS: {
-      V1_0: '1.0',
-      V1_1: '1.1',
-      V1_2: '1.2',
-      supportedVersions: function() {
-        return '1.1,1.0';
-      }
-    },
-    client: function(url, protocols) {
-      var klass, ws;
-      if (protocols == null) {
-        protocols = ['v10.stomp', 'v11.stomp'];
-      }
-      klass = Stomp.WebSocketClass || WebSocket;
-      ws = new klass(url, protocols);
-      return new Client(ws);
-    },
-    over: function(ws) {
-      return new Client(ws);
-    },
-    Frame: Frame
-  };
-
-  if (typeof exports !== "undefined" && exports !== null) {
-    exports.Stomp = Stomp;
-  }
-
-  Stomp.setInterval = function(interval, f) {
-    return setInterval(f, interval);
-  };
-  Stomp.clearInterval = function(id) {
-    return clearInterval(id);
-  };
-
-}).call(this);

+ 0 - 12
src/components/Login/Login.vue

@@ -2,23 +2,13 @@
   <div style="color: transparent">login</div>
 </template>
 <script>
-// import { isMini } from '@/utils/mixins';
-
-// import { crmQueryMemberInfo } from '@/utils/api-crm-member';
-// import Ws from '@/utils/websocket';
-import SockJS from '@/utils/sockjs';
-import Stomp from '@/lib/stompjs/index';
-// import uni from '@/utils/uniHooks';
 import { Encrypt, Decrypt } from '@/utils/crypto';
 import CacheTool from '@/utils/cache-tool';
 import uni from '@/utils/uniHooks';
 import { mapState } from 'vuex';
-import { initWxJsSdkConfig } from '@/utils/login.js';
 import {
   getUrlParams,
   getPlatform,
-  getIsMin,
-  getIsWxh5,
 } from '@/utils/index.js';
 import KipCacheTool from '@/utils/kip-cache-tool.js';
 import MemberCacheTool from '@/utils/member-cache-tool.js';
@@ -36,8 +26,6 @@ export default {
       msg: '',
       isInit: false,
       stompClient: null,
-      // host: 'https://dev-crm-kpl.kerryprops.com.cn/xcrm-api',
-      // token: '1234',
     };
   },
   created() {

+ 6 - 3
src/components/checkCarPopup/checkCarPopup.vue

@@ -1,7 +1,7 @@
 <template>
-  <van-popup v-model="show"  :style="{ top: '480px' }">
+  <van-popup v-model:show="show"  :style="{ top: '480px' }">
     <div class="popup-box">
-      <img class="unlicensed" :src="`${require(`../../pages/parkingFee/static/images/vnfo-2.19.svg`)}`"
+      <img class="unlicensed" :src="vnfo219Svg"
            alt="unlicensed"/>
       <div class="title" v-if="redirectTo === 'BIND_NEW'">是否将车牌号 <span class="vehicleNo">{{ vehicleNo }}</span> 添加绑定?</div>
       <div class="title" v-if="redirectTo === 'CHANGE_BINDING'">绑定车牌号数量已达上限,是否换绑?</div>
@@ -17,6 +17,8 @@
   </van-popup>
 </template>
 <script>
+
+import vnfo219Svg from '../../pages/parkingFee/static/images/vnfo-2.19.svg'
 export default {
   data() {
     return {
@@ -26,7 +28,8 @@ export default {
       bottomBtnName: '',
       bottomBtnFn: false,
       vehicleNo: '',
-      redirectTo: 'BIND_NEW'
+      redirectTo: 'BIND_NEW',
+      vnfo219Svg
     }
   },
   mounted() {

+ 1 - 1
src/components/info/blue-perfectinfo.vue

@@ -655,7 +655,7 @@
 		color: #808080;
 	}
 
-	/deep/ .uni-input-input {
+	:deep(.uni-input-input) {
 		font-size: 13px;
 		color: #808080;
 	}

+ 2 - 2
src/components/info/perfectInfo.vue

@@ -679,7 +679,7 @@ export default {
         color: #999;
         font-family: PingFangSC-Regular, PingFang SC;
       }
-      ::v-deep .checklist-text,
+      :deep(.checklist-text),
       .placeholder_input {
         font-size: 34px !important;
         color: #999;
@@ -710,7 +710,7 @@ export default {
   border: 1px solid #979797;
 }
 
-/deep/ .checklist-text {
+:deep(.checklist-text){
   color: #999999;
 }
 </style>

+ 41 - 49
src/components/install.js

@@ -3,56 +3,48 @@ import scrollView from './scroll-view/scroll-view.vue';
 import uniView from './uni-view/uni-view.vue';
 import uniDrawer from './uni-drawer/uni-drawer.vue';
 import uniPopup from './uni-popup/uni-popup.vue';
-import checkboxGroup from './checkbox-group/checkbox-group';
-import uniCountdown from './uni-countdown/uni-countdown';
-import UniNumberBox from './uni-number-box/uni-number-box';
-import uniLoadMore from './uni-load-more/uni-load-more';
-import wybButton from './wyb-button/wyb-button';
-import wxPointsCommit from './wx-points-commit/wx-points-commit';
-import myProtocolModal from './my-protocol-modal/my-protocol-modal';
-import uniText from './uni-text/index';
-import uniButton from './uni-button/index';
-import checkCarPopup from './checkCarPopup/checkCarPopup';
+import checkboxGroup from './checkbox-group/checkbox-group.vue';
+import uniCountdown from './uni-countdown/uni-countdown.vue';
+import UniNumberBox from './uni-number-box/uni-number-box.vue';
+import uniLoadMore from './uni-load-more/uni-load-more.vue';
+import wybButton from './wyb-button/wyb-button.vue';
+import wxPointsCommit from './wx-points-commit/wx-points-commit.vue';
+import myProtocolModal from './my-protocol-modal/my-protocol-modal.vue';
+import uniText from './uni-text/index.vue';
+import uniButton from './uni-button/index.vue';
+import checkCarPopup from './checkCarPopup/checkCarPopup.vue';
 // KIP组件
-import kIcon from '@/kui/components/k-icon/k-icon'
-import kButton from '@/kui/components/k-button/k-button'
-import kTab from '@/kui/components/k-tab/k-tab'
-import kIllustration from '@/kui/components/k-illustration/k-illustration'
-import kPlateNumberKeyboard from '@/kui/components/k-plate-number-input/k-plate-number-keyboard'
-import KCard from '@/kui/components/k-card/k-card'
+import kIcon from '@/kui/components/k-icon/k-icon.vue'
+import kButton from '@/kui/components/k-button/k-button.vue'
+import kTab from '@/kui/components/k-tab/k-tab.vue'
+import kIllustration from '@/kui/components/k-illustration/k-illustration.vue'
+import kPlateNumberKeyboard from '@/kui/components/k-plate-number-input/k-plate-number-keyboard.vue'
+import KCard from '@/kui/components/k-card/k-card.vue'
 import theme from '@/kui/theme/theme'
 
-// import uniImage from './uni-image/index';
-// src/components/wx-points-commit/wx-points-commit.vue
-function plugins(Vue) {
-  // console.log(33333, Vue)
-  // Vue.component("View", View);
-  // Vue.component("componen-b", ComponentB);
-  // Vue.component("componen-c", ComponentC);
-  Vue.component('scroll-view', scrollView);
-  Vue.component('uni-view', uniView);
-  // Vue.component("view", uniView);
-  Vue.component('uni-drawer', uniDrawer);
-  Vue.component('uni-popup', uniPopup);
-  Vue.component('checkbox-group', checkboxGroup);
-  Vue.component('uni-countdown', uniCountdown);
-  Vue.component('uni-number-box', UniNumberBox);
-  Vue.component('uni-load-more', uniLoadMore);
-  Vue.component('wyb-button', wybButton);
-  Vue.component('wx-points-commit', wxPointsCommit);
-  Vue.component('uni-text', uniText)
-  Vue.component('my-protocol-modal', myProtocolModal)
-  Vue.component('uni-button', uniButton)
-  Vue.component('checkCarPopup', checkCarPopup)
-  // KIP组件
-  Vue.component('k-icon', kIcon)
-  Vue.component('k-button', kButton)
-  Vue.component('k-tab', kTab)
-  Vue.component('k-illustration', kIllustration)
-  Vue.component('k-card', KCard)
-  Vue.component('k-plate-number-keyboard', kPlateNumberKeyboard) // 修改程度深,不建议置换
-  Vue.prototype.$theme = theme
-  // Vue.component('image', uniImage)
-}
 
-export default plugins;
+export default {
+  install(app) {
+    app.component('scroll-view', scrollView);
+    app.component('uni-view', uniView);
+    app.component('uni-drawer', uniDrawer);
+    app.component('uni-popup', uniPopup);
+    app.component('checkbox-group', checkboxGroup);
+    app.component('uni-countdown', uniCountdown);
+    app.component('uni-number-box', UniNumberBox);
+    app.component('uni-load-more', uniLoadMore);
+    app.component('wyb-button', wybButton);
+    app.component('wx-points-commit', wxPointsCommit);
+    app.component('uni-text', uniText)
+    app.component('my-protocol-modal', myProtocolModal)
+    app.component('uni-button', uniButton)
+    app.component('checkCarPopup', checkCarPopup)
+    // KIP组件
+    app.component('k-icon', kIcon)
+    app.component('k-button', kButton)
+    app.component('k-tab', kTab)
+    app.component('k-illustration', kIllustration)
+    app.component('k-card', KCard)
+    app.component('k-plate-number-keyboard', kPlateNumberKeyboard) // 修改程度深,不建议置换
+  }
+};

+ 1 - 1
src/components/newMemberPoints/index.vue

@@ -1,6 +1,6 @@
 <template>
   <van-popup
-    v-model="popup"
+    v-model:show="popup"
     position="bottom"
     :animation="false"
     :maskClick="false"

+ 11 - 7
src/components/plate-number/plateNumber.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="plate-keyboard">
     <!-- 选择车牌号 首个汉字键盘 弹出层 -->
-    <van-popup v-model="chinese_popup" position="bottom" class="uni-popup plate_number" :close-on-click-overlay="false" :maskClick="false">
+    <van-popup v-model:show="chinese_popup" position="bottom" class="uni-popup plate_number" :close-on-click-overlay="false" :maskClick="false">
       <div class="plate_number_wrap">
         <!-- 提示区域 -->
         <div class="event-box">
@@ -12,13 +12,13 @@
         <div class="plate_chinese_box">
           <button size="small" :class="[item.id === 99 && 'del',  item.id === 66 && 'mini']" v-for="(item, index) in ChineseList" :key="item.id" :disabled="disabledKeyboard(index)" @click="checkChinese(index)">
             <span v-if="item.id !== 99">{{ item.name }}</span>
-            <img v-else :src="require(`../../static/images/close.png`)" alt="" />
+            <img v-else :src="closePng" alt="" />
           </button>
         </div>
       </div>
     </van-popup>
     <!-- 英文 数字 键盘 -->
-    <van-popup v-model="allBoard_popup" position="bottom" class="uni-popup allBoard" :maskClick="false" :close-on-click-overlay="false">
+    <van-popup v-model:show="allBoard_popup" position="bottom" class="uni-popup allBoard" :maskClick="false" :close-on-click-overlay="false">
       <div class="allBoard_wrap">
         <!-- 提示区域 -->
         <div class="event-box">
@@ -38,7 +38,7 @@
                 </button>  
               </div>
               <button v-if="rowIndex === 3"  :key="`close${rowIndex}`" class="del area"  @click="checkEnglish_num('close')">
-                <img :src="require(`../../static/images/close.png`)" alt="" />
+                <img :src="closePng" alt="" />
               </button>
             </div>
           </div>
@@ -50,6 +50,7 @@
 
 <script>
 import uniPop from '../uni-popup/uni-popup.vue';
+import closePng from '../../static/images/close.png';
 
 export default {
   components: {
@@ -103,6 +104,7 @@ export default {
       carnoIndex: 0,
       activeIndex: -1,
       carnoArr: ['', '', '', '', '', '', ''],
+      closePng
     };
   },
   computed: {
@@ -161,7 +163,8 @@ export default {
         this.openKeyboardEN();
       } else {
         // 把选中的字赋值
-        this.$set(this.carnoArr, this.carnoIndex, this.ChineseList[index].name);
+        // this.$set(this.carnoArr, this.carnoIndex, this.ChineseList[index].name);
+        this.carnoArr[this.carnoIndex] = this.ChineseList[index].name
         if (this.carnoIndex === this.carnoArr.length - 1) {
           this.close_keyboard();
         } else {
@@ -201,7 +204,8 @@ export default {
         this.openKeyboardCN();
       } else {
         // 把选中的字赋值
-        this.$set(this.carnoArr, this.carnoIndex, `${index}`);
+        // this.$set(this.carnoArr, this.carnoIndex, `${index}`);
+        this.carnoArr[this.carnoIndex] = `${index}`
         if (this.carnoIndex === this.carnoArr.length - 1) {
           this.close_keyboard();
         } else {
@@ -250,7 +254,7 @@ export default {
   margin: 6px 3px;
   box-shadow: 0px 2px 0px #9da0a3;
 }
- ::v-deep .van-overlay {
+ :deep(.van-overlay) {
    background-color: rgba(0,0,0,0.1);
  }
 .event-box {

+ 39 - 58
src/components/scroll-view/scroll-view.vue

@@ -4,69 +4,50 @@
   </div>
 </template>
 
-<script>
+<script setup>
+import {onMounted, onUnmounted, ref} from 'vue';
 import BScroll from '@better-scroll/core';
 import Pullup from '@better-scroll/pull-up';
-import ObserveDom from '@better-scroll/observe-dom'
-import _ from 'lodash'
+import ObserveDom from '@better-scroll/observe-dom';
+import {debounce} from '@/utils/index'
 
+// 注册插件
 BScroll.use(Pullup).use(ObserveDom);
+const emit = defineEmits(['scrolltolower']);
+const refreshContainer = ref(null);
+const scroll = ref(null);
+const isMore = ref(true);
+const pullingUpHandlerD = debounce(pullingUpHandler, 1000); // 防抖处理
 
-export default {
-  name: 'scroll-view',
-  props: {
-    scrollTop: {
-      type: [Number, String, Function],
-    },
-    scrollX: {
-      type: Boolean,
-      // required: false,
-      default: false,
-    },
-    scrollY: {
-      type: [Boolean, String],
-      // required: false,
-      default: true,
-    }
-  },
-  data() {
-    this.pullingUpHandlerD = _.debounce(this.pullingUpHandler, 1000) // 防抖
-    return {
-      startPos: 0,
-      transitionHeight: 0,
-      refreshText: '',
-      scroll: null,
-      isMore: true,
-    };
-  },
-  methods: {
-    pullingUpHandler() {
-      this.$emit('scrolltolower');
-      this.scroll.finishPullUp(); //每次上拉结束后,需要执行这个操作
-      this.scroll.refresh(); //当滚动区域的dom结构有变化时,需要执行这个操作
+// 上拉加载更多的处理函数
+function pullingUpHandler() {
+  emit('scrolltolower');
+  scroll.value.finishPullUp(); // 每次上拉结束后,需要执行这个操作
+  scroll.value.refresh(); // 当滚动区域的dom结构有变化时,需要执行这个操作
+}
+
+onMounted(() => {
+  scroll.value = new BScroll(refreshContainer.value, {
+    scrollY: true,
+    observeDOM: true, // 垂直方向滚动
+    click: true, // 默认会阻止浏览器的原生click事件,如果需要点击,这里要设为true
+    pullUpLoad: {
+      threshold: 50,
+      stop: 0,  //下拉回弹后停留的位置
+    }, //上拉加载更多
+    pullDownRefresh: {
+      threshold: 50,  // 触发pullingDown事件的位置
+      stop: 0, // 下拉回弹后停留的位置
     },
-  },
-  mounted() {
-    this.scroll = new BScroll(this.$refs.refreshContainer, {
-      scrollY: true, //垂直方向滚动
-      observeDOM: true,
-      click: true, //默认会阻止浏览器的原生click事件,如果需要点击,这里要设为true
-      pullUpLoad: {
-        threshold: 50,
-        stop: 0, //下拉回弹后停留的位置
-      }, //上拉加载更多
-      pullDownRefresh: {
-        threshold: 50, //触发pullingDown事件的位置
-        stop: 0, //下拉回弹后停留的位置
-      },
-    });
-    this.scroll.on('pullingUp',this.pullingUpHandlerD);
-  },
-  destroyed() {
-    // 离开页面 销毁 实例对象
-    this.scroll.destroy()
-  },
-};
+  });
+  scroll.value.on('pullingUp', pullingUpHandlerD);
+});
+
+onUnmounted(() => {
+   // 离开页面 销毁 实例对象
+  scroll.value.destroy();
+});
+
 </script>
 
 <style scoped lang="less">
@@ -75,4 +56,4 @@ export default {
   height: 100vh;
   overflow: hidden;
 }
-</style>
+</style>

+ 1 - 1
src/components/wx-points-auth/wx-points-auth.vue

@@ -159,7 +159,7 @@ export default {
                  "url": "/pages/accumulatePoints/selfServicePoints?redirect=1&backUrl=pages/package-parkingFee/parkingFeeWebView" // 去 login 页面 1 去登录
                 })
             }
-            if (this.isAlipayClient) {
+            if (window.isAlipayClient) {
                 my?.navigateTo({
                     "url": "/pages/accumulatePoints/selfServicePoints?redirect=1" // 去 login 页面 1 去登录
                 })

+ 1 - 2
src/components/wx-points-commit/wx-points-commit.vue

@@ -26,7 +26,6 @@
 
 <script>
 /* https://kerryprops.atlassian.net/browse/KIP-15785 */
-import Vue from 'vue';
 import uni from '@/utils/uniHooks';
 import { mapState } from "vuex"
 import {
@@ -103,7 +102,7 @@ export default {
     },
     checkShowFlag() {
       // 如果是支付宝,不弹出弹窗
-      if(Vue.prototype.isAlipayClient) {
+      if(window.isAlipayClient) {
         return false
       }
       const nowTime = new Date()

+ 0 - 17
src/extension.js

@@ -1,17 +0,0 @@
-var hx = require("hbuilderx");
-//该方法将在插件激活的时候调用
-function activate(context) {
-	let disposable = hx.commands.registerCommand('extension.helloWorld', () => {
-		hx.window.showInformationMessage('你好,这是我的第一个插件扩展。');
-	});
-	//订阅销毁钩子,插件禁用的时候,自动注销该command。
-	context.subscriptions.push(disposable);
-}
-//该方法将在插件禁用的时候调用(目前是在插件卸载的时候触发)
-function deactivate() {
-
-}
-module.exports = {
-	activate,
-	deactivate
-}

+ 31 - 17
src/kui/components/k-button/k-button.vue

@@ -5,6 +5,7 @@
       { 'k-btn--disabled': disabled || loading },
       { 'k-btn--outline': type === 'outline' },
       { 'k-btn--text': type === 'plain' || type === 'text' || type === 'icon' },
+      className ? className : '',
     ]"
     :open-type="openType"
     :style="[
@@ -33,19 +34,19 @@
           height ||
           (size === 'auto' || type === 'text' || type === 'icon'
             ? 'auto'
-            : '90px'),
-        fontSize: fontSize ? fontSize : type === 'text' ? '30px' : '34px',
+            : pxToVw(90)),
+        fontSize: fontSize ? fontSize : type === 'text' ? pxToVw(30) : pxToVw(34),
         width:
           width ||
           (size === 'auto' || type === 'text' || type === 'icon'
             ? 'auto'
             : size === 'large'
-            ? '420px'
+            ? pxToVw(420)
             : size === 'middle'
-            ? '380px'
+            ? pxToVw(380)
             : size === 'small'
-            ? '330px'
-            : '690px'),
+            ? pxToVw(330)
+            : pxToVw(690)),
         padding: padding ? padding : 'auto',
       },
       activeColor ? { '--k-color-primary-active': activeColor } : {},
@@ -70,11 +71,22 @@
   </button>
 </template>
 
-<script>
-export default {
+<script lang="ts">
+import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer.js';
+import * as Vue from "vue";
+import {pxToVw} from '@/utils/index.js'
+export default Vue.defineComponent({
   name: 'k-button',
+  data() {
+    return {
+      pxToVw
+    }
+  },
   props: {
-    title: String,
+    title: {
+      type: String,
+      default: '',
+    },
     openType: String,
     icon: String,
     opacity: String,
@@ -93,7 +105,7 @@ export default {
     },
     width: {
       type: String,
-      default: '', // 'auto' | '100px'
+      default: '', // 'auto' | '100rpx'
     },
     height: {
       type: String,
@@ -119,22 +131,24 @@ export default {
     status: String, // active | disabled | loading
     activeColor: String,
     disabledColor: String,
+    className: String,
   },
   methods: {
     onClick() {
-      this.$emit('click');
+      $emit(this, 'click');
     },
-    onGetuserinfo(e) {
-      this.$emit('getuserinfo', e);
+    onGetuserinfo(e: any) {
+      $emit(this, 'getuserinfo', e);
     },
-    onGetphonenumber(e) {
-      this.$emit('getphonenumber', e);
+    onGetphonenumber(e: any) {
+      $emit(this, 'getphonenumber', e);
     },
   },
-};
+  emits: ['getuserinfo', 'getphonenumber', 'click'],
+});
 </script>
 
-<style scoped lang="less">
+<style lang="scss" scoped>
 /* stylelint-disable selector-class-pattern */
 /* stylelint-disable declaration-no-important */
 /* stylelint-disable comment-empty-line-before */

+ 1001 - 0
src/kui/components/k-card/k-card-new.vue

@@ -0,0 +1,1001 @@
+<template>
+  <view
+    :class="[
+      'card ',
+      {
+        'card-border-radius': isCircle,
+        'card-border': isBorder,
+        'card-shadow': isShadow,
+        'card-location': type == 'location-card',
+        'card-gap': type == 'gap-card',
+        'card-location-bg': type == 'location-card' && bgFull,
+        'card-opacity': type == 'opacity-card',
+        'text-btn-card-border': type == 'text-btn-card' && isBorder,
+        'image-text-card': type == 'image-text-card',
+      },
+    ]"
+    :style="[
+      themeColor
+        ? {
+            '--k-color-primary-01': themeColor,
+            '--k-color-primary-02': themeColor,
+            '--k-color-primary-03': themeColor,
+            '--k-color-primary-05': themeColor,
+          }
+        : {},
+      { 'background-color': backgroundColor ? backgroundColor : '#fff' },
+    ]"
+  >
+    <view v-if="type == 'image-text-card'">
+      <view class="image-text-card__title">
+        <view class="image-text-card__title__left">
+          <view class="image-text-card__title__left__title">
+            {{title}}
+          </view>
+          <view class="image-text-card__title__left__icon">
+            <view class="image-text-card__title__left__icon__item">
+              <k-icon
+                class="image-text-card__title__left__icon__item__icon"
+                :name="leftIcon.name"
+                :size="leftIcon.size"
+                :color="leftIcon.color"
+              ></k-icon>
+              <view
+                class="image-text-card__title__left__icon__item__label"
+                :style="{
+                  'font-size': leftIcon.labelSize ? leftIcon.labelSize : '16px',
+                }"
+              >{{leftIcon.label}}
+              </view
+              >
+            </view>
+            <view class="image-text-card__title__left__icon__item">
+              <k-icon
+                class="image-text-card__title__left__icon__item__icon"
+                :name="rightIcon.name"
+                :size="rightIcon.size"
+                :color="rightIcon.color"
+              ></k-icon>
+              <view
+                class="image-text-card__title__left__icon__item__label"
+                :style="{
+                  'font-size': rightIcon.labelSize
+                    ? rightIcon.labelSize
+                    : '16px',
+                }"
+              >
+                {{rightIcon.label}}
+              </view
+              >
+            </view>
+          </view>
+        </view>
+        <view v-if="imageSrc" class="image-text-card__title__right">
+          <image :src="imageSrc"/>
+        </view>
+      </view>
+      <view class="image-text-card__content" v-if="contentListData">
+        <view
+          class="image-text-card__content__item"
+          v-for="(item, index) in contentListData"
+          :key="index"
+        >
+          <view class="image-text-card__content__item__left">
+            {{item.label}}
+          </view>
+          <view class="image-text-card__content__item__right">
+            <view :class="item.ellipsis ? ' kui-ellipsis' : ''">
+              {{item.content}}
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    
+    <view v-else-if="type == 'text-btn-card'">
+      <view class="text-btn-card-border__header">
+        <k-tag
+          commercial
+          v-if="tagText"
+          size="middle"
+          class="location-card__tag text-btn-card-border__header__tag"
+        >
+          {{tagText}}
+        </k-tag
+        >
+        <view class="text-btn-card-border__header__content">{{
+            headerContent
+          }}
+        </view>
+        <view class="text-btn-card-border__header__status">{{
+            headerStatus
+          }}
+        </view>
+      </view>
+      <view
+        :class="[
+          'text-btn-card-border__title ',
+          { 'text-btn-card-border__title-bold': titleFontBold },
+        ]"
+      >
+        {{title}}
+      </view>
+      <view class="text-btn-card-border__content-list" v-if="contentListData">
+        <view v-for="(item, index) in contentListData" :key="index">
+          <view
+            class="left-icon__content text-btn-card-border__content-list__item"
+          >
+            <view
+              class="text-btn-card-border__content-list__item__left"
+              :style="{ width: item.labelWidth ? item.labelWidth : '80px' }"
+            >
+              {{item.label}}
+            </view>
+            <view
+              class="text-btn-card-border__content-list__item__right"
+              :style="{
+                width: item.labelWidth
+                  ? 'calc(100% - ' + item.labelWidth + ')'
+                  : 'calc(100% - 80px)',
+              }"
+            >
+              <view :class="item.ellipsis ? 'kui-ellipsis' : ''">
+                {{item.content}}
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view
+        v-if="contentVertical"
+        class="text-btn-card-border__content-vertical"
+      >
+        {{contentVertical}}
+      </view>
+      <view v-if="contentBottom" class="text-btn-card-border__content-bottom">
+        {{contentBottom}}
+      </view>
+      <k-button
+        :class="
+          'text-btn-card-border__btn ' +
+          (btnType == 'outline' ? 'text-btn-card-border__btn-plain-color' : '')
+        "
+        :bgColor="themeColor && btnType != 'outline' ? themeColor : ''"
+        :borderColor="themeColor"
+        v-if="btnText"
+        :type="btnType"
+        @click="clickBtn"
+        :title="btnText"
+        width="110px"
+        height="33px"
+        fontSize="10px"
+        size="middle"
+      >
+      </k-button>
+    </view>
+    
+    <view
+      v-else-if="type == 'function-card' && functionCardData.length > 0"
+      class="function-card"
+    >
+      <view
+        v-bind:key="index"
+        class="function-card__item"
+        v-for="(item, index) in functionCardData"
+        @click="clickIcon(item)"
+      >
+        <view
+          class="function-card__item__icon"
+          :style="{ width: iconSize + 'px' }"
+        >
+          <k-icon :name="item.icon" :size="iconSize" color="#666"></k-icon>
+        </view>
+        <view class="function-card__item__label">{{item.label}}</view>
+      </view>
+    </view>
+    <view v-else-if="type == 'location-card'">
+      <view class="location-card__left">
+        <p class="location-card__left__title">{{title}}</p>
+        <p class="location-card__left__description">{{description}}</p>
+        <!-- <k-tag commercial v-if="!bgFull" size="small" class="location-card__tag">{{tagText}}</k-tag> -->
+        <view
+          :class="
+            'location-card__tag ' +
+            (bgFull ? 'location-card__tag-white' : 'location-card__tag-theme')
+          "
+        >
+          {{tagText}}
+        </view
+        >
+      </view>
+      <view class="location-card__right">
+        <view
+          v-if="commonText"
+          class="location-card__right__common"
+          :class="bgFull ? 'location-card__right__common-full' : ''"
+        >{{commonText}}
+        </view
+        >
+        <view class="location-card__right__text">
+          {{detail}}
+        </view>
+      </view>
+    </view>
+    
+    <view
+      v-else-if="type == 'gap-card'"
+      class="order ext-class"
+      @click.stop="toDetail"
+    >
+      <view class="order-info">
+        <view class="space-name kui-ellipsis">{{title}}</view>
+        <view
+          class="left-icon"
+          v-for="(item, index) in gapCardIconList"
+          :key="index"
+        >
+          <k-icon :name="item.icon" :size="item.size" color="#fff"></k-icon>
+          <text
+            :class="
+              'left-icon__content ' + (item.ellipsis ? 'kui-ellipsis' : '')
+            "
+          >{{item.content}}
+          </text
+          >
+        </view>
+        
+        <view class="status ext-status-class" v-if="tagText">{{
+            tagText
+          }}
+        </view>
+      </view>
+      <view class="deliver"></view>
+      <view class="btn-group">
+        <slot/>
+      </view>
+      <view class="action-group">
+        <view
+          :class="[
+            'text-button',
+            {
+              disabled: leftBtnDisabled,
+            },
+          ]"
+          @click.stop="clickLeftBtn"
+        >{{leftBtnText}}
+        </view
+        >
+        <block>
+          <view class="divider"/>
+          <view
+            :class="[
+              'text-button',
+              {
+                disabled: rightBtnDisabled,
+              },
+            ]"
+            @click.stop="clickRightBtn"
+          >{{rightBtnText}}
+          </view
+          >
+        </block>
+      </view>
+    </view>
+    
+    <!-- <view v-if="type == 'opacity-card' && themeColor" class="card-opacity-bg-opacity"></view> -->
+    <view
+      v-else
+      :class="
+        type == 'opacity-card' && themeColor ? 'card-opacity-bg-opacity' : ''
+      "
+    >
+      <view>
+        <p class="card-opacity__title">{{title}}</p>
+        <p class="card-opacity__description">{{description}}{{' >'}}</p>
+        <view class="card-opacity__btn">
+          <k-button
+            @click="clickBtn"
+            :title="btnText"
+            width="121px"
+            height="33px"
+            fontSize="10px"
+            size="middle"
+            :borderColor="themeColor"
+            :bgColor="themeColor"
+          >
+          </k-button>
+        </view>
+      </view>
+    </view>
+    
+    <!-- <view v-else>
+        <p class="card-opacity__title">{{ title }}</p>
+        <p class="card-opacity__description">{{ description }}{{ ' >' }}</p>
+        <view class="card-opacity__btn">
+          <k-button @click="clickBtn" :title="btnText" width="121px" height="33px" fontSize="10px" size="middle"
+            :borderColor="themeColor" :bgColor="themeColor">
+          </k-button>
+        </view>
+      </view> -->
+  </view>
+</template>
+
+<script lang="ts">
+import {$on, $off, $once, $emit} from '../../utils/gogocodeTransfer';
+import * as Vue from 'vue';
+// import props from './props';
+type PropType = {
+  type:
+    | 'image-text-card'
+    | 'text-btn-card'
+    | 'function-card'
+    | 'location-card'
+    | 'gap-card'
+    | 'opacity-card';
+  btnType: 'default' | 'default' | 'outline' | 'plain' | 'text';
+  bgFull: boolean;
+  title: string;
+  description: string;
+  tagText: string;
+  btnText: string;
+  detail: string;
+  headerContent: string;
+  headerStatus: string;
+  contentVertical: string;
+  contentBottom: string;
+  imageSrc: string;
+  leftIcon: {
+    name: string;
+    color: string;
+    size: number;
+    label: string;
+    labelSize: string;
+  };
+  rightIcon: {
+    name: string;
+    color: string;
+    size: number;
+    label: string;
+    labelSize: string;
+  };
+  titleFontBold: boolean;
+  isCircle: boolean;
+  isBorder: boolean;
+  isShadow: boolean;
+  themeColor: string;
+  backgroundColor: string;
+  functionCardData: Array<{ icon: string; label: string; url: string }>;
+  leftBtnText: string;
+  rightBtnText: string;
+  leftBtnDisabled: boolean;
+  rightBtnDisabled: boolean;
+  gapCardIconList: Array<{
+    icon: string;
+    size: number;
+    content: string;
+    ellipsis: boolean;
+  }>;
+  iconSize: number;
+  contentListData: Array<{
+    icon: string;
+    size: number;
+    label: string;
+    content: string;
+    ellipsis: boolean;
+    labelWidth: string;
+  }>;
+  commonText: string;
+};
+export default Vue.defineComponent({
+  name: 'k-card',
+  props: {
+    type: {
+      type: String,
+      default: 'image-text',
+    },
+    btnType: {
+      type: String,
+      default: 'default',
+    },
+    bgFull: Boolean,
+    title: String,
+    description: String,
+    tagText: String,
+    btnText: String,
+    detail: String,
+    headerContent: String,
+    headerStatus: String,
+    contentVertical: String,
+    contentBottom: String,
+    imageSrc: String,
+    isCircle: Boolean,
+    isBorder: Boolean,
+    isShadow: Boolean,
+    leftBtnText: String,
+    rightBtnText: String,
+    leftBtnDisabled: Boolean,
+    rightBtnDisabled: Boolean,
+    themeColor: {
+      type: String,
+      default: '',
+    },
+    backgroundColor: {
+      type: String,
+      default: '',
+    },
+    functionCardData: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    gapCardIconList: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    iconSize: {
+      type: Number,
+      default: 30,
+    },
+    cardData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    titleFontBold: Boolean,
+    contentListData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    leftIcon: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    rightIcon: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    commonText: String,
+  },
+  data() {
+    return {};
+  },
+  methods: {
+    toDetail() {
+      // eslint-disable-next-line no-console
+      console.log('90909090');
+    },
+    clickIcon(inData: { icon: string; label: string; url: string }) {
+      $emit(this, 'click', inData);
+    },
+    clickBtn(inData: any) {
+      $emit(this, 'click', inData);
+    },
+    clickLeftBtn() {
+      if (!this.leftBtnDisabled) {
+        $emit(this, 'clickLeftBtn');
+      }
+    },
+    clickRightBtn() {
+      if (!this.rightBtnDisabled) {
+        $emit(this, 'clickRightBtn');
+      }
+    },
+  },
+});
+</script>
+
+<style lang="scss" scoped>
+/* stylelint-disable selector-class-pattern */
+/* stylelint-disable declaration-no-important */
+/* stylelint-disable comment-empty-line-before */
+.card {
+  background: #fff;
+  padding: 20px;
+  width: calc(100% - 38px);
+  margin: 10px auto;
+}
+
+.card-shadow {
+  box-shadow: 0 0 20px 0 #e8eaf3;
+}
+
+.card-border {
+  border: 1px solid var(--k-color-primary-01, #333);
+}
+
+.card-border-radius {
+  border-radius: 8px;
+}
+
+.function-card {
+  width: 100%;
+}
+
+.function-card__item {
+  display: inline-block;
+  width: 25%;
+}
+
+.function-card__item__icon {
+  margin: 8px auto;
+}
+
+.function-card__item__label {
+  font-size: 12px;
+  text-align: center;
+  color: #333;
+}
+
+.card-location-bg {
+  background: var(--k-color-primary-01, #333) !important;
+  color: #fff !important;
+  
+  .location-card__left__title,
+  .location-card__left__description,
+  .location-card__right__text {
+    color: #fff !important;
+  }
+}
+
+.card-location {
+  padding-bottom: 10px;
+  display: flex;
+  position: relative;
+  
+  .location-card__left {
+    width: 217px;
+    display: inline-block;
+    
+    .location-card__left__title {
+      font-size: 17px;
+      color: #333;
+      margin-bottom: 5px;
+    }
+    
+    .location-card__left__description {
+      font-size: 14px;
+      color: #666;
+    }
+    
+    .location-card__tag {
+      display: inline-block;
+      color: #fff;
+      height: 15px;
+      line-height: 15px;
+      border-radius: 7.5px;
+      font-size: 12px;
+      padding: 0 6px;
+    }
+    
+    .location-card__tag-theme {
+      border: 1px solid var(--k-color-primary-01, #333);
+      background: var(--k-color-primary-01, #333);
+    }
+    
+    .location-card__tag-white {
+      border: 1px solid #fff;
+      background: rgba(0, 0, 0, 0);
+    }
+  }
+  
+  .location-card__right {
+    width: 55px;
+    display: inline-block;
+    position: absolute;
+    right: 20px;
+    top: 20px;
+    font-size: 11px;
+    color: #999;
+    height: calc(100% - 35px);
+    padding-left: 17px;
+    margin-left: 5px;
+    border-left: 1px dashed #979797;
+    
+    .location-card__right__common {
+      width: auto;
+      height: 15px;
+      border-top-right-radius: 8px;
+      position: absolute;
+      right: -21px;
+      top: -20px;
+      background-color: var(--k-color-primary-01, #333);
+      color: #fff;
+      font-weight: 400;
+      font-size: 9px;
+      padding: 3px 6px;
+      line-height: 15px;
+    }
+    
+    .location-card__right__common-full {
+      background: var(--k-color-primary-02, #333);
+    }
+    
+    .location-card__right__text {
+      display: inline-block;
+      position: relative;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+  }
+}
+
+.card-opacity {
+  min-height: 135px;
+  text-align: center;
+  background: var(--k-color-primary-05, #333) !important;
+  border: 1px dashed var(--k-color-primary-01, #333);
+  border-radius: 4px;
+  position: relative;
+  
+  .card-opacity__title {
+    font-size: 20px;
+    color: #000;
+    text-align: center;
+    margin-top: 15px;
+    margin-bottom: 10px;
+  }
+  
+  .card-opacity__description {
+    font-size: 15px;
+    color: #333;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  
+  .card-opacity__btn {
+    margin: 0 auto;
+  }
+}
+
+.card-opacity-bg-opacity {
+  background: rgba(255, 255, 255, 0.5);
+  width: calc(100% - 2px);
+  height: calc(100% - 42px);
+  position: absolute;
+  top: 1px;
+  left: 1px;
+  border-radius: 4px;
+  padding: 20px 0;
+}
+
+.order {
+  position: relative;
+  width: 100%;
+  margin: 0 auto;
+  border-radius: 2px;
+  // box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+  color: #fff;
+  display: inline-block;
+}
+
+.bg {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+}
+
+.order-info {
+  position: relative;
+  border-radius: 3px 3px 0 0;
+  background: var(--k-color-primary-01, #333);
+  box-sizing: border-box;
+  padding: 18px 10px 20px 20px;
+  
+  &::before {
+    content: '';
+    display: inline-block;
+    position: absolute;
+    bottom: -1px;
+    left: -1px;
+    z-index: 2;
+    width: 0;
+    height: 0;
+    border-bottom: 6px solid #fff;
+    border-right: 6px solid transparent;
+  }
+  
+  &::after {
+    content: '';
+    display: inline-block;
+    position: absolute;
+    bottom: -1px;
+    right: -1px;
+    z-index: 2;
+    width: 0;
+    height: 0;
+    border-bottom: 6px solid #fff;
+    border-left: 6px solid transparent;
+  }
+}
+
+.left-icon {
+  display: flex;
+  align-items: flex-start;
+  font-size: 14px;
+  margin-top: 3px;
+  
+  .left-icon__content {
+    position: relative;
+    top: -3px;
+    margin-left: 8px;
+  }
+}
+
+.space {
+  height: 21px;
+}
+
+.icon {
+  margin-right: 6px;
+  flex: none;
+  position: relative;
+  top: -2px;
+}
+
+.space-name {
+  margin-bottom: 10px;
+  font-size: 25px;
+}
+
+.deliver {
+  height: 1px;
+  width: calc(100% - 8px);
+  background: var(--k-color-primary-02, #333);
+  // transform: scale(0.5);
+  position: relative;
+  left: -8px;
+  margin-left: 12px;
+}
+
+.status {
+  position: absolute;
+  right: 7px;
+  top: 11px;
+  padding: 3px 16px;
+  line-height: 16px;
+  background: var(--k-color-primary-02, #333);
+  border-radius: 12px;
+  font-size: 12px;
+}
+
+.text-button {
+  width: 160px;
+  height: 38px;
+  margin: 0 auto;
+  line-height: 38px;
+  text-align: center;
+  color: #fff;
+  
+  .disabled {
+    opacity: 0.2;
+  }
+}
+
+.card-gap {
+  padding: 0;
+}
+
+.action-group {
+  display: flex;
+  position: relative;
+  background: var(--k-color-primary-01, #333);
+  background-size: 100% 100%;
+  background-repeat: no-repeat;
+  border-radius: 0 0 3px 3px;
+  height: 38px;
+  font-size: 17px;
+  
+  &::before {
+    content: '';
+    display: inline-block;
+    position: absolute;
+    left: -1px;
+    top: -1px;
+    z-index: 2;
+    width: 0;
+    height: 0;
+    border-top: 6px solid #fff;
+    border-right: 6px solid transparent;
+  }
+  
+  &::after {
+    content: '';
+    display: inline-block;
+    position: absolute;
+    top: -1px;
+    right: -1px;
+    z-index: 2;
+    width: 0;
+    height: 0;
+    border-top: 6px solid #fff;
+    border-left: 6px solid transparent;
+  }
+}
+
+.divider {
+  width: 1px;
+  height: 20px;
+  margin-top: 9px;
+  background-color: #fff;
+}
+
+.text-btn-card-border {
+  border: 1px solid #e1e2e8;
+  padding: 15px 16px 25px 15px;
+  position: relative;
+  
+  &__header {
+    position: relative;
+    
+    &__tag {
+      margin-right: 10px;
+    }
+    
+    &__content {
+      display: inline-block;
+      color: #999;
+      font-size: 15px;
+    }
+    
+    &__status {
+      position: absolute;
+      right: 6px;
+      top: 0;
+      font-size: 15px;
+      color: var(--k-color-primary-01, #333);
+    }
+  }
+  
+  &__title {
+    font-size: 18px;
+    color: #333;
+    margin-top: 16px;
+    
+    &-bold {
+      font-weight: 600;
+    }
+  }
+  
+  &__content-list {
+    &__item {
+      font-size: 15px;
+      color: #999;
+      margin-top: 8px;
+      display: flex;
+      flex-wrap: nowrap;
+      width: 100%;
+      
+      &__left {
+        display: flex;
+      }
+      
+      &__right {
+        display: flex;
+        text-align: left;
+      }
+    }
+  }
+  
+  &__btn {
+    position: absolute;
+    bottom: 20px;
+    right: 15px;
+  }
+  
+  &__btn-plain-color {
+    color: var(--k-color-primary-01, #333) !important;
+  }
+  
+  &__content-vertical {
+    color: #0c0c0c;
+    font-size: 17px;
+    margin-top: 5px;
+  }
+  
+  &__content-bottom {
+    color: #0c0c0c;
+    font-size: 17px;
+    height: 33px;
+    line-height: 33px;
+    margin-top: 20px;
+    position: relative;
+    top: 5px;
+  }
+}
+
+.image-text-card {
+  padding: 20px 15px;
+  
+  &__title {
+    position: relative;
+    margin-bottom: 20px;
+    
+    &__left {
+      width: 170px;
+      height: 100px;
+      
+      &__title {
+        font-size: 22px;
+        color: #0e0e0e;
+        font-weight: 600;
+        margin-bottom: 20px;
+      }
+      
+      &__icon {
+        &__item {
+          display: inline-block;
+          width: 50%;
+          
+          &__label {
+            color: #808080;
+            margin-left: 10px;
+            display: inline-block;
+          }
+          
+          &__icon {
+            display: inline-block;
+          }
+        }
+      }
+    }
+    
+    &__right {
+      display: inline-block;
+      width: 130px;
+      height: 100px;
+      overflow: hidden;
+      position: absolute;
+      top: 0;
+      right: 0;
+      
+      image {
+        width: 100%;
+        height: 100px;
+      }
+    }
+  }
+  
+  &__content {
+    width: 100%;
+    
+    &__item {
+      margin-bottom: 8px;
+      flex-wrap: nowrap;
+      display: flex;
+      width: 100%;
+      
+      &__left {
+        font-size: 16px;
+        color: #1e1e1e;
+        width: 80px;
+        display: flex;
+        align-items: flex-start;
+        direction: nowrap;
+      }
+      
+      &__right {
+        font-size: 16px;
+        color: #808080;
+        width: calc(100% - 80px);
+        display: flex;
+        direction: nowrap;
+        justify-content: flex-end;
+        text-align: right;
+        line-height: 20px;
+      }
+    }
+  }
+}
+</style>

+ 261 - 111
src/kui/components/k-card/k-card.vue

@@ -30,7 +30,7 @@
       <div class="image-text-card__title">
         <div class="image-text-card__title__left">
           <div class="image-text-card__title__left__title">
-            {{ title }}
+            {{title}}
           </div>
           <div class="image-text-card__title__left__icon">
             <div class="image-text-card__title__left__icon__item">
@@ -45,7 +45,8 @@
                 :style="{
                   'font-size': leftIcon.labelSize ? leftIcon.labelSize : '16px',
                 }"
-                >{{ leftIcon.label }}</div
+              >{{leftIcon.label}}
+              </div
               >
             </div>
             <div class="image-text-card__title__left__icon__item">
@@ -63,13 +64,14 @@
                     : '16px',
                 }"
               >
-                {{ rightIcon.label }}</div
+                {{rightIcon.label}}
+              </div
               >
             </div>
           </div>
         </div>
         <div v-if="imageSrc" class="image-text-card__title__right">
-          <img :src="imageSrc" />
+          <image :src="imageSrc"/>
         </div>
       </div>
       <div class="image-text-card__content" v-if="contentListData">
@@ -79,17 +81,17 @@
           :key="index"
         >
           <div class="image-text-card__content__item__left">
-            {{ item.label }}
+            {{item.label}}
           </div>
           <div class="image-text-card__content__item__right">
             <div :class="item.ellipsis ? ' kui-ellipsis' : ''">
-              {{ item.content }}
+              {{item.content}}
             </div>
           </div>
         </div>
       </div>
     </div>
-
+    
     <div v-else-if="type == 'text-btn-card'">
       <div class="text-btn-card-border__header">
         <k-tag
@@ -98,14 +100,17 @@
           size="middle"
           class="location-card__tag text-btn-card-border__header__tag"
         >
-          {{ tagText }}</k-tag
+          {{tagText}}
+        </k-tag
         >
         <div class="text-btn-card-border__header__content">{{
-          headerContent
-        }}</div>
+            headerContent
+          }}
+        </div>
         <div class="text-btn-card-border__header__status">{{
-          headerStatus
-        }}</div>
+            headerStatus
+          }}
+        </div>
       </div>
       <div
         :class="[
@@ -113,7 +118,7 @@
           { 'text-btn-card-border__title-bold': titleFontBold },
         ]"
       >
-        {{ title }}
+        {{title}}
       </div>
       <div class="text-btn-card-border__content-list" v-if="contentListData">
         <div v-for="(item, index) in contentListData" :key="index">
@@ -124,7 +129,7 @@
               class="text-btn-card-border__content-list__item__left"
               :style="{ width: item.labelWidth ? item.labelWidth : '80px' }"
             >
-              {{ item.label }}
+              {{item.label}}
             </div>
             <div
               class="text-btn-card-border__content-list__item__right"
@@ -135,7 +140,7 @@
               }"
             >
               <div :class="item.ellipsis ? 'kui-ellipsis' : ''">
-                {{ item.content }}
+                {{item.content}}
               </div>
             </div>
           </div>
@@ -145,10 +150,10 @@
         v-if="contentVertical"
         class="text-btn-card-border__content-vertical"
       >
-        {{ contentVertical }}
+        {{contentVertical}}
       </div>
       <div v-if="contentBottom" class="text-btn-card-border__content-bottom">
-        {{ contentBottom }}
+        {{contentBottom}}
       </div>
       <k-button
         :class="
@@ -168,15 +173,15 @@
       >
       </k-button>
     </div>
-
+    
     <div
       v-else-if="type == 'function-card' && functionCardData.length > 0"
       class="function-card"
     >
       <div
+        v-bind:key="index"
         class="function-card__item"
         v-for="(item, index) in functionCardData"
-        v-bind:key="index"
         @click="clickIcon(item)"
       >
         <div
@@ -185,13 +190,13 @@
         >
           <k-icon :name="item.icon" :size="iconSize" color="#666"></k-icon>
         </div>
-        <div class="function-card__item__label">{{ item.label }}</div>
+        <div class="function-card__item__label">{{item.label}}</div>
       </div>
     </div>
     <div v-else-if="type == 'location-card'">
       <div class="location-card__left">
-        <p class="location-card__left__title">{{ title }}</p>
-        <p class="location-card__left__description">{{ description }}</p>
+        <p class="location-card__left__title">{{title}}</p>
+        <p class="location-card__left__description">{{description}}</p>
         <!-- <k-tag commercial v-if="!bgFull" size="small" class="location-card__tag">{{tagText}}</k-tag> -->
         <div
           :class="
@@ -199,7 +204,8 @@
             (bgFull ? 'location-card__tag-white' : 'location-card__tag-theme')
           "
         >
-          {{ tagText }}</div
+          {{tagText}}
+        </div
         >
       </div>
       <div class="location-card__right">
@@ -207,21 +213,22 @@
           v-if="commonText"
           class="location-card__right__common"
           :class="bgFull ? 'location-card__right__common-full' : ''"
-          >{{ commonText }}</div
+        >{{commonText}}
+        </div
         >
         <div class="location-card__right__text">
-          {{ detail }}
+          {{detail}}
         </div>
       </div>
     </div>
-
+    
     <div
       v-else-if="type == 'gap-card'"
       class="order ext-class"
       @click.stop="toDetail"
     >
       <div class="order-info">
-        <div class="space-name kui-ellipsis">{{ title }}</div>
+        <div class="space-name kui-ellipsis">{{title}}</div>
         <div
           class="left-icon"
           v-for="(item, index) in gapCardIconList"
@@ -232,17 +239,19 @@
             :class="
               'left-icon__content ' + (item.ellipsis ? 'kui-ellipsis' : '')
             "
-            >{{ item.content }}</text
+          >{{item.content}}
+          </text
           >
         </div>
-
+        
         <div class="status ext-status-class" v-if="tagText">{{
-          tagText
-        }}</div>
+            tagText
+          }}
+        </div>
       </div>
       <div class="deliver"></div>
       <div class="btn-group">
-        <slot />
+        <slot/>
       </div>
       <div class="action-group">
         <div
@@ -253,10 +262,11 @@
             },
           ]"
           @click.stop="clickLeftBtn"
-          >{{ leftBtnText }}</div
+        >{{leftBtnText}}
+        </div
         >
         <block>
-          <div class="divider" />
+          <div class="divider"/>
           <div
             :class="[
               'text-button',
@@ -265,12 +275,13 @@
               },
             ]"
             @click.stop="clickRightBtn"
-            >{{ rightBtnText }}</div
+          >{{rightBtnText}}
+          </div
           >
         </block>
       </div>
     </div>
-
+    
     <!-- <div v-if="type == 'opacity-card' && themeColor" class="card-opacity-bg-opacity"></div> -->
     <div
       v-else
@@ -279,8 +290,8 @@
       "
     >
       <div>
-        <p class="card-opacity__title">{{ title }}</p>
-        <p class="card-opacity__description">{{ description }}{{ ' >' }}</p>
+        <p class="card-opacity__title">{{title}}</p>
+        <p class="card-opacity__description">{{description}}{{' >'}}</p>
         <div class="card-opacity__btn">
           <k-button
             @click="clickBtn"
@@ -296,26 +307,165 @@
         </div>
       </div>
     </div>
-
+    
     <!-- <div v-else>
-      <p class="card-opacity__title">{{ title }}</p>
-      <p class="card-opacity__description">{{ description }}{{ ' >' }}</p>
-      <div class="card-opacity__btn">
-        <k-button @click="clickBtn" :title="btnText" width="121px" height="33px" fontSize="10px" size="middle"
-          :borderColor="themeColor" :bgColor="themeColor">
-        </k-button>
-      </div>
-    </div> -->
+        <p class="card-opacity__title">{{ title }}</p>
+        <p class="card-opacity__description">{{ description }}{{ ' >' }}</p>
+        <div class="card-opacity__btn">
+          <k-button @click="clickBtn" :title="btnText" width="121px" height="33px" fontSize="10px" size="middle"
+            :borderColor="themeColor" :bgColor="themeColor">
+          </k-button>
+        </div>
+      </div> -->
   </div>
 </template>
 
-<script>
-import Vue, { VueConstructor } from 'vue';
-import props from './props';
-
-export default {
+<script lang="ts">
+import {$on, $off, $once, $emit} from '../../utils/gogocodeTransfer.js';
+import * as Vue from 'vue';
+// import props from './props';
+type PropType = {
+  type:
+    | 'image-text-card'
+    | 'text-btn-card'
+    | 'function-card'
+    | 'location-card'
+    | 'gap-card'
+    | 'opacity-card';
+  btnType: 'default' | 'default' | 'outline' | 'plain' | 'text';
+  bgFull: boolean;
+  title: string;
+  description: string;
+  tagText: string;
+  btnText: string;
+  detail: string;
+  headerContent: string;
+  headerStatus: string;
+  contentVertical: string;
+  contentBottom: string;
+  imageSrc: string;
+  leftIcon: {
+    name: string;
+    color: string;
+    size: number;
+    label: string;
+    labelSize: string;
+  };
+  rightIcon: {
+    name: string;
+    color: string;
+    size: number;
+    label: string;
+    labelSize: string;
+  };
+  titleFontBold: boolean;
+  isCircle: boolean;
+  isBorder: boolean;
+  isShadow: boolean;
+  themeColor: string;
+  backgroundColor: string;
+  functionCardData: Array<{ icon: string; label: string; url: string }>;
+  leftBtnText: string;
+  rightBtnText: string;
+  leftBtnDisabled: boolean;
+  rightBtnDisabled: boolean;
+  gapCardIconList: Array<{
+    icon: string;
+    size: number;
+    content: string;
+    ellipsis: boolean;
+  }>;
+  iconSize: number;
+  contentListData: Array<{
+    icon: string;
+    size: number;
+    label: string;
+    content: string;
+    ellipsis: boolean;
+    labelWidth: string;
+  }>;
+  commonText: string;
+};
+export default Vue.defineComponent({
   name: 'k-card',
-  mixins: [props],
+  props: {
+    type: {
+      type: String,
+      default: 'image-text',
+    },
+    btnType: {
+      type: String,
+      default: 'default',
+    },
+    bgFull: Boolean,
+    title: String,
+    description: String,
+    tagText: String,
+    btnText: String,
+    detail: String,
+    headerContent: String,
+    headerStatus: String,
+    contentVertical: String,
+    contentBottom: String,
+    imageSrc: String,
+    isCircle: Boolean,
+    isBorder: Boolean,
+    isShadow: Boolean,
+    leftBtnText: String,
+    rightBtnText: String,
+    leftBtnDisabled: Boolean,
+    rightBtnDisabled: Boolean,
+    themeColor: {
+      type: String,
+      default: '',
+    },
+    backgroundColor: {
+      type: String,
+      default: '',
+    },
+    functionCardData: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    gapCardIconList: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    iconSize: {
+      type: Number,
+      default: 30,
+    },
+    cardData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    titleFontBold: Boolean,
+    contentListData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    leftIcon: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    rightIcon: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    commonText: String,
+  },
   data() {
     return {};
   },
@@ -324,27 +474,27 @@ export default {
       // eslint-disable-next-line no-console
       console.log('90909090');
     },
-    clickIcon(inData) {
-      this.$emit('click', inData);
+    clickIcon(inData: { icon: string; label: string; url: string }) {
+      $emit(this, 'click', inData);
     },
-    clickBtn(inData) {
-      this.$emit('click', inData);
+    clickBtn(inData: any) {
+      $emit(this, 'click', inData);
     },
     clickLeftBtn() {
       if (!this.leftBtnDisabled) {
-        this.$emit('clickLeftBtn');
+        $emit(this, 'clickLeftBtn');
       }
     },
     clickRightBtn() {
       if (!this.rightBtnDisabled) {
-        this.$emit('clickRightBtn');
+        $emit(this, 'clickRightBtn');
       }
     },
   },
-};
+});
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 /* stylelint-disable selector-class-pattern */
 /* stylelint-disable declaration-no-important */
 /* stylelint-disable comment-empty-line-before */
@@ -389,7 +539,7 @@ export default {
 .card-location-bg {
   background: var(--k-color-primary-01, #333) !important;
   color: #fff !important;
-
+  
   .location-card__left__title,
   .location-card__left__description,
   .location-card__right__text {
@@ -401,22 +551,22 @@ export default {
   padding-bottom: 10px;
   display: flex;
   position: relative;
-
+  
   .location-card__left {
     width: 217px;
     display: inline-block;
-
+    
     .location-card__left__title {
       font-size: 17px;
       color: #333;
       margin-bottom: 5px;
     }
-
+    
     .location-card__left__description {
       font-size: 14px;
       color: #666;
     }
-
+    
     .location-card__tag {
       display: inline-block;
       color: #fff;
@@ -426,18 +576,18 @@ export default {
       font-size: 12px;
       padding: 0 6px;
     }
-
+    
     .location-card__tag-theme {
       border: 1px solid var(--k-color-primary-01, #333);
       background: var(--k-color-primary-01, #333);
     }
-
+    
     .location-card__tag-white {
       border: 1px solid #fff;
       background: rgba(0, 0, 0, 0);
     }
   }
-
+  
   .location-card__right {
     width: 55px;
     display: inline-block;
@@ -450,7 +600,7 @@ export default {
     padding-left: 17px;
     margin-left: 5px;
     border-left: 1px dashed #979797;
-
+    
     .location-card__right__common {
       width: auto;
       height: 15px;
@@ -465,11 +615,11 @@ export default {
       padding: 3px 6px;
       line-height: 15px;
     }
-
+    
     .location-card__right__common-full {
       background: var(--k-color-primary-02, #333);
     }
-
+    
     .location-card__right__text {
       display: inline-block;
       position: relative;
@@ -486,7 +636,7 @@ export default {
   border: 1px dashed var(--k-color-primary-01, #333);
   border-radius: 4px;
   position: relative;
-
+  
   .card-opacity__title {
     font-size: 20px;
     color: #000;
@@ -494,14 +644,14 @@ export default {
     margin-top: 15px;
     margin-bottom: 10px;
   }
-
+  
   .card-opacity__description {
     font-size: 15px;
     color: #333;
     text-align: center;
     margin-bottom: 10px;
   }
-
+  
   .card-opacity__btn {
     margin: 0 auto;
   }
@@ -542,9 +692,9 @@ export default {
   background: var(--k-color-primary-01, #333);
   box-sizing: border-box;
   padding: 18px 10px 20px 20px;
-
+  
   &::before {
-    content: "";
+    content: '';
     display: inline-block;
     position: absolute;
     bottom: -1px;
@@ -555,9 +705,9 @@ export default {
     border-bottom: 6px solid #fff;
     border-right: 6px solid transparent;
   }
-
+  
   &::after {
-    content: "";
+    content: '';
     display: inline-block;
     position: absolute;
     bottom: -1px;
@@ -575,7 +725,7 @@ export default {
   align-items: flex-start;
   font-size: 14px;
   margin-top: 3px;
-
+  
   .left-icon__content {
     position: relative;
     top: -3px;
@@ -627,7 +777,7 @@ export default {
   line-height: 38px;
   text-align: center;
   color: #fff;
-
+  
   .disabled {
     opacity: 0.2;
   }
@@ -646,9 +796,9 @@ export default {
   border-radius: 0 0 3px 3px;
   height: 38px;
   font-size: 17px;
-
+  
   &::before {
-    content: "";
+    content: '';
     display: inline-block;
     position: absolute;
     left: -1px;
@@ -659,9 +809,9 @@ export default {
     border-top: 6px solid #fff;
     border-right: 6px solid transparent;
   }
-
+  
   &::after {
-    content: "";
+    content: '';
     display: inline-block;
     position: absolute;
     top: -1px;
@@ -685,20 +835,20 @@ export default {
   border: 1px solid #e1e2e8;
   padding: 15px 16px 25px 15px;
   position: relative;
-
+  
   &__header {
     position: relative;
-
+    
     &__tag {
       margin-right: 10px;
     }
-
+    
     &__content {
       display: inline-block;
       color: #999;
       font-size: 15px;
     }
-
+    
     &__status {
       position: absolute;
       right: 6px;
@@ -707,17 +857,17 @@ export default {
       color: var(--k-color-primary-01, #333);
     }
   }
-
+  
   &__title {
     font-size: 18px;
     color: #333;
     margin-top: 16px;
-
+    
     &-bold {
       font-weight: 600;
     }
   }
-
+  
   &__content-list {
     &__item {
       font-size: 15px;
@@ -726,34 +876,34 @@ export default {
       display: flex;
       flex-wrap: nowrap;
       width: 100%;
-
+      
       &__left {
         display: flex;
       }
-
+      
       &__right {
         display: flex;
         text-align: left;
       }
     }
   }
-
+  
   &__btn {
     position: absolute;
     bottom: 20px;
     right: 15px;
   }
-
+  
   &__btn-plain-color {
     color: var(--k-color-primary-01, #333) !important;
   }
-
+  
   &__content-vertical {
     color: #0c0c0c;
     font-size: 17px;
     margin-top: 5px;
   }
-
+  
   &__content-bottom {
     color: #0c0c0c;
     font-size: 17px;
@@ -767,40 +917,40 @@ export default {
 
 .image-text-card {
   padding: 20px 15px;
-
+  
   &__title {
     position: relative;
     margin-bottom: 20px;
-
+    
     &__left {
       width: 170px;
       height: 100px;
-
+      
       &__title {
         font-size: 22px;
         color: #0e0e0e;
         font-weight: 600;
         margin-bottom: 20px;
       }
-
+      
       &__icon {
         &__item {
           display: inline-block;
           width: 50%;
-
+          
           &__label {
             color: #808080;
             margin-left: 10px;
             display: inline-block;
           }
-
+          
           &__icon {
             display: inline-block;
           }
         }
       }
     }
-
+    
     &__right {
       display: inline-block;
       width: 130px;
@@ -809,23 +959,23 @@ export default {
       position: absolute;
       top: 0;
       right: 0;
-
-      img {
+      
+      image {
         width: 100%;
         height: 100px;
       }
     }
   }
-
+  
   &__content {
     width: 100%;
-
+    
     &__item {
       margin-bottom: 8px;
       flex-wrap: nowrap;
       display: flex;
       width: 100%;
-
+      
       &__left {
         font-size: 16px;
         color: #1e1e1e;
@@ -834,7 +984,7 @@ export default {
         align-items: flex-start;
         direction: nowrap;
       }
-
+      
       &__right {
         font-size: 16px;
         color: #808080;

+ 156 - 0
src/kui/theme/theme.less

@@ -0,0 +1,156 @@
+/* stylelint-disable comment-empty-line-before */
+
+/* #ifndef APP-NVUE */
+/* 默认主题 */
+:root {
+  /* 行为相关颜色 */
+  --k-color-primary: #064c8a;
+  --k-color-success: #09be4f;
+  --k-color-warning: #ffb703;
+  --k-color-danger: #ff2b2b;
+  --k-color-purple: #6831ff;
+
+  /* 文字基本颜色、其他辅助色 */
+  /* 用于重量级文字信息、标题 */
+  --k-color-title: #181818;
+  /* 用于普通级段落信息、引导词 */
+  --k-color-section: #333;
+  /* 用于次要标题内容 */
+  --k-color-subtitle: #7f7f7f;
+  /* 用于底部标签、描述、次要文字信息 */
+  --k-color-label: #b2b2b2;
+  /* 用于辅助、次要信息、禁用文字等。如:待输入状态描述文字,已点击按钮文字 */
+  --k-color-minor: #ccc;
+  --k-color-white: #fff;
+  /* 链接颜色 */
+  --k-color-link: #465cff;
+  /* 背景颜色 */
+  --k-bg-color: #fff;
+  /* 页面背景底色 */
+  --k-bg-color-grey: #f1f4fa;
+  /* 内容模块底色 */
+  --k-bg-color-content: #f8f8f8;
+  --k-bg-color-red: rgba(255, 43, 43, 0.05);
+  --k-bg-color-yellow: rgba(255, 183, 3, 0.1);
+  --k-bg-color-purple: rgba(104, 49, 255, 0.05);
+  --k-bg-color-green: rgba(9, 190, 79, 0.05);
+
+  --k-bg-color-brown: rgba(92, 92, 92, 1);
+  --k-bg-color-deep-brown: rgba(51, 51, 51, 1);
+  --k-bg-color-hollow-brown: rgba(230, 237, 244, 1);
+  --k-bg-color-blue: rgba(56, 112, 162, 1);
+  --k-bg-color-deep-blue: rgba(6, 76, 138, 1);
+  --k-bg-color-hollow-blue: rgba(230, 237, 244, 1);
+  --k-bg-color-orange: rgba(211, 141, 94, 1);
+  --k-bg-color-deep-orange: rgba(200, 112, 53, 1);
+  --k-bg-color-hollow-orange: rgba(250, 241, 235, 1);
+  --k-bg-color-purple: rgba(131, 111, 148, 1);
+  --k-bg-color-deep-purple: rgba(100, 74, 121, 1);
+  --k-bg-color-hollow-purple: rgba(240, 237, 242, 1);
+
+  /* 点击背景色 */
+  --k-bg-color-hover: rgba(0, 0, 0, 0.2);
+  /* 遮罩颜色 */
+  --k-bg-color-mask: rgba(0, 0, 0, 0.6);
+
+  /* 边框颜色 */
+  --k-color-border: #eee;
+
+  /* 阴影颜色 */
+  --k-color-shadow: rgba(2, 4, 38, 0.05);
+
+  /* 按钮按压状态颜色 */
+  --k-color-primary-active: #6a94b9;
+
+  /* 按钮禁用状态颜色 */
+  --k-color-primary-disabled: #cedce8;
+
+  /* 禁用态的透明度 */
+  --k-opacity-disabled: 0.5;
+
+  /* 图标尺寸 */
+  --k-img-size-sm: 48rpx;
+  --k-img-size-base: 56rpx;
+  --k-img-size-middle: 64rpx;
+  --k-img-size-lg: 96rpx;
+
+  /* 图片尺寸 */
+  --k-img-sm: 60rpx;
+  --k-img-base: 120rpx;
+  --k-img-lg: 240rpx;
+
+  /* Border Radius */
+  --k-border-radius-sm: 16rpx;
+  --k-border-radius-base: 24rpx;
+  --k-border-radius-lg: 48rpx;
+  --k-border-radius-circle: 50%;
+
+  /* 水平间距 */
+  --k-spacing-row-sm: 16rpx;
+  --k-spacing-row-base: 24rpx;
+  --k-spacing-row-lg: 32rpx;
+
+  /* 垂直间距 */
+  --k-spacing-col-sm: 8rpx;
+  --k-spacing-col-base: 16rpx;
+  --k-spacing-col-lg: 24rpx;
+
+  /* 主题色(临时名字,后面统一改) */
+  --k-color-primary-01: #064c8a; /* 对应色值表第一行 */
+  --k-color-primary-02: #3971a2; /* 对应色值表第二行 */
+  --k-color-primary-03: #6a94b9; /* 对应色值表第三行 */
+  --k-color-primary-04: #9bb7d0; /* 对应色值表第四行 */
+  --k-color-primary-05: #cedce8; /* 对应色值表第五行 */
+  --k-color-primary-06: #e6edf4; /* 对应色值表第六行 */
+  /* 中性色,不区分业态(临时名字,后面统一改) */
+  --k-color-neutral-01: #333;
+  --k-color-neutral-02: #666;
+  --k-color-neutral-03: #999;
+  --k-color-neutral-04: #f4f7ff;
+  --k-color-neutral-05: #fbfcff;
+  --k-color-neutral-06: #fff;
+}
+
+/* 定制主题 */
+.theme-office {
+  --k-color-primary: #064c8a; /* 对应色值表第一行 */
+  --k-color-primary-active: #6a94b9; /* 对应色值表第三行 */
+  --k-color-primary-disabled: #cedce8; /* 对应色值表第五行 */
+  --k-color-primary-01: #064c8a; /* 对应色值表第一行 */
+  --k-color-primary-02: #3971a2; /* 对应色值表第二行 */
+  --k-color-primary-03: #6a94b9; /* 对应色值表第三行 */
+  --k-color-primary-04: #9bb7d0; /* 对应色值表第四行 */
+  --k-color-primary-05: #cedce8; /* 对应色值表第五行 */
+  --k-color-primary-06: #e6edf4; /* 对应色值表第六行 */
+}
+
+.theme-apartment {
+  --k-color-primary: #c87035;
+  --k-color-primary-active: #deaa86;
+  --k-color-primary-disabled: #f4e3d7;
+  --k-color-primary-01: #c87035; /* 对应色值表第一行 */
+  --k-color-primary-02: #d48e5f; /* 对应色值表第二行 */
+  --k-color-primary-03: #deaa86; /* 对应色值表第三行 */
+  --k-color-primary-04: #e9c6ae; /* 对应色值表第四行 */
+  --k-color-primary-05: #f4e3d7; /* 对应色值表第五行 */
+  --k-color-primary-06: #faf1eb; /* 对应色值表第六行 */
+}
+
+.theme-mall {
+  --k-color-primary: #644a79;
+  --k-color-primary-active: #a293af;
+  --k-color-primary-disabled: #e0dbe5;
+  --k-color-primary-01: #644a79; /* 对应色值表第一行 */
+  --k-color-primary-02: #846f95; /* 对应色值表第二行 */
+  --k-color-primary-03: #a293af; /* 对应色值表第三行 */
+  --k-color-primary-04: #c1b6c9; /* 对应色值表第四行 */
+  --k-color-primary-05: #e0dbe5; /* 对应色值表第五行 */
+  --k-color-primary-06: #f0eff2; /* 对应色值表第六行 */
+}
+/* #endif */
+
+.kui-ellipsis {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}

+ 77 - 0
src/kui/utils/gogocodeTransfer.js

@@ -0,0 +1,77 @@
+const eventRegistryMap = new WeakMap();
+function getRegistry(instance) {
+  let events = eventRegistryMap.get(instance);
+  if (!events) {
+    eventRegistryMap.set(instance, (events = Object.create(null)));
+  }
+  return events;
+}
+export function $on(instance, event, fn) {
+  if (Array.isArray(event)) {
+    event.forEach((e) => $on(instance, e, fn));
+  } else {
+    const events = getRegistry(instance);
+    (events[event] || (events[event] = [])).push(fn);
+  }
+  return instance;
+}
+export function $once(instance, event, fn) {
+  const wrapped = (...args) => {
+    $off(instance, event, wrapped);
+    fn.call(instance, ...args);
+  };
+  wrapped.fn = fn;
+  $on(instance, event, wrapped);
+  return instance;
+}
+export function $off(instance, event, fn) {
+  const vm = instance;
+  // all
+  if (!event) {
+    eventRegistryMap.set(instance, Object.create(null));
+    return vm;
+  }
+  // array of events
+  if (Array.isArray(event)) {
+    event.forEach((e) => $off(instance, e, fn));
+    return vm;
+  }
+  // specific event
+  const events = getRegistry(instance);
+  const cbs = events[event];
+  if (!cbs) {
+    return vm;
+  }
+  if (!fn) {
+    events[event] = undefined;
+    return vm;
+  }
+  events[event] = cbs.filter((cb) => !(cb === fn || cb.fn === fn));
+  return vm;
+}
+export function $emit(instance, event, ...args) {
+  instance && instance.$emit && instance.$emit(event, ...args);
+  const cbs = getRegistry(instance)[event];
+  if (cbs) {
+    cbs.map((cb) => cb.apply(instance, args));
+  }
+  return instance;
+}
+export function $children(instance) {
+  function $walk(vnode, children) {
+    if (vnode.component && vnode.component.proxy) {
+      children.push(vnode.component.proxy);
+    } else if (vnode.shapeFlag & (1 << 4)) {
+      const vnodes = vnode.children;
+      for (let i = 0; i < vnodes.length; i++) {
+        $walk(vnodes[i], children);
+      }
+    }
+  }
+  const root = instance.$.subTree;
+  const children = [];
+  if (root) {
+    $walk(root, children);
+  }
+  return children;
+}

+ 0 - 15
src/lib/stompjs/index.js

@@ -1,15 +0,0 @@
-// Copyright (C) 2013 [Jeff Mesnil](http://jmesnil.net/)
-//
-//   Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
-//
-// The library can be used in node.js app to connect to STOMP brokers over TCP 
-// or Web sockets.
-
-// Root of the `stompjs module`
-
-var Stomp = require('./stomp.js');
-var StompNode = require('./stomp-node.js');
-
-module.exports = Stomp.Stomp;
-module.exports.overTCP = StompNode.overTCP;
-module.exports.overWS = StompNode.overWS;

+ 0 - 108
src/lib/stompjs/stomp-node.js

@@ -1,108 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-
-/*
-   Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
-
-   Copyright (C) 2013 [Jeff Mesnil](http://jmesnil.net/)
- */
-
-(function() {
-  var Stomp, net, overTCP, overWS, wrapTCP, wrapWS;
-
-  Stomp = require('./stomp');
-
-  net = require('net');
-
-  Stomp.Stomp.setInterval = function(interval, f) {
-    return setInterval(f, interval);
-  };
-
-  Stomp.Stomp.clearInterval = function(id) {
-    return clearInterval(id);
-  };
-
-  wrapTCP = function(port, host) {
-    var socket, ws;
-    socket = null;
-    ws = {
-      url: 'tcp:// ' + host + ':' + port,
-      send: function(d) {
-        return socket.write(d);
-      },
-      close: function() {
-        return socket.end();
-      }
-    };
-    socket = net.connect(port, host, function(e) {
-      return ws.onopen();
-    });
-    socket.on('error', function(e) {
-      return typeof ws.onclose === "function" ? ws.onclose(e) : void 0;
-    });
-    socket.on('close', function(e) {
-      return typeof ws.onclose === "function" ? ws.onclose(e) : void 0;
-    });
-    socket.on('data', function(data) {
-      var event;
-      event = {
-        'data': data.toString()
-      };
-      return ws.onmessage(event);
-    });
-    return ws;
-  };
-
-  wrapWS = function(url) {
-    var WebSocketClient, connection, socket, ws;
-    // WebSocketClient = require('websocket').client;
-    // connection = null;
-    ws = {
-      url: url,
-      send: function(d) {
-        return connection.sendUTF(d);
-      },
-      close: function() {
-        return connection.close();
-      }
-    };
-    // socket = new WebSocketClient();
-    // socket.on('connect', function(conn) {
-    //   connection = conn;
-    //   ws.onopen();
-    //   connection.on('error', function(error) {
-    //     return typeof ws.onclose === "function" ? ws.onclose(error) : void 0;
-    //   });
-    //   connection.on('close', function() {
-    //     return typeof ws.onclose === "function" ? ws.onclose() : void 0;
-    //   });
-    //   return connection.on('message', function(message) {
-    //     var event;
-    //     if (message.type === 'utf8') {
-    //       event = {
-    //         'data': message.utf8Data
-    //       };
-    //       return ws.onmessage(event);
-    //     }
-    //   });
-    // });
-    // socket.connect(url);
-    return ws;
-  };
-
-  overTCP = function(host, port) {
-    var socket;
-    socket = wrapTCP(port, host);
-    return Stomp.Stomp.over(socket);
-  };
-
-  overWS = function(url) {
-    var socket;
-    socket = wrapWS(url);
-    return Stomp.Stomp.over(socket);
-  };
-
-  exports.overTCP = overTCP;
-
-  exports.overWS = overWS;
-
-}).call(this);

+ 0 - 489
src/lib/stompjs/stomp.js

@@ -1,489 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-
-/*
-   Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
-
-   Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
-   Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
- */
-
-(function() {
-  var Byte, Client, Frame, Stomp,
-    __hasProp = {}.hasOwnProperty,
-    __slice = [].slice;
-
-  Byte = {
-    LF: '\x0A',
-    NULL: '\x00'
-  };
-
-  Frame = (function() {
-    var unmarshallSingle;
-
-    function Frame(command, headers, body) {
-      this.command = command;
-      this.headers = headers != null ? headers : {};
-      this.body = body != null ? body : '';
-    }
-
-    Frame.prototype.toString = function() {
-      var lines, name, skipContentLength, value, _ref;
-      lines = [this.command];
-      skipContentLength = this.headers['content-length'] === false ? true : false;
-      if (skipContentLength) {
-        delete this.headers['content-length'];
-      }
-      _ref = this.headers;
-      for (name in _ref) {
-        if (!__hasProp.call(_ref, name)) continue;
-        value = _ref[name];
-        lines.push("" + name + ":" + value);
-      }
-      if (this.body && !skipContentLength) {
-        lines.push("content-length:" + (Frame.sizeOfUTF8(this.body)));
-      }
-      lines.push(Byte.LF + this.body);
-      return lines.join(Byte.LF);
-    };
-
-    Frame.sizeOfUTF8 = function(s) {
-      if (s) {
-        return encodeURI(s).match(/%..|./g).length;
-      } else {
-        return 0;
-      }
-    };
-
-    unmarshallSingle = function(data) {
-      var body, chr, command, divider, headerLines, headers, i, idx, len, line, start, trim, _i, _j, _len, _ref, _ref1;
-      divider = data.search(RegExp("" + Byte.LF + Byte.LF));
-      headerLines = data.substring(0, divider).split(Byte.LF);
-      command = headerLines.shift();
-      headers = {};
-      trim = function(str) {
-        return str.replace(/^\s+|\s+$/g, '');
-      };
-      _ref = headerLines.reverse();
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        line = _ref[_i];
-        idx = line.indexOf(':');
-        headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1));
-      }
-      body = '';
-      start = divider + 2;
-      if (headers['content-length']) {
-        len = parseInt(headers['content-length']);
-        body = ('' + data).substring(start, start + len);
-      } else {
-        chr = null;
-        for (i = _j = start, _ref1 = data.length; start <= _ref1 ? _j < _ref1 : _j > _ref1; i = start <= _ref1 ? ++_j : --_j) {
-          chr = data.charAt(i);
-          if (chr === Byte.NULL) {
-            break;
-          }
-          body += chr;
-        }
-      }
-      return new Frame(command, headers, body);
-    };
-
-    Frame.unmarshall = function(datas) {
-      var data;
-      return (function() {
-        var _i, _len, _ref, _results;
-        _ref = datas.split(RegExp("" + Byte.NULL + Byte.LF + "*"));
-        _results = [];
-        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-          data = _ref[_i];
-          if ((data != null ? data.length : void 0) > 0) {
-            _results.push(unmarshallSingle(data));
-          }
-        }
-        return _results;
-      })();
-    };
-
-    Frame.marshall = function(command, headers, body) {
-      var frame;
-      frame = new Frame(command, headers, body);
-      return frame.toString() + Byte.NULL;
-    };
-
-    return Frame;
-
-  })();
-
-  Client = (function() {
-    var now;
-
-    function Client(ws) {
-      this.ws = ws;
-      this.ws.binaryType = "arraybuffer";
-      this.counter = 0;
-      this.connected = false;
-      this.heartbeat = {
-        outgoing: 10000,
-        incoming: 10000
-      };
-      this.maxWebSocketFrameSize = 16 * 1024;
-      this.subscriptions = {};
-    }
-
-    Client.prototype.debug = function(message) {
-      var _ref;
-      return typeof window !== "undefined" && window !== null ? (_ref = window.console) != null ? _ref.log(message) : void 0 : void 0;
-    };
-
-    now = function() {
-      if (Date.now) {
-        return Date.now();
-      } else {
-        return new Date().valueOf;
-      }
-    };
-
-    Client.prototype._transmit = function(command, headers, body) {
-      var out;
-      out = Frame.marshall(command, headers, body);
-      if (typeof this.debug === "function") {
-        this.debug(">>> " + out);
-      }
-      while (true) {
-        if (out.length > this.maxWebSocketFrameSize) {
-          this.ws.send(out.substring(0, this.maxWebSocketFrameSize));
-          out = out.substring(this.maxWebSocketFrameSize);
-          if (typeof this.debug === "function") {
-            this.debug("remaining = " + out.length);
-          }
-        } else {
-          return this.ws.send(out);
-        }
-      }
-    };
-
-    Client.prototype._setupHeartbeat = function(headers) {
-      var serverIncoming, serverOutgoing, ttl, v, _ref, _ref1;
-      if ((_ref = headers.version) !== Stomp.VERSIONS.V1_1 && _ref !== Stomp.VERSIONS.V1_2) {
-        return;
-      }
-      _ref1 = (function() {
-        var _i, _len, _ref1, _results;
-        _ref1 = headers['heart-beat'].split(",");
-        _results = [];
-        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
-          v = _ref1[_i];
-          _results.push(parseInt(v));
-        }
-        return _results;
-      })(), serverOutgoing = _ref1[0], serverIncoming = _ref1[1];
-      if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {
-        ttl = Math.max(this.heartbeat.outgoing, serverIncoming);
-        if (typeof this.debug === "function") {
-          this.debug("send PING every " + ttl + "ms");
-        }
-        this.pinger = Stomp.setInterval(ttl, (function(_this) {
-          return function() {
-            _this.ws.send(Byte.LF);
-            return typeof _this.debug === "function" ? _this.debug(">>> PING") : void 0;
-          };
-        })(this));
-      }
-      if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {
-        ttl = Math.max(this.heartbeat.incoming, serverOutgoing);
-        if (typeof this.debug === "function") {
-          this.debug("check PONG every " + ttl + "ms");
-        }
-        return this.ponger = Stomp.setInterval(ttl, (function(_this) {
-          return function() {
-            var delta;
-            delta = now() - _this.serverActivity;
-            if (delta > ttl * 2) {
-              if (typeof _this.debug === "function") {
-                _this.debug("did not receive server activity for the last " + delta + "ms");
-              }
-              return _this.ws.close();
-            }
-          };
-        })(this));
-      }
-    };
-
-    Client.prototype._parseConnect = function() {
-      var args, connectCallback, errorCallback, headers;
-      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
-      headers = {};
-      switch (args.length) {
-        case 2:
-          headers = args[0], connectCallback = args[1];
-          break;
-        case 3:
-          if (args[1] instanceof Function) {
-            headers = args[0], connectCallback = args[1], errorCallback = args[2];
-          } else {
-            headers.login = args[0], headers.passcode = args[1], connectCallback = args[2];
-          }
-          break;
-        case 4:
-          headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3];
-          break;
-        default:
-          headers.login = args[0], headers.passcode = args[1], connectCallback = args[2], errorCallback = args[3], headers.host = args[4];
-      }
-      return [headers, connectCallback, errorCallback];
-    };
-
-    Client.prototype.connect = function() {
-      var args, errorCallback, headers, out;
-      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
-      out = this._parseConnect.apply(this, args);
-      headers = out[0], this.connectCallback = out[1], errorCallback = out[2];
-      if (typeof this.debug === "function") {
-        this.debug("Opening Web Socket...");
-      }
-      this.ws.onmessage = (function(_this) {
-        return function(evt) {
-          var arr, c, client, data, frame, messageID, onreceive, subscription, _i, _len, _ref, _results;
-          data = typeof ArrayBuffer !== 'undefined' && evt.data instanceof ArrayBuffer ? (arr = new Uint8Array(evt.data), typeof _this.debug === "function" ? _this.debug("--- got data length: " + arr.length) : void 0, ((function() {
-            var _i, _len, _results;
-            _results = [];
-            for (_i = 0, _len = arr.length; _i < _len; _i++) {
-              c = arr[_i];
-              _results.push(String.fromCharCode(c));
-            }
-            return _results;
-          })()).join('')) : evt.data;
-          _this.serverActivity = now();
-          if (data === Byte.LF) {
-            if (typeof _this.debug === "function") {
-              _this.debug("<<< PONG");
-            }
-            return;
-          }
-          if (typeof _this.debug === "function") {
-            _this.debug("<<< " + data);
-          }
-          _ref = Frame.unmarshall(data);
-          _results = [];
-          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-            frame = _ref[_i];
-            switch (frame.command) {
-              case "CONNECTED":
-                if (typeof _this.debug === "function") {
-                  _this.debug("connected to server " + frame.headers.server);
-                }
-                _this.connected = true;
-                _this._setupHeartbeat(frame.headers);
-                _results.push(typeof _this.connectCallback === "function" ? _this.connectCallback(frame) : void 0);
-                break;
-              case "MESSAGE":
-                subscription = frame.headers.subscription;
-                onreceive = _this.subscriptions[subscription] || _this.onreceive;
-                if (onreceive) {
-                  client = _this;
-                  messageID = frame.headers["message-id"];
-                  frame.ack = function(headers) {
-                    if (headers == null) {
-                      headers = {};
-                    }
-                    return client.ack(messageID, subscription, headers);
-                  };
-                  frame.nack = function(headers) {
-                    if (headers == null) {
-                      headers = {};
-                    }
-                    return client.nack(messageID, subscription, headers);
-                  };
-                  _results.push(onreceive(frame));
-                } else {
-                  _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled received MESSAGE: " + frame) : void 0);
-                }
-                break;
-              case "RECEIPT":
-                _results.push(typeof _this.onreceipt === "function" ? _this.onreceipt(frame) : void 0);
-                break;
-              case "ERROR":
-                _results.push(typeof errorCallback === "function" ? errorCallback(frame) : void 0);
-                break;
-              default:
-                _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled frame: " + frame) : void 0);
-            }
-          }
-          return _results;
-        };
-      })(this);
-      this.ws.onclose = (function(_this) {
-        return function() {
-          var msg;
-          msg = "Whoops! Lost connection to " + _this.ws.url;
-          if (typeof _this.debug === "function") {
-            _this.debug(msg);
-          }
-          _this._cleanUp();
-          return typeof errorCallback === "function" ? errorCallback(msg) : void 0;
-        };
-      })(this);
-      return this.ws.onopen = (function(_this) {
-        return function() {
-          if (typeof _this.debug === "function") {
-            _this.debug('Web Socket Opened...');
-          }
-          headers["accept-version"] = Stomp.VERSIONS.supportedVersions();
-          headers["heart-beat"] = [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',');
-          console.log(332, headers);
-          return _this._transmit("CONNECT", headers);
-        };
-      })(this);
-    };
-
-    Client.prototype.disconnect = function(disconnectCallback, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      this._transmit("DISCONNECT", headers);
-      this.ws.onclose = null;
-      this.ws.close();
-      this._cleanUp();
-      return typeof disconnectCallback === "function" ? disconnectCallback() : void 0;
-    };
-
-    Client.prototype._cleanUp = function() {
-      this.connected = false;
-      if (this.pinger) {
-        Stomp.clearInterval(this.pinger);
-      }
-      if (this.ponger) {
-        return Stomp.clearInterval(this.ponger);
-      }
-    };
-
-    Client.prototype.send = function(destination, headers, body) {
-      if (headers == null) {
-        headers = {};
-      }
-      if (body == null) {
-        body = '';
-      }
-      headers.destination = destination;
-      return this._transmit("SEND", headers, body);
-    };
-
-    Client.prototype.subscribe = function(destination, callback, headers) {
-      var client;
-      if (headers == null) {
-        headers = {};
-      }
-      if (!headers.id) {
-        headers.id = "sub-" + this.counter++;
-      }
-      headers.destination = destination;
-      this.subscriptions[headers.id] = callback;
-      this._transmit("SUBSCRIBE", headers);
-      client = this;
-      return {
-        id: headers.id,
-        unsubscribe: function() {
-          return client.unsubscribe(headers.id);
-        }
-      };
-    };
-
-    Client.prototype.unsubscribe = function(id) {
-      delete this.subscriptions[id];
-      return this._transmit("UNSUBSCRIBE", {
-        id: id
-      });
-    };
-
-    Client.prototype.begin = function(transaction) {
-      var client, txid;
-      txid = transaction || "tx-" + this.counter++;
-      this._transmit("BEGIN", {
-        transaction: txid
-      });
-      client = this;
-      return {
-        id: txid,
-        commit: function() {
-          return client.commit(txid);
-        },
-        abort: function() {
-          return client.abort(txid);
-        }
-      };
-    };
-
-    Client.prototype.commit = function(transaction) {
-      return this._transmit("COMMIT", {
-        transaction: transaction
-      });
-    };
-
-    Client.prototype.abort = function(transaction) {
-      return this._transmit("ABORT", {
-        transaction: transaction
-      });
-    };
-
-    Client.prototype.ack = function(messageID, subscription, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      headers["message-id"] = messageID;
-      headers.subscription = subscription;
-      return this._transmit("ACK", headers);
-    };
-
-    Client.prototype.nack = function(messageID, subscription, headers) {
-      if (headers == null) {
-        headers = {};
-      }
-      headers["message-id"] = messageID;
-      headers.subscription = subscription;
-      return this._transmit("NACK", headers);
-    };
-
-    return Client;
-
-  })();
-
-  Stomp = {
-    VERSIONS: {
-      V1_0: '1.0',
-      V1_1: '1.1',
-      V1_2: '1.2',
-      supportedVersions: function() {
-        return '1.1,1.0';
-      }
-    },
-    client: function(url, protocols) {
-      var klass, ws;
-      if (protocols == null) {
-        protocols = ['v10.stomp', 'v11.stomp'];
-      }
-      klass = Stomp.WebSocketClass || WebSocket;
-      ws = new klass(url, protocols);
-      return new Client(ws);
-    },
-    over: function(ws) {
-      return new Client(ws);
-    },
-    Frame: Frame
-  };
-
-  if (typeof exports !== "undefined" && exports !== null) {
-    exports.Stomp = Stomp;
-  }
-
-  if (typeof window !== "undefined" && window !== null) {
-    Stomp.setInterval = function(interval, f) {
-      return window.setInterval(f, interval);
-    };
-    Stomp.clearInterval = function(id) {
-      return window.clearInterval(id);
-    };
-    window.Stomp = Stomp;
-  } else if (!exports) {
-    self.Stomp = Stomp;
-  }
-
-}).call(this);

+ 18 - 55
src/main.js

@@ -1,29 +1,13 @@
-import Vue from 'vue';
-import VueRouter from 'vue-router';
-import VConsole from 'vconsole';
+import { createApp } from 'vue';
+import App from './App.vue'
+import store from './store/index.js';
 import '@/common/css/quill.snow.css'; // 引入对富文本的支持
+import router from './routes/index.js'
+
+console.log(777, router)
+import userFilters from './utils/filters.js'
+import AppInitPlugins from  './plugins/AppInit';
 
-// 或者使用配置参数来初始化,详情见文档
-// 开发环境和qa环境 打开debug
-// const debug = /dev-t?-?|qa-t?-?|sl-t?-?|2486/.test(window.location.origin);
-let debug = false;
-const keys = ['https://dev-','https://qa-','https://lt-','https://sl-','http://127.0.0.1', 'http://localhost:8080', 'http://192.168.3.9:8080'];
-keys.forEach(key => {
-  if(!debug && window.location.origin.indexOf(key) > -1) {
-    debug = true
-  }
-})
-if (debug) {
-  window.vConsole = new VConsole(
-    // { theme: 'dark' }
-  );
-  setTimeout(() => {
-    window.vConsole?.setSwitchPosition(20, 200);
-  }, 1000)
-}
-import './plugins/install';
-import App from './App.vue';
-import store from './store/index.js';
 
 // ui 组件
 import {
@@ -43,31 +27,15 @@ import {
   Stepper,
   Loading
 } from 'vant';
+import 'vant/lib/index.css';
 
-import router from './routes/index.js'; // 注册页面路由
-import wx from '@/utils/js_sdk/weixin'; // 接入微信JSDK
-import '@/utils/filters'; // 注册 vue 过滤器
-import request from '@/utils/request.js'; //
-
-// 项目整体初始化逻辑
-import {clientInit} from '@/common/js/clientInit'
-clientInit();
 
 // 注册全局组件
 import componentsInstall from './components/install';
-
-Vue.use(componentsInstall);
-
-window.wx = wx;
-Vue.prototype.$wx = window.wx;
-Vue.prototype.$store = store;
-Vue.prototype.$request = request;
-Vue.prototype.isAlipayClient = window.isAlipayClient;
-//
-Vue.config.productionTip = false;
-App.mpType = 'app';
-Vue.use(VueRouter);
-Vue.use(Icon)
+const app = createApp(App);
+app.use(router);
+app.use(store);
+app.use(Icon)
   .use(Checkbox)
   .use(CheckboxGroup)
   .use(RadioGroup)
@@ -82,14 +50,9 @@ Vue.use(Icon)
   .use(Divider)
   .use(Loading)
   .use(Stepper);
-  
-
-Vue.config.ignoredElements = ['wx-open-launch-weapp'];
+app.use(AppInitPlugins);
 
-const app = new Vue({
-  store,
-  router,
-  el: '#app',
-  ...App,
-});
-app.$mount();
+app.use(componentsInstall)
+app.use(userFilters)
+// Vue.config.ignoredElements = ['wx-open-launch-weapp'];
+app.mount('#app')

+ 0 - 89
src/manifest.json

@@ -1,89 +0,0 @@
-{
-    "name" : "嘉里集团",
-    "appid" : "__UNI__14A40A0",
-    "description" : "",
-    "versionName" : "2.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    "app-plus" : {
-        "nvueCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "modules" : {},
-        "optimization" : {
-            "subPackages" : true
-        },
-        "softinputNavBar" : "none",
-        "runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式
-        "distribute" : {
-            "android" : {
-                "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
-            },
-            "ios" : {},
-            "sdkConfigs" : {}
-        }
-    },
-    "quickapp" : {},
-    "mp-weixin" : {
-        "appid" : "wx2a1741f02f7bb650",
-        "setting" : {
-            "urlCheck" : true,
-            "es6" : true,
-            "minified" : true,
-            "postcss" : true,
-            "checkSitemap" : false
-        },
-        "optimization" : {
-            "subPackages" : true
-        },
-        "plugins" : {},
-        "entryPagePath" : "pages/automatic/automaticIndex",
-        "permission" : {
-            "scope.userLocation" : {
-                "desc" : "您的位置信息将用于给您推荐离您最近的商场"
-            }
-        }
-    },
-    "h5" : {
-        "devServer" : {
-            "port" : 8080,
-            "disableHostCheck" : true
-        },
-        "sdkConfigs" : {
-            "maps" : {
-                "qqmap" : {
-                    "key" : "R3JBZ-R5X35-6UGIL-QMGBD-TZIMK-PAFD5"
-                }
-            }
-        },
-        "router" : {
-            "base" : "h5",
-            "mode" : "hash"
-        },
-        //正式域名
-        "domain" : "",
-        "title" : "嘉里集团"
-    }
-}

+ 0 - 96
src/mixins/login.js

@@ -1,96 +0,0 @@
-import { KIP_API_CODE } from '@/common/js/config';
-import {
-  kipCheckToken,
-  kipGetNewAccessTokenByRefreshToken,
-} from '@/utils/api-kip';
-import KipCacheTool from '@/utils/kip-cache-tool';
-import log from '@/utils/log';
-import MemberCacheTool from '@/utils/member-cache-tool';
-import uni from '@/utils/uniHooks';
-import { Toast } from 'vant';
-
-export default {
-  methods: {
-    async checkIsLogin(callback) {
-      // 判断用户是否登录
-      // 如果登录
-      // 未登录,或者是首次登录
-      const kipAccessToken = uni.getStorageSync('kipAccessToken');
-      if (!kipAccessToken) {
-        // 如果用户不选择登录,则不走登录逻辑
-        await this.$router.replace({
-          path: 'login',
-        });
-        return;
-      }
-      // 用户二次登录,本地存在 kipAccessToken 检查 token 是否需要登录
-      const [stopCallBack] = await this.checkKipToken(kipAccessToken);
-      // console.log(30, stopCallBack);
-      if (stopCallBack) {
-        // console.log(return stopCallBack();)
-        // console.log(32, stopCallBack);
-        stopCallBack();
-        return;
-      }
-      if (callback) {
-        callback();
-      }
-    },
-    checkKipToken(kipAccessToken) {
-      // debugger;
-      return new Promise(async (resolve) => {
-        try {
-          const resp = await kipCheckToken(kipAccessToken);
-          if (resp && resp.statusCode === '401') {
-            log.info(
-              `access_token已过期,使用refresh_token刷新access_token,如果refresh_token过期则删除所有数据`
-            );
-            const kipRefreshToken = KipCacheTool.getKipRefreshToken();
-            const result = await kipGetNewAccessTokenByRefreshToken(
-              kipRefreshToken
-            );
-            if (
-              result &&
-              result.code === '000000' &&
-              result.data.access_token
-            ) {
-              KipCacheTool.setKipToken(result.data.access_token);
-              log.info(
-                `refreshToken获取成功,这是新的token:`,
-                result.data.access_token
-              );
-              resolve([]);
-              return;
-            }
-            if (result && result.code !== KIP_API_CODE.REFRESH_TOKEN_EXPIRED) {
-              Toast({
-                message: result.message,
-                duration: 2000,
-              });
-            }
-            resolve([this.toLogin]);
-            return;
-          }
-          resolve([]);
-        } catch (err) {
-          resolve([this.toLogin]);
-        }
-      });
-    },
-    toLogin() {
-      // debugger;
-      console.warn('===>清除所有缓存1');
-      log.info(`清除所有缓存1`);
-      this.cleanAll();
-
-      this.$router.replace({
-        path: 'login',
-      });
-    },
-    cleanAll() {
-      // 清除所有用户信息
-      KipCacheTool.cleanKipCache();
-      MemberCacheTool.cleanMemberCache(this);
-    },
-  },
-};

+ 0 - 1041
src/pages.json

@@ -1,1041 +0,0 @@
-{
-	"pages": [
-		{
-		"path": "pages/automatic/automaticIndex",
-		"style": {
-			"navigationBarTitleText": "首页",
-			"navigationStyle": "custom"
-		}
-	}, {
-		"path": "pages/automatic/automaticMy",
-		"style": {
-			"navigationBarTitleText": "会员中心",
-			"navigationBarTextStyle":"black"
-		}
-	}, {
-		"path": "pages/automatic/automaticPage",
-		"style": {
-			"navigationBarTitleText": ""
-		}
-	}, {
-		"path": "pages/chooseProject/chooseProject",
-		"style": {
-			"navigationBarTitleText": "切换位置"
-		}
-	}, {
-		"path": "pages/protocol/protocol",
-		"style": {
-			"navigationBarTitleText": "",
-			"enablePullDownRefresh": false,
-			"navigationBarBackgroundColor":"#F4F7FF"
-		}
-
-	},{
-		"path": "pages/memberChange/index",
-		"style": {
-			"navigationBarTitleText": "会员变更细则"
-		}
-	
-	},{
-		"path": "pages/userInfo/userInfo",
-		"style": {
-			"navigationBarTitleText": "个人资料"
-		}
-	
-	},{
-		"path": "pages/userInfo/userInfo-item-edit",
-		"style": {
-			"navigationBarTitleText": "个人资料修改"
-		}
-	
-	},{
-		"path": "pages/mobileChange/mobileChange",
-		"style": {
-			"navigationBarTitleText": "更换手机号"
-		}
-
-	},{
-		"path": "pages/agreement/agreement",
-		"style": {
-			"navigationBarTitleText": "会员协议"
-		}
-
-	},{
-		"path": "pages/loggedOff/loggedOff",
-		"style": {
-			"navigationBarTitleText": "账号注销"
-		}
-
-	},{
-            "path" : "pages/changeEnv/changeEnv",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
-	"subPackages": [
-		{
-			"root": "pages/pointsMall",
-			"pages": [{
-				"path": "pointsMall",
-				"style": {
-					"navigationBarTitleText": "积分商城"
-				}
-			}, {
-				"path": "pointsSuccess",
-				"style": {
-					"navigationBarTitleText": "兑换成功"
-				}
-			}]
-		},
-		{
-			"root": "pages/intoApp",
-			"pages": [{
-				"path": "intoApp",
-				"style": {
-					"navigationStyle": "custom"
-				}
-			}]
-		},
-		{
-			"root": "pages/drawLottery",
-			"pages": [{
-				"path": "drawLottery",
-				"style": {
-					"navigationStyle": "custom"
-				}
-			}]
-		},
-		{
-			"root": "pages/ticket",
-			"pages": [{
-				"path": "ticketDetails",
-				"style": {
-					"navigationBarTitleText": "积分商城"
-				}
-			}, {
-				"path": "cardCaseDetails",
-				"style": {
-					// "navigationStyle": "custom"
-					"navigationBarTitleText": "卡券详情"
-				}
-			}, {
-				"path": "ticket",
-				"style": {
-					"navigationBarTitleText": "优惠券"
-				}
-			}, {
-				"path": "cardCaseList",
-				"style": {
-					// "navigationStyle": "custom",
-					"navigationBarTitleText": "我的卡券"
-				}
-			}, {
-				"path": "give",
-				"style": {
-					// "navigationStyle": "custom",
-					"navigationBarTitleText": "卡券包"
-				}
-			}]
-		},
-		{
-			"root": "pages/shop",
-			"pages": [{
-					"path": "shopCart",
-					"style": {
-						"navigationBarTitleText": "购物车"
-					}
-				},
-				{
-					"path": "order",
-					"style": {
-						"navigationBarTitleText": "订单详情"
-					}
-				},
-				{
-					"path": "orders",
-					"style": {
-						"navigationBarTitleText": "订单详情"
-					}
-				},
-				{
-					"path": "shopDetails",
-					"style": {
-						"navigationBarTitleText": "商品详情"
-					}
-				},
-				{
-					"path": "commodityStore",
-					"style": {
-						"navigationBarTitleText": "店铺商品"
-					}
-				},
-				{
-					"path": "publishComments",
-					"style": {
-						"navigationBarTitleText": "新增评价"
-					}
-				},
-				{
-					"path": "publishCommentsView",
-					"style": {
-						"navigationBarTitleText": "查看评价"
-					}
-				},
-				{
-					"path": "commentsList",
-					"style": {
-						"navigationBarTitleText": "评价列表"
-					}
-				},
-				{
-					"path": "shopIndex",
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				},
-				{
-					"path": "chooseShop",
-					"style": {
-						"navigationBarTitleText": "自提地址"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/order",
-			"pages": [{
-					"path": "orderDetails",
-					"style": {
-						"navigationBarTitleText": "订单详情"
-					}
-				},
-				{
-					"path": "orderList",
-					"style": {
-						"navigationBarTitleText": "全部订单"
-					}
-				},
-				{
-					"path": "address",
-					"style": {
-						"navigationBarTitleText": "收货地址"
-					}
-				},
-				{
-					"path": "editAddress",
-					"style": {
-						"navigationBarTitleText": "新增地址"
-					}
-				}, {
-					"path": "charge",
-					"style": {
-						"navigationBarTitleText": "支付"
-					}
-				}, {
-					"path": "publicCharge",
-					"style": {
-						"navigationBarTitleText": "对公转账"
-					}
-				}, {
-					"path": "success",
-					"style": {
-						"navigationBarTitleText": "支付成功"
-					}
-				}, {
-					"path": "selfRaising",
-					"style": {
-						"navigationBarTitleText": "自提信息"
-					}
-				},
-				{
-					"path": "invoice",
-					"style": {
-						"navigationBarTitleText": "发票管理"
-					}
-				},
-				{
-					"path": "editInvoice"
-				},
-				{
-					"path": "coupon",
-					"style": {
-						"navigationBarTitleText": "代金券"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/returnExchange",
-			"pages": [{
-				"path": "returnExchangeList",
-				"style": {
-					"navigationBarTitleText": "退货/换货"
-				}
-			}, {
-				"path": "salesType",
-				"style": {
-					"navigationBarTitleText": "选择售后类型"
-				}
-			}, {
-				"path": "returnExchangeForm",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			}, {
-				"path": "returnExchangeDetail",
-				"style": {
-					"navigationBarTitleText": "售后详情"
-				}
-			}]
-		},
-		{
-			"root": "pages/parkingFee",
-			"pages": [{
-				"path": "parkingFee",
-				"style": {
-					"navigationBarTitleText": "停车缴费"
-				}
-			}, {
-				"path": "parkingFeeForm",
-				"style": {
-					"navigationBarTitleText": "停车缴费"
-				}
-			}, {
-				"path": "parkingFeeList",
-				"style": {
-					"navigationBarTitleText": "缴费记录"
-				}
-			}, {
-				"path": "parkingFeeDetail",
-				"style": {
-					"navigationBarTitleText": "停车支付"
-				}
-			}, {
-				"path": "parkingFeeDetailSuccess",
-				"style": {
-					"navigationBarTitleText": "缴费详情"
-				}
-			}, {
-				"path": "vehicleManagement",
-				"style": {
-					"navigationBarTitleText": "车牌管理"
-				}
-			}, {
-				"path": "vehicleAddOrEdit",
-				"style": {
-					"navigationBarTitleText": "绑定车牌号"
-				}
-			}, {
-				"path": "parkingReceipt/parkingReceipt",
-				"style": {
-					"navigationBarTitleText": "停车发票",
-					"enablePullDownRefresh": false
-				}
-			}, {
-				"path": "parkingReceipt/parkingInvoice",
-				"style": {
-					"navigationBarTitleText": "发票详情"
-				}
-			}, {
-				"path": "parkingReceipt/parkingApplication",
-				"style": {
-					"navigationBarTitleText": "发票申请"
-				}
-			}, {
-				"path": "parkingReceipt/parkingInvoiceApply",
-				"style": {
-					"navigationBarTitleText": "提示"
-				}
-			}, {
-				"path": "parkingReceipt/parkingChooseHeader",
-				"style": {
-					"navigationBarTitleText": "选择抬头"
-				}
-			}, {
-				"path": "parkingReceipt/parkingChangeHeader",
-				"style": {
-					"navigationBarTitleText": "发票抬头"
-				}
-			}, {
-				"path": "parkingReceipt/parkingHeaderDetail",
-				"style": {
-					"navigationBarTitleText": "抬头详情"
-				}
-			}, {
-				"path": "parkingReceipt/parkingInvoiceImage",
-				"style": {
-					"navigationBarTitleText": "停车发票"
-				}
-			}, {
-				"path": "parkingReceipt/parkingOrderDetail",
-				"style": {
-					"navigationBarTitleText": "支付订单详情"
-				}
-			}, {
-				"path": "parkingFeeHint/parkingFeeHint",
-				"style": {
-					"navigationBarTitleText": "提示"
-				}
-			}, {
-				"path" : "parkingFeePayment",
-				"style" : {
-					"navigationBarTitleText": "提示"
-				}                                                                                   
-            }
-              ,{
-                    "path" : "parkingFeeDiscounts",
-                    "style" :   {
-					"navigationBarTitleText": "选择优惠"
-				   }                                                                                             
-                }
-                ,{
-                    "path" : "parkingFeeCoupon",
-                    "style" :{
-					"navigationBarTitleText": "优惠劵"
-				   }                                                                             
-                }
-                ,{
-                    "path" : "parkingFeePaperCoupon",
-                    "style" : {
-					"navigationBarTitleText": "纸质优惠劵减免"
-				   }                                                                                          
-                }
-                ,{
-                    "path" : "parkingFeeSuccess",
-                    "style" : {
-					"navigationBarTitleText": "提示"
-				   }                                                                                          
-                }
-            ]
-		},
-		{
-			"root": "pages/collection",
-			"pages": [{
-				"path": "collection",
-				"style": {
-					// "navigationStyle": "custom"
-					"navigationBarTitleText": "集集如律令"
-				}
-			}]
-		},
-		{
-			"root": "pages/assemble",
-			"pages": [{
-				"path": "assemble",
-				"style": {
-					"navigationBarTitleText": "拼团"
-				}
-			}]
-		},
-		{
-			"root": "pages/groupBooking",
-			"pages": [{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "拼团专场"
-					}
-				},
-				{
-					"path": "details",
-					"style": {
-						"navigationBarTitleText": "拼团详情"
-					}
-				},
-				{
-					"path": "participation",
-					"style": {
-						"navigationBarTitleText": "活动详情"
-					}
-				},
-				{
-					"path": "begin",
-					"style": {
-						"navigationBarTitleText": "参与拼团"
-					}
-				},
-				{
-					"path": "beginDetails",
-					"style": {
-						"navigationBarTitleText": "发起拼团"
-					}
-				},
-				{
-					"path": "myGroup",
-					"style": {
-						"navigationBarTitleText": "我的拼团"
-					}
-				},
-				{
-					"path": "successDetails",
-					"style": {
-						"navigationBarTitleText": "拼团成功"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/myCollection",
-			"pages": [{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "我的收藏"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/seckill",
-			"pages": [{
-					"path": "seckill",
-					"style": {
-						"navigationBarTitleText": "秒杀"
-					}
-				},
-				{
-					"path": "seckillDetails",
-					"style": {
-						"navigationBarTitleText": "秒杀商品"
-					}
-				},
-				{
-					"path": "orders",
-					"style": {
-						"navigationBarTitleText": "秒杀详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/lotteryDraw",
-			"pages": [{
-				"path": "lotteryDraw",
-				"style": {
-					"navigationBarTitleText": "砸金蛋"
-				}
-			}]
-		},
-		{
-			"root": "pages/shareAward",
-			"pages": [{
-				"path": "shareAward",
-				"style": {
-					"navigationBarTitleText": "拼手气领优惠券"
-				}
-			}]
-		},
-		{
-			"root": "pages/accumulatePoints",
-			"pages": [{
-				"path": "accumulatePoints",
-				"style": {
-					"navigationBarTitleText": "自助积分"
-				}
-			}, {
-				"path": "guide",
-				"style": {
-					"navigationBarTitleText": "自助积分指南"
-				}
-			}, {
-				"path": "sample",
-				"style": {
-					"navigationBarTitleText": "小票示例"
-				}
-			}]
-		},
-		{
-			"root": "pages/photoCredits",
-			"pages": [{
-				"path": "photoCreditsList",
-				"style": {
-					"navigationBarTitleText": "拍照积分"
-				}
-			}]
-		},
-		{
-			"root": "pages/member",
-			"pages": [{
-					"path": "memberIndex"
-				},
-				{
-					"path": "membershipInterests",
-					"style": {
-						"navigationBarTitleText": "会员权益"
-					}
-				},
-				{
-					"path": "memberQuityDetail",
-					"style": {
-						"navigationBarTitleText": "会员权益详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/spaceTime",
-			"pages": [{
-				"path": "spaceTimeTreasure"
-			}]
-		},
-		{
-			"root": "pages/eggTwister",
-			"pages": [{
-				"path": "eggTwister"
-			}]
-		},
-		{
-			"root": "pages/customerService",
-			"pages": [{
-				"path": "customer"
-			}],
-			"plugins": {
-				"ykfchat": {
-					"version": "2.0.29",
-					"provider": "wx1fdc8c9f3a3a05e4"
-				}
-			}
-		},
-		{
-			"root": "pages/activity",
-			"pages": [{
-					"path": "activity",
-					"style": {
-						"navigationBarTitleText": "活动报名"
-					}
-				}, {
-					"path": "activityDetails",
-					"style": {
-						"navigationBarTitleText": "报名活动"
-					}
-				}, {
-					"path": "myActivity",
-					"style": {
-						"navigationBarTitleText": "我的活动"
-					}
-				}, {
-					"path": "myActivityDetails",
-					"style": {
-						"navigationBarTitleText": "活动详情"
-					}
-				}, {
-					"path": "preferentialInfo",
-					"style": {
-						"navigationBarTitleText": "优惠信息"
-					}
-				}, {
-					"path": "preferentialList",
-					"style": {
-						"navigationBarTitleText": "优惠信息"
-					}
-				}, {
-					"path": "activityRegistration",
-					"style": {
-						"navigationBarTitleText": "活动报名"
-					}
-				},{
-					"path": "question",
-					"style": {
-						"navigationStyle": "custom"
-					}
-
-				},
-				{
-					"path": "questionList",
-					"style": {
-						"navigationBarTitleText": "问卷调查"
-					}
-				},
-				{
-					"path": "questionResult",
-					"style": {
-						"navigationBarTitleText": "问卷调查"
-					}
-				},
-				{
-					"path": "queResult",
-					"style": {
-						"navigationBarTitleText": "活动报名",
-						"enablePullDownRefresh": false
-					}	
-				},
-				{
-					"path": "orderSignUp",
-					"style": {
-						"navigationBarTitleText": "预约报名",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "memberShare",
-					"style": {
-						"navigationBarTitleText": "分享有奖",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "memberShareRecord",
-					"style": {
-						"navigationBarTitleText": "提交记录",
-						"enablePullDownRefresh": false
-					}
-				}
-			]
-		},
-		// 集字/第三方登录
-		{
-			"root": "pages/login",
-			"pages": [{
-				"path": "login",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "注册登录"
-				}
-			}]
-		},
-		{
-			"root": "pages/webView",
-			"pages": [{
-				"path": "webView",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "注册登录"
-				}
-			}]
-		},
-		// 来蹦哒公众号登录页面
-		{
-			"root": "pages/loginPubilc",
-			"pages": [{
-				"path": "login",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "注册登录"
-				}
-			}, {
-				"path": "loginH5",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "注册登录"
-				}
-			}, {
-				"path": "agreement",
-				"style": {
-					"navigationStyle": "custom"
-				}
-			}]
-		},
-		{
-			"root": "pages/wxLogin",
-			"pages": [{
-				"path": "login",
-				"style": {
-					"navigationBarTitleText": "注册登录",
-					"navigationBarBackgroundColor": "#F4F7FF"
-				}
-			}]
-		},
-		// 搜索页面
-		{
-			"root": "pages/search",
-			"pages": [{
-				"path": "searchPage",
-				"style": {
-					"navigationBarTitleText": "搜索"
-				}
-			}]
-		},
-		// 错误页面
-		{
-			"root": "pages/errorPage",
-			"pages": [{
-				"path": "errorPage",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "找不到服务"
-				}
-			},
-			{
-				"path": "errorLimit",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			}]
-		},
-		// 授权商圈页面
-		{
-			"root": "pages/tradeArea",
-			"pages": [{
-				"path": "tradeArea",
-				"style": {
-					"navigationBarTitleText": "微信商圈"
-				}
-			}]
-		},
-		// 第三方服务
-		{
-			"root": "pages/thirdserve",
-			"pages": [{
-				"path": "thirdserve",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "第三方服务"
-				}
-			}]
-		},
-		// 竞拍页面
-		{
-			"root": "pages/auction",
-			"pages": [{
-				"path": "auction",
-				"style": {
-					"navigationBarTitleText": "疯狂竞拍城"
-				}
-			}, {
-				"path": "userAuthorizationAgreement",
-				"style": {
-					"navigationBarTitleText": "用户授权协议"
-				}
-			}, {
-				"path": "disclaimer",
-				"style": {
-					"navigationBarTitleText": "免责条款"
-				}
-			}]
-		},
-		// 投诉建议
-		{
-			"root": "pages/suggestion",
-			"pages": [{
-				"path": "suggestionList",
-				"style": {
-					"navigationBarTitleText": "在线客服"
-				}
-			}, {
-				"path": "suggestionForm",
-				"style": {
-					"navigationBarTitleText": "在线客服"
-				}
-			},
-            {
-				"path": "suggestionReply",
-				"style": {
-					"navigationBarTitleText": "在线客服"
-				}
-			}]
-		},
-        // 拍照积分
-        {
-        	"root": "pages/photoIntegral",
-        	"pages": [{
-        		"path": "integralList",
-        		"style": {
-        			"navigationBarTitleText": "拍照积分"
-        		}
-        	}, {
-        		"path": "integralForm",
-        		"style": {
-        			"navigationBarTitleText": "拍照积分"
-        		}
-        	},
-            {
-        		"path": "integralReply",
-        		"style": {
-        			"navigationBarTitleText": "拍照积分"
-        		}
-        	}]
-        },
-		// 投票
-		{
-			"root": "pages/vote",
-			"pages": [{
-				"path": "vote",
-				"style": {
-					"navigationBarTitleText": "投票",
-					"onReachBottomDistance": 126
-				}
-			}]
-		},
-		// 分销
-		{
-			"root": "pages/mySale",
-			"pages": [{
-				"path": "mySale",
-				"style": {
-					"navigationBarTitleText": "我的分销"
-				}
-			}, {
-				"path": "authentication",
-				"style": {
-					"navigationBarTitleText": "实名认证"
-				}
-			}, {
-				"path": "incomeFlow",
-				"style": {
-					"navigationBarTitleText": "收入流水"
-				}
-			}, {
-				"path": "incomeFlowDetail",
-				"style": {
-					"navigationBarTitleText": "收入流水详情"
-				}
-			}]
-		},
-		// 积分明细
-		{
-			"root": "pages/integral",
-			"pages": [{
-				"path": "myIntegral",
-				"style": {
-					"navigationBarTitleText": "积分明细"
-				}
-			}]
-		},
-		// 完善信息
-		{
-			"root": "pages/personInfo",
-			"pages": [{
-				"path": "personInfo",
-				"style": {
-					"navigationBarTitleText": "完善信息",
-					"navigationBarBackgroundColor":"#F4F7FF"
-				}
-			},{
-				"path": "bluePersonInfo",
-				"style": {
-					"navigationBarTitleText": "完善信息",
-					"navigationBarBackgroundColor":"#F4F7FF"
-				}
-			}, {
-				"path": "personInfoWebView",
-				"style": {
-					"navigationBarTitleText": "完善信息"
-				}
-			}]
-		},
-		// 自动回复
-		{
-			"root": "pages/autoReply",
-			"pages": [{
-				"path": "autoReply",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "自动回复"
-				}
-			}]
-		},
-		// 商场服务
-		{
-			"root": "pages/marketService",
-			"pages": [{
-				"path": "marketService",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			}]
-		},
-		{
-			"root": "pages/newsSetting",
-			"pages": [{
-				"path": "newsSetting",
-				"style": {
-					"navigationStyle": "custom"
-					// "navigationBarTitleText": "自动回复"
-				}
-			}]
-		},
-		// 奖励金明细
-		{
-			"root": "pages/signIn",
-			"pages": [{
-				"path": "signIn",
-				"style": {
-					"navigationBarTitleText": "每日签到"
-				}
-			}, {
-				"path": "myPrize",
-				"style": {
-					"navigationBarTitleText": "签到奖励"
-				}
-			}]
-		},
-		{
-			"root": "pages/brand",
-			"pages": [{
-				"path": "brand",
-				"style": {
-					"navigationBarTitleText": "品牌导览"
-				}
-			}, {
-				"path": "brandDetails"
-			}]
-		},
-		// 集字/第三方登录
-		{
-			"root": "pages/award",
-			"pages": [{
-					"path": "times",
-					"style": {
-						"navigationBarTitleText": "倍享积分"
-					}
-				},
-				{
-					"path": "bounty",
-					"style": {
-						"navigationBarTitleText": "兑换奖励金"
-					}
-				},
-				{
-					"path": "ranking",
-					"style": {
-						"navigationBarTitleText": "消费排行榜"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/service",
-			"pages": [
-				{
-					"path": "reserve",
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				},
-				{
-					"path": "shopDetail",
-					"style": {
-						"navigationBarTitleText": ""
-					}
-								
-				},
-				{
-					"path": "orderList",
-					"style": {
-						"navigationBarTitleText": "我的服务订单",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "orderDetails",
-					"style": {
-						"navigationBarTitleText": "订单详情",
-						"enablePullDownRefresh": false
-					}
-				}
-			]
-		}
-	],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "嘉里集团",
-		"navigationBarBackgroundColor": "#fff",
-		"backgroundColor": "#F6F6F6",
-		"backgroundTextStyle": "light",
-		"app-plus": {
-			"titleNView": false
-		}
-	}
-}

+ 1 - 1
src/pages/login/login.vue

@@ -93,7 +93,7 @@
     </div>
     <div v-if="showAuth">
       <van-popup
-        v-model="showAuth"
+        v-model:show="showAuth"
         :close-on-click-overlay="false"
         position="center"
         :get-container="getContainer"

+ 0 - 2
src/pages/parkingFee/mixins/parkingFee.js

@@ -61,9 +61,7 @@ export default {
       supportUnlicensed: false, // 控制当前site,是否使用无牌车
       qrCodeHistory: '',
       currentTabType: this.carType,
-      // isAlipayClient: isAlipayClient,
       licensePlateList: [],
-      // custTypeId: 0,
       // 2.19新增内容
       eligibility: {}, // 
       eventId: '',

+ 2 - 2
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -203,7 +203,7 @@ export default {
     },
     // 前往支付
     async toPay() {
-      if (!this.isAlipayClient) {
+      if (!window.isAlipayClient) {
         // 判断微信小程序与 h5 是否正常通信
         const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
         if(!isReload) {
@@ -538,7 +538,7 @@ export default {
                 options: options,
               });
               window.subscribe('wxPayOver', (options) => {
-                if(this.isAlipayClient) {
+                if(window.isAlipayClient) {
                   options.wxPayOver = options.options.wxPayOver 
                 }
                 // this.Toastloading.clear();

+ 2 - 2
src/pages/parkingFee/mixins/parkingFeePaperCoupon.js

@@ -89,7 +89,7 @@ export default {
     // 扫码
    async scanCode() {
       const runScanFn = ( res ) => {
-        if ( res.scanType == 'QR_CODE' && res.scanType || (this.isAlipayClient && res.scanType == 'QR')) {
+        if ( res.scanType == 'QR_CODE' && res.scanType || (window.isAlipayClient && res.scanType == 'QR')) {
           console.log(res.result);
           const url = res.result;
           if ( url.indexOf('auth/') === -1 ) {
@@ -120,7 +120,7 @@ export default {
         });
         window.subscribe('scanQRCodeOver',( options ) => {
           console.log('微信扫码结束之后的返回参数',options);
-          runScanFn(this.isAlipayClient ? options.options : options);
+          runScanFn(window.isAlipayClient ? options.options : options);
         });
       } else {
         this.$wx.scanQRCode({

+ 1 - 1
src/pages/parkingFee/mixins/vehicleManagement.js

@@ -86,7 +86,7 @@ export default {
       this.getKipMemberVehicles();
     } else {
       wxToLoginCallback('vehicleManagement', (options) => {
-        if (this.isAlipayClient && options?.options?.noLoginParkingFeeWebView === 'fail' || options?.noLoginParkingFeeWebView === 'fail') {
+        if (window.isAlipayClient && options?.options?.noLoginParkingFeeWebView === 'fail' || options?.noLoginParkingFeeWebView === 'fail') {
           // 如果是用户明确拒绝登录,执行这段逻辑
           setTimeout(() => {
             Toast({

+ 1 - 2
src/pages/parkingFeeV2/Discounts/index.js

@@ -1,9 +1,8 @@
 import { Toast } from "vant";
 import { mapState } from 'vuex';
 import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
-import { cloneDeep } from 'lodash'
 import baseMixins from '../mixins/base';
-import { waitByTime } from "@/utils";
+import { waitByTime, cloneDeep } from "@/utils";
 // import uni from '@/utils/uniHooks';
 // const app = getApp()
 export default {

+ 5 - 5
src/pages/parkingFeeV2/Discounts/index.less

@@ -151,17 +151,17 @@
   }
 }
 
-/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+:deep(checkbox)  .wx-checkbox-input.wx-checkbox-input-checked {
   background-color: red !important;
   border-radius: 50% !important;
   border: 1px solid red;
 }
 
-/deep/ checkbox .wx-checkbox-input {
+:deep(checkbox) .wx-checkbox-input {
   border-radius: 50% !important;
 }
 
-/deep/ .van-stepper__input {
+:deep(.van-stepper__input) {
   background-color: #ffffff;
   font-size: 34px;
   border: 1px solid #e5e5e5;
@@ -171,12 +171,12 @@
   margin-right: 0;
 }
 
-/deep/ .van-stepper__minus {
+:deep(.van-stepper__minus) {
   border: 1px solid #e5e5e5;
   border-right: 0;
 }
 
-/deep/ .van-stepper__plus {
+:deep(.van-stepper__plus) {
   border: 1px solid #e5e5e5;
   border-left: 0;
 }

+ 2 - 2
src/pages/parkingFeeV2/Discounts/index.vue

@@ -40,8 +40,8 @@
         <div class="flewx-content">
           <div class="fee-box">
             <div>合计:</div>
-            <div class="actualPayFee">{{ actualPayFee | currency }}</div>
-            <div :class="['van-hairline--surround', 'usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']">已优惠{{ usingTotalDiscount | currency }}元</div>
+            <div class="actualPayFee">{{ $currency(actualPayFee) }}</div>
+            <div :class="['van-hairline--surround', 'usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']">已优惠{{ $currency(usingTotalDiscount) }}元</div>
             <!-- <van-count-down :time="3 * 60 * 1000" /> -->
           </div>
         </div>

+ 48 - 0
src/pages/parkingFeeV2/composition/useCoreFeatures.js

@@ -0,0 +1,48 @@
+import { computed, watch, ref } from 'vue';
+import { useStore } from 'vuex';
+
+export default function useCoreFeatures() {
+  const store = useStore();
+
+  const componentName = ref('');
+  const theme = ref('theme-mall');
+
+  // 使用 computed 创建响应式引用
+  const custTypeId = computed(() => store.state.custTypeId);
+  const source = computed(() => store.state.source);
+
+  // 主题初始化函数
+  const themeInit = () => {
+    const com = ['purpleCom', 'blueCom', 'greenCom', 'officeBlueCom', 'purpleCom'];
+    if (custTypeId.value < 3 || !custTypeId.value) {
+      componentName.value = 'baseParkingFeeCom';
+      theme.value = 'theme-mall';
+    } else {
+      componentName.value = com[custTypeId.value];
+      theme.value = 'theme-office';
+    }
+
+    switch (source.value) {
+      case 'KIP':
+        theme.value = 'theme-office';
+        break;
+      case 'PUDONG':
+        theme.value = 'theme-pudong';
+        break;
+      case 'JINGAN':
+        theme.value = 'theme-jingan';
+        break;
+    }
+  };
+
+  // 监视 source 的变化
+  watch(
+    source,
+    () => {
+      themeInit();
+    },
+    { immediate: true },
+  );
+
+  return { custTypeId, source, theme, componentName };
+}

+ 4 - 1
src/pages/parkingFeeV2/mixins/base.js

@@ -2,7 +2,7 @@ import { mapState } from "vuex";
 import {getsTheCurrentTopic} from '@/utils/index'
 
 export default {
-  data() {
+  setup() {
     return {
       componentName: '',
       theme: 'theme-mall',
@@ -19,6 +19,9 @@ export default {
       this.themeInit()
     }
   },
+  created() {
+    this.themeInit()
+  },
   mounted() {
     this.themeInit()
   },

+ 26 - 19
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -7,6 +7,18 @@ import {getUrlParams, isHZ, isAlipay} from '@/utils';
 import wxPointsAuth from '@/components/wx-points-auth/wx-points-auth.vue'
 import wxPointsCommit from '@/components/wx-points-commit/wx-points-commit.vue'
 import CacheTool from '@/utils/cache-tool'
+/*图片导入*/
+import IconOrderPng from '@/pages/parkingFee/static/images/icon-order.png';
+import LeafSvg from '@/pages/parkingFee/static/images/unlicensed/leaf.svg';
+import iconTicketPng from '@/pages/parkingFee/static/images/icon-ticket.png';
+import iconCarPng from '@/pages/parkingFee/static/images/icon-car.png';
+import iconCouponPng from '@/pages/parkingFee/static/images/icon-coupon.png';
+import parkingRightsSvg from '@/pages/parkingFee/static/images/parkingRights.svg';
+import findCarPng from '@/pages/parkingFee/static/images/find_car.png';
+import unlicensed1Png from '@/pages/parkingFee/static/images/unlicensed-1.png';
+import unlicensed0Png from '@/pages/parkingFee/static/images/unlicensed-0.png';
+import unlicensedScanPng from '@/pages/parkingFee/static/images/unlicensed-scan.png';
+
 const app = {
   globalData: {
     regSource: '',
@@ -56,7 +68,6 @@ export default {
       tabbarActive: 'manualPayment',
       supportUnlicensed: false, // 控制当前site,是否使用无牌车
       qrCodeHistory: '',
-      // isAlipayClient: isAlipayClient,
       // custTypeId: 0,
       // 2.19新增内容
       eligibility: {}, // 
@@ -65,7 +76,18 @@ export default {
       portalsByLbsList: [],
       portalsByLbsInfo: {},
       enableDiscountVehicle: '',
-      isAlipayFlag: isAlipay()
+      isAlipayFlag: isAlipay(),
+      /*图片导入*/
+      IconOrderPng,
+      LeafSvg,
+      iconTicketPng,
+      iconCarPng,
+      iconCouponPng,
+      parkingRightsSvg,
+      findCarPng,
+      unlicensed1Png,
+      unlicensed0Png,
+      unlicensedScanPng
     };
   },
   computed: {
@@ -176,7 +198,7 @@ export default {
     }
     try {
       const href = window.location.href;
-      if (!this.isAlipayClient && !/808[0-9]/.test(href)) {
+      if (!window.isAlipayClient && !/808[0-9]/.test(href)) {
         setTimeout(async () => {
           await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
         }, 1500)
@@ -953,22 +975,7 @@ export default {
         };
         // 支付宝
         // const platform = getPlatform();
-        if (this.isAlipayClient) {
-          // 判断微信小程序与 h5 是否正常通信
-          // const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
-          // if(!isReload) {
-          //   uni.setStorageSync('isReload', 1)
-          //   window.location.reload()
-          //   return
-          // }
-
-        // 调用扫一扫功能
-        // try {
-          // window.location.href = 'alipays://platformapi/startapp?appId=20000067&url=scanqrcode';
-          // 等待支付宝 JS SDK 准备就绪
-          // document.addEventListener('AlipayJSBridgeReady', () => {
-          //   const AlipayJSBridge = window.AlipayJSBridge;
-            
+        if (window.isAlipayClient) {
             // 调用支付宝扫一扫功能
             window.toWXSendMsg({
               type: 'scanQRCode',

+ 22 - 33
src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js

@@ -1,9 +1,12 @@
-import {mapState} from 'vuex';
+import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
 import {Toast} from 'vant';
-import {getPlatform, getAppIdByGroupIdAndMallId, isInWeixinH5} from '@/utils';
-import moment from 'moment'
-import {debounce, throttle} from 'lodash';
+import {getPlatform, getAppIdByGroupIdAndMallId, isInWeixinH5, debounce} from '@/utils';
+import dayjs from 'dayjs';
+import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
+import noCardPng from '@/pages/parkingFee/static/images/no-card.png'
+// 使用插件
+dayjs.extend(isSameOrAfter);
 
 export default {
   data() {
@@ -22,7 +25,8 @@ export default {
       height: 0,
       rowHeight: 105,
       rowData: [...new Array(30)].map((i, index) => index),
-      handleScrollDebounce: null
+      handleScrollDebounce: null,
+      noCardPng
     };
   },
   computed: {
@@ -174,14 +178,15 @@ export default {
     },
     // 获取还需支付金额
     getAmountToBePaid() {
-      let amountToBePaid = this.totalFee - this.paperDiscountFee - this.remainPrice;
-      if([ 0, 1, 3, 4, 5, 6, 8, 10 ].indexOf(this.parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
-        amountToBePaid = amountToBePaid - this.orderDetail.discountInfo?.points?.[0]?.discountFee
+      const { totalFee, paperDiscountFee, remainPrice, parkMallCode, orderDetail } = this;
+      let amountToBePaid = totalFee - paperDiscountFee - remainPrice;
+      
+      const discountFee = orderDetail.discountInfo?.points?.[0]?.discountFee || 0;
+      // 需要处理的site parkMallCode
+      if ([0, 1, 3, 4, 5, 6, 8, 10].includes(parkMallCode) && discountFee) {
+        amountToBePaid -= discountFee;
       }
-      // if ([4, 6].indexOf(this.parkMallCode) > -1 && this.orderDetail.discountInfo?.points?.[0]?.discountFee) {
-      //   amountToBePaid = amountToBePaid - this.orderDetail.discountInfo?.points?.[0]?.discountFee
-      // }
-      return amountToBePaid
+      return amountToBePaid;
     },
     // 针对达到优惠的上限制
     setAllDisabled() {
@@ -249,7 +254,7 @@ export default {
       let couponList = [...this.couponList]; // 获取目前用户的电子券
       if (!this.checkedCouponList.length) {
         this.couponList = couponList.map(elm => {
-          elm.disabled = elm?.status !== 'available' || !moment().isBefore(elm.expirationDate);
+          elm.disabled = elm?.status !== 'available' || !dayjs().isBefore(elm.expirationDate);
           return elm;
         })
         return
@@ -283,9 +288,9 @@ export default {
               ...this.couponList[elmIndex]
             }
             // 只有 status === 'available' 的才会赋值为 false
-            elm.disabled = elm?.status !== 'available' || !moment().isBefore(elm.expirationDate); // 默认可选
+            elm.disabled = elm?.status !== 'available' || !dayjs().isBefore(elm.expirationDate); // 默认可选
             // 找到所以 superposition === 2 的同类型的券
-            if (elm?.status === 'unavailable' || moment().isSameOrAfter(elm.expirationDate)) {
+            if (elm?.status === 'unavailable' || dayjs().isSameOrAfter(elm.expirationDate)) {
               // 这里是做一个阻断,就是避免程序往下执行,没有别的意思
               elm.disabled = true
             } else if (elm.superposition === superposition) { // 这里是找到一样类型的券
@@ -311,7 +316,7 @@ export default {
     isDisabledByRule(item, index, showMsg) {
       const {parkMallCode} = this.orderDetail.parkInfo;
       // 最高优先级,提示未生效的电子券
-      if (item.status === 'unavailable' || moment().isSameOrAfter(item.expirationDate)) {
+      if (item.status === 'unavailable' || dayjs().isSameOrAfter(item.expirationDate)) {
         return Toast({
           message: `当前电子券暂未生效,不可用`,
           className: "white-space",
@@ -421,23 +426,7 @@ export default {
     },
     // 跳转小程序
     navigateToMiniProgram() {
-      if (this.platform === 'miniprogram') {
-        window.toWXSendMsg({
-          type: 'navigateToMiniProgram',
-          options: {
-            retailLbsId: this.lbsId,
-          },
-        });
-        // 订阅微信小程序端的回调
-        window.subscribe('navigateToMiniProgramOver', (options) => {
-          if (options.navigateToMiniProgramOver === 'ok') {
-            this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
-              name: 'parkingFeeDetail',
-            });
-            this.$router.go(-2);
-          }
-        });
-      }
+      // TODO 跳转小程序
     },
     // H5 跳转到小程序
     launchFn({appId, extInfo}) {

+ 1 - 88
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -6,8 +6,8 @@ import {
   getPlatform,
   isAlipay,
   waitByTime,
+  debounce
 } from '@/utils';
-import {debounce, } from 'lodash'
 import { Dialog, Toast } from 'vant';
 import { ordersAndPrepay } from '@/api/parking';
 import store from "@/store";
@@ -186,20 +186,6 @@ export default {
     //   return `${this.available}积分可减免`;
     // },
   },
-  filters: {
-    parkingTime(val) {
-      const days = parseInt(val / 60 / 24)
-      const hours = parseInt((val / 60) % 24)
-      const minutes = parseInt(val % 60)
-      if (days > 0) {
-        return `${days}天 ${hours}小时 ${minutes}分钟`
-      }
-      if (hours > 0) {
-        return `${hours}小时 ${minutes}分钟`
-      }
-      return `${minutes}分钟`
-    },
-  },
   methods: {
     // 刷新管理
     reloadPage() {
@@ -248,15 +234,6 @@ export default {
     },
     // 前往支付
     async toPay() {
-      // if (!isAlipayClient) {
-      //   // 判断微信小程序与 h5 是否正常通信
-      //   const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
-      //   if(!isReload) {
-      //     uni.setStorageSync('isReload', 1)
-      //     window.location.reload()
-      //     return
-      //   }  
-      // }
       if (this.btnLoading) return
       this.btnLoading = true
       setTimeout(() => {
@@ -553,35 +530,9 @@ export default {
         header: JSON.parse(uni.getStorageSync('handleUser')),
       })
         .then(async (res) => {
-          // this.Toastloading.clear();
-          // console.log(1795, res);
           if (res.data?.code == '000000') {
             const prepayJson = res.data.data.params;
-            // console.log('prepayJson::', res.data)
-            // const platform = getPlatform();
             this.isPay = true
-            // TODO: h5环境判断
-            // if (platform === 'micromessenger') {
-              // const weixinH5PayRes = await this.weixinH5Pay(prepayJson);
-              // // 微信支付完成,判断结果
-              // // console.log(1784, weixinH5PayRes);
-              // //  errMsg: 'requestPayment:ok'
-              // if (weixinH5PayRes?.errMsg === 'requestPayment:ok') {
-              //   this.btnLoading = false
-              //   this.isPay = false
-              //   this.clearOrderTimeEvent()
-              //   this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
-              //     name: 'parkingFeeDetail',
-              //   });
-              //   this.$router.replace({
-              //     // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
-              //     path: this.getPagePath(),
-              //     query: {...this.$route.query}
-              //   });
-              // } else {
-              //   this.reCreateParkOrder();
-              // }
-            // } else {
               let options = {}
               if (isAlipay()) {
                 options = {
@@ -656,42 +607,6 @@ export default {
                   }`,
                 });
               }
-              
-              // return
-              // window?.toWXSendMsg({
-              //   type: 'nowRoute',
-              //   options: {
-              //     fullPath: '1'
-              //   },
-              // });
-              // window.toWXSendMsg({
-              //   type: 'openWxPay',
-              //   options: options,
-              // });
-              // window.subscribe('wxPayOver', (options) => {
-              //   if(isAlipayClient) {
-              //     options.wxPayOver = options.options.wxPayOver 
-              //   }
-              //   // this.Toastloading.clear();
-              //   // console.log('微信支付结束之后的返回参数', options);
-              //   // T-ODO: 在 qa 新发版前,只提示支付成功的信息(已处理成功信息)
-              //   if (options?.wxPayOver === 'fail') {
-              //     console.log('支付失败');
-              //     this.reCreateParkOrder();
-              //   } else {
-              //     this.btnLoading = false;
-              //     this.isPay = false
-              //     this.clearOrderTimeEvent()
-              //     this.$router.replace({
-              //       // path: 'parkingFeeSuccess?vehicleNo=' + this.$route.query.vehicleNo,
-              //       path: this.getPagePath(),
-              //       query:{
-              //         ...this.$route.query,
-              //       }
-              //     });
-              //   }
-              // });
-            // }
           } else {
             this.reCreateParkOrder();
           }
@@ -800,8 +715,6 @@ export default {
         console.log('无牌车扫码出场', this.unlicensedInfo, this.endlessLoop);
         this.btnLoading = false
         this.isPay = false
-        // return
-        console.log('this.$route.query:::', this.$route.query)
         this.$store.dispatch('order/orderInit', {
           ...this.$route.query,
           vehicleNo: this.$route.query.vehicleNo,

+ 0 - 25
src/pages/parkingFeeV2/mixins/parkingFeeDetailSuccess.js

@@ -1,9 +1,6 @@
 import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
 import { orderInfo } from '@/api/parking';
-import ordersInfoMockData from '@/api/mockData/ordersInfo.json';
-import { ORDER_STATUS } from '@/common/js/BaseDictionary'
-import moment from 'moment'
 export default {
   data() {
     return {
@@ -109,27 +106,5 @@ export default {
       const lbsList = ['8a8884e77cc9e70a017cca4003590008','8a8485067ce4da2d017ce555e9b20000','8aaa80b47c784020017c78b205ba0023']
       return lbsList.indexOf(this.mallId) > -1
     },
-  },
-  filters: {
-    orderStatus(val) {
-      return ORDER_STATUS[val]
-    },
-    parkingTime(val) {
-      const time = val;
-      const days = parseInt(time / 60 / 24);
-      const hours = parseInt((time / 60) % 24);
-      const minutes = parseInt(time % 60);
-      if (days > 0) {
-        return `${days}天 ${hours}小时 ${minutes}分钟`;
-      }
-      if (hours > 0) {
-        return `${hours}小时 ${minutes}分钟`;
-      }
-      return `${minutes}分钟`;
-    },
-    momentFormat(val) {
-      if(!val)return val
-      return moment(val).format('YYYY-MM-DD hh:mm:ss')
-    }
   }
 };

+ 1 - 1
src/pages/parkingFeeV2/mixins/parkingFeeDiscounts.js

@@ -1,7 +1,7 @@
 import { Toast } from "vant";
 import { mapState } from 'vuex';
 import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
-import { cloneDeep } from 'lodash'
+import { cloneDeep } from '@/utils/index'
 // import uni from '@/utils/uniHooks';
 // const app = getApp()
 export default {

+ 8 - 18
src/pages/parkingFeeV2/mixins/parkingFeeList.js

@@ -6,6 +6,10 @@ import { orders } from '@/api/parking';
 import orderMockData from '@/api/mockData/orders.json'
 import { ORDER_STATUS } from '@/common/js/BaseDictionary'
 
+import vectorPng from '@/pages/parkingFee/static/images/vector.png';
+import carTimePng from '@/pages/parkingFee/static/images/car_time.png';
+import parkingRoomPng from '@/pages/parkingFee/static/images/parking_room.png';
+
 let canloading = true;
 let pageNum = 0;
 // import moment from 'moment';
@@ -22,6 +26,9 @@ export default {
       list: [],
       numberOfElements: 1,
       pageNum: 0,
+      vectorPng,
+      carTimePng,
+      parkingRoomPng
     };
   },
   computed: {
@@ -44,7 +51,7 @@ export default {
         })
         return
       }
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
           my?.reLaunch({
             url: "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1&fromPage=parkingFeeList" // 去 login 页面 1 去登录
           })
@@ -65,23 +72,6 @@ export default {
     console.log(43, member);
     this.loadData();
   },
-  filters: {
-    parkingTime( val ) {
-      const days = parseInt(val / 60 / 24);
-      const hours = parseInt(( val / 60 ) % 24);
-      const minutes = parseInt(val % 60);
-      if ( days > 0 ) {
-        return `${ days }天 ${ hours }小时 ${ minutes }分钟`;
-      }
-      if ( hours > 0 ) {
-        return `${ hours }小时 ${ minutes }分钟`;
-      }
-      return `${ minutes }分钟`;
-    },
-    orderStatus( val ) {
-      return ORDER_STATUS[val]
-    }
-  },
   methods: {
     bindscrolltolower: function () {
       if ( canloading ) {

+ 5 - 4
src/pages/parkingFeeV2/mixins/parkingFeePaperCoupon.js

@@ -5,8 +5,8 @@ const app = {};
 import { mapState } from 'vuex';
 import fuiToast from '@/components/fui-toast/fui-toast.vue';
 import { initWxJsSdkConfig } from '@/utils/login';
-import { getPlatform, theCommunicationBetweenWechatAndH5IsNormal } from '@/utils';
 import { paperCoupon } from '@/api/parking'
+import sweepPng from '@/pages/parkingFee/static/images/sweep.png'
 
 export default {
   components: {
@@ -29,6 +29,7 @@ export default {
       // maxonedaydiscountFee: 0, // 每天优惠上限金额
       // parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
       // parkInfo: {},
+      sweepPng
     };
   },
   async mounted() {
@@ -57,7 +58,7 @@ export default {
     try {
       const href = window.location.href;
       console.log('初始化扫码1');
-      if(!this.isAlipayClient && !/808[0-9]/.test(href)) {
+      if(!window.isAlipayClient && !/808[0-9]/.test(href)) {
         setTimeout(async () => {
           console.log('初始化扫码2');
           await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
@@ -107,7 +108,7 @@ export default {
     // this.getPaperCouponInfo(test.result);
     // return
       const runScanFn = ( res ) => {
-        if ( res.scanType == 'QR_CODE' && res.scanType || (this.isAlipayClient && res.scanType == 'QR')) {
+        if ( res.scanType == 'QR_CODE' && res.scanType || (window.isAlipayClient && res.scanType == 'QR')) {
           console.log(res.result);
           const url = res.result;
           if ( url.indexOf('auth/') === -1 ) {
@@ -126,7 +127,7 @@ export default {
       // 支付宝小程序
       // const platform = getPlatform();
       // console.log(110);
-      if ( this.isAlipayClient ) {
+      if ( window.isAlipayClient ) {
         // 调用扫一扫功能
         try {
           AlipayJSBridge.call('scan', {}, (res) => {

+ 2 - 0
src/pages/parkingFeeV2/mixins/parkingFeePayment.js

@@ -1,5 +1,6 @@
 import uni from "@/utils/uniHooks";
 import { mapState } from 'vuex';
+import noCarSvg from '@/pages/parkingFee/static/images/no-car.svg'
 
 export default {
   created() {
@@ -36,6 +37,7 @@ export default {
       vehicleNo: '',
       picUrl: this.$picUrl,
       colorAry: ['blue', 'green'],
+      noCarSvg
     };
   },
   computed: {

+ 1 - 1
src/pages/parkingFeeV2/mixins/parkingFeeSuccess.js

@@ -26,7 +26,7 @@ export default {
         tokenId: this.$route.query.sessionId,
         lbsId: this.$route.query.mallId,
         brandId: this.$route.query.groupId,
-        platform: this.isAlipayClient === true ? 'MP-ALIPAY' : 'MP-WEIXIN'
+        platform: window.isAlipayClient === true ? 'MP-ALIPAY' : 'MP-WEIXIN'
       }
     };
   },

+ 3 - 1
src/pages/parkingFeeV2/mixins/parkingFindCar.js

@@ -19,6 +19,7 @@ import uni from '@/utils/uniHooks.js';
 import { wxToLoginCallback, isHZ } from '@/utils/index';
 import { Toast } from 'vant';
 import { getVehicles, delVehicle, parkingLots , getCarInformation} from '@/api/parking/index'
+import lanyaPng  from '@/pages/parkingFee/static/images/lanya.png'
 
 export default {
   components: {
@@ -65,7 +66,8 @@ export default {
         floorName: '',
         carImage: '',
         parkId: ''
-      }
+      },
+      lanyaPng
     };
   },
   async created() {

+ 4 - 9
src/pages/parkingFeeV2/mixins/parkingFindCarFirst.js

@@ -5,6 +5,7 @@ import {mapState} from 'vuex';
 import {initWxJsSdkConfig} from '@/utils/login';
 import {getUrlParams, isHZ} from '@/utils';
 import wxPointsAuth from '@/components/wx-points-auth/wx-points-auth.vue'
+import leafSvg from '@/pages/parkingFee/static/images/unlicensed/leaf.svg'
 
 const app = {
   globalData: {
@@ -61,7 +62,8 @@ export default {
       eventId: '',
       // 2.22新增内容:https://kerryprops.atlassian.net/browse/KIP-13059
       portalsByLbsList: [],
-      portalsByLbsInfo: {}
+      portalsByLbsInfo: {},
+      leafSvg
     };
   },
   computed: {
@@ -760,14 +762,7 @@ export default {
         };
         // 微信小程序
         // const platform = getPlatform();
-        if (this.isAlipayClient) {
-          // 判断微信小程序与 h5 是否正常通信
-          // const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
-          // if(!isReload) {
-          //   uni.setStorageSync('isReload', 1)
-          //   window.location.reload()
-          //   return
-          // }
+        if (window.isAlipayClient) {
           window.toWXSendMsg({
             type: 'scanQRCode',
           });

+ 17 - 9
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingApplication.js

@@ -65,13 +65,16 @@ export default {
     this.pageOptions = query;
     if (this.pageOptions) {
       const options = this.pageOptions;
+      // 重新开票的逻辑: KIP-15250
       if (this.pageOptions.againInvoiceFlag) {
         this.getInvoicesOrders(options.invoiceId);
       } else {
-        this.invoiceAmount = Number(options.money).toFixed(2);
-        this.$store.commit('setTempParkingOrder', options.invoiceDetailList);
-        this.$store.commit('setTempParkingMoney', this.invoiceAmount);
-        this.parkingDetailList = JSON.parse(options.invoiceDetailList);
+        // this.invoiceAmount = Number(options.money).toFixed(2);
+        // this.$store.commit('setTempParkingOrder', options.invoiceDetailList);
+        // this.$store.commit('setTempParkingMoney', this.invoiceAmount);
+        // this.parkingDetailList = JSON.parse();
+        this.parkingDetailList = this.tempParkingOrder;
+        this.invoiceAmount = this.tempParkingMoney;
       }
       if (options.ids) {
         const ids = options.ids;
@@ -108,10 +111,13 @@ export default {
       storeRemark: (state) => state.invoice.remark,
       storeOldRemark: (state) => state.invoice.oldrRemark,
       source: (state) => state.source, // 来源
+      tempParkingOrder: (state) => state.tempParkingOrder, // 带开票订单数据
+      tempParkingMoney: (state) => state.tempParkingMoney, // 带开票总金额
     }),
   },
   methods: {
-    getInvoicesOrders: async function (id) {
+    // 重新开票的逻辑: KIP-15250
+    async getInvoicesOrders (){
       try {
         const res = await invoicesOrders(id);
         this.invoiceAmount = res.invoiceTotalAmount;
@@ -129,7 +135,7 @@ export default {
         });
       }
     },
-    getEmail: async function () {
+    async getEmail () {
       try {
         const res = await invoiceEmails();
         this.condition.emailAsDefault = res.emailAsDefault || this.storeEmailAsDefault;
@@ -166,7 +172,8 @@ export default {
         query: {
           ...this.$route.query,
           ids: this.ids,
-          invoiceDetailList: JSON.stringify(this.invoiceDetailList),
+          cache: 'true',
+          // invoiceDetailList: JSON.stringify(this.invoiceDetailList),
           money: this.invoiceAmount,
           invoiceId: this.pageOptions?.invoiceId,
         },
@@ -174,11 +181,12 @@ export default {
     },
     gotoDetail() {
       this.$router.push({
-        path: 'parkingOrderDetail?useParkingOrderCache=true',
+        path: 'parkingOrderDetail',
         query: {
           ...this.$route.query,
-          invoiceDetailList: this.pageOptions.againInvoiceFlag ? JSON.stringify(this.parkingOrder) : this.pageOptions.invoiceDetailList,
+          // invoiceDetailList: this.pageOptions.againInvoiceFlag ? JSON.stringify({...this.parkingOrder}) : this.pageOptions.invoiceDetailList,
           money: this.invoiceAmount,
+          useParkingOrderCache: 'true'
         },
       });
     },

+ 0 - 1
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingInvoice.js

@@ -144,7 +144,6 @@ export default {
       });
     },
     showInvoiceDetail() {
-        window.localStorage.setItem('parkingInvoice', JSON.stringify(this.order))
         this.$router.push({
           path: 'parkingInvoiceImage',
           query:{

+ 5 - 2
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingInvoiceImage.js

@@ -5,6 +5,8 @@ import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
 import { invoicesAgainSandEmail, invoiceEmails, getConfValueOfKey } from '@/api/parking';
 
+import emailPng from '@/pages/parkingFee/static/images/email.png'
+
 export default {
   data() {
     return {
@@ -16,7 +18,8 @@ export default {
       order: {},
       res: {},
       preUrl: '',
-      isShowPdfDowload: false
+      isShowPdfDowload: false,
+      emailPng
     };
   },
   created() {
@@ -102,7 +105,7 @@ export default {
           url: `/pages/package-parkingFee/file?invoiceUrl=${encodeURIComponent(this.order.invoiceUrls[0])}`,
         });
       }
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
         my?.navigateTo({
           url: `/pages/package-parkingFee/file?invoiceUrl=${encodeURIComponent(this.order.invoiceUrls[0])}`,
         })

+ 28 - 54
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingOrderDetail.js

@@ -1,6 +1,10 @@
 // const app = getApp()
 import uni from '@/utils/uniHooks';
 import { invoicesOrders } from '@/api/parking';
+import vectorPng from '@/pages/parkingFee/static/images/vector.png';
+import car_timePng from '@/pages/parkingFee/static/images/car_time.png';
+import parking_roomPng from '@/pages/parkingFee/static/images/parking_room.png';
+import {mapState} from "vuex";
 
 export default {
   data() {
@@ -12,62 +16,45 @@ export default {
       orderList: [],
       optionsQuery: null,
       useParkingOrderCache: false,
+      vectorPng,
+      car_timePng,
+      parking_roomPng
     };
   },
+  computed: {
+    ...mapState({
+      custTypeId: (state) => state.custTypeId,
+      groupId: (state) => state.groupId,
+      openid: (state) => state.openid,
+      mallId: (state) => state.mallId,
+      kipUserId: (state) => state.kipUserId,
+      userInfo: (state) => state.userInfo,
+      storeEmail: (state) => state.invoice.email,
+      storeOldEmail: (state) => state.invoice.oldEmail,
+      storeEmailAsDefault: (state) => state.invoice.emailAsDefault,
+      storeRemark: (state) => state.invoice.remark,
+      storeOldRemark: (state) => state.invoice.oldrRemark,
+      source: (state) => state.source, // 来源
+      tempParkingOrder: (state) => state.tempParkingOrder, // 带开票订单数据
+      tempParkingMoney: (state) => state.tempParkingMoney, // 带开票总金额
+    }),
+  },
   created() {
     const options = this.$route.query;
     this.optionsQuery = options;
     this.id = options.id;
     const useParkingOrderCache = options?.useParkingOrderCache || 'false';
+    console.log(4747, options)
     // 如果是通过"发票申请"页面进入的,可以适用本地缓存直接获取数据
     if (useParkingOrderCache == 'true') {
       this.useParkingOrderCache = true;
-      const tempParkingOrder = this.optionsQuery
-      this.parFee = Number(tempParkingOrder.money).toFixed(2);
-      console.log('tempParkingOrder.invoiceDetailList:::', tempParkingOrder.invoiceDetailList)
-      const orderList = JSON.parse(tempParkingOrder.invoiceDetailList);
-      console.log(231,options)
-      console.log(231, orderList)
-      // orderList.forEach((item) => {
-      //   item.invoiceCategory = 0;
-      // });
-      this.orderList = orderList;
+      this.orderList = this.tempParkingOrder;
+      this.parFee = this.tempParkingMoney
     } else {
       this.useParkingOrderCache = false;
       this.getInvoicedDetail(this.id);
     }
   },
-  mounted() {
-    // setTimeout(() => {
-    //   uni.setNavigationBarTitle({
-    //     title: '支付订单详情',
-    //   });
-    // }, 300);
-    // setTimeout(() => {
-    //   window?.toWXSendMsg({
-    //     type: 'uni_func',
-    //     funcName: 'setNavigationBarColor',
-    //     options: {
-    //       frontColor: '#000000',
-    //       backgroundColor: '#FBFCFF',
-    //     },
-    //   });
-    // }, 500)
-  },
-  filters: {
-    parkingTime(val) {
-      const days = parseInt(val / 60 / 24);
-      const hours = parseInt((val / 60) % 24);
-      const minutes = parseInt(val % 60);
-      if (days > 0) {
-        return `${days}天 ${hours}小时 ${minutes}分钟`;
-      }
-      if (hours > 0) {
-        return `${hours}小时 ${minutes}分钟`;
-      }
-      return `${minutes}分钟`;
-    },
-  },
   methods: {
     gotoDetail(item) {
       console.log(this.orderList);
@@ -78,7 +65,6 @@ export default {
           orderNo: item.id
         }
       });
-      // this.$router.push({ path: '/pages/parkingFee/parkingFeeDetailSuccess?orderNo=' + item.orderNo });
     },
     // 根据发票id获取支付记录详情信息
     getInvoicedDetail: async function(id) {
@@ -87,18 +73,6 @@ export default {
         const res = await invoicesOrders(id)
         this.parFee = res.invoiceTotalAmount
         this.orderList = res.invoicedOrders
-        console.log(res, '订单支付详情');
-        // if (res.data.code === 0) {
-        //   self.order = res.data.data.list[0];
-        //   self.parFee = (res.data.data.invoiceAmount / 100).toFixed(2);
-        //   self.orderList = res.data.data.invoicedOrders;
-        // } else {
-        //   uni.showToast({
-        //     title: res.data.msg,
-        //     duration: 2000,
-        //     icon: 'none',
-        //   });
-        // }
       } catch {
         uni.showToast({
           title: '服务器开小差了呢,请您稍后再试',

+ 22 - 23
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingReceipt.js

@@ -1,6 +1,5 @@
 // const app = getApp()
 const app = {};
-import moment from 'moment';
 import arrowIcon from '@/pages/parkingFee/static/images/arrows.png';
 import noData from '@/pages/parkingFee/static/images/no-invoice.svg';
 import { mapState } from 'vuex';
@@ -9,11 +8,18 @@ import LoginDom from '@/components/Login/Login.vue';
 import MemberCacheTool from '@/utils/member-cache-tool.js';
 import { REG_SOURCE } from '@/constants.js';
 import uni from '@/utils/uniHooks';
-import { myNotInvoicedList } from '@/pages/parkingFee/list';
-import { wxToLoginCallback } from '@/utils';
+// import { myNotInvoicedList } from '@/pages/parkingFee/list';
+// import { wxToLoginCallback } from '@/utils';
 import CacheTool from '@/utils/cache-tool'
 import { invoicesCompleted, invoicesNotapplied } from '@/api/parking';
 import { Dialog } from 'vant';
+
+import vectorSvg from '@/pages/parkingFee/static/images/vector.svg';
+import parking_roomSvg from '@/pages/parkingFee/static/images/parking_room.svg';
+import car_timeSvg from '@/pages/parkingFee/static/images/car_time.svg';
+import { toRaw } from 'vue';
+
+
 export default {
   data() {
     return {
@@ -58,7 +64,10 @@ export default {
         }
       },
       // 用户拒绝登录
-      userStopLogin: false
+      userStopLogin: false,
+      vectorSvg,
+      parking_roomSvg,
+      car_timeSvg
     };
   },
   components: {
@@ -142,7 +151,7 @@ export default {
         })
         return
       }
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
           my?.reLaunch({
             "url": "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1&fromPage=parkingReceipt" // 去 login 页面 1 去登录
           })
@@ -159,20 +168,6 @@ export default {
     }
   },
   watch: {},
-  filters: {
-    parkingTime(val) {
-      const days = parseInt(val / 60 / 24);
-      const hours = parseInt((val / 60) % 24);
-      const minutes = parseInt(val % 60);
-      if (days > 0) {
-        return `${days}天 ${hours}小时 ${minutes}分钟`;
-      }
-      if (hours > 0) {
-        return `${hours}小时 ${minutes}分钟`;
-      }
-      return `${minutes}分钟`;
-    },
-  },
   methods: {
     checkboxchange2 (e, index) {
       if (this.boxids.length > this.choosekMax) {
@@ -219,13 +214,18 @@ export default {
         });
         return false;
       }
+      // 开票优化
+      const money  = Number(toRaw(this.totalNum)).toFixed(2);
+      this.$store.commit('setTempParkingOrder', this.invoiceDetailList);
+      this.$store.commit('setTempParkingMoney', money);
       this.$router.push({
         path: 'parkingApplication',
         query: {
           ...this.$route.query,
-          ids: this.ids,
-          invoiceDetailList: JSON.stringify(this.invoiceDetailList),
-          money: this.totalNum
+          ids: JSON.stringify(toRaw(this.ids)),
+          // invoiceDetailList: JSON.stringify(this.invoiceDetailList),
+          cache: 'true',
+          money
         }
       });
     },
@@ -391,7 +391,6 @@ export default {
           ...this.$route.query,
           ids: item.ids,
           invoiceId: item.id,
-          againInvoiceFlag: true
         },
       });
     },

+ 2 - 0
src/pages/parkingFeeV2/mixins/vehicleAddOrEdit.js

@@ -2,6 +2,7 @@ import uniPop from '@/components/uni-popup/uni-popup.vue';
 import plateNumber from '@/components/plate-number/plateNumber.vue';
 import uni from '@/utils/uniHooks';
 import {Toast} from 'vant';
+import leafSvg from '@/pages/parkingFee/static/images/unlicensed/leaf.svg'
 
 import {LICENSE_PLATE_TYPE_ARR} from '@/constants.js';
 import {
@@ -26,6 +27,7 @@ export default {
       vehicleNumber: '',
       licensePlateTypeArr: LICENSE_PLATE_TYPE_ARR,
       preUrl: '',
+      leafSvg
     };
   },
   created() {

+ 14 - 199
src/pages/parkingFeeV2/mixins/vehicleManagement.js

@@ -1,23 +1,23 @@
 import uniPop from '@/components/uni-popup/uni-popup.vue';
-import { Dialog } from 'vant';
 import LoginDom from '@/components/Login/Login.vue';
-// const app = getApp()
-const app = {};
 import {
   kipGetMemberVehicles,
   kipDeleteMemberVehicles,
 } from '@/utils/api-kip.js';
 import { LICENSE_PLATE_TYPE_ARR } from '@/constants.js';
 import { mapState } from 'vuex';
-// import authorize from '@/components/authorize/authorize.vue';
-import { isCruMarketByKey } from '@/utils/location-util.js';
-import MemberCacheTool from '@/utils/member-cache-tool.js';
-import { REG_SOURCE } from '@/constants.js';
 import uni from '@/utils/uniHooks.js';
 // import { vehicles as vehiclesList } from './list';
 import {isHZ, wxToLoginCallback} from '@/utils/index';
 import { Toast } from 'vant';
 import { getVehicles, delVehicle, parkingLots } from '@/api/parking/index'
+import iconCarTypePng from '@/pages/parkingFee/static/images/icon-carType.png'
+import whiteDetailPng from '@/pages/parkingFee/static/images/white_detail.png'
+import whiteEditPng from '@/pages/parkingFee/static/images/white_edit.png'
+import whiteDeletePng from '@/pages/parkingFee/static/images/white_delete.png'
+import successSvg from '@/pages/parkingFee/static/images/success.svg'
+
+
 
 export default {
   components: {
@@ -58,7 +58,11 @@ export default {
       deleteSuccessDialogSwitch: false,
       show: false, // 删除车牌时提示内容
       parkingLotsInfo: {},
-      enableDiscountVehicle: false
+      enableDiscountVehicle: false,
+      iconCarTypePng,
+      whiteDetailPng,
+      whiteEditPng,
+      whiteDeletePng
     };
   },
 
@@ -67,21 +71,6 @@ export default {
     this.parkingLots()
   },
   async mounted() {
-    // setTimeout(() => {
-    //   uni.setNavigationBarTitle({
-    //     title: '车辆管理',
-    //   });
-    // }, 300);
-    // setTimeout(() => {
-    //   window?.toWXSendMsg({
-    //     type: 'uni_func',
-    //     funcName: 'setNavigationBarColor',
-    //     options: {
-    //       frontColor: '#000000',
-    //       backgroundColor: '#FBFCFF',
-    //     },
-    //   });
-    // }, 500)
     this.$store.dispatch('clearUnlicensed');
     // const member = uni.getStorageSync('member');
     console.log(7979, this.isLogin);
@@ -95,7 +84,7 @@ export default {
         })
         return
       }
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
           my?.reLaunch({
             url: "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1&fromPage=vehicleManagement" // 去 login 页面 1 去登录
           })
@@ -202,7 +191,6 @@ export default {
       })
     },
     toPay(carno) {
-      console.log(145, this.isNoLogin, this.isLogin);
       if (this.isNoLogin) return
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         name: 'parkingFeeDetail',
@@ -220,76 +208,6 @@ export default {
           },
         });
       });
-      return
-      // 查询车费信息
-      uni.showLoading({
-        title: '加载中',
-      });
-      // const openId = MemberCacheTool.getOpenId(app)
-      const params = {
-        carno,
-        mallid: this.mallid,
-        openid: this.openid,
-        vipcode: this.member?.vipcode,
-        mobile: this.mobile,
-        groupId: this.groupId,
-        createuser: 'sys_miniprogram',
-      };
-      this.$md(params);
-      this.$request({
-        url: this.$baseURL + 'api/1.0/park/checkCarIsInPark',
-        data: params,
-        method: 'POST',
-        header: JSON.parse(uni.getStorageSync('handleUser')),
-        timeout: 10000,
-      })
-        .then((res) => {
-          // console.log(227, res);
-          uni.hideLoading();
-          if (res.data.code === 0) {
-            this.$router.push({
-              path: 'parkingFeeDetail',
-              query:{
-                ...this.$route.query,
-                carno: carno
-              }
-            });
-          } else if (res.data.code === 1) {
-            // 当前车辆没有查到账单
-            this.$router.push({
-              path: 'parkingFeePayment',
-              query:{
-                ...this.$route.query,
-                msg: res.data.msg,
-                carno: carno
-              }
-            });
-          } else if (res.data.code === 2) {
-            // 月租车
-            this.$router.push({
-              path: './parkingFeeHint/parkingFeeHint',
-              query:{
-                ...this.$route.query,
-                carno: carno
-              }
-            });
-          } else {
-            uni.showToast({
-              title: res.data.msg,
-              duration: 2000,
-              icon: 'none',
-            });
-          }
-        })
-        .catch((err) => {
-          uni.hideLoading();
-          uni.showToast({
-            title: '网络超时请稍后再试',
-            duration: 2000,
-            icon: 'none',
-          });
-          console.log(err);
-        });
     },
     // 编辑
     toEdit(item) {
@@ -331,7 +249,7 @@ export default {
         position: 'top',
         duration: 5000,
         className: 'top300',
-        icon: require('@/pages/parkingFee/static/images/success.svg')
+        icon: successSvg
       });
       setTimeout(() => {
         this.getKipMemberVehicles();
@@ -355,71 +273,9 @@ export default {
         },
         bottomBtnName: '取消'
       })
-      
-
-      // Dialog.confirm({
-      //   title: '删除已绑定车牌',
-      //   message: '是否确认删除已经绑定车牌' + '\n' + this.activeCarno,
-      //   confirmButtonColor: '#333',
-      // })
-      //   .then(() => {
-      //     // on confirm
-      //     this.doDelete();
-      //   })
-      //   .catch(() => {
-      //     // on cancel
-      //     // this.cancelDelete();
-      //   });
-      // this.deleteDialogSwitch = true;
     },
     doDelete() {
       this.delVehicleInTMP();
-      return
-      uni.showLoading({
-        title: '加载中',
-      });
-      const _this = this;
-      kipDeleteMemberVehicles(this.activeId)
-        .then((result) => {
-          uni.hideLoading();
-          // console.log(resp)
-          // const result = resp.data
-          if (result && result.code == '000000') {
-            if (result.data) {
-              // this.deleteDialogSwitch = false;
-              // this.deleteSuccessDialogSwitch = true;
-
-              Toast({
-                message: '删除成功',
-                type: 'success',
-                position: 'top',
-                duration: 5000,
-                className: 'top300',
-                icon: require('@/pages/parkingFee/static/images/success.svg')
-              });
-              setTimeout(() => {
-                this.getKipMemberVehicles();
-              }, 1500)
-              // _this.$refs.deleteSuccessDialog.open()
-              return;
-            }
-          }
-          const message = result.message || '删除失败';
-          uni.showToast({
-            title: message,
-            duration: 2000,
-            icon: 'none',
-          });
-        })
-        .catch((err) => {
-          uni.hideLoading();
-          console.log(err);
-          uni.showToast({
-            title: '删除失败',
-            duration: 2000,
-            icon: 'none',
-          });
-        });
     },
     cancelDelete() {
       this.deleteDialogSwitch = true;
@@ -437,47 +293,6 @@ export default {
     },
     getKipMemberVehicles() {
       this.getVehiclesINTMP();
-      return
-      // console.log(453);
-      uni.showLoading({
-        title: '加载中',
-      });
-      kipGetMemberVehicles()
-        .then((result) => {
-          uni.hideLoading();
-          console.log(result);
-          // const result = resp.data
-          if (result && result.code == '000000') {
-            const data = result.data || [];
-            if (data && data.length > 0) {
-              // data.forEach((item) => {
-              //   const curLicensePlateType = LICENSE_PLATE_TYPE_ARR.find(
-              //     (e) => e.value == item.licensePlateType
-              //   )
-              //   if (curLicensePlateType) {
-              //     item.licensePlateTypeDesc = curLicensePlateType.label
-              //   }
-              // })
-              this.licensePlateList = this.setLicensePlateList(data);
-            } else {
-              this.licensePlateList = [];
-            }
-            // this.licensePlateList = vehiclesList.data;
-          } else {
-            const message = result.message || '获取信息失败';
-            uni.showToast({
-              title: message,
-              duration: 2000,
-              icon: 'none',
-            });
-          }
-          // console.log(380, this.licensePlateList);
-        })
-        .catch((err) => {
-          uni.hideLoading();
-          console.error(err);
-        });
-      // this.licensePlateList = this.setLicensePlateList(vehiclesList.data);
     },
     setLicensePlateList(data) {
       if (!data.length) return [];

+ 20 - 20
src/pages/parkingFeeV2/parkingFee.vue

@@ -14,15 +14,15 @@
             }"
           >
             <div class="menu_item" @click="menuToPage('PAYMENT_RECORDS')">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-order.png`)}`" />
+              <img :src="IconOrderPng" />
               <span>缴费记录</span>
             </div>
             <div class="menu_item" @click="menuToPage('PARKING_INVOICE')">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-ticket.png`)}`" />
+              <img :src="iconTicketPng" />
               <span>停车开票</span>
             </div>
             <div class="menu_item" @click="menuToPage('VEHICLE_MANAGE')">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-car.png`)}`" />
+              <img :src="iconCarPng" />
               <span>车辆管理</span>
             </div>
           </div>
@@ -36,27 +36,27 @@
             v-if="custTypeId >= 0 && (portalsByLbsList.length < 5 || portalsByLbsList.length === 5) && source !== 'KIP'"
           >
             <div class="menu_item" @click="menuToPage('PAYMENT_RECORDS')" v-if="portalsByLbsList.indexOf('PAYMENT_RECORDS') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-order.png`)}`" />
+              <img :src="IconOrderPng" />
               <span>缴费记录</span>
             </div>
             <div class="menu_item" @click="menuToPage('COUPON_EXCHANGE')" v-if="portalsByLbsList.indexOf('COUPON_EXCHANGE') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-coupon.png`)}`" />
+              <img :src="iconCouponPng" />
               <span>停车券兑换</span>
             </div>
             <div class="menu_item" @click="menuToPage('PARKING_INVOICE')" v-if="portalsByLbsList.indexOf('PARKING_INVOICE') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-ticket.png`)}`" />
+              <img :src="iconTicketPng" />
               <span>停车开票</span>
             </div>
             <div class="menu_item" @click="menuToPage('VEHICLE_MANAGE')" v-if="portalsByLbsList.indexOf('VEHICLE_MANAGE') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-car.png`)}`" />
+              <img :src="iconCarPng" />
               <span>车辆管理</span>
             </div>
             <div class="menu_item" @click="menuToPage('PARKING_BENEFITS')" v-if="portalsByLbsList.indexOf('PARKING_BENEFITS') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/parkingRights.svg`)}`" />
+              <img :src="parkingRightsSvg" />
               <span>停车权益</span>
             </div>
             <div class="menu_item" @click="menuToPage('FIND_CAR')" v-if="portalsByLbsList.indexOf('FIND_CAR') > -1 && !isAlipayFlag">
-              <img :src="`${require(`@/pages/parkingFee/static/images/find_car.png`)}`"/>
+              <img :src="findCarPng"/>
               <span>反向寻车</span>
             </div>
           </div>
@@ -72,15 +72,15 @@
             
           >
             <div class="menu_item" @click="menuToPage('PAYMENT_RECORDS')" v-if="portalsByLbsList.indexOf('PAYMENT_RECORDS') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-order.png`)}`" />
+              <img :src="IconOrderPng" />
               <span>缴费记录</span>
             </div>
             <div class="menu_item" @click="menuToPage('COUPON_EXCHANGE')" v-if="portalsByLbsList.indexOf('COUPON_EXCHANGE') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-coupon.png`)}`" />
+              <img :src="iconCouponPng" />
               <span>停车券兑换</span>
             </div>
             <div class="menu_item" @click="menuToPage('PARKING_INVOICE')" v-if="portalsByLbsList.indexOf('PARKING_INVOICE') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-ticket.png`)}`" />
+              <img :src="iconTicketPng" />
               <span>停车开票</span>
             </div>
           </div>
@@ -93,15 +93,15 @@
           }"
           >
             <div class="menu_item" @click="menuToPage('FIND_CAR')" v-if="portalsByLbsList.indexOf('FIND_CAR') > -1 && !isAlipayFlag">
-              <img :src="`${require(`@/pages/parkingFee/static/images/find_car.png`)}`"/>
+              <img :src="findCarPng"/>
               <span>反向寻车</span>
             </div>
             <div class="menu_item" @click="menuToPage('VEHICLE_MANAGE')">
-              <img :src="`${require(`@/pages/parkingFee/static/images/icon-car.png`)}`" v-if="portalsByLbsList.indexOf('VEHICLE_MANAGE') > -1" />
+              <img :src="iconCarPng" v-if="portalsByLbsList.indexOf('VEHICLE_MANAGE') > -1" />
               <span>车辆管理</span>
             </div>
             <div class="menu_item" @click="menuToPage('PARKING_BENEFITS')" v-if="portalsByLbsList.indexOf('PARKING_BENEFITS') > -1">
-              <img :src="`${require(`@/pages/parkingFee/static/images/parkingRights.svg`)}`" />
+              <img :src="parkingRightsSvg" />
               <span>停车权益</span>
             </div>
           </div>
@@ -118,17 +118,17 @@
             <div class="unlicensed-box" v-if="tabbarActive === 'paymentForUnregisteredVehicle' && source !== 'KIP'">
               <!-- 无牌车 -->
               <div class="no-car-unlicensed-box" v-if="!unlicensedCar">
-                <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-1.png`)}`" />
+                <img :src="unlicensed1Png" />
                 <div class="no-car-unlicensed-info">未查询到无牌车信息</div>
                 <div class="search-btn no-car-unlicensed-btn" @click="scanCarCode">
                   <!-- <van-icon name="scan" />扫描进场二维码领取无牌车号牌 -->
-                  <img class="unlicensed-scan" :src="`${require(`@/pages/parkingFee/static/images/unlicensed-scan.png`)}`" /><span class="text">扫描进场二维码领取无牌车号牌</span>
+                  <img class="unlicensed-scan" :src="unlicensedScanPng" /><span class="text">扫描进场二维码领取无牌车号牌</span>
                 </div>
               </div>
               <!-- 有无牌车 -->
               <div class="in-car" v-if="unlicensedCar">
                 <div class="car-number-box">
-                  <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-0.png`)}`" />
+                  <img :src="unlicensed0Png" />
                   <div class="car-number">
                     <div class="number">{{ unlicensedCar }}</div>
                     <div class="tips">车辆类型:无牌车辆</div>
@@ -181,7 +181,7 @@
                   </div>
                   <div class="li dashed green-active" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" >
                     <span v-if="carType === 1">{{ numArr[7] }}</span>
-                   <img v-else :src="require('@/pages/parkingFee/static/images/unlicensed/leaf.svg')">
+                   <img v-else :src="LeafSvg">
                   </div>
                 </div>
                 <k-button title="查询缴费" style="margin-top: 46px;margin-bottom: 43px;" :disabled="disabledBtn" disabledColor="#D1D2D9" @click="preHandleSearch" />
@@ -194,7 +194,7 @@
                 </div>
                 <div class="vehicleMgt-content" v-if="carList.length">
                   <div class="item" v-for="(item, index) in carList" :key="index" @click="toHandleSearchBefore(item, 1)" :class="vehicleNumber == item ? 'vehicleMgt-content_cls' : ''">
-                    {{ item | formatCarno }}
+                    {{ $formatCarno(item) }}
                   </div>
                 </div>
               </div>

+ 10 - 9
src/pages/parkingFeeV2/parkingFeeCoupon.vue

@@ -1,9 +1,9 @@
 <template>
-  <div scroll-y="true" :class="['scroll-Y', theme]">
+  <div scroll-y="true" :class="['scroll-Y' , theme]">
     <div>
       <div class="parkingFeeCoupon">
         <van-checkbox-group :value="checkedCouponList">
-          <div class="card-list" v-if="couponList.length">
+          <div class="card-list" v-if="couponList.length && false">
             <div v-for="(item, index) in couponList" :key="index" ref="couponItem">
               <div v-if="rowData.indexOf(index)> -1" class="item" @click="checkboxItemChange(`coupon${index}`, index)">
                 <div class="coupon-active" v-if="checkedCouponList.indexOf(`coupon${index}`) > -1">
@@ -42,7 +42,7 @@
             </div>
           </div>
           <div class="no-coupon" v-else>
-            <img :src="require('@/pages/parkingFee/static/images/no-card.png')"/>
+            <img :src="noCardPng"/>
             <span class="message">您还没有卡券</span>
           </div>
         </van-checkbox-group>
@@ -61,9 +61,9 @@
             停车优惠券可直接使用,若您还没有兑换或继续兑换,可前往
             <span class="guide-mini">嘉里中心小程序>积分商城</span>
             <wx-open-launch-weapp username="gh_0bd6a97b6d38" id="launch-btn" :path="`pages/pointsMall/pointsMallNew.html${launchPath}`" class="wx-open-launch-weapp" :env-version="envVersion" :extra-data="{...extraData, navigate_time:new Date().getTime()}" @launch="launchFn" @error="launchErrorFn">
-              <script type="text/wxtag-template">
+              <component :is="'script'" type="text/wxtag-template">
                 <span style="white-space: nowrap;display: inline-block;color: transparent;text-decoration: underline;margin: 0 5px;font-size: 14PX;"></span>
-              </script>
+              </component>
             </wx-open-launch-weapp>
             进行兑换
           </div>
@@ -77,13 +77,13 @@
           <div class="fee-box">
             <div>合计:</div>
             <div class="actualPayFee">{{
-                actualPayFee | currency
+                $currency(actualPayFee)
               }}
             </div>
             <!-- <van-count-down :time="3 * 60 * 1000" /> -->
           </div>
           <div :class="['van-hairline--surround','usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']"
-          >已优惠{{ usingTotalDiscount | currency }}元
+          >已优惠{{ $currency(usingTotalDiscount)  }}元
           </div
           >
         </div>
@@ -131,6 +131,7 @@ export default {
   box-sizing: border-box;
   flex: 1;
   position: relative;
+
   .item {
     box-sizing: border-box;
     width: 100%;
@@ -387,13 +388,13 @@ export default {
 
 }
 
-/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+:deep(checkbox) .wx-checkbox-input.wx-checkbox-input-checked {
   background-color: red !important;
   border-radius: 50% !important;
   border: 1px solid red;
 }
 
-/deep/ checkbox .wx-checkbox-input {
+:deep(checkbox) .wx-checkbox-input {
   border-radius: 50% !important;
 }
 </style>

+ 10 - 10
src/pages/parkingFeeV2/parkingFeeDetail.vue

@@ -4,8 +4,7 @@
       <div
         class="vehicleNo"
       >
-        {{ orderDetail.parkingRecord.vehicleNo | formatCarno }}
-        <!-- {{ $route.query.carno | formatCarno }} -->
+        {{ $formatCarno(orderDetail.parkingRecord.vehicleNo) }}
       </div>
       <div class="info-box mb--20">
         <div class="info-item-box">
@@ -18,13 +17,13 @@
         </div>
         <div class="info-item-box">
           <div class="label">已停车时长</div>
-          <div class="value">{{ orderDetail.parkingRecord.serviceMin | parkingTime }}</div>
+          <div class="value">{{ $parkingTime(orderDetail.parkingRecord.serviceMin) }}</div>
         </div>
         <div class="van-hairline--bottom hr"></div>
         <div class="info-item-box npb">
           <div class="label pb--27">应缴</div>
           <div class="value bold-fz">
-            {{ ( orderDetail.parkingRecord.totalFee ) | currency }}
+            {{ $currency( orderDetail.parkingRecord.totalFee) }}
           </div>
         </div>
       </div>
@@ -59,13 +58,13 @@
         </div>
         <div class="info-item-box">
           <div class="label">优惠金额</div>
-          <div :class="['value']">-{{ usingTotalDiscount | currency }}</div>
+          <div :class="['value']">-{{ $currency(usingTotalDiscount) }}</div>
         </div>
         <div class="van-hairline--bottom hr"></div>
         <div class="info-item-box npb">
           <div class="label pb--27">应付金额</div>
           <div :class="['value', 'bold-fz', usingTotalDiscount === 0 && 'text-red']">
-            {{ actualPayFee | currency }}
+            {{ $currency(actualPayFee) }}
           </div>
         </div>
       </div>
@@ -88,11 +87,11 @@
           <div class="fee-box">
             <div>合计:</div>
             <div class="actualPayFee">{{
-                actualPayFee | currency
+                $currency(actualPayFee)
               }}
             </div>
             <div :class="['van-hairline--surround','usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']"
-            >已优惠{{ usingTotalDiscount | currency }}元
+            >已优惠{{ $currency(usingTotalDiscount) }}元
             </div
             >
             <!-- <van-count-down :time="3 * 60 * 1000" /> -->
@@ -123,7 +122,7 @@
       <van-number-keyboard safe-area-inset-bottom />
     </div>
     <van-popup
-      v-model="popup"
+      v-model:show="popup"
       position="bottom"
       :animation="false"
       :maskClick="false"
@@ -185,7 +184,8 @@ import parkingFeeDetailJs from './mixins/parkingFeeDetail'
 import baseMixins from './mixins/base'
 
 export default {
-  mixins: [baseMixins, parkingFeeDetailJs]
+  name:'parkingFeeDetail'
+  ,mixins: [baseMixins, parkingFeeDetailJs]
 }
 </script>
 

+ 14 - 14
src/pages/parkingFeeV2/parkingFeeDetailSuccess.vue

@@ -7,7 +7,7 @@
     <div class="detail-box">
       <div class="parking-info mgb-40">
         <div class="parking-price">
-          <div class="price">{{ detail.actualPayFee | currency }}</div>
+          <div class="price">{{ $currency(detail.actualPayFee) }}</div>
           <div class="price-text">
 <!--            {{ ['支付成功', '支付失败', '已退款'][detail.payStatus] }}-->
             {{ detail.refundStatus !== 'NO_REFUND' ? '已退款' : {'PAID': '支付成功', 'FAILED': '支付失败', 'pending': '支付失败', 'PENDING': '支付失败', 'Pending': '支付失败'}[detail.payStatus || 'FAIED'] }}
@@ -24,7 +24,7 @@
           </div>
           <div class="parking-info-item">
             <span class="info-key">车牌号</span>
-            <span class="info-value">{{ detail.vehicleNo | formatCarno }}</span>
+            <span class="info-value">{{ $formatCarno(detail.vehicleNo) }}</span>
           </div>
           <div class="parking-info-item">
             <span class="info-key">停车场</span>
@@ -44,7 +44,7 @@
           </uni-view> -->
           <div class="parking-info-item">
             <span class="info-key">停车时长</span>
-            <span class="info-value">{{ detail.serviceMin | parkingTime }}</span>
+            <span class="info-value">{{ $parkingTime(detail.serviceMin) }}</span>
           </div>
           <div class="parking-info-item pb0">
             <span class="info-key">开票状态</span>
@@ -59,44 +59,44 @@
             <!--todo: 杭州首停不显示暂时根据groupId写死-->
             <span class="info-key">首停优惠</span>
             <span class="info-value">{{
-              (detail.firstParkFee / 100) | currency
+              $currency(detail.firstParkFee / 100)
             }}</span>
           </div>
           <div class="parking-info-item">
             <span class="info-key">会员等级减免</span>
-            <span class="info-value ">{{ detail.discountInfo && detail.discountInfo.memberLevelDiscount | currency }}</span>
+            <span class="info-value ">{{ detail.discountInfo && $currency(detail.discountInfo.memberLevelDiscount) }}</span>
           </div>
           <div class="parking-info-item">
             <span class="info-key">消费减免</span>
-            <span class="info-value">{{ detail.discountInfo.consumeDiscount | currency }}</span>
+            <span class="info-value">{{ $currency(detail.discountInfo.consumeDiscount) }}</span>
           </div>
           <div class="parking-info-item" v-if="isBKC">
             <span class="info-key">新会员积分减免</span>
-            <span class="info-value">{{ detail.discountInfo.newMemberPointsDiscount  | currency }}</span>
+            <span class="info-value">{{ $currency(detail.discountInfo.newMemberPointsDiscount) }}</span>
           </div>
 
           <div class="parking-info-item">
             <span class="info-key">积分减免</span>
-            <span class="info-value ">{{ detail.discountInfo.pointsDiscount | currency }}</span>
+            <span class="info-value ">{{ $currency(detail.discountInfo.pointsDiscount) }}</span>
           </div>
           <div class="parking-info-item">
             <span class="info-key">会员卡券</span>
-            <span class="info-value ">{{ detail.discountInfo.couponDiscount | currency }}</span>
+            <span class="info-value ">{{ $currency(detail.discountInfo.couponDiscount) }}</span>
           </div>
           <div class="parking-info-item" v-if="detail.discountInfo && detail.discountInfo.paperCouponDiscount">
             <span class="info-key">纸质优惠券</span>
-            <span class="info-value ">{{ detail.discountInfo.paperCouponDiscount | currency }}</span>
+            <span class="info-value ">{{ $currency(detail.discountInfo.paperCouponDiscount) }}</span>
           </div>
           <div class="parking-info-item pb0">
             <span class="info-key">使用优惠总计</span>
-            <span class="info-value ">{{ (detail.discountInfo.usingTotalDiscount || 0) | currency }}</span>
+            <span class="info-value ">{{ $currency(detail.discountInfo.usingTotalDiscount || 0) }}</span>
           </div>
           <div
             class="parking-info-item"
             v-if="detail.discountInfo.usingTotalDiscount > detail.discountInfo.actualUsedDiscount"
           >
             <span class="info-key">实际优惠总计</span>
-            <span class="info-value ">{{ detail.discountInfo.actualUsedDiscount | currency }}</span>
+            <span class="info-value ">{{ $currency(detail.discountInfo.actualUsedDiscount) }}</span>
           </div>
         </div>
         <div class="parking-detail"></div>
@@ -105,13 +105,13 @@
           <div class="parking-info-item">
             <span class="info-key">应缴</span>
             <span class="info-value ">{{
-              detail.totalFee | currency
+              $currency(detail.totalFee)
             }}</span>
           </div>
           <div class="parking-info-item">
             <span class="info-key">实缴</span>
             <span class="info-value fw">{{
-              detail.actualPayFee | currency
+              $currency(detail.actualPayFee)
             }}</span>
           </div>
         </div>

+ 7 - 7
src/pages/parkingFeeV2/parkingFeeDiscounts.vue

@@ -39,8 +39,8 @@
         <div class="flewx-content">
           <div class="fee-box">
             <div>合计:</div>
-            <div class="actualPayFee">{{ actualPayFee | currency }}</div>
-            <div :class="['van-hairline--surround', 'usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']">已优惠{{ usingTotalDiscount | currency }}元</div>
+            <div class="actualPayFee">{{ $currency(actualPayFee) }}</div>
+            <div :class="['van-hairline--surround', 'usingTotalDiscount', usingTotalDiscount > 0 && 'usingTotalDiscount-red']">已优惠{{ $currency(usingTotalDiscount) }}元</div>
             <!-- <van-count-down :time="3 * 60 * 1000" /> -->
           </div>
         </div>
@@ -217,17 +217,17 @@ export default {
   }
 }
 
-/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+:deep(checkbox) .wx-checkbox-input.wx-checkbox-input-checked {
   background-color: red !important;
   border-radius: 50% !important;
   border: 1px solid red;
 }
 
-/deep/ checkbox .wx-checkbox-input {
+:deep(checkbox) .wx-checkbox-input {
   border-radius: 50% !important;
 }
 
-/deep/ .van-stepper__input {
+:deep(.van-stepper__input) {
   background-color: #ffffff;
   font-size: 34px;
   border: 1px solid #e5e5e5;
@@ -237,12 +237,12 @@ export default {
   margin-right: 0;
 }
 
-/deep/ .van-stepper__minus {
+:deep(.van-stepper__minus) {
   border: 1px solid #e5e5e5;
   border-right: 0;
 }
 
-/deep/ .van-stepper__plus {
+:deep(.van-stepper__plus) {
   border: 1px solid #e5e5e5;
   border-left: 0;
 }

+ 32 - 24
src/pages/parkingFeeV2/parkingFeeList.vue

@@ -20,33 +20,40 @@
         @click="toDetail(item.id)"
       >
         <div class="carno-box">
-          <div class="carno">{{ item.orderNo  }}</div>
+          <div class="carno">{{item.orderNo}}</div>
           <div :class="['status-box', item.paymentStatus !== 'PAID' ? '' : '']">
             <!-- {{ ['支付成功', '支付失败', '已退款'][item.refundStatus] }} -->
-            {{ item.refundStatus !== 'NO_REFUND' ? '已退款' : {'PAID': '支付成功', 'FAILED': '支付失败', 'pending': '支付失败', 'PENDING': '支付失败', 'Pending': '支付失败'}[item.paymentStatus || 'FAIED'] }}
+            {{
+              item.refundStatus !== 'NO_REFUND' ? '已退款' : {
+                'PAID': '支付成功',
+                'FAILED': '支付失败',
+                'pending': '支付失败',
+                'PENDING': '支付失败',
+                'Pending': '支付失败'
+              }[item.paymentStatus || 'FAIED']
+            }}
           </div>
-          <!-- <div class="servicefee">{{ item.actualPayFee | currency }}</div> -->
         </div>
         <div class="van-hairline--bottom"></div>
         <div class="choice_card_index orderno-box">
-          <div class="orderno">{{ item.vehicleNo }}</div>
+          <div class="orderno">{{item.vehicleNo}}</div>
           <!-- <van-icon name="arrow" /> -->
         </div>
-        <div class="choice_card_index"  style="margin-bottom:0;">
+        <div class="choice_card_index" style="margin-bottom:0;">
           <div class="choice_card_index_icon">
             <img
-                class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/vector.png`)"
-              />
-          <div class="choice_card_index_text">入场时间</div>
+              class="car-icon"
+              :src="vectorPng"
+            />
+            <div class="choice_card_index_text">入场时间</div>
           </div>
           <div class="choice_card_index_icon">
             <img
-                class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/car_time.png`)"
-              />
-          <div class="choice_card_index_text">停车时长</div>
-          </div> 
+              class="car-icon"
+              :src="carTimePng"
+            />
+            <div class="choice_card_index_text">停车时长</div>
+          </div>
           <!-- {{ item.enterTime }} -->
         </div>
         <div class="choice_card_index" >
@@ -54,8 +61,8 @@
             {{ item.enterTime }}
           </div>
           <div class="choice_card_index_icon">
-            {{ item.serviceMin | parkingTime }}
-          </div> 
+            {{$parkingTime(item.serviceMin)}}
+          </div>
           <!-- {{ item.enterTime }} -->
         </div>
         <div class="choice_card_index"  style="padding-bottom:21px;margin-bottom: 0;" >
@@ -64,15 +71,15 @@
                 class="car-icon"
                 style="
         padding-left: 8px;"
-                :src="require(`@/pages/parkingFee/static/images/parking_room.png`)"
-              />
-          <div class="choice_card_index_text2">{{item.parkName}}</div>
+              :src="parkingRoomPng"
+            />
+            <div class="choice_card_index_text2">{{item.parkName}}</div>
           </div>
           <!-- {{ item.enterTime }} -->
         </div>
         <div class="van-hairline--bottom"></div>
         <div class="choice_card_index orderno-box2">
-          <div class="orderFee">{{ item.actualPayFee | currency }}</div>
+          <div class="orderFee">{{$currency(item.actualPayFee)}}</div>
           <div class="orderDetail">查看详情</div>
           <!-- <van-icon name="arrow" /> -->
         </div>
@@ -111,10 +118,11 @@ export default {
   width: 100%;
 }
 .car-icon {
-        width: 40px;
-        height: 40px;
-        margin-right: 10px;
-      }
+  width: 40px;
+  height: 40px;
+  margin-right: 10px;
+}
+
 .parkingFeeList-item {
   background: #fff;
   display: flex;

+ 27 - 11
src/pages/parkingFeeV2/parkingFeeMsg.vue

@@ -3,14 +3,14 @@
     <!-- 领取临牌:成功 -->
     <!-- <div @click="qrCodesRule('8b0571a1')">test</div> -->
     <div class="success-box" v-if="type === 'success'">
-      <img class="icon" :src="require(`@/pages/parkingFee/static/images/unlicensed/success.png`)" />
+      <img class="icon" :src="successPng" />
       <div class="status-title">临牌领取成功</div>
       <div class="status-info">若未正常抬杠,请关闭当前页面重新扫码</div>
       <div class="status-info">或联系车场管理人员处理</div>
       <div class="card-box">
-        <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-0.png`)}`" style="margin-left: 10px"/>
+        <img :src="unlicensed0Png" style="margin-left: 10px"/>
         <div class="car-number">
-          <div class="number">{{ vehicleNo | formatCarno}}</div>
+          <div class="number">{{ $formatCarno(vehicleNo)}}</div>
           <div class="tips">车辆类型:无牌车辆</div>
         </div>
       </div>
@@ -18,12 +18,12 @@
     </div>
     <!-- 领取临牌:失败 -->
     <div class="fail-box" v-if="type === 'fail'">
-      <img class="icon" :src="require(`@/pages/parkingFee/static/images/unlicensed/fail.png`)" />
+      <img class="icon" :src="failPng" />
       <div class="status-title">临牌领取失败</div>
       <div class="status-info">请关闭当前页面重新扫码</div>
       <div class="status-info">或联系车场管理人员处理</div>
       <div class="card-box">
-        <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-0.png`)}`" style="margin-left: 10px"/>
+        <img :src="unlicensed0Png" style="margin-left: 10px"/>
         <div class="car-number">
           <div class="number">临K ???</div>
           <div class="tips">车辆类型:无牌车辆</div>
@@ -31,22 +31,22 @@
       </div>
       <k-button disabledColor="#D1D2D9" @click="scanCarCode">
         <template v-slot:left>
-          <img class="unlicensed-scan" :src="`${require(`@/pages/parkingFee/static/images/unlicensed-scan.png`)}`" />
+          <img class="unlicensed-scan" :src="unlicensedScanPng" />
         </template>
         重新扫码
       </k-button>
     </div>
     <!-- 支付成功 -->
     <div class="pay-box" v-if="type === 'pay'">
-      <img class="pay-log" :src="require(`@/pages/parkingFee/static/images/unlicensed/pay.svg`)" />
+      <img class="pay-log" :src="paySvg" />
       <span class="info">您已缴费成功,欢迎下次光临</span>
     </div>
     <!-- 出场临牌:失败 -->
     <div class="fail-box" v-if="type === 'outFail'">
-      <img class="out-fail-log" :src="require(`@/pages/parkingFee/static/images/unlicensed/no-car-out.svg`)" />
+      <img class="out-fail-log" :src="noCarOutSvg" />
       <k-button disabledColor="#D1D2D9" @click="scanCarCode">
         <template v-slot:left>
-          <img class="unlicensed-scan" :src="`${require(`@/pages/parkingFee/static/images/unlicensed-scan.png`)}`" />
+          <img class="unlicensed-scan" :src="unlicensedScanPng" />
         </template>
         重新扫码
       </k-button>
@@ -60,9 +60,19 @@ import { qrCodes,unlicensedCarCheckIn } from "@/api/parking";
 import baseMixins from "@/pages/parkingFee/mixins/base";
 import uni from '@/utils/uniHooks';
 import { initWxJsSdkConfig } from '@/utils/login';
-import { getPlatform,getUrlParams, theCommunicationBetweenWechatAndH5IsNormal, extractValuesFromString } from '@/utils';
+import { getPlatform,getUrlParams, extractValuesFromString } from '@/utils';
 import {mapState} from "vuex";
 
+import failPng from "@/pages/parkingFee/static/images/unlicensed/fail.png";
+import successPng from "@/pages/parkingFee/static/images/unlicensed/success.png";
+import unlicensed0Png from "@/pages/parkingFee/static/images/unlicensed-0.png";
+import unlicensedScanPng from "@/pages/parkingFee/static/images/unlicensed-scan.png";
+import paySvg from "@/pages/parkingFee/static/images/unlicensed/pay.svg";
+import noCarOutSvg from "@/pages/parkingFee/static/images/unlicensed/no-car-out.svg";
+
+
+
+
 export default {
   mixins: [baseMixins],
   name: 'parkingFeeMsg',
@@ -70,6 +80,12 @@ export default {
     return {
       type: '',
       vehicleNo: '',
+      failPng,
+      successPng,
+      unlicensed0Png,
+      unlicensedScanPng,
+      paySvg,
+      noCarOutSvg
     };
   },
   computed:{
@@ -259,7 +275,7 @@ export default {
       };
       // 微信小程序
       // const platform = getPlatform();
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
         // 判断微信小程序与 h5 是否正常通信
         // const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
         // if(!isReload) {

+ 3 - 7
src/pages/parkingFeeV2/parkingFeePaperCoupon.vue

@@ -15,7 +15,7 @@
             <div @click="deleteCoupon(item)"><van-icon name="delete-o" /></div>
           </div>
           <div style="padding-bottom: 25px; margin-left: 20px; margin-top: 20px; font-size: 28px">
-            优惠券金额 :<span style="color: #064c8a">{{ item.discountFee | currency }}</span>
+            优惠券金额 :<span style="color: #064c8a">{{ $currency(item.discountFee) }}</span>
           </div>
         </div>
       </div>
@@ -25,20 +25,16 @@
         }"
         @click="scanCode"
       >
-        <img :src="require('@/pages/parkingFee/static/images/sweep.png')" style="width: 35px; height: 35px; margin-right: 20px" />
+        <img :src="sweepPng" style="width: 35px; height: 35px; margin-right: 20px" />
         <div>扫码用券</div>
       </div>
       <div style="height: 220px;"></div>
     </div>
     <div class="flewx">
       <div style="display: flex; width: 100%; align-items: center">
-        <!-- <div class="flewx-content">应付<span style="color: red;font-size: 32px;padding-left: 20px;">{{actualFee |
-      currency}}</span> 元 <span style="color: #8d8d8d;padding-left: 30px;font-size: 28px;">已优惠{{discountFee |
-          currency}}元</span>
-      </div> -->
         <div class="flewx-content">
           已选<span class="num">{{ paperCouponList.length }}张</span>
-          <span class="discountFee">优惠券可优惠{{ paperDiscountFee | currency }}</span>
+          <span class="discountFee">优惠券可优惠{{ $currency(paperDiscountFee) }}</span>
         </div>
         <div class="btn-box">
           <k-button style="width: 100%; max-width: 240px" title="确定" disabledColor="#D1D2D9" @click="confirm" />

+ 1 - 2
src/pages/parkingFeeV2/parkingFeePayment.vue

@@ -3,8 +3,7 @@
     <div>
       <img
         class="no-car"
-        :src="require('@/pages/parkingFee/static/images/no-car.svg')" />
-<!--      <div class="carno">{{vehicleNo | formatCarno}}</div>-->
+        :src="noCarSvg" />
       <div class="msg">未查询到场内记录</div>
       <div class="msg-sub">请联系车场管理员</div>
       <div class="searchPrice" @click="search">重新查询</div>

+ 1 - 1
src/pages/parkingFeeV2/parkingFeeSuccess.vue

@@ -4,7 +4,7 @@
 
     <img :src="icon" />
     <div class="pay-success-title">[支付成功]</div>
-    <div class="pay-success-info" >{{vehicleNo | formatCarno}}停车费支付成功</div>
+    <div class="pay-success-info" >{{$formatCarno(vehicleNo)}}停车费支付成功</div>
     <div class="pay-success-info" style="margin-bottom: 40px">请在<span style="color: var(--k-color-primary);">{{outParkCharging}}分钟</span>内离场</div>
     <div>
       <k-button title="查看缴费记录" style="margin-bottom: 24px;" @click="page_button" />

+ 1 - 2
src/pages/parkingFeeV2/parkingFindCar.vue

@@ -18,9 +18,8 @@
     </div>
     <div class="positionFixedBottom">
         <div  class="buttonBg" disabledColor="#D1D2D9"  @click="findcarNum()">
-            <img  :src="`${require(`@/pages/parkingFee/static/images/lanya.png`)}`" class="imgButtonBg"  style="inline-block;" alt="" >
+            <img  :src="lanyaPng" class="imgButtonBg" alt="" >
             <span>蓝牙找车</span>
-            
         </div>
     </div>
     <!--    <div :class="{'page_button': true, 'blue_page_button': custTypeId === 1, 'green_page_button': custTypeId === 2}" @click="page_button">查看缴费记录</div>-->

+ 1 - 1
src/pages/parkingFeeV2/parkingFindCarFirst.vue

@@ -57,7 +57,7 @@
                   </div>
                   <div class="li dashed green-active" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" >
                     <span v-if="carType === 1">{{ numArr[7] }}</span>
-                   <img v-else :src="require('@/pages/parkingFee/static/images/unlicensed/leaf.svg')">
+                   <img v-else :src="leafSvg">
                   </div>
                 </div>
                 <k-button title="查询车辆" style="margin-top: 46px;margin-bottom: 43px;" :disabled="disabledBtn" disabledColor="#D1D2D9" @click="preHandleSearch" />

+ 1 - 1
src/pages/parkingFeeV2/parkingReceipt/parkingInvoiceImage.vue

@@ -7,7 +7,7 @@
       </div>
       <van-divider dashed style="margin:0;"/>
       <div class="part-item lines part-item-email">
-        <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/email.png`)"/>
+        <img class="car-icon" :src="emailPng"/>
         <span class="part-item-key">电子邮箱</span>
         <span class="part-item-value">{{ order.email }}</span>
       </div>

+ 1 - 1
src/pages/parkingFeeV2/parkingReceipt/parkingInvoiceImages.vue

@@ -55,7 +55,7 @@ export default {
                 url: `/pages/package-parkingFee/file?invoiceUrl=${encodeURIComponent(invoiceUrl)}`,
                 });
             }
-            if (this.isAlipayClient) {
+            if (window.isAlipayClient) {
                 my?.navigateTo({
                 url: `/pages/package-parkingFee/file?invoiceUrl=${encodeURIComponent(invoiceUrl)}`,
                 })

+ 7 - 25
src/pages/parkingFeeV2/parkingReceipt/parkingOrderDetail.vue

@@ -8,62 +8,44 @@
       <div class="tab-header">缴费订单总数 <span class="red">{{ orderList.length }}单</span></div>
       <div class="order-list">
         <div class="order-item" v-for="(item, index) in orderList" :key="index" @click="gotoDetail(item)">
-          <!-- 0:停车缴费  1:活动报名 2:积分兑换 v-if="item.invoiceCategory === 0"-->
-          <template>
-            <div class="carno-box">
-          <div class="carno">{{ item.orderNo  }}</div>
-          <!-- <div class="servicefee">{{ item.actualPayFee | currency }}</div> -->
-        </div>
+          <div class="carno-box">
+            <div class="carno">{{ item.orderNo  }}</div>
+          </div>
         <div class="van-hairline--bottom"></div>
         <div class="choice_card_index orderno-box">
           <div class="orderno">{{ item.vehicleNo }}</div>
-          <!-- <van-icon name="arrow" /> -->
         </div>
         <div class="choice_card_index">
           <div class="choice_card_index_icon">
-            <img
-                class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/vector.png`)"
-              />
+            <img class="car-icon" :src="vectorPng" alt=""/>
           <div class="choice_card_index_text">入场时间</div>
           </div>
           <div class="choice_card_index_icon">
-            <img
-                class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/car_time.png`)"
-              />
+            <img class="car-icon" :src="car_timePng" alt=""/>
           <div class="choice_card_index_text">停车时长</div>
           </div> 
-          <!-- {{ item.enterTime }} -->
         </div>
         <div class="choice_card_index time-box">
           <div class="choice_card_index_icon">
             {{ item.enterTime }}
           </div>
           <div class="choice_card_index_icon">
-            {{ item.serviceMin | parkingTime }}
+            {{ $parkingTime(item.serviceMin) }}
           </div> 
-          <!-- {{ item.enterTime }} -->
         </div>
         <div class="choice_card_index"  style="padding-bottom:40px;" >
           <div class="choice_card_index_icon bg_parkingRoom">
             <img
                 class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/parking_room.png`)"
+                :src="parking_roomPng"
               />
           <div class="choice_card_index_text2">{{item.parkName}}</div>
           </div>
-          <!-- {{ item.enterTime }} -->
         </div>
         <div class="van-hairline--bottom"></div>
         <div class="choice_card_index orderno-box2">
           <div class="orderFee">¥{{ item.totalPaidAmount }}</div>
-          <!-- <div class="orderDetail">查看详情</div> -->
-          <!-- <van-icon name="arrow" /> -->
         </div>
-          </template>
-<!--          <template v-else-if="item.invoiceCategory === 1"></template>-->
-<!--          <template v-else-if="item.invoiceCategory === 2"></template>-->
         </div>
       </div>
     </div>

+ 10 - 21
src/pages/parkingFeeV2/parkingReceipt/parkingReceipt.vue

@@ -27,7 +27,7 @@
                   <div class="choice_card_status">
                     {{ statusObj[item.status || 'FAILED'].name }}
                   </div>
-                  
+                  <!-- https://kerryprops.atlassian.net/browse/KIP-15250 -->
                   <!-- <div v-if="/FAILED|3/.test(item.status)" class="try-again" @click="tryGoToInvoicing(item)">重新开票</div> -->
                 </div>
               </div>
@@ -48,11 +48,11 @@
                 <div class="left">
                   <div class="choice_card_index">
                     <div class="choice_card_index_icon">
-                      <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/vector.svg`)" />
+                      <img class="car-icon" :src="vectorSvg" />
                       <div class="choice_card_index_text">入场时间</div>
                     </div>
                     <div class="choice_card_index_icon">
-                      <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/car_time.svg`)" />
+                      <img class="car-icon" :src="car_timeSvg" />
                       <div class="choice_card_index_text">停车时长</div>
                     </div>
                     <!-- {{ item.enterTime }} -->
@@ -62,13 +62,13 @@
                       {{ item.enterTime }}
                     </div>
                     <div class="choice_card_index_icon">
-                      {{ item.serviceMin | parkingTime }}
+                      {{ $parkingTime(item.serviceMin) }}
                     </div>
                     <!-- {{ item.enterTime }} -->
                   </div>
                   <div class="choice_card_index">
                     <div class="choice_card_index_icon bg_parkingRoom2">
-                      <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/parking_room.svg`)" />
+                      <img class="car-icon" :src="parking_roomSvg" />
                       <div class="choice_card_index_text2">{{ item.parkName }}</div>
                     </div>
                     <!-- {{ item.enterTime }} -->
@@ -76,7 +76,7 @@
                   <div class="van-hairline--bottom"></div>
                   <div class="choice_card_index orderno-box2" style="padding-top: 16px;padding-bottom: 17px;">
                     <!-- ids.indexOf(item.id) > -1 && -->
-                    <div :class="['orderFee', 'active']" >{{ item.totalPaidAmount || item.invoiceTotalAmount |currency }}</div>
+                    <div :class="['orderFee', 'active']" >{{ $currency(item.totalPaidAmount || item.invoiceTotalAmount) }}</div>
                     <!-- <div class="orderDetail">查看详情</div> -->
                     <!-- <van-icon name="arrow" /> -->
                   </div>
@@ -92,7 +92,7 @@
                   <div class="invoiceHeader">{{ item.invoiceHeader }}</div>
                   <div class="choice_card_index" style="margin-bottom: 10px;">
                     <div class="choice_card_index_icon">
-                      <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/vector.svg`)" />
+                      <img class="car-icon" :src="vectorSvg" />
                       <div class="choice_card_index_text">开票时间</div>
                     </div>
                     <!-- {{ item.enterTime }} -->
@@ -106,27 +106,16 @@
                   <!-- 停车场名称 -->
                   <div class="choice_card_index">
                     <div class="choice_card_index_icon bg_parkingRoom2 ">
-                      <img class="car-icon" :src="require(`@/pages/parkingFee/static/images/parking_room.svg`)" />
+                      <img class="car-icon" :src="parking_roomSvg" />
                       <div class="choice_card_index_text2">{{ item.parkName }}</div>
                     </div>
                   </div>
                   <div class="van-hairline--bottom"></div>
                   <div class="choice_card_index orderno-box2 orderDetail-box">
-                    <div class="orderFee2" >{{ item.totalPaidAmount || item.invoiceTotalAmount | currency }}</div>
+                    <div class="orderFee2" >{{ $currency(item.totalPaidAmount || item.invoiceTotalAmount)  }}</div>
                     <div class="orderDetail" v-if="item.status === 'COMPLETE'">查看详情</div>
-                    <!-- v-if="/FAILED|3/.test(item.status)"  -->
-                    <!-- 去掉所有重新开票按钮 -->
-                    <!-- <div v-if="/FAILED|3/.test(item.status)" class="try-again" @click="tryGoToInvoicing(item)">重新开票</div> -->
-                    <!-- <van-icon name="arrow" /> -->
                   </div>
-                  <!-- <div class="choice_card_index mb0">
-                    停车时长: <span>{{ item.serviceMin | parkingTime }}</span>  _{{
-                      item.serviceMin
-                    }}
-                  </div> -->
                 </div>
-                <!-- 0:已提交申请(待开票) 1:开票中  2:开票完成 3:开票失败 -->
-                
               </div>
               
             </div>
@@ -147,7 +136,7 @@
       <div class="priceBtn">
         <div>
           开票金额:
-          <span class="price">{{ totalNum | currency}} 元</span>
+          <span class="price">{{ $currency(totalNum) }} 元</span>
         </div>
         <div
           class="flewx_index3"

+ 24 - 13
src/pages/parkingFeeV2/qrCodeLicensedCar.vue

@@ -3,14 +3,14 @@
     <!-- 领取临牌:成功 -->
     <!-- <div @click="qrCodesRule('8b0571a1')">test</div> -->
     <div class="success-box" v-if="type === 'success'">
-      <img class="icon" :src="require(`@/pages/parkingFee/static/images/unlicensed/success.png`)" />
+      <img class="icon" :src="successPng" />
       <div class="status-title">临牌领取成功</div>
       <!-- <div class="status-info">若未正常抬杠,请关闭当前页面重新扫码</div> -->
       <div class="status-info">或联系车场管理人员处理</div>
       <div class="card-box">
-        <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-0.png`)}`" style="margin-left: 10px"/>
+        <img :src="unlicensed0Png" style="margin-left: 10px"/>
         <div class="car-number">
-          <div class="number">{{ vehicleNo | formatCarno}}</div>
+          <div class="number">{{ $formatCarno(vehicleNo)}}</div>
           <div class="tips">车辆类型:无牌车辆</div>
         </div>
       </div>
@@ -18,12 +18,12 @@
     </div>
     <!-- 领取临牌:失败 -->
     <div class="fail-box" v-if="type === 'fail'">
-      <img class="icon" :src="require(`@/pages/parkingFee/static/images/unlicensed/fail.png`)" />
+      <img class="icon" :src="failPng" />
       <div class="status-title">临牌领取失败</div>
       <div class="status-info">请关闭当前页面重新扫码</div>
       <div class="status-info">或联系车场管理人员处理</div>
       <div class="card-box">
-        <img :src="`${require(`@/pages/parkingFee/static/images/unlicensed-0.png`)}`" style="margin-left: 10px"/>
+        <img :src="unlicensed0Png" style="margin-left: 10px"/>
         <div class="car-number">
           <div class="number">临K ???</div>
           <div class="tips">车辆类型:无牌车辆</div>
@@ -31,22 +31,22 @@
       </div>
       <k-button disabledColor="#D1D2D9" @click="scanCarCode">
         <template v-slot:left>
-          <img class="unlicensed-scan" :src="`${require(`@/pages/parkingFee/static/images/unlicensed-scan.png`)}`" />
+          <img class="unlicensed-scan" :src="unlicensedScanPng" />
         </template>
         重新扫码
       </k-button>
     </div>
     <!-- 支付成功 -->
     <div class="pay-box" v-if="type === 'pay'">
-      <img class="pay-log" :src="require(`@/pages/parkingFee/static/images/unlicensed/pay.svg`)" />
+      <img class="pay-log" :src="paySvg" />
       <span class="info">您已缴费成功,欢迎下次光临</span>
     </div>
     <!-- 出场临牌:失败 -->
     <div class="fail-box" v-if="type === 'outFail'">
-      <img class="out-fail-log" :src="require(`@/pages/parkingFee/static/images/unlicensed/no-car-out.svg`)" />
+      <img class="out-fail-log" :src="noCarOutSvg" />
       <k-button disabledColor="#D1D2D9" @click="scanCarCode">
         <template v-slot:left>
-          <img class="unlicensed-scan" :src="`${require(`@/pages/parkingFee/static/images/unlicensed-scan.png`)}`" />
+          <img class="unlicensed-scan" :src="unlicensedScanPng" />
         </template>
         重新扫码
       </k-button>
@@ -59,9 +59,14 @@
 import { unlicensedCarGetVehicle } from "@/api/parking";
 import baseMixins from "@/pages/parkingFee/mixins/base";
 import uni from '@/utils/uniHooks';
-import { initWxJsSdkConfig } from '@/utils/login';
-import { getPlatform,getUrlParams, theCommunicationBetweenWechatAndH5IsNormal, extractValuesFromString } from '@/utils';
+import { getUrlParams } from '@/utils';
 import {mapState} from "vuex";
+import successPng from '@/pages/parkingFee/static/images/unlicensed/success.png'
+import unlicensed0Png from '@/pages/parkingFee/static/images/unlicensed-0.png'
+import failPng from '@/pages/parkingFee/static/images/unlicensed/fail.png'
+import unlicensedScanPng from '@/pages/parkingFee/static/images/unlicensed-scan.png'
+import paySvg from '@/pages/parkingFee/static/images/unlicensed/pay.svg'
+import noCarOutSvg from '@/pages/parkingFee/static/images/unlicensed/no-car-out.svg'
 
 export default {
   mixins: [baseMixins],
@@ -70,7 +75,13 @@ export default {
     return {
       type: '',
       vehicleNo: '',
-      qrCode: ''
+      qrCode: '',
+      successPng,
+      unlicensed0Png,
+      failPng,
+      unlicensedScanPng,
+      paySvg,
+      noCarOutSvg
     };
   },
   computed:{
@@ -270,7 +281,7 @@ export default {
       };
       // 微信小程序
       // const platform = getPlatform();
-      if (this.isAlipayClient) {
+      if (window.isAlipayClient) {
         // 判断微信小程序与 h5 是否正常通信
         // const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
         // if(!isReload) {

+ 1 - 1
src/pages/parkingFeeV2/vehicleAddOrEdit.vue

@@ -34,7 +34,7 @@
         </div>
         <div class="li dashed green-active" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" >
           <span v-if="carType === 1">{{ numArr[7] }}</span>
-          <img v-else :src="require('@/pages/parkingFee/static/images/unlicensed/leaf.svg')">
+          <img v-else :src="leafSvg">
         </div>
       </div>
       <k-button :title="$route.query.carno ? '确认修改' : '确认添加'" style="margin: 46px auto 43px; display: block" :disabled="disabledBtn" disabledColor="#D1D2D9" @click="handleAddLicensePlateByKipMember" />

+ 10 - 44
src/pages/parkingFeeV2/vehicleManagement.vue

@@ -1,12 +1,8 @@
 <template>
   <div :class="theme">
     <scroll-view scroll-y="true" :class="['scroll-Y']">
-      <!-- 登录校验 -->
-      <!-- <authorize ref="authorize"></authorize> -->
-      <!-- <LoginDom></LoginDom> -->
       <div class="wrap">
         <div class="wrap_plate">我的车牌</div>
-        <!--        <div v-else class="wrap_plate">车牌号绑定</div>-->
         <div
           class="plate_plate"
           :class=" 'linear-gradient-' + item.licensePlateType "
@@ -19,66 +15,39 @@
             >
               我的车牌
             </div>
-            <!-- <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />-->
             <div class="discountCar" v-if="item.eligible && enableDiscountVehicle">
               优惠车
             </div>
             <div class="plate_plate_index plate_plate_index2">
-              {{ item.vehicleNo | formatCarno }}
+              {{ $formatCarno(item.vehicleNo) }}
             </div>
             <div class="plate_plate_index plate_plate_index3 bb">
               <img
                 class="car-icon"
-                :src="require(`@/pages/parkingFee/static/images/icon-carType.png`)"
+                :src="iconCarTypePng"
               />
               <div>车牌类型</div>
               <div class="licensePlateTypeDesc">
                 {{ item.licensePlateTypeDesc }}
               </div>
             </div>
-            <!-- <div class="plate_tag-icon" :class="
-            item.licensePlateType === 'NEW_ENERGY_CAR_NO'
-              ? 'plate_tag_icon_green'
-              : item.licensePlateType === 'ORDINARY_CAR_NO'
-              ? 'plate_tag_icon_blue'
-              : ''
-          " v-if="custTypeId > 0"></div> -->
             <div class="plate_plate_index plate_plate_index4">
               <div class="item" @click.stop="toPayBefore(item)">
-                <img :src="require(`@/pages/parkingFee/static/images/white_detail.png`)" alt=""/><span>查询{{ isHZ ? '缴费' : ''}}</span>
+                <img :src="whiteDetailPng" alt=""/><span>查询{{ isHZ ? '缴费' : ''}}</span>
               </div>
               <div class="item" @click="toEditBefore(item)">
-                <img :src="require(`@/pages/parkingFee/static/images/white_edit.png`)" alt=""/><span
+                <img :src="whiteEditPng" alt=""/><span
               >{{isHZ? '修改': '编辑'}}</span
               >
               </div>
               <div class="item" @click="toDelete(item)">
-                <img :src="require(`@/pages/parkingFee/static/images/white_delete.png`)" alt=""/><span
+                <img :src="whiteDeletePng" alt=""/><span
               >删除</span
               >
               </div>
-              <!-- <div class="plate_plate_index4_index2">
-              <img src="static/images/money.png" @click="toPay(item.vehicleNo)" />
-              <img src="static/images/update.png" class="mrg-left-20" @click="toEdit(item)" />
-              <img src="static/images/delete.png" class="mrg-left-20" @click="toDelete(item)" />
-            </div> -->
             </div>
           </div>
         </div>
-<!--        <div
-          class="add_plate_no_data"
-          v-if="!licensePlateList.length"
-          @click="toAdd"
-        >
-          <div class="add_plate_no_data_title">
-            &lt;!&ndash;          <img class="addcar" :src="require(`./static/images/addcar.png`)" alt="" />&ndash;&gt;
-            <svg class="addcar" width="40" height="39" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg">
-              <path d="M19.5557 0C8.75538 0 0 8.73044 0 19.5C0 30.2696 8.75538 39 19.5557 39C30.356 39 39.1114 30.2696 39.1114 19.5C39.1114 8.73044 30.356 0 19.5557 0ZM29.3336 21.5947H21.6946V29.2119H17.4168V21.5947H9.77786V17.3291H17.4168V9.71191H21.6946V17.3291H29.3336V21.5947Z" fill="var(&#45;&#45;k-color-primary-01)"/>
-            </svg>
-            添加车牌
-          </div>
-          <div class="add_plate_no_data_info">添加车牌享受便捷车牌管理服务</div>
-        </div>-->
         <div class="new_add_plate_no_data" v-if="!licensePlateList.length" @click="toAdd">
           <svg width="702" height="200" viewBox="0 0 702 200" fill="none" xmlns="http://www.w3.org/2000/svg">
             <rect x="0.5" y="0.5" width="701" height="199" rx="3.5" fill="var(--k-color-primary-05)" stroke="var(--k-color-primary-01)" stroke-dasharray="6"/>
@@ -95,7 +64,7 @@
         </div>
       </div>
     </scroll-view>
-    <van-popup v-model="deleteDialogSwitch" position="center">
+    <van-popup v-model:show="deleteDialogSwitch" position="center">
       <div class="popup-dialog">
         <div class="dialog-title">
           <span class="dialog-title-text">删除已绑定车牌</span>
@@ -114,14 +83,14 @@
         </div>
       </div>
     </van-popup>
-    <van-popup v-model="deleteSuccessDialogSwitch" position="center">
+    <van-popup v-model:show="deleteSuccessDialogSwitch" position="center">
       <div class="popup-dialog">
         <div class="dialog-content">
-          <uni-icons
+          <!-- <uni-icons
             type="checkbox-filled"
             size="60"
             color="#7DB124"
-          ></uni-icons>
+          ></uni-icons> -->
           <span class="dialog-content-text">删除成功</span>
         </div>
         <div class="dialog-button-group">
@@ -183,9 +152,6 @@ export default {
     }
 
     .title {
-      // width: 180px;
-      // height: 50px;
-      // font-family: PingFangHK-Semibold, PingFangHK;
       color: #333333;
       margin-bottom: 20px;
       font-family: 'PingFang SC';
@@ -564,7 +530,7 @@ export default {
   border-radius: 10px;
   
   .van-dialog__header {}
-  /deep/ .van-dialog__content {
+  :deep(.van-dialog__content) {
     margin-top: 34px;
     
     text-align: center;

+ 72 - 0
src/plugins/AppInit.js

@@ -0,0 +1,72 @@
+import md5 from 'js-md5';
+import theme from '@/kui/theme/theme'
+import {
+  md,
+  geTel,
+  formatRichText,
+  saveSceneQrcodeDetail,
+  noMultipleClicks,
+  savePullVipcode,
+  delStorageSync,
+  copyH5,
+  getLocationValue,
+} from '@/utils/common';
+import { authorizeH5, getCode, postCode } from '@/utils/authorizeH5';
+// import wx from '@/utils/js_sdk/weixin'; // 接入微信JSDK
+// import wx from '@/utils/js_sdk/weixin'; // 接入微信JSDK
+import request from '@/utils/request.js'; //
+import store from '@/store/index.js';
+
+import CacheTool from '@/utils/cache-tool.js';
+CacheTool.init();
+import {
+  KIP_APP_PATH,
+  ETCP_APP_PATH,
+  ETCP_APP_INVOICE_PATH,
+} from '@/constants.js';
+
+export default {
+  install(app) {
+    app.config.globalProperties.$md5 = md5;
+    app.config.globalProperties.$md = md;
+    app.config.globalProperties.$geTel = geTel;
+    app.config.globalProperties.$formatRichText = formatRichText;
+    app.config.globalProperties.$saveSceneQrcodeDetail = saveSceneQrcodeDetail;
+    app.config.globalProperties.$noMultipleClicks = noMultipleClicks;
+    app.config.globalProperties.$savePullVipcode = savePullVipcode;
+    // 页面的 onLoad 在 onLaunch 之后执行
+    app.config.globalProperties.$onLaunched = new Promise((resolve) => {
+      app.config.globalProperties.$isResolve = resolve;
+    });
+    app.config.globalProperties.$userName = 'sys_miniprogram';
+    app.config.globalProperties.$isAlipayClient = window.isAlipayClient;
+    app.config.globalProperties.isAlipayClient = window.isAlipayClient;
+    app.config.globalProperties.$authorizeH5 = authorizeH5;
+    app.config.globalProperties.$getCode = getCode;
+    app.config.globalProperties.$postCode = postCode;
+    app.config.globalProperties.$delStorageSync = delStorageSync;
+    app.config.globalProperties.$copyH5 = copyH5;
+    app.config.globalProperties.$userName = 'sys_gzh';
+    app.config.globalProperties.$getLocationValue = getLocationValue;
+    const curEnvConst = CacheTool.getCurEnvConst();
+    app.config.globalProperties.$baseURL = curEnvConst.BASE_URL;
+    app.config.globalProperties.$baseURLH5 = curEnvConst.BASE_URL_H5;
+    app.config.globalProperties.$wsBaseURL = curEnvConst.WS_BASE_URL;
+    app.config.globalProperties.$picUrl = curEnvConst.PIC_URL;
+    app.config.globalProperties.$kipPaymentUrl = curEnvConst.KIP_PAYMENT_URL;
+    app.config.globalProperties.$kipAppId = curEnvConst.KIP_APPID;
+    app.config.globalProperties.$kipAppPath = KIP_APP_PATH;
+    app.config.globalProperties.$etcpAppId = curEnvConst.ETCP_APPID;
+    app.config.globalProperties.$etcpAppPath = ETCP_APP_PATH;
+    app.config.globalProperties.$etcpAppInvoicePath = ETCP_APP_INVOICE_PATH;
+    // 静态图片前缀(不用改)
+    app.config.globalProperties.$staticPicUrl = 'https://hafeng-admin.oss-cn-beijing.aliyuncs.com';
+    // app.config.globalProperties.$wx = wx;
+    // app.config.globalProperties.wx = wx;
+    // app.config.globalProperties.$wx = window.wx;
+    app.config.globalProperties.$store = store;
+    app.config.globalProperties.$request = request;
+    app.config.globalProperties.isAlipayClient = window.isAlipayClient;
+    app.config.globalProperties.$theme = theme;
+  }
+};

+ 0 - 58
src/project.config.json

@@ -1,58 +0,0 @@
-{
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "enhance": false,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": false,
-    "coverView": true,
-    "nodeModules": false,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "enableEngineNative": false,
-    "bundle": false,
-    "useIsolateContext": true,
-    "useCompilerModule": true,
-    "userConfirmedUseCompilerModuleSwitch": false,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "lazyloadPlaceholderEnable": false,
-    "useStaticServer": true,
-    "showES6CompileOption": false,
-    "disableUseStrict": false,
-    "useCompilerPlugins": false,
-    "minifyWXML": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.20.0",
-  "projectname": "xiaochengxu",
-  "condition": {},
-  "appid": "wx2a1741f02f7bb650",
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  }
-}

+ 0 - 7
src/project.private.config.json

@@ -1,7 +0,0 @@
-{
-  "projectname": "kpl_crm_uniapp",
-  "setting": {
-    "compileHotReLoad": true
-  },
-  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
-}

+ 13 - 270
src/routes/index.js

@@ -1,201 +1,6 @@
-// import VueRouter, { createWebHistory } from 'vue-router';
-import VueRouter from 'vue-router';
-// import qs from 'qs';
-import Home from '@/pages/parkingFee/parkingFee.vue';
+import { createWebHistory, createRouter } from 'vue-router'
 import { routes as routesV2 } from './indexV2';
 
-// import crmRouters from './crmIndex';
-const routes = [
-  { path: '/', name: 'index', component: Home },
-  { path: '/home', name: 'home', component: Home },
-  // {
-  //   path: '/wxV2',
-  //   name: 'wxV2',
-  //   meta: {
-  //     keepAlive: true, // 需要被缓存
-  //   },
-  //   component: () => import('@/pages/parkingFeeV2/index.vue'),
-  //   children: [
-  //     ...routesV2,
-  //   ],
-  // },
-  {
-    path: '/parkingFeePayment',
-    component: () => import('@/pages/parkingFee/parkingFeePayment.vue'),
-  },
-  {
-    path: '/parkingFeeDetail',
-    name: 'parkingFeeDetail',
-    component: () => import('@/pages/parkingFee/parkingFeeDetail.vue'),
-  },
-  {
-    path: '/parkingFeeCoupon',
-    name: 'parkingFeeCoupon',
-    component: () => import('@/pages/parkingFee/parkingFeeCoupon.vue'),
-  },
-  {
-    path: '/parkingFeeDetailSuccess',
-    name: 'parkingFeeDetailSuccess',
-    component: () => import('@/pages/parkingFee/parkingFeeDetailSuccess.vue'),
-  },
-  {
-    path: '/parkingFeePaperCoupon',
-    name: 'parkingFeePaperCoupon',
-    component: () => import('@/pages/parkingFee/parkingFeePaperCoupon.vue'),
-  },
-  {
-    path: '/parkingFeeList',
-    name: 'parkingFeeList',
-    component: () => import('@/pages/parkingFee/parkingFeeList.vue'),
-  },
-  // {
-  //   path: '/pointsMall',
-  //   name: 'pointsMall',
-  //   component: () => import('@/pages/pointsMall/pointsMall.vue'),
-  // },
-  {
-    path: '/parkingReceipt',
-    name: 'parkingReceipt',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingReceipt.vue'),
-  },
-  {
-    path: '/vehicleManagement',
-    name: 'vehicleManagement',
-    component: () => import('@/pages/parkingFee/vehicleManagement.vue'),
-  },
-  {
-    path: '/vehicleAddOrEdit',
-    name: 'vehicleAddOrEdit',
-    component: () => import('@/pages/parkingFee/vehicleAddOrEdit.vue'),
-  },
-  {
-    path: '/parkingFeeSuccess',
-    name: 'parkingFeeSuccess',
-    component: () => import('@/pages/parkingFee/parkingFeeSuccess.vue'),
-  },
-  {
-    path: '/cryptojs',
-    name: 'cryptojs',
-    component: () => import('@/pages/cryptojs/cryptojs.vue'),
-  },
-  {
-    path: '/parkingFeeDiscounts',
-    name: 'parkingFeeDiscounts',
-    component: () => import('@/pages/parkingFee/parkingFeeDiscounts.vue'),
-  },
-  {
-    path: '/parkingFeePaperCoupon',
-    name: 'parkingFeePaperCoupon',
-    component: () => import('@/pages/parkingFee/parkingFeePaperCoupon.vue'),
-  },
-  {
-    path: '/parkingInvoice',
-    name: 'parkingInvoice',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingInvoice.vue'),
-  },
-  {
-    path: '/parkingHeaderDetail',
-    name: 'parkingHeaderDetail',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingHeaderDetail.vue'),
-  },
-  {
-    path: '/parkingInvoiceImage',
-    name: 'parkingInvoiceImage',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingInvoiceImage.vue'),
-  },
-  {
-    path: '/parkingOrderDetail',
-    name: 'parkingOrderDetail',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingOrderDetail.vue'),
-  },
-  {
-    path: '/parkingApplication',
-    name: 'parkingApplication',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingApplication.vue'),
-  },
-  {
-    path: '/parkingChooseHeader',
-    name: 'parkingChooseHeader',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingChooseHeader.vue'),
-  },
-  {
-    path: '/parkingChangeHeader',
-    name: 'parkingChangeHeader',
-    component: () =>
-      import('@/pages/parkingFee/parkingReceipt/parkingChangeHeader.vue'),
-  },
-  // 登录
-  {
-    path: '/login',
-    name: 'login',
-    component: () => import('@/pages/login/login.vue'),
-  },
-  // 微信授权回调
-  {
-    path: '/openWx',
-    name: 'openWx',
-    component: () => import('@/pages/login/openWx.vue'),
-  },
-  // 无牌车提示文案
-  {
-    path: '/parkingFeeMsg',
-    name: 'parkingFeeMsg',
-    component: () => import('@/pages/parkingFee/parkingFeeMsg.vue'),
-  },
-  {
-    path: '/parkingRights',
-    name: 'parkingRights',
-    component: () => import('@/pages/parkingFee/parkingRights.vue'),
-  },
-  // 反向寻车
-  {
-    path: '/parkingFindCar',
-    name: 'parkingFindCar',
-    component: () => import('@/pages/parkingFee/parkingFindCar.vue'),
-  },
-  {
-    path: '/dome',
-    name: 'dome',
-    component: () => import('@/pages/cryptojs/demo.vue'),
-  },
-  // { path: '/bar', component: 'Bar' }
-].map((item) => {
-  let keepAlive = false;
-  if (['parkingFeeDetail', 'parkingFeeDetailV2', 'wxV2'].indexOf(item.name) > -1) {
-    keepAlive = true;
-  }
-  if (item?.children?.length) {
-    item.children = item.children.map(elm => {
-      elm.keepAlive = false
-      if (['parkingFeeDetail', 'parkingFeeDetailV2'].indexOf(elm.name) > -1) {
-        elm.keepAlive = true;
-      }
-      return elm
-    })
-  }
-  item = {
-    ...item,
-    meta: {
-      keepAlive, // 不需要被缓存
-    },
-  };
-  return item;
-});
-
-const wxRoutes = routes.map((item) => {
-  return {
-    ...item,
-    path: `/wx/:token${item.path}`,
-  };
-});
-
 const wx2Routes = routesV2.map((item) => {
   let keepAlive = false
   if (['parkingFeeDetail'].indexOf(item.name) > -1) {
@@ -210,85 +15,23 @@ const wx2Routes = routesV2.map((item) => {
   };
 });
 
-// const wxV2Routes = routesV2.map((item) => {
-//   return {
-//     ...item,
-//     path: `/tparking/wxV2${item.path}`,
-//   };
-// });
-
-// console.log('wxV2RouteswxV2Routes', {wxV2Routes});
-
-const otherRoutes = routes.map((item) => {
-  return {
-    ...item,
-    path: `/:groupId/:mallId${item.path}`,
-  };
-});
-
-// tparking qa 测试环境
-const otherTparkingRoutes = routes.map((item) => {
-  return {
-    ...item,
-    path: `/tparking/:groupId/:mallId${item.path}`,
-  };
-});
-
-// crm 路由
-// const wxRoutes = routes.map((item) => {
-//   return {
-//     ...item,
-//     path: `/wx/:token${item.path}`,
-//   };
-// });
-
-const router = new VueRouter({
+const router = createRouter({
   mode: 'history',
-  base: '/tparking/',
+  history: createWebHistory('/tparking/'),
   routes: [
-    ...routes,
-    ...(window.isWxV2 ? wxRoutes : wx2Routes),
-    ...otherRoutes,
-    ...otherTparkingRoutes,
+    // ...routes,
+    // ...(window.isWxV2 ? wxRoutes : wx2Routes),
+    // ...otherRoutes,
+    ...wx2Routes,
+    // ...otherTparkingRoutes,
     // ...wxV2Routes,
     // ...crmRouters,
-    { path: '*', component: import('@/pages/NotFoundComponent/index.vue') },
+    {
+      path: '/:pathMatch(.*)*', // 匹配所有未找到的路径
+      name: 'NotFound',
+      component: () => import('@/pages/NotFoundComponent/index.vue')
+    }
   ],
 });
 
-// router.beforeEach((to, from, next) => {
-//   // if (from.path.indexOf('wxV2') > -1 && !to.query?.openId) {
-//   //   /* next({
-//   //     path: to.path,
-//   //     query: {
-//   //       ...from.query,
-//   //       ...to.query
-//   //     }
-//   //   }); */
-//   //   next();
-//   // } else {
-//   //   next();
-//   // }
-//   next();
-// });
-// router.beforeEach((to, from, next) => {
-//   // let pageId = '';
-//   // if (window.location.href.indexOf('pageId') > 0) {
-//   //   pageId = `${window.location.href}`.replace(/.*pageId=([0-9A-Z]*).*/g, '$1');
-//   // }
-//   // setTimeout(() => {
-//   //   if (
-//   //     pageId &&
-//   //     (window.location.href.indexOf('pageId') < 0 ||
-//   //       to.fullPath.indexOf('pageId') < 0)
-//   //   ) {
-//   //     let url = `${window.location.origin}/#${to.path}?${qs.stringify({
-//   //       ...to.query,
-//   //       pageId,
-//   //     })}`;
-//   //     window.history.replaceState('', '', url);
-//   //   }
-//   // }, 100);
-//   next();
-// });
 export default router;

+ 1 - 1
src/routes/indexV2.js

@@ -9,7 +9,7 @@ export const routes = [
         component: () => import('@/pages/parkingFeeV2/parkingFeeList.vue'),
     },{
         path: '/parkingFeeDetailSuccess',
-        name: 'parkingFeeList',
+        name: 'parkingFeeDetailSuccess',
         component: () => import('@/pages/parkingFeeV2/parkingFeeDetailSuccess.vue'),
     },{
         path: '/vehicleAddOrEdit',

+ 0 - 2
src/store/cachedViews.js

@@ -13,10 +13,8 @@ const mutations = {
   // 移除缓存
   DEL_CACHED_VIEW: (state, view) => {
     const index = state.cachedViews.indexOf(view.name)
-    console.log('1616161616', index);
     index > -1 && state.cachedViews.splice(index, 1)
   },
-
 }
 
 export default {

+ 43 - 43
src/store/index.js

@@ -1,5 +1,4 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
+import {createStore} from 'vuex';
 import { Encrypt, Decrypt } from '@/utils/crypto';
 import { crmQueryMemberInfo } from '@/utils/api-crm-member';
 import uni from '@/utils/uniHooks';
@@ -12,7 +11,6 @@ import { updateUnionId } from '@/api/parking/index'
 import {backLbsHome, getGroupIdAndMallIdByLsbId, toLogin} from '@/utils';
 // import { parkingLots } from '@/utils/api-crm-ms';
 
-Vue.use(Vuex);
 
 function getValue(state, key) {
   let value = state[key];
@@ -23,46 +21,48 @@ function getValue(state, key) {
   return value;
 }
 
-const store = new Vuex.Store({
-  state: {
-    // groupId: '8a84819f7c6e260e017c72669bbe01c2',
-    // kipUserId: '8a888aea82c9ac970182ecfa259a0ddf',
-    // mallId: '8a8486a37f48f7bd017f4e5bddd10000',
-    // openid: 'oudWQ5SCDElfn-IQH6eBR5JesOz4',
-    // appId: 'wx92c3e55fbef6b2af',
-    lbsId: '',
-    groupId: '',
-    kipUserId: '',
-    mallId: '',
-    openid: '',
-    appId: '',
-    member: {},
-    userInfo: {},
-    mobile: '',
-    custTypeId: 0, // 0 默认版本,1 上海静安 2 上海浦东 3 KIP:默认版本 4: 新的baseUI
-    paramsScene: {},
-    parkFee: {},
-    marketList: [],
-    projectId: '',
-    isLogin: 'notLoggedIn', // notLoggedIn: 未登录, haveLoggedIn: 已登录, loginDenied: 拒绝登录
-    accessToken: '', // 用户的token
-    tempParkingOrder: {},
-    tempParkingMoney: '',
-    // 停车缴费
-    bonusCopy: 0,
-    source: '', // 访问方:微信小程序:(CRM|KIP|JINGAN|PUDONG|ALIPAY)
-    brandInfo: {},
-    curMarket: {},
-    isInit: false, // 当内嵌在小程序中的H5页面,没有接收到小程序数据时,默认显示骨架屏幕
-    // 无牌车
-    unlicensedInfo: '',
-    // 防止用户在无牌车流程中卡死
-    endlessLoop: '',
-    sourceId: '', // 微信:unionId; 支付宝:userId
-    pageHistory: {},// 记录未登录页面已经跳转过
-    refreshPageKey: 1,
-    version: 360, // h5版本
-    appVersion: 100, // 小程序版本
+const store = createStore({
+  state() {
+    return {
+      // groupId: '8a84819f7c6e260e017c72669bbe01c2',
+      // kipUserId: '8a888aea82c9ac970182ecfa259a0ddf',
+      // mallId: '8a8486a37f48f7bd017f4e5bddd10000',
+      // openid: 'oudWQ5SCDElfn-IQH6eBR5JesOz4',
+      // appId: 'wx92c3e55fbef6b2af',
+      lbsId: '',
+      groupId: '',
+      kipUserId: '',
+      mallId: '',
+      openid: '',
+      appId: '',
+      member: {},
+      userInfo: {},
+      mobile: '',
+      custTypeId: 0, // 0 默认版本,1 上海静安 2 上海浦东 3 KIP:默认版本 4: 新的baseUI
+      paramsScene: {},
+      parkFee: {},
+      marketList: [],
+      projectId: '',
+      isLogin: 'notLoggedIn', // notLoggedIn: 未登录, haveLoggedIn: 已登录, loginDenied: 拒绝登录
+      accessToken: '', // 用户的token
+      tempParkingOrder: {},
+      tempParkingMoney: '',
+      // 停车缴费
+      bonusCopy: 0,
+      source: '', // 访问方:微信小程序:(CRM|KIP|JINGAN|PUDONG|ALIPAY)
+      brandInfo: {},
+      curMarket: {},
+      isInit: false, // 当内嵌在小程序中的H5页面,没有接收到小程序数据时,默认显示骨架屏幕
+      // 无牌车
+      unlicensedInfo: '',
+      // 防止用户在无牌车流程中卡死
+      endlessLoop: '',
+      sourceId: '', // 微信:unionId; 支付宝:userId
+      pageHistory: {},// 记录未登录页面已经跳转过
+      refreshPageKey: 1,
+      version: 360, // h5版本
+      appVersion: 100, // 小程序版本
+    }
   },
   mutations: {
     SET_GROUP_ID(state, payload) {

+ 1 - 1
src/store/order/paperCoupon.js

@@ -37,7 +37,7 @@ export default {
         dispatch('setDiscountFee')
       }
     }
-    if(checkOutResponse?.parkingRule.hasOwnProperty('enablePaperCoupons')) {
+    if(checkOutResponse?.parkingRule?.hasOwnProperty('enablePaperCoupons')) {
       commit('setEnablePaperCoupons', checkOutResponse.parkingRule.enablePaperCoupons);
       commit('setPaperCouponsDesc', checkOutResponse.parkingRule.paperCouponsDescription)
     }

+ 2 - 2
src/store/order/points.js

@@ -1,7 +1,7 @@
 import { checkOut,calculateDiscount,ordersAndPrepay,currentUnlicensedPlate,unlicensedCarCheckIn,unlicensedCarCheckout } from '@/api/parking';
 import { setSelected } from './utils'
 import {Toast} from "vant";
-import lodash from 'lodash'
+import { cloneDeep } from '@/utils/index'
 
 export default {
 
@@ -306,7 +306,7 @@ export default {
     newMemberPoints,
     callback
   }) {
-    const orderDetail = lodash.cloneDeep(state.orderDetail)
+    const orderDetail = cloneDeep(state.orderDetail)
     orderDetail.discountInfo.newMemberPoints = newMemberPoints;
 
     setSelected(['memberGrade','consume','paperCoupons','coupons','points'],orderDetail)

+ 1 - 1
src/store/order/utils.js

@@ -1,4 +1,4 @@
-import { isArray } from "lodash";
+import { isArray } from '@/utils/index'
 
 export function setSelected( types,orderDetail ) {
   function run( name ) {

+ 21 - 11
src/styles/common.less

@@ -109,17 +109,19 @@ button {
 
 @toast-background-color: rgba(0, 0, 0, 0.8);
 
-.van-toast{
+.van-toast {
   border-radius: 10px;
   padding: 25px 42px;
   min-height: inherit;
   background-color: @toast-background-color;
-  width: auto;
-  &.white-space  {
-    .van-toast__text{
+  //width: auto;
+
+  &.white-space {
+    .van-toast__text {
       white-space: nowrap;
-    }  
+    }
   }
+
   // max-width: 90%;
   .van-toast__text {
     font-family: 'PingFang SC';
@@ -128,15 +130,23 @@ button {
     font-size: 28px;
     margin-top: 0;
     color: #FFFFFF;
-      }
-  top: 300PX;
-  &.width65{
+  }
+
+  // top: 300PX;
+
+  &.width65 {
     width: 65%;
   }
-  &.top300{
+
+  &.top300 {
     top: 300PX;
   }
 }
-.van-toast--top {
-  top: 312px;
+
+// .van-toast--top {
+//   top: 312px;
+// }
+
+.USERshowLoadingToast {
+  width: fit-content;
 }

+ 1 - 1
src/utils/common.js

@@ -1,5 +1,5 @@
 // 验签
-var log = require('@/utils/log.js')
+import log from '@/utils/log.js'
 import uni from './uniHooks'
 import md5 from 'js-md5';
 

+ 53 - 1
src/utils/common/function.js

@@ -44,4 +44,56 @@ export function isEmpty(obj, key) {
     return true
   }
   return false
-}
+}
+
+
+export  function pxToVw(px) {
+  const viewportWidth = 750; // 设计稿宽度
+  return `${(px / viewportWidth) * 100}vw`;
+}
+
+export function debounce(func, wait) {
+  let timeout;
+
+  return function(...args) {
+    const context = this;
+
+    clearTimeout(timeout);
+
+    timeout = setTimeout(() => {
+      func.apply(context, args);
+    }, wait);
+  };
+}
+
+export function cloneDeep(value) {
+  // 判断是否是对象或数组
+  if (value === null || typeof value !== 'object') {
+    return value;
+  }
+
+  // 判断是数组还是对象
+  if (Array.isArray(value)) {
+    const copy = [];
+    for (let i = 0; i < value.length; i++) {
+      copy[i] = cloneDeep(value[i]);
+    }
+    return copy;
+  } else {
+    const copy = {};
+    for (const key in value) {
+      if (value.hasOwnProperty(key)) {
+        copy[key] = cloneDeep(value[key]);
+      }
+    }
+    return copy;
+  }
+}
+
+export function isArray(value) {
+  return Array.isArray(value);
+}
+
+export function isFunction(value) {
+  return typeof value === 'function';
+}

+ 0 - 37
src/utils/common/websocket.js

@@ -1,37 +0,0 @@
-import uni from '@/utils/uniHooks';
-// 判断小程序与H5保持通信
-export function theCommunicationBetweenWechatAndH5IsNormal() {
-    return new Promise(resolve => {
-        try {
-            // 请求 projectId
-            const projectId = setTimeout(() => {
-                resolve(false);
-            }, 5000)
-            window.toWXSendMsg({
-                type: 'getProjectId',
-                options: {},
-            });
-            window.subscribe('projectId', (options) => {
-                clearTimeout(projectId)
-                resolve(options);
-            });
-        } catch (err) {
-            resolve(false);
-            console.log('=====>theCommunicationBetweenWechatAndH5IsNormal', err);
-        }
-    })
-}
-// 判断是否触发提示
-export function isReloadBefore() {
-    return new Promise(resolve => {
-        try {
-            if (Number.parseInt(uni.getStorageSync('isReload')) === 1) {
-                resolve(true)
-                return
-            } 
-            resolve(false)
-        } catch (err) {
-            resolve(false)
-        }
-    })
-}

+ 59 - 33
src/utils/filters.js

@@ -1,36 +1,62 @@
-import Vue from 'vue';
-import moment from 'moment';
+import dayjs from 'dayjs';
+import { ORDER_STATUS } from '@/common/js/BaseDictionary'
 
-Vue.filter('moment', (time) => time ? moment(time).format('YYYY-MM-DD HH:mm:ss') : '');
-Vue.filter('momentWu', (time) => time ? moment(time).format('YYYY-MM-DD HH:mm:ss') : '无');
-Vue.filter('momentDate', (time) => time ? moment(time).format('YYYY-MM-DD') : '');
-Vue.filter('momentMM', (time) => time ? moment(time).format('MM-DD HH:mm') : '');
-Vue.filter('momentY', (time) => time ? moment(time).format('YYYY') : '');
+export default {
+  install(app)  {
+    /**
+    * 金额管道
+    */
+    const digitsRE = /(\d{3})(?=\d)/g;
+    app.config.globalProperties.$currency = (value, currency, decimals) => {
+      value = parseFloat(value);
+      if (!isFinite(value) || (!value && value !== 0)) return '';
+      currency = currency != null ? currency : '¥';
+      decimals = decimals != null ? decimals : 2;
+      const stringified = Math.abs(value).toFixed(decimals);
+      const _int = decimals ? stringified.slice(0, -1 - decimals) : stringified;
+      const i = _int.length % 3;
+      const head = i > 0 ? (_int.slice(0, i) + (_int.length > 3 ? ',' : '')) : '';
+      const _float = decimals ? stringified.slice(-1 - decimals) : '';
+      const sign = value < 0 ? '-' : '';
+      return sign + currency + head + _int.slice(i).replace(digitsRE, '$1,') + _float;
+    };
 
-/**
- * 车牌管道
- */
-Vue.filter('formatCarno', carno => {
-  if (!carno) return ''
-  const arr = carno.split('');
-  arr.splice(2, 0, ' ');
-  return arr.join('');
-});
+    /**
+     * 车牌管道
+     */
+    app.config.globalProperties.$formatCarno = carno => {
+      if (!carno) return ''
+      const arr = carno.split('');
+      arr.splice(2, 0, ' ');
+      return arr.join('');
+    }
 
-/**
- * 金额管道
- */
-const digitsRE = /(\d{3})(?=\d)/g;
-Vue.filter('currency', (value, currency, decimals) => {
-  value = parseFloat(value);
-  if (!isFinite(value) || (!value && value !== 0)) return '';
-  currency = currency != null ? currency : '¥';
-  decimals = decimals != null ? decimals : 2;
-  const stringified = Math.abs(value).toFixed(decimals);
-  const _int = decimals ? stringified.slice(0, -1 - decimals) : stringified;
-  const i = _int.length % 3;
-  const head = i > 0 ? (_int.slice(0, i) + (_int.length > 3 ? ',' : '')) : '';
-  const _float = decimals ? stringified.slice(-1 - decimals) : '';
-  const sign = value < 0 ? '-' : '';
-  return sign + currency + head + _int.slice(i).replace(digitsRE, '$1,') + _float;
-});
+    app.config.globalProperties.$moment = (time) => time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : ''
+    app.config.globalProperties.$momentWu = (time) => time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无'
+    app.config.globalProperties.$momentDate = (time) => time ? dayjs(time).format('YYYY-MM-DD') : ''
+    app.config.globalProperties.$momentMM = (time) => time ? dayjs(time).format('MM-DD HH:mm') : ''
+    app.config.globalProperties.$momentY = (time) => time ? dayjs(time).format('YYYY') : ''
+
+    app.config.globalProperties.$parkingTime = (val) => {
+      const days = parseInt(val / 60 / 24);
+      const hours = parseInt((val / 60) % 24);
+      const minutes = parseInt(val % 60);
+      if (days > 0) {
+        return `${days}天 ${hours}小时 ${minutes}分钟`;
+      }
+      if (hours > 0) {
+        return `${hours}小时 ${minutes}分钟`;
+      }
+      return `${minutes}分钟`;
+    }
+
+    app.config.globalProperties.$orderStatus = (val) => {
+      return ORDER_STATUS[val]
+    }
+
+    app.config.globalProperties.$momentFormat = (val) => {
+      if(!val)return val
+      return dayjs(val).format('YYYY-MM-DD hh:mm:ss')
+    }
+  }
+}

+ 7 - 31
src/utils/index.js

@@ -1,13 +1,11 @@
 import { createAxiosByinterceptors } from '@/api/request';
-import Stomp from "@/lib/stompjs";
 import { Decrypt,Encrypt } from "@/utils/crypto";
-import SockJS from "@/utils/sockjs";
 import qs from 'qs';
 import { lbsDictionary } from '@/common/js/BaseDictionary';
 import uni from './uniHooks';
 import {Dialog} from "vant";
 import kipTheme from "@/kui/theme/theme";
-import Vue from 'vue';
+// import Vue from 'vue';
 
 export function getMobileOperatingSystem() {
   // #ifdef H5
@@ -130,6 +128,7 @@ export function getAppIdByGroupIdAndMallId( {groupId,mallId,type} ) {
 }
 
 export function getUrlParams( url = window.location.href ) {
+  console.log(131, url)
   const str = `${ url }`.split('?')[1];
   if ( !str ) return {};
   return qs.parse(str);
@@ -163,7 +162,7 @@ export function wxToLoginCallback( path,callback ) {
     });
     window.subscribe('callback',( options ) => {
       // console.log('登录页面的回调',JSON.stringify(options));
-      if ( options.isReload || Vue.prototype.isAlipayClient && options?.options?.isReload) {
+      if ( options.isReload || window.isAlipayClient && options?.options?.isReload) {
         // console.log('刷新页面');
         window.location.reload();
       } else {
@@ -282,7 +281,7 @@ export function getUrl() {
 export function windowSendInit() {
   const token = window.token;
   window.toWXSendMsg = function ( {type = '',funcName = '',options = {}} ) {
-    if(Vue.prototype.isAlipayClient) {
+    if(window.isAlipayClient) {
       my.postMessage({
         name:'h5',
         body: {
@@ -319,7 +318,7 @@ export function windowSendInit() {
 
   // 主动订阅事件回调
   window.subscribe = function ( type,callback ) {
-    if(Vue.prototype.isAlipayClient) {
+    if(window.isAlipayClient) {
       my.onMessage = function (response) {
         console.log('293my.onMessage', response)
         callback(response.body.data);
@@ -354,28 +353,6 @@ export function windowSendInit() {
 }
 
 
-export function wssInit() {
-  return new Promise(( resolve,reject ) => {
-    try {
-      const socket = new SockJS(`${ getUrl() }/hafengWebsocket?token=${ window.token }`);
-      window.stompClient = Stomp.over(socket);
-      window.stompClient.debug = false;
-      windowSendInit();
-      window.stompClient.connect({},( frame ) => {
-        // 请求 projectId
-        window.toWXSendMsg({
-          type: 'getProjectId',
-          options: {},
-        });
-        window.subscribe('projectId',( options ) => {
-          resolve(options);
-        });
-      });
-    } catch ( err ) {
-      reject(err);
-    }
-  });
-}
 
 
 // 获取当前的主题
@@ -423,7 +400,7 @@ export function backLbsHome() {
             url: source === 'KIP' ? '/pages/tabbar/home/home' : "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1"  // 去 login 页面
           })
         }
-        if (Vue.prototype.isAlipayClient) {
+        if (window.isAlipayClient) {
           my?.reLaunch({
             url: "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1" // 去 login 页面 1 去登录
           })
@@ -442,13 +419,12 @@ export function toLogin() {
       "url": source === 'KIP' ? "/pages/package-login/select?from=parkingFeeWebView" : "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1" // 去 login 页面 1 去登录
     })
   }
-  if (Vue.prototype.isAlipayClient) {
+  if (window.isAlipayClient) {
     my?.reLaunch({
       url: "/pages/package-parkingFee/parkingFeeWebViewLogin?needLogin=1" // 去 login 页面 1 去登录
     })
   }
 }
-export * from './common/websocket.js'
 export * from './common/localStorage.js'
 export * from './common/function.js'
 export * from './common/lbsIdCommon.js'

+ 0 - 621
src/utils/location.js

@@ -1,621 +0,0 @@
-// 获取位置信息
-// var QQMapWX = require('mixins/js/qqmap-wx-jssdk.js')
-import QQMapWX from '@/common/js/qqmap-wx-jssdk.js';
-
-var qqmapsdk = null;
-import log from './log';
-// import store from '@/store/install.js'
-import { kipAllCities } from '@/utils/api-kip.js';
-import { isKOMiniApp, isKOBrand } from './utils.js';
-import CacheTool from '@/utils/cache-tool.js';
-
-export function location(that, mallid, scene, key) {
-  if (!mallid && (that.globalData.mallid || that.globalData.mallid !== '')) {
-    that.$isResolve();
-    return false;
-  }
-}
-
-// 	if (that.globalData.marketList.length == 0) {
-// 		kipAllCities().then(resp => {
-// 			if (!resp || !resp.hasOwnProperty("data")) {
-// 				uni.showToast({
-// 					title: "无法获取商场",
-// 					icon: "none",
-// 					duration: 2300
-// 				})
-// 				return
-// 			}
-// 			const result = resp.data;
-// 			if (result && result.code === '000000') {
-// 				console.log('===> 请求所有商场')
-// 				const marketList = getMarketList(result.data);
-// 				that.globalData.marketList = marketList
-// 				if (marketList.length > 0) {
-// 					let defaultMarket = marketList[0]
-// 					log.info(`===> 设置第一个默认商场: ${defaultMarket.groupId} ${defaultMarket.mallid} ${defaultMarket.name}`)
-// 					that.globalData.mallid = defaultMarket.mallid
-// 					that.globalData.marketName = defaultMarket.name
-// 					that.globalData.groupId = defaultMarket.groupId
-// 					// 根据商场经纬度设置距离自己最近的商场
-// 					getDefualtLocation(that);
-// 					that.$isResolve()
-// 				}
-// 			} else {
-// 				uni.showToast({
-// 					icon: "none",
-// 					title:"请求商场失败"
-// 				});
-// 			}
-// 		}).catch(err => {
-// 			console.error(err);
-// 			uni.showToast({
-// 				icon: "none",
-// 				title:"请求商场失败"
-// 			});
-// 		})
-
-// 	} else {
-// 		that.globalData.mallid = that.globalData.marketList[0].mallid
-// 		that.globalData.marketName = that.globalData.marketList[0].name
-// 		that.globalData.groupId = that.globalData.marketList[0].groupId
-// 		that.$isResolve()
-// 	}
-// };
-
-// function getMarketList(result) {
-// 	let marketList = [];
-// 	if (result && result.length > 0) {
-// 		result.forEach(item => {
-// 			if (item.lbs && item.lbs.length > 0) {
-// 				item.lbs.forEach(e => {
-// 					// CRM 筛选出所有的商场
-// 					if (e.format === 'RETAIL') {
-// 						marketList.push({
-// 							groupId: e.brand.id,
-// 							mallid: e.id,
-// 							latitude: e.lat,
-// 							longitude: e.lng,
-// 							name: e.name,
-// 							defaultFlag: e.defaultFlag
-// 						});
-// 					}
-// 				});
-// 			}
-// 		});
-// 	}
-// 	return marketList;
-// }
-
-// function getDefualtLocation(app, callbackFun) {
-// 	const mapKey = app.globalData.key;
-// 	qqmapsdk = new QQMapWX({
-// 		key: mapKey // 必填
-// 	})
-// 	const marketList = app.globalData.marketList;
-// 	var to = ""
-// 	marketList.forEach(item => {
-// 		if (item && item.latitude && item.longitude) {
-// 			to += (item.latitude + ',' + item.longitude + ';')
-// 		}
-// 	})
-// 	to = to.slice(0, to.length - 1)
-// 	uni.getLocation({
-// 		 type: 'wgs84',
-// 		 success (res) {
-// 			const latitude = res.latitude
-// 			const longitude = res.longitude
-// 			const location = latitude + ','+longitude
-// 			app.globalData.location = location;
-// 			qqmapsdk.calculateDistance({
-// 				from: location,
-// 				to: to,
-// 				success: (mapres) => {
-// 					console.log('===> 请求位置信息并计算最近的商场')
-// 					for (let element of mapres.result.elements) {
-// 						for (let market of marketList) {
-// 							var latitude = parseFloat(market.latitude)
-// 							var longitude = parseFloat(market.longitude)
-
-// 							if (element.to.lat == latitude && element.to.lng ==
-// 								longitude) {
-// 								if (element.distance === 0) {
-// 									console.log(market)
-// 								}
-// 								market.distance = element.distance
-// 								break
-// 							}
-// 						}
-// 					}
-// 					// 移除无效的商场
-// 					marketList.sort(compare('distance'))
-// 					setDefault(app, marketList, () => {
-// 						let curMarket = marketList[0]
-// 						if (curMarket) {
-// 							store.commit('changeCurMarket', curMarket)
-// 						}
-
-// 					});
-// 				},
-// 				fail: (err) => {
-// 					log.error(err);
-// 					const list = marketList.filter(e => e.defaultFlag)
-// 					setDefault(app, list, () => {
-// 						let curMarket = list[0]
-// 						if (curMarket) {
-// 							store.commit('changeCurMarket', curMarket)
-// 						}
-// 					})
-// 				}
-// 			})
-// 		},
-// 		fail () {
-// 			console.warn("用户取消位置授权")
-// 			log.warn('用户取消位置授权')
-// 			const list = marketList.filter(e => e.defaultFlag)
-// 			console.log(list)
-// 			setDefault(app, list, () => {
-// 				let curMarket = list[0]
-// 				if (curMarket) {
-// 					store.commit('changeCurMarket', curMarket)
-// 				}
-// 			})
-// 		}
-// 	})
-// }
-
-// function setDefault(app, marketList, callbackFun) {
-// 	if (!marketList || !Array.isArray(marketList) || marketList.length == 0) return;
-
-// 	app.globalData.marketList = marketList;
-
-// 	const curMarket = marketList[0];
-// 	app.globalData.mallid = curMarket.mallid
-// 	app.globalData.marketName = curMarket.name
-// 	app.globalData.marketAddress = curMarket.address
-// 	app.globalData.groupId = curMarket.groupId
-
-// 	uni.setStorageSync("groupId", curMarket.groupId);
-// 	uni.setStorageSync("mallid", curMarket.mallid);
-
-// 	console.info(`===> 计算商场距离并设置默认商场: ${curMarket.mallid} ${curMarket.name}`)
-// 	log.info(`===> 计算商场距离并设置默认商场: ${curMarket.mallid} ${curMarket.name}`)
-// 	if (callbackFun) {
-// 		callbackFun();
-// 	}
-// }
-
-export function compare(property) {
-  return function (a, b) {
-    var value1 = a[property];
-    var value2 = b[property];
-    return value1 - value2;
-  };
-}
-
-export function getLocationAndSetDefaultMarket(app, store, setDefaultMarket) {
-  const mapKey = app.globalData.key;
-  qqmapsdk = new QQMapWX({
-    key: mapKey, // 必填
-  });
-  let marketList =
-    uni.getStorageSync('marketList') || app.globalData.marketList;
-  // crm 只保留定位杭州
-  if (!isKOMiniApp()) {
-    let crmArry = [];
-    marketList.map((item) => {
-      if (!isKOBrand(item.groupId)) {
-        crmArry.push(item);
-      }
-    });
-    marketList = crmArry;
-  }
-  const curMarket = uni.getStorageSync('curMarket');
-  if (curMarket) {
-    const { mallid } = curMarket;
-    console.log(`===>获取到缓存中的商场信息, 缓存中的商场: ${mallid}`);
-    console.log(curMarket);
-    setDefaultMarket(app, store, marketList, mallid);
-    return;
-  }
-  var to = '';
-  marketList.forEach((item) => {
-    if (item && item.latitude && item.longitude) {
-      to += item.latitude + ',' + item.longitude + ';';
-    }
-  });
-  to = to.slice(0, to.length - 1);
-  uni.getLocation({
-    type: 'wgs84',
-    success(res) {
-      const latitude = res.latitude;
-      const longitude = res.longitude;
-      const location = latitude + ',' + longitude;
-      app.globalData.location = location;
-      qqmapsdk.calculateDistance({
-        from: location,
-        to: to,
-        success: (mapres) => {
-          console.log('===> 请求位置信息并计算最近的商场1');
-          for (let element of mapres.result.elements) {
-            for (let market of marketList) {
-              var latitude = parseFloat(market.latitude);
-              var longitude = parseFloat(market.longitude);
-
-              if (element.to.lat == latitude && element.to.lng == longitude) {
-                if (element.distance === 0) {
-                  console.log(market);
-                }
-                market.distance = element.distance;
-                break;
-              }
-            }
-          }
-          // 移除无效的商场
-          marketList.sort(compare('distance'));
-          uni.setStorageSync('marketList', marketList);
-          let curMarket = marketList[0] || {};
-          const { mallid } = curMarket;
-          setDefaultMarket(app, store, marketList, mallid);
-        },
-        fail: (err) => {
-          log.error(err);
-          console.error(
-            `===> 计算最近距离失败(getLocationAndSetDefaultMarket):使用默认商场`
-          );
-          uni.showModal({
-            title: '提示',
-            content: '计算距离错误,请手动选择商场',
-            confirmText: '去选择',
-            showCancel: false,
-            success() {
-              setTimeout(() => {
-                if (app.$isResolve) {
-                  app.$isResolve();
-                  console.log('===>location $isResolve');
-                }
-                uni.navigateTo({
-                  url: '/pages/chooseProject/chooseProject',
-                });
-              }, 1500);
-            },
-          });
-          // const list = marketList.filter(e => e.defaultFlag)
-          // let curMarket = list[0] || marketList[0]
-          // const { mallid } = curMarket
-          // setDefaultMarket(app, store, marketList, mallid)
-        },
-      });
-    },
-    fail() {
-      console.warn('===> 用户取消位置授权0');
-      log.warn('用户取消位置授权0');
-      if (app.$isResolve) {
-        app.$isResolve();
-        console.log('===>location $isResolve');
-      }
-      uni.navigateTo({
-        url: '/pages/chooseProject/chooseProject',
-      });
-      // const list = marketList.filter(e => e.defaultFlag)
-      // let curMarket = list[0]  || marketList[0]
-      // const { mallid } = curMarket
-      // setDefaultMarket(app, store, marketList, mallid)
-    },
-  });
-}
-
-export function getMarketListDefault(marketList) {
-  if (!marketList) return null;
-  const list = marketList.filter((e) => e.defaultFlag);
-}
-
-/**
- * 如果当前缓存中没有mallid则获取会员位置并计算最近的商场并将商场为默认mallid
- * @param {Object} app
- * @param {Object} store
- * @param {Object} isQrcode
- * @param {Object} setDefaultMarket
- */
-export function getLocationAndSetDefaultMarketNotUseCache(
-  app,
-  store,
-  setDefaultMarket,
-  isQrcode
-) {
-  const mapKey = app.globalData.key;
-  qqmapsdk = new QQMapWX({
-    key: mapKey, // 必填
-  });
-  let marketList =
-    uni.getStorageSync('marketList') || app.globalData.marketList;
-  // crm杭州小程序
-  if (!isKOMiniApp()) {
-    let crmArry = [];
-    marketList.map((item) => {
-      if (!isKOBrand(item.groupId)) {
-        crmArry.push(item);
-      }
-    });
-    marketList = crmArry;
-  }
-  var to = '';
-  marketList.forEach((item) => {
-    if (item && item.latitude && item.longitude) {
-      to += item.latitude + ',' + item.longitude.trim() + ';';
-    }
-  });
-  to = to.slice(0, to.length - 1);
-  uni.getLocation({
-    type: 'wgs84',
-    success(res) {
-      const latitude = res.latitude;
-      const longitude = res.longitude;
-      const location = latitude + ',' + longitude;
-      app.globalData.location = location;
-      qqmapsdk.calculateDistance({
-        from: location,
-        to: to,
-        success: (mapres) => {
-          console.log('===> 请求位置信息并计算最近的商场2');
-          for (let element of mapres.result.elements) {
-            for (let market of marketList) {
-              var latitude = parseFloat(market.latitude);
-              var longitude = parseFloat(market.longitude.trim());
-
-              if (element.to.lat == latitude && element.to.lng == longitude) {
-                if (element.distance === 0) {
-                  console.log(market);
-                }
-                market.distance = element.distance;
-                break;
-              }
-            }
-          }
-          // 移除无效的商场
-          marketList.sort(compare('distance'));
-          uni.setStorageSync('marketList', marketList);
-          // 如果没有商场则设置最近的商场否则只计算不保存
-          const currentMallid = uni.getStorageSync('mallid');
-          if (!currentMallid) {
-            let curMarket = marketList[0] || {};
-            const { mallid } = curMarket;
-            setDefaultMarket(app, store, marketList, mallid, isQrcode);
-          }
-        },
-        fail: (err) => {
-          log.error(err);
-          console.error(
-            `===> 计算最近距离错误(getLocationAndSetDefaultMarketNotUseCache):使用默认商场`
-          );
-          uni.showModal({
-            title: '提示',
-            content: '计算距离错误,请手动选择商场',
-            confirmText: '去选择',
-            showCancel: false,
-            success() {
-              setTimeout(() => {
-                if (app.$isResolve) {
-                  app.$isResolve();
-                  console.log('===>location1 $isResolve');
-                }
-                uni.navigateTo({
-                  url: '/pages/chooseProject/chooseProject',
-                });
-              }, 1500);
-            },
-          });
-          // const list = marketList.filter(e => e.defaultFlag)
-          // let curMarket = list[0] || marketList[0]
-          // const { mallid } = curMarket
-          // setDefaultMarket(app, store, marketList, mallid, isQrcode)
-        },
-      });
-    },
-    fail() {
-      console.warn('===> 用户取消位置授权1');
-      log.warn('用户取消位置授权1');
-      if (app.$isResolve) {
-        app.$isResolve();
-        console.log('===>location1 $isResolve');
-      }
-      uni.navigateTo({
-        url: '/pages/chooseProject/chooseProject',
-      });
-      // const currentMallid = uni.getStorageSync("mallid");
-      // if (!currentMallid) {
-      // 	const list = marketList.filter(e => e.defaultFlag)
-      // 	let curMarket = list[0]  || marketList[0]
-      // 	const { mallid } = curMarket
-      // 	setDefaultMarket(app, store, marketList, mallid, isQrcode)
-      // }
-    },
-  });
-}
-
-// 过滤 KO 的商城
-export function filterKOMarket(marketList) {
-  if (!isKOMiniApp()) {
-    let crmArry = [];
-    marketList.map((item) => {
-      if (!isKOBrand(item.groupId)) {
-        crmArry.push(item);
-      }
-    });
-    return crmArry;
-  }
-  return marketList;
-}
-
-// 构建 腾讯地图-计算距离 需要用到的参数
-export function buildQQMapSdkCalculateParams(marketList) {
-  let to = '';
-  marketList.forEach((item) => {
-    if (item && item.latitude && item.longitude) {
-      to += item.latitude + ',' + item.longitude + ';';
-    }
-  });
-  to = to.slice(0, to.length - 1);
-  return to;
-}
-
-// 设置商城与当前会员定位的距离,如有 限制距离 则根据限制距离过滤
-export function setMarketDistanceByLbsCalculResult(
-  marketList,
-  calculResult,
-  limitDistance
-) {
-  for (let element of calculResult) {
-    for (let market of marketList) {
-      const latitude = parseFloat(market.latitude);
-      const longitude = parseFloat(market.longitude);
-      if (element.to.lat == latitude && element.to.lng == longitude) {
-        market.distance = element.distance;
-        break;
-      }
-    }
-  }
-  marketList.sort(compare('distance'));
-  uni.setStorageSync('marketList', marketList);
-  let newLbsList = [];
-  if (limitDistance && limitDistance > 0) {
-    const km = limitDistance * 1000;
-    if (marketList && marketList.length > 0) {
-      marketList.forEach((item) => {
-        if (item.distance <= km) {
-          newLbsList.push(item);
-        }
-      });
-    }
-  } else {
-    newLbsList = marketList;
-  }
-  return newLbsList;
-}
-
-export function getLocationIsLimit(preGetLocationTime) {
-  const curTime = new Date().getTime();
-  if (!preGetLocationTime) {
-    return false;
-  }
-  const limit = curTime - preGetLocationTime;
-  const REQ_lOCATION_TIME_LIMIT =
-    CacheTool.getCurEnvConst().REQ_lOCATION_TIME_LIMIT;
-  if (limit < REQ_lOCATION_TIME_LIMIT) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-export function getLocation(app, store, marketList) {
-  return new Promise((resolve, reject) => {
-    const isLimit = getLocationIsLimit(store.state.getLocationTime);
-    if (isLimit) {
-      const REQ_lOCATION_TIME_LIMIT =
-        CacheTool.getCurEnvConst().REQ_lOCATION_TIME_LIMIT;
-      const s = REQ_lOCATION_TIME_LIMIT / 1000;
-      reject(`获取定位太频繁,请间隔${s}秒`);
-    } else {
-      marketList = filterKOMarket(marketList);
-      // 检查定位权限
-      uni.getSetting({
-        success(res) {
-          if (res.authSetting['scope.userLocation']) {
-            getLocationByPromise(app, store, marketList, resolve, reject);
-          } else if (!res.authSetting['scope.userLocation']) {
-            // 请求获取定位权限
-            uni.authorize({
-              scope: 'scope.userLocation',
-              success(res) {
-                getLocationByPromise(app, store, marketList, resolve, reject);
-              },
-              fail() {
-                // 手动打开定位权限
-                uni.showModal({
-                  title: '提示',
-                  content: '是否打开定位',
-                  success(res) {
-                    if (res.confirm) {
-                      uni.openSetting({
-                        success(res) {
-                          log.info('打开授权成功');
-                          console.info('===>打开授权成功');
-                          reject('授权定位成功,请重新定位');
-                        },
-                        fail() {
-                          reject('打开定位失败');
-                        },
-                      });
-                    }
-                  },
-                });
-              },
-            });
-          }
-        },
-        fail() {
-          reject('获取授权信息失败');
-        },
-      });
-    }
-  });
-}
-
-export function getLocationByPromise(app, store, marketList, resolve, reject) {
-  uni.showLoading({
-    mask: true,
-  });
-  uni.getLocation({
-    type: 'wgs84',
-    success(res) {
-      const latitude = res.latitude;
-      const longitude = res.longitude;
-      const location = latitude + ',' + longitude;
-      const to = buildQQMapSdkCalculateParams(marketList);
-      const mapKey = app.globalData.key;
-      qqmapsdk = new QQMapWX({
-        key: mapKey,
-      });
-      qqmapsdk.calculateDistance({
-        from: location,
-        to: to,
-        success: (mapres) => {
-          const calculResult = mapres.result.elements;
-          const LOCATION_DISTANCE_RANGE =
-            CacheTool.getCurEnvConst().LOCATION_DISTANCE_RANGE;
-          const newLbsList = setMarketDistanceByLbsCalculResult(
-            marketList,
-            calculResult,
-            LOCATION_DISTANCE_RANGE
-          );
-          if (newLbsList && newLbsList.length > 0) {
-            resolve(newLbsList);
-          } else {
-            reject(`您附近${LOCATION_DISTANCE_RANGE}公里范围内无位置信息`);
-          }
-          store.commit('saveGetLocationTime');
-        },
-        fail: (err) => {
-          log.error(err);
-          console.error(`===> 计算最近距离失败(getLocation)`);
-          store.commit('saveGetLocationTime');
-          reject('计算距离失败');
-        },
-      });
-    },
-    fail() {
-      console.warn('===> 用户取消位置授权(getLocation)');
-      log.warn('用户取消位置授权(getLocation)');
-      store.commit('saveGetLocationTime');
-      reject('位置授权失败');
-    },
-  });
-}
-
-// export default {
-// 	getLocationAndSetDefaultMarket,
-// 	compare,
-// 	getLocationAndSetDefaultMarketNotUseCache,
-// 	getLocation,
-// };

+ 1 - 1
src/utils/log.js

@@ -1,7 +1,7 @@
 const wx = {}
 var log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null
 
-module.exports = {
+export default {
   debug() {
     if (!log) return
     log.debug.apply(log, arguments)

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů