Explorar o código

feat(KIP-6765): 获取 groupId

John-Hong %!s(int64=2) %!d(string=hai) anos
pai
achega
504d0c5bea
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/App.vue

+ 8 - 0
src/App.vue

@@ -264,15 +264,23 @@ export default {
     },
     micromessengerInit() {
       this.isInit = false;
+      let path = '';
       let [groupId, mallId] = window.location.pathname
         .split('/')
         .filter((elm) => elm);
       console.log(265, groupId, mallId);
       // 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');
       }
+
       this.$store.commit('SET_GROUP_ID', groupId);
       this.$store.commit('SET_MALL_ID', mallId);
       // 设置appid