瀏覽代碼

feat(KIP-6765): 获取 groupId

John-Hong 2 年之前
父節點
當前提交
504d0c5bea
共有 1 個文件被更改,包括 8 次插入0 次删除
  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