|
|
@@ -44,7 +44,7 @@ Page({
|
|
|
zindex: 3
|
|
|
},
|
|
|
// {
|
|
|
- // icon: '../../../assets/qie_huan_jue_se.png',
|
|
|
+ // icon: '../../../assets/qiehuan_icon.png',
|
|
|
// text: '角色切换',
|
|
|
// time: '',
|
|
|
// paras: {},
|
|
|
@@ -59,14 +59,14 @@ Page({
|
|
|
// url: 'pages/question/question',
|
|
|
// zindex: 3
|
|
|
// },
|
|
|
- // {
|
|
|
- // icon: '../../../assets/aijia_icon.png',
|
|
|
- // text: '关于私塾家',
|
|
|
- // time: '',
|
|
|
- // paras: {},
|
|
|
- // url: 'pages/about_aijia/about_aijia',
|
|
|
- // zindex: 3
|
|
|
- // },
|
|
|
+ {
|
|
|
+ icon: '../../../assets/aijia_icon.png',
|
|
|
+ text: '关于私塾家',
|
|
|
+ time: '',
|
|
|
+ paras: {},
|
|
|
+ url: 'pages/about_aijia/about_aijia',
|
|
|
+ zindex: 3
|
|
|
+ },
|
|
|
],
|
|
|
routerThree: [
|
|
|
{
|
|
|
@@ -122,6 +122,7 @@ Page({
|
|
|
options.vip = getGlobalVal('vip', `vip_${userId}`)
|
|
|
options.userId = userId
|
|
|
options.userInfo = getGlobalVal('userInfo')
|
|
|
+ console.log(options)
|
|
|
this.setData({ options, isLoaded: 1 })
|
|
|
getWxloginCode(code => {
|
|
|
this.setData({ code })
|
|
|
@@ -142,6 +143,7 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
+ // wx.hideHomeButton()
|
|
|
this.getVipList()
|
|
|
this.getCheckRole()
|
|
|
},
|
|
|
@@ -180,8 +182,7 @@ Page({
|
|
|
const {value}=e.detail
|
|
|
const {list=[]}=this.data;
|
|
|
if (list[value].type==0){
|
|
|
- wx.setStorageSync('library', { id: list[value].libId, league_name: list[value].libName})
|
|
|
- redirectTo({ url: 'parents/pages/main/main', paras: { libId:list[value].libId } })
|
|
|
+ redirectTo({ url: 'parents/pages/me/me', paras: {} })
|
|
|
}else{
|
|
|
wx.setStorageSync('list', [list[value]])
|
|
|
redirectTo({ url: 'president/pages/home/home', paras: { libId: list[value].libId } })
|
|
|
@@ -217,6 +218,19 @@ Page({
|
|
|
const continuousFn = { fn: this.getVipList, param: { ...arguments } }
|
|
|
const userId = getGlobalVal('userId')
|
|
|
const { options}=this.data
|
|
|
+ const fn = (i, v) => {
|
|
|
+ globalData['vip'] = v
|
|
|
+ wx.setStorageSync(`vip_${userId}`, v)
|
|
|
+
|
|
|
+ var obj={"league_name":v.lname,"id":v.lib_id,"type":v.type}
|
|
|
+ wx.setStorageSync('library', obj)
|
|
|
+
|
|
|
+ globalData['vipIndex'] = i
|
|
|
+ wx.setStorageSync(`vipIndex_${userId}`, i)
|
|
|
+
|
|
|
+ globalData['vipId'] = v['vip_id']
|
|
|
+ wx.setStorageSync(`vipId_${userId}`, v['vip_id'])
|
|
|
+ }
|
|
|
GetMineInfo({ continuousFn }).then(res => {
|
|
|
const { vipList = null } = res.data
|
|
|
if (vipList.length > 0) {
|
|
|
@@ -225,6 +239,8 @@ Page({
|
|
|
options.vipIndex = i
|
|
|
getApp().globalData['vipIndex'] = i
|
|
|
wx.setStorageSync(`vipIndex_${userId}`, i)
|
|
|
+ fn(i, vipList[i])
|
|
|
+ break
|
|
|
}
|
|
|
}
|
|
|
this.setData({ vipList, options})
|
|
|
@@ -247,7 +263,7 @@ Page({
|
|
|
navigateTo({ url, zindex })
|
|
|
}else{
|
|
|
if (!hasVipService()) return
|
|
|
- navigateTo({ url, zindex })
|
|
|
+ navigateTo({ url, zindex,isAdd:0 })
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -266,7 +282,7 @@ Page({
|
|
|
addchildPage: function () {
|
|
|
const { routerTwo } = this.data
|
|
|
const { url, zindex } = routerTwo[0]
|
|
|
- if (!hasVipService()) return
|
|
|
+ // if (!hasVipService()) return
|
|
|
wx.scanCode({
|
|
|
success: res => {
|
|
|
const webUrl = res.result
|
|
|
@@ -279,7 +295,7 @@ Page({
|
|
|
return
|
|
|
}
|
|
|
// console.log(vipId)
|
|
|
- navigateTo({ url, paras: { vipId, zindex: 3} })
|
|
|
+ navigateTo({ url, paras: { vipId, zindex: 3, isAdd: 1} })
|
|
|
}
|
|
|
})
|
|
|
//
|
|
|
@@ -291,9 +307,9 @@ Page({
|
|
|
const { index } = e.currentTarget.dataset
|
|
|
const { options, vipList} = this.data
|
|
|
const { vipIndex, userId } = options
|
|
|
- if (index == vipIndex) {
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (index == vipIndex) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
const { vip_id } = vipList[index]
|
|
|
if (vip_id) {
|
|
|
options.vip = vipList[index]
|
|
|
@@ -304,13 +320,15 @@ Page({
|
|
|
getApp().globalData['vipIndex'] = index
|
|
|
wx.setStorageSync(`vipIndex_${userId}`, index)
|
|
|
|
|
|
+ var obj={"league_name":vipList[index].lname,"id":vipList[index].lib_id,"type":vipList[index].type}
|
|
|
+ wx.setStorageSync('library', obj)
|
|
|
+
|
|
|
options.vipId = vip_id
|
|
|
getApp().globalData['vipId'] = vip_id
|
|
|
wx.setStorageSync(`vipId_${userId}`, vip_id)
|
|
|
|
|
|
- wx.removeStorageSync('library')
|
|
|
+ // wx.removeStorageSync('library')
|
|
|
}
|
|
|
-
|
|
|
this.setData({ options, isShowVipModal: 0 })
|
|
|
},
|
|
|
|