任务修改
This commit is contained in:
@@ -520,7 +520,6 @@
|
|||||||
this.wHeight = sysInfo.screenHeight
|
this.wHeight = sysInfo.screenHeight
|
||||||
this.boxStyle.height = this.wHeight + 5;
|
this.boxStyle.height = this.wHeight + 5;
|
||||||
// 记录跳转过来的视频总id跟单集id
|
// 记录跳转过来的视频总id跟单集id
|
||||||
console.log(e)
|
|
||||||
if (e.id) {
|
if (e.id) {
|
||||||
this.courseId = e.id;
|
this.courseId = e.id;
|
||||||
if (e.courseDetailsId && e.courseDetailsId != 'null') {
|
if (e.courseDetailsId && e.courseDetailsId != 'null') {
|
||||||
@@ -595,6 +594,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
appear(e, index) {
|
appear(e, index) {
|
||||||
|
this.courseDetailsId = e;
|
||||||
// 清除已经设置的定时器
|
// 清除已经设置的定时器
|
||||||
clearTimeout(this.appearTimeout);
|
clearTimeout(this.appearTimeout);
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<view v-if=" item.disabled " class="btn u-font-24 text-bold" :style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }" @click="goNav(item)">{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}</view>
|
<view v-if=" item.disabled " class="btn u-font-24 text-bold" :style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }" @click="goNav(item)">{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}</view>
|
||||||
<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}次`) }}</view>
|
<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}次`) }}</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 == 2 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view>
|
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-20 tip" @click="goNav({buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title})">{{ item.buttonUnderContent}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
// buttonUrl
|
// buttonUrl
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if ( item.jumpType == 0) {
|
if ( item.jumpType == 0) {
|
||||||
if ( item.buttonTitle == '去领取') {
|
if ( item.buttonTitle.indexOf("领取") != -1) {
|
||||||
this.taskReceive(item.id)
|
this.taskReceive(item.id)
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -156,8 +156,19 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if ( item.jumpType == 1) {
|
} else if ( item.jumpType == 1) {
|
||||||
|
let source,buttonUrl;
|
||||||
|
buttonUrl = item.buttonUrl
|
||||||
|
if ( item.title && item.title.indexOf('每周') != -1 ) {
|
||||||
|
source = 2
|
||||||
|
buttonUrl = item.buttonUrl+'?source='+source
|
||||||
|
}
|
||||||
|
if ( item.title && item.title.indexOf('每月') != -1 ) {
|
||||||
|
source = 3
|
||||||
|
buttonUrl = item.buttonUrl+'?source='+source
|
||||||
|
}
|
||||||
|
console.log(buttonUrl)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.buttonUrl
|
url: buttonUrl
|
||||||
})
|
})
|
||||||
} else if( item.jumpType == 3) {
|
} else if( item.jumpType == 3) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -222,6 +233,7 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.container{
|
.container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
background-color: #F3F4F8;
|
||||||
.task_bg{
|
.task_bg{
|
||||||
width: 100%!important;
|
width: 100%!important;
|
||||||
height: 494rpx!important;
|
height: 494rpx!important;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
<view class="content u-relative" v-if="list.length">
|
<view class="content 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" >
|
||||||
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image>
|
<image class="cell_icon" :src="item.url"></image>
|
||||||
<view class="name u-font-24 text-bold ">已领取</view>
|
<view class="name u-font-24 text-bold ">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -27,83 +27,29 @@
|
|||||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
|
source: null
|
||||||
isShowMoneyPay: true,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad(options) {
|
||||||
this.getTaskdata()
|
console.log(options)
|
||||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
if ( options.source ) {
|
||||||
if (res.code == 0) {
|
this.source = options.source
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
}
|
||||||
let isIos = sysInfo.platform == 'ios'
|
this.getList()
|
||||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* 跳转
|
|
||||||
* @param {Object} item
|
|
||||||
*/
|
|
||||||
goNav( item ) {
|
|
||||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
|
||||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
|
||||||
// buttonUrl
|
|
||||||
if ( item.jumpType == 0) {
|
|
||||||
this.taskReceive(item.id)
|
|
||||||
} else if ( item.jumpType == 1) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
} else if( item.jumpType == 3) {
|
|
||||||
uni.switchTab({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
} else if( item.jumpType == 2) {
|
|
||||||
plus.runtime.openURL(item.buttonUrl)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取
|
* 获取列表
|
||||||
*/
|
*/
|
||||||
taskReceive(id) {
|
getList() {
|
||||||
let data = {
|
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||||
id: id
|
|
||||||
}
|
|
||||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
|
||||||
if (res.code == 0 ) {
|
if (res.code == 0 ) {
|
||||||
uni.showToast({
|
this.list = res.data.records
|
||||||
title: id==15?'签到成功':'领取成功',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.getTaskdata()
|
|
||||||
this.getsignIn()
|
|
||||||
},1000)
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url: "/pages/index/index"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取任务列表
|
|
||||||
*/
|
|
||||||
getTaskdata() {
|
|
||||||
|
|
||||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {}).then(res => {
|
|
||||||
if (res.code == 0 ) {
|
|
||||||
this.list = res.data
|
|
||||||
}
|
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<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" >
|
||||||
<view class="cell_left flex">
|
<view class="cell_left flex">
|
||||||
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image>
|
<image class="cell_icon" :src="item.url"></image>
|
||||||
<view class="cell_title flex">
|
<view class="cell_title flex">
|
||||||
<view class="u-font-28 text-bold title">{{ item.title}}</view>
|
<view class="u-font-28 text-bold title">{{ item.name}}</view>
|
||||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
<!-- <view class="u-font-24 tip">{{ item.rewardDetail }}</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -38,83 +38,29 @@
|
|||||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
|
source: null,
|
||||||
isShowMoneyPay: true,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad(options) {
|
||||||
this.getTaskdata()
|
console.log(options)
|
||||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
if ( options.source ) {
|
||||||
if (res.code == 0) {
|
this.source = options.source
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
}
|
||||||
let isIos = sysInfo.platform == 'ios'
|
this.getList()
|
||||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* 跳转
|
|
||||||
* @param {Object} item
|
|
||||||
*/
|
|
||||||
goNav( item ) {
|
|
||||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
|
||||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
|
||||||
// buttonUrl
|
|
||||||
if ( item.jumpType == 0) {
|
|
||||||
this.taskReceive(item.id)
|
|
||||||
} else if ( item.jumpType == 1) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
} else if( item.jumpType == 3) {
|
|
||||||
uni.switchTab({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
|
||||||
} else if( item.jumpType == 2) {
|
|
||||||
plus.runtime.openURL(item.buttonUrl)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取
|
* 获取列表
|
||||||
*/
|
*/
|
||||||
taskReceive(id) {
|
getList() {
|
||||||
let data = {
|
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||||
id: id
|
|
||||||
}
|
|
||||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
|
||||||
if (res.code == 0 ) {
|
if (res.code == 0 ) {
|
||||||
uni.showToast({
|
this.list = res.data.records
|
||||||
title: id==15?'签到成功':'领取成功',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.getTaskdata()
|
|
||||||
this.getsignIn()
|
|
||||||
},1000)
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url: "/pages/index/index"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取任务列表
|
|
||||||
*/
|
|
||||||
getTaskdata() {
|
|
||||||
|
|
||||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
|
||||||
if (res.code == 0 ) {
|
|
||||||
this.list = res.data
|
|
||||||
}
|
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -154,7 +100,7 @@
|
|||||||
background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%);
|
background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
.title{
|
>.title{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -176,6 +122,7 @@
|
|||||||
padding: 32rpx 28rpx;
|
padding: 32rpx 28rpx;
|
||||||
.cell_left{
|
.cell_left{
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
.cell_icon{
|
.cell_icon{
|
||||||
width: 84rpx!important;
|
width: 84rpx!important;
|
||||||
height: 84rpx!important;
|
height: 84rpx!important;
|
||||||
@@ -184,15 +131,12 @@
|
|||||||
}
|
}
|
||||||
.cell_title{
|
.cell_title{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
align-items: flex-start;
|
|
||||||
margin-bottom: 12rpx;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
.title{
|
.title{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip{
|
.tip{
|
||||||
|
|||||||
Reference in New Issue
Block a user