This commit is contained in:
GaoHao
2025-01-16 11:24:27 +08:00
6 changed files with 92 additions and 19 deletions

View File

@@ -78,7 +78,8 @@
import { import {
onLoad, onLoad,
onReady, onReady,
onReachBottom onReachBottom,
onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import contentlist from './components/contentlist.vue' import contentlist from './components/contentlist.vue'
import { import {
@@ -92,6 +93,10 @@
useCommonStore useCommonStore
} from '@/store/common.js' } from '@/store/common.js'
const $common = useCommonStore() const $common = useCommonStore()
onShow(()=>{
// 判断ios是否审核
$common.init()
})
let datas = reactive({ let datas = reactive({
noticeList: [], //公告列表 noticeList: [], //公告列表

View File

@@ -84,7 +84,7 @@
freeNumDay: 0, freeNumDay: 0,
list: [], list: [],
selectData: "", selectData: "",
source:1 source: 1
} }
}, },
onLoad(opt) { onLoad(opt) {
@@ -120,6 +120,11 @@
}) })
// 奖品的索引 // 奖品的索引
this.$refs.dialer.run(indexs) this.$refs.dialer.run(indexs)
} else {
uni.showToast({
title: '暂无抽奖次数',
icon:'none'
})
} }
}, },
// 抽奖次数 // 抽奖次数

View File

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

View File

@@ -111,7 +111,7 @@
<script setup> <script setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app'; import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js'; import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
import { import {
@@ -122,6 +122,10 @@ const userInfo = ref({});
// 获取最近的三条观看历史 // 获取最近的三条观看历史
const recordThree = ref([]); const recordThree = ref([]);
onShow(()=>{
// 判断ios是否审核
$common.init()
})
async function selectByUserIdAjax() { async function selectByUserIdAjax() {
try { try {
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 }); const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });

View File

@@ -21,7 +21,7 @@
<text class="" style="font-size: 28rpx;"> <text class="" style="font-size: 28rpx;">
{{ item.status == 1 ? '已签到' : '待签到' }} {{ item.status == 1 ? '已签到' : '待签到' }}
</text> </text>
<view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'"> <view style="display: flex;" :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'">
{{ item.signDay.substr(5, 8) }} {{ item.signDay.substr(5, 8) }}
</view> </view>
<image v-if="item.status == 0" src="@/static/task/xing (1).png" mode=""></image> <image v-if="item.status == 0" src="@/static/task/xing (1).png" mode=""></image>
@@ -48,7 +48,7 @@
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( {{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }} item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }}
</view> </view>
<view v-else class="btn disabled"> <view v-else class="btn disabled">
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` {{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }} : (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }}
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip" <view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
@@ -62,8 +62,8 @@
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<view style="width: 0;height: 0;overflow: hidden;"> <view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" <ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" :url-callback="datas.urlCallback"
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror"> @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video> </ad-rewarded-video>
</view> </view>
</view> </view>
@@ -110,11 +110,12 @@
}) })
const adRewarded = ref(null); const adRewarded = ref(null);
onShow(() => { onShow(() => {
$common.init()
// if ( uni.getSystemInfoSync().platform == 'android' ) { // if ( uni.getSystemInfoSync().platform == 'android' ) {
// datas.adpid = 1531580352 // datas.adpid = 1531580352
// } // }
// if ( uni.getSystemInfoSync().platform == 'ios' ) { // if ( uni.getSystemInfoSync().platform == 'ios' ) {
datas.adpid = 1373604770 datas.adpid = 1373604770
// } // }
if (uni.getStorageSync("token")) { if (uni.getStorageSync("token")) {
getTaskdata() getTaskdata()
@@ -294,8 +295,28 @@
url: urls url: urls
}) })
} else { } else {
console.log(item, '林区')
if (item.jumpType == 0) { if (item.jumpType == 0) {
if (item.title.indexOf("新人福利") != -1) { if (item.buttonTitle.indexOf("领取") != -1) {
let res = await taskReceive({
id: item.id
})
if (res.code == 0) {
uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none'
})
setTimeout(() => {
getTaskdata()
getsignIn()
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
} else if (item.title.indexOf("新人福利") != -1) {
let res = await taskReceive({ let res = await taskReceive({
id: item.id id: item.id
}) })
@@ -315,7 +336,7 @@
} }
} else if (item.buttonTitle.indexOf("观看视频") != -1) { } else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 首次加载广告 // 首次加载广告
if(!datas.adRewardedShow){ if (!datas.adRewardedShow) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '广告加载失败,请稍后重试' title: '广告加载失败,请稍后重试'
@@ -334,21 +355,45 @@
} }
} else if (item.jumpType == 1) { } else if (item.jumpType == 1) {
let buttonUrl = item.buttonUrl let buttonUrl = item.buttonUrl
console.log(buttonUrl, 'debug')
if (item.title && item.title.indexOf('每周打卡奖励') != -1) { if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
buttonUrl = item.buttonUrl + '?source=2' buttonUrl = item.buttonUrl + '?source=2'
uni.navigateTo({
url: buttonUrl
})
} }
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) { if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
buttonUrl = item.buttonUrl + '?source=3' buttonUrl = item.buttonUrl + '?source=3'
uni.navigateTo({
url: buttonUrl
})
} }
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) { if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
buttonUrl =
`${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` let res = await taskReceive({
id: item.id
})
if (res.code == 0) {
uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none'
})
setTimeout(() => {
getTaskdata()
getsignIn()
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
// buttonUrl =
// `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
} }
uni.navigateTo({
url: buttonUrl
})
} else if (item.jumpType == 3) { } else if (item.jumpType == 3) {
uni.switchTab({ uni.switchTab({

View File

@@ -76,5 +76,6 @@ export const useCommonStore = defineStore("common", {
return true return true
} }
}, },
unistorage: true, // 开启后对 state 的数据读写都将持久化 unistorage: true, // 开启后对 state 的数据读写都将持久化
}); });