Commit 53686f54 by 谢中龙

修改bug

parent 386bd704
......@@ -171,6 +171,7 @@ App({
isPlusVip: isPlusVip,
cityJson: cityJson,
brandId: envInfo.brandId,
themeColor : envInfo.themeColor
},
//跳转10级
navigateTo(routerObj){
......
......@@ -13,7 +13,7 @@
height: 80rpx;
width: 100%;
border-bottom: solid 1rpx #dddddd;
position: sticky;
/* position: sticky; */
}
.category-tab-container .category-tab .scroll-view_H {
......@@ -41,9 +41,9 @@
}
.category-tab-container .category-tab.fixed{
/* position: fixed; */
position: fixed;
z-index: 8;
/* left: 0; */
left: 0;
top: 0;
}
......
......@@ -102,8 +102,84 @@ Component({
})
},
preview(event) {
utilLink.currentLinkRouter(event, this)
let ret = utilLink.currentLinkRouter(event, this);
if(ret && typeof ret === 'object'){
if(ret.type == 11){
this.hanlderOrderActivity(ret);
}
}
},
//处理活动预约
hanlderOrderActivity(info){
//判断用户是否已经预约过此活动
this.userHasOrderedActivity(info.id,info);
},
//判断活动是否已经预约过
userHasOrderedActivity(id,info){
let baseUserInfo = wx.getStorageSync('_baseUserInfo');
wxService.post(`/merchant/message/wxSubMsgSubscride/getByParams`,{
memberId : baseUserInfo.memberId,
businessId : id
}).then(res => {
if(res){
let data = res.data.data ? res.data.data : [];
if(data.length == 0){
//未预约
if(info.templateId){
this.getOrderActivityInfo(info.templateId,info);
}
}
else{
console.log(data)
wx.showModal({
title : '预约成功',
showCancel: false,
confirmText : '确定',
content : '您已订阅消息通知~',
confirmColor : app.globalData.themeColor,
success(){},
})
}
}
})
},
//获取预约活动详情
getOrderActivityInfo(id,info){
wxService.get(`/merchant/message/wxTemplateMappingMiniProgram/${id}`).then(res => {
if(res){
let templateObj = res.data.data ? res.data.data : null;
if(templateObj){
let templateId = templateObj.templateId;
wx.requestSubscribeMessage({
tmplIds: [templateId],
success: (reqRes) => {
this.orderActivity(info.id,templateId,info);
},
complete: (reqComp) => {}
})
}
}
});
},
//预约活动
orderActivity(activityId,templateId,info){
let baseUserInfo = wx.getStorageSync('_baseUserInfo');
wxService.post(`${'/merchant/message/wxSubMsgSubscride/member/subscribe'}`, {
businessId: activityId,
memberId: baseUserInfo.memberId,
templateId : templateId,
}).then(resp => {
wx.showModal({
title : '预约成功',
showCancel: false,
confirmText : '确定',
content : info.prompt,
confirmColor : app.globalData.themeColor,
success(){},
})
});
},
//激活开卡
activeTocard(e) {
if (e.detail) {
wxService.openCard()
......
......@@ -660,6 +660,7 @@ const envInfo = (() => {
hasKeFu : hasKeFu,
signUrl : signUrl,
productInfoImgRatio :productInfoImgRatio,
themeColor : themeColor,
}
})()
......
......@@ -22,7 +22,7 @@
"disablePlugins": [],
"outputPath": ""
},
"useCompilerModule": false,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",
......@@ -143,7 +143,7 @@
"id": 13,
"name": "subPage",
"pathName": "subPackage/page/pages/subPage/subPage",
"query": "pageId=72",
"query": "pageId=75",
"scene": null
},
{
......
......@@ -84,6 +84,10 @@ function currentLinkRouter(event, _this) {
} else if (rowObj.type == 10) {
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?id=${currentClickRow}&type=pTag`)
}
else if(rowObj.type == 11){
//这个是活动预约的
return rowObj;
}
}
} else if (curItemType.row) {
let rowObj = typeof(curItemType.row) == "string" ? JSON.parse(curItemType.row) : curItemType.row
......@@ -106,6 +110,10 @@ function currentLinkRouter(event, _this) {
} else if (rowObj.type == 10) {
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?id=${currentClickRow}&type=pTag`)
}
else if(rowObj.type == 11){
//这个是活动预约的
return rowObj;
}
}
}
//导出
......
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