1
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="signInList flex justify-between">
|
||||
<text class="line"></text>
|
||||
<view class="signIn-Item"
|
||||
@@ -42,12 +42,12 @@
|
||||
</view>
|
||||
|
||||
<view class="tishi">连续签到7天即可获得7元奖励</view>
|
||||
|
||||
<view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})">
|
||||
|
||||
<!-- <view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})">
|
||||
<view>{{signInBtn}}</view>
|
||||
<view class="signInBtnBg"></view>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||
@@ -73,7 +73,7 @@
|
||||
{{ 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-if=" item.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view> -->
|
||||
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip" @click="goNav({buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title})">{{ item.buttonUnderContent}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
@@ -192,10 +192,10 @@
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -215,18 +215,29 @@
|
||||
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||
// buttonUrl
|
||||
|
||||
if (item.jumpType == 0) {
|
||||
if (item.buttonTitle == '去领取') {
|
||||
console.log(item)
|
||||
if ( item.jumpType == 0) {
|
||||
if ( item.buttonTitle.indexOf("领取") != -1) {
|
||||
this.taskReceive(item.id)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
} 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({
|
||||
url: item.buttonUrl
|
||||
url: buttonUrl
|
||||
})
|
||||
} else if (item.jumpType == 3) {
|
||||
uni.switchTab({
|
||||
@@ -291,10 +302,17 @@
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100%;
|
||||
<<<<<<< HEAD
|
||||
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
=======
|
||||
background-color: #F3F4F8;
|
||||
.task_bg{
|
||||
width: 100%!important;
|
||||
height: 494rpx!important;
|
||||
>>>>>>> 2ff5ebfd71042121cad90bd9b88c9372dbf8871d
|
||||
}
|
||||
|
||||
.icon {
|
||||
@@ -395,11 +413,17 @@
|
||||
color: #FFFFFF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.tip {
|
||||
color: #666;
|
||||
=======
|
||||
.tip{
|
||||
color: #EC6F48;
|
||||
>>>>>>> 2ff5ebfd71042121cad90bd9b88c9372dbf8871d
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.opt {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<view class="content u-relative" v-if="list.length">
|
||||
|
||||
<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>
|
||||
<view class="name u-font-24 text-bold ">已领取</view>
|
||||
<image class="cell_icon" :src="item.url"></image>
|
||||
<view class="name u-font-24 text-bold ">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -27,83 +27,29 @@
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
},
|
||||
list: [],
|
||||
|
||||
isShowMoneyPay: true,
|
||||
source: null
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTaskdata()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if ( options.source ) {
|
||||
this.source = options.source
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
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) {
|
||||
let data = {
|
||||
id: id
|
||||
}
|
||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||
getList() {
|
||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
uni.showToast({
|
||||
title: id==15?'签到成功':'领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
},1000)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.list = res.data
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,16 +15,12 @@
|
||||
</view>
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index" >
|
||||
<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="u-font-28 text-bold title">{{ item.title}}</view>
|
||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
||||
<view class="u-font-28 text-bold title">{{ item.name}}</view>
|
||||
<!-- <view class="u-font-24 tip">{{ item.rewardDetail }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell_right flex">
|
||||
<view v-if=" item.disabled " class="btn u-font-24 text-bold" @click="goNav(item)">领取</view>
|
||||
<view v-else class="btn u-font-24 text-bold receive">已领取</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -42,83 +38,29 @@
|
||||
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
|
||||
},
|
||||
list: [],
|
||||
|
||||
isShowMoneyPay: true,
|
||||
source: null,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTaskdata()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if ( options.source ) {
|
||||
this.source = options.source
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
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) {
|
||||
let data = {
|
||||
id: id
|
||||
}
|
||||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||
getList() {
|
||||
this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
uni.showToast({
|
||||
title: id==15?'签到成功':'领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
},1000)
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取任务列表
|
||||
*/
|
||||
getTaskdata() {
|
||||
|
||||
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.list = res.data
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -158,7 +100,7 @@
|
||||
background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%);
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
overflow-y: auto;
|
||||
.title{
|
||||
>.title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
@@ -180,6 +122,7 @@
|
||||
padding: 32rpx 28rpx;
|
||||
.cell_left{
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
.cell_icon{
|
||||
width: 84rpx!important;
|
||||
height: 84rpx!important;
|
||||
@@ -188,15 +131,12 @@
|
||||
}
|
||||
.cell_title{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 12rpx;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.tip{
|
||||
|
||||
Reference in New Issue
Block a user