提交 f895ddf7 编写于 作者: guangjun.yang's avatar guangjun.yang

优惠券列表中传来

上级 3ab31350
......@@ -65,6 +65,8 @@ export default {
let href = location.href;
this.couponId = this.$route.query.couponId || "";
this.fromPage = this.$route.query.fromPage || "";
this.couponToken = this.$route.query.couponToken || ""
this.navTitle = this.fromPage ? "我的优惠券" : "优惠券";
this.shareUrl = getWebPageUrl(
`profexam/#/coupon-list?couponId=${this.couponId}`
......@@ -95,13 +97,14 @@ export default {
mounted() {
// 如果在浏览器或微信里
if (this.isWeb) {
let { token, info } = this.$store.state.user;
token = token || localStorage.getItem("couponToken") || getCookie("couponToken");
this.token = token;
if (token && !info.id) {
console.log('4444 this.token' + this.token);
const { token, info } = this.$store.state.user;
this.token = token || this.couponToken || localStorage.getItem("couponToken") || getCookie("couponToken");
if (this.token && !info.id) {
console.log('4444 this.token', this.token);
// this.$store.dispatch('setToken', this.token);
this.commonCheckToken(() => {
this.$store.dispatch("getUserInfo");
this.$store.dispatch('setToken', this.token);
// this.$store.dispatch("getUserInfo");
});
return;
}
......@@ -241,7 +244,7 @@ export default {
let pageUrl = "";
// 如果适用的商品(卡)个数多于一个,则跳转到商品列表
if(item.couponMappingModelList.length > 1) {
pageUrl = getHactiveUrl(`/message_push/#/study-card?origin=1&couponArea=${this.provinceId}`);
pageUrl = getHactiveUrl(`/message_push/#/study-card?origin=1&couponArea=${this.provinceId}&couponToken=${this.token}`);
this.jumpForCoupon(pageUrl);
} else {
item.couponMappingModelList.length && this.getCardInfoByProvinceId(item);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册