Commit d0379f97 by chenhui

fix

parent 3c7e29ff
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
shopmixid: "", shopmixid: "",
openId: "", openId: "",
options: {}, options: {},
options_orderType:'',
// 购买会员卡新页面 // 购买会员卡新页面
options_isCard:'', options_isCard:'',
options_isCardTitle:'', options_isCardTitle:'',
...@@ -27,6 +28,7 @@ export default { ...@@ -27,6 +28,7 @@ export default {
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化 Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
console.log("onload//"); console.log("onload//");
this.options = JSON.parse(options.ordercode); this.options = JSON.parse(options.ordercode);
this.options_orderType = options.orderType;
this.options_isCard= options.isCard; this.options_isCard= options.isCard;
this.options_isCardTitle= options.isCardTit; this.options_isCardTitle= options.isCardTit;
let that = this; let that = this;
...@@ -55,17 +57,28 @@ export default { ...@@ -55,17 +57,28 @@ export default {
const orderSn = this.options.orderSn; const orderSn = this.options.orderSn;
try { try {
if (this.$store.state.subscribeMessageObj && Object.keys(this.$store.state.subscribeMessageObj).length > 0) { const subscribeMessageObj = this.$store.state.subscribeMessageObj;
if (subscribeMessageObj && Object.keys(subscribeMessageObj).length > 0) {
// TODO 小程序订阅消息埋点 // TODO 小程序订阅消息埋点
const tmplIds = [];
for (var key in subscribeMessageObj) {
// 送礼订单
if (this.options_orderType == 5 && (key == 'gift_be_expire' || key == 'gift_draw')) {
tmplIds.push(subscribeMessageObj[key]);
}
}
if (tmplIds.length > 0) {
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
      tmplIds: Object.values(this.$store.state.subscribeMessageObj), tmplIds: tmplIds,
      success(res) { success(res) {
        console.log("message success response: ", res); console.log("message success response: ", res);
      }, },
fail(res) { fail(res) {
        console.log("message fail response: ", res) console.log("message fail response: ", res)
      } }
     }) })
}
} }
} catch (err) { } catch (err) {
console.error("subscribeMessage-err", err); console.error("subscribeMessage-err", err);
......
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