|
@@ -112,6 +112,7 @@ Page({
|
|
|
],
|
|
|
btnList: [],
|
|
|
btnActive: ['1'],
|
|
|
+ active: '',
|
|
|
},
|
|
|
// 选项卡
|
|
|
tabsChange: function (e) {
|
|
@@ -120,10 +121,18 @@ Page({
|
|
|
that.setData({ 'tabs.active': name });
|
|
|
},
|
|
|
// 场地选项卡
|
|
|
- fieldtabsChange: function (e) {
|
|
|
+ fieldtabsChange: async function (e) {
|
|
|
const that = this;
|
|
|
const { name } = e.detail;
|
|
|
that.setData({ 'fieldtabs.active': name });
|
|
|
+ let group = that.data.fieldtabs.list.find((i) => i.name == name);
|
|
|
+ if (group) {
|
|
|
+ that.setData({ active: group.name });
|
|
|
+ // const arr = await app.$get(`/newCourt/api/race`, { ground_id: group._id });
|
|
|
+ // if (arr.errcode == '0') {
|
|
|
+ // that.setData({ racelist: arr.data })
|
|
|
+ // }
|
|
|
+ }
|
|
|
},
|
|
|
toCommon: function (e) {
|
|
|
const { route } = e.currentTarget.dataset;
|