Commit d7402be0 by wangzhihui

积分

1 parent 4c11ee9f
...@@ -50,6 +50,10 @@ Component({ ...@@ -50,6 +50,10 @@ Component({
type: String, type: String,
value: '' value: ''
}, },
bodyColor:{
type: String,
value: ''
}
}, },
/** /**
......
<view class="popup " hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup " hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}"> <view class="popup-content {{close?'close':''}}" style="height:{{height}};background:{{bodyColor}}">
<block wx:if="{{title}}"> <block wx:if="{{title}}">
<view class="popup-title text-center" style="background:{{headerColor}}">{{title}} <view class="popup-title text-center" style="background:{{headerColor}}">{{title}}
<view class="popup-close" wx:if="{{showCloseButton}}" bindtap="hidePopup"> <view class="popup-close" wx:if="{{showCloseButton}}" bindtap="hidePopup">
......
...@@ -157,7 +157,6 @@ Page({ ...@@ -157,7 +157,6 @@ Page({
}) })
}, },
repeatConfirm(e) { repeatConfirm(e) {
console.log(e.detail)
let { let {
value value
} = e.detail } = e.detail
...@@ -188,9 +187,9 @@ Page({ ...@@ -188,9 +187,9 @@ Page({
this.setData({ this.setData({
[`formData.${key}`]: '' [`formData.${key}`]: ''
}) })
this.check()
}, },
async upload(e) { async upload(e) {
console.log(1111)
const { const {
item: { item: {
key, key,
......
...@@ -10,6 +10,10 @@ Component({ ...@@ -10,6 +10,10 @@ Component({
observer(n){ observer(n){
} }
},
userInfo:{
type:Object,
value: {},
} }
}, },
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="have-open"> <view class="have-open">
<view class="my-integral"> <view class="my-integral">
<view class="title --fontColor flex"> <view class="title --fontColor flex">
<glsx-image webp src="/integral/logo.png" class="gold"></glsx-image>宋慧的总积分 <glsx-image webp src="/integral/logo.png" class="gold"></glsx-image>{{userInfo.nickName}}的总积分
</view> </view>
<view class="integral"> <view class="integral">
{{scoreSummary.currentScore}} {{scoreSummary.currentScore}}
......
...@@ -32,17 +32,18 @@ Component({ ...@@ -32,17 +32,18 @@ Component({
*/ */
methods: { methods: {
handleDetail(e) { handleDetail(e) {
console.log(e)
let { let {
id, id,
infoname infoname,
channelsource
} = e.currentTarget.dataset; } = e.currentTarget.dataset;
if (infoname == '购物兑换' || infoname == '售后返还') { if (infoname == '购物兑换' || infoname == '售后返还') {
return return
} }
wx.p.router.go( wx.p.router.go(
'/packageIndex/pages/integral/withdrawalDetail/withdrawalDetail', { '/packageIndex/pages/integral/withdrawalDetail/withdrawalDetail', {
id id,
channelSource:channelsource
} }
); );
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<block wx:if="{{list.length}}"> <block wx:if="{{list.length}}">
<scroll-view class="list_data_widget" scroll-y="{{true}}" bindrefresherrefresh="bindrefresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}"> <scroll-view class="list_data_widget" scroll-y="{{true}}" bindrefresherrefresh="bindrefresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" refresher-triggered="{{triggered}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<view class="element" bind:tap="handleDetail" data-id="{{item.id}}" data-infoName="{{item.infoName}}"> <view class="element" bind:tap="handleDetail" data-id="{{item.id}}" data-infoName="{{item.infoName}}" data-channelSource="{{item.channelSource}}">
<view class="title">{{item.infoName}} <view class="title">{{item.infoName}}
<view class="right-icon-box"> <view class="right-icon-box">
</view> </view>
......
...@@ -11,11 +11,11 @@ Page({ ...@@ -11,11 +11,11 @@ Page({
triggered: true, triggered: true,
isFlag: true, isFlag: true,
scoreSummary: { scoreSummary: {
currentScore: 345333.00, //当前积分 currentScore: '', //当前积分
bankCardSize: 4, bankCardSize: '',
totalGoodExchangeScore: 100, //累计兑换积分 totalGoodExchangeScore: '', //累计兑换积分
totalRewardScore: 200, //累计收益积分 totalRewardScore: '', //累计收益积分
totalWithdrawalScore: 400, //累计提现积分 totalWithdrawalScore: '', //累计提现积分
}, },
open: false, open: false,
staffBankFlag: false, staffBankFlag: false,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<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}}" userInfo="{{userInfo}}">
<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-open> </have-open>
......
// packageIndex/pages/integral/withdrawal/components/PickerBankCard/PickerBankCard.js
Component({
/**
* 组件的属性列表
*/
properties: {
showBank:{
type: Boolean,
value: true,
},
bankList:{
type:Array,
value:[]
}
},
/**
* 组件的初始数据
*/
data: {
activeIndex:0
},
/**
* 组件的方法列表
*/
methods: {
pickerBankCard(e){
console.log(e)
let {index,item} = e.currentTarget.dataset;
this.setData({
activeIndex:index
})
this.triggerEvent('PickerChange',item)
},
goBank(){
const thisPage = wx.p.router.getPageInstance()
thisPage.goBank()
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/integral/withdrawal/components/PickerBankCard/PickerBankCard.wxss */
.box {
background: #FFFFFF;
border-radius: 24rpx;
margin: 32rpx;
}
.content {
height: 528rpx;
overflow-y: auto;
.content-item {
padding: 24rpx 32rpx;
border-bottom: 4rpx solid #F0F0F0;
position:relative;
.bankName {
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-bottom: 8rpx;
}
.bankNum {
font-weight: 400;
font-size: 24rpx;
color: #858A94;
line-height: 36rpx;
}
.check {
width: 32rpx;
height: 32rpx;
position: absolute;
top:25rpx;
right:18rpx;
}
}
}
.add-box {
padding: 24rpx 32rpx;
display: flex;
align-items: center;
position: relative;
.card-bag {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.title {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.arrow {
position: absolute;
top: 24rpx;
right: 32rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/integral/withdrawal/components/PickerBankCard/PickerBankCard.wxml-->
<popup show="{{showBank}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" bodyColor="#F7F7F7" title="选择到账银行卡" bindconfirm="onConfirmPopup" height="800rpx;">
<view class='box'>
<view class="content">
<view class="content-item" wx:for="{{bankList}}" key="index" data-item="{{item}}" data-index="{{index}}" bind:tap="pickerBankCard">
<view class="bankName">{{item.bankName}}</view>
<view class="bankNum">{{item.bankNum}}({{item.bankUserName}})</view>
<block wx:if="{{activeIndex == index}}">
<glsx-image webp src="/integral/check.png" class="check"></glsx-image>
</block>
</view>
</view>
<view class="add-box" bind:tap="goBank">
<glsx-image webp src="/integral/card-bag.png" class="card-bag"></glsx-image>
<view class="title">添加银行卡提现</view>
<mp-icon icon="arrow" color="#B1B1B3" class="arrow" size="{{12}}"></mp-icon>
</view>
</view>
</popup>
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
*/ */
data: { data: {
navStyle: "background-color: transparent;", navStyle: "background-color: transparent;",
showBank: true,
agree: false, agree: false,
isConfig: true, isConfig: true,
showAuthDialog: false, showAuthDialog: false,
...@@ -102,15 +103,16 @@ Page({ ...@@ -102,15 +103,16 @@ Page({
wx.p.wxApi.showToast(err) wx.p.wxApi.showToast(err)
}) })
}, },
showBankModel() {
this.setData({
showBank: true
})
},
bindPickerChange(e) { bindPickerChange(e) {
console.log(e.detail) let bankInfo = e.detail
const {
value
} = e.detail
let bankInfo = this.data.bankList[value]
bankInfo.bankNum = bankInfo.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
this.setData({ this.setData({
bankInfo bankInfo,
showBank: false
}, () => { }, () => {
this.checkbankConfig() this.checkbankConfig()
this.getAgreementUrl() this.getAgreementUrl()
...@@ -124,8 +126,8 @@ Page({ ...@@ -124,8 +126,8 @@ Page({
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '请上传您持卡人对应的身份证正反面照片!', content: '请上传您持卡人对应的身份证正反面照片!',
confirmText: '确定', confirmText: '确认上传',
cancelText: '知道了', cancelText: '取消',
confirmColor: '#F13C3D' confirmColor: '#F13C3D'
}).then(res => { }).then(res => {
if (res.confirm) { if (res.confirm) {
...@@ -136,6 +138,14 @@ Page({ ...@@ -136,6 +138,14 @@ Page({
} }
}) })
}, },
goBank(){
let {
score
} = this.data;
wx.p.router.go('/packageIndex/pages/bankAccount/add/add', {
score
})
},
toSumbitData() { toSumbitData() {
let { let {
sumbitScore, sumbitScore,
......
{ {
"usingComponents": { "usingComponents": {
"auth-setting": "./components/authSetting/authSetting" "auth-setting": "./components/authSetting/authSetting",
"picker-bank-card":"./components/PickerBankCard/PickerBankCard"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText":"积分提现" "navigationBarTitleText":"积分提现"
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
<view class="bank-wrap"> <view class="bank-wrap">
<view class="text">提现至:</view> <view class="text">提现至:</view>
<view class="select"> <view class="select">
<picker bindchange="bindPickerChange" range-key="bankName" range="{{bankList}}"> <view bind:tap="showBankModel" range-key="bankName" range="{{bankList}}">
<view class="bankName">{{bankInfo.bankName}}</view> <view class="bankName">{{bankInfo.bankName}}</view>
<view class="bankNumber">{{bankInfo.bankNum}}</view> <view class="bankNumber">{{bankInfo.bankNum}}</view>
<mp-icon class="icon-right" icon="arrow" size="{{13}}" color="#333333"></mp-icon> <mp-icon class="icon-right" icon="arrow" size="{{13}}" color="#333333"></mp-icon>
</picker> </view>
</view> </view>
</view> </view>
<view class="auth_box"> <view class="auth_box">
...@@ -51,4 +51,5 @@ ...@@ -51,4 +51,5 @@
<text catchtap="jump" data-url="privacy">《免责协议》</text> <text catchtap="jump" data-url="privacy">《免责协议》</text>
</view> </view>
</Dialog> </Dialog>
<picker-bank-card showBank="{{showBank}}" bankList="{{bankList}}" bindPickerChange="bindPickerChange"></picker-bank-card>
...@@ -12,13 +12,14 @@ Page({ ...@@ -12,13 +12,14 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
wx.p.router.getRouterParams().then(params => { wx.p.router.getRouterParams().then(params => {
console.log(params)
wx.p.api.withdrawalApi.getScoreDetail({ wx.p.api.withdrawalApi.getScoreDetail({
id: params.id id: params.id
}).then(res => { }).then(res => {
if(res.code ==0){ if(res.code ==0){
this.setData({ this.setData({
detailInfo: res.data detailInfo: res.data,
channelSource:params.channelSource
}) })
} }
......
<!--packageStoreAssistant/packageMine/pages/withdrawalDetail/withdrawalDetail.wxml--> <!--packageStoreAssistant/packageMine/pages/withdrawalDetail/withdrawalDetail.wxml-->
<view class="container"> <view class="container">
<view class="box"> <view class="box">
<view class="title">关联订单信息</view> <view class="title">{{detailInfo.infoName=='积分收益'&&(channelSource==2||channelSource==3)?'积分明细':'关联订单信息'}}</view>
<block wx:if="{{detailInfo.infoName=='积分收益'&&(channelSource==2||channelSource==3)}}">
<view class="col">
<view>积分来源</view>
<view>{{channelSource==2?'续保返现':'市场费'}}</view>
</view>
<view class="col">
<view>积分变动</view>
<view>{{detailInfo.updatedTime?detailInfo.updatedTime:'-'}}</view>
</view>
</block>
<block wx:else>
<view class="col"> <view class="col">
<view>订单编号</view> <view>订单编号</view>
<view>{{detailInfo.orderCode?detailInfo.orderCode:'-'}}</view> <view>{{detailInfo.orderCode?detailInfo.orderCode:'-'}}</view>
...@@ -32,7 +43,7 @@ ...@@ -32,7 +43,7 @@
<view>{{detailInfo.rewardScore?detailInfo.rewardScore:'0'}}</view> <view>{{detailInfo.rewardScore?detailInfo.rewardScore:'0'}}</view>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="box" wx:if="{{detailInfo.infoName=='手动抵扣'||detailInfo.infoName=='撤销抵扣'}}"> <view class="box" wx:if="{{detailInfo.infoName=='手动抵扣'||detailInfo.infoName=='撤销抵扣'}}">
<view class="title">操作信息</view> <view class="title">操作信息</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!