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

@@ -58,7 +58,7 @@ Page({
}
activitySubmit(params)
.then(res=>{
console.log(res);
})
},


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

@@ -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();

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

@@ -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){

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

@@ -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>

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

@@ -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 })
})
}

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

@@ -123,9 +123,4 @@ Page({
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

@@ -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>

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

@@ -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

Loading…
Cancel
Save