Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
8b09ef31
Commit
8b09ef31
authored
Apr 06, 2023
by
白舜
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(登录注册): 样式修正,增加提示弹窗,修复跳转问题
parent
eee46766
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
203 additions
and
152 deletions
+203
-152
src/assets/css/index.css
src/assets/css/index.css
+9
-4
src/components/login-by-account.vue
src/components/login-by-account.vue
+13
-6
src/components/login-by-code.vue
src/components/login-by-code.vue
+4
-4
src/main.js
src/main.js
+4
-3
src/page/login/index.vue
src/page/login/index.vue
+31
-13
src/page/register/index.vue
src/page/register/index.vue
+1
-1
src/request/http.js
src/request/http.js
+102
-83
src/router/index.js
src/router/index.js
+1
-2
src/store/index.js
src/store/index.js
+38
-36
No files found.
src/assets/css/index.css
View file @
8b09ef31
...
@@ -1561,11 +1561,16 @@ border-radius:8px;
...
@@ -1561,11 +1561,16 @@ border-radius:8px;
}
}
.register_btn
{
.register_btn
{
display
:
flex
;
align-items
:
center
;
background-color
:
#eff2fa
;
background-color
:
#eff2fa
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
solid
1px
#b0bee8
;
border
:
solid
1px
#b0bee8
;
color
:
#3759be
;
color
:
#3759be
;
}
}
.register_btn
.icon-arrow-right
{
margin-left
:
39px
;
}
.forget_psd
{
.forget_psd
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#3759be
;
color
:
#3759be
;
...
...
src/components/login-by-account.vue
View file @
8b09ef31
...
@@ -31,12 +31,12 @@
...
@@ -31,12 +31,12 @@
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"loginAction()"
style=
"width: 100%"
>
登
录
</el-button>
<el-button
type=
"primary"
@
click=
"loginAction()"
style=
"width: 100%"
>
登录
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-top: 24px"
>
<el-form-item>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
还没有账号?前往注册
 
还没有账号?前往注册
<bg-icon
style=
"font-size: 12px; margin-right: 8px
"
icon=
"#bg-ic-arrow-right"
></bg-icon>
<bg-icon
class=
"icon-arrow-right
"
icon=
"#bg-ic-arrow-right"
></bg-icon>
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<div
class=
"regist_bottom"
>
<div
class=
"regist_bottom"
>
...
@@ -159,7 +159,7 @@ const getMenuObj = (menu, parentRowPath, menuObj) => {
...
@@ -159,7 +159,7 @@ const getMenuObj = (menu, parentRowPath, menuObj) => {
});
});
};
};
const
getImg
=
(
clearInput
=
false
)
=>
{
const
getImg
=
(
clearInput
=
false
)
=>
{
axios
.
get
(
`/apaas/system/v5/user/getCaptcha??width=
240&height=32
`
).
then
((
res
)
=>
{
axios
.
get
(
`/apaas/system/v5/user/getCaptcha??width=
138&height=36
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
state
.
imgId
=
res
.
data
.
data
.
id
;
state
.
imgId
=
res
.
data
.
data
.
id
;
state
.
imgSrc
=
res
.
data
.
data
.
captcha
;
state
.
imgSrc
=
res
.
data
.
data
.
captcha
;
...
@@ -193,6 +193,7 @@ const { loginForm, steploginFormRules, imgId, imgSrc, identifyCode, hidePassword
...
@@ -193,6 +193,7 @@ const { loginForm, steploginFormRules, imgId, imgSrc, identifyCode, hidePassword
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
.yzm_img
{
.yzm_img
{
margin
:
4px
0
0
16px
;
flex
:
1
;
flex
:
1
;
}
}
...
@@ -205,7 +206,13 @@ const { loginForm, steploginFormRules, imgId, imgSrc, identifyCode, hidePassword
...
@@ -205,7 +206,13 @@ const { loginForm, steploginFormRules, imgId, imgSrc, identifyCode, hidePassword
background-color
:
#f7f8f9
;
background-color
:
#f7f8f9
;
}
}
.regist_bottom
{
.regist_bottom
{
line-height
:
34px
;
line-height
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
:deep
(
.el-checkbox
)
{
height
:
auto
;
}
}
}
}
}
</
style
>
</
style
>
src/components/login-by-code.vue
View file @
8b09ef31
...
@@ -33,13 +33,13 @@
...
@@ -33,13 +33,13 @@
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-top: 54px"
>
<el-form-item>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-top: 24px"
>
<el-form-item>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
还没有账号?前往注册
 
还没有账号?前往注册
<bg-icon
style=
"font-size: 12px; margin-right: 8px"
icon=
"#bg-ic-arrow-right"
></bg-icon>
<bg-icon
icon=
"#bg-ic-arrow-right"
></bg-icon>
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<div>
<div>
...
...
src/main.js
View file @
8b09ef31
...
@@ -75,7 +75,7 @@ function getMenuObj(menu, parentRowPath, menuObj) {
...
@@ -75,7 +75,7 @@ function getMenuObj(menu, parentRowPath, menuObj) {
}
}
});
});
}
}
store
.
commit
(
"
setWhiteList
"
,
[
"
/
"
,
"
/login
"
,
"
/register
"
,
"
/password
"
]);
Promise
.
all
([
getUser
(),
getMenu
(
"
dadb2d3f-e263-48d1-9389-42acb9ea49f8
"
)])
Promise
.
all
([
getUser
(),
getMenu
(
"
dadb2d3f-e263-48d1-9389-42acb9ea49f8
"
)])
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
...
@@ -98,8 +98,9 @@ Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")])
...
@@ -98,8 +98,9 @@ Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")])
generateRoutes
();
generateRoutes
();
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
console
.
error
(
e
)
console
.
error
(
e
);
}).
finally
(()
=>
{
})
.
finally
(()
=>
{
createVue
.
use
(
ElementPlus
,
{
locale
}).
use
(
store
).
use
(
router
).
use
(
i18n
).
use
(
bgui
);
createVue
.
use
(
ElementPlus
,
{
locale
}).
use
(
store
).
use
(
router
).
use
(
i18n
).
use
(
bgui
);
createVue
.
mount
(
"
#app
"
);
createVue
.
mount
(
"
#app
"
);
});
});
...
...
src/page/login/index.vue
View file @
8b09ef31
...
@@ -6,18 +6,14 @@
...
@@ -6,18 +6,14 @@
configOptions.backgroundUrl ? JSON.parse(configOptions.backgroundUrl)[0].url : getImageUrl('bg.png')
configOptions.backgroundUrl ? JSON.parse(configOptions.backgroundUrl)[0].url : getImageUrl('bg.png')
})`,
})`,
}">
}">
<
div
class=
"bg-warning"
>
系统有效期剩余345 天,请管理员及时更换license!
</div
>
<
el-alert
class=
"bg-warning"
title=
"系统有效期剩余345 天,请管理员及时更换license!"
type=
"warning"
/
>
<div
class=
"bg-main"
>
<div
class=
"bg-main"
>
<!--
<div
class=
"bg-logo"
>
<!--
<div
class=
"bg-logo"
>
<img
class=
"logo"
src=
"../../assets/imgs/login_img_logo.png"
/>
<img
class=
"logo"
src=
"../../assets/imgs/login_img_logo.png"
/>
</div>
-->
</div>
-->
<div
class=
"bg-content"
>
<div
class=
"bg-content"
>
<bg-tabs
<bg-tabs
class=
"login-tab"
v-model=
"loginTab"
style=
"width: 480px"
v-if=
"pageType === 'login'"
>
class=
"login-tab"
v-model=
"loginTab"
style=
"min-height: 450px; width: 480px"
v-if=
"pageType === 'login'"
>
<bg-tab
label=
"账号密码登录"
name=
"account"
>
<bg-tab
label=
"账号密码登录"
name=
"account"
>
<LoginByAccount
@
register=
"switchPageType('account')"
@
password=
"password"
/>
<LoginByAccount
@
register=
"switchPageType('account')"
@
password=
"password"
/>
</bg-tab>
</bg-tab>
...
@@ -38,9 +34,18 @@
...
@@ -38,9 +34,18 @@
</p>
</p>
<p>
<p>
<span
class=
"can_click_text"
@
click=
"open(configOptions.legalStatementUrl)"
>
法律声明
</span>
|
<span
class=
"can_click_text"
@
click=
"open(configOptions.legalStatementUrl)"
>
法律声明
</span>
|
<span
class=
"can_click_text"
@
click=
"open(configOptions.privacyPolicyUrl)"
>
隐私政策
</span>
<span
class=
"can_click_text"
@
click=
"open(configOptions.privacyPolicyUrl)"
>
隐私政策
</span>
</p>
</p>
</div>
</div>
<el-dialog
class=
"dialog_box"
title=
"提示"
v-model=
"dialogPasswordChange"
width=
"400px"
>
<div>
密码已过期,请修改密码后再次登录
</div>
<template
v-slot:footer
>
<div
class=
"apaas_button"
>
<el-button
type=
"primary"
@
click=
"password"
>
立即修改
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -59,6 +64,8 @@ const pageType = ref("login");
...
@@ -59,6 +64,8 @@ const pageType = ref("login");
const
loginTab
=
ref
(
"
account
"
);
const
loginTab
=
ref
(
"
account
"
);
const
configOptions
=
ref
({});
const
configOptions
=
ref
({});
const
dialogPasswordChange
=
ref
(
false
);
const
switchPageType
=
(
type
)
=>
{
const
switchPageType
=
(
type
)
=>
{
// pageType.value = type
// pageType.value = type
router
.
push
(
"
/register
"
);
router
.
push
(
"
/register
"
);
...
@@ -96,15 +103,13 @@ onBeforeMount(() => {
...
@@ -96,15 +103,13 @@ onBeforeMount(() => {
background-image
:
url("@/assets/imgs/bg.png")
;
background-image
:
url("@/assets/imgs/bg.png")
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
background-position
:
center
center
;
background-position
:
center
center
;
background-size
:
cover
;
position
:
relative
;
position
:
relative
;
.bg-main
{
.bg-main
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
calc
(
50vh
-
250px
);
right
:
0
;
right
:
calc
(
28vw
-
240px
);
margin-right
:
16vw
;
margin-bottom
:
80px
;
transform
:
translateY
(
calc
(
-50%
));
width
:
500px
;
width
:
500px
;
max-height
:
calc
(
100vh
-
100px
);
max-height
:
calc
(
100vh
-
100px
);
overflow
:
hidden
auto
;
overflow
:
hidden
auto
;
...
@@ -141,7 +146,18 @@ onBeforeMount(() => {
...
@@ -141,7 +146,18 @@ onBeforeMount(() => {
}
}
}
}
>
.bg-content
{
.bg-content
{
:deep
(
.bg-tabs-content
)
{
padding
:
32px
0
;
}
}
:deep
(
.el-form
)
{
.el-form-item
{
.el-input
,
.el-button
{
height
:
40px
;
}
}
}
}
}
}
>
.bg-warning
{
>
.bg-warning
{
...
@@ -151,6 +167,8 @@ onBeforeMount(() => {
...
@@ -151,6 +167,8 @@ onBeforeMount(() => {
font-size
:
14px
;
font-size
:
14px
;
height
:
32px
;
height
:
32px
;
line-height
:
32px
;
line-height
:
32px
;
display
:
flex
;
justify-content
:
center
;
}
}
>
.bg-msg
{
>
.bg-msg
{
...
...
src/page/register/index.vue
View file @
8b09ef31
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<el-input
v-model=
"infoForm.business_name"
placeholder=
"请输入"
maxlength=
"20"
show-word-limit
/>
<el-input
v-model=
"infoForm.business_name"
placeholder=
"请输入"
maxlength=
"20"
show-word-limit
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"develop_id"
label=
"开发厂商名称"
>
<el-form-item
prop=
"develop_id"
label=
"开发厂商名称"
>
<el-select
v-model=
"infoForm.develop_id"
placeholder=
"请选择"
filterable
style=
"width: 100%"
>
<el-select
v-model=
"infoForm.develop_id"
placeholder=
"请选择
,如需新增,请输入任意字符
"
filterable
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in developList"
v-for=
"item in developList"
:key=
"'develop_' + item.dict_id"
:key=
"'develop_' + item.dict_id"
...
...
src/request/http.js
View file @
8b09ef31
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
* axios封装
* axios封装
* 请求拦截、响应拦截、错误统一处理
* 请求拦截、响应拦截、错误统一处理
*/
*/
import
axios
from
'
axios
'
;
import
axios
from
"
axios
"
;
import
router
from
'
../router/index
'
;
import
router
from
"
../router/index
"
;
import
store
from
'
../store/index
'
;
import
store
from
"
../store/index
"
;
function
getCookie
(
name
)
{
function
getCookie
(
name
)
{
var
strCookie
=
document
.
cookie
;
var
strCookie
=
document
.
cookie
;
...
@@ -16,22 +16,27 @@ function getCookie(name) {
...
@@ -16,22 +16,27 @@ function getCookie(name) {
return
""
;
return
""
;
}
}
const
tip
=
msg
=>
{
const
tip
=
(
msg
)
=>
{
console
.
log
(
msg
)
console
.
log
(
msg
);
}
}
;
/**
/**
* 跳转登录页
* 跳转登录页
* 携带当前页面路由,以期在登录页面完成登录后返回当前页面
* 携带当前页面路由,以期在登录页面完成登录后返回当前页面
*/
*/
const
toLogin
=
()
=>
{
const
toLogin
=
()
=>
{
router
.
replace
({
let
path
=
router
.
currentRoute
.
value
.
path
;
path
:
'
/login
'
,
//白名单中的401不做跳转
query
:
{
if
(
!
store
.
state
.
whiteList
.
includes
(
path
))
{
redirect
:
router
.
currentRoute
.
fullPath
window
.
location
.
href
=
`/apaas/manage/ui/#/login`
;
}
}
});
// router.replace({
}
// path: '/login',
// query: {
// redirect: router.currentRoute.fullPath
// }
// });
};
/**
/**
* 请求失败后的错误统一处理
* 请求失败后的错误统一处理
...
@@ -40,7 +45,9 @@ const toLogin = () => {
...
@@ -40,7 +45,9 @@ const toLogin = () => {
const
errorHandle
=
(
status
,
other
)
=>
{
const
errorHandle
=
(
status
,
other
)
=>
{
// 状态码判断
// 状态码判断
switch
(
status
)
{
switch
(
status
)
{
case
400
:
tip
(
'
请求错误(400)
'
);
break
;
case
400
:
tip
(
"
请求错误(400)
"
);
break
;
// 401: 未登录状态,跳转登录页
// 401: 未登录状态,跳转登录页
case
401
:
case
401
:
toLogin
();
toLogin
();
...
@@ -48,35 +55,45 @@ const errorHandle = (status, other) => {
...
@@ -48,35 +55,45 @@ const errorHandle = (status, other) => {
// 403 token过期
// 403 token过期
// 清除token并跳转登录页
// 清除token并跳转登录页
case
403
:
case
403
:
tip
(
'
登录过期,请重新登录
'
);
tip
(
"
登录过期,请重新登录
"
);
localStorage
.
removeItem
(
'
token
'
);
localStorage
.
removeItem
(
"
token
"
);
store
.
commit
(
'
loginSuccess
'
,
null
);
store
.
commit
(
"
loginSuccess
"
,
null
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// toLogin();
// toLogin();
},
1000
);
},
1000
);
break
;
break
;
case
404
:
tip
(
'
请求的资源不存在
'
);
break
;
case
404
:
case
408
:
tip
(
'
请求超时(408)
'
);
tip
(
"
请求的资源不存在
"
);
case
500
:
tip
(
'
服务器错误(500)
'
);
break
;
case
501
:
tip
(
'
服务未实现(501)
'
);
case
408
:
case
502
:
tip
(
'
网络错误(502)
'
);
tip
(
"
请求超时(408)
"
);
case
503
:
tip
(
'
服务不可用(503)
'
);
case
500
:
case
504
:
tip
(
'
网络超时(504)
'
);
tip
(
"
服务器错误(500)
"
);
case
505
:
tip
(
'
HTTP版本不受支持(505)
'
);
case
501
:
default
:
tip
(
`连接出错,
${
other
}
`
);
tip
(
"
服务未实现(501)
"
);
case
502
:
tip
(
"
网络错误(502)
"
);
case
503
:
tip
(
"
服务不可用(503)
"
);
case
504
:
tip
(
"
网络超时(504)
"
);
case
505
:
tip
(
"
HTTP版本不受支持(505)
"
);
default
:
tip
(
`连接出错,
${
other
}
`
);
}
}
}
}
;
// 创建axios实例
// 创建axios实例
var
instance
=
axios
.
create
({
timeout
:
1000
*
12
});
var
instance
=
axios
.
create
({
timeout
:
1000
*
12
});
// 设置post请求头
// 设置post请求头
instance
.
defaults
.
headers
.
post
[
'
Content-Type
'
]
=
'
application/x-www-form-urlencoded
'
;
instance
.
defaults
.
headers
.
post
[
"
Content-Type
"
]
=
"
application/x-www-form-urlencoded
"
;
/**
/**
* 请求拦截器
* 请求拦截器
* 每次请求前,如果存在token则在请求头中携带token
* 每次请求前,如果存在token则在请求头中携带token
*/
*/
instance
.
interceptors
.
request
.
use
(
instance
.
interceptors
.
request
.
use
(
config
=>
{
(
config
)
=>
{
// const token = store.state.token;
// const token = store.state.token;
// var token = 'Basic cm9vdA%3D%3D'
// var token = 'Basic cm9vdA%3D%3D'
// token && (config.headers.Authorization = token);
// token && (config.headers.Authorization = token);
...
@@ -93,20 +110,22 @@ instance.interceptors.request.use(
...
@@ -93,20 +110,22 @@ instance.interceptors.request.use(
// }
// }
return
config
;
return
config
;
},
},
error
=>
Promise
.
error
(
error
))
(
error
)
=>
Promise
.
error
(
error
)
);
// 响应拦截器
// 响应拦截器
instance
.
interceptors
.
response
.
use
(
instance
.
interceptors
.
response
.
use
(
// 请求成功
// 请求成功
res
=>
res
.
status
===
200
||
res
.
status
===
201
?
Promise
.
resolve
(
res
)
:
Promise
.
reject
(
res
),
(
res
)
=>
(
res
.
status
===
200
||
res
.
status
===
201
?
Promise
.
resolve
(
res
)
:
Promise
.
reject
(
res
)
),
// 请求失败
// 请求失败
error
=>
{
(
error
)
=>
{
const
{
response
}
=
error
;
const
{
response
}
=
error
;
if
(
response
)
{
if
(
response
)
{
// 请求已发出,但是不在2xx的范围
// 请求已发出,但是不在2xx的范围
errorHandle
(
response
.
status
,
response
.
data
.
errmessage
);
errorHandle
(
response
.
status
,
response
.
data
.
errmessage
);
return
Promise
.
reject
(
response
);
return
Promise
.
reject
(
response
);
}
}
});
}
);
export
default
instance
;
export
default
instance
;
src/router/index.js
View file @
8b09ef31
...
@@ -48,7 +48,7 @@ const router = newRouterFunc();
...
@@ -48,7 +48,7 @@ const router = newRouterFunc();
function
inWhiteList
(
toPath
)
{
function
inWhiteList
(
toPath
)
{
//配置白名单
//配置白名单
const
whiteList
=
[
"
/login
"
,
"
/register
"
,
"
/password
"
]
;
const
whiteList
=
store
.
state
.
whiteList
;
const
path
=
whiteList
.
find
((
value
)
=>
{
const
path
=
whiteList
.
find
((
value
)
=>
{
// 使用正则匹配
// 使用正则匹配
const
reg
=
new
RegExp
(
"
^
"
+
value
);
const
reg
=
new
RegExp
(
"
^
"
+
value
);
...
@@ -59,7 +59,6 @@ function inWhiteList(toPath) {
...
@@ -59,7 +59,6 @@ function inWhiteList(toPath) {
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
const
userInfo
=
store
.
state
.
userInfo
;
const
userInfo
=
store
.
state
.
userInfo
;
//已登录不可跳转登陆页
//已登录不可跳转登陆页
if
(
userInfo
&&
(
to
.
path
==
"
/login
"
||
to
.
path
==
"
/
"
))
{
if
(
userInfo
&&
(
to
.
path
==
"
/login
"
||
to
.
path
==
"
/
"
))
{
next
({
next
({
...
...
src/store/index.js
View file @
8b09ef31
import
{
createStore
}
from
'
vuex
'
import
{
createStore
}
from
"
vuex
"
;
const
store
=
createStore
({
const
store
=
createStore
({
state
:
{
state
:
{
userInfo
:
null
,
userInfo
:
null
,
menu
:
null
,
menu
:
null
,
route
:
null
,
route
:
null
,
nameFlag
:
false
,
nameFlag
:
false
,
msgBoxFlag
:
false
,
msgBoxFlag
:
false
,
nowzz
:
null
,
nowzz
:
null
,
menuObj
:{},
menuObj
:
{},
treeFlag
:
false
,
treeFlag
:
false
,
registerValid
:
false
,
registerValid
:
false
,
msgUnreadNum
:
0
,
msgUnreadNum
:
0
,
systemLogo
:
""
,
systemLogo
:
""
,
whiteList
:
[],
},
},
getters
:
{
getters
:
{
count
(
state
)
{
count
(
state
)
{
return
state
.
userInfo
return
state
.
userInfo
;
}
}
,
},
},
mutations
:
{
mutations
:
{
setUserInfo
(
state
,
info
)
{
setUserInfo
(
state
,
info
)
{
state
.
userInfo
=
info
state
.
userInfo
=
info
;
},
},
setMenu
(
state
,
menu
)
{
setMenu
(
state
,
menu
)
{
state
.
menu
=
menu
state
.
menu
=
menu
;
},
},
setMenuObj
(
state
,
menuObj
)
{
setMenuObj
(
state
,
menuObj
)
{
state
.
menuObj
=
menuObj
state
.
menuObj
=
menuObj
;
},
},
setRoute
(
state
,
route
)
{
setRoute
(
state
,
route
)
{
state
.
route
=
route
state
.
route
=
route
;
},
},
setNameFlag
(
state
,
nameFlag
)
{
setNameFlag
(
state
,
nameFlag
)
{
state
.
nameFlag
=
nameFlag
state
.
nameFlag
=
nameFlag
;
},
},
setMsgBoxFlag
(
state
,
msgBoxFlag
)
{
setMsgBoxFlag
(
state
,
msgBoxFlag
)
{
state
.
msgBoxFlag
=
msgBoxFlag
state
.
msgBoxFlag
=
msgBoxFlag
;
},
},
setNowzz
(
state
,
nowzz
)
{
setNowzz
(
state
,
nowzz
)
{
state
.
nowzz
=
nowzz
state
.
nowzz
=
nowzz
;
},
},
setTreeFlag
(
state
,
treeFlag
)
{
setTreeFlag
(
state
,
treeFlag
)
{
state
.
treeFlag
=
treeFlag
state
.
treeFlag
=
treeFlag
;
},
},
setRegisterValid
(
state
,
registerValid
)
{
setRegisterValid
(
state
,
registerValid
)
{
state
.
registerValid
=
registerValid
state
.
registerValid
=
registerValid
;
},
},
setUnreadNum
(
state
,
num
)
{
setUnreadNum
(
state
,
num
)
{
state
.
msgUnreadNum
=
num
state
.
msgUnreadNum
=
num
;
},
setSystemLogo
(
state
,
logo
)
{
state
.
systemLogo
=
logo
;
},
},
setSystemLogo
(
state
,
logo
)
{
setWhiteList
(
state
,
arr
)
{
state
.
systemLogo
=
logo
state
.
whiteList
=
arr
;
}
},
},
actions
:
{}
},
actions
:
{},
});
});
export
default
store
;
export
default
store
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment