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

传递商品ID给课程页面

返回路径放在session中
样式问题
上级 91dd647c
...@@ -180,3 +180,7 @@ ...@@ -180,3 +180,7 @@
color: #449284; color: #449284;
} }
} }
.van-loading__spinner {
width: 40px !important;
height: 40px !important;
}
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
// msgContent: "此项目已被其他学习卡绑定,您可以去绑定新的项目,或去云鹊医APP查看订单详情", // msgContent: "此项目已被其他学习卡绑定,您可以去绑定新的项目,或去云鹊医APP查看订单详情",
msgContent: "购买成功", msgContent: "购买成功",
loading: true, loading: true,
loadingTimes: 3, loadingTimes: 3000,
// 返回值data:0:订单进行中 1:支付并绑定成功 2:订单反馈延时,请稍后再试 3:支付失败,请重新购买 4:订单已被取消,请重新购买 // 返回值data:0:订单进行中 1:支付并绑定成功 2:订单反馈延时,请稍后再试 3:支付失败,请重新购买 4:订单已被取消,请重新购买
bindStatus: 0, bindStatus: 0,
showGoApp: true, showGoApp: true,
...@@ -59,8 +59,8 @@ export default { ...@@ -59,8 +59,8 @@ export default {
let { projectId, orderId, returnUrl } = this.$route.query; let { projectId, orderId, returnUrl } = this.$route.query;
this.projectId = projectId || 0; this.projectId = projectId || 0;
this.orderId = orderId || 0; this.orderId = orderId || 0;
this.returnUrl = sessionStorage.getItem('returnUrl') || returnUrl; this.returnUrl = sessionStorage.getItem('returnUrl') || decodeURIComponent(this.returnUrl);
console.log('projectId', '', '', this.projectId, this.orderId, this.returnUrl, decodeURIComponent(this.returnUrl)); console.log('projectId', 'orderId', this.projectId, this.orderId, this.returnUrl, decodeURIComponent(this.returnUrl));
// 直接从商品过来的 // 直接从商品过来的
// if(!this.projectId) { // if(!this.projectId) {
// this.msgContent = "购买成功"; // this.msgContent = "购买成功";
...@@ -140,7 +140,6 @@ export default { ...@@ -140,7 +140,6 @@ export default {
orderId: this.orderId, orderId: this.orderId,
}; };
this.GET(`trade/center/order/query`, param).then(({ data }) => { this.GET(`trade/center/order/query`, param).then(({ data }) => {
debugger
this.loading = false; this.loading = false;
this.msgContent = "购买失败"; this.msgContent = "购买失败";
this.isCorrect = false; this.isCorrect = false;
...@@ -164,7 +163,7 @@ export default { ...@@ -164,7 +163,7 @@ export default {
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `889#88901` component_tag: `889#88901`
}); });
this.returnUrl && location.replace(decodeURIComponent(this.returnUrl)); this.returnUrl && location.replace(this.returnUrl);
// this.returnUrl && (location.href = decodeURIComponent(this.returnUrl)); // this.returnUrl && (location.href = decodeURIComponent(this.returnUrl));
}, },
...@@ -210,7 +209,7 @@ export default { ...@@ -210,7 +209,7 @@ export default {
.text { .text {
margin-top: 12px; margin-top: 12px;
color: #A1A2A3; color: #A1A2A3;
font-size: 12px; font-size: 14px;
} }
} }
} }
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
:limitTimes="limitTimes" :limitTimes="limitTimes"
:logged="logged" :logged="logged"
:projectId="projectId" :projectId="projectId"
:goodsId="cardInfo.id"
/> />
</div> </div>
</div> </div>
...@@ -350,7 +351,7 @@ export default { ...@@ -350,7 +351,7 @@ export default {
this.shareUrl = getWebPageUrl(`profexam/#/sharecoop?uuid=${this.uuid}`); this.shareUrl = getWebPageUrl(`profexam/#/sharecoop?uuid=${this.uuid}`);
location.replace(this.shareUrl); location.replace(this.shareUrl);
} }
sessionStorage.setItem('returnUrl', this.shareUrl);
const { token, info } = this.$store.state.user; const { token, info } = this.$store.state.user;
this.token = getCookie("token") || token; this.token = getCookie("token") || token;
// 如果有token,但没有用户信息,则获取用户信息 // 如果有token,但没有用户信息,则获取用户信息
...@@ -561,7 +562,6 @@ export default { ...@@ -561,7 +562,6 @@ export default {
this.projectId this.projectId
}&returnUrl=${encodeURIComponent(this.shareUrl)}` }&returnUrl=${encodeURIComponent(this.shareUrl)}`
); );
sessionStorage.setItem('returnUrl', encodeURIComponent(this.shareUrl));
window.location.href = jumpUrl; window.location.href = jumpUrl;
}); });
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册