...
|
...
|
@@ -13,7 +13,7 @@ Page({ |
|
|
cover_type: false
|
|
|
},
|
|
|
//查看更多报名用户信息(审核端)
|
|
|
look_more(e){
|
|
|
look_more(e) {
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/enroll/enroll?status=' + e.currentTarget.dataset.status + '&id=' + this.data.id + '&user_id=' + e.currentTarget.dataset.user_id + '&join_id=' + e.currentTarget.dataset.join_id
|
|
|
})
|
...
|
...
|
@@ -37,10 +37,10 @@ Page({ |
|
|
})
|
|
|
},
|
|
|
//保存海报到本地
|
|
|
save_poster(){
|
|
|
save_poster() {
|
|
|
wx.downloadFile({
|
|
|
url: this.data.poster,
|
|
|
success: (res)=>{
|
|
|
success: (res) => {
|
|
|
if (res.statusCode === 200) {
|
|
|
wx.saveImageToPhotosAlbum({
|
|
|
filePath: res.tempFilePath,
|
...
|
...
|
@@ -55,7 +55,7 @@ Page({ |
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
},
|
|
|
// 改变弹窗状态
|
|
|
change_cover(e) {
|
...
|
...
|
@@ -147,7 +147,7 @@ Page({ |
|
|
datalist: res,
|
|
|
"datalist.button_status": Number(res.button_status)
|
|
|
})
|
|
|
if (that.data.status == '1'){
|
|
|
if (that.data.status == '1') {
|
|
|
that.get_poster()
|
|
|
that.join_info()
|
|
|
}
|
...
|
...
|
@@ -180,7 +180,7 @@ Page({ |
|
|
get_token() {
|
|
|
let that = this
|
|
|
wx.login({
|
|
|
success: function (s) {
|
|
|
success: function(s) {
|
|
|
let url = 'wxapp/public/getSessionKey';
|
|
|
if (s.code) {
|
|
|
var code = s.code;
|
...
|
...
|
@@ -211,12 +211,52 @@ Page({ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
start(e) {
|
|
|
let that = this
|
|
|
wx.login({
|
|
|
success: function (s) {
|
|
|
let url = 'wxapp/public/getSessionKey';
|
|
|
if (s.code) {
|
|
|
var code = s.code;
|
|
|
var param = {
|
|
|
code: code
|
|
|
}
|
|
|
app.post(url, param).then((res) => {
|
|
|
that.login(res.openid, res.session_key)
|
|
|
}).catch((errMsg) => {
|
|
|
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
login(openid, session_key) {
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
|
|
})
|
|
|
let that = this
|
|
|
let param = {
|
|
|
openid: openid,
|
|
|
session_key: session_key
|
|
|
}
|
|
|
let url = 'wxapp/public/get_token'
|
|
|
app.post(url, param).then((res) => {
|
|
|
wx.setStorageSync('token', res.token)
|
|
|
wx.hideLoading()
|
|
|
that.getdatalist()
|
|
|
}).catch((errMsg) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
let that = this
|
|
|
if (options.scene){
|
|
|
if (options.scene) {
|
|
|
wx.setNavigationBarTitle({
|
|
|
title: '活动详情'
|
|
|
})
|
...
|
...
|
@@ -224,13 +264,7 @@ Page({ |
|
|
status: 1,
|
|
|
id: options.scene
|
|
|
})
|
|
|
if (wx.getStorageSync('token')){
|
|
|
that.getdatalist();
|
|
|
} else {
|
|
|
wx.reLaunch({
|
|
|
url: '/pages/start/start?id=' + options.scene + '&type=1',
|
|
|
})
|
|
|
}
|
|
|
that.start()
|
|
|
} else {
|
|
|
if (options.type == 1) {
|
|
|
wx.setNavigationBarTitle({
|
...
|
...
|
@@ -272,8 +306,8 @@ Page({ |
|
|
that.getSystemInfo()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
...
|
...
|
@@ -288,7 +322,8 @@ Page({ |
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function() {
|
|
|
if (wx.getStorageSync('page_type')){
|
|
|
wx.hideShareMenu()
|
|
|
if (wx.getStorageSync('page_type')) {
|
|
|
wx.removeStorageSync('page_type')
|
|
|
this.getdatalist()
|
|
|
}
|
...
|
...
|
|