//index.js
|
//获取应用实例
|
const app = getApp()
|
|
|
Page({
|
data: {
|
src: app.globalData.imgUrl +'/image/bg.jpg',
|
itemIcon: app.globalData.imgUrl +'/image/ceshi.jpg',
|
icon: app.globalData.imgUrl +'/image/fzl.svg',
|
user: app.globalData.imgUrl +'/image/user.svg',
|
yes: app.globalData.imgUrl +'/image/yes.svg',
|
add: app.globalData.imgUrl +'/image/add.svg',
|
del: app.globalData.imgUrl +'/image/del.svg',
|
imglist: [],
|
text: '',
|
color: '',
|
newData: {},
|
createTime: '',
|
result: '',
|
resulttetx: '',
|
adjustDate: '',
|
reason: '',
|
adjustTime: '',
|
isAdjust:''
|
},
|
//事件处理函数
|
schedulelawyer: function () {
|
wx.navigateTo({
|
url: '../schedulelawyer/schedulelawyer?newData=' + encodeURIComponent(JSON.stringify(this.data['newData'])),
|
})
|
},
|
|
schedulecase: function() {
|
wx.navigateTo({
|
url: '../schedulecase/schedulecase?newData=' + encodeURIComponent(JSON.stringify(this.data['newData'])),
|
})
|
},
|
videoInfo: function() {
|
wx.navigateTo({
|
url: '../videoInfo/videoInfo',
|
})
|
},
|
|
onLoad: function(options) {
|
var _this = this;
|
var id = options.id;
|
var newimg = [];
|
wx.request({
|
url: app.globalData.url + '/api/v1/paperApply/find/' + id,
|
success: function(res) {
|
if (res.data.code == 0) {
|
var date = new Date(res.data.data.createTime);
|
var month = date.getMonth();
|
var dateTime = date.getFullYear() + "-" + month + "-" + date.getDate()
|
_this.setData({
|
createTime: dateTime,
|
adjustDate: res.data.data.adjustDate,
|
adjustTime: res.data.data.adjustTime,
|
reason: res.data.data.reason,
|
newData: res.data.data,
|
});
|
res.data.data.attachments.map(function(track) {
|
if (track.type === 1001) {
|
newimg.push(track.path);
|
_this.setData({
|
imglist: newimg
|
})
|
} else {
|
_this.setData({
|
imglist: newimg
|
})
|
}
|
});
|
if (res.data.data.isAdjust == 0){
|
_this.setData({
|
isAdjust:"displayNone"
|
})
|
} else{
|
isAdjust: ""
|
}
|
if (res.data.data.status == 1) {
|
_this.setData({
|
text: "审核中",
|
color: "backgroundorange-title",
|
})
|
} else if (res.data.data.status == 2) {
|
_this.setData({
|
text: "通过",
|
color: "backgroundgreen-title",
|
})
|
} else if (res.data.data.status == 3) {
|
_this.setData({
|
text: "补充",
|
color: "backgroundblue-title",
|
})
|
} else {
|
_this.setData({
|
text: "驳回",
|
color: "backgroundred-title",
|
})
|
};
|
if (res.data.data.result == null) {
|
_this.setData({
|
result: "displayNone",
|
resulttetx: ''
|
})
|
|
} else {
|
_this.setData({
|
result: "displayblock",
|
resulttetx: res.data.data.result
|
})
|
|
}
|
} else {
|
wx.showModal({
|
title: '提示',
|
content: "提交失败!"
|
})
|
}
|
}
|
})
|
},
|
previewImage: function(e) {
|
var current = e.target.dataset.src;
|
wx.previewImage({
|
current: current, // 当前显示图片的http链接
|
urls: this.data.imglist // 需要预览的图片http链接列表
|
})
|
},
|
})
|