From 310a90ff3a35b202340d92ad6014d12b6f3ea46a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 23 Oct 2020 15:15:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A3=8E=E9=99=A9=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- pages/riskact/check.js | 27 ++++++++- pages/riskact/check.wxml | 17 +++++- pages/risktask/detail.js | 18 ++++++ pages/risktask/detail.wxml | 7 +++ project.config.json | 114 ++++++++++++++++++------------------- 6 files changed, 125 insertions(+), 62 deletions(-) diff --git a/app.js b/app.js index d24175a..bce0753 100644 --- a/app.js +++ b/app.js @@ -97,8 +97,8 @@ App({ perms:[], openid:null }, - serverUrl: 'https://safeyun.ctcshe.com/', - //serverUrl: 'http://127.0.0.1:8000/', + //serverUrl: 'https://safeyun.ctcshe.com/', + 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 @@ - + 检查备注 + + + +