修改
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.number_format = $.number_format
|
||||||
Vue.prototype.mf = $.mf
|
Vue.prototype.mf = $.mf
|
||||||
Vue.prototype.statecode = Statecode
|
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.$mysocket = mysocket;
|
||||||
Vue.prototype.$Socket = Socket;
|
Vue.prototype.$Socket = Socket;
|
||||||
Vue.prototype.$apiconfig = apiconfig;
|
Vue.prototype.$apiconfig = apiconfig;
|
||||||
|
|||||||
@ -1201,10 +1201,10 @@ export default {
|
|||||||
time: null,
|
time: null,
|
||||||
isReminderOrder: false,
|
isReminderOrder: false,
|
||||||
subscribe: 0,
|
subscribe: 0,
|
||||||
tmplIds: [
|
// tmplIds: [
|
||||||
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
// "kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||||
"Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
// "Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||||
],
|
// ],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -1259,36 +1259,37 @@ export default {
|
|||||||
onShow: function () {
|
onShow: function () {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
this.InitPage(this.options);
|
this.InitPage(this.options);
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// try {
|
try {
|
||||||
// if (this.subscribe == 1) {
|
if (this.subscribe == 1) {
|
||||||
// $.showModal({
|
$.showModal({
|
||||||
// title: "订阅提示",
|
title: "订阅提示",
|
||||||
// content: "是否订阅活动消息通知?",
|
content: "是否订阅活动消息通知?",
|
||||||
// cancelText: "暂不订阅",
|
cancelText: "暂不订阅",
|
||||||
// confirmText: "立即订阅",
|
confirmText: "立即订阅",
|
||||||
// success: function (n) {
|
success: function (n) {
|
||||||
// if (n.confirm) {
|
if (n.confirm) {
|
||||||
// wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
// tmplIds: _this.tmplIds,
|
tmplIds: _this.tmplIds,
|
||||||
// success(res) {
|
success(res) {
|
||||||
// console.log("success res====", res);
|
console.log("success res====", res);
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: "消息已订阅",
|
// title: "消息已订阅",
|
||||||
// });
|
// });
|
||||||
// },
|
},
|
||||||
// fail(res) {
|
fail(res) {
|
||||||
// uni.showToast({
|
console.log("fail res====", res);
|
||||||
// title: "稍后再试",
|
// uni.showToast({
|
||||||
// });
|
// title: "稍后再试",
|
||||||
// },
|
// });
|
||||||
// });
|
},
|
||||||
// }
|
});
|
||||||
// },
|
}
|
||||||
// });
|
},
|
||||||
// }
|
});
|
||||||
// } catch (error) {}
|
}
|
||||||
// }, 500);
|
} catch (error) {}
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
onUnload: function () {
|
onUnload: function () {
|
||||||
//移除通知
|
//移除通知
|
||||||
|
|||||||
@ -526,6 +526,7 @@ export default {
|
|||||||
borderColor: "#dfdfdf",
|
borderColor: "#dfdfdf",
|
||||||
fontColor: "#fff",
|
fontColor: "#fff",
|
||||||
backgroundColor: "transparent",
|
backgroundColor: "transparent",
|
||||||
|
|
||||||
provinceData: [],
|
provinceData: [],
|
||||||
cityData: [],
|
cityData: [],
|
||||||
areaData: [],
|
areaData: [],
|
||||||
@ -625,6 +626,36 @@ export default {
|
|||||||
);
|
);
|
||||||
that.notice.addNotification("RefreshSubsite", that.RefreshSubsite, that);
|
that.notice.addNotification("RefreshSubsite", that.RefreshSubsite, that);
|
||||||
that.notice.addNotification("ScanCode", that.onScanCode, 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 () {
|
onShow: function () {
|
||||||
let that = this;
|
let _this = this;
|
||||||
this.getAppDistrict();
|
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.refresh || this.setData({refresh: true})
|
||||||
|
|
||||||
this.showCartNum();
|
this.showCartNum();
|
||||||
@ -653,10 +684,10 @@ export default {
|
|||||||
if (currentAddress) {
|
if (currentAddress) {
|
||||||
this.address = currentAddress.name;
|
this.address = currentAddress.name;
|
||||||
} else {
|
} else {
|
||||||
that.isPhoneLocationEnabled();
|
_this.isPhoneLocationEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
that.resetLang();
|
_this.resetLang();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user