下载地址复制修改
This commit is contained in:
@@ -1,198 +0,0 @@
|
|||||||
<!-- 任务中心 -->
|
|
||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"></u-navbar>
|
|
||||||
<view class="task_bg u-absolute">
|
|
||||||
<u-image class="task_bg" src="../../static/images/me/task_bg.png" ></u-image>
|
|
||||||
</view>
|
|
||||||
<view class="icon u-relative padding">
|
|
||||||
<u-image class="task_icon1 u-relative" src="../../static/images/me/task_icon1.png"></u-image>
|
|
||||||
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
|
||||||
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
|
||||||
</view>
|
|
||||||
<view class="content margin-lr padding bg-white u-relative" v-if="cellList.length>0">
|
|
||||||
|
|
||||||
<view class="cell flex justify-between" v-for="(item,index) in cellList" :key="index">
|
|
||||||
<view class="cell_left flex">
|
|
||||||
<view class="cell_title flex">
|
|
||||||
<view class="u-font-28 text-bold">{{ item.title}}</view>
|
|
||||||
<u-image v-if="item.rewardImg " class="cell_icon" :src="item.rewardImg "></u-image>
|
|
||||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="subhead u-font-24">{{ item.detail }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="cell_right flex">
|
|
||||||
<view v-if=" item.type == 2 " class="btn u-font-24 text-bold opt" @click="goNav(item)">{{ item.buttonTitle }}</view>
|
|
||||||
<view v-else-if=" item.type == 3 " class="btn u-font-24 text-bold disabled">{{ item.buttonTitle }}</view>
|
|
||||||
<view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view>
|
|
||||||
<!-- <view v-if=" item.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: '',
|
|
||||||
page: 1,
|
|
||||||
limit: 999,
|
|
||||||
background: {
|
|
||||||
backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)'
|
|
||||||
},
|
|
||||||
cellList: [
|
|
||||||
{
|
|
||||||
title: '分享奖励', type: 1, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励888金币', detail: '分享好友即可获得', buttonTitle:'立即分享'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '每日签到奖励', type: 2, url: '/pages/index/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励8898金币', detail: '每日付款满3笔即可获得', buttonTitle:'立即看剧'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '每周打卡奖励', type: 3, url: '/me/invite/index', rewardImg: '', rewardDetail: '', detail: '签到满7天即可获得丰富好礼', buttonTitle:'剩余23次'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '每月打卡奖励1', type: 4, url: '/me/invite/index', rewardImg: '', rewardDetail: '', detail: '当月签到满21天获得丰富好礼', buttonTitle:'剩余233次'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '每月打卡奖励2', type: 5, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon4.png', rewardDetail: '奖励金币', detail: '当月签到满21天即可免费领取', buttonTitle:'立即领取'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '观看视频奖励', type: 6, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励金币', detail: '观看完整视频即可获得奖励', buttonTitle:'观看视频'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.getvipdata()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//
|
|
||||||
goNav( item ) {
|
|
||||||
console.log(url)
|
|
||||||
if ( type == 2) {
|
|
||||||
uni.switchTab({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
getvipdata() {
|
|
||||||
let data = {
|
|
||||||
page: this.page,
|
|
||||||
limit: this.limit
|
|
||||||
}
|
|
||||||
this.$Request.getT('app/taskCenter/selectTaskCenter', data).then(res => {
|
|
||||||
if (res.code == 0 ) {
|
|
||||||
this.cellList = res.data.records
|
|
||||||
} else {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.container{
|
|
||||||
width: 100%;
|
|
||||||
.task_bg{
|
|
||||||
width: 100%!important;
|
|
||||||
height: 494rpx!important;
|
|
||||||
}
|
|
||||||
.icon{
|
|
||||||
.icon_title{
|
|
||||||
color: #000000;
|
|
||||||
margin-left: 28rpx;
|
|
||||||
top: -20rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
.task_icon1{
|
|
||||||
width: 74rpx!important;
|
|
||||||
height: 78rpx!important;
|
|
||||||
margin-left: 235rpx;
|
|
||||||
}
|
|
||||||
.task_icon2{
|
|
||||||
width: 126rpx!important;
|
|
||||||
height: 120rpx!important;
|
|
||||||
top: -40rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content{
|
|
||||||
border-radius: 16rpx;
|
|
||||||
top: -115rpx;
|
|
||||||
padding: 28rpx;
|
|
||||||
.cell{
|
|
||||||
align-items: center;
|
|
||||||
padding: 32rpx 0;
|
|
||||||
border-bottom: 2rpx solid #EBEBEB;
|
|
||||||
.cell_left{
|
|
||||||
flex-direction: column;
|
|
||||||
.cell_title{
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 12rpx;
|
|
||||||
color: #333;
|
|
||||||
.cell_icon{
|
|
||||||
width: 34rpx!important;
|
|
||||||
height: 34rpx!important;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
}
|
|
||||||
.tip{
|
|
||||||
margin-left: 22rpx;
|
|
||||||
color: #FC5B67;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.subhead{
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.cell_right{
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
.btn{
|
|
||||||
width: 148rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #EC6F48;
|
|
||||||
color: #FFFFFF;
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
}
|
|
||||||
.tip{
|
|
||||||
color: #666;
|
|
||||||
height: 44rpx;
|
|
||||||
line-height: 44rpx;
|
|
||||||
}
|
|
||||||
.opt{
|
|
||||||
color: #D39B7E;
|
|
||||||
background-color: #FBF3EB;
|
|
||||||
}
|
|
||||||
.disabled{
|
|
||||||
color: #999999;
|
|
||||||
background-color: #E2E2E2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.cell:last-child{
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -270,12 +270,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "消息中心"
|
"navigationBarTitleText": "消息中心"
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "task/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "任务中心",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "course/index",
|
"path": "course/index",
|
||||||
|
|||||||
@@ -43,12 +43,7 @@
|
|||||||
this.show_share = false;
|
this.show_share = false;
|
||||||
},
|
},
|
||||||
taobaoLogin() {
|
taobaoLogin() {
|
||||||
uni.setClipboardData({
|
|
||||||
data: this.relationId,
|
|
||||||
success: r => {
|
|
||||||
// this.$queue.showToast('邀请码复制成功');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var u = navigator.userAgent;
|
var u = navigator.userAgent;
|
||||||
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
||||||
this.$Request.get('/app/common/type/49').then(res => {
|
this.$Request.get('/app/common/type/49').then(res => {
|
||||||
@@ -69,6 +64,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.show_share = true;
|
this.show_share = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
plus.runtime.openURL(res.data.value, function(res) {
|
||||||
@@ -76,6 +72,12 @@
|
|||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: res.data.value,
|
||||||
|
success: r => {
|
||||||
|
// this.$queue.showToast('邀请码复制成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
window.location.href = res.data.value;
|
window.location.href = res.data.value;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
@@ -108,6 +110,12 @@
|
|||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: res.data.value,
|
||||||
|
success: r => {
|
||||||
|
// this.$queue.showToast('邀请码复制成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
window.location.href = res.data.value;
|
window.location.href = res.data.value;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
我的积分
|
我的积分
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="statistics-box-item" @click="goNav('/me/invite/cashDetail',{amount: userInfo.amount})">
|
<view class="statistics-box-item" @click="goNav('/me/invite/cashDetail')">
|
||||||
<view class="statistics-box-item-top">
|
<view class="statistics-box-item-top">
|
||||||
{{userInfo.amount || '0.00'}}
|
{{userInfo.amount || '0.00'}}
|
||||||
</view>
|
</view>
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
<u-badge :offset="[0,20]" type="error" :count="numCount"></u-badge>
|
<u-badge :offset="[0,20]" type="error" :count="numCount"></u-badge>
|
||||||
</view>
|
</view>
|
||||||
<view class="tool-box-content-item flex align-center justify-center flex-wrap"
|
<view class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||||
@click="goNav('/me/task/index')">
|
@click="goNav('/pages/task/index','tabbar')">
|
||||||
<view class="tool-box-content-item-img">
|
<view class="tool-box-content-item-img">
|
||||||
<image src="../../static/images/me/task.png" mode=""></image>
|
<image src="../../static/images/me/task.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -554,15 +554,20 @@
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goNav(e,options) {
|
goNav(e,type) {
|
||||||
|
console.log(e)
|
||||||
let token = uni.getStorageSync('token')
|
let token = uni.getStorageSync('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
if (options&&options.amount) {
|
if (type == 'tabbar') {
|
||||||
e = `${e}?amount=${options.amount}`
|
uni.switchTab({
|
||||||
|
url: e
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: e
|
||||||
|
})
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
|
||||||
url: e
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/login"
|
url: "/pages/login/login"
|
||||||
|
|||||||
@@ -15,17 +15,17 @@
|
|||||||
<view class="cell flex justify-between" v-for="(item,index) in cellList" :key="index">
|
<view class="cell flex justify-between" v-for="(item,index) in cellList" :key="index">
|
||||||
<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">{{ item.title}}</view>
|
<view class="u-font-28 text-bold title" :style="{alignSelf: item.rewardImg?'center':'flex-start'}">{{ item.title}}</view>
|
||||||
<u-image v-if="item.rewardImg " class="cell_icon" :src="item.rewardImg "></u-image>
|
<u-image v-if="item.rewardImg" class="cell_icon" :src="item.rewardImg "></u-image>
|
||||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="subhead u-font-24">{{ item.detail }}</view>
|
<view class="subhead u-font-24">{{ item.detail }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell_right flex">
|
<view class="cell_right flex">
|
||||||
<view v-if=" item.type == 2 " class="btn u-font-24 text-bold opt" @click="goNav(item)">{{ item.buttonTitle }}</view>
|
<view v-if=" !item.disabled " class="btn u-font-24 text-bold" :style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }" @click="goNav(item)">{{ item.buttonTitle }}</view>
|
||||||
<view v-else-if=" item.type == 3 " class="btn u-font-24 text-bold disabled">{{ item.buttonTitle }}</view>
|
<view v-else class="btn u-font-24 text-bold disabled">{{ item.buttonTitle }}</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.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view>
|
<!-- <view v-if=" item.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -48,22 +48,22 @@
|
|||||||
},
|
},
|
||||||
cellList: [
|
cellList: [
|
||||||
{
|
{
|
||||||
title: '分享奖励', type: 1, url: '/me/invite/index', icon: '../../static/images/me/task_icon3.png', tip: '奖励888金币', subhead: '分享好友即可获得', btnText:'立即分享'
|
title: '分享奖励', type: 1, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励888金币', detail: '分享好友即可获得', buttonTitle:'立即分享'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '每日签到奖励', type: 2, url: '/pages/index/index', icon: '../../static/images/me/task_icon3.png', tip: '奖励8898金币', subhead: '每日付款满3笔即可获得', btnText:'立即看剧'
|
title: '每日签到奖励', type: 2, url: '/pages/index/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励8898金币', detail: '每日付款满3笔即可获得', buttonTitle:'立即看剧'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '每周打卡奖励', type: 3, url: '/me/invite/index', icon: '', tip: '', subhead: '签到满7天即可获得丰富好礼', btnText:'剩余23次'
|
title: '每周打卡奖励', type: 3, url: '/me/invite/index', rewardImg: '', rewardDetail: '', detail: '签到满7天即可获得丰富好礼', buttonTitle:'剩余23次'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '每月打卡奖励1', type: 4, url: '/me/invite/index', icon: '', tip: '', subhead: '当月签到满21天获得丰富好礼', btnText:'剩余233次'
|
title: '每月打卡奖励1', type: 4, url: '/me/invite/index', rewardImg: '', rewardDetail: '', detail: '当月签到满21天获得丰富好礼', buttonTitle:'剩余233次'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '每月打卡奖励2', type: 5, url: '/me/invite/index', icon: '../../static/images/me/task_icon4.png', tip: '奖励金币', subhead: '当月签到满21天即可免费领取', btnText:'立即领取'
|
title: '每月打卡奖励2', type: 5, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon4.png', rewardDetail: '奖励金币', detail: '当月签到满21天即可免费领取', buttonTitle:'立即领取'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '观看视频奖励', type: 6, url: '/me/invite/index', icon: '../../static/images/me/task_icon3.png', tip: '奖励金币', subhead: '观看完整视频即可获得奖励', btnText:'观看视频'
|
title: '观看视频奖励', type: 6, url: '/me/invite/index', rewardImg: '../../static/images/me/task_icon3.png', rewardDetail: '奖励金币', detail: '观看完整视频即可获得奖励', buttonTitle:'观看视频'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -75,14 +75,21 @@
|
|||||||
//
|
//
|
||||||
goNav( item ) {
|
goNav( item ) {
|
||||||
console.log(url)
|
console.log(url)
|
||||||
if ( type == 2) {
|
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||||
|
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||||
|
// buttonUrl
|
||||||
|
|
||||||
|
if ( item.jumpType == 1) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: item.buttonUrl
|
||||||
|
})
|
||||||
|
|
||||||
|
} else if( item.jumpType == 3) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: item.buttonUrl
|
url: item.buttonUrl
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -146,6 +153,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12rpx;
|
margin-bottom: 12rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
.title{
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
.cell_icon{
|
.cell_icon{
|
||||||
width: 34rpx!important;
|
width: 34rpx!important;
|
||||||
height: 34rpx!important;
|
height: 34rpx!important;
|
||||||
@@ -163,6 +173,8 @@
|
|||||||
.cell_right{
|
.cell_right{
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 20rpx;
|
||||||
.btn{
|
.btn{
|
||||||
width: 148rpx;
|
width: 148rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user