diff --git a/app.json b/app.json index fc7e88b..53750aa 100644 --- a/app.json +++ b/app.json @@ -10,11 +10,13 @@ "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/add/add" ], + "pages/apply/paymentTemplate/see/see", + "pages/apply/paymentTemplate/add/add", + "pages/payee/index", + "pages/payee/add/add" + ], "window": { "backgroundTextStyle": "light", "navigationStyle": "custom", diff --git a/env/env.js b/env/env.js index b6ffccb..60493ca 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.178:8080', }, PRE: { - URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', + URL_PREFIX: 'http://192.168.31.178:8080/rural_collective_assetes', }, PROD: { - URL_PREFIX: 'http://192.168.31.196:3318/rural_collective_assetes', + URL_PREFIX: 'http://192.168.31.178:8080/rural_collective_assetes', } } \ No newline at end of file diff --git a/image/apply/icon_icbc.png b/image/apply/icon_icbc.png new file mode 100644 index 0000000..bc4f989 Binary files /dev/null and b/image/apply/icon_icbc.png differ diff --git a/pages/apply/index.js b/pages/apply/index.js index 9454968..c535c40 100644 --- a/pages/apply/index.js +++ b/pages/apply/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({ @@ -7,7 +9,8 @@ Page({ */ data: { isIPX: app.globalData.isIPX, - show:false + show:false, + accountList:[] }, /** @@ -65,7 +68,35 @@ swichPaymentApply:function(e){ * 生命周期函数--监听页面显示 */ onShow: function () { - + var that = this; + var sendData = { + pageNum:'1', + pageSize:'100', + accountName:'', + bankAccountNumber:'', + status:'N', + method:'GET' + } + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({userInfoObj:res.user}) + } + } + }) + UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ + success: (res) => { + console.log(res.rows[0].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ")) + for (let i = 0; i < res.rows.length; i++) { + console.log("aaa") + res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ") + } + console.log(res.rows) + that.setData({ + accountList:res.rows + }) + } + }) }, /** diff --git a/pages/apply/index.wxml b/pages/apply/index.wxml index 4162fc8..0cc1565 100644 --- a/pages/apply/index.wxml +++ b/pages/apply/index.wxml @@ -5,42 +5,26 @@ - + 付款单位 龙水镇龙洞村股份经济联合社 - - - - 一般户 - - - - - 6217 0021 9000 7972 186卡号 - 可用余额 - 10,288.83 - - - - + 一般户 - 6217 0021 9000 7972 186卡号 + {{item.bankAccountNumber}}卡号 可用余额 - 10,288.83 + {{item.balance}} - - @@ -51,7 +35,6 @@ 持有人:王强 - diff --git a/pages/apply/index.wxss b/pages/apply/index.wxss index a0d02b2..98d6b47 100644 --- a/pages/apply/index.wxss +++ b/pages/apply/index.wxss @@ -17,6 +17,7 @@ .top image{ position: absolute; width: 94%; + height: 55px; } .top-title{ flex: 1; diff --git a/pages/apply/paymentTemplate/add/add.wxml b/pages/apply/paymentTemplate/add/add.wxml index 569ad34..cdf3916 100644 --- a/pages/apply/paymentTemplate/add/add.wxml +++ b/pages/apply/paymentTemplate/add/add.wxml @@ -50,8 +50,8 @@ bind:change="onChange" direction="horizontal"XX > - 公户 - 私户 + 公户 + 私户 diff --git a/pages/index/index.js b/pages/index/index.js index a38c52e..2aae142 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -43,7 +43,7 @@ swichPayment:function(e){ // }) // } wx.navigateTo({ - url: '../apply/index?', + url: '/pages/apply/index?', }) }, //跳转个人设置 diff --git a/pages/payee/add/add.js b/pages/payee/add/add.js new file mode 100644 index 0000000..ccd11df --- /dev/null +++ b/pages/payee/add/add.js @@ -0,0 +1,67 @@ +// pages/payee/add/add.js +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/payee/add/add.json b/pages/payee/add/add.json new file mode 100644 index 0000000..c1b784d --- /dev/null +++ b/pages/payee/add/add.json @@ -0,0 +1,6 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "van-field": "@vant/weapp/field/index" + } +} \ No newline at end of file diff --git a/pages/payee/add/add.wxml b/pages/payee/add/add.wxml new file mode 100644 index 0000000..5c5e0aa --- /dev/null +++ b/pages/payee/add/add.wxml @@ -0,0 +1,16 @@ + + + + 支出申请 + + + + + + + + + + + 确认 + \ No newline at end of file diff --git a/pages/payee/add/add.wxss b/pages/payee/add/add.wxss new file mode 100644 index 0000000..60bb45a --- /dev/null +++ b/pages/payee/add/add.wxss @@ -0,0 +1,50 @@ +/* pages/payee/add/add.wxss */ +.main-box{ + background: #ffffff; + padding: 20px; + width: 94%; + margin: 0 auto; + border-radius: 10px; + box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); +} +.table-box van-field van-cell .van-cell{ + margin-bottom: 15px; +} +.table-box van-field:last-child van-cell .van-cell{ + margin-bottom: 0px; +} +.van-cell{ + padding: 0!important; +} +.van-cell--required:before { + left: 0!important; +} + +.van-field__label { + padding-left: 10px; +} + +.bottom{ + width: 100%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 30px; + display: flex; + position: absolute; + bottom: 10%; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; +} \ No newline at end of file diff --git a/pages/payee/index.js b/pages/payee/index.js new file mode 100644 index 0000000..d56a790 --- /dev/null +++ b/pages/payee/index.js @@ -0,0 +1,80 @@ +// pages/payee/index.js +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + list: ['a', 'b', 'c'], + result: ['a', 'b'], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + onChange(event) { + this.setData({ + result: event.detail, + }); + }, + + toggle(event) { + const { index } = event.currentTarget.dataset; + const checkbox = this.selectComponent(`.checkboxes-${index}`); + checkbox.toggle(); + }, + noop() {}, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/payee/index.json b/pages/payee/index.json new file mode 100644 index 0000000..15b1747 --- /dev/null +++ b/pages/payee/index.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "van-checkbox": "@vant/weapp/checkbox/index", + "van-checkbox-group": "@vant/weapp/checkbox-group/index", + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-search": "@vant/weapp/search/index" + } +} \ No newline at end of file diff --git a/pages/payee/index.wxml b/pages/payee/index.wxml new file mode 100644 index 0000000..fa7fc04 --- /dev/null +++ b/pages/payee/index.wxml @@ -0,0 +1,48 @@ + + + + 支出申请 + + + + 新增 + + + + + + + + + + 张亮亮 + + + 6217****2186 中国银行 + + + + + + + 确认 + \ No newline at end of file diff --git a/pages/payee/index.wxss b/pages/payee/index.wxss new file mode 100644 index 0000000..587c3a1 --- /dev/null +++ b/pages/payee/index.wxss @@ -0,0 +1,54 @@ +/* pages/payee/index.wxss */ +.value-class { + flex: none !important; +} +.van-cell{ + background-color: transparent!important; +} +.van-search__content { + border: 1px solid #5CAE77!important; + background: transparent!important; +} +van-search { + flex: 0.8; +} +.search_box{ + display: flex; +} +.add_btn{ + flex: 0.2; + padding: var(--search-padding,10px 12px); + padding-left: 0; +} +.add_btn text{ + background-color: #62AD66; + display: block; + height: 100%; + text-align: center; + line-height: 36px; + color: #fff; + border-radius: 36px; + box-shadow: 0px 5px 5px #ddd; +} +.bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 30px; + display: flex; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; +} \ No newline at end of file diff --git a/pages/user/login/login.js b/pages/user/login/login.js index 3a2563d..dab2b78 100644 --- a/pages/user/login/login.js +++ b/pages/user/login/login.js @@ -73,8 +73,9 @@ Page({ iv:detail.iv, encryptedData:detail.encryptedData } - UTIL.httpRequest(API.URL_POST_DECRYPTEDWXDATA, sendData,{ + UTIL.httpRequestNoneDetal(API.URL_POST_DECRYPTEDWXDATA, sendData,"POST",{ success: (res) => { + console.log(res) if (res.code == API.SUCCESS_CODE) { let phoneNumber = res.data.phoneNumber; //微信手机号码绑定 @@ -96,7 +97,8 @@ Page({ 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({ diff --git a/project.config.json b/project.config.json index 2e9d4b1..d116a1a 100644 --- a/project.config.json +++ b/project.config.json @@ -1,55 +1,59 @@ { - "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "packOptions": { - "ignore": [ - { - "value": ".eslintrc.js", - "type": "file" - } - ], - "include": [] + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "packOptions": { + "ignore": [ + { + "value": ".eslintrc.js", + "type": "file" + } + ], + "include": [] + }, + "setting": { + "urlCheck": false, + "es6": true, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": false, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": false, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "showES6CompileOption": false, - "useCompilerPlugins": false, - "ignoreUploadUnusedFiles": true, - "minifyWXML": true - }, - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - }, - "condition": {} + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "showES6CompileOption": false, + "useCompilerPlugins": false, + "ignoreUploadUnusedFiles": true, + "minifyWXML": true, + "useStaticServer": true + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "condition": {}, + "appid": "wxaace54cc2cf8924b", + "compileType": "miniprogram", + "libVersion": "2.23.2" } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 3513a52..519481e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -59,6 +59,20 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "收款人名册", + "pathName": "pages/payee/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "添加收款人", + "pathName": "pages/payee/add/add", + "query": "", + "launchMode": "default", + "scene": null } ] } diff --git a/utils/API.js b/utils/API.js index 1f476a8..231c632 100644 --- a/utils/API.js +++ b/utils/API.js @@ -34,6 +34,9 @@ const URL_POST_USERBAND = `${URL_PREFIX}/register/wechat/band`; //获取用户信息 const URL_GET_GETINFO = `${URL_PREFIX}/getInfo`; +//当前账套付款账户列表 +const URL_GET_ACCOUNTLIST = `${URL_PREFIX}/cashier/account/list`; + /****************接口地址end****************/ export { @@ -50,5 +53,6 @@ export { URL_GET_OPENID, URL_POST_DECRYPTEDWXDATA, URL_POST_USERBAND, - URL_GET_GETINFO + URL_GET_GETINFO, + URL_GET_ACCOUNTLIST } \ No newline at end of file diff --git a/utils/util.js b/utils/util.js index 16f7783..71768ab 100644 --- a/utils/util.js +++ b/utils/util.js @@ -117,7 +117,7 @@ function httpRequest(url, data, { wx.request({ url, data: finalData, - method: data.method || 'POST', + method:data.method, timeout: 60000, header: { 'Authorization':'Bearer '+getApp().globalData.userInfo.token