| | |
| | | tabList: [], |
| | | courseList: [], |
| | | searchValue: '', |
| | | active: 0, |
| | | activeItem: null, |
| | | loading: false, |
| | | shoppingCartGetId: [] |
| | |
| | | barHeight: systInfo.statusBarHeight, |
| | | navBarHeight: navBarHeight, |
| | | }); |
| | | if (options.courseTypeActive) { |
| | | this.setData({ |
| | | active: JSON.parse(options.courseTypeActive), |
| | | }); |
| | | } |
| | | this.getCourseTypeListList() |
| | | this.getShoppingCartList() |
| | | }, |
| | |
| | | wx.navigateBack(); |
| | | }, |
| | | getCourseTypeListList() { |
| | | |
| | | this.setData({ |
| | | loading: true |
| | | }) |
| | |
| | | app.MG.store.getStoreChannelList(data).then((res) => { |
| | | // 去除数组最后一个元素 |
| | | const newData = res.datas.slice(0, res.datas.length - 1) |
| | | |
| | | |
| | | |
| | | this.setData({ |
| | | tabList: newData, |
| | | activeItem: newData[0], |
| | | loading: false |
| | | }) |
| | | if (this.data.active) { |
| | | this.getCourseList(newData[this.data.active]) |
| | | } else { |
| | | this.setData({ |
| | | activeItem: newData[0], |
| | | }) |
| | | this.getCourseList(newData[0]) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |