This commit is contained in:
mixtan 2025-10-10 14:32:19 +08:00
parent 966ff03967
commit 615f731c38
3 changed files with 75 additions and 39 deletions

View File

@ -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;

View File

@ -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 () {
//

View File

@ -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();
},
/**