Commit 1800dbc9 by wangzhihui

收款账户

1 parent cd5868b2
...@@ -96,7 +96,8 @@ ...@@ -96,7 +96,8 @@
"popup": "/components/Popup/Popup", "popup": "/components/Popup/Popup",
"goods-action": "/components/GoodsAction/GoodsAction", "goods-action": "/components/GoodsAction/GoodsAction",
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index", "glsx-privacy": "glsx-applet-component/GlsxPrivacy/index",
"mp-icon": "weui-miniprogram/icon/icon" "mp-icon": "weui-miniprogram/icon/icon",
"mp-dialog": "weui-miniprogram/dialog/dialog"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
// packageIndex/pages/bankAccount/list/list.js // import MineApi from '~/api/mineApi/index'
Page({ Page({
/** /**
...@@ -7,60 +7,55 @@ Page({ ...@@ -7,60 +7,55 @@ Page({
data: { data: {
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onLoad(options) {
}, // res = await MineApi.getStaffBankList({
// uuid
/** // })
* 生命周期函数--监听页面隐藏 let res = [{
*/ "createdBy": null,
onHide() { "createdAccount": null,
"source": null,
}, "merchantId": null,
"datalist": null,
/** "ip": null,
* 生命周期函数--监听页面卸载 "entmicroId": null,
*/ "uuid": null,
onUnload() { "userType": null,
"id": 34,
}, "staffId": 16550,
"bankUserName": "望周知",
/** "bankName": "中国邮政储蓄银行",
* 页面相关事件处理函数--监听用户下拉动作 "bankNumber": "6555555555555555555",
*/ "bankPhone": "18955555555",
onPullDownRefresh() { "idCardNo": "341181199508252222",
"idCardFront": null,
}, "idCardBack": null,
"state": 1
/** }]
* 页面上拉触底事件的处理函数
*/ res && res?.map(e => {
onReachBottom() { e.bankNum = e.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
})
}, this.setData({
list: res || [],
/** flag: true
* 用户点击右上角分享 })
*/ },
onShareAppMessage() { jump(e) {
const {
item
} = e.currentTarget.dataset, {
score,
user
} = this.options
wx.p.router('/packageStoreAssistant/packageMine/pages/bankAccount/detail/detail', {
item,
score,
user
})
} }
}) })
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": {} "navigationBarTitleText": "收款账户"
} }
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/bankAccount/list/list.wxss */
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/bankAccount/list/list.wxss */
page {
background: #F7F8FA;
}
.list {
padding: 24rpx 32rpx;
.item {
padding: 0 32rpx;
min-height: 112rpx;
background: #FFFFFF;
border-radius: 16rpx;
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-bottom: 20rpx;
.text {
max-width: 90%;
}
.icon {
width: 32rpx;
height: 32rpx;
opacity: .5;
margin-left: auto;
flex-shrink: 0;
}
}
}
.nothing {
width: 100vw;
height: 100vh;
font-size: 28rpx;
color: #7A8299;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 64rpx;
box-sizing: border-box;
background-color: #fff;
.icon {
width: 400rpx;
height: 400rpx;
}
.btn {
width: calc(100% - 124rpx);
height: 88rpx;
margin-top: 88rpx;
font-size: 32rpx;
color: #1B233D;
border-radius: 20rpx;
border: 2rpx solid #dfdee1;
}
}
.btn-color {
position:fixed;
width: calc(100% - 308rpx);
height: 88rpx;
background: #FB8A32;
border-radius: 44rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
bottom:164rpx;
left:154rpx;
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/bankAccount/list/list.wxml--> <block wx:if="{{flag}}">
<text>packageIndex/pages/bankAccount/list/list.wxml</text> <block wx:if="{{list.length}}">
<view class="list">
<block wx:for="{{list}}" wx:key="index">
<view class="item flex" bindtap="jump" data-item="{{item}}">
<view class="text ">
{{item.bankName}}({{item.bankUserName}}){{item.bankNum}}
</view>
<view class="icon">
<glsx-image src="/bankAccount/center_edit_icon.png"></glsx-image>
</view>
</view>
</block>
</view>
<view class="btn-color text-center" bindtap="jump">
去添加
</view>
</block>
<block wx:else>
<view class="nothing">
<view class="icon">
<glsx-image src="/bankAccount/nothing.png"></glsx-image>
</view>
暂无已添加的收款账户
<view class="btn text-center" bindtap="jump">
去添加
</view>
</view>
</block>
</block>
\ No newline at end of file \ No newline at end of file
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')
// var appInstance = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
// auth: {
// type: Boolean,
// value: true,
// observer: function (newVal, oldVal) {
// this.getHeadImage()
// }
// },
// type: {
// type: Boolean,
// value: true
// },
// special: {
// type: Boolean,
// value: false
// },
// index: {
// type: Boolean,
// value: false
// }
agree: Boolean
},
/**
* 组件的初始数据
*/
data: {
// auth: true,
// type: true,
// appLogo: '',
// appName: '',
// merchantName: '',
// gender: 1
},
ready() {
// this.getHeadImage()
},
/**
* 组件的方法列表
*/
methods: {
choose() {
this.setData({
agree: !this.data.agree
})
this.triggerEvent('choose', this.data.agree)
},
jump(e) {
console.log(e)
let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
noScroll() {}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class='tips'>
<view class='choose-box' bindtap="choose">
<view class='icon'>
<view class='un-check' wx:if="{{!agree}}"></view>
<glsx-image wx:else webp src="/integral/check-img.png" class="check-img"></glsx-image>
</view>
</view>
我已阅读并同意
<text catchtap="jump" data-url="privacy">《免责协议》</text>
</view>
/* components/authSetting/authSetting.wxss */
.tips {
position: fixed;
width: 100%;
color: #0a111a;
font-size: 26rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
bottom:376rpx;
}
.tips text {
color: #5092FF;
}
.tips .icon {
width: 28rpx;
height: 28rpx;
margin-right: 16rpx;
}
.un-check {
width: 28rpx;
height: 28rpx;
border: 2rpx solid #FB8A32;
border-radius: 4rpx;
box-sizing: border-box;
}
.tips .icon .check-img {
vertical-align: top;
width: 28rpx;
height: 28rpx;
}
.tips .choose-box {
width: 28rpx;
height: 28rpx;
margin-right: 16rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -6,8 +6,28 @@ Page({ ...@@ -6,8 +6,28 @@ Page({
*/ */
data: { data: {
navStyle: "background-color: transparent;", navStyle: "background-color: transparent;",
agree: false,
showAuthDialog: false,
sumbitScore: '', sumbitScore: '',
buttons: [{
text: '取消'
}, {
text: '同意',
extClass: 'btn_primary'
}],
bankInfo: {
"id": 34,
"staffId": 16550,
"bankUserName": "望周知",
"bankName": "中国邮政储蓄银行",
"bankNumber": "6555555555555555555",
"bankNum": "6555555588888*****5555",
"bankPhone": "18955555555",
"idCardNo": "341181199508252222",
"idCardFront": null,
"idCardBack": null,
"state": 1
},
bankList: [{ bankList: [{
"id": 34, "id": 34,
"staffId": 16550, "staffId": 16550,
...@@ -43,18 +63,20 @@ Page({ ...@@ -43,18 +63,20 @@ Page({
}, },
bindPickerChange(e) { bindPickerChange(e) {
console.log(e.detail) console.log(e.detail)
// const { const {
// value value
// } = e.detail, { } = e.detail
// item: { let bankInfo = this.data.bankList[value]
// key, bankInfo.bankNum = bankInfo.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
// pickerKey, this.setData({
// pickerData bankInfo
// } })
// } = e.currentTarget.dataset
}, },
toSumbitData() { toSumbitData() {
if (this.submit) return wx.$api.showToast('有一笔兑换正在进行') if (this.submit) return
const checkAgree = this.checkAgree()
if (checkAgree) return false
// wx.$api.showToast('有一笔兑换正在进行')
let { let {
sumbitScore, sumbitScore,
score: { score: {
...@@ -187,6 +209,37 @@ Page({ ...@@ -187,6 +209,37 @@ Page({
navHeight: height navHeight: height
}) })
}, },
checkAgree() {
let {
agree
} = this.data
if (!agree) {
this.setData({
showAuthDialog: true
})
return true
}
return false
},
agreeEvent(e) {
let {
index
} = e.detail
if (index == 1) {
this.setData({
showAuthDialog: false,
agree: true
})
} else {
this.setData({
showAuthDialog: false
})
}
},
onClose(e) {
console.log(e)
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
{ {
"usingComponents": {}, "usingComponents": {
"auth-setting": "./components/authSetting/authSetting"
},
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText":"积分提现" "navigationBarTitleText":"积分提现"
} }
\ No newline at end of file \ No newline at end of file
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
color: #333333; color: #333333;
} }
.submit { .allbtn {
position: absolute; position: absolute;
right: 32rpx; right: 32rpx;
top: 48rpx; top: 48rpx;
...@@ -119,7 +119,9 @@ ...@@ -119,7 +119,9 @@
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx; border-radius: 24rpx;
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative;
.bankName { .bankName {
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
...@@ -132,8 +134,69 @@ ...@@ -132,8 +134,69 @@
font-size: 24rpx; font-size: 24rpx;
color: #292D33; color: #292D33;
} }
.icon-right {
width: 16.7rpx;
height: 30.06rpx;
position: absolute;
right: 43.8rpx;
top: 48rpx;
}
} }
} }
.submit {
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
width: 654rpx;
height: 88rpx;
background: #FB8A32;
border-radius: 20rpx;
line-height: 88rpx;
text-align: center;
position: fixed;
bottom: 266rpx;
}
}
}
.auth-dialog-class {
text-align: center;
font-size: var(--fontSize28);
font-weight: 400;
}
.auth-dialog-class .van-dialog__header {
font-size: var(--fontSize36);
font-weight: 500;
color: #333333;
}
.title_text {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 40rpx;
color: #000000;
text-align: center;
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
}
.message-box .message {
padding: 8px 0;
}
.btn_primary{
color: #FC5B32;
} }
}
\ No newline at end of file \ No newline at end of file
...@@ -14,27 +14,43 @@ ...@@ -14,27 +14,43 @@
</navigation-bar> </navigation-bar>
</view> </view>
<view class="to-cash" style="top:{{navHeight}}px; margin-top:-474rpx"> <view class="to-cash" style="top:{{navHeight}}px; margin-top:-474rpx">
<view class="text">当前可提现积分</view> <view class="text">当前可提现积分</view>
<view class="value">1680</view> <view class="value">1680</view>
<view class="operate-wrap"> <view class="operate-wrap">
<view class="info">本次提现积分</view> <view class="info">本次提现积分</view>
<view class="operate"> <view class="operate">
<view class="symbol">¥</view> <view class="symbol">¥</view>
<view class="int_widget flex_scb dis_int_widget"> <view class="int_widget flex_scb dis_int_widget">
<input type="digit" value="{{sumbitScore}}" bindinput="handleInput" class="disintClass" maxlength="20" placeholder="请输入" placeholder-class="placeStyle"/> <input type="digit" value="{{sumbitScore}}" bindinput="handleInput" class="disintClass" maxlength="20" placeholder="请输入" placeholder-class="placeStyle" />
</view> </view>
<view class="submit" bind:tap="toTixianAll">全部提现</view> <view class="allbtn" bind:tap="toTixianAll">全部提现</view>
</view> </view>
</view>
<view class="bank-wrap">
<view class="text">提现至:</view>
<view class="select">
<picker bindchange="bindPickerChange" range-key="bankName" range="{{bankList}}">
<view class="bankName">{{bankInfo.bankName}}</view>
<view class="bankNumber">{{bankInfo.bankNum}}</view>
<mp-icon class="icon-right" icon="arrow" size="{{13}}" color="#333333"></mp-icon>
</picker>
</view>
</view>
<view class="auth_box {{loginType == 3 ? '' : 'lear_bottom'}}">
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
</view>
<view class="submit" bind:tap="toSumbitData">提交</view>
</view> </view>
<view class="bank-wrap">
<view class="text">提现至:</view> </view>
<view class="select"> <!-- 未同意协议弹窗提示 -->
<picker bindchange="bindPickerChange" range-key="bankName" range="{{bankList}}"> <mp-dialog show="{{ showAuthDialog }}" class="auth-dialog-class" width="var(--fontSize552)" bindclose="onClose" mask="true" bindbuttontap="agreeEvent" buttons="{{buttons}}">
<view class="bankName">招商银行卡</view> <view slot="title">
<view class="bankNumber">**** **** **** 5316</view> <view class="title_text">隐私协议与用户协议</view>
<mp-icon></mp-icon>
</picker>
</view>
</view> </view>
<view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《免责协议》</text>
</view> </view>
</view>
\ No newline at end of file \ No newline at end of file
</mp-dialog>
\ No newline at end of file \ No newline at end of file
<view class="container"> <view class="container">
<glsx-image webp src="/integral/success_icon_1.png" class="icon"></glsx-image>
<!-- <glsx-image mode="widthFix" class="icon" src="store-assistant/success_icon_1.png" /> --> <!-- <glsx-image mode="widthFix" class="icon" src="store-assistant/success_icon_1.png" /> -->
<view class="max_text">提交成功</view> <view class="max_text">提交成功</view>
<view class="tip_text" wx:if="{{title=='微信兑换'}}">您的积分兑换申请已成功提交!</view> <view class="tip_text" wx:if="{{title=='微信兑换'}}">您的积分兑换申请已成功提交!</view>
......
...@@ -35,6 +35,13 @@ ...@@ -35,6 +35,13 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "添加账户",
"pathName": "packageIndex/pages/bankAccount/list/list",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!