Commit 16306c5c by 前端

Merge branch 'SAAS+V5.8.6' into 'master'

上线合并

See merge request !7
2 parents 1c370296 dee9b365
......@@ -12,6 +12,8 @@ Page({
isConfig: true,
showAuthDialog: false,
showConfirmDialog: false,
showSplitWithdrawalDialog: false,
beforeSepWithdrawalScore: 0,
sumbitScore: '',
disclaimerAgreementUrl: '',
buttons: [{
......@@ -26,6 +28,10 @@ Page({
text: '确认',
extClass: 'btn_primary'
}],
splitWithdrawalButtons: [{
text: '知道了',
extClass: 'btn_primary'
}],
score: '0',
bankInfo: {},
bankList: []
......@@ -207,6 +213,15 @@ Page({
})
return false
}
const beforeSepWithdrawalScore = await this.getBeforeSepWithdrawalScore()
if (beforeSepWithdrawalScore === null) return false
if (beforeSepWithdrawalScore > 0 && Number(sumbitScore) !== beforeSepWithdrawalScore) {
this.setData({
showSplitWithdrawalDialog: true,
beforeSepWithdrawalScore
})
return false
}
wx.p.router.go('/packageIndex/pages/integral/withdrawalRules/withdrawalRules', {
sumbitScore,
disclaimerAgreementUrl,
......@@ -221,6 +236,29 @@ Page({
return null
}
},
async getBeforeSepWithdrawalScore() {
const {
phone,
channelSource,
merchantId
} = wx.p.storage.get('userInfo')
const params = {
staffPhone: phone,
channelSource,
merchantId
}
try {
const res = await wx.p.api.withdrawalApi.searchScoreSummary(params)
if (res.code == 0) {
return Number(res.data?.beforeSepWithdrawalScore || 0)
}
wx.p.wxApi.showToast(res.message || '系统异常')
return null
} catch (err) {
wx.p.wxApi.showToast(JSON.stringify(err))
return null
}
},
accSub(arg1, arg2) {
let r1, r2, m, n;
try {
......@@ -352,6 +390,15 @@ Page({
}
},
splitWithdrawalConfirm() {
const {
beforeSepWithdrawalScore
} = this.data
this.setData({
showSplitWithdrawalDialog: false,
sumbitScore: beforeSepWithdrawalScore
})
},
onClose(e) {
console.log(e)
},
......
......@@ -200,4 +200,15 @@
font-size: 28rpx;
color: #1B233D;
}
.split-withdrawal-message {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
line-height: 44rpx;
}
.split-withdrawal-message .strong {
font-weight: 700;
color: #1B233D;
}
......@@ -52,5 +52,10 @@
<text catchtap="jump" data-url="privacy">《免责协议》</text>
</view>
</Dialog>
<Dialog show="{{ showSplitWithdrawalDialog }}" mask="true" bindbuttontap="splitWithdrawalConfirm" buttons="{{splitWithdrawalButtons}}" title="积分需分笔提现">
<view class="split-withdrawal-message">
<text>因支付系统升级,不同时段获取的积分需分开提现。请先</text><text class="strong">全额</text><text>提现9月1日前获取的</text><text class="strong">{{beforeSepWithdrawalScore}}</text><text>积分,再提现其余积分。</text>
</view>
</Dialog>
<picker-bank-card showBank="{{showBank}}" bankList="{{bankList}}" bindPickerChange="bindPickerChange"></picker-bank-card>
......@@ -44,7 +44,7 @@
color: #2B69FF;
position: absolute;
right: 0;
top: 260rpx;
top: 210rpx;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!