...
|
...
|
@@ -19,7 +19,8 @@ Page({ |
|
|
ifData:!1,
|
|
|
navScrollLeft:0,
|
|
|
noMore:!0,
|
|
|
beautiful_switch:0
|
|
|
beautiful_switch:0,
|
|
|
selectindex:0
|
|
|
},
|
|
|
changeShow(){
|
|
|
this.setData({
|
...
|
...
|
@@ -81,7 +82,8 @@ Page({ |
|
|
success:function(res){
|
|
|
console.log(res)
|
|
|
app.post(url,{code:res.code}).then((r)=>{
|
|
|
wx.setStorageSync('token', r.userInfo.token)
|
|
|
wx.setStorageSync('token', r.userInfo.token);
|
|
|
t.getUserInfo()
|
|
|
})
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -96,7 +98,18 @@ Page({ |
|
|
})
|
|
|
},
|
|
|
tabCharge(e) {
|
|
|
|
|
|
let s = this, singleWidth = s.data.windowWidth / 7, cur = e.currentTarget.dataset.index+1;
|
|
|
|
|
|
if (e.currentTarget.dataset.idx == -1) {
|
|
|
s.setData({
|
|
|
selectindex:0
|
|
|
})
|
|
|
} else{
|
|
|
s.setData({
|
|
|
selectindex: e.currentTarget.dataset.idx
|
|
|
})
|
|
|
}
|
|
|
s.setData({
|
|
|
beautiful_switch: e.currentTarget.dataset.beau,
|
|
|
companyList:[],
|
...
|
...
|
@@ -113,7 +126,7 @@ Page({ |
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
let a = this;
|
|
|
a.changeToken(),a.getUserInfo(),a.getTypes(), a.getAreas(), a.getCompanyList(), wx.getSystemInfo({
|
|
|
a.changeToken(),a.getTypes(), a.getAreas(), a.getCompanyList(), wx.getSystemInfo({
|
|
|
success: function (t) {
|
|
|
a.setData({
|
|
|
scrollHeight: t.windowHeight-50,
|
...
|
...
|
@@ -121,23 +134,17 @@ Page({ |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
getUserInfo() {
|
|
|
let d = this, url = '/api/user/index', params = {
|
|
|
header: true
|
|
|
}; app.post(url, params).then((r) => {
|
|
|
console.log(84352784356347865)
|
|
|
let d = this, url = '/api/user/index';
|
|
|
app.post(url, {}).then((r) => {
|
|
|
console.log(r.noticeNum)
|
|
|
d.setData({ userInfo: r.userInfo, noticeNum: r.noticeNum })
|
|
|
if (r.noticeNum!=0){
|
|
|
console.log(723457717342345325)
|
|
|
let num = r.noticeNum
|
|
|
num = num.toString()
|
|
|
|
|
|
wx.setTabBarBadge({
|
|
|
index: 4,
|
|
|
text: num
|
...
|
...
|
@@ -147,7 +154,6 @@ Page({ |
|
|
index: 4,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
|
...
|
...
|
|