Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
let data = reactive({
|
||||
ruleShow: true,
|
||||
ruleShow: false,
|
||||
rule_title: "",
|
||||
rule_content: "",
|
||||
money: '',
|
||||
@@ -114,6 +114,7 @@
|
||||
urlCallback: {},
|
||||
adpid: null,
|
||||
adRewardedShow: false,
|
||||
adRewardedNum: 0,
|
||||
adRewardedVideoloadNum: 0,
|
||||
isWithdraw: false,
|
||||
userInfo: null,
|
||||
@@ -131,6 +132,7 @@
|
||||
// }
|
||||
getExtractFei();
|
||||
getMoneyDetail();
|
||||
getCanCash()
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
@@ -147,7 +149,6 @@
|
||||
data.adRewardedVideoloadNum = 0
|
||||
adRewardedw.value.load();
|
||||
})
|
||||
getCanCash()
|
||||
})
|
||||
onReachBottom(() => {
|
||||
if (data.page * data.limit < data.totalCount) {
|
||||
@@ -184,7 +185,6 @@
|
||||
function ruleConfirm() {
|
||||
data.ruleShow = false
|
||||
data.ruleIndex++
|
||||
console.log(data.ruleIndex >= data.ruleList.length)
|
||||
if( data.ruleIndex >= data.ruleList.length) {
|
||||
data.ruleIndex = 0
|
||||
return
|
||||
@@ -208,7 +208,14 @@
|
||||
*/
|
||||
async function getCanCash() {
|
||||
canCash().then(res => {
|
||||
data.isWithdraw = !res;
|
||||
data.isWithdraw = res;
|
||||
console.log(res)
|
||||
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
||||
data.isWithdraw = true;
|
||||
// uni.setStorageSync('adRewardedNum',0)
|
||||
} else {
|
||||
uni.setStorageSync('adRewardedNum',((uni.getStorageSync('adRewardedNum')||0)+1))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
@@ -218,6 +225,7 @@
|
||||
*/
|
||||
function onadload(e) {
|
||||
data.adRewardedShow = true;
|
||||
uni.setStorageSync('adRewardedNum',0)
|
||||
console.log('广告数据加载成功');
|
||||
}
|
||||
|
||||
@@ -244,9 +252,12 @@
|
||||
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 {
|
||||
// 播放中途退出
|
||||
@@ -341,17 +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({
|
||||
@@ -361,6 +377,7 @@
|
||||
setTimeout(function() {
|
||||
linkTo('/pages/me/withdraw/alipay')
|
||||
}, 1500)
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
@@ -398,6 +415,7 @@
|
||||
|
||||
success: (e) => {
|
||||
if (e.confirm) {
|
||||
console.log(data.money)
|
||||
getMoney();
|
||||
getMoneyDetail();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user