任务修改
This commit is contained in:
@@ -15,10 +15,10 @@
|
||||
</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>
|
||||
@@ -38,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>
|
||||
@@ -154,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;
|
||||
@@ -176,6 +122,7 @@
|
||||
padding: 32rpx 28rpx;
|
||||
.cell_left{
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
.cell_icon{
|
||||
width: 84rpx!important;
|
||||
height: 84rpx!important;
|
||||
@@ -184,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