@@ -28,7 +28,6 @@ App({ | |||||
// iphoneX顶部适配 | // iphoneX顶部适配 | ||||
wx.getSystemInfo({ | wx.getSystemInfo({ | ||||
success: function (res) { | success: function (res) { | ||||
console.log(res); | |||||
if (res.statusBarHeight > 20) { | if (res.statusBarHeight > 20) { | ||||
console.log("Device is iPhoneX!!!"); | console.log("Device is iPhoneX!!!"); | ||||
that.globalData.isIPX = true; | that.globalData.isIPX = true; | ||||
@@ -10,10 +10,9 @@ | |||||
"pages/apply/index", | "pages/apply/index", | ||||
"pages/apply/paymentTemplate/paymentTemplate", | "pages/apply/paymentTemplate/paymentTemplate", | ||||
"pages/apply/approval/approval", | "pages/apply/approval/approval", | ||||
"pages/inCome/inCome", | |||||
"pages/apply/approval/approval", | |||||
"pages/inCome/inCome", | |||||
"pages/inCome/accounting/index", | "pages/inCome/accounting/index", | ||||
"pages/apply/paymentTemplate/see/see", | |||||
"pages/apply/paymentTemplate/see/see", | |||||
"pages/apply/paymentTemplate/add/add" ], | "pages/apply/paymentTemplate/add/add" ], | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
@@ -1,11 +1,11 @@ | |||||
module.exports = { | module.exports = { | ||||
DEV: { | DEV: { | ||||
URL_PREFIX: '192.168.31.228:8080/', | |||||
URL_PREFIX: 'http://192.168.31.228/api', | |||||
}, | }, | ||||
PRE: { | PRE: { | ||||
URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', | |||||
URL_PREFIX: 'http://192.168.31.228:8080/api', | |||||
}, | }, | ||||
PROD: { | PROD: { | ||||
URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', | |||||
URL_PREFIX: 'http://192.168.31.228:8080/api', | |||||
} | } | ||||
} | } |
@@ -13,7 +13,6 @@ | |||||
<view class="main"> | <view class="main"> | ||||
<van-tabs sticky color="#000"> | <van-tabs sticky color="#000"> | ||||
<van-tab title="银行账户"> | <van-tab title="银行账户"> | ||||
<view class="bank_box"> | <view class="bank_box"> | ||||
<text class="zt">一般户</text> | <text class="zt">一般户</text> | ||||
<image src="../../image/apply/jsyh_bg2.png" style="width: 100%;position: absolute;bottom:0;z-index: 9;" mode="widthFix"></image> | <image src="../../image/apply/jsyh_bg2.png" style="width: 100%;position: absolute;bottom:0;z-index: 9;" mode="widthFix"></image> | ||||
@@ -3,7 +3,7 @@ | |||||
<image src="../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">记账申请</text> | <text style="top:{{isIPX?'54px':'30px'}};">记账申请</text> | ||||
</view> | </view> | ||||
<view class="work_plan"> | |||||
<view class="work_plan" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<view> | <view> | ||||
<view class="menu_item {{inOrOut?'active':''}}" bindtap="switchTab" data-gid='{{1}}'>收入流水<text class="remind">0</text></view> | <view class="menu_item {{inOrOut?'active':''}}" bindtap="switchTab" data-gid='{{1}}'>收入流水<text class="remind">0</text></view> | ||||
<view class="menu_item {{!inOrOut?'active':''}}" bindtap="switchTab" data-gid='{{2}}'>支出流水<text class="remind">0</text></view> | <view class="menu_item {{!inOrOut?'active':''}}" bindtap="switchTab" data-gid='{{2}}'>支出流水<text class="remind">0</text></view> | ||||
@@ -4,7 +4,7 @@ | |||||
<text style="top:{{isIPX?'54px':'30px'}};">收入登记</text> | <text style="top:{{isIPX?'54px':'30px'}};">收入登记</text> | ||||
</view> | </view> | ||||
<!-- 付款单位开始 --> | <!-- 付款单位开始 --> | ||||
<view class="top"> | |||||
<view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<image src="../../image/apply/dress_icon.png" mode="widthFix"></image> | <image src="../../image/apply/dress_icon.png" mode="widthFix"></image> | ||||
<view class="top-tit">收入单位</view> | <view class="top-tit">收入单位</view> | ||||
<view class="top-title">龙水镇龙洞村股份经济联合社</view> | <view class="top-title">龙水镇龙洞村股份经济联合社</view> | ||||
@@ -5,62 +5,222 @@ Page({ | |||||
//顶部胶囊按钮位置信息rect | //顶部胶囊按钮位置信息rect | ||||
CustomMenuButton: null, | CustomMenuButton: null, | ||||
wrokScrollHeight:0, | 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) { | onLoad: function (options) { | ||||
//获取用户信息 | //获取用户信息 | ||||
this.getUserInfo() | this.getUserInfo() | ||||
//获取滚动条高度 | //获取滚动条高度 | ||||
this.computeBarLocation(); | 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<res.total;i++){ | |||||
let d = this.dictTranslate(this.data.transferType,res.rows[i].formData.transferType) | |||||
res.rows[i].formData.transferType = d | |||||
} | |||||
this.setData({todoList:res.rows}) | |||||
} | |||||
} | |||||
}, fail: (res) => { | |||||
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 高度*/ | /* 计算bar 高度*/ | ||||
computeBarLocation() { | computeBarLocation() { | ||||
var that = this; | var that = this; | ||||
@@ -94,6 +254,7 @@ swichSettle:function(e){ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
this.setData({userInfoObj:res.user}) | this.setData({userInfoObj:res.user}) | ||||
this.setData({item:JSON.stringify(res.user)}) | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -4,7 +4,7 @@ | |||||
<view class="top_title" style="height:{{CustomMenuButton.bottom}}px;z-index: 7777;padding-top: {{CustomMenuButton.top}}px;"></view> | <view class="top_title" style="height:{{CustomMenuButton.bottom}}px;z-index: 7777;padding-top: {{CustomMenuButton.top}}px;"></view> | ||||
<!--账户信息--> | <!--账户信息--> | ||||
<view class="information_header"> | <view class="information_header"> | ||||
<navigator bindtap="swichSettle" class="setup" style="background:url('../../image/index/setup.png') no-repeat; background-size: 100% 100%;"></navigator> | |||||
<navigator url="{{'settle/index?item='+item}}" class="setup" style="background:url('../../image/index/setup.png') no-repeat; background-size: 100% 100%;"></navigator> | |||||
<view class="portrait_head"></view> | <view class="portrait_head"></view> | ||||
<view class="information_main"> | <view class="information_main"> | ||||
<view class="name_wrap"> | <view class="name_wrap"> | ||||
@@ -16,12 +16,12 @@ | |||||
</view> | </view> | ||||
<view class="task_wrap "> | <view class="task_wrap "> | ||||
<view class="flex_block"> | <view class="flex_block"> | ||||
<view class="desc">已完成</view> | |||||
<view class="event">120件</view> | |||||
<view class="desc">未完成</view> | |||||
<view class="event">{{todoNum}}件</view> | |||||
</view> | </view> | ||||
<view class="flex_block unfinished"> | <view class="flex_block unfinished"> | ||||
<view class="desc">已完成</view> | <view class="desc">已完成</view> | ||||
<view class="event">120件</view> | |||||
<view class="event">{{doneNum}}件</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="address_wrap"> | <view class="address_wrap"> | ||||
@@ -83,166 +83,81 @@ | |||||
</view> | </view> | ||||
<!--工作计划--> | <!--工作计划--> | ||||
<view class="work_plan"> | <view class="work_plan"> | ||||
<view class="menu_item active">待办<text class="remind">0</text></view> | |||||
<view class="menu_item">已办</view> | |||||
<view class="menu_item">已发起</view> | |||||
<view class="menu_item">已制单</view> | |||||
<view class="menu_item {{active==1?'active':''}}" bindtap="switchTab" data-gid='{{1}}'>待办<text class="remind">{{todoNum}}</text></view> | |||||
<view class="menu_item {{active==2?'active':''}}" bindtap="switchTab" data-gid='{{2}}'>已办<text class="remind">{{doneNum}}</text></view> | |||||
<view class="menu_item {{active==3?'active':''}}" bindtap="switchTab" data-gid='{{3}}'>已发起<text class="remind">{{yfqNum}}</text></view> | |||||
<view class="menu_item {{active==4?'active':''}}" bindtap="switchTab" data-gid='{{4}}'>已制单<text class="remind">{{yzdNum}}</text></view> | |||||
<view class="more">></view> | <view class="more">></view> | ||||
</view> | </view> | ||||
<scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;"> | |||||
<view class="workflow"> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;" > | |||||
<view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="id"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="name">{{item.formData.payer}}</view> | |||||
<view class="state">待审</view> | <view class="state">待审</view> | ||||
<view class="time">2021-1-26</view> | |||||
<view class="time">{{item.formData.applyDate}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
<text>{{item.formData.transferType}}</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
</view> | |||||
</view> | |||||
<!--1--> | |||||
<view class="workflow_list"> | |||||
<view class="process_intro"> | |||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
</view> | |||||
<view class="process_pay"> | |||||
<view class="describe"> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text>银行转账</text> | |||||
</view> | |||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
<view class="amount"><text class="unit">¥</text>{{item.formData.expenditureAmount}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
<view class="workflow" wx:if="{{active=='2'}}" wx:for-item="item" wx:for="{{doneList}}" wx:key="id"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
<view class="name">{{item.formData.payer}}</view> | |||||
<view class="state">已审</view> | |||||
<view class="time">{{item.formData.applyDate}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text>银行转账</text> | <text>银行转账</text> | ||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
<view class="amount"><text class="unit">¥</text>{{item.formData.expenditureAmount}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
<view class="workflow" wx:if="{{active=='3'}}" wx:for-item="item" wx:for="{{yfqList}}" wx:key="id"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
<view class="name">{{item.payer}}</view> | |||||
<view class="state">已发起</view> | |||||
<view class="time">{{item.applyDate}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text>银行转账</text> | |||||
<text>村账户转账</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
<view class="amount"><text class="unit">¥</text>{{item.expenditureAmount}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
<view class="workflow" wx:if="{{active=='4'}}" wx:for-item="item" wx:for="{{yzdList}}" wx:key="id"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">我的擦撒十大黑科技暗杀可接受的和</view> | |||||
<view class="state">待审</view> | |||||
<view class="time">2021-1-26</view> | |||||
<view class="name">{{item.payer}}</view> | |||||
<view class="state">已制单</view> | |||||
<view class="time">{{item.applyDate}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text>银行转账</text> | |||||
<text>村账户转账</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>-2600.00</view> | |||||
<view class="amount"><text class="unit">¥</text>{{item.expenditureAmount}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</scroll-view> | </scroll-view> | ||||
@@ -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 signaturePad = {}; | ||||
let pix = 7; | let pix = 7; | ||||
let penColor = 'black'; | let penColor = 'black'; | ||||
@@ -7,15 +9,19 @@ Page({ | |||||
data: { | data: { | ||||
penColor: 'black', | penColor: 'black', | ||||
lineWidth: 0.6, | lineWidth: 0.6, | ||||
isEmpty: true | |||||
isEmpty: true, | |||||
baseItem:"", | |||||
item:{}, | |||||
}, | }, | ||||
onLoad: function(options) { | 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'); | var ctx = wx.createCanvasContext('handWriting'); | ||||
const data = { | const data = { | ||||
devicePixelRatio: pix, | devicePixelRatio: pix, | ||||
}; | }; | ||||
signaturePad = new SignaturePad(ctx, data); | signaturePad = new SignaturePad(ctx, data); | ||||
console.info(ctx, SignaturePad); | |||||
}, | }, | ||||
uploadScaleStart(e) { | uploadScaleStart(e) { | ||||
const item = { | const item = { | ||||
@@ -60,17 +66,62 @@ Page({ | |||||
}, | }, | ||||
//保存canvas图像 | //保存canvas图像 | ||||
subCanvas: function() { | subCanvas: function() { | ||||
let _this = this | |||||
if (this.data.isEmpty) { | if (this.data.isEmpty) { | ||||
return false | return false | ||||
} | } | ||||
wx.canvasToTempFilePath({ | wx.canvasToTempFilePath({ | ||||
canvasId: 'handWriting', | canvasId: 'handWriting', | ||||
success: function(res) { | 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); | |||||
} | |||||
} | |||||
}) | |||||
} | } | ||||
}) | |||||
}) |
@@ -3,7 +3,7 @@ | |||||
<image src="../../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="../../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">电子签名</text> | <text style="top:{{isIPX?'54px':'30px'}};">电子签名</text> | ||||
</view> | </view> | ||||
<view class="wrapper"> | |||||
<view class="wrapper" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<view class="hand-left"> | <view class="hand-left"> | ||||
<button catchtap="retDraw" class="del-btn">清除</button> | <button catchtap="retDraw" class="del-btn">清除</button> | ||||
<button catchtap="subCanvas" class="sub-btn">保存</button> | <button catchtap="subCanvas" class="sub-btn">保存</button> | ||||
@@ -8,46 +8,18 @@ Page({ | |||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
show:false, | show:false, | ||||
baseItem:"", | |||||
item:{} | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | 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(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
delta: 1 | delta: 1 | ||||
@@ -1,16 +1,18 @@ | |||||
<!--pages/apply/index.wxml--> | |||||
<!--pages/index/settle/index.wxml--> | |||||
<view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | ||||
<image src="../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">设置</text> | <text style="top:{{isIPX?'54px':'30px'}};">设置</text> | ||||
</view> | </view> | ||||
<view class="main-box table-box"> | |||||
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<view> | <view> | ||||
<view> | <view> | ||||
<image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/password.png"></image> | <image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/password.png"></image> | ||||
<text>密码修改</text> | <text>密码修改</text> | ||||
</view> | </view> | ||||
<view bindtap="switchPassWord" > | |||||
<image style="width: 30rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/arrowRight.png"></image> | |||||
<view> | |||||
<navigator url="{{'passWord/index?item='+baseItem}}"> | |||||
<image style="width: 30rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/arrowRight.png"></image> | |||||
</navigator> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
@@ -18,8 +20,10 @@ | |||||
<image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/e-sign.png"></image> | <image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/e-sign.png"></image> | ||||
<text>电子签名</text> | <text>电子签名</text> | ||||
</view> | </view> | ||||
<view bindtap="switchESign" > | |||||
<image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" bindtap="switchESign" mode="{{item.mode}}" src="../../../image/icon/arrowRight.png"></image> | |||||
<view> | |||||
<navigator url="{{'eSign/index?item='+baseItem}}"> | |||||
<image style="width: 30rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../image/icon/arrowRight.png"></image> | |||||
</navigator> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -1,4 +1,6 @@ | |||||
// pages/apply/index.js | // pages/apply/index.js | ||||
import * as UTIL from '../../../../utils/util.js'; | |||||
import * as API from '../../../../utils/API.js'; | |||||
const app = getApp(); | const app = getApp(); | ||||
Page({ | Page({ | ||||
@@ -8,17 +10,98 @@ Page({ | |||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
show:false, | show:false, | ||||
baseItem:"", | |||||
item:{}, | |||||
oldPwd:"", | |||||
newPwd:"", | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | 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(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
delta: 1 | delta: 1 | ||||
@@ -3,14 +3,14 @@ | |||||
<image src="../../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="../../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">密码修改</text> | <text style="top:{{isIPX?'54px':'30px'}};">密码修改</text> | ||||
</view> | </view> | ||||
<view class="main-box table-box"> | |||||
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
<view> | <view> | ||||
<view> | <view> | ||||
<image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../../image/icon/password.png"></image> | <image style="width: 25rpx; height: 30rpx; margin:0 20rpx;" mode="{{item.mode}}" src="../../../../image/icon/password.png"></image> | ||||
<text>旧密码</text> | <text>旧密码</text> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
<input type="text" password="true" style="margin-top: 20rpx;text-align: right;"/> | |||||
<input type="text" password="true" value="{{oldPwd}}" bindinput="bindOldInput" style="margin-top: 20rpx;text-align: right;"/> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
@@ -19,7 +19,12 @@ | |||||
<text>新密码</text> | <text>新密码</text> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
<input type="text" password="true" style="margin-top: 20rpx;text-align: right;"/> | |||||
<input type="text" password="true" value="{{newPwd}}" bindinput="bindNewInput" style="margin-top: 20rpx;text-align: right;"/> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
</view> | |||||
<view class="btn"> | |||||
<button type="primary" bindtap="updatePassword">保存</button> | |||||
</view> |
@@ -65,4 +65,14 @@ | |||||
.table-box text{ | .table-box text{ | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
} | } | ||||
.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; | |||||
} |
@@ -6,20 +6,25 @@ const APP = getApp(); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
isIPhoneX:false, | isIPhoneX:false, | ||||
privacyCheck:true //用户协议 | |||||
privacyCheck:true, //用户协议 | |||||
}, | }, | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
this.setData({ | this.setData({ | ||||
isIPhoneX:UTIL.isIPhoneX() | isIPhoneX:UTIL.isIPhoneX() | ||||
}) | }) | ||||
this.automaticLogin() | this.automaticLogin() | ||||
//this.getUserInfo() | |||||
//this.getPhoneNumber() | |||||
}, | }, | ||||
//自动登录 | //自动登录 | ||||
automaticLogin(){ | automaticLogin(){ | ||||
let automatic = STORAGE.getToken(); | let automatic = STORAGE.getToken(); | ||||
let getOpenId = STORAGE.getOpenId(); | let getOpenId = STORAGE.getOpenId(); | ||||
if(automatic == '' && getOpenId ==''){ | if(automatic == '' && getOpenId ==''){ | ||||
console.log(); | |||||
console.log(1); | |||||
UTIL.getCOdeFromWX({ | UTIL.getCOdeFromWX({ | ||||
complate: (code) => { | complate: (code) => { | ||||
let sendData = { | let sendData = { | ||||
@@ -27,11 +32,14 @@ Page({ | |||||
} | } | ||||
UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { | UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/index/index', | url: '/pages/index/index', | ||||
}) | }) | ||||
} | |||||
} else{ | |||||
this.getPhoneNumber() | |||||
} | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
@@ -54,6 +62,16 @@ Page({ | |||||
privacyCheck:checkStatus | 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) { | getPhoneNumber: function(res) { | ||||
let that = this; | let that = this; | ||||
@@ -73,7 +91,7 @@ Page({ | |||||
iv:detail.iv, | iv:detail.iv, | ||||
encryptedData:detail.encryptedData | encryptedData:detail.encryptedData | ||||
} | } | ||||
UTIL.httpRequest(API.URL_POST_DECRYPTEDWXDATA, sendData,{ | |||||
UTIL.httpRequestNoneDetal(API.URL_POST_DECRYPTEDWXDATA, sendData, "POST", { | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
let phoneNumber = res.data.phoneNumber; | let phoneNumber = res.data.phoneNumber; | ||||
@@ -82,21 +100,40 @@ Page({ | |||||
// UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); | // UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); | ||||
} else { | } else { | ||||
//待删 | //待删 | ||||
UTIL.showToastNoneIcon(res.msg) | UTIL.showToastNoneIcon(res.msg) | ||||
} | } | ||||
}, | }, | ||||
fail: (res) => { | fail: (res) => { | ||||
console.log("fail"); | |||||
UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) | 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){ | wxUserBand(phone){ | ||||
let sendData = { | let sendData = { | ||||
openId:STORAGE.getOpenId(), | openId:STORAGE.getOpenId(), | ||||
phonenumber:phone | phonenumber:phone | ||||
} | } | ||||
UTIL.httpRequest(API.URL_POST_USERBAND, sendData,{ | |||||
UTIL.httpRequestNoneDetal(API.URL_POST_USERBAND, sendData,"POST",{ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -110,8 +147,7 @@ Page({ | |||||
UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) | UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) | ||||
} | } | ||||
}); | }); | ||||
console.log(sendData) | |||||
// | // | ||||
} | } | ||||
}) | }) |
@@ -1,4 +1,5 @@ | |||||
{ | { | ||||
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | ||||
"packOptions": { | "packOptions": { | ||||
"ignore": [ | "ignore": [ | ||||
@@ -10,6 +11,7 @@ | |||||
"include": [] | "include": [] | ||||
}, | }, | ||||
"setting": { | "setting": { | ||||
"urlCheck": false, | "urlCheck": false, | ||||
"es6": true, | "es6": true, | ||||
"enhance": true, | "enhance": true, | ||||
@@ -33,7 +33,18 @@ const URL_POST_DECRYPTEDWXDATA = `${URL_PREFIX}/wechat/decryptedWXData`; | |||||
const URL_POST_USERBAND = `${URL_PREFIX}/register/wechat/band`; | const URL_POST_USERBAND = `${URL_PREFIX}/register/wechat/band`; | ||||
//获取用户信息 | //获取用户信息 | ||||
const URL_GET_GETINFO = `${URL_PREFIX}/getInfo`; | 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****************/ | /****************接口地址end****************/ | ||||
export { | export { | ||||
@@ -50,5 +61,11 @@ export { | |||||
URL_GET_OPENID, | URL_GET_OPENID, | ||||
URL_POST_DECRYPTEDWXDATA, | URL_POST_DECRYPTEDWXDATA, | ||||
URL_POST_USERBAND, | 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 | |||||
} | } |
@@ -113,14 +113,15 @@ function httpRequest(url, data, { | |||||
wx.showNavigationBarLoading(); | wx.showNavigationBarLoading(); | ||||
let finalData = {}; | let finalData = {}; | ||||
Object.assign(finalData, data); | Object.assign(finalData, data); | ||||
// finalData.token = getApp().globalData.userInfo.token; | |||||
finalData.token = getApp().globalData.userInfo.token; | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
data: finalData, | data: finalData, | ||||
method: data.method || 'POST', | method: data.method || 'POST', | ||||
timeout: 60000, | timeout: 60000, | ||||
header: { | header: { | ||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token, | |||||
}, | }, | ||||
success: function (response) { | success: function (response) { | ||||
if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { | if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { | ||||
@@ -171,7 +172,6 @@ function httpRequestNoneDetal(url, data, method, { | |||||
data: data, | data: data, | ||||
method: method, | method: method, | ||||
success: function (response) { | success: function (response) { | ||||
if (typeof success === FUNCTION_TEXT) { | if (typeof success === FUNCTION_TEXT) { | ||||
success(response.data); | success(response.data); | ||||
} | } | ||||
@@ -262,7 +262,6 @@ function getCOdeFromWX({ complate }) { | |||||
showLoadingHaveMask('正在加载数据..'); | showLoadingHaveMask('正在加载数据..'); | ||||
wx.login({ | wx.login({ | ||||
success: function (data) { | success: function (data) { | ||||
console.log(data) | |||||
complate(data.code); | complate(data.code); | ||||
hideLoadingHaveMask() | hideLoadingHaveMask() | ||||
}, | }, | ||||