修改问题
This commit is contained in:
@@ -186,14 +186,14 @@ export default {
|
|||||||
},
|
},
|
||||||
toRed() {
|
toRed() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/invite/cashDetail'
|
url: '/me/yaoqing/ymg-yaoqing-tixian'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toGift() {
|
toGift() {
|
||||||
console.log('1');
|
console.log('1');
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/gift/gift?source=' + this.source
|
url: '/me/giftczgw/giftczgw?source=' + this.source
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 重新生成
|
// 重新生成
|
||||||
|
|||||||
@@ -63,11 +63,8 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<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" v-if="item.shows">
|
||||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index"
|
|
||||||
v-if="(item.buttonUrl=='/me/yaoqing/ymf-yaoqing-home'&&isShowMoneyPay)||item.buttonUrl!='/me/yaoqing/ymf-yaoqing-home'">
|
|
||||||
<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"
|
||||||
@@ -81,21 +78,25 @@
|
|||||||
<view v-if="item.disabled" class="btn u-font-24 text-bold"
|
<view v-if="item.disabled" class="btn u-font-24 text-bold"
|
||||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
||||||
@click="goNav(item)">
|
@click="goNav(item)">
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
||||||
</view>
|
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
||||||
<view v-else class="btn u-font-24 text-bold disabled">
|
<view v-else class="btn u-font-24 text-bold disabled">
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||||
</view>
|
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
||||||
<!-- <view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> -->
|
<!-- <view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> -->
|
||||||
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-20 tip"
|
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class="u-font-22 tip"
|
||||||
@click="goNav({buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title})">
|
@click="goNav({ id: item.id, buttonUrl: item.buttonUnderUrl, jumpType: 1, title: item.title, disabled: item.disabled, discNumber: item.discNumber })">
|
||||||
{{ item.buttonUnderContent }}
|
{{ item.buttonUnderContent }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 激励视频广告 -->
|
||||||
|
<ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true"
|
||||||
|
v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose"
|
||||||
|
@error="onaderror">
|
||||||
|
<view class="ad-error" v-if="error">{{ error }}</view>
|
||||||
|
</ad-rewarded-video>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -117,7 +118,10 @@
|
|||||||
signDays: 0,
|
signDays: 0,
|
||||||
signInList: [],
|
signInList: [],
|
||||||
signInBtn: '点击签到',
|
signInBtn: '点击签到',
|
||||||
isShowMoneyPay: true,
|
isShowMoneyPay: true, adRewardedVideo: true,
|
||||||
|
adRewardedVideoloadNum: 0,
|
||||||
|
urlCallback: null,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -135,8 +139,62 @@
|
|||||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.adRewardedVideoloadNum = 0
|
||||||
|
this.$refs.adRewardedVideo.load();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
onadload(e) {
|
||||||
|
this.adRewardedVideo = true;
|
||||||
|
console.log('广告数据加载成功');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告加载失败回调
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
onaderror(e) {
|
||||||
|
if ( this.adRewardedVideoloadNum >=3 ) {
|
||||||
|
this.adRewardedVideo = false;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.adRewardedVideoloadNum++
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.adRewardedVideo.load();
|
||||||
|
}, 1000); // 10
|
||||||
|
console.log("广告加载失败")
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告播放成功回调
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
async onadclose(e) {
|
||||||
|
const detail = e.detail
|
||||||
|
if (detail && detail.isEnded) {
|
||||||
|
// 正常播放结束
|
||||||
|
// /sqx_fast/app/ad/state
|
||||||
|
let res = await this.$Request.getT('app/ad/state', {
|
||||||
|
extraKey: this.urlCallback.extra
|
||||||
|
})
|
||||||
|
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 {
|
||||||
|
// 播放中途退出
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//乘法函数,用来得到精确的乘法结果
|
//乘法函数,用来得到精确的乘法结果
|
||||||
//说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
|
//说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
|
||||||
//调用:mul(arg1,arg2)
|
//调用:mul(arg1,arg2)
|
||||||
@@ -300,48 +358,56 @@
|
|||||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||||
// buttonUrl
|
// buttonUrl
|
||||||
let source, buttonUrl;
|
console.log(item, '调试11111')
|
||||||
buttonUrl = item.buttonUrl
|
|
||||||
|
|
||||||
console.log(item)
|
|
||||||
if (item.buttonUrl == '/me/invite/index') {
|
|
||||||
buttonUrl = "/me/yaoqing/ymf-yaoqing-home"
|
|
||||||
}
|
|
||||||
if (item.buttonUrl == '/me/invite/zhifubao') {
|
|
||||||
buttonUrl = "/me/yaoqing/zhifubao-tixain"
|
|
||||||
}
|
|
||||||
if (item.buttonUrl == '/me/choujiang/choujiang') {
|
|
||||||
buttonUrl = "/me/VjgyqAzklr/VjgyqAzklr"
|
|
||||||
}
|
|
||||||
if (item.jumpType == 0) {
|
if (item.jumpType == 0) {
|
||||||
console.log("============", item.buttonTitle);
|
|
||||||
if (item.buttonTitle.indexOf("领取") != -1) {
|
if (item.buttonTitle.indexOf("领取") != -1) {
|
||||||
this.taskReceive(item.id)
|
this.taskReceive(item.id)
|
||||||
|
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
|
||||||
|
// 首次加载广告
|
||||||
|
this.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userId'),
|
||||||
|
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
|
this.$refs.adRewardedVideo.show();
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.switchTab({
|
||||||
url: '/pages/index/index2'
|
url: "/pages/index/index2"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (item.jumpType == 1) {
|
} else if (item.jumpType == 1) {
|
||||||
console.log("--------------");
|
let source, buttonUrl;
|
||||||
if (item.title && item.title.indexOf('每周') != -1) {
|
buttonUrl = item.buttonUrl
|
||||||
|
console.log(item.title && item.title.indexOf('每周打卡奖励') != -1)
|
||||||
|
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||||
source = 2
|
source = 2
|
||||||
buttonUrl = item.buttonUrl + '?source=' + source
|
buttonUrl = item.buttonUrl + '?source=' + source
|
||||||
}
|
}
|
||||||
if (item.title && item.title.indexOf('每月') != -1) {
|
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||||
source = 3
|
source = 3
|
||||||
buttonUrl = item.buttonUrl + '?source=' + source
|
buttonUrl = item.buttonUrl + '?source=' + source
|
||||||
}
|
}
|
||||||
console.log(buttonUrl)
|
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||||
|
buttonUrl = `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||||
|
}
|
||||||
|
console.log(buttonUrl, 'debug')
|
||||||
|
if (buttonUrl == '/me/invite/index') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/yaoqing/ymf-yaoqing-home'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: buttonUrl
|
url: buttonUrl
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else if (item.jumpType == 3) {
|
} else if (item.jumpType == 3) {
|
||||||
uni.navigateTo({
|
uni.switchTab({
|
||||||
url: '/pages/index/index2'
|
url: item.buttonUrl
|
||||||
})
|
})
|
||||||
} else if (item.jumpType == 2) {
|
} else if (item.jumpType == 2) {
|
||||||
plus.runtime.openURL(buttonUrl)
|
plus.runtime.openURL(item.buttonUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -364,7 +430,7 @@
|
|||||||
this.getsignIn()
|
this.getsignIn()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.switchTab({
|
||||||
url: '/pages/index/index2'
|
url: '/pages/index/index2'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
* 获取列表
|
* 获取列表
|
||||||
*/
|
*/
|
||||||
getList() {
|
getList() {
|
||||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
this.$Request.getT('/app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||||
if (res.code == 0 ) {
|
if (res.code == 0 ) {
|
||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
* 获取列表
|
* 获取列表
|
||||||
*/
|
*/
|
||||||
getList() {
|
getList() {
|
||||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
this.$Request.getT('/app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||||
if (res.code == 0 ) {
|
if (res.code == 0 ) {
|
||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user