mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
未登录跳转,url进行编码处理
This commit is contained in:
@@ -70,8 +70,8 @@ router.beforeEach((to, from, next) => {
|
||||
//store.commit('portal/SetBackUrl',location.href);
|
||||
//console.log(location.href,'location.href');
|
||||
//let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
//let backUrl=location.href.substring(urlPre.length);
|
||||
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+location.href;
|
||||
//let backUrl=location.href.substring(urlPre.length); encodeURIComponent()
|
||||
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
|
||||
NProgress.done()
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ import portalFooter from "@/components/PortalFooter.vue";
|
||||
this.id = this.$route.query.id;
|
||||
this.type = this.$route.query.type;
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
|
||||
let params='detailId='+this.id+'&inner=1';
|
||||
params=encodeURIComponent(params);
|
||||
|
||||
//console.log(urlPre,'urlPre');
|
||||
if(this.type == 20 || this.type=='online-course') {//在线课
|
||||
this.url= `${urlPre}/web/onlineClass?detailId=${this.id}&inner=1`
|
||||
|
||||
Reference in New Issue
Block a user