|
@@ -44,36 +44,36 @@ Page({
|
|
//记录首页点击-登录后继续跳转
|
|
//记录首页点击-登录后继续跳转
|
|
dofun: null,
|
|
dofun: null,
|
|
xunjianImgCount: '000,000',
|
|
xunjianImgCount: '000,000',
|
|
- NoticeTitle:"登录查看公告"
|
|
|
|
|
|
+ NoticeTitle: "登录查看公告"
|
|
},
|
|
},
|
|
|
|
|
|
onLoad() {
|
|
onLoad() {
|
|
this.setData({
|
|
this.setData({
|
|
imgUrls: [
|
|
imgUrls: [
|
|
- this.data.host+'/images/banner.jpg',
|
|
|
|
- this.data.host+'/images/banner3.jpg',
|
|
|
|
- this.data.host+'/images/banner2.jpg'
|
|
|
|
|
|
+ this.data.host + '/images/banner.jpg',
|
|
|
|
+ this.data.host + '/images/banner3.jpg',
|
|
|
|
+ this.data.host + '/images/banner2.jpg'
|
|
]
|
|
]
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- onShow(){
|
|
|
|
- let token =wx.getStorageSync('access_token')
|
|
|
|
- if(token==''||token==null){
|
|
|
|
- app.globalToken=null
|
|
|
|
|
|
+ onShow() {
|
|
|
|
+ let token = wx.getStorageSync('access_token')
|
|
|
|
+ if (token == '' || token == null) {
|
|
|
|
+ app.globalToken = null
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '尚未登录,登录后即可使用',
|
|
title: '尚未登录,登录后即可使用',
|
|
- icon:'none'
|
|
|
|
|
|
+ icon: 'none'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.initIndexPage();
|
|
this.initIndexPage();
|
|
},
|
|
},
|
|
|
|
|
|
// 待办跳转
|
|
// 待办跳转
|
|
bindViewDaiBan() {
|
|
bindViewDaiBan() {
|
|
// wx.navigateTo({
|
|
// wx.navigateTo({
|
|
- // url: '../daiban/daiban'
|
|
|
|
|
|
+ // url: '../daiban/daiban'
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
// 企业跳转
|
|
// 企业跳转
|
|
@@ -95,7 +95,7 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//物资跳转
|
|
//物资跳转
|
|
- bindViewWuZi(){
|
|
|
|
|
|
+ bindViewWuZi() {
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: '../material/material',
|
|
url: '../material/material',
|
|
})
|
|
})
|
|
@@ -109,7 +109,7 @@ Page({
|
|
//巡检跳转
|
|
//巡检跳转
|
|
bindViewXunJian() {
|
|
bindViewXunJian() {
|
|
// wx.navigateTo({
|
|
// wx.navigateTo({
|
|
- // url: '../xunjian/xunjian',
|
|
|
|
|
|
+ // url: '../xunjian/xunjian',
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
// 使用攻略跳转
|
|
// 使用攻略跳转
|
|
@@ -178,7 +178,7 @@ Page({
|
|
|
|
|
|
// })
|
|
// })
|
|
// } else {
|
|
// } else {
|
|
- this.callByName(this.data.dofun)
|
|
|
|
|
|
+ this.callByName(this.data.dofun)
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
|
|
|
|
@@ -195,37 +195,38 @@ Page({
|
|
this.bindViewXunCha()
|
|
this.bindViewXunCha()
|
|
} else if (name == "bindViewXunjianimg") {
|
|
} else if (name == "bindViewXunjianimg") {
|
|
this.bindViewXunjianimg()
|
|
this.bindViewXunjianimg()
|
|
- }else if(name=="bindViewGengDuo"){
|
|
|
|
|
|
+ } else if (name == "bindViewGengDuo") {
|
|
this.bindViewGengDuo()
|
|
this.bindViewGengDuo()
|
|
- }else if(name=="bindViewWuZi"){
|
|
|
|
|
|
+ } else if (name == "bindViewWuZi") {
|
|
this.bindViewWuZi()
|
|
this.bindViewWuZi()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
initIndexPage() {
|
|
initIndexPage() {
|
|
- if(app.globalToken==null||app.globalToken==''){
|
|
|
|
|
|
+ if (app.globalToken == null || app.globalToken == '') {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
http.send_post("/system/AppIndexController/getIndexPageData", null, this.initIndexPageSuccess)
|
|
http.send_post("/system/AppIndexController/getIndexPageData", null, this.initIndexPageSuccess)
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
initIndexPageSuccess(res) {
|
|
initIndexPageSuccess(res) {
|
|
- if(res.code==200){
|
|
|
|
- this.setData({
|
|
|
|
- xunjianImgCount: res.xunjianImgCount,
|
|
|
|
- })
|
|
|
|
- if(res.noticeList.length>0){
|
|
|
|
- this.setData({
|
|
|
|
- NoticeTitle:res.noticeList[0].noticeTitle
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
|
|
+
|
|
|
|
+ if (res.code == 200) {
|
|
this.setData({
|
|
this.setData({
|
|
- NoticeTitle:"暂无公告"
|
|
|
|
|
|
+ xunjianImgCount: res.data.xunjianImgCount,
|
|
})
|
|
})
|
|
|
|
+ if (res.data.noticeList.length > 0) {
|
|
|
|
+ this.setData({
|
|
|
|
+ NoticeTitle: res.data.noticeList[0].noticeTitle
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.setData({
|
|
|
|
+ NoticeTitle: "暂无公告"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
// getSysUserInfo(info) {
|
|
// getSysUserInfo(info) {
|
|
@@ -248,8 +249,8 @@ Page({
|
|
// }
|
|
// }
|
|
// })
|
|
// })
|
|
// },
|
|
// },
|
|
- onTabItemTap(item){
|
|
|
|
- console.log("$$$$$$$",item)
|
|
|
|
|
|
+ onTabItemTap(item) {
|
|
|
|
+ console.log("$$$$$$$", item)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|