diff --git a/app.js b/app.js index fe7a95b..442a916 100644 --- a/app.js +++ b/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 }, diff --git a/pages/basketballGym/index.js b/pages/basketballGym/index.js index af6115b..b3e871d 100644 --- a/pages/basketballGym/index.js +++ b/pages/basketballGym/index.js @@ -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: '提示', diff --git a/pages/myAccount/index.js b/pages/myAccount/index.js index fc97378..ef2fdff 100644 --- a/pages/myAccount/index.js +++ b/pages/myAccount/index.js @@ -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() { diff --git a/pages/withdrawal/index.js b/pages/withdrawal/index.js index e608efc..774e557 100644 --- a/pages/withdrawal/index.js +++ b/pages/withdrawal/index.js @@ -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: '请输入持卡人', diff --git a/pages/withdrawal/index.wxml b/pages/withdrawal/index.wxml index 25aae38..eb8c30e 100644 --- a/pages/withdrawal/index.wxml +++ b/pages/withdrawal/index.wxml @@ -22,6 +22,50 @@ 可提现余额为 {{money}} + + + + + + + 确认提现 + + + + + 📋 + 提现规则说明 + + + + · + 可提现额度:每次最低提现金额为 1 元,单次最高提现金额为账户可用余额,不超过 50,000 元。 + + + · + 每日提现次数:每位用户每自然日最多可发起 3 次提现申请。 + + + · + 提现时间:提现申请受理时间为每日 09:00–21:00,节假日正常受理。 + + + · + 到账时间:审核通过后,款项将在 1–3 个工作日内打款至您绑定的银行卡,请耐心等待。 + + + · + 提现手续费:平台不收取任何提现手续费,到账金额与申请金额一致。 + + + · + 注意事项:请确保填写的银行卡信息准确无误,因信息错误导致的提现失败,平台不承担责任。如有疑问请联系客服。 + + + \ No newline at end of file diff --git a/pages/withdrawal/index.wxss b/pages/withdrawal/index.wxss index 756878f..48d1c5d 100644 --- a/pages/withdrawal/index.wxss +++ b/pages/withdrawal/index.wxss @@ -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; } \ No newline at end of file