合并代码

This commit is contained in:
duan
2025-01-16 09:51:44 +08:00
4 changed files with 50 additions and 34 deletions

View File

@@ -244,17 +244,10 @@
platform: platform,
qdCode: qdCodeion,
})
if (res.code === 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
//设置渠道码
if (res.user.qdCod) {
uni.setStorageSync('qdCod', res.user.qdCod)
}
uni.setStorageSync('userInfo', res.user)
uni.showToast({
title: '注册成功',
icon: 'none'

View File

@@ -5,7 +5,10 @@
<view class="row">类型{{ item.title }}</view>
<view class="row">内容{{ item.content }}</view>
<view class="row">时间{{ item.createTime }}</view>
<view class="btm">+{{ item.money }}</view>
<view class="btm">
<text class="add" v-if="item.type == 1">+{{ item.money }}</text>
<text class="sub" v-if="item.type == 2">-{{ item.money }}</text>
</view>
</view>
</view>
<emprty-card v-if="!listData.list.length && listData.status == 'nomore'" />
@@ -25,6 +28,11 @@ const listData = reactive({
status: 'loading'
});
onReachBottom(() => {
listData.page++;
getList();
});
async function getList() {
try {
const res = await queryUserMoneyDetails({
@@ -83,8 +91,13 @@ page {
.btm {
display: flex;
justify-content: flex-end;
color: rgb(253, 100, 22);
font-weight: bold;
.add {
color: rgb(253, 100, 22);
}
.sub {
color: #5aaf2e;
}
}
}
}

View File

@@ -83,7 +83,7 @@
<view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 -->
<ad-rewarded-video v-if="data.adRewardedShow" ref="adRewarded" :adpid="data.adpid" :loadnext="true"
<ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true"
:url-callback="data.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video>
</view>
@@ -113,7 +113,7 @@
cashMoney: 0,
urlCallback: {},
adpid: null,
adRewardedShow: true,
adRewardedShow: false,
adRewardedVideoloadNum: 0,
isWithdraw: false,
userInfo: null,
@@ -121,14 +121,14 @@
ruleList: []
})
const adRewarded = ref(null);
const adRewardedw = ref(null);
onLoad(() => {
if ( uni.getSystemInfoSync().platform == 'android' ) {
data.adpid = 1531580352
}
if ( uni.getSystemInfoSync().platform == 'ios' ) {
// if ( uni.getSystemInfoSync().platform == 'android' ) {
// data.adpid = 1531580352
// }
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
data.adpid = 1373604770
}
// }
getExtractFei();
getMoneyDetail();
@@ -145,7 +145,7 @@
onReady(() => {
nextTick(()=>{
data.adRewardedVideoloadNum = 0
adRewarded.value.load();
adRewardedw.value.load();
})
getCanCash()
})
@@ -227,14 +227,13 @@
*/
function onaderror(e) {
if ( data.adRewardedVideoloadNum >=3 ) {
data.adRewardedShow = false;
return
}
data.adRewardedVideoloadNum++
setTimeout(() => {
adRewarded.value.load();
adRewardedw.value.load();
}, 1000); // 10
console.log("广告加载失败")
console.log("广告加载失败",e)
}
/**
@@ -263,13 +262,19 @@
* 提现触发
*/
function goWithdraw() {
if ( !data.isWithdraw ) {
if(!data.adRewardedShow){
uni.showToast({
icon: 'none',
title: '广告加载失败,请稍后重试'
});
return
}
data.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: 'cash:'+uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
adRewarded.value.show();
adRewardedw.value.show();
} else {
getOut()
}

View File

@@ -62,7 +62,7 @@
<!-- 激励视频广告 -->
<view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 -->
<ad-rewarded-video v-if="datas.adRewardedShow" ref="adRewarded" :adpid="datas.adpid" :loadnext="true"
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true"
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video>
</view>
@@ -104,20 +104,19 @@
list: [],
urlCallback: {},
adpid: null,
adRewardedShow: true,
adRewardedShow: false,
adRewardedVideoloadNum: 0,
})
const adRewarded = ref(null);
onShow(() => {
// 判断ios是否审核
$common.init()
if (uni.getSystemInfoSync().platform == 'android') {
datas.adpid = 1531580352
}
if (uni.getSystemInfoSync().platform == 'ios') {
// if ( uni.getSystemInfoSync().platform == 'android' ) {
// datas.adpid = 1531580352
// }
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
datas.adpid = 1373604770
}
// }
if (uni.getStorageSync("token")) {
getTaskdata()
getsignIn()
@@ -249,7 +248,6 @@
*/
function onaderror(e) {
if (datas.adRewardedVideoloadNum >= 3) {
datas.adRewardedShow = false;
return
}
datas.adRewardedVideoloadNum++
@@ -318,6 +316,13 @@
}
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 首次加载广告
if(!datas.adRewardedShow){
uni.showToast({
icon: 'none',
title: '广告加载失败,请稍后重试'
});
return
}
datas.urlCallback = {
userId: uni.getStorageSync('userId'),
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),