...
|
...
|
@@ -7,9 +7,8 @@ Page({ |
|
|
*/
|
|
|
data: {
|
|
|
currentTab: 2,
|
|
|
Status: '',
|
|
|
KeyWord: '',
|
|
|
list: '',
|
|
|
Status:'',
|
|
|
KeyWord:'',
|
|
|
mainid: '',
|
|
|
vip_state: false
|
|
|
},
|
...
|
...
|
@@ -41,56 +40,21 @@ Page({ |
|
|
let url = 'counselor/familylist';
|
|
|
let param = {
|
|
|
UserId: app.globalData.UserId,
|
|
|
Status: that.data.currentTab,
|
|
|
Status: this.data.currentTab,
|
|
|
KeyWord: that.data.KeyWord
|
|
|
}
|
|
|
console.log(param)
|
|
|
app.post(url, param).then((res) => {
|
|
|
console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
|
let data = res.data;
|
|
|
console.log(data.code)
|
|
|
console.log(res.data.data.list)
|
|
|
if (data.code == 200) {
|
|
|
console.log(1)
|
|
|
console.log(data.data.list)
|
|
|
that.setData({
|
|
|
list: res.data.data.list,
|
|
|
// cid: res.data.data.list[0].users[0].cid,
|
|
|
KeyWord: '',
|
|
|
// vip_state: true
|
|
|
list: data.data.list
|
|
|
})
|
|
|
|
|
|
// if (res.data.data.type == '-13') {
|
|
|
// wx.showToast({
|
|
|
// title: '会员到期,请充值',
|
|
|
// icon: 'none'
|
|
|
// }, 2000)
|
|
|
// that.setData({
|
|
|
// vip_state: false
|
|
|
// })
|
|
|
// } else if (res.data.data.type == '-12') {
|
|
|
// wx.showToast({
|
|
|
// title: '您已经被禁用,请联系管理员',
|
|
|
// icon: 'none'
|
|
|
// }, 2000)
|
|
|
// that.setData({
|
|
|
// vip_state: false
|
|
|
// })
|
|
|
// } else if (res.data.data.type == '-11') {
|
|
|
// wx.showToast({
|
|
|
// title: '您的权限不足',
|
|
|
// icon: 'none'
|
|
|
// }, 2000)
|
|
|
// that.setData({
|
|
|
// vip_state: false
|
|
|
// })
|
|
|
// } else if (res.data.data.type == '1') {
|
|
|
// that.setData({
|
|
|
// list: res.data.data.list,
|
|
|
// // cid: res.data.data.list[0].users[0].cid,
|
|
|
// KeyWord: '',
|
|
|
// // vip_state: true
|
|
|
// })
|
|
|
// if (res.data.data.list[0].users[0].cid != '') {
|
|
|
// that.setData({
|
|
|
// cid: res.data.data.list[0].users[0].cid,
|
|
|
// })
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
}).catch((errMsg) => {
|
|
|
// console.log(errMsg)
|
...
|
...
|
@@ -106,7 +70,6 @@ Page({ |
|
|
UserId: app.globalData.UserId,
|
|
|
}
|
|
|
app.post(url, param).then((res) => {
|
|
|
console.log(res, res.data.data.type)
|
|
|
if (res.data.code == 200) {
|
|
|
if (res.data.data.type == 5) {
|
|
|
wx.showToast({
|
...
|
...
|
@@ -126,15 +89,8 @@ Page({ |
|
|
})
|
|
|
} else{
|
|
|
that.setData({
|
|
|
list: res.data.data.list,
|
|
|
KeyWord: '',
|
|
|
vip_state: true
|
|
|
})
|
|
|
if (res.data.data.list[0].users[0].cid != '') {
|
|
|
that.setData({
|
|
|
cid: res.data.data.list[0].users[0].cid,
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}).catch((errMsg) => {
|
...
|
...
|
@@ -183,6 +139,7 @@ Page({ |
|
|
wx.navigateTo({
|
|
|
url: '../addNewFamily/addNewFamily?flag=' + flag,
|
|
|
})
|
|
|
wx.setStorageSync('familyid', '')
|
|
|
},
|
|
|
|
|
|
//管理成员
|
...
|
...
|
@@ -191,14 +148,15 @@ Page({ |
|
|
wx.navigateTo({
|
|
|
url: '../addNewFamily/addNewFamily?familyid=' + familyid,
|
|
|
})
|
|
|
wx.setStorageSync('familyid', familyid)
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
this.getdata()
|
|
|
this.getInfo()
|
|
|
// this.getdata()
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
|