Browse Source

更改立刻报名跳转

pull/19/head
xieying 1 year ago
parent
commit
cc0f334a24
8 changed files with 25 additions and 30 deletions
  1. +1
    -1
      package_first/pages/ActivityApply/index.js
  2. +8
    -2
      package_first/pages/AddPicture/index.js
  3. +5
    -5
      package_first/pages/LearningVideo/index.js
  4. +2
    -2
      package_first/pages/LearningVideo/index.wxml
  5. +2
    -1
      package_first/pages/ProtectionActivity/index.js
  6. +0
    -5
      package_first/pages/VolunteerActivity/index.js
  7. +1
    -1
      package_first/pages/VolunteerActivity/index.wxml
  8. +6
    -13
      package_first/pages/videoDetail/index.js

+ 1
- 1
package_first/pages/ActivityApply/index.js View File

} }
activitySubmit(params) activitySubmit(params)
.then(res=>{ .then(res=>{
console.log(res);
}) })
}, },



+ 8
- 2
package_first/pages/AddPicture/index.js View File

} }
api_TiktokAdd(data).then(res => { api_TiktokAdd(data).then(res => {
if (res.code === 0) { 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(()=>{ }).finally(()=>{
wx.hideLoading(); wx.hideLoading();

+ 5
- 5
package_first/pages/LearningVideo/index.js View File

total, total,
list, 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){ handleDetail(e){

+ 2
- 2
package_first/pages/LearningVideo/index.wxml View File

<view class="cotent"> <view class="cotent">
<view class="title"> <view class="title">
<view class="title_text">{{item.videoTitle}}</view> <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> </view>
<view class="title_content">{{item.videoBrief}}</view> <view class="title_content">{{item.videoBrief}}</view>

+ 2
- 1
package_first/pages/ProtectionActivity/index.js View File

}else{ }else{
const data = { openid } const data = { openid }
api_getIsApply(data).then(res=>{ 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 }) this.setData({ entersList })
}) })
} }

+ 0
- 5
package_first/pages/VolunteerActivity/index.js View File

url: '/package_first/pages/VolunteerDetail/index?data='+ encodeURIComponent(data), url: '/package_first/pages/VolunteerDetail/index?data='+ encodeURIComponent(data),
}) })
}, },
go_applypage(){
wx.navigateTo({
url: '/package_first/pages/ActivityApply/index',
})
}
}) })

+ 1
- 1
package_first/pages/VolunteerActivity/index.wxml View File

</view> </view>
<view class="activity_bottom"> <view class="activity_bottom">
<view> <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 class="join" bindtap="showDetail" data-item="{{item}}">进入活动 》</view>
</view> </view>
</view> </view>

+ 6
- 13
package_first/pages/videoDetail/index.js View File

control:false, control:false,
statusList:{ statusList:{
0: '待学习', 0: '待学习',
1: '学习中',
// 1: '学习中',
2: '已学习', 2: '已学习',
}, },
classList:{ classList:{
0: 'no--study', 0: 'no--study',
1: 'is--study',
// 1: 'is--study',
2: 'is--finish', 2: 'is--finish',
}, },
detail: {} detail: {}
}, },
onLoad(options){ onLoad(options){
let data = JSON.parse(decodeURIComponent(options.data)) 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') const openid = wx.getStorageSync('openid')
this.setData({ this.setData({
detail:data, detail:data,
openid, openid,
control : data.status === 2 ? true : false, 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){ saveTime(e){
let time = e.detail.currentTime let time = e.detail.currentTime
this.setData({ this.setData({
}) })
}, },
handleEnded(status){
handleEnded(){
const isNumber = typeof(status) === 'number' const isNumber = typeof(status) === 'number'
const params = { const params = {
status: status === 2 ? 2 : 1,
status: 2,
videoId: this.data.detail.id, videoId: this.data.detail.id,
openid: this.data.openid, openid: this.data.openid,
videoProgress: isNumber ? this.data.videoProgress : 0 videoProgress: isNumber ? this.data.videoProgress : 0

Loading…
Cancel
Save