提现优化

This commit is contained in:
GaoHao
2025-01-16 15:14:18 +08:00
parent 51f8f54a26
commit 899680b0c5

View File

@@ -101,7 +101,7 @@
import { linkTo } from '@/utils/app.js';
let data = reactive({
ruleShow: true,
ruleShow: false,
rule_title: "",
rule_content: "",
money: '',
@@ -209,8 +209,7 @@
async function getCanCash() {
canCash().then(res => {
data.isWithdraw = res;
console.log(res)
console.log(uni.getStorageSync('adRewardedNum'))
console.log(res)
if( uni.getStorageSync('adRewardedNum') >= 3 ){
data.isWithdraw = true;
// uni.setStorageSync('adRewardedNum',0)
@@ -253,9 +252,11 @@
const detail = e.detail
if (detail && detail.isEnded) {
// 正常播放结束
console.log(data.urlCallback.extra)
let res = await state({
extraKey: data.urlCallback.extra
})
console.log(res)
uni.setStorageSync('adRewardedNum',0)
getCanCash()
} else {
@@ -351,18 +352,22 @@
}
function getMoney() {
let data =
uni.showLoading({
title: '提现中'
});
withdraw({
amount: data.money
}).then(res => {
console.log(res)
data.money = ''
uni.setStorageSync('adRewardedNum',0)
setTimeout(function() {
getcashMoney()
}, 1500)
uni.showToast({
title: res.msg,
icon: 'none'
})
}).catch(res =>{
if (res.code == 9991) {
uni.showToast({
@@ -372,6 +377,7 @@
setTimeout(function() {
linkTo('/pages/me/withdraw/alipay')
}, 1500)
}else{
}
})
@@ -409,6 +415,7 @@
success: (e) => {
if (e.confirm) {
console.log(data.money)
getMoney();
getMoneyDetail();
}