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

不用带returnUrl

上级 ef9eae4a
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
Toast('请前往云鹊医APP学习课程'); Toast('请前往云鹊医APP学习课程');
return; return;
} }
let jumpUrl = getWebPageUrl(`profexam/#/course-detail?courseId=${item.id}&projectId=${this.projectId}&returnUrl=${encodeURIComponent(location.href)}`); let jumpUrl = getWebPageUrl(`profexam/#/course-detail?courseId=${item.id}&projectId=${this.projectId}`);
window.location.href = jumpUrl; window.location.href = jumpUrl;
}, },
......
...@@ -306,7 +306,7 @@ export default { ...@@ -306,7 +306,7 @@ export default {
} }
}, },
btnClick1() { btnClick1() {
this.$router.push({ path: '/goods-detail', query: { goodsId: this.goodsId, projectId: this.projectId, returnUrl: encodeURIComponent(location.href + '&projectId=' + this.projectId) } }) this.$router.push({ path: '/goods-detail', query: { goodsId: this.goodsId, projectId: this.projectId } })
}, },
// 折叠、展开目录 // 折叠、展开目录
onToggle(index) { onToggle(index) {
......
...@@ -133,7 +133,6 @@ export default { ...@@ -133,7 +133,6 @@ export default {
mounted() { mounted() {
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.goodsId = this.$route.query.goodsId || 74; this.goodsId = this.$route.query.goodsId || 74;
// this.returnUrl = encodeURIComponent(this.$route.query.returnUrl);
this.getGoodsInfo(); this.getGoodsInfo();
this.getTabW(); this.getTabW();
const { token, info } = this.$store.state.user; const { token, info } = this.$store.state.user;
...@@ -369,9 +368,6 @@ export default { ...@@ -369,9 +368,6 @@ export default {
if (that.projectId) { if (that.projectId) {
query.projectId = that.projectId query.projectId = that.projectId
} }
// if (that.returnUrl) {
// query.returnUrl = that.returnUrl
// }
that.$router.push({ path: '/prezult', query }); that.$router.push({ path: '/prezult', query });
}, },
fail: function() { fail: function() {
...@@ -419,9 +415,6 @@ export default { ...@@ -419,9 +415,6 @@ export default {
if (this.projectId) { if (this.projectId) {
path += `&projectId=${this.projectId}` path += `&projectId=${this.projectId}`
} }
// if (this.returnUrl) {
// path += `&returnUrl=${this.returnUrl}`
// }
return getWebPageUrl(path); return getWebPageUrl(path);
}, },
// 绑定项目和订单的关系 // 绑定项目和订单的关系
......
...@@ -57,11 +57,11 @@ export default { ...@@ -57,11 +57,11 @@ export default {
} }
}, },
created() { created() {
let { projectId, orderId, returnUrl } = this.$route.query; let { projectId, orderId } = this.$route.query;
this.projectId = projectId || 0; this.projectId = projectId || 0;
this.orderId = orderId || 0; this.orderId = orderId || 0;
this.returnUrl = sessionStorage.getItem('returnUrl') || decodeURIComponent(returnUrl); this.returnUrl = localStorage.getItem('returnUrl');
console.log('projectId', 'orderId', this.projectId, this.orderId, this.returnUrl, decodeURIComponent(this.returnUrl)); console.log('projectId', 'orderId', this.projectId, this.orderId, this.returnUrl);
// 直接从商品过来的 // 直接从商品过来的
// if(!this.projectId) { // if(!this.projectId) {
// this.msgContent = "购买成功"; // this.msgContent = "购买成功";
......
...@@ -351,7 +351,7 @@ export default { ...@@ -351,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); localStorage.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,但没有用户信息,则获取用户信息
...@@ -560,7 +560,7 @@ export default { ...@@ -560,7 +560,7 @@ export default {
let jumpUrl = getWebPageUrl( let jumpUrl = getWebPageUrl(
`profexam/#/goods-detail?goodsId=${this.cardInfo.id}&projectId=${ `profexam/#/goods-detail?goodsId=${this.cardInfo.id}&projectId=${
this.projectId this.projectId
}&returnUrl=${encodeURIComponent(this.shareUrl)}` }`
); );
window.location.href = jumpUrl; window.location.href = jumpUrl;
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册