Browse Source

Merge branch 'xieying' of gitadmin/tuoheng_qmhh_web into develop

xieying
xieying 1 year ago
parent
commit
5a438990b5
5 changed files with 45 additions and 16 deletions
  1. +17
    -4
      package_first/pages/ActivityApply/index.js
  2. +1
    -3
      package_first/pages/AddPicture/index.js
  3. +13
    -2
      package_first/pages/AttentionMethod/index.js
  4. +12
    -5
      package_first/pages/ProtectionActivity/index.js
  5. +2
    -2
      package_first/pages/VolunteerDetail/index.js

+ 17
- 4
package_first/pages/ActivityApply/index.js View File

@@ -7,6 +7,7 @@ Page({
*/
data: {
activityId: null,
activityInfo:{},
userInfo: {
applyName: '',
applyPhone: ''
@@ -17,9 +18,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const activityId = options.id
const activityInfo = JSON.parse(decodeURIComponent(options.activityInfo))
this.setData({
activityId
activityInfo
})
},

@@ -51,14 +52,26 @@ Page({
return
}
const openid = wx.getStorageSync('openid')
const userInfo = wx.getStorageSync('userInfo')
const params = {
...this.data.userInfo,
openid,
activityId: this.data.activityId
nickname:userInfo.nickname,
activityId: this.data.activityInfo.id,
activityTitle:this.data.activityInfo.activityTitle
}
activitySubmit(params)
.then(res=>{
console.log(res);
if(res.code==0){
wx.showToast({
title: '报名成功',
icon:"none"
}),
setTimeout(()=>{
wx.navigateBack()
}
,2000)
}
})
},


+ 1
- 3
package_first/pages/AddPicture/index.js View File

@@ -251,9 +251,7 @@ validateForm() {
icon:'none'
})
setTimeout(()=>{
wx.redirectTo({
url: '../../pages/AttentionMethod/index',
})
wx.navigateBack()
},2000)
}
}).finally(()=>{

+ 13
- 2
package_first/pages/AttentionMethod/index.js View File

@@ -5,14 +5,17 @@ Page({
* 页面的初始数据
*/
data: {
status:null
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

let status = options.status
this.setData({
status
})
},

/**
@@ -64,6 +67,14 @@ Page({

},
goPage(e){
console.log();
if(this.data.status==1){
wx.showToast({
title: '您已参加该活动',
icon:"none"
})
return
}
wx.navigateTo({
url: `/package_first/pages/AddPicture/index`,
})

+ 12
- 5
package_first/pages/ProtectionActivity/index.js View File

@@ -9,6 +9,7 @@ Page({
* 页面的初始数据
*/
data: {
tikStatus:null,
entersList:[
{
title:'关注抖音',
@@ -102,18 +103,24 @@ Page({
}else{
const data = { openid }
api_getIsApply(data).then(res=>{
console.log(res);
let tikStatus = res.data
entersList[0].isJoin = res.data == 2 ? true:false
this.setData({ entersList })
this.setData({ entersList,tikStatus })
})
}

},
goPage(e){
const { path } = e.currentTarget.dataset
wx.navigateTo({
url: path
})
if(path=='/package_first/pages/AttentionMethod/index'){
wx.navigateTo({
url: '/package_first/pages/AttentionMethod/index?status='+this.data.tikStatus
})
}else{
wx.navigateTo({
url: path
})
}
},
homepage(e){
wx.switchTab({

+ 2
- 2
package_first/pages/VolunteerDetail/index.js View File

@@ -138,10 +138,10 @@ Page({
})
return
}

if(this.data.status === 3){
let activityInfo = JSON.stringify(this.data.activityInfo)
wx.navigateTo({
url:"/package_first/pages/ActivityApply/index?id=" + this.data.activityInfo.id
url:"/package_first/pages/ActivityApply/index?activityInfo=" + encodeURIComponent(activityInfo)
})
}
},

Loading…
Cancel
Save