diff --git a/app.js b/app.js index 5c0b44d..93e1183 100644 --- a/app.js +++ b/app.js @@ -28,7 +28,6 @@ App({ // iphoneX顶部适配 wx.getSystemInfo({ success: function (res) { - console.log(res); if (res.statusBarHeight > 20) { console.log("Device is iPhoneX!!!"); that.globalData.isIPX = true; diff --git a/app.json b/app.json index fc7e88b..d181c05 100644 --- a/app.json +++ b/app.json @@ -10,10 +10,9 @@ "pages/apply/index", "pages/apply/paymentTemplate/paymentTemplate", "pages/apply/approval/approval", - "pages/inCome/inCome", - "pages/apply/approval/approval", + "pages/inCome/inCome", "pages/inCome/accounting/index", - "pages/apply/paymentTemplate/see/see", + "pages/apply/paymentTemplate/see/see", "pages/apply/paymentTemplate/add/add" ], "window": { "backgroundTextStyle": "light", diff --git a/env/env.js b/env/env.js index b6ffccb..c87839d 100644 --- a/env/env.js +++ b/env/env.js @@ -1,11 +1,11 @@ module.exports = { DEV: { - URL_PREFIX: '192.168.31.228:8080/', + URL_PREFIX: 'http://192.168.31.228/api', }, PRE: { - URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', + URL_PREFIX: 'http://192.168.31.228:8080/api', }, PROD: { - URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', + URL_PREFIX: 'http://192.168.31.228:8080/api', } } \ No newline at end of file diff --git a/image/icon/inCome.png b/image/icon/inCome.png new file mode 100644 index 0000000..9446d15 Binary files /dev/null and b/image/icon/inCome.png differ diff --git a/image/icon/password.png b/image/icon/password.png new file mode 100644 index 0000000..1c9f0c1 Binary files /dev/null and b/image/icon/password.png differ diff --git a/pages/apply/index.wxml b/pages/apply/index.wxml index 4162fc8..f2abd81 100644 --- a/pages/apply/index.wxml +++ b/pages/apply/index.wxml @@ -13,7 +13,6 @@ - 一般户 diff --git a/pages/inCome/accounting/index.wxml b/pages/inCome/accounting/index.wxml index 8a38aee..e1886b2 100644 --- a/pages/inCome/accounting/index.wxml +++ b/pages/inCome/accounting/index.wxml @@ -3,7 +3,7 @@ 记账申请 - + 收入流水0 支出流水0 diff --git a/pages/inCome/inCome.wxml b/pages/inCome/inCome.wxml index edaaf11..40a71e0 100644 --- a/pages/inCome/inCome.wxml +++ b/pages/inCome/inCome.wxml @@ -4,7 +4,7 @@ 收入登记 - + 收入单位 龙水镇龙洞村股份经济联合社 diff --git a/pages/index/index.js b/pages/index/index.js index a38c52e..2a78e5d 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -5,62 +5,222 @@ Page({ //顶部胶囊按钮位置信息rect CustomMenuButton: null, wrokScrollHeight:0, - userInfoObj:{} //用户信息 + userInfoObj:{}, //用户信息, + item:"", + active:1, + // 待办列表 + todoList:[], + // 已办列表 + doneList:[], + // 已发起 + yfqList:[], + // 已制单 + yzdList:[], + //待办数量 + todoNum:0, + //已办数量 + doneNum:0, + //已发起数量 + yfqNum:0, + //已制单数量 + yzdNum:0, + //字典 + transferType:[ + {"dictVale":1,"dictLabel":"村账户转账"}, + {"dictVale":2,"dictLabel":"公务卡转账"}, + {"dictVale":3,"dictLabel":"虚拟挂账"}, + {"dictVale":4,"dictLabel":"代管账户转账"}, + {"dictVale":5,"dictLabel":"母子转账"}, + {"dictVale":10,"dictLabel":"现金提现"}, + {"dictVale":11,"dictLabel":"现金使用"}, + {"dictVale":12,"dictLabel":"汇票支出"} + ] }, onLoad: function (options) { //获取用户信息 this.getUserInfo() - - //获取滚动条高度 this.computeBarLocation(); + //查询待办 + this.getTaskList(); + //查询已办 + this.getTaskDoneList(); + //查询已发起 + this.getTransferList(); + this.getTransferList1(); + //查询已制单 + this.getTransferList2(); }, - //跳转收入登记 -swichInCome:function(e){ - console.log(e.currentTarget.dataset.current); - // let cur = e.currentTarget.dataset.current; - // if (this.data.currentTaB == cur) { - // return false; - // }else{ - // wx.navigateTo({ - // url: '../inCome/index?id=' + id, - // }) - // } - wx.navigateTo({ - url: '../inCome/inCome?', - }) + switchTab:function(e){ + this.setData({ + active:e.currentTarget.dataset.gid + }) + }, + dictTranslate(d,value){ + let val = "" + for(var index in d){ + if(d[index].dictVale==value){ + return val = d[index].dictLabel + } + } }, + getTaskList:function(e){ + let data = { + pageNum:1, + pageSize:10, + orderByColumn:"A.ID_", + isAsc:"desc", + systemType:4, + method:"GET" + } + UTIL.httpRequest(API.URL_GET_TASKLIST,data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({todoNum:res.total}) + if(res.rows!=null&&res.rows!=""){ + for(let i = 0;i { + console.log(res); + }, + complete: (res) => { + console.log(res); + } + }) + }, + getTaskDoneList:function(e){ + let data = { + pageNum:1, + pageSize:10, + orderByColumn:"A.ID_", + isAsc:"desc", + systemType:4, + method:"GET" + } + UTIL.httpRequest(API.URL_GET_TASKDONELIST,data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({doneNum:res.total}) + if(res.rows!=null&&res.rows!=""){ + for(var index in res.rows){ + let d = this.dictTranslate(this.data.transferType,res.rows[index].formData.transferType) + res.rows[index].formData.transferType = d + } + this.setData({doneList:res.rows}) + } + } + }, fail: (res) => { + console.log(res); + }, + complete: (res) => { + console.log(res); + } + }) + }, + getTransferList:function(e){ + let data = { + // pageNum:1, + // pageSize:10, + transferType:"1", + auditStatus:"2", + method:"GET" + } + UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + console.log(res); + let a = this.data.yfqNum+res.total + this.setData({yfqNum:a}) + this.setData({yfqList:res.rows}) + } + }, fail: (res) => { + console.log(res); + }, + complete: (res) => { + console.log(res); + } + }) + }, + getTransferList1:function(e){ + let data = { + // pageNum:1, + // pageSize:10, + transferType:"1", + auditStatus:"3", + method:"GET" + } + UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + console.log(); + let a = this.data.yfqNum+res.total + this.setData({yfqNum:a}) + this.setData({yfqList:res.rows}) + } + }, fail: (res) => { + console.log(res); + }, + complete: (res) => { + console.log(res); + } + }) + }, + //已制单 + getTransferList2:function(e){ + let data = { + // pageNum:1, + // pageSize:10, + transferType:"1", + auditStatus:"0", + method:"GET" + } + UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({yzdNum:res.total}) + this.setData({yzdList:res.rows}) + } + }, fail: (res) => { + console.log(res); + }, + complete: (res) => { + console.log(res); + } + }) + }, + //跳转收入登记 + swichInCome:function(e){ + wx.navigateTo({ + url: '../inCome/inCome?', + }) + }, //跳转支出申请 -swichPayment:function(e){ - console.log(e.currentTarget.dataset.current); - // let cur = e.currentTarget.dataset.current; - // if (this.data.currentTaB == cur) { - // return false; - // }else{ - // wx.navigateTo({ - // url: '../inCome/index?id=' + id, - // }) - // } - wx.navigateTo({ - url: '../apply/index?', - }) - }, + swichPayment:function(e){ + wx.navigateTo({ + url: '../apply/index?', + }) + }, //跳转个人设置 -swichSettle:function(e){ - console.log(e.currentTarget.dataset.current); - // let cur = e.currentTarget.dataset.current; - // if (this.data.currentTaB == cur) { - // return false; - // }else{ - // wx.navigateTo({ - // url: '../inCome/index?id=' + id, - // }) - // } - wx.navigateTo({ - url: 'settle/index?', - }) - }, + swichSettle:function(e){ + // console.log(e.currentTarget.dataset.current); + // let cur = e.currentTarget.dataset.current; + // if (this.data.currentTaB == cur) { + // return false; + // }else{ + // wx.navigateTo({ + // url: '../inCome/index?id=' + id, + // }) + // } + wx.navigateTo({ + url: 'settle/index?', + }) + }, /* 计算bar 高度*/ computeBarLocation() { var that = this; @@ -94,6 +254,7 @@ swichSettle:function(e){ success: (res) => { if (res.code == API.SUCCESS_CODE) { this.setData({userInfoObj:res.user}) + this.setData({item:JSON.stringify(res.user)}) } } }) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 0f0970f..e490628 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -4,7 +4,7 @@ - + @@ -16,12 +16,12 @@ - 已完成 - 120件 + 未完成 + {{todoNum}}件 已完成 - 120件 + {{doneNum}}件 @@ -83,166 +83,81 @@ - 待办0 - 已办 - 已发起 - 已制单 + 待办{{todoNum}} + 已办{{doneNum}} + 已发起{{yfqNum}} + 已制单{{yzdNum}} > - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 - - -2600.00 - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 - - -2600.00 - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 - - -2600.00 - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 - - -2600.00 - - + + - 我的擦撒十大黑科技暗杀可接受的和 + {{item.formData.payer}} 待审 - 2021-1-26 + {{item.formData.applyDate}} - 银行转账 - - -2600.00 - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 + {{item.formData.transferType}} - -2600.00 - - - - - - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 - - - - - 银行转账 - - -2600.00 + {{item.formData.expenditureAmount}} + + - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 + {{item.formData.payer}} + 已审 + {{item.formData.applyDate}} 银行转账 - -2600.00 + {{item.formData.expenditureAmount}} + + - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 + {{item.payer}} + 已发起 + {{item.applyDate}} - 银行转账 + 村账户转账 - -2600.00 + {{item.expenditureAmount}} + + - 我的擦撒十大黑科技暗杀可接受的和 - 待审 - 2021-1-26 + {{item.payer}} + 已制单 + {{item.applyDate}} - 银行转账 + 村账户转账 - -2600.00 + {{item.expenditureAmount}} - diff --git a/pages/index/settle/eSign/index.js b/pages/index/settle/eSign/index.js index fd9945e..16c7631 100644 --- a/pages/index/settle/eSign/index.js +++ b/pages/index/settle/eSign/index.js @@ -1,4 +1,6 @@ -import SignaturePad from '../../../../utils/signature_pad' +import SignaturePad from '../../../../utils/signature_pad'; +import * as UTIL from '../../../../utils/util.js'; +import * as API from '../../../../utils/API.js'; let signaturePad = {}; let pix = 7; let penColor = 'black'; @@ -7,15 +9,19 @@ Page({ data: { penColor: 'black', lineWidth: 0.6, - isEmpty: true + isEmpty: true, + baseItem:"", + item:{}, }, onLoad: function(options) { + this.setData({baseItem:options.item}); + this.setData({item:JSON.parse(options.item)}); + console.log(this.data.item); var ctx = wx.createCanvasContext('handWriting'); const data = { devicePixelRatio: pix, }; signaturePad = new SignaturePad(ctx, data); - console.info(ctx, SignaturePad); }, uploadScaleStart(e) { const item = { @@ -60,17 +66,62 @@ Page({ }, //保存canvas图像 subCanvas: function() { + let _this = this if (this.data.isEmpty) { return false } wx.canvasToTempFilePath({ canvasId: 'handWriting', success: function(res) { - console.log(res.tempFilePath) - }, - fail: function(res) { - console.log(res) - } + console.log(res); + wx.uploadFile({ +       url: API.URL_POST_UPLOADFILE, //服务器地址 +       filePath:res.tempFilePath,//本地照片地址 +       name: 'file', + header: { + 'Content-Type': 'multipart/form-data', + 'Authorization':'Bearer '+getApp().globalData.userInfo.token, //如果需要token的话要传 + }, +       success (res){ + let dd = JSON.parse(res.data) + // console.log(dd); + // let a = _this.data.item + // a.electronicSignature = dd.fileName + // _this.setData({item:a}); + // _this.saveESign(JSON.stringify(_this.data.item)); + if(dd.code==200){ + wx.showToast({ + title: dd.msg, + duration: 2000, + icon:"success" + }) + setTimeout(() => { + _this.back() + }, 2000); + }else{ + wx.showToast({ + title: dd.msg, + duration: 2000, + icon:"none" + }) + } +       } +     }) + }, + fail: function(res) { + console.log(res) + } }) + }, + // 保存电子签名 + saveESign : function(item){ + UTIL.httpRequest(API.URL_POST_USEREDIT,item,{ + success: (res) => { + console.log(res); + if (res.code == API.SUCCESS_CODE) { + console.log(res); + } + } + }) } -}) \ No newline at end of file +}) diff --git a/pages/index/settle/eSign/index.wxml b/pages/index/settle/eSign/index.wxml index 50b4d39..475c5c2 100644 --- a/pages/index/settle/eSign/index.wxml +++ b/pages/index/settle/eSign/index.wxml @@ -3,7 +3,7 @@ 电子签名 - + diff --git a/pages/index/settle/index.js b/pages/index/settle/index.js index e4fcc64..02094dd 100644 --- a/pages/index/settle/index.js +++ b/pages/index/settle/index.js @@ -8,46 +8,18 @@ Page({ data: { isIPX: app.globalData.isIPX, show:false, - + baseItem:"", + item:{} }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.setData({baseItem:options.item}); + this.setData({item:JSON.parse(options.item)}); }, - //跳转密码修改 - switchPassWord:function(e){ - console.log(e.currentTarget.dataset.current); - // let cur = e.currentTarget.dataset.current; - // if (this.data.currentTaB == cur) { - // return false; - // }else{ - // wx.navigateTo({ - // url: '../inCome/index?id=' + id, - // }) - // } - wx.navigateTo({ - url: 'passWord/index?', - }) - }, - //跳转电子签名 -switchESign:function(e){ - console.log(e.currentTarget.dataset.current); - // let cur = e.currentTarget.dataset.current; - // if (this.data.currentTaB == cur) { - // return false; - // }else{ - // wx.navigateTo({ - // url: '../inCome/index?id=' + id, - // }) - // } - wx.navigateTo({ - url: 'eSign/index?', - }) - }, back:function(){ wx.navigateBack({ delta: 1 diff --git a/pages/index/settle/index.wxml b/pages/index/settle/index.wxml index 2599bff..39b32d8 100644 --- a/pages/index/settle/index.wxml +++ b/pages/index/settle/index.wxml @@ -1,16 +1,18 @@ - + 设置 - + 密码修改 - - + + + + @@ -18,8 +20,10 @@ 电子签名 - - + + + + \ No newline at end of file diff --git a/pages/index/settle/passWord/index.js b/pages/index/settle/passWord/index.js index 3b3d75a..ccbe1d3 100644 --- a/pages/index/settle/passWord/index.js +++ b/pages/index/settle/passWord/index.js @@ -1,4 +1,6 @@ // pages/apply/index.js +import * as UTIL from '../../../../utils/util.js'; +import * as API from '../../../../utils/API.js'; const app = getApp(); Page({ @@ -8,17 +10,98 @@ Page({ data: { isIPX: app.globalData.isIPX, show:false, - + baseItem:"", + item:{}, + oldPwd:"", + newPwd:"", }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.setData({baseItem:options.item}); + this.setData({item:JSON.parse(options.item)}); + console.log(this.data.item); + }, + bindOldInput: function (e) { + console.log(e); + this.setData({ + oldPwd: e.detail.value + }) + }, + bindNewInput: function (e) { + console.log(e); + this.setData({ + newPwd: e.detail.value + }) + }, +updatePassword(){ + let newPassword = this.data.newPwd; + let oldPassword = this.data.oldPwd; + const d = {oldPassword, newPassword} + + if(newPassword==""||oldPassword==""){ + wx.showToast({ + title: '新旧密码不能为空!', + duration: 2000, + icon:"none" + }) + }else if(newPassword==oldPassword){ + wx.showToast({ + title: '新旧密码不能相同!', + duration: 2000, + icon:"none" + }) + }else{ + wx.request({ + url:API.URL_POST_UPDATEPWD, + data: d, + method: 'POST', + timeout: 60000, + header: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization':'Bearer '+getApp().globalData.userInfo.token, + + }, + success: function (response) { + if(response.data.code==200){ + wx.showToast({ + title: response.data.msg, + duration: 2000, + icon:"success" + }) + }else{ + wx.showToast({ + title: response.data.msg, + duration: 2000, + icon:"none" + }) + } + }, + fail: function (response) { + console.log(response); + }, + complete: function (response) { + console.log(response); + } + }) + // UTIL.httpRequest(API.URL_POST_UPDATEPWD, d, { + // success: (res) => { + // console.log(res); + // if (res.code == API.SUCCESS_CODE) { + + // } + // }, + // fail:(res) => { + // console.log(res); + // }, + // complete:(res) => { + // console.log(res); + // } + // }) + } }, - - back:function(){ wx.navigateBack({ delta: 1 diff --git a/pages/index/settle/passWord/index.wxml b/pages/index/settle/passWord/index.wxml index ec372b6..f69afba 100644 --- a/pages/index/settle/passWord/index.wxml +++ b/pages/index/settle/passWord/index.wxml @@ -3,14 +3,14 @@ 密码修改 - + 旧密码 - + @@ -19,7 +19,12 @@ 新密码 - + - \ No newline at end of file + + + + + + diff --git a/pages/index/settle/passWord/index.wxss b/pages/index/settle/passWord/index.wxss index ca28151..b2d7bdf 100644 --- a/pages/index/settle/passWord/index.wxss +++ b/pages/index/settle/passWord/index.wxss @@ -65,4 +65,14 @@ .table-box text{ line-height: 80rpx; } - \ No newline at end of file + .btn{ + text-align: center; + } + .btn button{ + line-height: 1.7; + padding-left:80rpx; + padding-right:80rpx; + border-radius: 30rpx; + display: inline-block; + margin: 50rpx auto; + } \ No newline at end of file diff --git a/pages/user/login/login.js b/pages/user/login/login.js index 3a2563d..6f681ea 100644 --- a/pages/user/login/login.js +++ b/pages/user/login/login.js @@ -6,20 +6,25 @@ const APP = getApp(); Page({ data: { isIPhoneX:false, - privacyCheck:true //用户协议 + privacyCheck:true, //用户协议 + }, onLoad: function (options) { this.setData({ isIPhoneX:UTIL.isIPhoneX() }) + this.automaticLogin() + //this.getUserInfo() + //this.getPhoneNumber() }, + //自动登录 automaticLogin(){ let automatic = STORAGE.getToken(); let getOpenId = STORAGE.getOpenId(); if(automatic == '' && getOpenId ==''){ - console.log(); + console.log(1); UTIL.getCOdeFromWX({ complate: (code) => { let sendData = { @@ -27,11 +32,14 @@ Page({ } UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { success: (res) => { + console.log(res); if (res.code == API.SUCCESS_CODE) { wx.navigateTo({ url: '/pages/index/index', }) - } + } else{ + this.getPhoneNumber() + } } }) } @@ -54,6 +62,16 @@ Page({ privacyCheck:checkStatus }) }, + /* 获取用户信息*/ + getUserInfo(){ + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({userInfoObj:res.user}) + } + } + }) + }, //微信一键登录授权 getPhoneNumber: function(res) { let that = this; @@ -73,7 +91,7 @@ Page({ iv:detail.iv, encryptedData:detail.encryptedData } - UTIL.httpRequest(API.URL_POST_DECRYPTEDWXDATA, sendData,{ + UTIL.httpRequestNoneDetal(API.URL_POST_DECRYPTEDWXDATA, sendData, "POST", { success: (res) => { if (res.code == API.SUCCESS_CODE) { let phoneNumber = res.data.phoneNumber; @@ -82,21 +100,40 @@ Page({ // UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); } else { //待删 - UTIL.showToastNoneIcon(res.msg) } }, fail: (res) => { + console.log("fail"); UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) } - }); + }) + // UTIL.httpRequest(API.URL_POST_DECRYPTEDWXDATA, sendData,{ + // success: (res) => { + // console.log(res); + // // if (res.code == API.SUCCESS_CODE) { + // // let phoneNumber = res.data.phoneNumber; + // // //微信手机号码绑定 + // // that.wxUserBand(phoneNumber) + // // // UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); + // // } else { + // // //待删 + + // // UTIL.showToastNoneIcon(res.msg) + // // } + // }, + // fail: (res) => { + // console.log("fail"); + // UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) + // } + // }); }, wxUserBand(phone){ let sendData = { openId:STORAGE.getOpenId(), phonenumber:phone } - UTIL.httpRequest(API.URL_POST_USERBAND, sendData,{ + UTIL.httpRequestNoneDetal(API.URL_POST_USERBAND, sendData,"POST",{ success: (res) => { if (res.code == API.SUCCESS_CODE) { wx.navigateTo({ @@ -110,8 +147,7 @@ Page({ UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) } }); - console.log(sendData) // } - + }) \ No newline at end of file diff --git a/project.config.json b/project.config.json index 2e9d4b1..06f098c 100644 --- a/project.config.json +++ b/project.config.json @@ -1,4 +1,5 @@ { + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "packOptions": { "ignore": [ @@ -10,6 +11,7 @@ "include": [] }, "setting": { + "urlCheck": false, "es6": true, "enhance": true, diff --git a/utils/API.js b/utils/API.js index 1f476a8..92a5b04 100644 --- a/utils/API.js +++ b/utils/API.js @@ -33,7 +33,18 @@ const URL_POST_DECRYPTEDWXDATA = `${URL_PREFIX}/wechat/decryptedWXData`; const URL_POST_USERBAND = `${URL_PREFIX}/register/wechat/band`; //获取用户信息 const URL_GET_GETINFO = `${URL_PREFIX}/getInfo`; - +//获取待办 +const URL_GET_TASKLIST = `${URL_PREFIX}/activiti/process/taskList`; +//获取已办 +const URL_GET_TASKDONELIST = `${URL_PREFIX}/activiti/process/taskDoneList`; +//获取已发起、已制单 +const URL_GET_TRANSFERLIST = `${URL_PREFIX}/yinnong/transfer/list`; +// 修改密码 +const URL_POST_UPDATEPWD = `${URL_PREFIX}/system/user/profile/updatePwd`; +// 上传图片 +const URL_POST_UPLOADFILE = `${URL_PREFIX}/system/user/profile/electronicSignature`; +// 保存电子签名 +const URL_POST_USEREDIT = `${URL_PREFIX}/system/user/edit`; /****************接口地址end****************/ export { @@ -50,5 +61,11 @@ export { URL_GET_OPENID, URL_POST_DECRYPTEDWXDATA, URL_POST_USERBAND, - URL_GET_GETINFO + URL_GET_GETINFO, + URL_GET_TASKLIST, + URL_GET_TASKDONELIST, + URL_GET_TRANSFERLIST, + URL_POST_UPDATEPWD, + URL_POST_UPLOADFILE, + URL_POST_USEREDIT } \ No newline at end of file diff --git a/utils/util.js b/utils/util.js index 16f7783..abf4c43 100644 --- a/utils/util.js +++ b/utils/util.js @@ -113,14 +113,15 @@ function httpRequest(url, data, { wx.showNavigationBarLoading(); let finalData = {}; Object.assign(finalData, data); - // finalData.token = getApp().globalData.userInfo.token; + + finalData.token = getApp().globalData.userInfo.token; wx.request({ url, data: finalData, method: data.method || 'POST', timeout: 60000, header: { - 'Authorization':'Bearer '+getApp().globalData.userInfo.token + 'Authorization':'Bearer '+getApp().globalData.userInfo.token, }, success: function (response) { if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { @@ -171,7 +172,6 @@ function httpRequestNoneDetal(url, data, method, { data: data, method: method, success: function (response) { - if (typeof success === FUNCTION_TEXT) { success(response.data); } @@ -262,7 +262,6 @@ function getCOdeFromWX({ complate }) { showLoadingHaveMask('正在加载数据..'); wx.login({ success: function (data) { - console.log(data) complate(data.code); hideLoadingHaveMask() },