任务修改,会员权益修改
This commit is contained in:
@@ -17,14 +17,22 @@
|
||||
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
||||
<image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></image>
|
||||
</view>
|
||||
|
||||
<view class="content signIn margin-lr padding bg-white u-relative" style="margin-bottom: 32rpx;">
|
||||
<view v-if="enable!=0&&signInList.length>0" class="content signIn margin-lr padding bg-white u-relative" style="margin-bottom: 32rpx;">
|
||||
|
||||
<view class="title flex justify-between">
|
||||
<view>已连续签到 <text class="num">{{signDays}}</text> 天</view>
|
||||
<!-- <view class="dk flex">
|
||||
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||
</view> -->
|
||||
<view class="tooltip-trigger" @click="showTooltip">
|
||||
<u-icon name="question-circle" :size="40"></u-icon>
|
||||
<view class="tooltip" v-if="isTooltipVisible">
|
||||
签到中断后需重新签到
|
||||
<view class="triangle"></view>
|
||||
<view class="trianglef"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="signInList flex justify-between">
|
||||
<text class="line"></text>
|
||||
@@ -39,6 +47,7 @@
|
||||
src="../../static/images/signIn_icon1.png" mode="" />
|
||||
<view class="radius"></view>
|
||||
<view class="_label">{{item.showText}}</view>
|
||||
<view class="_label" style="font-size: 18rpx;color: #999;margin-top: 2rpx;">{{item.signDay.slice(6,10)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -50,11 +59,10 @@
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<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.show">
|
||||
<view class="cell_left flex">
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title"
|
||||
@@ -75,7 +83,7 @@
|
||||
</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-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}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -101,27 +109,9 @@
|
||||
list: [],
|
||||
checked: false,
|
||||
signDays: 0,
|
||||
signInList: [{
|
||||
name: '第一天'
|
||||
},
|
||||
{
|
||||
name: '第二天'
|
||||
},
|
||||
{
|
||||
name: '第三天'
|
||||
},
|
||||
{
|
||||
name: '第四天'
|
||||
},
|
||||
{
|
||||
name: '第五天'
|
||||
},
|
||||
{
|
||||
name: '第六天'
|
||||
},
|
||||
{
|
||||
name: '第七天'
|
||||
},
|
||||
enable: 0,
|
||||
signInList: [],
|
||||
recordList: [
|
||||
],
|
||||
signInBtn: '点击签到',
|
||||
isShowMoneyPay: true,
|
||||
@@ -129,9 +119,12 @@
|
||||
isAndroid: false,
|
||||
adRewardedVideo: true,
|
||||
urlCallback: null,
|
||||
isTooltipVisible: false,
|
||||
tooltipTimeout: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.signInList = []
|
||||
this.adRewardedVideo = true;
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
@@ -141,9 +134,7 @@
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isIos = /iOS/.test(sysInfo.platform);
|
||||
// 判断是否是安卓设备
|
||||
// #ifdef APP-PLUS
|
||||
this.isAndroid = sysInfo.platform === 'android'
|
||||
// #endif
|
||||
|
||||
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
@@ -153,9 +144,28 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 签到提示出发
|
||||
*/
|
||||
showTooltip() {
|
||||
clearTimeout(this.tooltipTimeout);
|
||||
this.isTooltipVisible = !this.isTooltipVisible;
|
||||
this.tooltipTimeout = setTimeout(() => {
|
||||
this.isTooltipVisible = false;
|
||||
}, 1000); // 1000毫秒后隐藏tooltip
|
||||
},
|
||||
|
||||
/**
|
||||
* 广告数据加载成功回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
onadload(e) {
|
||||
console.log('广告数据加载成功');
|
||||
},
|
||||
/**
|
||||
* 广告播放成功回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
async onadclose(e) {
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
@@ -177,6 +187,10 @@
|
||||
// 播放中途退出
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 广告加载失败回调
|
||||
* @param {Object} e
|
||||
*/
|
||||
onaderror(e) { // 广告加载失败
|
||||
this.adRewardedVideo = false;
|
||||
console.log("广告加载失败")
|
||||
@@ -189,6 +203,7 @@
|
||||
if (res.code == 0) {
|
||||
this.signInList = res.data.recordList
|
||||
this.signDays = res.data.signDays
|
||||
this.enable = res.data.enable
|
||||
this.signInList.map((item, index) => {
|
||||
if (item.showText == '待签到' && index > 0) {
|
||||
this.signInBtn = this.signInList[index - 1].status == 0 ? '重新签到' : '点击签到'
|
||||
@@ -247,14 +262,17 @@
|
||||
} else if (item.jumpType == 1) {
|
||||
let source, buttonUrl;
|
||||
buttonUrl = item.buttonUrl
|
||||
if (item.title && item.title.indexOf('每周') != -1) {
|
||||
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||
source = 2
|
||||
buttonUrl = item.buttonUrl + '?source=' + source
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月') != -1) {
|
||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||
source = 3
|
||||
buttonUrl = item.buttonUrl + '?source=' + source
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||
buttonUrl = `${item.buttonUrl}?standard=${item.discNumber==null?true:false}&taskId=${item.id}`
|
||||
}
|
||||
console.log(buttonUrl)
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
@@ -298,10 +316,21 @@
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.list= [];
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.list = res.data
|
||||
this.list.map(item=>{
|
||||
item.show = true
|
||||
})
|
||||
// #ifdef H5
|
||||
this.list.map(item=>{
|
||||
if(item.title.indexOf("观看视频") != -1) {
|
||||
item.show = false
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
@@ -320,10 +349,59 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
// width: 100%;
|
||||
// min-height: 100vh;
|
||||
page{
|
||||
background-color: #F3F4F8;
|
||||
}
|
||||
.tooltip-trigger {
|
||||
// background-color: #f0f0f0;
|
||||
// border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
box-shadow: 0rpx 4rpx 10rpx 4rpx rgba(140,140,140,0.35);
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
position: absolute;
|
||||
top: 80rpx;
|
||||
right: 30rpx;
|
||||
z-index: 10;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.triangle,.trianglef {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
right: 15rpx;
|
||||
top: -16rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 17rpx solid transparent;
|
||||
/* 左边的边框为透明 */
|
||||
border-right: 17rpx solid transparent;
|
||||
/* 右边的边框为透明 */
|
||||
border-bottom: 17rpx solid rgba(140,140,140,0.15);
|
||||
opacity: .9;
|
||||
z-index: 8;
|
||||
}
|
||||
.trianglef{
|
||||
top: -15rpx;
|
||||
right: 17rpx;
|
||||
border-left: 15rpx solid transparent;
|
||||
/* 左边的边框为透明 */
|
||||
border-right: 15rpx solid transparent;
|
||||
border-bottom: 15rpx solid #fff;
|
||||
z-index: 11;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
// height: 100vh;
|
||||
background-color: #F3F4F8;
|
||||
// padding-bottom: 132rpx;
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
@@ -486,7 +564,7 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 57rpx;
|
||||
bottom: 82rpx;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user