Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test
This commit is contained in:
commit
a787c014cb
|
|
@ -27,7 +27,8 @@
|
|||
"VideoPlayer" : {},
|
||||
"Camera" : {},
|
||||
"Record" : {},
|
||||
"OAuth" : {}
|
||||
"OAuth" : {},
|
||||
"Push" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar> -->
|
||||
<view class="task_bg u-absolute">
|
||||
<image class="task_bg" src="../../static/images/me/task_bg.png"></image>
|
||||
</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 class="title">任务大厅</view>
|
||||
<image @click="goNav({jumpType:1,buttonUrl:'/pages/me/index'})" class="navTitleIcon"
|
||||
|
|
@ -31,11 +31,11 @@
|
|||
:class="{active: item.showText == '待签到'||item.showText == '未签到'||item.showText == '已签到'}"
|
||||
v-for="(item,index) in signInList" :key="index">
|
||||
<image class="signIn_icon" v-if="item.showText == '未签到'" src="../../static/images/signIn_icon2.png"
|
||||
mode="">
|
||||
mode="" />
|
||||
<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 != '已签到'"
|
||||
src="../../static/images/signIn_icon1.png" mode="">
|
||||
src="../../static/images/signIn_icon1.png" mode="" />
|
||||
<view class="radius"></view>
|
||||
<view class="_label">{{item.showText}}</view>
|
||||
</view>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<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"
|
||||
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_title flex">
|
||||
<view class="u-font-28 text-bold title"
|
||||
|
|
@ -126,22 +126,32 @@
|
|||
],
|
||||
signInBtn: '点击签到',
|
||||
isShowMoneyPay: true,
|
||||
isLoading: false
|
||||
isIos: false,
|
||||
isLoading: false,
|
||||
isAndroid: false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
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)
|
||||
}
|
||||
});
|
||||
},
|
||||
async onReady() {
|
||||
this.isLoading = true;
|
||||
console.log(1)
|
||||
// 首次加载广告
|
||||
setTimeout(() => {
|
||||
this.$refs.adRewardedVideo.load();
|
||||
|
|
@ -149,6 +159,7 @@
|
|||
},
|
||||
methods: {
|
||||
showAd() {
|
||||
console.log(this.isLoading)
|
||||
if (this.isLoading) {
|
||||
return
|
||||
}
|
||||
|
|
@ -156,6 +167,7 @@
|
|||
},
|
||||
onadload(e) {
|
||||
this.isLoading = false;
|
||||
console.log(2)
|
||||
console.log('广告数据加载成功');
|
||||
},
|
||||
async onadclose(e) {
|
||||
|
|
@ -163,10 +175,25 @@
|
|||
if (detail && detail.isEnded) {
|
||||
// 正常播放结束
|
||||
// /sqx_fast/app/ad/state
|
||||
let res = this.$Request.getT('app/ad/state', {
|
||||
let res = await this.$Request.getT('app/ad/state', {
|
||||
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 {
|
||||
// 播放中途退出
|
||||
}
|
||||
|
|
@ -175,8 +202,12 @@
|
|||
},
|
||||
onaderror(e) {
|
||||
// 广告加载失败
|
||||
console.log("广告加载失败")
|
||||
this.isLoading = false;
|
||||
},
|
||||
/**
|
||||
* 获取签到数据
|
||||
*/
|
||||
getsignIn() {
|
||||
this.$Request.getT('app/userSignRecord/getUserSignData', {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
|
|
@ -199,6 +230,11 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 校验是否为当天
|
||||
* @param date
|
||||
*/
|
||||
isToday(date) {
|
||||
const today = new Date();
|
||||
return date.getDate() === today.getDate() // 比较日期
|
||||
|
|
@ -207,6 +243,7 @@
|
|||
&&
|
||||
date.getFullYear() === today.getFullYear(); // 比较年份
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} item
|
||||
|
|
@ -215,10 +252,12 @@
|
|||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||
// buttonUrl
|
||||
console.log(item)
|
||||
|
||||
if (item.jumpType == 0) {
|
||||
if (item.buttonTitle.indexOf("领取") != -1) {
|
||||
this.taskReceive(item.id)
|
||||
}if (item.buttonTitle.indexOf("观看视频") != -1) {
|
||||
this.showAd()
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<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>
|
||||
|
||||
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
return {
|
||||
title: '',
|
||||
background: {
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
backgroundImage: 'transparent'
|
||||
},
|
||||
list: [],
|
||||
source: null
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!-- 任务中心 -->
|
||||
<template>
|
||||
<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">
|
||||
<u-image class="task_bg" src="../../static/images/task/member_bg.png" ></u-image>
|
||||
<view class="title ">每月打卡免费领</view>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
return {
|
||||
title: '',
|
||||
background: {
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
backgroundImage: 'transparent',
|
||||
},
|
||||
list: [],
|
||||
source: null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue