ios审核判断,抽奖没次数提示

This commit is contained in:
duan
2025-01-16 09:50:25 +08:00
parent d255512ade
commit 0cee26f44a
5 changed files with 22 additions and 5 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

@@ -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

@@ -110,10 +110,12 @@
}) })
const adRewarded = ref(null); const adRewarded = ref(null);
onShow(() => { onShow(() => {
if ( uni.getSystemInfoSync().platform == 'android' ) { // 判断ios是否审核
$common.init()
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")) {

View File

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