guhongwei 2 年之前
父節點
當前提交
4d679e8fb6
共有 2 個文件被更改,包括 30 次插入2 次删除
  1. 29 1
      pagesMatch/match/info.js
  2. 1 1
      project.private.config.json

+ 29 - 1
pagesMatch/match/info.js

@@ -61,7 +61,35 @@ Page({
     // 选项卡
     tabsChange: function (e) {
         const that = this;
-        that.setData({ 'tabs.active': e.detail.active });
+        let { active } = e.detail;
+        let info = that.data.info;
+        if (info.status == '0') {
+            if (active == 'a') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '1') {
+            if (active == 'a' || active == 'b') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '2' || info.status == '3') {
+            if (active == 'a' || active == 'b') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '4') {
+            if (active == 'a' || active == 'b' || active == 'c') {
+                that.setData({ 'tabs.active': active });
+            } else {
+                wx.showToast({ title: `暂无开放`, icon: 'error', duration: 2000 });
+            }
+        } else if (info.status == '5' || info.status == '6') {
+            that.setData({ 'tabs.active': active });
+        }
     },
     // 第一层手风琴
     onePayer: function (e) {

+ 1 - 1
project.private.config.json

@@ -1,7 +1,7 @@
 {
     "projectname": "%E7%BE%BD%E6%A0%A1%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0",
     "setting": {
-        "compileHotReLoad": true
+        "compileHotReLoad": false
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
 }