修改
This commit is contained in:
parent
966ff03967
commit
615f731c38
6
main.js
6
main.js
@ -38,7 +38,11 @@ Vue.prototype.sprintf = $.sprintf
|
||||
Vue.prototype.number_format = $.number_format
|
||||
Vue.prototype.mf = $.mf
|
||||
Vue.prototype.statecode = Statecode
|
||||
Vue.prototype.bdMapAk = "j2XbIbapUzLD0ycnJa6Cc5T7lppsxvMJ"
|
||||
Vue.prototype.bdMapAk = "j2XbIbapUzLD0ycnJa6Cc5T7lppsxvMJ";
|
||||
Vue.prototype.tmplIds = [
|
||||
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||
"Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||
];
|
||||
//Vue.prototype.$mysocket = mysocket;
|
||||
Vue.prototype.$Socket = Socket;
|
||||
Vue.prototype.$apiconfig = apiconfig;
|
||||
|
||||
@ -1201,10 +1201,10 @@ export default {
|
||||
time: null,
|
||||
isReminderOrder: false,
|
||||
subscribe: 0,
|
||||
tmplIds: [
|
||||
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||
"Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||
],
|
||||
// tmplIds: [
|
||||
// "kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||
// "Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||
// ],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -1259,36 +1259,37 @@ export default {
|
||||
onShow: function () {
|
||||
const _this = this;
|
||||
this.InitPage(this.options);
|
||||
// setTimeout(() => {
|
||||
// try {
|
||||
// if (this.subscribe == 1) {
|
||||
// $.showModal({
|
||||
// title: "订阅提示",
|
||||
// content: "是否订阅活动消息通知?",
|
||||
// cancelText: "暂不订阅",
|
||||
// confirmText: "立即订阅",
|
||||
// success: function (n) {
|
||||
// if (n.confirm) {
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: _this.tmplIds,
|
||||
// success(res) {
|
||||
// console.log("success res====", res);
|
||||
// uni.showToast({
|
||||
// title: "消息已订阅",
|
||||
// });
|
||||
// },
|
||||
// fail(res) {
|
||||
// uni.showToast({
|
||||
// title: "稍后再试",
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// } catch (error) {}
|
||||
// }, 500);
|
||||
setTimeout(() => {
|
||||
try {
|
||||
if (this.subscribe == 1) {
|
||||
$.showModal({
|
||||
title: "订阅提示",
|
||||
content: "是否订阅活动消息通知?",
|
||||
cancelText: "暂不订阅",
|
||||
confirmText: "立即订阅",
|
||||
success: function (n) {
|
||||
if (n.confirm) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: _this.tmplIds,
|
||||
success(res) {
|
||||
console.log("success res====", res);
|
||||
// uni.showToast({
|
||||
// title: "消息已订阅",
|
||||
// });
|
||||
},
|
||||
fail(res) {
|
||||
console.log("fail res====", res);
|
||||
// uni.showToast({
|
||||
// title: "稍后再试",
|
||||
// });
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
} catch (error) {}
|
||||
}, 500);
|
||||
},
|
||||
onUnload: function () {
|
||||
//移除通知
|
||||
|
||||
@ -526,6 +526,7 @@ export default {
|
||||
borderColor: "#dfdfdf",
|
||||
fontColor: "#fff",
|
||||
backgroundColor: "transparent",
|
||||
|
||||
provinceData: [],
|
||||
cityData: [],
|
||||
areaData: [],
|
||||
@ -625,6 +626,36 @@ export default {
|
||||
);
|
||||
that.notice.addNotification("RefreshSubsite", that.RefreshSubsite, that);
|
||||
that.notice.addNotification("ScanCode", that.onScanCode, that);
|
||||
|
||||
setTimeout(() => {
|
||||
try {
|
||||
$.showModal({
|
||||
title: "订阅提示",
|
||||
content: "是否订阅活动消息通知?",
|
||||
cancelText: "暂不订阅",
|
||||
confirmText: "立即订阅",
|
||||
success: function (n) {
|
||||
if (n.confirm) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: that.tmplIds,
|
||||
success(res) {
|
||||
console.log("success res====", res);
|
||||
// uni.showToast({
|
||||
// title: "消息已订阅",
|
||||
// });
|
||||
},
|
||||
fail(res) {
|
||||
console.log("fail res====", res);
|
||||
// uni.showToast({
|
||||
// title: "稍后再试",
|
||||
// });
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
} catch (error) {}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -636,9 +667,9 @@ export default {
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
let that = this;
|
||||
let _this = this;
|
||||
this.getAppDistrict();
|
||||
//that.$.isNull(that.plantformInfo) || uni.setNavigationBarTitle({title: that.plantformInfo.name});
|
||||
//_this.$.isNull(_this.plantformInfo) || uni.setNavigationBarTitle({title: _this.plantformInfo.name});
|
||||
//this.refresh || this.setData({refresh: true})
|
||||
|
||||
this.showCartNum();
|
||||
@ -653,10 +684,10 @@ export default {
|
||||
if (currentAddress) {
|
||||
this.address = currentAddress.name;
|
||||
} else {
|
||||
that.isPhoneLocationEnabled();
|
||||
_this.isPhoneLocationEnabled();
|
||||
}
|
||||
|
||||
that.resetLang();
|
||||
_this.resetLang();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user