@@ -58,7 +58,7 @@ Page({ | |||
} | |||
activitySubmit(params) | |||
.then(res=>{ | |||
console.log(res); | |||
}) | |||
}, | |||
@@ -246,9 +246,15 @@ validateForm() { | |||
} | |||
api_TiktokAdd(data).then(res => { | |||
if (res.code === 0) { | |||
wx.reLaunch({ | |||
url: '/package_first/pages/successPage/index', | |||
wx.showToast({ | |||
title: '您的图片已提交', | |||
icon:'none' | |||
}) | |||
setTimeout(()=>{ | |||
wx.redirectTo({ | |||
url: '../../pages/AttentionMethod/index', | |||
}) | |||
},2000) | |||
} | |||
}).finally(()=>{ | |||
wx.hideLoading(); |
@@ -98,11 +98,11 @@ Page({ | |||
total, | |||
list, | |||
}) | |||
if(list.status == 0){ | |||
data.entersList[0].isstudy = true | |||
}else if(list.status == 1){ | |||
data.entersList[1].isstudy = true | |||
} | |||
// if(list.status == 0){ | |||
// data.entersList[0].isstudy = true | |||
// }else if(list.status == 1){ | |||
// data.entersList[1].isstudy = true | |||
// } | |||
}) | |||
}, | |||
handleDetail(e){ |
@@ -6,8 +6,8 @@ | |||
<view class="cotent"> | |||
<view class="title"> | |||
<view class="title_text">{{item.videoTitle}}</view> | |||
<view class="{{item.status==1?'item__tag sutdying':item.status==0?'item__tag no--sutdy':'item__tag is--sutdy'}}"> | |||
{{item.status==1?'学习中':item.status==0?'待学习':'已学习'}} | |||
<view class="{{item.status==2?'item__tag is--sutdy':'item__tag no--sutdy'}}"> | |||
{{item.status==2?'已学习':'待学习'}} | |||
</view> | |||
</view> | |||
<view class="title_content">{{item.videoBrief}}</view> |
@@ -102,7 +102,8 @@ Page({ | |||
}else{ | |||
const data = { openid } | |||
api_getIsApply(data).then(res=>{ | |||
entersList[0].isJoin = res.data == 1 ? true:false | |||
console.log(res); | |||
entersList[0].isJoin = res.data == 2 ? true:false | |||
this.setData({ entersList }) | |||
}) | |||
} |
@@ -123,9 +123,4 @@ Page({ | |||
url: '/package_first/pages/VolunteerDetail/index?data='+ encodeURIComponent(data), | |||
}) | |||
}, | |||
go_applypage(){ | |||
wx.navigateTo({ | |||
url: '/package_first/pages/ActivityApply/index', | |||
}) | |||
} | |||
}) |
@@ -19,7 +19,7 @@ | |||
</view> | |||
<view class="activity_bottom"> | |||
<view> | |||
<view class="apply" wx:if="{{item.status==2}}" bindtap="go_applypage">立即报名</view> | |||
<view class="apply" wx:if="{{item.status==2}}" data-item="{{item}}" bindtap="showDetail">立即报名</view> | |||
<view class="join" bindtap="showDetail" data-item="{{item}}">进入活动 》</view> | |||
</view> | |||
</view> |
@@ -9,34 +9,27 @@ Page({ | |||
control:false, | |||
statusList:{ | |||
0: '待学习', | |||
1: '学习中', | |||
// 1: '学习中', | |||
2: '已学习', | |||
}, | |||
classList:{ | |||
0: 'no--study', | |||
1: 'is--study', | |||
// 1: 'is--study', | |||
2: 'is--finish', | |||
}, | |||
detail: {} | |||
}, | |||
onLoad(options){ | |||
let data = JSON.parse(decodeURIComponent(options.data)) | |||
data.status = data.status === 0 ? 1 : data.status | |||
data.status = data.status === 0 ? 0 : data.status | |||
const openid = wx.getStorageSync('openid') | |||
this.setData({ | |||
detail:data, | |||
openid, | |||
control : data.status === 2 ? true : false, | |||
}) | |||
console.log(this.data.detail) | |||
this.getProgress() | |||
}, | |||
onHide(){ | |||
this.handleEnded(this.data.detail.status) | |||
}, | |||
onUnload(){ | |||
this.handleEnded(this.data.detail.status) | |||
}, | |||
saveTime(e){ | |||
let time = e.detail.currentTime | |||
this.setData({ | |||
@@ -55,10 +48,10 @@ Page({ | |||
}) | |||
}, | |||
handleEnded(status){ | |||
handleEnded(){ | |||
const isNumber = typeof(status) === 'number' | |||
const params = { | |||
status: status === 2 ? 2 : 1, | |||
status: 2, | |||
videoId: this.data.detail.id, | |||
openid: this.data.openid, | |||
videoProgress: isNumber ? this.data.videoProgress : 0 |