GitBucket
4.6.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull Requests
Labels
Milestones
Wiki
08335
/
hivui-platform-template
hivui平台项目模板
Browse code
@中文描述:注释
@升级登记:1 @同步后端:0 @同步数据库:0 @同步配置:0 @向下兼容:1
master
1 parent
18edcc3
commit
dbe79666c4045211536ef5157f128c2b6fb54c9f
20278
authored
on 19 Jun 2024
Showing
1 changed file
project/hivuiLogin/App.vue
Ignore Space
Show notes
View
project/hivuiLogin/App.vue
<template> <router-view/> </template> <script> import { projectName } from "./config"; import { getUrlValue,getUrlSearch } from "./utils/index"; import merge from 'lodash/merge'; export default { components: {}, data() { return { }; }, computed: { }, async created() { let _pt=window.__loginCfg&&window.__loginCfg.pageType; let _red=window.__loginCfg&&window.__loginCfg.redirect; let _param=this.getParam(); let urlPn=getUrlValue(location.href,"pn") if(urlPn){ if(!getUrlValue(window.HIVUI_SETTING.loginUrl,"pn")){ window.HIVUI_SETTING.loginUrl+="?pn="+urlPn; } if(!getUrlValue(window.HIVUI_SETTING.mainPageUrl,"pn")){ window.HIVUI_SETTING.mainPageUrl+="?pn="+urlPn; } } if(_pt){ switch(_pt){ case "mini": this.$router.replace({ name:"miniLogin", params:_param, }); break; case "middle": this.$router.replace({ name:"middlePage", params:_param, }); break; case "sso-middle": this.$router.replace({ name:"ssoMiddlePage", params:_param, }); break; } } /*await this.$store.dispatch('user/getProjectDefValue',{ key:"checkPhone", defaultValue:true, }).then((res)=>{ if(typeof(res)!="undefined" && window.customSysCofig){ window.customSysCofig.__checkPhone=res; } });*/ }, mounted(){ //window.customSysCofig=merge(window.default_customSysCfg,window.customSysCofig||{}); }, methods: { getParam(){ let hash=location.hash; let result={}; result=getUrlSearch("?"+hash.substring(2)); return result; }, }, }; </script> <style lang="scss"> </style>
<template> <router-view/> </template> <script> import { projectName } from "./config"; import { getUrlValue,getUrlSearch } from "./utils/index"; import merge from 'lodash/merge'; export default { components: {}, data() { return { }; }, computed: { }, async created() { let _pt=window.__loginCfg&&window.__loginCfg.pageType; let _red=window.__loginCfg&&window.__loginCfg.redirect; let _param=this.getParam(); let urlPn=getUrlValue(location.href,"pn") if(urlPn){ if(!getUrlValue(window.HIVUI_SETTING.loginUrl,"pn")){ window.HIVUI_SETTING.loginUrl+="?pn="+urlPn; } if(!getUrlValue(window.HIVUI_SETTING.mainPageUrl,"pn")){ window.HIVUI_SETTING.mainPageUrl+="?pn="+urlPn; } } if(_pt){ switch(_pt){ case "mini": this.$router.replace({ name:"miniLogin", params:_param, }); break; case "middle": this.$router.replace({ name:"middlePage", params:_param, }); break; case "sso-middle": this.$router.replace({ name:"ssoMiddlePage", params:_param, }); break; } } await this.$store.dispatch('user/getProjectDefValue',{ key:"checkPhone", defaultValue:true, }).then((res)=>{ if(typeof(res)!="undefined" && window.customSysCofig){ window.customSysCofig.__checkPhone=res; } }); }, mounted(){ //window.customSysCofig=merge(window.default_customSysCfg,window.customSysCofig||{}); }, methods: { getParam(){ let hash=location.hash; let result={}; result=getUrlSearch("?"+hash.substring(2)); return result; }, }, }; </script> <style lang="scss"> </style>
Show line notes below