Commit 684fe81d by wangzhihui

积分接口联调

1 parent 86b06ea6
// import WxValidate from '~/utils/WxValidate' // import WxValidate from '~/utils/WxValidate'
console.log(wx.p.WxValidate, '999')
const { const {
methods methods
} = new wx.p.WxValidate() } = new wx.p.WxValidate()
// import MineApi from '~/api/mineApi/index'
Page({ Page({
/** /**
...@@ -18,7 +17,8 @@ Page({ ...@@ -18,7 +17,8 @@ Page({
extClass: 'btn_primary' extClass: 'btn_primary'
}], }],
repeatButtons: [{ repeatButtons: [{
text: '去修改' text: '去修改',
extClass: 'btn_cancel'
}, { }, {
text: '继续添加', text: '继续添加',
extClass: 'btn_primary' extClass: 'btn_primary'
...@@ -60,18 +60,20 @@ Page({ ...@@ -60,18 +60,20 @@ Page({
}, },
{ {
label: '身份证人像面', label: '身份证人像面',
key: 'bankEmblem', key: 'idCardFront',
icon: 'emblem', icon: 'emblem',
upload: true, upload: true,
}, },
{ {
label: '身份证国徽面', label: '身份证国徽面',
key: 'bankPortrait', key: 'idCardBack',
icon: 'portrait', icon: 'portrait',
upload: true, upload: true,
} }
], ],
repeatShowModal: false,
btnDisabled: true, btnDisabled: true,
checkRepeatFlag: 1, //0-不校验,1-校验
isEnabled: false, //是否上传身份证 isEnabled: false, //是否上传身份证
formData: { formData: {
bankUserName: '', bankUserName: '',
...@@ -89,23 +91,41 @@ Page({ ...@@ -89,23 +91,41 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad() { async onLoad() {
let userInfo = wx.p.storage.get('userInfo')
this.setData({
userInfo
})
await this.getConfig()
this.initData() this.initData()
this.getBankList() this.getBankList()
// await this.getConfig() },
onShow() {
}, },
getConfig() { getConfig() {
const { return new Promise((resolve) => {
channelSource const {
} = wx.p.storage.get('userInfo'); channelSource,
wx.p.api.withdrawalApi.getConfig({ phone
channelSource } = this.data.userInfo;
}).then(res => { wx.p.api.withdrawalApi.getConfig({
this.setData({ channelSource,
isEnabled: res.isEnabled staffPhone: phone,
merchantId: '44211227',
merchantName: '波波单店'
}).then(res => {
console.log(res)
if (res.code == 0) {
this.setData({
//0-关闭,1-打开
isEnabled: res.data.isEnabled == 0 ? false : true
})
resolve()
}
}) })
}) })
}, },
initData() { initData() {
wx.p.router.getRouterParams().then(params => { wx.p.router.getRouterParams().then(params => {
...@@ -135,9 +155,27 @@ Page({ ...@@ -135,9 +155,27 @@ Page({
}) })
}, },
repeatConfirm(e) { repeatConfirm(e) {
console.log(e.detail)
let { let {
index value
} = e.detail } = e.detail
let dialogObj = {
0: () => {
this.setData({
repeatShowModal: false,
checkRepeatFlag: 1
})
},
1: () => {
this.setData({
repeatShowModal: false,
checkRepeatFlag: 0
}, () => {
this.submit()
})
}
}
dialogObj[value]()
}, },
del(e) { del(e) {
const { const {
...@@ -181,11 +219,11 @@ Page({ ...@@ -181,11 +219,11 @@ Page({
file: `${type}@${_res.data}` file: `${type}@${_res.data}`
}) })
.then(img => { .then(img => {
console.log(img)
wx.p.wxApi.hideLoading() wx.p.wxApi.hideLoading()
_this.setData({ _this.setData({
[`formData.${key}`]: img [`formData.${key}`]: img
}) })
_this.check()
}) })
} }
}) })
...@@ -199,7 +237,8 @@ Page({ ...@@ -199,7 +237,8 @@ Page({
} = await wx.p.api.systemApi.getMockData(), { } = await wx.p.api.systemApi.getMockData(), {
form form
} = this.data, } = this.data,
index = form.findIndex(e => e.key == 'bankName') index = form.findIndex(e => e.key == 'bankName');
this.setData({ this.setData({
[`form[${index}].pickerData`]: bankList [`form[${index}].pickerData`]: bankList
}) })
...@@ -284,46 +323,69 @@ Page({ ...@@ -284,46 +323,69 @@ Page({
}) })
}, },
async submit() { async submit() {
this.setData({
showModal: true, const {
success: 'success', formData,
dialogText: '您的银行账户添加成功!' userInfo: {
}) phone,
// const { channelSource
// formData },
// } = this.data, { checkRepeatFlag
// item } = this.data, {
// } = this.options, { item
// uuid } = this.options,
// } = wx.p.storage.get('userInfo'), validateKeys = ['bankPhone', 'idCardNo']
// validateKeys = ['bankPhone', 'idCardNo'] try {
// try { validateKeys.map(e => {
// validateKeys.map(e => { if (e == 'bankPhone' && !methods.tel(formData[e])) throw '手机号'
// if (e == 'bankPhone' && !methods.tel(formData[e])) throw '手机号' if (e == 'idCardNo' && !methods.idcard(formData[e])) throw '身份证'
// if (e == 'idCardNo' && !methods.idcard(formData[e])) throw '身份证' })
// }) } catch (error) {
// } catch (error) { return wx.p.wxApi.showToast(`请输入正确的${error}`)
// return wx.p.wxApi.showToast(`请输入正确的${error}`) }
// } if (item && item.id) formData.id = item.id
// if (item && item.id) formData.id = item.id formData.checkRepeatFlag = checkRepeatFlag
// formData.uuid = uuid formData.staffPhone = phone
// const { formData.channelSource = channelSource
// code, formData.merchantId = '44211227',
// message formData.merchantName = '波波单店'
// } = await wx.p.api.withdrawalApi.insetorupdateStaffBank(formData) const {
// if (code == '0') { code,
// this.setData({ message,
// showModal: true, data
// success: 'success', } = await wx.p.api.withdrawalApi.insetorupdateStaffBank(formData)
// dialogText: '您的银行账户添加成功!' if (code == '0') {
// }) //返回类型:0:失败,1:成功,2:提示 建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积
// } else { let resultObj = {
// this.setData({ 0: () => {
// showModal: true, this.setData({
// success: 'fail', showModal: true,
// dialogText: `原因:${message}` success: 'fail',
// }) dialogText: `原因:${message}`
// // wx.$api.showToast(message) })
// } },
1: () => {
this.setData({
showModal: true,
success: 'success',
dialogText: item ? '您的银行账户修改成功!' : '您的银行账户添加成功!'
})
},
2: () => {
this.setData({
repeatShowModal: true
})
}
}
resultObj[data]()
} else {
this.setData({
showModal: true,
success: 'fail',
dialogText: `原因:${message}`
})
// wx.$api.showToast(message)
}
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
</block> </block>
<block wx:elif="{{item.upload}}"> <block wx:elif="{{item.upload}}">
<block wx:if="{{isEnabled}}"> <block wx:if="{{isEnabled}}">
<view class="upload-wrap" bind:tap="upload" data-item="{{item}}"> <view class="upload-wrap" data-item="{{item}}">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<block wx:if="{{ !formData[item.key]}}"> <block wx:if="{{ !formData[item.key]}}">
<view class="upload" bind:tap="upload" data-item="{{item}}"> <view class="upload" catch:tap="upload" data-item="{{item}}">
<glsx-image src="/bankAccount/{{item.icon}}.png" class="bank-icon"></glsx-image> <glsx-image src="/bankAccount/{{item.icon}}.png" class="bank-icon"></glsx-image>
<view class="text">上传照片</view> <view class="text">上传照片</view>
</view> </view>
...@@ -60,10 +60,10 @@ ...@@ -60,10 +60,10 @@
{{dialogText}} {{dialogText}}
</view> </view>
</Dialog> </Dialog>
<!-- <Dialog show="{{ showModal }}" mask="true" bindbuttontap="repeatConfirm" buttons="{{repeatButtons}}" title="提示"> <Dialog show="{{ repeatShowModal }}" mask="true" bindbuttontap="repeatConfirm" buttons="{{repeatButtons}}" title="提示">
<view class="suggest-box"> <view class="suggest-box">
建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积 建议您不要添加同一个人的多张卡片,避免提现时个人税务汇算累积
</view> </view>
</Dialog> --> </Dialog>
<!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> --> <!-- <dialog show="{{showModal}}" confirmText="{{success?'去兑换':'我知道了'}}" cancelText="我知道了" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> -->
<!-- </dialog> --> <!-- </dialog> -->
\ No newline at end of file \ No newline at end of file
...@@ -11,52 +11,28 @@ Page({ ...@@ -11,52 +11,28 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onLoad(options) { onLoad(options) {
this.getBankList() wx.p.router.getRouterParams().then(params => {
// res = await MineApi.getStaffBankList({ console.log(params, params)
// uuid this.options = params
// })
let res = [{
"createdBy": null,
"createdAccount": null,
"source": null,
"merchantId": null,
"datalist": null,
"ip": null,
"entmicroId": null,
"uuid": null,
"userType": null,
"id": 34,
"staffId": 16550,
"bankUserName": "望周知",
"bankName": "中国邮政储蓄银行",
"bankNumber": "6555555555555555555",
"bankPhone": "18955555555",
"idCardNo": "341181199508252222",
"idCardFront": null,
"idCardBack": null,
"state": 1
}]
res && res?.map(e => {
e.bankNum = e.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
})
this.setData({
list: res || [],
flag: true
}) })
}, },
onShow(){
this.getBankList()
},
async getBankList() { async getBankList() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'), } = wx.p.storage.get('userInfo'),
res = await wx.p.api.withdrawalApi.getStaffBankList({ res = await wx.p.api.withdrawalApi.getStaffBankList({
staffPhone, staffPhone: phone,
channelSource channelSource,
merchantId: '44211227',
merchantName: '波波单店'
}) })
console.log(res) console.log(res)
if (res.code ==0) { if (res.code == 0) {
res && res.data?.map(e => { res && res.data?.map(e => {
e.bankNum = e.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1') e.bankNum = e.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
}) })
...@@ -70,16 +46,20 @@ Page({ ...@@ -70,16 +46,20 @@ Page({
jump(e) { jump(e) {
const { const {
item item
} = e.currentTarget.dataset; } = e.currentTarget.dataset, {
console.log(item) list
// { } = this.data,
// score, {
// user score
// } = this.options } = this.options;
if (list.length > 20) {
wx.p.wxApi.showToast('每个员工可添加最多20个收款账户')
}
wx.p.router.go('/packageIndex/pages/bankAccount/add/add', { wx.p.router.go('/packageIndex/pages/bankAccount/add/add', {
item, item,
// score, score
// user
}) })
// wx.p.router.go('/packageIndex/pages/bankAccount/add/add') // wx.p.router.go('/packageIndex/pages/bankAccount/add/add')
} }
......
...@@ -5,7 +5,8 @@ page { ...@@ -5,7 +5,8 @@ page {
.list { .list {
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
height:calc(100vh - 262rpx);
overflow-y: auto;
.item { .item {
padding: 0 32rpx; padding: 0 32rpx;
min-height: 112rpx; min-height: 112rpx;
......
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -10,6 +9,14 @@ Component({ ...@@ -10,6 +9,14 @@ Component({
observer(n) { observer(n) {
} }
},
triggered: {
type: Boolean,
value: false
},
nothing: {
type: Boolean,
value: false
} }
}, },
...@@ -25,11 +32,25 @@ Component({ ...@@ -25,11 +32,25 @@ Component({
*/ */
methods: { methods: {
handleDetail(e) { handleDetail(e) {
let {id} = e.currentTarget.dataset console.log(e)
let {
id,
infoname
} = e.currentTarget.dataset;
if (infoname == '购物兑换' || infoname == '售后返还') {
return
}
wx.p.router.go( wx.p.router.go(
'/packageIndex/pages/integral/withdrawalDetail/withdrawalDetail', '/packageIndex/pages/integral/withdrawalDetail/withdrawalDetail', {
{id} id
}
); );
}, },
bindrefresherrefresh() {
console.log(333)
},
scrollonReachBottom() {
this.triggerEvent('scrollonReachBottom')
},
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.list_data_widget { .list_data_widget {
box-sizing: border-box; box-sizing: border-box;
height:calc(100vh - 420px);
.element { .element {
width: 100%; width: 100%;
border-bottom: 2rpx solid #f2f2f2; border-bottom: 2rpx solid #f2f2f2;
...@@ -76,12 +76,13 @@ ...@@ -76,12 +76,13 @@
} }
} }
.no_more_tip {
margin-top: 40rpx; }
font-weight: 400; .no_more_tip {
font-size: 24rpx; margin-top: 40rpx;
color: #BEBEBE; font-weight: 400;
line-height: 36rpx; font-size: 24rpx;
text-align: center; color: #BEBEBE;
} line-height: 36rpx;
text-align: center;
} }
\ No newline at end of file \ No newline at end of file
<view class="list_widget"> <view class="list_widget">
<view class="title_wrap"> <view class="title_wrap">
收益明细 收益明细
</view> </view>
<view class="list_data_widget"> <block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index"> <scroll-view class="list_data_widget" refresher-enabled="{{true}}" scroll-y="{{true}}" refresher-enabled="{{true}}" bindrefresherrefresh="bindrefresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}"> <block wx:for="{{list}}" wx:key="index">
<view class="title">{{item.infoName}} <view class="right-icon-box"> <view class="element" bind:tap="handleDetail" data-id="{{item.id}}" data-infoName="{{item.infoName}}">
<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>
</view> </view>
<view class="date">{{item.updatedTime}}</view> </block>
<view class="price {{item.type==0?'':'blackColor'}}"> <view wx:if="{{nothing}}" class="no_more_tip">没有更多啦</view>
<text wx:if="{{item.infoName==='积分商品售后'}}" class="tip">退还</text>
<text class="mini">{{item.type==0?'+':'-'}}</text> </scroll-view>
<text>{{item.rewardScore}}</text> </block>
<glsx-image mode="widthFix" class="right-arrow" src="/integral/arrow.png" /> <view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view>
</block>
<view wx:if="{{list.length}}" class="no_more_tip">没有更多啦</view>
<view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,9 @@ Page({ ...@@ -7,7 +7,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isFlag:true, nothing: false,
triggered: true,
isFlag: true,
scoreSummary: { scoreSummary: {
currentScore: 345333.00, //当前积分 currentScore: 345333.00, //当前积分
bankCardSize: 4, bankCardSize: 4,
...@@ -21,43 +23,31 @@ Page({ ...@@ -21,43 +23,31 @@ Page({
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
scoreList: [{ scoreList: []
id: 2104467,
infoName: "积分兑换",
rewardScore: 5,
type: -1,
updatedTime: "2025-07-10 14:31"
}, {
id: 2104354,
infoName: "积分收益",
rewardScore: 5,
type: 0,
updatedTime: "2025-06-20 17:07",
}]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
//是否开通 //是否开通
await this.openPointsWallet() // await this.openPointsWallet()
this.searchScoreSummaryData() this.searchScoreSummaryData()
this.getScoreProfitListData() this.getScoreProfitListData()
}, },
openPointsWallet(){ openPointsWallet() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'); } = wx.p.storage.get('userInfo');
wx.p.api.withdrawalApi.openPointsWallet({ wx.p.api.withdrawalApi.openPointsWallet({
phone:18925261040, phone,
source:1 //1.阳光激励 2.续保用户 3.管理层 source: channelSource //1.阳光激励 2.续保用户 3.管理层
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
open: res.data, open: res.data,
isFlag:true isFlag: true
}) })
} }
...@@ -70,12 +60,14 @@ Page({ ...@@ -70,12 +60,14 @@ Page({
}, },
searchScoreSummaryData() { searchScoreSummaryData() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'); } = wx.p.storage.get('userInfo');
wx.p.api.withdrawalApi.searchScoreSummary({ wx.p.api.withdrawalApi.searchScoreSummary({
staffPhone, staffPhone: phone,
channelSource //1.阳光激励 2.续保用户 3.管理层 channelSource, //1.阳光激励 2.续保用户 3.管理层
merchantId: '44211227'
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
...@@ -92,30 +84,59 @@ Page({ ...@@ -92,30 +84,59 @@ Page({
let { let {
pageNum, pageNum,
total, total,
pageSize pageSize,
} = this.data; scoreList
} = this.data, {
phone,
channelSource,
} = wx.p.storage.get('userInfo');
wx.p.api.withdrawalApi.getScoreProfitList({ wx.p.api.withdrawalApi.getScoreProfitList({
staffPhone: '', staffPhone: phone,
channelSource: '', merchantId: '44211227',
channelSource,
pageSize, pageSize,
pageNum pageNum
}).then(res => { }).then(res => {
let data; let data, tempList;
if (res.code == 0) { if (res.code == 0) {
data = res.data?.list ? res.data?.list : [] data = res.data?.list ? res.data?.list : []
tempList = [...scoreList, ...data];
this.setData({
scoreList: pageNum == 1 ? data : tempList,
total: res.data.total,
triggered: false,
nothing: res.data.total == tempList.length,
})
} }
this.setData({
scoreList: pageNum == 1 ? data : [...scoreList, ...data],
total: res.data.count,
mineTrigger: false
})
}).catcn((err) => { }).catcn((err) => {
wx.p.wxApi.showToast(JSON.stringify(err)) wx.p.wxApi.showToast(JSON.stringify(err))
}) })
}, },
scrollonReachBottom() {
console.log(222)
let {
total,
scoreList,
pageNum
} = this.data;
if (total > scoreList.length) {
this.setData({
pageNum: pageNum + 1,
})
this.getScoreProfitListData()
} else {
}
},
toBank() { toBank() {
wx.p.router.go('/packageIndex/pages/bankAccount/list/list') const {
currentScore,
} = this.data.scoreSummary;
wx.p.router.go('/packageIndex/pages/bankAccount/list/list', {
score: currentScore
})
}, },
hidePopup() { hidePopup() {
this.setData({ this.setData({
...@@ -146,17 +167,17 @@ Page({ ...@@ -146,17 +167,17 @@ Page({
toCash() { toCash() {
const { const {
currentScore, currentScore,
} = this.data.scoreSummary,{ } = this.data.scoreSummary, {
staffBankFlag staffBankFlag
}=this.data; } = this.data;
if (staffBankFlag) { if (staffBankFlag) {
this.setData({ this.setData({
showAccountModal: true showAccountModal: true
}) })
return return
} }
wx.p.router.go('/packageIndex/pages/integral/withdrawal/withdrawal',{ wx.p.router.go('/packageIndex/pages/integral/withdrawal/withdrawal', {
score: currentScore score: currentScore
}) })
}, },
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<block wx:if="{{isFlag}}"> <block wx:if="{{isFlag}}">
<view class="integral-container {{!open?'bgF':''}}"> <view class="integral-container {{!open?'bgF':''}}">
<have-no-ope wx:if="{{open}}" scoreSummary="{{scoreSummary}}"> <have-no-ope wx:if="{{open}}" scoreSummary="{{scoreSummary}}">
<profit-list list="{{scoreList}}"></profit-list> <profit-list list="{{scoreList}}" triggered="{{triggered}}" nothing="{{nothing}}" bindscrollonReachBottom="scrollonReachBottom"></profit-list>
</have-no-ope> </have-no-ope>
<have-open wx:else scoreSummary="{{scoreSummary}}"> <have-open wx:else scoreSummary="{{scoreSummary}}">
<profit-list list="{{scoreList}}"></profit-list> <profit-list list="{{scoreList}}" triggered="{{triggered}}" nothing="{{nothing}}" bindscrollonReachBottom="scrollonReachBottom"></profit-list>
</have-open> </have-open>
</view> </view>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class='choose-box' bindtap="choose"> <view class='choose-box' bindtap="choose">
<view class='icon'> <view class='icon'>
<view class='un-check' wx:if="{{!agree}}"></view> <view class='un-check' wx:if="{{!agree}}"></view>
<glsx-image wx:else webp src="/integral/check-img.png" class="check-img"></glsx-image> <glsx-image wx:else webp src="/integral/check-img.png" class="check-img" mode="aspectFit"></glsx-image>
</view> </view>
</view> </view>
我已阅读并同意 我已阅读并同意
......
...@@ -23,54 +23,16 @@ Page({ ...@@ -23,54 +23,16 @@ Page({
text: '确认', text: '确认',
extClass: 'btn_primary' extClass: 'btn_primary'
}], }],
score: '10000', score: '0',
bankInfo: { bankInfo: { },
"id": 34, bankList: []
"staffId": 16550,
"bankUserName": "望周知",
"bankName": "中国邮政储蓄银行",
"bankNumber": "6555555555555555555",
"bankNum": "6555555588888*****5555",
"bankPhone": "18955555555",
"idCardNo": "341181199508252222",
"idCardFront": null,
"idCardBack": null,
"state": 1
},
bankList: [{
"id": 34,
"staffId": 16550,
"bankUserName": "望周知",
"bankName": "中国邮政储蓄银行",
"bankNumber": "6555555555555555555",
"bankPhone": "18955555555",
"idCardNo": "341181199508252222",
"idCardFront": null,
"idCardBack": null,
"state": 1
},
{
"id": 33,
"staffId": 16550,
"bankUserName": "望周知",
"bankName": "招商银行卡",
"bankNumber": "6555555555555555555",
"bankPhone": "18955555555",
"idCardNo": "341181199508253332",
"idCardFront": null,
"idCardBack": null,
"state": 1
}
]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(wx.p)
wx.p.router.getRouterParams().then(params => { wx.p.router.getRouterParams().then(params => {
console.log(params)
this.setData(params) this.setData(params)
}) })
this.getBankList() this.getBankList()
...@@ -83,12 +45,14 @@ Page({ ...@@ -83,12 +45,14 @@ Page({
}, },
async getBankList() { async getBankList() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'), } = wx.p.storage.get('userInfo'),
res = await wx.p.api.withdrawalApi.getStaffBankList({ res = await wx.p.api.withdrawalApi.getStaffBankList({
staffPhone, staffPhone:phone,
channelSource channelSource,
merchantId: '44211227',
merchantName: '波波单店'
}) })
console.log(res) console.log(res)
if (res.code == 0) { if (res.code == 0) {
...@@ -97,7 +61,6 @@ Page({ ...@@ -97,7 +61,6 @@ Page({
}) })
this.setData({ this.setData({
bankList: res.data || [], bankList: res.data || [],
flag: true,
bankInfo: res.data[0] bankInfo: res.data[0]
}, () => { }, () => {
//获取免责协议地址获取 //获取免责协议地址获取
...@@ -136,9 +99,13 @@ Page({ ...@@ -136,9 +99,13 @@ Page({
}) })
}, },
toSumbitData() { toSumbitData() {
let {sumbitScore,disclaimerAgreementUrl,bankInfo:{ let {
id sumbitScore,
} }=this.data; disclaimerAgreementUrl,
bankInfo: {
id
}
} = this.data;
if (!sumbitScore) return wx.p.wxApi.showToast('请输入提现积分') if (!sumbitScore) return wx.p.wxApi.showToast('请输入提现积分')
const checkAgree = this.checkAgree() const checkAgree = this.checkAgree()
if (checkAgree) return false if (checkAgree) return false
...@@ -244,6 +211,11 @@ Page({ ...@@ -244,6 +211,11 @@ Page({
} }
return false return false
}, },
authChoose(e) {
this.setData({
agree: e.detail
})
},
agreeEvent(e) { agreeEvent(e) {
console.log(e) console.log(e)
let { let {
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
padding: 24rpx 0 22rpx 0; padding: 24rpx 0 22rpx 0;
border-bottom: 2rpx solid #E6E6E6; border-bottom: 2rpx solid #E6E6E6;
position: relative; position: relative;
box-sizing: border-box;
.symbol { .symbol {
font-weight: 700; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
.int_widget { .int_widget {
width: 400rpx; width: 400rpx;
height: 66rpx;
} }
.placeStyle { .placeStyle {
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
font-weight: 500; font-weight: 500;
font-size: 48rpx; font-size: 48rpx;
color: #333333; color: #333333;
height:66rpx;
} }
.allbtn { .allbtn {
......
...@@ -4,56 +4,28 @@ Page({ ...@@ -4,56 +4,28 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
detailInfo: { detailInfo: {}
"id": 2104706,
"staffName": "姚孝章",
"staffUuid": "e3db30afe9ac4a1f90a7328e5b7d914d",
"staffPhone": "13650810420",
"rewardScore": 29910.12,
"businessScene": null,
"merchantName": "xiejq4S店-16",
"activityName": null,
"channel": null,
"missionName": null,
"rewardTime": 1753432085000,
"type": 0,
"infoName": "积分收益",
"updatedTime": "2025-07-25 16:27:45",
"operator": null,
"remark": null,
"relationRemark": null,
"relateId": null,
"activityId": null,
"staffId": 16550,
"missionId": null,
"isWithdrawal": 3,
"exchangeStatus": null,
"exchangeTime": null,
"exchangeStaff": null,
"source": 1,
"motivationId": 2461,
"currentTotalScore": 20932.19,
"finalTotalScore": 50842.31,
"withdrawalId": null,
"customerName": "1386565649494949",
"customerPhone": "13836868686",
"orderCode": "250725162718883",
"goodsName": "11111,11111,11111,广联单帖侧窗,广联前挡,第三方前档,第三方中天窗,太阳膜精品满数据多规格,太阳膜精品满数据多规格,太阳膜精品满数据多规格,太阳膜精品满数据多规格,太阳膜A类,太阳膜B类,太阳膜C类,太阳膜D类,太阳膜F类,太阳膜H类,验证系列1,验证系列2,测试单品1,多规格太阳膜商品,改色膜测试",
"failType": null,
"failTime": null,
"failRemark": null,
"withdrawalTime": null,
"staffSource": 0,
"refundType": null,
"orderMoney": 300906
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options) wx.p.router.getRouterParams().then(params => {
wx.p.api.withdrawalApi.getScoreDetail({
id: params.id
}).then(res => {
if(res.code ==0){
this.setData({
detailInfo: res.data
})
}
}).catch(err=>{
wx.p.wxApi.showToast(String(JSON.stringify(error)))
})
})
}, },
/** /**
...@@ -74,17 +46,7 @@ Page({ ...@@ -74,17 +46,7 @@ Page({
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
wx.p.router.getRouterParams().then(params => {
wx.p.api.withdrawalApi.getScoreDetail({
id: params.id
}).then(res => {
this.setData({
detailInfo: res
})
}).catch(err=>{
wx.p.wxApi.showToast(String(JSON.stringify(error)))
})
})
}, },
......
...@@ -3,8 +3,8 @@ Page({ ...@@ -3,8 +3,8 @@ Page({
data: { data: {
STATUSICON: ['waiteing', 'comlpete', 'fail', 'ht'], STATUSICON: ['waiteing', 'comlpete', 'fail', 'ht'],
STATUSTEXT: ['处理中', '提现成功', '提现成功', '后台核销'], STATUSTEXT: ['处理中', '提现成功', '提现成功', '后台核销'],
pageSize:1, pageSize: 1,
pageNum:9999, pageNum: 9999,
listData: [], listData: [],
isNoResult: false isNoResult: false
}, },
...@@ -25,120 +25,52 @@ Page({ ...@@ -25,120 +25,52 @@ Page({
onLoad(options) { onLoad(options) {
this.getScoreWithdrawalPage() 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": 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() { getScoreWithdrawalPage() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'), } = wx.p.storage.get('userInfo'), {
{pageNum,pageSize}=this.data; pageNum,
pageSize
} = this.data;
wx.p.api.withdrawalApi.getScoreWithdrawalPage({ wx.p.api.withdrawalApi.getScoreWithdrawalPage({
staffPhone, staffPhone:phone,
channelSource, channelSource,
merchantId: '44211227',
// staffPhone: 15626599735,
// channelSource: 1,
pageNum, pageNum,
pageSize pageSize
}).then(res => { }).then(res => {
console.log(res)
if (res.code == 0) { if (res.code == 0) {
res.list.map(item => { res.data.list.map((item)=>{
if (item.status == 3) { item.list.map(item2 => {
item.iconType = 1 if (item2.status == 3) {
} else if (item.status == 4) { item2.iconType = 1
item.iconType = 2 } else if (item2.status == 4) {
} else { item2.iconType = 2
item.iconType = 0 } else {
} item2.iconType = 0
if (item.type == 2) { }
item.iconType = 3 if (item2.type == 2) {
} item2.iconType = 3
if (item.type == 3 && item.bankNumber) { }
item.bankNumber = item.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1') if (item2.type == 3 && item2.bankNumber) {
} item2.bankNumber = item2.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
return item }
return item2
})
}) })
} }
// } // }
let flag = res.list.length ? false : true let flag = res.data.list.length ? false : true
this.setData({ this.setData({
listData: res.list || [], listData: res.data.list || [],
isNoResult: flag isNoResult: flag
}) })
}) })
......
...@@ -4,9 +4,14 @@ page { ...@@ -4,9 +4,14 @@ page {
} }
.container { .container {
padding: 40rpx 0; // padding: 40rpx 0;
}
.year{
font-weight: 500;
line-height: 48rpx;
font-size: 36rpx;
margin-bottom:24rpx;
} }
.title_widget { .title_widget {
margin-bottom: 38rpx; margin-bottom: 38rpx;
......
...@@ -2,20 +2,22 @@ ...@@ -2,20 +2,22 @@
<view class="container isFullSucreen"> <view class="container isFullSucreen">
<view wx:if="{{!isNoResult}}" class="list"> <view wx:if="{{!isNoResult}}" class="list">
<block wx:for="{{listData}}" wx:key="index"> <block wx:for="{{listData}}" wx:key="index">
<view class="element"> <view class="item">
<view class="status {{STATUSICON[item.iconType]}}">{{STATUSTEXT[item.iconType]}}</view> <view class="year">{{item.year}}年</view>
<block wx:if="{{item.type == 3}}"> <view class="element" wx:for="{{item.list}}" wx:for-index="idx" wx:for-item="i" wx:key="idx">
<view class="status {{STATUSICON[i.iconType]}}">{{STATUSTEXT[i.iconType]}}</view>
<block wx:if="{{i.type == 3}}">
<view class="bank-info"> <view class="bank-info">
<view class="name"> <view class="name">
{{item.bankName || ''}}({{item.bankUserName|| ''}}) {{i.bankName || ''}}({{i.bankUserName|| ''}})
</view> </view>
<view class="card-no"> <view class="card-no">
{{item.bankNumber|| ''}} {{i.bankNumber|| ''}}
</view> </view>
</view> </view>
</block> </block>
<view class="countText flex"> <view class="countText flex">
-{{item.withdrawalScore}} -{{i.withdrawalScore}}
<!-- <block wx:if="{{item.status == 4&&item.failReason}}"> <!-- <block wx:if="{{item.status == 4&&item.failReason}}">
<view class="type flex"> <view class="type flex">
<view class="failReason">{{item.failReason}} </view> <view class="failReason">{{item.failReason}} </view>
...@@ -32,10 +34,12 @@ ...@@ -32,10 +34,12 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="date_wrap flex_scb"> <view class="date_wrap flex_scb">
<view class="dateText">{{item.type == -1 ?'兑换':'申请'}}时间:{{item.withdrawalTime || ''}}</view> <view class="dateText">{{item.type == -1 ?'兑换':'申请'}}时间:{{i.withdrawalTime || ''}}</view>
<view wx:if="{{item.successTime}}" class="dateText">完成时间:{{item.successTime || ''}}</view> <view wx:if="{{i.successTime}}" class="dateText">完成时间:{{i.successTime || ''}}</view>
</view> </view>
</view> </view>
</view>
</block> </block>
</view> </view>
<!-- <van-empty wx:if="{{isNoResult}}" description="暂无兑换记录" /> <!-- <van-empty wx:if="{{isNoResult}}" description="暂无兑换记录" />
......
...@@ -7,14 +7,6 @@ Page({ ...@@ -7,14 +7,6 @@ Page({
data: { data: {
showConfirmDialog: false, showConfirmDialog: false,
taxRateObj: { taxRateObj: {
withdrawalScore: 1000,
totalWithdrawalScore: 2000,
month: 2,
totalIncomeWithoutSalary: 2100,
taxRateWithoutSalary:3,
totalIncomeWithSalary: 33322,
taxRateWithSalary: 10,
baseIncome: 8989
}, },
confirmButtons: [{ confirmButtons: [{
text: '取消', text: '取消',
...@@ -36,15 +28,16 @@ Page({ ...@@ -36,15 +28,16 @@ Page({
}, },
getTaxRate() { getTaxRate() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'), { } = wx.p.storage.get('userInfo'), {
sumbitScore sumbitScore
} = this.data; } = this.data;
wx.p.api.WithdrawalApi.getTaxRate({ wx.p.api.withdrawalApi.getTaxRate({
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
staffPhone, staffPhone:phone,
channelSource channelSource,
merchantId: '44211227',
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
...@@ -85,17 +78,17 @@ Page({ ...@@ -85,17 +78,17 @@ Page({
let { let {
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankInfo: { bankId
id
}
} = this.data; } = this.data;
if (this.submit) return if (this.submit) return
this.submit = true this.submit = true
wx.p.wxApi.showLoading('提交中') wx.p.wxApi.showLoading('提交中')
wx.p.api.WithdrawalApi.saveWithdrawal({ wx.p.api.withdrawalApi.saveWithdrawal({
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId: id bankId,
merchantId: '44211227',
merchantName: '波波单店'
}).then(res => { }).then(res => {
wx.p.wxApi.hideLoading(); wx.p.wxApi.hideLoading();
if (res.code == 0) { if (res.code == 0) {
......
...@@ -9,11 +9,11 @@ Page({ ...@@ -9,11 +9,11 @@ Page({
data: { data: {
navStyle: "background-color: transparent;", navStyle: "background-color: transparent;",
scoreSummary: { scoreSummary: {
currentScore: 34532233.00, //当前积分 currentScore: '-', //当前积分
bankCardSize: 4, bankCardSize: '-',
totalGoodExchangeScore: 100, //累计兑换积分 totalGoodExchangeScore: '-', //累计兑换积分
totalRewardScore: 200, //累计收益积分 totalRewardScore: '-', //累计收益积分
totalWithdrawalScore: 400, //累计提现积分 totalWithdrawalScore: '-', //累计提现积分
}, },
toolList: ToolList, toolList: ToolList,
guideList: [{ guideList: [{
...@@ -40,17 +40,16 @@ Page({ ...@@ -40,17 +40,16 @@ Page({
}, },
searchScoreSummaryData() { searchScoreSummaryData() {
const { const {
staffPhone, phone,
channelSource channelSource
} = wx.p.storage.get('userInfo'); } = this.data.userInfo
wx.p.api.withdrawalApi.searchScoreSummary({ wx.p.api.withdrawalApi.searchScoreSummary({
staffPhone, staffPhone:phone,
channelSource //1.阳光激励 2.续保用户 3.管理层 channelSource //1.阳光激励 2.续保用户 3.管理层
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
scoreSummary: res.data, scoreSummary: res.data
staffBankFlag: !res.data.bankCardSize
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!