Commit 383e166b by 谢中龙

修改bug

parent 92efc710
...@@ -39,6 +39,7 @@ wxService.page({ ...@@ -39,6 +39,7 @@ wxService.page({
currentStatus: 2, // 活动状态 1 未生效 2 生效中 3 已失效 0 已删除 currentStatus: 2, // 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始 currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始
isAuthorization: false, isAuthorization: false,
donate : false,
donateImgUrl : '', donateImgUrl : '',
showDonateImgUrl : false, showDonateImgUrl : false,
showTempalteModal : false, showTempalteModal : false,
...@@ -48,61 +49,25 @@ wxService.page({ ...@@ -48,61 +49,25 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options) this.data.id = options.id;
}, if(!this.data.id){
// wx.showToast({
watch: { title: '进入页面参数不对',
experAccessible(newVal, oldVal) { icon : 'none'
// 登录接口返回err });
const reLoginErrFlag = wx.getStorageSync('reLoginErr') return ;
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
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
})
}
} }
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
if(!baseUserInfo){
this.setData({
isAuthorization: false
});
return;
}
this.getPointDetail(this.data.id);
}, },
//弹出订阅莫泰关闭 //弹出订阅莫泰关闭
...@@ -182,7 +147,7 @@ wxService.page({ ...@@ -182,7 +147,7 @@ wxService.page({
} }
} }
let dialog = data.dialog let dialog = data.dialog ? data.dialog : {};
dialog.show = false dialog.show = false
// 弹框背景 // 弹框背景
dialog.image = data.popupImage dialog.image = data.popupImage
...@@ -204,6 +169,9 @@ wxService.page({ ...@@ -204,6 +169,9 @@ wxService.page({
// 未开始 // 未开始
timeFlag = 3 timeFlag = 3
} }
this.data.donate = data.donate == 1 ? true : false;
this.setData({ this.setData({
activityId: data.id, activityId: data.id,
type: data.showActivitys, type: data.showActivitys,
...@@ -216,7 +184,7 @@ wxService.page({ ...@@ -216,7 +184,7 @@ wxService.page({
detailImage: data.detailImage, detailImage: data.detailImage,
dialog, dialog,
currentTimeStatus: timeFlag, currentTimeStatus: timeFlag,
donateImgUrl : this.data.donateImgUrl donateImgUrl : this.data.donateImgUrl,
}, () => { }, () => {
// 1 进行中 2 已结束 // 1 进行中 2 已结束
if (timeFlag == 2) { if (timeFlag == 2) {
...@@ -228,10 +196,9 @@ wxService.page({ ...@@ -228,10 +196,9 @@ wxService.page({
// 会员集点活动统计信息 进行中且有效 // 会员集点活动统计信息 进行中且有效
this.getPointConsumptionCount(id); this.getPointConsumptionCount(id);
//限制必须是扫码进来的才调用 //限制必须是扫码进来的才调用
// let scene = wx.getLaunchOptionsSync().scene; if(this.data.donate){
// if(scene == 1011){
this.getUserShowRewardCollectionPoint(id); this.getUserShowRewardCollectionPoint(id);
// } }
} }
}) })
} }
...@@ -256,6 +223,7 @@ wxService.page({ ...@@ -256,6 +223,7 @@ wxService.page({
}, },
//弹出原生提示框让用户去点击 //弹出原生提示框让用户去点击
showConfirmModal(id){ showConfirmModal(id){
let self = this; let self = this;
if(this.showModal){ if(this.showModal){
return ; return ;
...@@ -517,33 +485,6 @@ wxService.page({ ...@@ -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