Commit 383e166b by 谢中龙

修改bug

parent 92efc710
......@@ -39,6 +39,7 @@ wxService.page({
currentStatus: 2, // 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始
isAuthorization: false,
donate : false,
donateImgUrl : '',
showDonateImgUrl : false,
showTempalteModal : false,
......@@ -48,61 +49,25 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
},
//
watch: {
experAccessible(newVal, oldVal) {
// 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr')
this.data.id = options.id;
if(!this.data.id){
wx.showToast({
title: '进入页面参数不对',
icon : 'none'
});
return ;
}
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
if(!baseUserInfo){
this.setData({
isAuthorization: false
}, () => {
const option = this.options || {};
const { scene } = option
if (scene) {
let idParam = decodeURIComponent(scene).split('&')[0]
let shareId = idParam && idParam.split('=')[1] || 0
if(shareId.length < 12){
id = Integer.digit(shareId, 64, 10)
}else{
id = shareId
}
} else {
id = option.id
}
});
if (id) {
this.setData({
id
}, () => {
if(newVal) {
this.getPointDetail(id)
} else {
// 去别的页面
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
}
// this.getPointDetail(id)
})
}
// 隐藏 dialog
this.isShowDialog(false)
})
}
else if (!baseUserInfo && reLoginErrFlag) {
this.setData({
isAuthorization: true
})
}
else {
this.setData({
isAuthorization: true
})
}
return;
}
this.getPointDetail(this.data.id);
},
//弹出订阅莫泰关闭
......@@ -182,7 +147,7 @@ wxService.page({
}
}
let dialog = data.dialog
let dialog = data.dialog ? data.dialog : {};
dialog.show = false
// 弹框背景
dialog.image = data.popupImage
......@@ -204,6 +169,9 @@ wxService.page({
// 未开始
timeFlag = 3
}
this.data.donate = data.donate == 1 ? true : false;
this.setData({
activityId: data.id,
type: data.showActivitys,
......@@ -216,7 +184,7 @@ wxService.page({
detailImage: data.detailImage,
dialog,
currentTimeStatus: timeFlag,
donateImgUrl : this.data.donateImgUrl
donateImgUrl : this.data.donateImgUrl,
}, () => {
// 1 进行中 2 已结束
if (timeFlag == 2) {
......@@ -228,10 +196,9 @@ wxService.page({
// 会员集点活动统计信息 进行中且有效
this.getPointConsumptionCount(id);
//限制必须是扫码进来的才调用
// let scene = wx.getLaunchOptionsSync().scene;
// if(scene == 1011){
if(this.data.donate){
this.getUserShowRewardCollectionPoint(id);
// }
}
}
})
}
......@@ -256,6 +223,7 @@ wxService.page({
},
//弹出原生提示框让用户去点击
showConfirmModal(id){
let self = this;
if(this.showModal){
return ;
......@@ -517,33 +485,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment