Browse Source

排除E订单跳转进入可能不存在站点查询方式的问题

xiaohaizhao 2 years ago
parent
commit
92b7e80554
2 changed files with 16 additions and 1 deletions
  1. 15 0
      app.js
  2. 1 1
      pages/tabbar/home/index.wxml

+ 15 - 0
app.js

@@ -27,6 +27,21 @@ App({
                 })
                 wx.setStorageSync('userauth', res.data);
             });
+            if (!wx.getStorageSync('templetList')) this.globalData.http.basic({
+                "classname": "sysmanage.develop.querytemplet.querytemplet",
+                "method": "query",
+                "content": {}
+            }).then(res => {
+                console.log("获取列表查询条件", res)
+                if (res.msg != '成功') return;
+                let data = res.data.find(v => v.templetname == '站点全部');
+                if (data) {
+                    res.data = res.data.filter(v => v.templetname != '站点全部')
+                    res.data.unshift(data)
+                }
+                wx.setStorageSync('templetList', res.data)
+                getCurrentPages()[getCurrentPages().length - 1].getList && getCurrentPages()[getCurrentPages().length - 1].getList(true);
+            })
         }
     },
     initSocket() {

+ 1 - 1
pages/tabbar/home/index.wxml

@@ -25,7 +25,7 @@
         <view class="group" wx:if="{{item.list.length}}">
             <view class="label"><text class="work {{item.icon}}" />{{item.label}}</view>
             <view class="main">
-                <navigator version='trial' class="item" wx:for="{{item.list}}" wx:for-item="it" wx:for-index="i" target='{{item.appid!=appid?"miniProgram":"self"}}' app-id='{{item.appid}}' path="{{it.path+'?auth='+auth+'&userMsg='+userMsg+'&site='+site}}" url="{{it.path}}" open-type="{{it.openType||'navigate'}}" wx:key="name" data-it="{{it}}" data-item="{{item}}" bindtap="openRecord">
+                <navigator version='develop' class="item" wx:for="{{item.list}}" wx:for-item="it" wx:for-index="i" target='{{item.appid!=appid?"miniProgram":"self"}}' app-id='{{item.appid}}' path="{{it.path+'?auth='+auth+'&userMsg='+userMsg+'&site='+site}}" url="{{it.path}}" open-type="{{it.openType||'navigate'}}" wx:key="name" data-it="{{it}}" data-item="{{item}}" bindtap="openRecord">
                     <view class="icon-box" style="background-color: {{it.bColor}};">
                         <text class="work {{it.icon}}" style="color: {{it.color}};" />
                     </view>