|
@@ -33,9 +33,10 @@ Page({
|
|
|
listid: "1"
|
|
|
},
|
|
|
],
|
|
|
+ isBeforeBack:false,
|
|
|
+ isAfterBack:false,
|
|
|
},
|
|
|
|
|
|
-
|
|
|
takePicture: function (e) {
|
|
|
// 拍照
|
|
|
let jibie = e.currentTarget.dataset.jibie
|
|
@@ -116,15 +117,6 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
changeme: function (e) {
|
|
|
let that = this
|
|
|
let checked = e.detail.value;
|
|
@@ -229,17 +221,34 @@ Page({
|
|
|
},
|
|
|
//上传图片
|
|
|
onLoad: function (options) {
|
|
|
+ console.log("TAG","onLoad_"+options.isBeforeBack);
|
|
|
+ this.data.isBeforeBack=options.isBeforeBack;
|
|
|
this.pictureAuthSetting()
|
|
|
this.data.busEnterpriseId = options.busEnterpriseId
|
|
|
- this.getXunjianItems()
|
|
|
+ // this.getXunjianItems()
|
|
|
this.setData({
|
|
|
//通过bind(this)将函数绑定到this上,以后函数内的this就是指全局页面
|
|
|
//setdata以后,这两个函数就可以传递给mp-uploader了
|
|
|
selectFile: this.selectFile.bind(this),
|
|
|
- uplaodFile: this.uplaodFile.bind(this)
|
|
|
+ uplaodFile: this.uplaodFile.bind(this),
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ onShow:function(){
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let currPage = pages[pages.length-1];
|
|
|
+ this.data.isAfterBack=currPage.data.isAfterBack;
|
|
|
+ // this.data.busEnterpriseId = options.busEnterpriseId
|
|
|
+ // console.log("TAG","onShow_before_"+this.data.isBeforeBack);
|
|
|
+ // console.log("TAG","onShow_after_"+this.data.isAfterBack);
|
|
|
+ if(this.data.isBeforeBack){
|
|
|
+ this.getXunjianItems()
|
|
|
+ this.data.isBeforeBack=false
|
|
|
+ }
|
|
|
+ if(this.data.isAfterBack){
|
|
|
+ this.getXunjianItems()
|
|
|
+ this.data.isAfterBack=false
|
|
|
+ }
|
|
|
+ },
|
|
|
//mpuploader选择图片时的过滤函数,返回true表示图片有效
|
|
|
selectFile(files) {
|
|
|
wx.showLoading({
|
|
@@ -297,7 +306,7 @@ Page({
|
|
|
console.log('upload success', e.detail)
|
|
|
this.data.files = this.data.files.concat(e.detail.url)
|
|
|
this.setData({
|
|
|
- files: this.data.files
|
|
|
+ files: this.data.files,
|
|
|
})
|
|
|
wx.hideLoading()
|
|
|
},
|
|
@@ -308,7 +317,9 @@ Page({
|
|
|
},
|
|
|
|
|
|
getXunjianItems() {
|
|
|
+ // console.log("TAG","getXunjianItems")
|
|
|
var obj = new Object()
|
|
|
+
|
|
|
obj.busEnterpriseId = this.data.busEnterpriseId
|
|
|
http.post("/system/AppXunjianController/getXunjianItems", obj, this.getXunjianItemsSuccess)
|
|
|
},
|
|
@@ -339,12 +350,12 @@ Page({
|
|
|
if (res.code == 200) {
|
|
|
if (res.data.haveXQZG == true) {
|
|
|
//有限期整改的东西,去通知书页面
|
|
|
- wx.navigateTo({
|
|
|
+ wx.navigateBack({
|
|
|
url: '../xqzggzs2/xqzggzs2?logId=' + res.data.logId + "&busEnterpriseId=" + this.data.busEnterpriseId,
|
|
|
})
|
|
|
} else {
|
|
|
// 直接返回详情页
|
|
|
- wx.navigateTo({
|
|
|
+ wx.navigateBack({
|
|
|
url: '../details/details?busEnterpriseId=' + this.data.busEnterpriseId,
|
|
|
})
|
|
|
}
|
|
@@ -436,9 +447,7 @@ Page({
|
|
|
}
|
|
|
clearInterval(interval); // 清除setInterval
|
|
|
time = 0;
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
+ },
|
|
|
|
|
|
})
|
|
|
|