|
@@ -45,8 +45,28 @@ Page({
|
|
dofun: null,
|
|
dofun: null,
|
|
xunjianImgCount: '000,000',
|
|
xunjianImgCount: '000,000',
|
|
NoticeTitle: "登录查看公告",
|
|
NoticeTitle: "登录查看公告",
|
|
- noticeItem:''
|
|
|
|
|
|
+ noticeItem: '',
|
|
|
|
+ // mList: null,
|
|
},
|
|
},
|
|
|
|
+ onReady() {
|
|
|
|
+ // this.popup = this.selectComponent("#popup");
|
|
|
|
+ },
|
|
|
|
+ // showPopup() {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // mList: this.data.mList
|
|
|
|
+ // })
|
|
|
|
+ // this.popup.showPopup();
|
|
|
|
+ // },
|
|
|
|
+ //取消事件
|
|
|
|
+ // _error() {
|
|
|
|
+ // console.log('你点击了取消');
|
|
|
|
+ // this.popup.hidePopup();
|
|
|
|
+ // },
|
|
|
|
+ // //确认事件
|
|
|
|
+ // _success() {
|
|
|
|
+ // console.log('你点击了确定');
|
|
|
|
+ // this.popup.hidePopup();
|
|
|
|
+ // },
|
|
|
|
|
|
onLoad() {
|
|
onLoad() {
|
|
this.setData({
|
|
this.setData({
|
|
@@ -55,10 +75,28 @@ Page({
|
|
this.data.host + '/images/banner3.jpg',
|
|
this.data.host + '/images/banner3.jpg',
|
|
this.data.host + '/images/banner2.jpg'
|
|
this.data.host + '/images/banner2.jpg'
|
|
]
|
|
]
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+ // requestPopupData() {
|
|
|
|
+ // // wx.navigateTo({
|
|
|
|
+ // // url: '../early_warning_list/early_warning_list',
|
|
|
|
+ // // })
|
|
|
|
+ // if (app.globalToken == null || app.globalToken == '') {
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // http.send_get("/system/AppIndexController/getLateInspectionList", null, this.getListSuccess)
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
+ // menuItemClick(res) {
|
|
|
|
+ // let busInspectionId = res.detail.iteminfo.busInspectionId
|
|
|
|
+ // let buslogid = res.detail.iteminfo.busLogId
|
|
|
|
+ // wx.navigateTo({
|
|
|
|
+ // url: '../zhenggaijindu/zhenggaijindu?busInspectionId=' + busInspectionId + "&buslogId=" + buslogid,
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
onShow() {
|
|
onShow() {
|
|
// if (app.globalToken == null) {
|
|
// if (app.globalToken == null) {
|
|
// wx.showToast({
|
|
// wx.showToast({
|
|
@@ -66,7 +104,8 @@ Page({
|
|
// icon: 'none'
|
|
// icon: 'none'
|
|
// })
|
|
// })
|
|
// }
|
|
// }
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ // this.requestPopupData()
|
|
this.initIndexPage();
|
|
this.initIndexPage();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -171,12 +210,12 @@ Page({
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- wx.navigateTo({
|
|
|
|
- url: '../search/search',
|
|
|
|
- })
|
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '../search/search',
|
|
|
|
+ })
|
|
},
|
|
},
|
|
//巡更跳转
|
|
//巡更跳转
|
|
- bindViewXungeng(){
|
|
|
|
|
|
+ bindViewXungeng() {
|
|
if (app.globalToken == null) {
|
|
if (app.globalToken == null) {
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '尚未登录,登录后即可使用',
|
|
title: '尚未登录,登录后即可使用',
|
|
@@ -190,34 +229,34 @@ Page({
|
|
scan() {
|
|
scan() {
|
|
|
|
|
|
wx.scanCode({
|
|
wx.scanCode({
|
|
- onlyFromCamera: true,
|
|
|
|
|
|
+ onlyFromCamera: true,
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
- url: '../xungengdetails/xungengdetails?id='+res.result,
|
|
|
|
|
|
+ url: '../xungengdetails/xungengdetails?id=' + res.result,
|
|
})
|
|
})
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
fail: (res) => {
|
|
fail: (res) => {
|
|
|
|
|
|
- // console.log(res);
|
|
|
|
- // wx.showToast({
|
|
|
|
- // title: '扫描失败',
|
|
|
|
- // icon:'none'
|
|
|
|
- // })
|
|
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // wx.showToast({
|
|
|
|
+ // title: '扫描失败',
|
|
|
|
+ // icon:'none'
|
|
|
|
+ // })
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
// 使用攻略跳转
|
|
// 使用攻略跳转
|
|
bindViewIntroduction() {
|
|
bindViewIntroduction() {
|
|
-
|
|
|
|
|
|
+
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: '../Introduction/Introduction'
|
|
url: '../Introduction/Introduction'
|
|
})
|
|
})
|
|
@@ -324,17 +363,18 @@ Page({
|
|
}
|
|
}
|
|
|
|
|
|
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) {
|
|
if (res.code == 200) {
|
|
this.setData({
|
|
this.setData({
|
|
xunjianImgCount: res.data.xunjianImgCount,
|
|
xunjianImgCount: res.data.xunjianImgCount,
|
|
})
|
|
})
|
|
if (res.data.noticeList.length > 0) {
|
|
if (res.data.noticeList.length > 0) {
|
|
-
|
|
|
|
|
|
+
|
|
this.setData({
|
|
this.setData({
|
|
NoticeTitle: res.data.noticeList[0].noticeTitle,
|
|
NoticeTitle: res.data.noticeList[0].noticeTitle,
|
|
noticeItem: res.data.noticeList[0]
|
|
noticeItem: res.data.noticeList[0]
|
|
@@ -347,27 +387,65 @@ Page({
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
-goNoticeDetails(e){
|
|
|
|
-
|
|
|
|
- let details = e.currentTarget.dataset.item
|
|
|
|
- if (app.globalToken == null) {
|
|
|
|
- wx.showToast({
|
|
|
|
- title: '尚未登录,登录后即可使用',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(details==null||details==''){
|
|
|
|
- wx.showToast({
|
|
|
|
- title: '暂无公告',
|
|
|
|
- icon: 'none'
|
|
|
|
|
|
+
|
|
|
|
+ getListSuccess(res) {
|
|
|
|
+ debugger
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+
|
|
|
|
+ var popInfo = res.data.late_inspection_list
|
|
|
|
+ console.log(popInfo)
|
|
|
|
+ if (res.data != null && res.data.late_inspection_list != null && res.data.late_inspection_list.length > 0) {
|
|
|
|
+ // this.data.mList = res.data.late_inspection_list
|
|
|
|
+ // // this.showPopup()
|
|
|
|
+ // this.popup.showPopup()
|
|
|
|
+ // this.setData({
|
|
|
|
+ // mList: this.data.mList
|
|
|
|
+ // })
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.popup.hidePopup();
|
|
|
|
+ // }, 2000)
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '是否需要确认预警?',
|
|
|
|
+ content: '',
|
|
|
|
+ complete: (res) => {
|
|
|
|
+ if (res.cancel) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '../early_warning_list/early_warning_list',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ goNoticeDetails(e) {
|
|
|
|
+
|
|
|
|
+ let details = e.currentTarget.dataset.item
|
|
|
|
+ if (app.globalToken == null) {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '尚未登录,登录后即可使用',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (details == null || details == '') {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '暂无公告',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '../notice/notice_details?details=' + JSON.stringify(details)
|
|
})
|
|
})
|
|
- return
|
|
|
|
- }
|
|
|
|
- wx.navigateTo({
|
|
|
|
- url: '../notice/notice_details?details='+JSON.stringify(details)
|
|
|
|
- })
|
|
|
|
-},
|
|
|
|
|
|
+ },
|
|
// getSysUserInfo(info) {
|
|
// getSysUserInfo(info) {
|
|
// let that = this
|
|
// let that = this
|
|
// wx.login({
|
|
// wx.login({
|
|
@@ -389,7 +467,7 @@ goNoticeDetails(e){
|
|
// })
|
|
// })
|
|
// },
|
|
// },
|
|
onTabItemTap(item) {
|
|
onTabItemTap(item) {
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|