Эх сурвалжийг харах

fix-7223(KIP-7223): 兼容SL环境

John-Hong 2 жил өмнө
parent
commit
1f71ba6f04

+ 1 - 2
src/App.vue

@@ -86,7 +86,7 @@ export default {
   },
   methods: {
     async init() {
-      uni.setStorageSync('env', window.env);
+      // uni.setStorageSync('env', window.env);
       // 如果是微信小程序。初始化wss
       if (getIsMin()) {
         // this.Toastloading = Toast.loading({
@@ -213,7 +213,6 @@ export default {
       };
     },
     initEnv() {
-      CacheTool.init();
       const href = window.location.href;
       console.log('当前页面的url地址  ', href);
       if (/dev-|8080/.test(href)) {

+ 14 - 0
src/common/js/BaseDictionary.js

@@ -18,4 +18,18 @@ export const lbsDictionary = {
       projectId: '187',
     },
   },
+  "8a8883607d029a46017d02a2be880000": {
+    appid: 'wxb81a622ed6d60adf',
+    secret: 'd55a10817ee2c638f278b709358dc22a',
+    qa: {
+      groupId: '8a8485497c9cafbc017c9cb90b9d0000',
+      mallId: '8a84854a7cfd947d017d02861a9d0002',
+      projectId: 'SKC',
+    },
+    prod: {
+      groupId: '8a8884e77cc9e70a017cca1c77e80004',
+      mallId: '8a888aed7d0295e5017d029ff1f40000',
+      projectId: '187',
+    },
+  }
 };

+ 1 - 1
src/main.js

@@ -1,7 +1,7 @@
 import Vue from 'vue';
 // 设置环境变量
 import uni from './utils/uniHooks';
-uni.setStorageSync('env', process.env.NODE_ENV);
+// uni.setStorageSync('env', process.env.NODE_ENV);
 import App from './App.vue';
 import sensors from 'sa-sdk-javascript';
 import store from './store/index.js';

+ 1 - 0
src/plugins/install.js

@@ -19,6 +19,7 @@ import { authorizeH5, getCode, postCode } from '@/utils/authorizeH5';
 import { location } from '@/utils/location';
 
 import CacheTool from '@/utils/cache-tool.js';
+CacheTool.init();
 import {
   KIP_APP_PATH,
   ETCP_APP_PATH,

+ 0 - 1
src/routes/index.js

@@ -182,7 +182,6 @@ const router = new VueRouter({
     { path: '*', component: import('@/pages/NotFoundComponent/index.vue') },
   ],
 });
-console.log(175, router);
 
 // router.beforeEach((to, from, next) => {
 //   // let pageId = '';

+ 2 - 2
src/utils/cache-tool.js

@@ -29,7 +29,7 @@ export default {
   getEnv() {
     const env = uni.getStorageSync("env");
     if (!env) {
-      const env = ENV_LIST[1];
+      const env = ENV_LIST[0];
       uni.setStorageSync("env", env.name);
       return env.name
     }
@@ -132,4 +132,4 @@ function isKerryOnAppid() {
   } else {
     return false;
   }
-}
+}