Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
points-mall
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1a0a7903
authored
Aug 19, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
积分接口对接
1 parent
61cd1d25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
786 additions
and
487 deletions
api/module/withdrawal.js
app.wxss
components/Dialog/Dialog.scss
packageIndex/pages/bankAccount/add/add.js
packageIndex/pages/bankAccount/add/add.wxml
packageIndex/pages/bankAccount/list/list.js
packageIndex/pages/integral/index/components/noOpen/index.js
packageIndex/pages/integral/index/components/noOpen/index.wxml
packageIndex/pages/integral/index/components/open/index.js
packageIndex/pages/integral/index/components/open/index.wxml
packageIndex/pages/integral/index/components/profitList/index.js
packageIndex/pages/integral/index/components/profitList/index.json
packageIndex/pages/integral/index/components/profitList/index.scss
packageIndex/pages/integral/index/components/profitList/index.wxml
packageIndex/pages/integral/index/index.js
packageIndex/pages/integral/index/index.json
packageIndex/pages/integral/index/index.scss
packageIndex/pages/integral/index/index.wxml
packageIndex/pages/integral/withdrawal/components/authSetting/authSetting.js
packageIndex/pages/integral/withdrawal/withdrawal.js
packageIndex/pages/integral/withdrawal/withdrawal.wxml
packageIndex/pages/integral/withdrawalNote/withdrawalNote.js
packageIndex/pages/integral/withdrawalNote/withdrawalNote.wxml
packageIndex/pages/integral/withdrawalRules/withdrawalRules.js
packageIndex/pages/integral/withdrawalRules/withdrawalRules.wxml
api/module/withdrawal.js
View file @
1a0a790
...
...
@@ -8,22 +8,60 @@ module.exports = {
data
,
);
},
/**积分明细列表查询 */
/**根据员工id查询员工银行卡列表 */
/**积分明细列表查询 */
getScoreProfitList
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.profit.list'
,
data
)
},
/**积分明细查询 */
getScoreDetail
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.detail.get'
,
data
)
},
/**提现列表查询 */
getScoreWithdrawalPage
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.withdrawal.page'
,
data
)
},
/** 免责协议地址获取*/
getAgreementUrl
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.withdrawal.disclaimer.agreement.get'
,
data
)
},
/** 积分提现*/
saveWithdrawal
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.withdrawal.save'
,
data
)
},
/**查询税率 */
getTaxRate
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.get.taxRate'
,
data
)
},
/**根据手机号查询员工银行卡列表 */
getStaffBankList
(
data
)
{
return
api
.
fetch
(
'scrm.api.s
toassistant.withdrawal.staff
.bank.list'
,
'scrm.api.s
hopmall.score
.bank.list'
,
data
,
);
},
/** 插入或更新员工银行卡信息 */
insetorupdateStaffBank
(
data
)
{
return
api
.
fetch
(
'scrm.api.s
toassistant.withdrawal.staff.bank.insetoru
pdate'
,
return
api
.
fetch
(
'scrm.api.s
hopmall.score.bank.insertOrU
pdate'
,
data
);
},
/**智能外呼-联系人 */
findByActivityIdAndPhone
(
data
)
{
return
api
.
fetch
(
'dracIm.api.entmicro.findByActivityIdAndPhone'
,
data
)
/**根据id查询银行卡详情 */
getBankDetail
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.score.bank.get.detail'
,
data
)
},
/**查询上传证件配置信息 */
getConfig
(
data
){
return
api
.
fetch
(
'scrm.api.shopmall.score.bank.get.document.config'
,
data
)
}
}
\ No newline at end of file
app.wxss
View file @
1a0a790
...
...
@@ -6,7 +6,7 @@ page {
font-size: 28rpx;
--themeColor: #FC5B32;
--btnColor: #FC8A32;
--fontColor:#7E4C15;
--fontColor:
#7E4C15;
--borderRadius: 8rpx;
--margin: 32rpx;
/* 兼容 IOS<11.2 先constant再env */
...
...
@@ -20,6 +20,7 @@ image {
height: 100%;
vertical-align: top;
}
.flex_sc {
display: flex;
align-items: center;
...
...
@@ -36,7 +37,20 @@ image {
align-items: center;
justify-content: space-between;
}
.suggest-box{
.suggest-box {
font-size: 28rpx;
color: #1B233D;
}
.btn_primary {
color: #FC5B32;
font-weight: 500;
font-size: 28rpx;
}
.btn_cancel {
font-weight: 400;
font-size: 28rpx;
color: #1B233D;
color: #1B233D;
}
\ No newline at end of file
components/Dialog/Dialog.scss
View file @
1a0a790
...
...
@@ -19,9 +19,7 @@
text-align
:
center
;
}
.btn_primary
{
color
:
#FC5B32
;
}
.status
{
width
:
88rpx
;
...
...
@@ -29,6 +27,7 @@
position
:
relative
;
left
:
50%
;
transform
:
translateX
(
-50%
);
margin-bottom
:
28rpx
;
.icon
{
width
:
100%
;
height
:
100%
;
...
...
packageIndex/pages/bankAccount/add/add.js
View file @
1a0a790
...
...
@@ -11,7 +11,8 @@ Page({
*/
data
:
{
buttons
:
[{
text
:
'我知道了'
text
:
'我知道了'
,
extClass
:
'btn_cancel'
},
{
text
:
'去兑换'
,
extClass
:
'btn_primary'
...
...
@@ -71,14 +72,15 @@ Page({
}
],
btnDisabled
:
true
,
isEnabled
:
false
,
//是否上传身份证
formData
:
{
bankUserName
:
''
,
bankPhone
:
''
,
idCardNo
:
''
,
bankName
:
''
,
bankNumber
:
''
,
bankPortrait
:
''
,
bankEmblem
:
''
idCardBack
:
''
,
idCardFront
:
''
}
},
...
...
@@ -86,9 +88,29 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
()
{
async
onLoad
()
{
this
.
initData
()
this
.
getBankList
()
// await this.getConfig()
},
getConfig
()
{
const
{
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
);
wx
.
p
.
api
.
withdrawalApi
.
getConfig
({
channelSource
}).
then
(
res
=>
{
this
.
setData
({
isEnabled
:
res
.
isEnabled
})
})
},
initData
()
{
wx
.
p
.
router
.
getRouterParams
().
then
(
params
=>
{
console
.
log
(
params
)
console
.
log
(
params
,
params
)
this
.
options
=
params
let
{
item
}
=
params
;
...
...
@@ -99,7 +121,9 @@ Page({
bankPhone
:
item
.
bankPhone
,
idCardNo
:
item
.
idCardNo
,
bankName
:
item
.
bankName
,
bankNumber
:
item
.
bankNumber
bankNumber
:
item
.
bankNumber
,
idCardBack
:
item
.
idCardBack
,
idCardFront
:
item
.
idCardFront
},
isEditBank
:
true
})
...
...
@@ -109,8 +133,6 @@ Page({
this
.
check
()
}
})
this
.
getBankList
()
},
repeatConfirm
(
e
)
{
let
{
...
...
@@ -212,9 +234,15 @@ Page({
},
check
()
{
const
{
formData
formData
,
isEnabled
}
=
this
.
data
let
btnDisabled
=
false
//配置是否开启身份证
if
(
!
isEnabled
)
{
delete
formData
.
idCardBack
delete
formData
.
idCardFront
}
try
{
for
(
const
key
in
formData
)
{
if
(
!
formData
[
key
])
throw
true
...
...
@@ -229,60 +257,73 @@ Page({
dialogClose
()
{
wx
.
p
.
router
.
back
()
},
bindButton
(
e
)
{
let
{
value
}
=
e
.
detail
;
let
dialogObj
=
{
0
:
()
=>
{
this
.
dialogClose
()
},
1
:
()
=>
{
this
.
dialogConfirm
()
}
}
dialogObj
[
value
]()
},
dialogConfirm
()
{
const
{
success
,
isEditBank
}
=
this
.
data
,
{
score
,
user
}
=
this
.
options
if
(
success
)
wx
.
$router
.
redirectTo
(
'/packageStoreAssistant/packageMine/pages/withdrawal/withdrawal'
,
{
score
,
user
,
isEditBank
score
}
=
this
.
options
;
wx
.
p
.
router
.
redirectTo
(
'/packageIndex/pages/integral/withdrawal/withdrawal'
,
{
score
})
else
this
.
setData
({
this
.
setData
({
showModal
:
false
})
},
async
submit
()
{
console
.
log
(
wx
.
p
)
const
{
formData
}
=
this
.
data
,
{
item
}
=
this
.
options
,
{
uuid
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
validateKeys
=
[
'bankPhone'
,
'idCardNo'
]
try
{
validateKeys
.
map
(
e
=>
{
if
(
e
==
'bankPhone'
&&
!
methods
.
tel
(
formData
[
e
]))
throw
'手机号'
if
(
e
==
'idCardNo'
&&
!
methods
.
idcard
(
formData
[
e
]))
throw
'身份证'
})
}
catch
(
error
)
{
return
wx
.
$api
.
showToast
(
`请输入正确的
${
error
}
`
)
}
if
(
item
&&
item
.
id
)
formData
.
id
=
item
.
id
formData
.
uuid
=
uuid
const
{
code
,
message
}
=
await
wx
.
p
.
api
.
withdrawalApi
.
insetorupdateStaffBank
(
formData
)
if
(
code
==
'0'
)
{
this
.
setData
({
showModal
:
true
,
success
:
'success'
,
dialogText
:
'您的银行账户添加成功!'
})
}
else
{
this
.
setData
({
showModal
:
true
,
success
:
'fail'
,
dialogText
:
`原因:
${
message
}
`
})
// wx.$api.showToast(message)
}
this
.
setData
({
showModal
:
true
,
success
:
'success'
,
dialogText
:
'您的银行账户添加成功!'
})
// const {
// formData
// } = this.data, {
// item
// } = this.options, {
// uuid
// } = wx.p.storage.get('userInfo'),
// validateKeys = ['bankPhone', 'idCardNo']
// try {
// validateKeys.map(e => {
// if (e == 'bankPhone' && !methods.tel(formData[e])) throw '手机号'
// if (e == 'idCardNo' && !methods.idcard(formData[e])) throw '身份证'
// })
// } catch (error) {
// return wx.p.wxApi.showToast(`请输入正确的${error}`)
// }
// if (item && item.id) formData.id = item.id
// formData.uuid = uuid
// const {
// code,
// message
// } = await wx.p.api.withdrawalApi.insetorupdateStaffBank(formData)
// if (code == '0') {
// this.setData({
// showModal: true,
// success: 'success',
// dialogText: '您的银行账户添加成功!'
// })
// } else {
// this.setData({
// showModal: true,
// success: 'fail',
// dialogText: `原因:${message}`
// })
// // wx.$api.showToast(message)
// }
}
})
\ No newline at end of file
packageIndex/pages/bankAccount/add/add.wxml
View file @
1a0a790
...
...
@@ -21,19 +21,22 @@
</picker>
</block>
<block wx:elif="{{item.upload}}">
<view class="upload-wrap" bind:tap="upload" data-item="{{item}}">
<view class="label">{{item.label}}</view>
<block wx:if="{{ !formData[item.key]}}">
<view class="upload" bind:tap="upload" data-item="{{item}}">
<glsx-image src="/bankAccount/{{item.icon}}.png" class="bank-icon"></glsx-image>
<view class="text">上传照片</view>
<block wx:if="{{isEnabled}}">
<view class="upload-wrap" bind:tap="upload" data-item="{{item}}">
<view class="label">{{item.label}}</view>
<block wx:if="{{ !formData[item.key]}}">
<view class="upload" bind:tap="upload" data-item="{{item}}">
<glsx-image src="/bankAccount/{{item.icon}}.png" class="bank-icon"></glsx-image>
<view class="text">上传照片</view>
</view>
</block>
<view wx:else class="select-url">
<image webp src="{{formData[item.key]}}" class="bank-img"></image>
<glsx-image src="/bankAccount/del.png" class="del-icon" catch:tap="del" data-item="{{item}}"></glsx-image>
</view>
</view>
</block>
<view wx:else class="select-url" >
<image webp src="{{formData[item.key]}}" class="bank-img"></image>
<glsx-image src="/bankAccount/del.png" class="del-icon" catch:tap="del" data-item="{{item}}"></glsx-image>
</view>
</view>
</block>
<block wx:else>
...
...
@@ -42,7 +45,6 @@
<input value="{{ formData[item.key] }}" placeholder="{{item.placeholder}}" placeholder-style="color: #CECECE;" class="input" input-align="right" maxlength="{{item.maxlength}}" type="{{item.type}}" bindinput="bindInput" data-item="{{item}}" placeholder-class="placeStyle" />
</view>
</mp-cell>
<!-- <van-field value="{{ formData[item.key] }}" clearable label="{{item.label}}" placeholder="{{item.placeholder}}" placeholder-style="color: #CECECE;" border="{{false}}" label-class="label" input-class="input" input-align="right" maxlength="{{item.maxlength}}" type="{{item.type}}" bindinput="bindInput" data-item="{{item}}" /> -->
</block>
</view>
...
...
@@ -53,15 +55,15 @@
<!-- disabled="{{btnDisabled}}" -->
<button class="button text-center" disabled="{{btnDisabled}}" hover-class="btn-hover" loading="{{submitLoading}}" bindtap="submit">提交</button>
</block>
<Dialog show="{{ showModal }}" mask="true" bindbuttontap="
dialogConfirm
" buttons="{{buttons}}" statusIcon="{{success}}">
<Dialog show="{{ showModal }}" mask="true" bindbuttontap="
bindButton
" buttons="{{buttons}}" statusIcon="{{success}}">
<view class="suggest-box">
{{
success
}}
{{
dialogText
}}
</view>
</Dialog>
<Dialog show="{{ showModal }}" mask="true" bindbuttontap="repeatConfirm" buttons="{{repeatButtons}}" title="提示">
<
!-- <
Dialog show="{{ showModal }}" mask="true" bindbuttontap="repeatConfirm" buttons="{{repeatButtons}}" title="提示">
<view class="suggest-box">
建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积
</view>
</Dialog>
</Dialog>
-->
<!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> -->
<!-- </dialog> -->
\ No newline at end of file
packageIndex/pages/bankAccount/list/list.js
View file @
1a0a790
...
...
@@ -5,13 +5,13 @@ Page({
* 页面的初始数据
*/
data
:
{
flag
:
false
},
/**
* 生命周期函数--监听页面显示
*/
onLoad
(
options
)
{
//
this.getBankList()
this
.
getBankList
()
// res = await MineApi.getStaffBankList({
// uuid
// })
...
...
@@ -46,19 +46,26 @@ Page({
})
},
async
getBankList
()
{
const
{
uuid
staffPhone
,
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
res
=
await
wx
.
p
.
api
.
withdrawalApi
.
getStaffBankList
({
uuid
staffPhone
,
channelSource
})
res
&&
res
?.
map
(
e
=>
{
e
.
bankNum
=
e
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
})
this
.
setData
({
list
:
res
||
[],
flag
:
true
})
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
res
&&
res
.
data
?.
map
(
e
=>
{
e
.
bankNum
=
e
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
})
this
.
setData
({
list
:
res
.
data
||
[],
flag
:
true
})
}
},
jump
(
e
)
{
const
{
...
...
packageIndex/pages/integral/index/components/noOpen/index.js
View file @
1a0a790
...
...
@@ -4,7 +4,13 @@ Component({
* 组件的属性列表
*/
properties
:
{
scoreSummary
:{
type
:
Object
,
value
:
{},
observer
(
n
){
}
}
},
/**
...
...
@@ -25,15 +31,15 @@ Component({
havoNOData
:[
{
text
:
'累计收益积分'
,
value
:
9505.50
key
:
'totalRewardScore'
,
},
{
text
:
'累计提现积分'
,
value
:
9505.50
key
:
'totalWithdrawalScore'
,
},
{
text
:
'累计兑换积分'
,
value
:
9505.50
key
:
'totalGoodExchangeScore'
,
}
],
},
...
...
packageIndex/pages/integral/index/components/noOpen/index.wxml
View file @
1a0a790
...
...
@@ -28,10 +28,10 @@
<view class="title">我的积分</view>
<view class="integral">
<glsx-image webp src="/integral/logo.png" class="gold"></glsx-image>
<view class="number
--fontColor">1680
</view>
<view class="number
"> {{scoreSummary.currentScore}}
</view>
</view>
</view>
<view class="flex note-btn
--fontColor
" bind:tap="goRecord">提现记录 <glsx-image webp src="/integral/right.png" class="right"></glsx-image>
<view class="flex note-btn" bind:tap="goRecord">提现记录 <glsx-image webp src="/integral/right.png" class="right"></glsx-image>
</view>
<view class="flex withdraw" bind:tap="toCash">
...
...
@@ -42,7 +42,7 @@
<view class="content flex">
<view wx:for="{{havoNOData}}" wx:key="index" wx:for-item="i" class="c-item">
<view class="value">{{
i.value
}}</view>
<view class="value">{{
scoreSummary[i.key]
}}</view>
<view class="text">{{i.text}}</view>
</view>
</view>
...
...
packageIndex/pages/integral/index/components/open/index.js
View file @
1a0a790
...
...
@@ -4,7 +4,13 @@ Component({
* 组件的属性列表
*/
properties
:
{
scoreSummary
:{
type
:
Object
,
value
:
{},
observer
(
n
){
}
}
},
/**
...
...
@@ -13,7 +19,7 @@ Component({
data
:
{
navStyle
:
"background-color: transparent;"
,
guideList
:
[{
value
:
3
,
key
:
'bankCardSize'
,
text
:
'银行卡'
,
rightIcon
:
'right'
},
...
...
@@ -28,19 +34,15 @@ Component({
],
havoData
:
[{
text
:
'累计收益'
,
value
:
9505.50
key
:
'totalRewardScore'
,
},
{
text
:
'累计提现'
,
value
:
9505.50
key
:
'totalWithdrawalScore'
,
},
{
text
:
'累计兑换'
,
value
:
9505.50
},
{
text
:
'累计转赠'
,
value
:
9505.50
key
:
'totalGoodExchangeScore'
,
}
],
},
...
...
packageIndex/pages/integral/index/components/open/index.wxml
View file @
1a0a790
...
...
@@ -20,7 +20,7 @@
<glsx-image webp src="/integral/logo.png" class="gold"></glsx-image>宋慧的总积分
</view>
<view class="integral">
1680
{{scoreSummary.currentScore}}
</view>
</view>
<view class="flex withdraw" bind:tap="toCash">
...
...
@@ -29,7 +29,7 @@
</view>
<view class="guide-wrap flex">
<view wx:for="{{guideList}}" class="guide flex" wx:for-item="g" wx:key="index" bind:tap="go" data-index="{{index}}">
<view class="value" wx:if="{{g.
value}}">{{g.value
}}</view>
<view class="value" wx:if="{{g.
key}}">{{scoreSummary[g.key]
}}</view>
<glsx-image webp src="/integral/{{g.leftIcon}}.png" class="left" wx:if="{{g.leftIcon}}"></glsx-image>
<view class="text">{{g.text}}</view>
<glsx-image webp src="/integral/{{g.rightIcon}}.png" class="right" wx:if="{{g.rightIcon}}"></glsx-image>
...
...
@@ -38,7 +38,7 @@
</view>
<view class="accumulative-content flex">
<view wx:for="{{havoData}}" wx:key="index" wx:for-item="i" class="c-item">
<view class="value">{{
i.value
}}</view>
<view class="value">{{
scoreSummary[i.key]
}}</view>
<view class="text">{{i.text}}</view>
</view>
</view>
...
...
packageIndex/pages/integral/index/components/profitList/index.js
0 → 100644
View file @
1a0a790
Component
({
/**
* 组件的属性列表
*/
properties
:
{
list
:
{
type
:
Array
,
value
:
[],
observer
(
n
)
{
}
}
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
}
})
\ No newline at end of file
packageIndex/pages/integral/index/components/profitList/index.json
0 → 100644
View file @
1a0a790
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageIndex/pages/integral/index/components/profitList/index.scss
0 → 100644
View file @
1a0a790
.list_widget
{
// margin-top: 674rpx;
background
:
#FFFFFF
;
border
:
2rpx
solid
#FFFFFF
;
border-radius
:
24rpx
;
padding
:
32rpx
28rpx
;
margin
:
20rpx
;
box-sizing
:
border-box
;
.title_wrap
{
font-weight
:
500
;
font-size
:
34rpx
;
color
:
#0A0D14
;
text-align
:
center
;
}
}
.list_data_widget
{
box-sizing
:
border-box
;
.element
{
width
:
100%
;
border-bottom
:
2rpx
solid
#f2f2f2
;
padding
:
28rpx
0
;
position
:
relative
;
.title
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#292D33
;
line-height
:
44rpx
;
display
:
flex
;
align-items
:
center
;
}
.date
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#8F959E
;
line-height
:
36rpx
;
margin-top
:
8rpx
;
}
.price
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
color
:
#FB8A32
;
font-size
:
40rpx
;
display
:
flex
;
align-items
:
center
;
.mini
{
font-size
:
32rpx
;
}
}
.blackColor
{
color
:
#333333
;
}
.right-icon
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
4rpx
;
}
.tip
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#999999
;
line-height
:
44rpx
;
margin-right
:
12rpx
;
}
}
.no_more_tip
{
margin-top
:
40rpx
;
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#BEBEBE
;
line-height
:
36rpx
;
text-align
:
center
;
}
}
\ No newline at end of file
packageIndex/pages/integral/index/components/profitList/index.wxml
0 → 100644
View file @
1a0a790
<view class="list_widget">
<view class="title_wrap">
收益明细
</view>
<view class="list_data_widget">
<block wx:for="{{list}}" wx:key="index">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}">
<view class="title">{{item.infoName}} <view class="right-icon-box">
</view>
</view>
<view class="date">{{item.updatedTime}}</view>
<view class="price {{item.type==0?'':'blackColor'}}">
<text wx:if="{{item.infoName==='积分商品售后'}}" class="tip">退还</text>
<text class="mini">{{item.type==0?'+':'-'}}</text>
<text>{{item.rewardScore}}</text>
<glsx-image mode="widthFix" class="right-arrow" src="/integral/arrow.png" />
</view>
</view>
</block>
<view wx:if="{{list.length}}" class="no_more_tip">没有更多啦</view>
<view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view>
\ No newline at end of file
packageIndex/pages/integral/index/index.js
View file @
1a0a790
...
...
@@ -7,9 +7,20 @@ Page({
* 页面的初始数据
*/
data
:
{
open
:
false
,
scoreSummary
:
{
currentScore
:
345333.00
,
//当前积分
bankCardSize
:
4
,
totalGoodExchangeScore
:
100
,
//累计兑换积分
totalRewardScore
:
200
,
//累计收益积分
totalWithdrawalScore
:
400
,
//累计提现积分
},
open
:
true
,
staffBankFlag
:
false
,
showAccountModal
:
false
,
listData
:
[{
pageSize
:
10
,
pageNum
:
1
,
total
:
0
,
scoreList
:
[{
id
:
2104467
,
infoName
:
"积分兑换"
,
rewardScore
:
5
,
...
...
@@ -28,11 +39,59 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
console
.
log
(
wx
.
p
)
this
.
searchScoreSummaryData
()
this
.
getScoreProfitListData
()
},
jump
()
{
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawalNote/withdrawalNote'
)
},
searchScoreSummaryData
()
{
const
{
staffPhone
,
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
);
wx
.
p
.
api
.
withdrawalApi
.
searchScoreSummary
({
staffPhone
,
channelSource
//1.阳光激励 2.续保用户 3.管理层
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
setData
({
scoreSummary
:
res
.
data
,
staffBankFlag
:
!
res
.
data
.
bankCardSize
})
}
}).
catch
((
err
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
})
},
getScoreProfitListData
()
{
let
{
pageNum
,
total
,
pageSize
}
=
this
.
data
;
wx
.
p
.
api
.
withdrawalApi
.
getScoreProfitList
({
staffPhone
:
''
,
channelSource
:
''
,
pageSize
,
pageNum
}).
then
(
res
=>
{
let
data
;
if
(
res
.
code
==
0
)
{
data
=
res
.
data
?.
list
?
res
.
data
?.
list
:
[]
}
this
.
setData
({
scoreList
:
pageNum
==
1
?
data
:
[...
scoreList
,
...
data
],
total
:
res
.
data
.
count
,
mineTrigger
:
false
})
}).
catcn
((
err
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
})
},
toBank
()
{
wx
.
p
.
router
.
go
(
'/packageIndex/pages/bankAccount/list/list'
)
},
...
...
@@ -52,23 +111,32 @@ Page({
/**跳转至银行卡 */
toAddBankAccount
(
e
)
{
const
{
score
,
user
}
=
wx
.
p
.
router
.
router
.
getPageInstance
()
currentScore
,
}
=
this
.
data
.
scoreSummary
;
this
.
setData
({
showAccountModal
:
false
},
()
=>
{
wx
.
p
.
router
.
router
.
go
(
'/packageStoreAssistant/packageMine/pages/bankAccount/detail/detail'
,
{
score
,
user
wx
.
p
.
router
.
go
(
'/packageIndex/pages/bankAccount/add/add'
,
{
score
:
currentScore
})
})
},
toCash
(){
// this.setData({
// showAccountModal: true
// })
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawal/withdrawal'
)
toCash
()
{
const
{
currentScore
,
}
=
this
.
data
.
scoreSummary
,{
staffBankFlag
}
=
this
.
data
;
if
(
staffBankFlag
)
{
this
.
setData
({
showAccountModal
:
true
})
return
}
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawal/withdrawal'
,{
score
:
currentScore
})
},
back
()
{
wx
.
p
.
router
.
back
()
...
...
packageIndex/pages/integral/index/index.json
View file @
1a0a790
{
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{
"have-open"
:
"./components/open"
,
"have-no-ope"
:
"./components/noOpen"
"profit-list"
:
"./components/profitList"
,
"have-open"
:
"./components/open"
,
"have-no-ope"
:
"./components/noOpen"
}
}
\ No newline at end of file
packageIndex/pages/integral/index/index.scss
View file @
1a0a790
...
...
@@ -5,92 +5,7 @@
align-items
:
center
;
}
.list_widget
{
// margin-top: 674rpx;
background
:
#FFFFFF
;
border
:
2rpx
solid
#FFFFFF
;
border-radius
:
24rpx
;
padding
:
32rpx
28rpx
;
margin
:
20rpx
;
box-sizing
:
border-box
;
.title_wrap
{
font-weight
:
500
;
font-size
:
34rpx
;
color
:
#0A0D14
;
text-align
:
center
;
}
}
.list_data_widget
{
box-sizing
:
border-box
;
.element
{
width
:
100%
;
border-bottom
:
2rpx
solid
#f2f2f2
;
padding
:
28rpx
0
;
position
:
relative
;
.title
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#292D33
;
line-height
:
44rpx
;
display
:
flex
;
align-items
:
center
;
}
.date
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#8F959E
;
line-height
:
36rpx
;
margin-top
:
8rpx
;
}
.price
{
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
color
:
#FB8A32
;
font-size
:
40rpx
;
display
:
flex
;
align-items
:
center
;
.mini
{
font-size
:
32rpx
;
}
}
.blackColor
{
color
:
#333333
;
}
.right-icon
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
4rpx
;
}
.tip
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#999999
;
line-height
:
44rpx
;
margin-right
:
12rpx
;
}
}
.no_more_tip
{
margin-top
:
40rpx
;
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#BEBEBE
;
line-height
:
36rpx
;
text-align
:
center
;
}
}
}
...
...
packageIndex/pages/integral/index/index.wxml
View file @
1a0a790
<!--packageIndex/pages/integral/index/index.wxml-->
<!--积分中心 -->
<view class="integral-container {{!open?'bgF':''}}">
<have-no-ope wx:if="{{open}}">
<view class="list_widget">
<view class="title_wrap">
收益明细
</view>
<view class="list_data_widget">
<block wx:for="{{listData}}" wx:key="index">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}">
<view class="title">{{item.infoName}} <view class="right-icon-box">
</view>
</view>
<view class="date">{{item.updatedTime}}</view>
<view class="price {{item.type==0?'':'blackColor'}}">
<text wx:if="{{item.infoName==='积分商品售后'}}" class="tip">退还</text>
<text class="mini">{{item.type==0?'+':'-'}}</text>
<text>{{item.rewardScore}}</text>
<glsx-image mode="widthFix" class="right-arrow" src="/integral/arrow.png" />
</view>
</view>
</block>
<view wx:if="{{listData.length}}" class="no_more_tip">没有更多啦</view>
<view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view>
<have-no-ope wx:if="{{open}}" scoreSummary="{{scoreSummary}}">
<profit-list list="{{scoreList}}"></profit-list>
</have-no-ope>
<have-open wx:else>
<view class="list_widget">
<view class="title_wrap">
收益明细
</view>
<view class="list_data_widget">
<block wx:for="{{listData}}" wx:key="index">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}">
<view class="title">{{item.infoName}} <view class="right-icon-box">
</view>
</view>
<view class="date">{{item.updatedTime}}</view>
<view class="price {{item.type==0?'':'blackColor'}}">
<text wx:if="{{item.infoName==='积分商品售后'}}" class="tip">退还</text>
<text class="mini">{{item.type==0?'+':'-'}}</text>
<text>{{item.rewardScore}}</text>
<glsx-image mode="widthFix" class="right-arrow" src="/integral/arrow.png" />
</view>
</view>
</block>
<view wx:if="{{listData.length}}" class="no_more_tip">没有更多啦</view>
<view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view>
<have-open wx:else scoreSummary="{{scoreSummary}}">
<profit-list list="{{scoreList}}"></profit-list>
</have-open>
</view>
...
...
packageIndex/pages/integral/withdrawal/components/authSetting/authSetting.js
View file @
1a0a790
...
...
@@ -23,10 +23,10 @@ Component({
// type: Boolean,
// value: false
// },
// index
: {
// type: Boolean
,
// value: false
// }
url
:
{
type
:
String
,
value
:
''
},
agree
:
Boolean
},
...
...
@@ -56,9 +56,9 @@ Component({
},
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
`
//
let { url } = e.currentTarget.dataset
//
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const
path
=
`
${
url
}
`
// private user
wx
.
navigateTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
path
)}
`
...
...
packageIndex/pages/integral/withdrawal/withdrawal.js
View file @
1a0a790
...
...
@@ -9,7 +9,8 @@ Page({
agree
:
false
,
showAuthDialog
:
false
,
showConfirmDialog
:
false
,
sumbitScore
:
'250.00'
,
sumbitScore
:
''
,
disclaimerAgreementUrl
:
''
,
buttons
:
[{
text
:
'取消'
},
{
...
...
@@ -22,19 +23,7 @@ Page({
text
:
'确认'
,
extClass
:
'btn_primary'
}],
score
:
{
"bankWithdrawalScore"
:
"230.00"
,
"currentScore"
:
"0.00"
,
"existBankWithdrawal"
:
false
,
"existWechatMotivationWithdrawal"
:
false
,
"motivationWithdrawalScore"
:
"0.00"
,
"notExchangeScore"
:
"0.00"
,
"supportWithdrawalScore"
:
"0.00"
,
"totalRewardScore"
:
"0.00"
,
"totalWithdrawalScore"
:
"0.00"
,
"wechatMotivationWithdrawalScore"
:
"0.00"
,
"wechatWithdrawalScore"
:
"0.00"
},
score
:
'10000'
,
bankInfo
:
{
"id"
:
34
,
"staffId"
:
16550
,
...
...
@@ -79,22 +68,58 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
console
.
log
(
wx
.
p
)
this
.
getBankList
()
console
.
log
(
wx
.
p
)
wx
.
p
.
router
.
getRouterParams
().
then
(
params
=>
{
console
.
log
(
params
)
this
.
setData
(
params
)
})
this
.
getBankList
()
},
back
()
{
wx
.
p
.
router
.
back
()
},
jump
()
{
},
async
getBankList
(){
async
getBankList
()
{
const
{
uuid
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
staffPhone
,
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
res
=
await
wx
.
p
.
api
.
withdrawalApi
.
getStaffBankList
({
uuid
staffPhone
,
channelSource
})
res
&&
res
?.
map
(
e
=>
{
e
.
bankNum
=
e
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
})
this
.
setData
({
list
:
res
||
[],
flag
:
true
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
res
&&
res
.
data
?.
map
(
e
=>
{
e
.
bankNum
=
e
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
})
this
.
setData
({
bankList
:
res
.
data
||
[],
flag
:
true
,
bankInfo
:
res
.
data
[
0
]
},
()
=>
{
//获取免责协议地址获取
this
.
getAgreementUrl
()
})
}
},
getAgreementUrl
()
{
let
{
bankInfo
}
=
this
.
data
;
wx
.
p
.
api
.
withdrawalApi
.
getAgreementUrl
({
bankUserName
:
bankInfo
.
bankUserName
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
setData
({
disclaimerAgreementUrl
:
res
.
data
})
}
}).
catch
((
err
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
err
)
})
},
bindPickerChange
(
e
)
{
...
...
@@ -106,68 +131,24 @@ Page({
bankInfo
.
bankNum
=
bankInfo
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
this
.
setData
({
bankInfo
},
()
=>
{
this
.
getAgreementUrl
()
})
},
toSumbitData
()
{
if
(
this
.
submit
)
return
let
{
sumbitScore
,
disclaimerAgreementUrl
,
bankInfo
:{
id
}
}
=
this
.
data
;
if
(
!
sumbitScore
)
return
wx
.
p
.
wxApi
.
showToast
(
'请输入提现积分'
)
const
checkAgree
=
this
.
checkAgree
()
if
(
checkAgree
)
return
false
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess'
)
// wx.p.wxApi.showToast('有一笔兑换正在进行')
// let {
// sumbitScore,
// score: {
// existWechatMotivationWithdrawal
// }
// } = this.data
// let withDrawType = 3
// const money = this.accSub(Number(sumbitScore), 0)
// if (money <= 0) return wx.p.wxApi.showToast(`您的积分不足,请确认后重新申请兑换`)
// // this.comfirmSumbit(sumbitScore, withDrawType)
// this.setData({
// showConfirmDialog: true
// })
},
// 提现确认模块
comfirmSumbit
(
sumbitScore
,
withDrawType
,
rateQuery
=
{},
sourceFrom
)
{
let
{
tabIndex
,
tabData
,
}
=
this
.
data
;
Dialog
.
confirm
({
title
:
'提示'
,
message
:
`请确认是否将
${
sumbitScore
}
积分进行兑换`
,
}).
then
(()
=>
{
if
(
this
.
submit
)
return
this
.
submit
=
true
wx
.
p
.
api
.
showLoading
(
'提交中'
)
MineApi
.
WithdrawalApi
({
withdrawalScore
:
sumbitScore
,
withDrawType
,
sourceFrom
,
wechatAppId
:
appId
,
withdrawalSource
:
3
,
...
rateQuery
}).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
.
code
==
0
)
{
wx
.
p
.
eventbus
.
off
(
'REFRESH_WITHDRALWAL'
)
wx
.
p
.
router
.
redirectTo
(
'/packageStoreAssistant/packageMine/pages/withdrawalSuccess/withdrawalSuccess'
,
{
title
:
tabData
[
tabIndex
]
})
}
else
{
wx
.
p
.
wxApi
.
showToast
(
res
.
message
)
this
.
submit
=
false
}
}).
catch
((
err
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
this
.
submit
=
false
})
}).
catch
(()
=>
{
this
.
submit
=
false
});
const
money
=
this
.
accSub
(
Number
(
sumbitScore
),
0
)
if
(
money
<=
0
)
return
wx
.
p
.
wxApi
.
showToast
(
`您的积分不足,请确认后重新申请兑换`
)
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawalRules/withdrawalRules'
,
{
sumbitScore
,
disclaimerAgreementUrl
,
bankId
:
id
})
},
accSub
(
arg1
,
arg2
)
{
let
r1
,
r2
,
m
,
n
;
...
...
@@ -187,15 +168,10 @@ Page({
},
toTixianAll
()
{
let
{
score
:
{
existBankWithdrawal
,
bankWithdrawalScore
,
wechatWithdrawalScore
}
}
=
this
.
data
,
withdrawalScore
=
bankWithdrawalScore
score
}
=
this
.
data
;
this
.
setData
({
sumbitScore
:
withdrawalS
core
sumbitScore
:
s
core
})
},
handleInput
(
e
)
{
...
...
@@ -204,16 +180,11 @@ Page({
}
=
e
.
detail
let
{
sumbitScore
,
score
:
{
existBankWithdrawal
,
bankWithdrawalScore
,
wechatWithdrawalScore
},
}
=
this
.
data
,
withdrawalScore
=
bankWithdrawalScore
sumbitScore
=
this
.
priceVerify
(
value
,
withdrawalScore
)
score
}
=
this
.
data
;
sumbitScore
=
this
.
priceVerify
(
value
,
score
)
this
.
setData
({
sumbitScore
:
sumbitScore
||
''
sumbitScore
:
sumbitScore
||
''
})
},
// 价格输入校验规则(提现积分值:最小值需大于0)
...
...
packageIndex/pages/integral/withdrawal/withdrawal.wxml
View file @
1a0a790
...
...
@@ -15,7 +15,7 @@
</view>
<view class="to-cash" style="top:{{navHeight}}px; margin-top:-474rpx">
<view class="text">当前可提现积分</view>
<view class="value">
1680
</view>
<view class="value">
{{score}}
</view>
<view class="operate-wrap">
<view class="info">本次提现积分</view>
<view class="operate">
...
...
@@ -38,7 +38,7 @@
</view>
<view class="auth_box">
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
<auth-setting bind:choose="authChoose" agree="{{ agree }}"
url="{{disclaimerAgreementUrl}}"
/>
</view>
<view class="submit" bind:tap="toSumbitData">提交</view>
</view>
...
...
@@ -52,8 +52,3 @@
</view>
</Dialog>
<Dialog show="{{ showConfirmDialog }}" mask="true" bindbuttontap="comfirmSumbit" buttons="{{confirmButtons}}" title="提示">
<view class="suggest-box">
您的银行账户修改成功!
</view>
</Dialog>
\ No newline at end of file
packageIndex/pages/integral/withdrawalNote/withdrawalNote.js
View file @
1a0a790
// import MineApi from '~/api/mineApi/index'
Page
({
data
:
{
STATUSICON
:
[
'waiteing'
,
'comlpete'
,
'fail'
,
'ht'
],
STATUSTEXT
:[
'处理中'
,
'提现成功'
,
'提现成功'
,
'后台核销'
],
STATUSTEXT
:
[
'处理中'
,
'提现成功'
,
'提现成功'
,
'后台核销'
],
pageSize
:
1
,
pageNum
:
9999
,
listData
:
[],
isNoResult
:
false
},
toastError
(
e
){
toastError
(
e
)
{
const
{
reason
}
=
e
.
currentTarget
.
dataset
// wx.$api.showToast(reason);
wx
.
showModal
({
title
:
''
,
content
:
String
(
reason
)
,
content
:
String
(
reason
)
,
showCancel
:
false
,
confirmText
:
'我知道了'
,
confirmColor
:
'#1B233D'
,
success
(
res
)
{
}
success
(
res
)
{}
})
},
onLoad
(
options
)
{
// MineApi.getWithdrawalListApi().then(res => {
// if (res && res.length) {
let
res
=
[
{
"id"
:
16118
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
50995.46
,
"withdrawalTime"
:
"2025-08-15 09:48"
,
"successTime"
:
null
,
"status"
:
4
,
"type"
:
3
,
"bankUserName"
:
"望周知"
,
"bankName"
:
"中国邮政储蓄银行"
,
"bankNumber"
:
"6555555555555555555"
,
"bankPhone"
:
"18955555555"
,
"idCardNo"
:
"341181199508252222"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
},{
"id"
:
16067
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
32.00
,
"withdrawalTime"
:
"2024-11-08 17:17"
,
"successTime"
:
"2024-11-08 17:25"
,
"status"
:
3
,
"type"
:
3
,
"bankUserName"
:
"姚孝章"
,
"bankName"
:
"招商银行"
,
"bankNumber"
:
"6214830050900165"
,
"bankPhone"
:
"13650810420"
,
"idCardNo"
:
"440582199609153643"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
this
.
getScoreWithdrawalPage
()
let
res
=
[{
"id"
:
16118
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
50995.46
,
"withdrawalTime"
:
"2025-08-15 09:48"
,
"successTime"
:
null
,
"status"
:
4
,
"type"
:
3
,
"bankUserName"
:
"望周知"
,
"bankName"
:
"中国邮政储蓄银行"
,
"bankNumber"
:
"6555555555555555555"
,
"bankPhone"
:
"18955555555"
,
"idCardNo"
:
"341181199508252222"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
},
{
"id"
:
16066
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
30.50
,
"withdrawalTime"
:
"2024-11-08 15:55"
,
"successTime"
:
null
,
"status"
:
2
,
"type"
:
3
,
"bankUserName"
:
"姚孝章"
,
"bankName"
:
"招商银行"
,
"bankNumber"
:
"6214830050900165"
,
"bankPhone"
:
"13650810420"
,
"idCardNo"
:
"440582199609153643"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
}
]
console
.
log
(
2222
)
res
.
map
(
item
=>
{
"id"
:
16067
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
32.00
,
"withdrawalTime"
:
"2024-11-08 17:17"
,
"successTime"
:
"2024-11-08 17:25"
,
"status"
:
3
,
"type"
:
3
,
"bankUserName"
:
"姚孝章"
,
"bankName"
:
"招商银行"
,
"bankNumber"
:
"6214830050900165"
,
"bankPhone"
:
"13650810420"
,
"idCardNo"
:
"440582199609153643"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
},
{
"id"
:
16066
,
"wechatAvatarUrl"
:
null
,
"wechatNickName"
:
null
,
"withdrawalScore"
:
30.50
,
"withdrawalTime"
:
"2024-11-08 15:55"
,
"successTime"
:
null
,
"status"
:
2
,
"type"
:
3
,
"bankUserName"
:
"姚孝章"
,
"bankName"
:
"招商银行"
,
"bankNumber"
:
"6214830050900165"
,
"bankPhone"
:
"13650810420"
,
"idCardNo"
:
"440582199609153643"
,
"exportStatus"
:
0
,
"failReason"
:
null
,
"source"
:
1
}]
console
.
log
(
2222
)
res
.
map
(
item
=>
{
if
(
item
.
status
==
3
)
{
item
.
iconType
=
1
}
else
if
(
item
.
status
==
4
)
{
item
.
iconType
=
2
}
else
{
item
.
iconType
=
0
}
if
(
item
.
type
==
2
)
{
item
.
iconType
=
3
}
if
(
item
.
type
==
3
&&
item
.
bankNumber
)
{
item
.
bankNumber
=
item
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
}
return
item
})
// }
let
flag
=
res
.
length
?
false
:
true
this
.
setData
({
listData
:
res
||
[],
isNoResult
:
flag
})
// })
},
getScoreWithdrawalPage
()
{
const
{
staffPhone
,
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
{
pageNum
,
pageSize
}
=
this
.
data
;
wx
.
p
.
api
.
withdrawalApi
.
getScoreWithdrawalPage
({
staffPhone
,
channelSource
,
pageNum
,
pageSize
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
res
.
list
.
map
(
item
=>
{
if
(
item
.
status
==
3
)
{
item
.
iconType
=
1
}
else
if
(
item
.
status
==
4
)
{
...
...
@@ -91,19 +128,19 @@ Page({
if
(
item
.
type
==
2
)
{
item
.
iconType
=
3
}
if
(
item
.
type
==
3
&&
item
.
bankNumber
)
{
if
(
item
.
type
==
3
&&
item
.
bankNumber
)
{
item
.
bankNumber
=
item
.
bankNumber
.
replace
(
/^
(?:\d
+
)(
.
{4})
$/
,
'**** **** **** $1'
)
}
return
item
})
}
// }
let
flag
=
res
.
length
?
false
:
true
let
flag
=
res
.
l
ist
.
l
ength
?
false
:
true
this
.
setData
({
listData
:
res
||
[],
listData
:
res
.
list
||
[],
isNoResult
:
flag
})
//
})
})
}
})
\ No newline at end of file
packageIndex/pages/integral/withdrawalNote/withdrawalNote.wxml
View file @
1a0a790
...
...
@@ -3,37 +3,38 @@
<view wx:if="{{!isNoResult}}" class="list">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<view class="status {{STATUSICON[item.iconType]}}">{{STATUSTEXT[item.iconType]}}</view>
<block wx:if="{{item.type == 3}}">
<view class="bank-info">
<view class="name">
{{item.bankName || ''}}({{item.bankUserName|| ''}})
</view>
<view class="card-no">
{{item.bankNumber|| ''}}
</view>
<view class="status {{STATUSICON[item.iconType]}}">{{STATUSTEXT[item.iconType]}}</view>
<block wx:if="{{item.type == 3}}">
<view class="bank-info">
<view class="name">
{{item.bankName || ''}}({{item.bankUserName|| ''}})
</view>
<view class="card-no">
{{item.bankNumber|| ''}}
</view>
</view>
</block>
<view class="countText flex">
-{{item.withdrawalScore}}
<!-- <block wx:if="{{item.status == 4&&item.failReason}}">
<view class="type flex">
<view class="failReason">{{item.failReason}} </view>
<glsx-image mode="widthFix" class="error-icon" bind:tap="toastError" data-reason="{{item.failReason}}" src="store-assistant/error-icon.png" />
</view>
</block> -->
<block>
<view class="type">
银行卡兑换
</view>
</block>
<view class="countText flex">
-{{item.withdrawalScore}}
<block wx:if="{{item.status == 4&&item.failReason}}">
<view class="type flex"><view class="failReason">{{item.failReason}} </view> <glsx-image mode="widthFix" class="error-icon" bind:tap="toastError" data-reason="{{item.failReason}}" src="store-assistant/error-icon.png" /></view>
</block>
<block wx:else>
<view wx:if="{{item.type == -1}}" class="type">
消耗积分
</view>
<view wx:else class="type">
{{item.type == 3 ?'银行卡':item.type == 1?'零钱':'微信'}}兑换
</view>
</block>
</view>
<view class="line"></view>
<view class="date_wrap flex_scb">
<view class="dateText">{{item.type == -1 ?'兑换':'申请'}}时间:{{item.withdrawalTime || ''}}</view>
<view wx:if="{{item.successTime}}" class="dateText">完成时间:{{item.successTime || ''}}</view>
</view>
</view>
<view class="line"></view>
<view class="date_wrap flex_scb">
<view class="dateText">{{item.type == -1 ?'兑换':'申请'}}时间:{{item.withdrawalTime || ''}}</view>
<view wx:if="{{item.successTime}}" class="dateText">完成时间:{{item.successTime || ''}}</view>
</view>
</view>
</block>
</view>
...
...
packageIndex/pages/integral/withdrawalRules/withdrawalRules.js
View file @
1a0a790
...
...
@@ -5,23 +5,119 @@ Page({
* 页面的初始数据
*/
data
:
{
showConfirmDialog
:
false
,
taxRateObj
:
{
withdrawalScore
:
1000
,
totalWithdrawalScore
:
2000
,
month
:
2
,
totalIncomeWithoutSalary
:
2100
,
taxRateWithoutSalary
:
3
,
totalIncomeWithSalary
:
33322
,
taxRateWithSalary
:
10
,
baseIncome
:
8989
},
confirmButtons
:
[{
text
:
'取消'
},
{
text
:
'确认'
,
extClass
:
'btn_primary'
}],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
wx
.
p
.
router
.
getRouterParams
().
then
(
params
=>
{
this
.
setData
(
params
)
this
.
getTaxRate
()
})
},
getTaxRate
()
{
const
{
staffPhone
,
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
),
{
sumbitScore
}
=
this
.
data
;
wx
.
p
.
api
.
WithdrawalApi
.
getTaxRate
({
withdrawalScore
:
sumbitScore
,
staffPhone
,
channelSource
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
setData
({
taxRateObj
:
res
.
data
})
}
}).
catch
(
err
=>
{
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
})
},
goMall
()
{
wx
.
p
.
router
.
re
place
(
'/pages/tab/index/index'
)
wx
.
p
.
router
.
re
directTo
(
'/pages/tab/index/index'
)
},
policyDetail
()
{
wx
.
p
.
router
.
jumpH5
(
`https://fgk.chinatax.gov.cn/zcfgk/c100012/c5241472/content.html`
)
},
goContinue
(){
wx
.
p
.
router
.
replace
(
'/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess'
)
bindButton
(
e
)
{
let
{
value
}
=
e
.
detail
;
let
dialogObj
=
{
0
:
()
=>
{
this
.
dialogClose
()
},
1
:
()
=>
{
this
.
dialogConfirm
()
}
}
dialogObj
[
value
]()
},
dialogClose
()
{
this
.
submit
=
false
this
.
setData
({
showConfirmDialog
:
false
,
})
},
dialogConfirm
()
{
let
{
sumbitScore
,
disclaimerAgreementUrl
,
bankInfo
:
{
id
}
}
=
this
.
data
;
if
(
this
.
submit
)
return
this
.
submit
=
true
wx
.
p
.
wxApi
.
showLoading
(
'提交中'
)
wx
.
p
.
api
.
WithdrawalApi
.
saveWithdrawal
({
withdrawalScore
:
sumbitScore
,
disclaimerAgreementUrl
,
bankId
:
id
}).
then
(
res
=>
{
wx
.
p
.
wxApi
.
hideLoading
();
if
(
res
.
code
==
0
)
{
wx
.
p
.
router
.
redirectTo
(
'/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess'
)
}
else
{
wx
.
p
.
wxApi
.
showToast
(
res
.
message
)
this
.
submit
=
false
}
}).
catch
((
err
)
=>
{
this
.
submit
=
false
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
}).
finally
(()
=>
{
this
.
setData
({
showConfirmDialog
:
false
})
})
},
goContinue
()
{
this
.
setData
({
showConfirmDialog
:
true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
...
...
packageIndex/pages/integral/withdrawalRules/withdrawalRules.wxml
View file @
1a0a790
...
...
@@ -8,26 +8,26 @@
</view>
<view class="consumption">
<view class="info">截止当前</view>
<view class="item">您已在本平台累计提现 <view class="price">
7000
<text>元</text></view>
<view class="item">您已在本平台累计提现 <view class="price">
{{taxRateObj.totalWithdrawalScore}}
<text>元</text></view>
</view>
<view class="item">您的本次提现金额 <view class="price">
7000
<text>元</text></view>
<view class="item">您的本次提现金额 <view class="price">
{{taxRateObj.withdrawalScore}}
<text>元</text></view>
</view>
</view>
<view class="label">以下为无工资收入和有工资收入的相关税率与收入对比:</view>
</view>
<view class="salary-comparison">
<view class="salary flex_scb">
<view class="proportion">
3
%</view>
<view class="proportion income">
10
%</view>
<view class="proportion">
{{taxRateObj.taxRateWithoutSalary}}
%</view>
<view class="proportion income">
{{taxRateObj.taxRateWithSalary}}
%</view>
</view>
<view class="accumulative flex_sc">
<view class="earning have-no">
<view class="money">
8000
元</view>
<view class="money">
{{taxRateObj.totalIncomeWithoutSalary}}
元</view>
<view class="text">累计提现+本次提现</view>
</view>
<view class=" earning have">
<view class="money">
78000
元</view>
<view class="text">
1万*7
个月+累计提现+本次提现</view>
<view class="money">
{{taxRateObj.totalIncomeWithSalary}}
元</view>
<view class="text">
{{taxRateObj.withdrawalScore}}*{{taxRateObj.month}}
个月+累计提现+本次提现</view>
</view>
</view>
<view class="tips">以上仅为本平台评估展示,本次提现金额不会扣除,您的真实税务建议您去<text>个人所得税APP</text>查询</view>
...
...
@@ -43,4 +43,9 @@
<view class="btn-text withdraw" bind:tap="goContinue">继续提现</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<Dialog show="{{ showConfirmDialog }}" mask="true" bindbuttontap="bindButton" buttons="{{confirmButtons}}" title="提示">
<view class="suggest-box">
请确认是否将{{sumbitScore}}积分进行兑换
</view>
</Dialog>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment