Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test
This commit is contained in:
commit
432c9b3123
|
|
@ -78,7 +78,8 @@
|
|||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onReachBottom
|
||||
onReachBottom,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import contentlist from './components/contentlist.vue'
|
||||
import {
|
||||
|
|
@ -92,6 +93,10 @@
|
|||
useCommonStore
|
||||
} from '@/store/common.js'
|
||||
const $common = useCommonStore()
|
||||
onShow(()=>{
|
||||
// 判断ios是否审核
|
||||
$common.init()
|
||||
})
|
||||
let datas = reactive({
|
||||
noticeList: [], //公告列表
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
freeNumDay: 0,
|
||||
list: [],
|
||||
selectData: "",
|
||||
source:1
|
||||
source: 1
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
|
|
@ -120,6 +120,11 @@
|
|||
})
|
||||
// 奖品的索引
|
||||
this.$refs.dialer.run(indexs)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无抽奖次数',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 抽奖次数
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
|
||||
<script setup>
|
||||
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 { linkTo } from '@/utils/app.js';
|
||||
import {
|
||||
|
|
@ -122,6 +122,10 @@ const userInfo = ref({});
|
|||
|
||||
// 获取最近的三条观看历史
|
||||
const recordThree = ref([]);
|
||||
onShow(()=>{
|
||||
// 判断ios是否审核
|
||||
$common.init()
|
||||
})
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<text class="" style="font-size: 28rpx;">
|
||||
{{ item.status == 1 ? '已签到' : '待签到' }}
|
||||
</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) }}
|
||||
</view>
|
||||
<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.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
</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.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
||||
|
|
@ -62,8 +62,8 @@
|
|||
<!-- 激励视频广告 -->
|
||||
<view style="width: 0;height: 0;overflow: hidden;">
|
||||
<!-- 激励视频广告 -->
|
||||
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true"
|
||||
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
|
||||
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" :url-callback="datas.urlCallback"
|
||||
@load="onadload" @close="onadclose" @error="onaderror">
|
||||
</ad-rewarded-video>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -110,11 +110,12 @@
|
|||
})
|
||||
const adRewarded = ref(null);
|
||||
onShow(() => {
|
||||
$common.init()
|
||||
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
||||
// datas.adpid = 1531580352
|
||||
// datas.adpid = 1531580352
|
||||
// }
|
||||
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
|
||||
datas.adpid = 1373604770
|
||||
datas.adpid = 1373604770
|
||||
// }
|
||||
if (uni.getStorageSync("token")) {
|
||||
getTaskdata()
|
||||
|
|
@ -294,8 +295,28 @@
|
|||
url: urls
|
||||
})
|
||||
} else {
|
||||
console.log(item, '林区')
|
||||
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({
|
||||
id: item.id
|
||||
})
|
||||
|
|
@ -315,7 +336,7 @@
|
|||
}
|
||||
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
|
||||
// 首次加载广告
|
||||
if(!datas.adRewardedShow){
|
||||
if (!datas.adRewardedShow) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '广告加载失败,请稍后重试'
|
||||
|
|
@ -334,21 +355,45 @@
|
|||
}
|
||||
} else if (item.jumpType == 1) {
|
||||
let buttonUrl = item.buttonUrl
|
||||
console.log(buttonUrl, 'debug')
|
||||
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||
buttonUrl = item.buttonUrl + '?source=2'
|
||||
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
})
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||
buttonUrl = item.buttonUrl + '?source=3'
|
||||
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
})
|
||||
}
|
||||
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) {
|
||||
uni.switchTab({
|
||||
|
|
|
|||
|
|
@ -76,5 +76,6 @@ export const useCommonStore = defineStore("common", {
|
|||
return true
|
||||
}
|
||||
},
|
||||
|
||||
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
||||
});
|
||||
Loading…
Reference in New Issue