diff --git a/app.js b/app.js index d24175a..45ce375 100644 --- a/app.js +++ b/app.js @@ -98,7 +98,7 @@ App({ openid:null }, serverUrl: 'https://safeyun.ctcshe.com/', - //serverUrl: 'http://127.0.0.1:8000/', + //serverUrl: 'http://127.0.0.1:8002/', //serverUrl: 'http://10.21.28.148:8000/', //serverUrl: 'http://192.168.0.103:8000/', //serverUrl:'http://10.0.11.195:8000/', diff --git a/pages/riskact/check.js b/pages/riskact/check.js index ea0d618..b17d53f 100644 --- a/pages/riskact/check.js +++ b/pages/riskact/check.js @@ -11,6 +11,9 @@ Page({ group: 0 }, + bindnoteInput: function (e) { + this.data.checknote = e.detail.value + }, /** * 生命周期函数--监听页面加载 */ @@ -18,10 +21,28 @@ Page({ console.log(options) this.data.riskact = options.riskact if(options.riskacttask){ - this.riskacttask = options.riskacttask + this.data.riskacttask = options.riskacttask + this.getTaskDetail() } this.getlist() }, + getTaskDetail:function() { + wx.request({ + url: getApp().globalData.serverUrl + 'api/riskacttask?a=detail&id=' + this.data.riskacttask, + header: { + 'content-type': 'application/json', // 默认值 + 'Cookie': getApp().globalData.sessionId, + }, + success: res => { + if (res.statusCode === 200) { + this.setData({ + tasknote: res.data.data.tasknote, + }) + } + } + }); + + }, getlist: function () { var page = this.data.page wx.showLoading({ @@ -101,7 +122,6 @@ Page({ }) }, submit: function () { - console.log(this.data.alllist) let alllist = this.data.alllist let data = {'checks':[],'riskact':this.data.riskact, 'riskacttask':this.data.riskacttask} for (var i = 0; i < alllist.length; i++) { @@ -115,6 +135,9 @@ Page({ wx.showLoading({ title: '提交中', }) + if(this.data.checknote){ + data.note = this.data.checknote //检查备注 + } wx.request({ url: getApp().globalData.serverUrl + 'api/riskcheck2?a=add', header: { diff --git a/pages/riskact/check.wxml b/pages/riskact/check.wxml index de85e76..7eec202 100644 --- a/pages/riskact/check.wxml +++ b/pages/riskact/check.wxml @@ -1,4 +1,11 @@ 共{{total}}条风险 + + + + 检查说明:{{tasknote}} + + + @@ -45,7 +52,15 @@ - + 检查备注 + + + +