| | |
| | | evalList: {}, |
| | | dataSet: {}, |
| | | picturesInfo: {}, |
| | | entityId: '' |
| | | entityId: '', |
| | | approveLogs: [] |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | onLoad: function(options) { |
| | | var that = this; |
| | | console.log(options) |
| | | let id = options.id |
| | |
| | | var userinfo = wx.getStorageSync("user"); |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/entry/find?id=' + id + '&flag=' + flag, |
| | | success: function (res) { |
| | | success: function(res) { |
| | | console.log(res.data) |
| | | // if (res.data.code == 0) { |
| | | console.log(res.data) |
| | |
| | | ...res.data, |
| | | createrId: userinfo.id, |
| | | }, |
| | | approveLogs: res.data.approveLogs || [], |
| | | entityId: res.data.id, |
| | | disabled, |
| | | evalList |
| | |
| | | }) |
| | | }, |
| | | |
| | | inputChange: function (e) { |
| | | inputChange: function(e) { |
| | | var name = e.currentTarget.dataset.name; |
| | | this.setData({ |
| | | picturesInfo: { |
| | |
| | | |
| | | }, |
| | | |
| | | submit: function (e) { |
| | | submit: function(e) { |
| | | var picturesInfo = this.data.picturesInfo; |
| | | |
| | | if (!picturesInfo.reason) { |
| | |
| | | header: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | success: function (res) { |
| | | success: function(res) { |
| | | // if (res.data.code == 0) { |
| | | wx.showToast({ |
| | | title: '提交成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | setTimeout(function () { |
| | | setTimeout(function() { |
| | | wx.reLaunch({ |
| | | url: '../zhwj/zhwj', |
| | | }) |
| | |
| | | }, |
| | | |
| | | // 删除图片 |
| | | clearImg: function (e) { |
| | | clearImg: function(e) { |
| | | var that = this; |
| | | app.clearImg(e, that) |
| | | }, |
| | | |
| | | //预览图片 |
| | | previewImage: function (e) { |
| | | previewImage: function(e) { |
| | | app.previewImage(e) |
| | | }, |
| | | |
| | | uploadFiles: function (e) { |
| | | uploadFiles: function(e) { |
| | | var that = this; |
| | | wx.showActionSheet({ |
| | | itemList: ['拍照上传', '选择图片'], |
| | | success: function (res) { |
| | | success: function(res) { |
| | | app.joinPicture(e, that, 1019, that.data.entityId) |
| | | }, |
| | | fail: function (res) {} |
| | | fail: function(res) {} |
| | | }) |
| | | }, |
| | | }) |