This commit is contained in:
GaoHao 2024-12-24 14:01:03 +08:00
commit a787c014cb
4 changed files with 55 additions and 15 deletions

View File

@ -27,7 +27,8 @@
"VideoPlayer" : {}, "VideoPlayer" : {},
"Camera" : {}, "Camera" : {},
"Record" : {}, "Record" : {},
"OAuth" : {} "OAuth" : {},
"Push" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {

View File

@ -1,11 +1,11 @@
<!-- 任务中心 --> <!-- 任务中心 -->
<template> <template>
<view class="container"> <view class="container">
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
<view class="task_bg u-absolute"> <view class="task_bg u-absolute">
<image class="task_bg" src="../../static/images/me/task_bg.png"></image> <image class="task_bg" src="../../static/images/me/task_bg.png"></image>
</view> </view>
<view class="navTitle"> <u-navbar v-if="!isIos" :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar>
<view class="navTitle" v-else>
<view></view> <view></view>
<view class="title">任务大厅</view> <view class="title">任务大厅</view>
<image @click="goNav({jumpType:1,buttonUrl:'/pages/me/index'})" class="navTitleIcon" <image @click="goNav({jumpType:1,buttonUrl:'/pages/me/index'})" class="navTitleIcon"
@ -31,11 +31,11 @@
:class="{active: item.showText == '待签到'||item.showText == '未签到'||item.showText == '已签到'}" :class="{active: item.showText == '待签到'||item.showText == '未签到'||item.showText == '已签到'}"
v-for="(item,index) in signInList" :key="index"> v-for="(item,index) in signInList" :key="index">
<image class="signIn_icon" v-if="item.showText == '未签到'" src="../../static/images/signIn_icon2.png" <image class="signIn_icon" v-if="item.showText == '未签到'" src="../../static/images/signIn_icon2.png"
mode=""> mode="" />
<image class="signIn_icon" v-if="item.showText == '已签到'" <image class="signIn_icon" v-if="item.showText == '已签到'"
src="../../static/images/signIn_icon3.png" mode=""> src="../../static/images/signIn_icon3.png" mode="" />
<image class="signIn_icon" v-if="item.showText != '未签到'&&item.showText != '已签到'" <image class="signIn_icon" v-if="item.showText != '未签到'&&item.showText != '已签到'"
src="../../static/images/signIn_icon1.png" mode=""> src="../../static/images/signIn_icon1.png" mode="" />
<view class="radius"></view> <view class="radius"></view>
<view class="_label">{{item.showText}}</view> <view class="_label">{{item.showText}}</view>
</view> </view>
@ -53,7 +53,7 @@
<view class="content margin-lr padding bg-white u-relative" v-if="list.length"> <view class="content margin-lr padding bg-white u-relative" v-if="list.length">
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" <view class="cell flex justify-between" v-for="(item,index) in list" :key="index"
v-if="(item.buttonUrl=='/me/invite/index'&&isShowMoneyPay)||item.buttonUrl!='/me/invite/index'"> v-if="((item.buttonUrl=='/me/invite/index'&&isShowMoneyPay)||item.buttonUrl!='/me/invite/index')||(isAndroid&&item.title =='观看视频奖励')">
<view class="cell_left flex"> <view class="cell_left flex">
<view class="cell_title flex"> <view class="cell_title flex">
<view class="u-font-28 text-bold title" <view class="u-font-28 text-bold title"
@ -126,22 +126,32 @@
], ],
signInBtn: '点击签到', signInBtn: '点击签到',
isShowMoneyPay: true, isShowMoneyPay: true,
isLoading: false isIos: false,
isLoading: false,
isAndroid: false,
} }
}, },
onShow() { onShow() {
this.getTaskdata() this.getTaskdata()
this.getsignIn() this.getsignIn()
this.$Request.getT("app/common/type/919", {}).then(res => { this.$Request.getT("app/common/type/919", {}).then(res => {
if (res.code == 0) { if (res.code == 0) {
const sysInfo = uni.getSystemInfoSync(); const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios' let isIos = sysInfo.platform == 'ios'
this.isIos = /iOS/.test(sysInfo.platform);
//
// #ifdef APP
this.isAndroid = sysInfo.platform === 'android'
// #endif
this.isShowMoneyPay = !(res.data.value == '1' && isIos) this.isShowMoneyPay = !(res.data.value == '1' && isIos)
} }
}); });
}, },
async onReady() { async onReady() {
this.isLoading = true; this.isLoading = true;
console.log(1)
// 广 // 广
setTimeout(() => { setTimeout(() => {
this.$refs.adRewardedVideo.load(); this.$refs.adRewardedVideo.load();
@ -149,6 +159,7 @@
}, },
methods: { methods: {
showAd() { showAd() {
console.log(this.isLoading)
if (this.isLoading) { if (this.isLoading) {
return return
} }
@ -156,6 +167,7 @@
}, },
onadload(e) { onadload(e) {
this.isLoading = false; this.isLoading = false;
console.log(2)
console.log('广告数据加载成功'); console.log('广告数据加载成功');
}, },
async onadclose(e) { async onadclose(e) {
@ -163,10 +175,25 @@
if (detail && detail.isEnded) { if (detail && detail.isEnded) {
// //
// /sqx_fast/app/ad/state // /sqx_fast/app/ad/state
let res = this.$Request.getT('app/ad/state', { let res = await this.$Request.getT('app/ad/state', {
extraKey: 1 extraKey: 1
}) })
console.log(res) this.$Request.get('/app/common/type/813').then(res => {
if (res.code == 0 && res.data.value) {
if (res.data.value == '是') {
this.getActivitys()
}
}
})
this.$Request.getT('/app/common/type/921').then(res => {
if (res.code == 0) {
console.log(res)
uni.showToast({
title: '获得'+res.data.value+'分钟免费时长',
icon: 'none'
})
}
})
} else { } else {
// 退 // 退
} }
@ -175,8 +202,12 @@
}, },
onaderror(e) { onaderror(e) {
// 广 // 广
console.log("广告加载失败")
this.isLoading = false; this.isLoading = false;
}, },
/**
* 获取签到数据
*/
getsignIn() { getsignIn() {
this.$Request.getT('app/userSignRecord/getUserSignData', {}).then(res => { this.$Request.getT('app/userSignRecord/getUserSignData', {}).then(res => {
if (res.code == 0) { if (res.code == 0) {
@ -199,6 +230,11 @@
} }
}) })
}, },
/**
* 校验是否为当天
* @param date
*/
isToday(date) { isToday(date) {
const today = new Date(); const today = new Date();
return date.getDate() === today.getDate() // return date.getDate() === today.getDate() //
@ -207,6 +243,7 @@
&& &&
date.getFullYear() === today.getFullYear(); // date.getFullYear() === today.getFullYear(); //
}, },
/** /**
* 跳转 * 跳转
* @param {Object} item * @param {Object} item
@ -215,10 +252,12 @@
// jumpType (integer, optional): 1 2 , // jumpType (integer, optional): 1 2 ,
// type (integer, optional): 1 2 9 , // type (integer, optional): 1 2 9 ,
// buttonUrl // buttonUrl
console.log(item)
if (item.jumpType == 0) { if (item.jumpType == 0) {
if (item.buttonTitle.indexOf("领取") != -1) { if (item.buttonTitle.indexOf("领取") != -1) {
this.taskReceive(item.id) this.taskReceive(item.id)
}if (item.buttonTitle.indexOf("观看视频") != -1) {
this.showAd()
} else { } else {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"

View File

@ -1,7 +1,7 @@
<!-- 任务中心 --> <!-- 任务中心 -->
<template> <template>
<view class="container"> <view class="container">
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> --> <u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false"></u-navbar>
<view class="task_bg u-relative"></view> <view class="task_bg u-relative"></view>
@ -24,7 +24,7 @@
return { return {
title: '', title: '',
background: { background: {
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)' backgroundImage: 'transparent'
}, },
list: [], list: [],
source: null source: null

View File

@ -1,7 +1,7 @@
<!-- 任务中心 --> <!-- 任务中心 -->
<template> <template>
<view class="container"> <view class="container">
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> --> <u-navbar :background="background" :is-back="true" :title="title" :border-bottom="false"></u-navbar>
<view class="task_bg u-relative"> <view class="task_bg u-relative">
<u-image class="task_bg" src="../../static/images/task/member_bg.png" ></u-image> <u-image class="task_bg" src="../../static/images/task/member_bg.png" ></u-image>
<view class="title ">每月打卡免费领</view> <view class="title ">每月打卡免费领</view>
@ -35,7 +35,7 @@
return { return {
title: '', title: '',
background: { background: {
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)' backgroundImage: 'transparent',
}, },
list: [], list: [],
source: null, source: null,