|
@@ -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) {
|