|
@@ -12,8 +12,12 @@ Page({
|
|
|
menu: [
|
|
|
{ title: '羽校信息', active: '0' },
|
|
|
{ title: '师资信息', active: '1' },
|
|
|
+ { title: '公开课', active: '2' },
|
|
|
+ { title: '私教课', active: '3' },
|
|
|
]
|
|
|
},
|
|
|
+ // 公开课
|
|
|
+ openList: []
|
|
|
},
|
|
|
// 跳转菜单
|
|
|
back(e) {
|
|
@@ -60,12 +64,15 @@ Page({
|
|
|
success: async res => {
|
|
|
that.setData({ user: res.data })
|
|
|
if (that.data.id) {
|
|
|
- const arr = await app.$get(`/school/${that.data.id}`)
|
|
|
- if (arr.errcode == '0') {
|
|
|
- that.setData({ form: arr.data })
|
|
|
- } else {
|
|
|
- wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
|
- }
|
|
|
+ let arr;
|
|
|
+ // 学校信息
|
|
|
+ arr = await app.$get(`/school/${that.data.id}`)
|
|
|
+ if (arr.errcode == '0') { that.setData({ form: arr.data }) }
|
|
|
+ else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
|
|
|
+ // 公开课
|
|
|
+ arr = await app.$get(`/lessonPublic`, { school_id: that.data.id, status: '1' });
|
|
|
+ if (arr.errcode == '0') { that.setData({ openList: arr.data }) }
|
|
|
+ else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
|
|
|
}
|
|
|
},
|
|
|
fail: async res => {
|