E:\0_RG\Code\rg3-cli\public\config\app.config.extand.js
computed:{
//_fromTerminal rgandriod
fromTerminal: function () {
return window.$appNavs.fromTerminal;
},//_current_theme
fromTheme: function () {
return window.$appNavs.fromTheme;
},
},
E:\0_RG\Code\rg3-cli\src\components\basis\bs-login-register\style.scss
//通过主题控制样式
.bs-login-btns[from-theme='technology-black']{
margin-bottom: 0.8rem;
.el-button--primary{
padding: 0;
width: 80%;
line-height: 40px;
height: 40px;
border-radius: 25px;
background-color: rgba(16, 16, 16, 1);
color: rgba(255, 255, 255, 1);
font-size: 16px;
text-align: center;
font-family: Arial;
}
}
http://localhost:5775/auth/main-register?_fromTerminal=andriod
http://localhost:5775/auth/main-register?_fromTerminal=andriod&_fromTheme=technology-black
{
"value": "high-gloss-white",
"name": "高亮白",
"type": "theme"
},
{
"value": "technology-black",
"name": "科技黑",
"type": "theme"
},
{
"value": "glass-blue",
"name": "玻璃蓝",
"type": "theme"
},
{
"value": "lightyear-red",
"name": "光年红",
"type": "theme"
},
{
"value": "mimicry-purple",
"name": "磨砂紫",
"type": "theme"
},
{
"value": "orange-yellow",
"name": "橙子黄",
"type": "theme"
},
{
"value": "texture-gold",
"name": "纹理金",
"type": "theme"
},
//获取当前来至的APP容器/终端,用于对业务进行二次处理
if (window.$bowUtil.requestCurFindParam("_fromTerminal")) {
window.$appNavs.fromTerminal = window.$bowUtil.requestCurFindParam("_fromTerminal");
sessionStorage.setItem("_current_from_terminal", window.$appNavs.fromTerminal);
} else if (sessionStorage.getItem("_current_from_terminal")) {
window.$appNavs.fromTerminal = sessionStorage.getItem("_current_from_terminal");
} else {
window.$appNavs.fromTerminal = "default";
}
//获取当前来至的APP主题,用于对业务进行二次处理
if (window.$bowUtil.requestCurFindParam("_fromTheme")) {
window.$appNavs.fromTheme = window.$bowUtil.requestCurFindParam("_fromTheme");
sessionStorage.setItem("_current_from_theme", window.$appNavs.fromTheme);
} else if (sessionStorage.getItem("_current_from_theme")) {
window.$appNavs.fromTheme = sessionStorage.getItem("_current_from_theme");
} else {
window.$appNavs.fromTheme = "default";
}
文档更新时间: 2023-05-24 11:14 作者:admin