Commit 9cd79a74 by wangzhihui

积分jie'k

1 parent 9c79d042
...@@ -67,5 +67,9 @@ module.exports = { ...@@ -67,5 +67,9 @@ module.exports = {
/**开通积分钱包 */ /**开通积分钱包 */
openPointsWallet(data){ openPointsWallet(data){
return api.fetch('scrm.api.shopmall.pointswallet.open',data) return api.fetch('scrm.api.shopmall.pointswallet.open',data)
},
/**检查银行卡身份信息 */
checkbankConfig(data){
return api.fetch('scrm.api.shopmall.score.bank.check.config',data)
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -106,13 +106,15 @@ Page({ ...@@ -106,13 +106,15 @@ Page({
return new Promise((resolve) => { return new Promise((resolve) => {
const { const {
channelSource, channelSource,
phone phone,
merchantId,
merchantName
} = this.data.userInfo; } = this.data.userInfo;
wx.p.api.withdrawalApi.getConfig({ wx.p.api.withdrawalApi.getConfig({
channelSource, channelSource,
staffPhone: phone, staffPhone: phone,
merchantId: '44211227', merchantId,
merchantName: '波波单店' merchantName
}).then(res => { }).then(res => {
console.log(res) console.log(res)
if (res.code == 0) { if (res.code == 0) {
...@@ -328,7 +330,9 @@ Page({ ...@@ -328,7 +330,9 @@ Page({
formData, formData,
userInfo: { userInfo: {
phone, phone,
channelSource channelSource,
merchantId,
merchantName
}, },
checkRepeatFlag checkRepeatFlag
} = this.data, { } = this.data, {
...@@ -347,8 +351,8 @@ Page({ ...@@ -347,8 +351,8 @@ Page({
formData.checkRepeatFlag = checkRepeatFlag formData.checkRepeatFlag = checkRepeatFlag
formData.staffPhone = phone formData.staffPhone = phone
formData.channelSource = channelSource formData.channelSource = channelSource
formData.merchantId = '44211227', formData.merchantId = merchantId
formData.merchantName = '波波单店' formData.merchantName = merchantName
const { const {
code, code,
message, message,
......
...@@ -23,15 +23,16 @@ Page({ ...@@ -23,15 +23,16 @@ Page({
const { const {
phone, phone,
channelSource channelSource,
merchantId,
merchantName
} = 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: phone, staffPhone: phone,
channelSource, channelSource,
merchantId: '44211227', merchantId,
merchantName: '波波单店' merchantName
}) })
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')
......
...@@ -49,7 +49,6 @@ Component({ ...@@ -49,7 +49,6 @@ Component({
*/ */
methods: { methods: {
go(e){ go(e){
console.log(e)
let {index} =e.currentTarget.dataset; let {index} =e.currentTarget.dataset;
const thisPage = wx.p.router.getPageInstance() const thisPage = wx.p.router.getPageInstance()
let arr=[ let arr=[
......
...@@ -43,6 +43,10 @@ Component({ ...@@ -43,6 +43,10 @@ Component({
{ {
text: '累计兑换', text: '累计兑换',
key:'totalGoodExchangeScore', key:'totalGoodExchangeScore',
},
{
text: '累计转赠',
key:'-',
} }
], ],
}, },
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</view> </view>
<view class="accumulative-content flex"> <view class="accumulative-content flex">
<view wx:for="{{havoData}}" wx:key="index" wx:for-item="i" class="c-item"> <view wx:for="{{havoData}}" wx:key="index" wx:for-item="i" class="c-item">
<view class="value">{{scoreSummary[i.key]}}</view> <view class="value">{{scoreSummary[i.key]||'-'}}</view>
<view class="text">{{i.text}}</view> <view class="text">{{i.text}}</view>
</view> </view>
</view> </view>
......
...@@ -17,7 +17,7 @@ Page({ ...@@ -17,7 +17,7 @@ Page({
totalRewardScore: 200, //累计收益积分 totalRewardScore: 200, //累计收益积分
totalWithdrawalScore: 400, //累计提现积分 totalWithdrawalScore: 400, //累计提现积分
}, },
open: true, open: false,
staffBankFlag: false, staffBankFlag: false,
showAccountModal: false, showAccountModal: false,
pageSize: 10, pageSize: 10,
...@@ -30,27 +30,30 @@ Page({ ...@@ -30,27 +30,30 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
let userInfo = wx.p.storage.get('userInfo') let userInfo = wx.p.storage.get('userInfo');
this.setData({ this.setData({
userInfo userInfo
}) })
//是否开通 //是否开通
await this.openPointsWallet() await this.getPointsWalletData()
this.searchScoreSummaryData() this.searchScoreSummaryData()
this.getScoreProfitListData() this.getScoreProfitListData()
}, },
openPointsWallet() { getPointsWalletData() {
const { const {
phone, phone,
nickName,
channelSource channelSource
} = this.data.userInfo; } = this.data.userInfo;
wx.p.api.withdrawalApi.openPointsWallet({
wx.p.api.common.getPointsWalletData({
name: nickName,
phone, phone,
scoreSource: channelSource //1.阳光激励 2.续保用户 3.管理层 scoreSource: 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 ? true : false,
isFlag: true isFlag: true
}) })
} }
...@@ -81,22 +84,25 @@ Page({ ...@@ -81,22 +84,25 @@ Page({
}) })
}, },
//更新开通状态 //更新开通状态
update(){ update() {
this.openPointsWallet() this.getPointsWalletData()
}, },
jump() { jump() {
wx.p.router.go('/packageIndex/pages/integral/withdrawalNote/withdrawalNote') wx.p.router.go('/packageIndex/pages/integral/withdrawalNote/withdrawalNote')
}, },
searchScoreSummaryData() { searchScoreSummaryData() {
const { const {
phone, userInfo: {
channelSource phone,
channelSource,
merchantId
}
} = this.data.userInfo; } = this.data;
wx.p.api.withdrawalApi.searchScoreSummary({ wx.p.api.withdrawalApi.searchScoreSummary({
staffPhone: phone, staffPhone: phone,
channelSource, //1.阳光激励 2.续保用户 3.管理层 channelSource, //1.阳光激励 2.续保用户 3.管理层
merchantId: '44211227' merchantId
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
...@@ -114,14 +120,16 @@ Page({ ...@@ -114,14 +120,16 @@ Page({
pageNum, pageNum,
total, total,
pageSize, pageSize,
scoreList scoreList,
} = this.data, { userInfo:{
phone, phone,
channelSource, channelSource,
} = this.data.userInfo; merchantId
}
} = this.data;
wx.p.api.withdrawalApi.getScoreProfitList({ wx.p.api.withdrawalApi.getScoreProfitList({
staffPhone: phone, staffPhone: phone,
merchantId: '44211227', merchantId,
channelSource, channelSource,
pageSize, pageSize,
pageNum pageNum
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!--积分中心 --> <!--积分中心 -->
<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}}" triggered="{{triggered}}" nothing="{{nothing}}" bindscrollonReachBottom="scrollonReachBottom"></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}}">
......
...@@ -58,7 +58,7 @@ Component({ ...@@ -58,7 +58,7 @@ Component({
console.log(e) console.log(e)
// let { url } = e.currentTarget.dataset // let { url } = e.currentTarget.dataset
// const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/' // const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${url}` const path = `${this.data.url}`
// private user // private user
wx.navigateTo({ wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}` url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
......
...@@ -7,6 +7,7 @@ Page({ ...@@ -7,6 +7,7 @@ Page({
data: { data: {
navStyle: "background-color: transparent;", navStyle: "background-color: transparent;",
agree: false, agree: false,
isConfig: true,
showAuthDialog: false, showAuthDialog: false,
showConfirmDialog: false, showConfirmDialog: false,
sumbitScore: '', sumbitScore: '',
...@@ -24,7 +25,7 @@ Page({ ...@@ -24,7 +25,7 @@ Page({
extClass: 'btn_primary' extClass: 'btn_primary'
}], }],
score: '0', score: '0',
bankInfo: { }, bankInfo: {},
bankList: [] bankList: []
}, },
...@@ -46,15 +47,16 @@ Page({ ...@@ -46,15 +47,16 @@ Page({
async getBankList() { async getBankList() {
const { const {
phone, phone,
channelSource channelSource,
merchantId,
merchantName
} = 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:phone, staffPhone: phone,
channelSource, channelSource,
merchantId: '44211227', merchantId,
merchantName: '波波单店' merchantName
}) })
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')
...@@ -63,12 +65,27 @@ Page({ ...@@ -63,12 +65,27 @@ Page({
bankList: res.data || [], bankList: res.data || [],
bankInfo: res.data[0] bankInfo: res.data[0]
}, () => { }, () => {
this.checkbankConfig()
//获取免责协议地址获取 //获取免责协议地址获取
this.getAgreementUrl() this.getAgreementUrl()
}) })
} }
}, },
checkbankConfig() {
let {
bankInfo
} = this.data;
wx.p.api.withdrawalApi.checkbankConfig({
id: bankInfo.id
}).then(res => {
if (res.code == 0) {
this.setData({
isConfig: res.data
})
}
})
},
getAgreementUrl() { getAgreementUrl() {
let { let {
bankInfo bankInfo
...@@ -95,20 +112,46 @@ Page({ ...@@ -95,20 +112,46 @@ Page({
this.setData({ this.setData({
bankInfo bankInfo
}, () => { }, () => {
this.checkbankConfig()
this.getAgreementUrl() this.getAgreementUrl()
}) })
}, },
updateBankConfig() {
let {
bankInfo,
score
} = this.data;
wx.showModal({
title: '提示',
content: '请上传您持卡人对应的身份证正反面照片!',
confirmText: '确定',
cancelText: '知道了',
confirmColor: '#F13C3D'
}).then(res => {
if (res.confirm) {
wx.p.router.go('/packageIndex/pages/bankAccount/add/add', {
item: bankInfo,
score
})
}
})
},
toSumbitData() { toSumbitData() {
let { let {
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankInfo: { bankInfo: {
id id
} },
isConfig
} = this.data; } = 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
if (isConfig) {
this.updateBankConfig()
return false
}
const money = this.accSub(Number(sumbitScore), 0) const money = this.accSub(Number(sumbitScore), 0)
if (money <= 0) return wx.p.wxApi.showToast(`您的积分不足,请确认后重新申请兑换`) if (money <= 0) return wx.p.wxApi.showToast(`您的积分不足,请确认后重新申请兑换`)
wx.p.router.go('/packageIndex/pages/integral/withdrawalRules/withdrawalRules', { wx.p.router.go('/packageIndex/pages/integral/withdrawalRules/withdrawalRules', {
......
...@@ -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: 9999,
pageNum: 9999, pageNum: 1,
listData: [], listData: [],
isNoResult: false isNoResult: false
}, },
...@@ -30,7 +30,8 @@ Page({ ...@@ -30,7 +30,8 @@ Page({
getScoreWithdrawalPage() { getScoreWithdrawalPage() {
const { const {
phone, phone,
channelSource channelSource,
merchantId
} = wx.p.storage.get('userInfo'), { } = wx.p.storage.get('userInfo'), {
pageNum, pageNum,
pageSize pageSize
...@@ -38,7 +39,7 @@ Page({ ...@@ -38,7 +39,7 @@ Page({
wx.p.api.withdrawalApi.getScoreWithdrawalPage({ wx.p.api.withdrawalApi.getScoreWithdrawalPage({
staffPhone:phone, staffPhone:phone,
channelSource, channelSource,
merchantId: '44211227', merchantId,
// staffPhone: 15626599735, // staffPhone: 15626599735,
// channelSource: 1, // channelSource: 1,
pageNum, pageNum,
......
{ {
"usingComponents": { "usingComponents": {
}, },
"navigationBarTitleText":"兑换记录" "navigationBarTitleText":"我的提现"
} }
\ No newline at end of file \ No newline at end of file
...@@ -59,7 +59,8 @@ Page({ ...@@ -59,7 +59,8 @@ Page({
getTaxRate() { getTaxRate() {
const { const {
phone, phone,
channelSource channelSource,
merchantId
} = wx.p.storage.get('userInfo'), { } = wx.p.storage.get('userInfo'), {
sumbitScore sumbitScore
} = this.data; } = this.data;
...@@ -67,7 +68,7 @@ Page({ ...@@ -67,7 +68,7 @@ Page({
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
staffPhone: phone, staffPhone: phone,
channelSource, channelSource,
merchantId: '44211227', merchantId
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
...@@ -79,7 +80,7 @@ Page({ ...@@ -79,7 +80,7 @@ Page({
}) })
}, },
goMall() { goMall() {
wx.p.router.redirectTo('/pages/tab/index/index') wx.p.router.reLaunch('/pages/tab/index/index')
}, },
policyDetail() { policyDetail() {
wx.p.router.jumpH5(`https://fgk.chinatax.gov.cn/zcfgk/c100012/c5241472/content.html`) wx.p.router.jumpH5(`https://fgk.chinatax.gov.cn/zcfgk/c100012/c5241472/content.html`)
...@@ -109,7 +110,12 @@ Page({ ...@@ -109,7 +110,12 @@ Page({
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId bankId
} = this.data; } = this.data,{
phone,
channelSource,
merchantId,
merchantName
} = wx.p.storage.get('userInfo');
if (this.submit) return if (this.submit) return
this.submit = true this.submit = true
wx.p.wxApi.showLoading('提交中') wx.p.wxApi.showLoading('提交中')
...@@ -117,8 +123,10 @@ Page({ ...@@ -117,8 +123,10 @@ Page({
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId, bankId,
merchantId: '44211227', merchantId,
merchantName: '波波单店' merchantName,
channelSource:channelSource,
staffPhone:phone,
}).then(res => { }).then(res => {
wx.p.wxApi.hideLoading(); wx.p.wxApi.hideLoading();
if (res.code == 0) { if (res.code == 0) {
......
...@@ -10,10 +10,10 @@ Page({ ...@@ -10,10 +10,10 @@ Page({
}) })
}, },
toWatchNote(){ toWatchNote(){
// wx.p.router.go('/packageStoreAssistant/packageMine/pages/withdrawalNote/withdrawalNote') wx.p.router.go('/packageIndex/pages/integral/withdrawalNote/withdrawalNote')
}, },
toBackMine(){ toBackMine(){
// wx.p.router.reLaunch('/pages/tab/storeAssistant/index?tabIndex=2') wx.p.router.reLaunch('/packageIndex/pages/integral/index/index')
} }
}) })
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!