Commit 3b95cf39 by wangzhihui

积分

1 parent 9f6379ff
Showing 30 changed files with 618 additions and 611 deletions
......@@ -54,7 +54,6 @@
"pages/bankAccount/add/add",
"pages/bankAccount/list/list",
"pages/integral/withdrawalNote/withdrawalNote",
"pages/integral/toCash/toCash",
"pages/integral/withdrawalSuccess/withdrawalSuccess",
"pages/SpecialSale/SpecialSale",
"pages/goodsDetail/index"
......
......@@ -48,9 +48,11 @@ Component({
*/
methods: {
handleClick(e) {
console.log(e)
let {
index
} = e.detail
this.triggerEvent('buttontap', {
...e
value: index
})
},
onClose() {}
......
......@@ -52,7 +52,7 @@ Page({
score,
user
} = this.options
wx.p.router('/packageStoreAssistant/packageMine/pages/bankAccount/detail/detail', {
wx.p.router('/packageIndex/pages/bankAccount/add/add', {
item,
score,
user
......
......@@ -42,6 +42,29 @@ Component({
* 组件的方法列表
*/
methods: {
go(e){
console.log(e)
let {index} =e.currentTarget.dataset
let arr=[
()=>{
// 积分钱包
},
()=>{
const thisPage = wx.p.router.getPageInstance()
thisPage.toBank()
}
]
arr[index]()
},
//提现记录
goRecord(){
const thisPage = wx.p.router.getPageInstance()
thisPage.jump()
},
toCash(){
const thisPage = wx.p.router.getPageInstance()
thisPage.toCash()
},
navbarReady(e) {
let {
height
......
......@@ -18,7 +18,7 @@
<!-- 未开通 -->
<view class="have-no-open">
<view class="type-list">
<view wx:for="{{listNav}}" class="item">
<view wx:for="{{listNav}}" class="item" wx:key="index" bind:tap="go" data-index="{{index}}">
<glsx-image webp src="/integral/{{item.icon}}.png" class="icon"></glsx-image>
<view>{{item.text}}</view>
</view>
......@@ -31,10 +31,10 @@
<view class="number --fontColor">1680</view>
</view>
</view>
<view class="flex note-btn --fontColor">提现记录 <glsx-image webp src="/integral/right.png" class="right"></glsx-image>
<view class="flex note-btn --fontColor" bind:tap="goRecord">提现记录 <glsx-image webp src="/integral/right.png" class="right"></glsx-image>
</view>
<view class="flex withdraw">
<view class="flex withdraw" bind:tap="toCash">
<glsx-image webp src="/integral/withdraw.png" class="withdraw-icon"></glsx-image>
我要提现
</view>
......
......@@ -12,37 +12,35 @@ Component({
*/
data: {
navStyle: "background-color: transparent;",
guideList:[
{
value:3,
text:'银行卡',
rightIcon:'right'
guideList: [{
value: 3,
text: '银行卡',
rightIcon: 'right'
},
{
text:'积分转赠',
leftIcon:'given'
text: '积分转赠',
leftIcon: 'given'
},
{
text:'提现记录',
leftIcon:'clock'
text: '提现记录',
leftIcon: 'clock'
}
],
havoData:[
{
text:'累计收益',
value:9505.50
havoData: [{
text: '累计收益',
value: 9505.50
},
{
text:'累计提现',
value:9505.50
text: '累计提现',
value: 9505.50
},
{
text:'累计兑换',
value:9505.50
text: '累计兑换',
value: 9505.50
},
{
text:'累计转赠',
value:9505.50
text: '累计转赠',
value: 9505.50
}
],
},
......@@ -51,6 +49,29 @@ Component({
* 组件的方法列表
*/
methods: {
go(e) {
console.log(e)
const thisPage = wx.p.router.getPageInstance()
let {
index
} = e.currentTarget.dataset
let arr = [
() => {
thisPage.toBank()
},
() => {
},
() => {
thisPage.jump()
}
]
arr[index]()
},
toCash(){
const thisPage = wx.p.router.getPageInstance()
thisPage.toCash()
},
navbarReady(e) {
let {
height
......
......@@ -23,12 +23,12 @@
1680
</view>
</view>
<view class="flex withdraw">
<view class="flex withdraw" bind:tap="toCash">
<glsx-image webp src="/integral/withdraw.png" class="withdraw-icon"></glsx-image>
我要提现
</view>
<view class="guide-wrap flex">
<view wx:for="{{guideList}}" class="guide flex" wx:for-item="g" wx:key="index">
<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>
<glsx-image webp src="/integral/{{g.leftIcon}}.png" class="left" wx:if="{{g.leftIcon}}"></glsx-image>
<view class="text">{{g.text}}</view>
......
......@@ -7,8 +7,8 @@ Page({
* 页面的初始数据
*/
data: {
open:false,
showAccountModal:true,
open: false,
showAccountModal: false,
listData: [{
id: 2104467,
infoName: "积分兑换",
......@@ -30,6 +30,12 @@ Page({
onLoad(options) {
},
jump() {
wx.p.router.go('/packageIndex/pages/integral/withdrawalNote/withdrawalNote')
},
toBank() {
wx.p.router.go('/packageIndex/pages/bankAccount/list/list')
},
hidePopup() {
this.setData({
showAccountModal: false
......@@ -43,21 +49,27 @@ Page({
navHeight: height
})
},
/**跳转至银行卡 */
toAddBankAccount(e) {
const {
score,
user
} = wx.p.router.router.getPageInstance()
this.setData({
showAccountModal: false
}, () => {
wx.p.router.router.go('/packageStoreAssistant/packageMine/pages/bankAccount/detail/detail', {
score,
user
})
})
},
/**跳转至银行卡 */
toAddBankAccount(e) {
const {
score,
user
} = wx.p.router.router.getPageInstance()
this.setData({
showAccountModal: false
}, () => {
wx.p.router.router.go('/packageStoreAssistant/packageMine/pages/bankAccount/detail/detail', {
score,
user
})
})
},
toCash(){
// this.setData({
// showAccountModal: true
// })
wx.p.router.go('/packageIndex/pages/integral/withdrawal/withdrawal')
},
back() {
wx.p.router.back()
},
......
<!--packageIndex/pages/integral/index/index.wxml-->
<!--积分中心 -->
<view class="integral-container {{!open?'bgF':''}}">
<have-no-ope>
<have-no-ope wx:if="{{open}}">
<view class="list_widget">
<view class="title_wrap">
收益明细
......@@ -26,7 +26,7 @@
</view>
</view>
</have-no-ope>
<!-- <have-open>
<have-open wx:else>
<view class="list_widget">
<view class="title_wrap">
收益明细
......@@ -50,7 +50,7 @@
<view wx:else class="no_more_tip">暂无收益明细</view>
</view>
</view>
</have-open> -->
</have-open>
</view>
<view wx:if="{{showAccountModal}}" class="popclass" data-name="showAccountModal">
......
// packageIndex/pages/integral/toCash/toCash.js
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: "background-color: transparent;",
agree: false,
showAuthDialog: false,
showConfirmDialog: false,
sumbitScore: '',
buttons: [{
text: '取消'
}, {
text: '同意',
extClass: 'btn_primary'
}],
confirmButtons: [{
text: '取消'
}, {
text: '确认',
extClass: 'btn_primary'
}],
bankInfo: {
"id": 34,
"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) {
},
bindPickerChange(e) {
console.log(e.detail)
const {
value
} = e.detail
let bankInfo = this.data.bankList[value]
bankInfo.bankNum = bankInfo.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
this.setData({
bankInfo
})
},
toSumbitData() {
if (this.submit) return
const checkAgree = this.checkAgree()
if (checkAgree) return false
// 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
});
},
accSub(arg1, arg2) {
let r1, r2, m, n;
try {
r1 = arg1.toString().split(".")[1].length;
} catch (e) {
r1 = 0;
}
try {
r2 = arg2.toString().split(".")[1].length;
} catch (e) {
r2 = 0;
}
m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度
n = (r1 >= r2) ? r1 : r2;
return ((arg1 * m - arg2 * m) / m).toFixed(n);
},
toTixianAll() {
let {
score: {
existBankWithdrawal,
bankWithdrawalScore,
wechatWithdrawalScore
}
} = this.data,
withdrawalScore = wechatWithdrawalScore
this.setData({
sumbitScore: withdrawalScore
})
},
handleInput(e) {
var value = e.detail.value
sumbitScore = this.priceVerify(value, withdrawalScore)
this.setData({
sumbitScore: value
})
},
// 价格输入校验规则(提现积分值:最小值需大于0)
priceVerify(price, max, min = 0) {
let result = 0
// 1.限制小数点为2位
price = price.replace(/[^\d.]/g, "")
price = price.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
// 2.禁止第一位为小数点
if (price.indexOf('.') == 0) {
price = ''
}
// 3.如果第一位是0,那第二位开始禁止为数值,只可以为小数点
if (price.indexOf('0') == 0 && price.length > 1) {
if (price.indexOf('.') != 1) {
price = '0'
}
if (price[2] == '.') {
price = '0.'
}
}
// if (price.indexOf('.') != -1) {
// price = price.slice(0, price.indexOf('.'))
// }
result = price
// 4.判断最大值和最小值
if (price) {
price = Number(price)
max = Number(max)
if (max && price > max) {
result = max
}
if (min && price < min) {
result = min
}
}
return result
},
navbarReady(e) {
let {
height
} = e.detail
this.setData({
navHeight: height
})
},
checkAgree() {
let {
agree
} = this.data
if (!agree) {
this.setData({
showAuthDialog: true
})
return true
}
return false
},
agreeEvent(e) {
console.log(e)
let {
index
} = e.detail
if (index == 1) {
this.setData({
showAuthDialog: false,
agree: true
})
} else {
this.setData({
showAuthDialog: false
})
}
},
onClose(e) {
console.log(e)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"auth-setting": "./components/authSetting/authSetting"
},
"navigationStyle": "custom",
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file
/* packageIndex/pages/integral/toCash/toCash.wxss */
.to-cash-container {
background-image: linear-gradient(180deg, #FCFDFE 0%, #F8F9FC 100%);
.flex {
display: flex;
align-items: center;
}
.navigation {
width: 750rpx;
height: 474rpx;
background-size: 100%;
background-repeat: no-repeat;
background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/integral/bg.png');
.bar-text {
font-weight: 500;
font-size: 34rpx;
color: #0A0D14;
text-align: center;
}
.back {
width: 40rpx;
height: 40rpx;
position: absolute;
left: 32rpx;
top: 50%;
transform: translateY(-50%);
z-index: 8;
}
}
.to-cash {
position: relative;
padding: 32rpx;
.text {
font-weight: 400;
font-size: 26rpx;
color: #3F444D;
margin-bottom: 16rpx;
}
.value {
font-weight: 600;
font-size: 64rpx;
color: #0A0D14;
line-height: 72rpx;
}
.operate-wrap {
height: 272rpx;
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #00000017;
border-radius: 24rpx;
margin-top: 36rpx;
padding: 32rpx;
box-sizing: border-box;
.info {
font-weight: 400;
font-size: 32rpx;
color: #292D33;
margin-bottom: 32rpx;
}
.operate {
display: flex;
align-items: center;
padding: 24rpx 0 22rpx 0;
border-bottom: 2rpx solid #E6E6E6;
position: relative;
.symbol {
font-weight: 700;
font-size: 48rpx;
color: #333333;
margin-right: 16rpx;
}
.int_widget {
width: 400rpx;
}
.placeStyle {
font-weight: 500;
font-size: 48rpx;
color: #CCCCCC;
}
.disintClass {
font-weight: 500;
font-size: 48rpx;
color: #333333;
}
.allbtn {
position: absolute;
right: 32rpx;
top: 48rpx;
font-size: 24rpx;
color: #2B69FF;
line-height: 36rpx;
}
}
}
.bank-wrap {
.text {
margin: 96rpx 0 24rpx 32rpx;
}
.select {
width: 686rpx;
height: 136rpx;
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx 24rpx;
box-sizing: border-box;
position: relative;
.bankName {
font-weight: 500;
font-size: 30rpx;
color: #292D33;
margin-bottom: 12rpx
}
.bankNumber {
font-weight: 400;
font-size: 24rpx;
color: #292D33;
}
.icon-right {
width: 16.7rpx;
height: 30.06rpx;
position: absolute;
right: 43.8rpx;
top: 48rpx;
}
}
}
.submit {
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
width: 654rpx;
height: 88rpx;
background: #FB8A32;
border-radius: 20rpx;
line-height: 88rpx;
text-align: center;
position: fixed;
bottom: 266rpx;
}
}
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
}
.message-box .message {
padding: 8px 0;
}
.suggest-box {
font-size: 28rpx;
color: #1B233D;
}
\ No newline at end of file
<!--packageIndex/pages/integral/toCash/toCash.wxml-->
<!-- 积分提现-->
<view class="to-cash-container">
<!-- 导航栏 -->
<view class="navigation">
<navigation-bar bindnavbarReady="navbarReady" custom="{{true}}" navStyle="{{navStyle}}" page-title="积分中心">
<view class="nav-wrap">
<view class="back" bindtap="back">
<glsx-image webp src="/integral/back.png" class="icon"></glsx-image>
</view>
<view class="bar-text">积分提现</view>
</view>
</navigation-bar>
</view>
<view class="to-cash" style="top:{{navHeight}}px; margin-top:-474rpx">
<view class="text">当前可提现积分</view>
<view class="value">1680</view>
<view class="operate-wrap">
<view class="info">本次提现积分</view>
<view class="operate">
<view class="symbol">¥</view>
<view class="int_widget flex_scb dis_int_widget">
<input type="digit" value="{{sumbitScore}}" bindinput="handleInput" class="disintClass" maxlength="20" placeholder="请输入" placeholder-class="placeStyle" />
</view>
<view class="allbtn" bind:tap="toTixianAll">全部提现</view>
</view>
</view>
<view class="bank-wrap">
<view class="text">提现至:</view>
<view class="select">
<picker bindchange="bindPickerChange" range-key="bankName" range="{{bankList}}">
<view class="bankName">{{bankInfo.bankName}}</view>
<view class="bankNumber">{{bankInfo.bankNum}}</view>
<mp-icon class="icon-right" icon="arrow" size="{{13}}" color="#333333"></mp-icon>
</picker>
</view>
</view>
<view class="auth_box {{loginType == 3 ? '' : 'lear_bottom'}}">
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
</view>
<view class="submit" bind:tap="toSumbitData">提交</view>
</view>
</view>
<!-- 未同意协议弹窗提示 -->
<Dialog show="{{ showAuthDialog }}" mask="true" bindbuttontap="agreeEvent" buttons="{{buttons}}" title="免责协议">
<view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《免责协议》</text>
</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/withdrawal/withdrawal.js
// packageIndex/pages/integral/toCash/toCash.js
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: "background-color: transparent;",
agree: false,
showAuthDialog: false,
showConfirmDialog: false,
sumbitScore: '',
buttons: [{
text: '取消'
}, {
text: '同意',
extClass: 'btn_primary'
}],
confirmButtons: [{
text: '取消'
}, {
text: '确认',
extClass: 'btn_primary'
}],
bankInfo: {
"id": 34,
"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
}
]
},
/**
......@@ -14,7 +68,191 @@ Page({
onLoad(options) {
},
bindPickerChange(e) {
console.log(e.detail)
const {
value
} = e.detail
let bankInfo = this.data.bankList[value]
bankInfo.bankNum = bankInfo.bankNumber.replace(/^(?:\d+)(.{4})$/, '**** **** **** $1')
this.setData({
bankInfo
})
},
toSumbitData() {
if (this.submit) return
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
});
},
accSub(arg1, arg2) {
let r1, r2, m, n;
try {
r1 = arg1.toString().split(".")[1].length;
} catch (e) {
r1 = 0;
}
try {
r2 = arg2.toString().split(".")[1].length;
} catch (e) {
r2 = 0;
}
m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度
n = (r1 >= r2) ? r1 : r2;
return ((arg1 * m - arg2 * m) / m).toFixed(n);
},
toTixianAll() {
let {
score: {
existBankWithdrawal,
bankWithdrawalScore,
wechatWithdrawalScore
}
} = this.data,
withdrawalScore = wechatWithdrawalScore
this.setData({
sumbitScore: withdrawalScore
})
},
handleInput(e) {
var value = e.detail.value
sumbitScore = this.priceVerify(value, withdrawalScore)
this.setData({
sumbitScore: value
})
},
// 价格输入校验规则(提现积分值:最小值需大于0)
priceVerify(price, max, min = 0) {
let result = 0
// 1.限制小数点为2位
price = price.replace(/[^\d.]/g, "")
price = price.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
// 2.禁止第一位为小数点
if (price.indexOf('.') == 0) {
price = ''
}
// 3.如果第一位是0,那第二位开始禁止为数值,只可以为小数点
if (price.indexOf('0') == 0 && price.length > 1) {
if (price.indexOf('.') != 1) {
price = '0'
}
if (price[2] == '.') {
price = '0.'
}
}
// if (price.indexOf('.') != -1) {
// price = price.slice(0, price.indexOf('.'))
// }
result = price
// 4.判断最大值和最小值
if (price) {
price = Number(price)
max = Number(max)
if (max && price > max) {
result = max
}
if (min && price < min) {
result = min
}
}
return result
},
navbarReady(e) {
let {
height
} = e.detail
this.setData({
navHeight: height
})
},
checkAgree() {
let {
agree
} = this.data
if (!agree) {
this.setData({
showAuthDialog: true
})
return true
}
return false
},
agreeEvent(e) {
console.log(e)
let {
value
} = e.detail
if (value == 1) {
this.setData({
showAuthDialog: false,
agree: true
})
} else {
this.setData({
showAuthDialog: false
})
}
},
onClose(e) {
console.log(e)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
{
"usingComponents": {}
"usingComponents": {
"auth-setting": "./components/authSetting/authSetting"
},
"navigationStyle": "custom",
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file
/* packageIndex/pages/integral/withdrawal/withdrawal.wxss */
\ No newline at end of file
/* packageIndex/pages/integral/withdrawal/withdrawal.wxss */
.to-cash-container {
background-image: linear-gradient(180deg, #FCFDFE 0%, #F8F9FC 100%);
.flex {
display: flex;
align-items: center;
}
.navigation {
width: 750rpx;
height: 474rpx;
background-size: 100%;
background-repeat: no-repeat;
background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/integral/bg.png');
.bar-text {
font-weight: 500;
font-size: 34rpx;
color: #0A0D14;
text-align: center;
}
.back {
width: 40rpx;
height: 40rpx;
position: absolute;
left: 32rpx;
top: 50%;
transform: translateY(-50%);
z-index: 8;
}
}
.to-cash {
position: relative;
padding: 32rpx;
.text {
font-weight: 400;
font-size: 26rpx;
color: #3F444D;
margin-bottom: 16rpx;
}
.value {
font-weight: 600;
font-size: 64rpx;
color: #0A0D14;
line-height: 72rpx;
}
.operate-wrap {
height: 272rpx;
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #00000017;
border-radius: 24rpx;
margin-top: 36rpx;
padding: 32rpx;
box-sizing: border-box;
.info {
font-weight: 400;
font-size: 32rpx;
color: #292D33;
margin-bottom: 32rpx;
}
.operate {
display: flex;
align-items: center;
padding: 24rpx 0 22rpx 0;
border-bottom: 2rpx solid #E6E6E6;
position: relative;
.symbol {
font-weight: 700;
font-size: 48rpx;
color: #333333;
margin-right: 16rpx;
}
.int_widget {
width: 400rpx;
}
.placeStyle {
font-weight: 500;
font-size: 48rpx;
color: #CCCCCC;
}
.disintClass {
font-weight: 500;
font-size: 48rpx;
color: #333333;
}
.allbtn {
position: absolute;
right: 32rpx;
top: 48rpx;
font-size: 24rpx;
color: #2B69FF;
line-height: 36rpx;
}
}
}
.bank-wrap {
.text {
margin: 96rpx 0 24rpx 32rpx;
}
.select {
width: 686rpx;
height: 136rpx;
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx 24rpx;
box-sizing: border-box;
position: relative;
.bankName {
font-weight: 500;
font-size: 30rpx;
color: #292D33;
margin-bottom: 12rpx
}
.bankNumber {
font-weight: 400;
font-size: 24rpx;
color: #292D33;
}
.icon-right {
width: 16.7rpx;
height: 30.06rpx;
position: absolute;
right: 43.8rpx;
top: 48rpx;
}
}
}
.submit {
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
width: 654rpx;
height: 88rpx;
background: #FB8A32;
border-radius: 20rpx;
line-height: 88rpx;
text-align: center;
position: fixed;
bottom: 266rpx;
}
}
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
}
.message-box .message {
padding: 8px 0;
}
.suggest-box {
font-size: 28rpx;
color: #1B233D;
}
\ No newline at end of file
<!--packageIndex/pages/integral/withdrawal/withdrawal.wxml-->
<!-- 提现 -->
<text>packageIndex/pages/integral/withdrawal/withdrawal.wxml</text>
<!-- 积分提现-->
<view class="to-cash-container">
<!-- 导航栏 -->
<view class="navigation">
<navigation-bar bindnavbarReady="navbarReady" custom="{{true}}" navStyle="{{navStyle}}" page-title="积分中心">
<view class="nav-wrap">
<view class="back" bindtap="back">
<glsx-image webp src="/integral/back.png" class="icon"></glsx-image>
</view>
<view class="bar-text">积分提现</view>
</view>
</navigation-bar>
</view>
<view class="to-cash" style="top:{{navHeight}}px; margin-top:-474rpx">
<view class="text">当前可提现积分</view>
<view class="value">1680</view>
<view class="operate-wrap">
<view class="info">本次提现积分</view>
<view class="operate">
<view class="symbol">¥</view>
<view class="int_widget flex_scb dis_int_widget">
<input type="digit" value="{{sumbitScore}}" bindinput="handleInput" class="disintClass" maxlength="20" placeholder="请输入" placeholder-class="placeStyle" />
</view>
<view class="allbtn" bind:tap="toTixianAll">全部提现</view>
</view>
</view>
<view class="bank-wrap">
<view class="text">提现至:</view>
<view class="select">
<picker bindchange="bindPickerChange" range-key="bankName" range="{{bankList}}">
<view class="bankName">{{bankInfo.bankName}}</view>
<view class="bankNumber">{{bankInfo.bankNum}}</view>
<mp-icon class="icon-right" icon="arrow" size="{{13}}" color="#333333"></mp-icon>
</picker>
</view>
</view>
<view class="auth_box">
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
</view>
<view class="submit" bind:tap="toSumbitData">提交</view>
</view>
</view>
<!-- 未同意协议弹窗提示 -->
<Dialog show="{{ showAuthDialog }}" mask="true" bindbuttontap="agreeEvent" buttons="{{buttons}}" title="免责协议">
<view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《免责协议》</text>
</view>
</Dialog>
<Dialog show="{{ showConfirmDialog }}" mask="true" bindbuttontap="comfirmSumbit" buttons="{{confirmButtons}}" title="提示">
<view class="suggest-box">
您的银行账户修改成功!
</view>
</Dialog>
\ No newline at end of file
......@@ -4,6 +4,9 @@ page {
}
.container {
width:100%;
height:100vh;
background: #FFFFFF;
display: flex;
flex-direction: column;
align-items: center;
......@@ -45,7 +48,7 @@ page {
.btn_right {
width: 316rpx;
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
background: #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
......
......@@ -2,7 +2,7 @@
<glsx-image webp src="/integral/success_icon_1.png" class="icon"></glsx-image>
<!-- <glsx-image mode="widthFix" class="icon" src="store-assistant/success_icon_1.png" /> -->
<view class="max_text">提交成功</view>
<view class="tip_text" wx:if="{{title=='微信兑换'}}">您的积分兑换申请已成功提交!</view>
<view class="tip_text">您的积分兑换申请已成功提交!</view>
<!-- <view class="tip_text" wx:else>您的银行卡积分兑换申请已成功提交!</view> -->
<view class="btn_group flex_cc">
<view class="btn_left flex_cc" bind:tap="toWatchNote">查看兑换记录</view>
......
......@@ -149,6 +149,9 @@ Page({
goodsIndex: e.detail
})
},
toIntegral(){
wx.p.router.go('/packageIndex/pages/integral/index/index')
},
/**
* 生命周期函数--监听页面显示
*/
......
......@@ -11,7 +11,7 @@
<view class="icon">
<glsx-image src="/index/points-icon.png"></glsx-image>
</view>
<view class="points-num">1680</view>
<view class="points-num" bind:tap="toIntegral">1680</view>
</view>
<view class="arrow-icon">
<mp-icon icon="arrow" color="#F4776D" size="7"></mp-icon>
......
......@@ -31,7 +31,7 @@
},
{
"name": "我要提现",
"pathName": "packageIndex/pages/integral/toCash/toCash",
"pathName": "packageIndex/pages/integral/withdrawal/withdrawal",
"query": "",
"launchMode": "default",
"scene": null
......@@ -42,6 +42,20 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "收款账户",
"pathName": "packageIndex/pages/bankAccount/list/list",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "兑换成功",
"pathName": "packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
......@@ -7,6 +7,7 @@
export const authPages = [
'/packageMine/',
'/pages/mine/',
// '/packageIndex/pages/integral/index/index' //积分
];
// 不需要拦截的页面路径配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!