重复扣款修复
This commit is contained in:
31
app.js
31
app.js
@@ -3,8 +3,37 @@ import api from './utils/api.js';
|
||||
import pay from './utils/pay.js';
|
||||
App({
|
||||
onLaunch: function () {
|
||||
|
||||
this.checkUpdate();
|
||||
},
|
||||
|
||||
// 检查并强制更新小程序版本
|
||||
checkUpdate: function () {
|
||||
if (!wx.canIUse('getUpdateManager')) return;
|
||||
const updateManager = wx.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function (res) {
|
||||
if (!res.hasUpdate) return;
|
||||
updateManager.onUpdateReady(function () {
|
||||
wx.showModal({
|
||||
title: '发现新版本',
|
||||
content: '新版本已准备好,重启后生效,是否立即重启?',
|
||||
showCancel: false,
|
||||
confirmText: '立即重启',
|
||||
success: function () {
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(function () {
|
||||
wx.showModal({
|
||||
title: '发现新版本',
|
||||
content: '新版本下载失败,请删除小程序后重新搜索进入以获取最新版本。',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
globalData: {
|
||||
userInfo: null
|
||||
},
|
||||
|
||||
@@ -195,7 +195,7 @@ Page({
|
||||
type: 'wgs84',
|
||||
success: (locRes) => {
|
||||
let distance = getDistance(locRes.latitude, locRes.longitude, Number(this.data.venues.latitude), Number(this.data.venues.longitude));
|
||||
if (distance > 40000) {
|
||||
if (distance > 10000) {
|
||||
this.setData({ isRequesting: false });
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
|
||||
@@ -155,11 +155,14 @@ Page({
|
||||
mask: true,
|
||||
})
|
||||
app.$api.recharges({}).then(res => {
|
||||
wx.hideLoading();
|
||||
this.setData({
|
||||
member: res.member,
|
||||
recharges: res.recharges
|
||||
})
|
||||
}, err => {});
|
||||
}, err => {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
// 取消授权登录
|
||||
cancelDeleteDialog() {
|
||||
|
||||
@@ -11,6 +11,7 @@ Page({
|
||||
bank: '',
|
||||
bankCard: '',
|
||||
money: '',
|
||||
isAgree: false,
|
||||
isUnClick: false,
|
||||
},
|
||||
|
||||
@@ -75,6 +76,13 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
// 协议复选框
|
||||
agreementChange(e) {
|
||||
this.setData({
|
||||
isAgree: e.detail.value.length > 0
|
||||
});
|
||||
},
|
||||
|
||||
// 修改持卡人
|
||||
cardholderInput(e) {
|
||||
this.data.cardholder = e.detail.value;
|
||||
@@ -97,6 +105,13 @@ Page({
|
||||
|
||||
// 确认提现
|
||||
withdrawalClick(e) {
|
||||
if (!this.data.isAgree) {
|
||||
wx.showToast({
|
||||
title: '请先阅读并同意提现规则',
|
||||
icon: 'none',
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (!this.data.cardholder) {
|
||||
wx.showToast({
|
||||
title: '请输入持卡人',
|
||||
|
||||
@@ -22,6 +22,50 @@
|
||||
<input bindinput='moneyInput' type='digit'></input>
|
||||
</view>
|
||||
<text class='message'>可提现余额为 {{money}}</text>
|
||||
|
||||
<view class="agreement-box">
|
||||
<checkbox-group bindchange="agreementChange">
|
||||
<label class="checkbox-label">
|
||||
<checkbox value="agree" checked="{{isAgree}}" color="#ffda2e" style="transform:scale(0.7);"/>
|
||||
<text class="agreement-text">我已仔细阅读并同意下方提现规则(已知晓提现存在门槛且非即时到账)</text>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
|
||||
<view class='btn-box' bindtap='withdrawalClick'>确认提现</view>
|
||||
</view>
|
||||
|
||||
<!-- 提现规则说明 -->
|
||||
<view class='rules-box'>
|
||||
<view class='rules-title'>
|
||||
<text class='rules-title-icon'>📋</text>
|
||||
<text>提现规则说明</text>
|
||||
</view>
|
||||
<view class='rules-list'>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>可提现额度:</text>每次最低提现金额为 1 元,单次最高提现金额为账户可用余额,不超过 50,000 元。</text>
|
||||
</view>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>每日提现次数:</text>每位用户每自然日最多可发起 3 次提现申请。</text>
|
||||
</view>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>提现时间:</text>提现申请受理时间为每日 09:00–21:00,节假日正常受理。</text>
|
||||
</view>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>到账时间:</text>审核通过后,款项将在 1–3 个工作日内打款至您绑定的银行卡,请耐心等待。</text>
|
||||
</view>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>提现手续费:</text>平台不收取任何提现手续费,到账金额与申请金额一致。</text>
|
||||
</view>
|
||||
<view class='rules-item'>
|
||||
<text class='rules-dot'>·</text>
|
||||
<text class='rules-text'><text class='rules-label'>注意事项:</text>请确保填写的银行卡信息准确无误,因信息错误导致的提现失败,平台不承担责任。如有疑问请联系客服。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -76,4 +76,85 @@
|
||||
.message {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
/* 提现协议复选框 */
|
||||
.agreement-box {
|
||||
margin-top: 40rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.agreement-text {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
margin-left: 8rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 提现规则说明 */
|
||||
.rules-box {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 40rpx;
|
||||
background: #1a191e;
|
||||
border-radius: 20rpx;
|
||||
padding: 36rpx 30rpx;
|
||||
}
|
||||
|
||||
.rules-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #ffda2e;
|
||||
margin-bottom: 28rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #2a2930;
|
||||
}
|
||||
|
||||
.rules-title-icon {
|
||||
margin-right: 12rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.rules-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0rpx;
|
||||
}
|
||||
|
||||
.rules-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
padding: 14rpx 0;
|
||||
border-bottom: 1rpx solid #222028;
|
||||
}
|
||||
|
||||
.rules-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.rules-dot {
|
||||
color: #ffda2e;
|
||||
font-size: 32rpx;
|
||||
line-height: 40rpx;
|
||||
margin-right: 12rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.rules-text {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.65);
|
||||
line-height: 40rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.rules-label {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: bold;
|
||||
}
|
||||
Reference in New Issue
Block a user