Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agent-platform
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
赵啸非
agent-platform
Commits
81d199ba
Commit
81d199ba
authored
Apr 29, 2025
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改登录
parent
8c8d6740
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6172 additions
and
5098 deletions
+6172
-5098
base-manager-ui/admin/.env.development
base-manager-ui/admin/.env.development
+2
-2
base-manager-ui/admin/src/pages/login/Login copy.vue
base-manager-ui/admin/src/pages/login/Login copy.vue
+223
-0
base-manager-ui/admin/src/pages/login/Login.vue
base-manager-ui/admin/src/pages/login/Login.vue
+57
-199
base-manager-ui/admin/src/router/index.js
base-manager-ui/admin/src/router/index.js
+341
-0
base-manager-ui/admin/src/services/basicsetApi.js
base-manager-ui/admin/src/services/basicsetApi.js
+1
-1
base-manager-ui/admin/vue.config.js
base-manager-ui/admin/vue.config.js
+2
-2
base-manager-ui/admin/yarn.lock
base-manager-ui/admin/yarn.lock
+5546
-4894
No files found.
base-manager-ui/admin/.env.development
View file @
81d199ba
#开发环境
NODE_ENV = "development"
VUE_APP_API_BASE_URL=http://192.168.0.252:110
89
VUE_APP_API_IMG_URL=http://192.168.0.252:110
89
/
VUE_APP_API_BASE_URL=http://192.168.0.252:110
71
VUE_APP_API_IMG_URL=http://192.168.0.252:110
71
/
# VUE_APP_API_BASE_URL=http://192.168.0.98:11078
# VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
#VUE_APP_API_BASE_URL=http://10.12.185.213:11071
\ No newline at end of file
base-manager-ui/admin/src/pages/login/Login copy.vue
0 → 100644
View file @
81d199ba
<
template
>
<common-layout>
<div
class=
"top"
>
<div
class=
"header"
>
<img
alt=
"logo"
class=
"logo"
src=
"@/assets/img/logo.png"
/>
<span
class=
"title"
>
{{
systemName
}}
</span>
</div>
<div
class=
"desc"
>
智慧政务先行者
</div>
</div>
<!--
<div
class=
"login"
>
<a-form
@
submit=
"onSubmit"
:form=
"form"
>
<a-tabs
size=
"large"
:tabBarStyle=
"
{ textAlign: 'center' }"
style="padding: 0 2px"
>
<a-tab-pane
tab=
"账户密码登录"
key=
"1"
>
<a-alert
type=
"error"
:closable=
"true"
v-if=
"error"
:message=
"error"
@
close=
"onClose"
showIcon
style=
"margin-bottom: 24px"
/>
<a-form-item>
<a-input
autocomplete=
"autocomplete"
size=
"large"
placeholder=
"请输入账号"
v-decorator=
"[
'userName',
{
rules: [
{
required: true,
message: '请输入账户名',
whitespace: true,
},
],
},
]"
>
<a-icon
slot=
"prefix"
type=
"user"
/>
</a-input>
</a-form-item>
<a-form-item>
<a-input
size=
"large"
placeholder=
"请输入密码"
autocomplete=
"autocomplete"
type=
"password"
v-decorator=
"[
'password',
{
rules: [
{
required: true,
message: '请输入密码',
whitespace: true,
},
],
},
]"
>
<a-icon
slot=
"prefix"
type=
"lock"
/>
</a-input>
</a-form-item>
</a-tab-pane>
</a-tabs>
<div></div>
<a-form-item>
<a-button
:loading=
"logging"
style=
"width: 100%; margin-top: 24px"
size=
"large"
htmlType=
"submit"
type=
"primary"
>
登录
</a-button
>
</a-form-item>
</a-form>
</div>
-->
</common-layout>
</
template
>
<
script
>
import
CommonLayout
from
"
@/layouts/CommonLayout
"
;
import
local
from
"
@/utils/local
"
;
// import {login, getRoutesConfig} from '@/services/user'
import
{
login
}
from
"
@/services/user
"
;
// import { setAuthorization } from "@/utils/request";
// import {loadRoutes} from '@/utils/routerUtil'
import
{
mapMutations
}
from
"
vuex
"
;
export
default
{
name
:
"
Login
"
,
components
:
{
CommonLayout
},
data
()
{
return
{
logging
:
false
,
error
:
""
,
form
:
this
.
$form
.
createForm
(
this
),
};
},
created
()
{
if
(
this
.
$route
.
query
.
loginName
)
{
const
userName
=
this
.
$route
.
query
.
loginName
;
// this.form.password = 'admin';
const
password
=
"
xhxADMIN8@a
"
;
login
(
userName
,
password
).
then
(
this
.
afterLogin
);
}
},
computed
:
{
systemName
()
{
return
this
.
$store
.
state
.
setting
.
systemName
;
},
},
methods
:
{
...
mapMutations
(
"
account
"
,
[
"
setUser
"
,
"
setPermissions
"
,
"
setRoles
"
]),
onSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFields
((
err
)
=>
{
if
(
!
err
)
{
this
.
logging
=
true
;
const
userName
=
this
.
form
.
getFieldValue
(
"
userName
"
);
const
password
=
this
.
form
.
getFieldValue
(
"
password
"
);
login
(
userName
,
password
).
then
(
this
.
afterLogin
);
}
});
},
afterLogin
(
res
)
{
this
.
logging
=
false
;
const
loginRes
=
res
.
data
;
console
.
log
(
loginRes
);
if
(
loginRes
.
code
==
1
)
{
const
{
token
}
=
loginRes
.
data
;
local
.
setLocal
(
"
token
"
,
token
);
// setAuthorization({ token: token, expireAt: new Date(expiresTime) });
this
.
$router
.
push
(
"
basicset/website
"
);
this
.
$message
.
success
(
loginRes
.
msg
,
3
);
}
else
{
this
.
error
=
loginRes
.
msg
;
}
},
onClose
()
{
this
.
error
=
false
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.ant-form-item {
margin-bottom: 0;
display: block;
align-items: normal;
}
.common-layout {
.top {
text-align: center;
.header {
height: 44px;
line-height: 44px;
a {
text-decoration: none;
}
.logo {
height: 44px;
vertical-align: top;
margin-right: 16px;
}
.title {
font-size: 33px;
color: @title-color;
font-family: "Myriad Pro", "Helvetica Neue", Arial, Helvetica,
sans-serif;
font-weight: 600;
position: relative;
top: 2px;
}
}
.desc {
font-size: 14px;
color: @text-color-second;
margin-top: 12px;
margin-bottom: 40px;
}
}
.login {
width: 368px;
margin: 0 auto;
@media screen and (max-width: 576px) {
width: 95%;
}
@media screen and (max-width: 320px) {
.captcha-button {
font-size: 14px;
}
}
.icon {
font-size: 24px;
color: @text-color-second;
margin-left: 16px;
vertical-align: middle;
cursor: pointer;
transition: color 0.3s;
&:hover {
color: @primary-color;
}
}
}
}
/deep/.ant-form-item-control {
height: 55px;
margin-bottom: 5px;
}
/deep/.ant-input {
width: 100% !important;
}
</
style
>
base-manager-ui/admin/src/pages/login/Login.vue
View file @
81d199ba
<
template
>
<common-layout>
<div
class=
"top"
>
<div
class=
"header"
>
<img
alt=
"logo"
class=
"logo"
src=
"@/assets/img/logo.png"
/>
<span
class=
"title"
>
{{
systemName
}}
</span>
</div>
<div
class=
"desc"
>
智慧政务先行者
</div>
</div>
<!--
<div
class=
"login"
>
<a-form
@
submit=
"onSubmit"
:form=
"form"
>
<a-tabs
size=
"large"
:tabBarStyle=
"
{ textAlign: 'center' }"
style="padding: 0 2px"
>
<a-tab-pane
tab=
"账户密码登录"
key=
"1"
>
<a-alert
type=
"error"
:closable=
"true"
v-if=
"error"
:message=
"error"
@
close=
"onClose"
showIcon
style=
"margin-bottom: 24px"
/>
<a-form-item>
<a-input
autocomplete=
"autocomplete"
size=
"large"
placeholder=
"请输入账号"
v-decorator=
"[
'userName',
{
rules: [
{
required: true,
message: '请输入账户名',
whitespace: true,
},
],
},
]"
>
<a-icon
slot=
"prefix"
type=
"user"
/>
</a-input>
</a-form-item>
<a-form-item>
<a-input
size=
"large"
placeholder=
"请输入密码"
autocomplete=
"autocomplete"
type=
"password"
v-decorator=
"[
'password',
{
rules: [
{
required: true,
message: '请输入密码',
whitespace: true,
},
],
},
]"
>
<a-icon
slot=
"prefix"
type=
"lock"
/>
</a-input>
</a-form-item>
</a-tab-pane>
</a-tabs>
<div></div>
<a-form-item>
<a-button
:loading=
"logging"
style=
"width: 100%; margin-top: 24px"
size=
"large"
htmlType=
"submit"
type=
"primary"
>
登录
</a-button
>
</a-form-item>
</a-form>
</div>
-->
</common-layout>
<div>
<div>
页面跳转中......
</div>
</div>
</
template
>
<
script
>
import
CommonLayout
from
"
@/layouts/CommonLayout
"
;
import
local
from
"
@/utils/local
"
;
// import {login, getRoutesConfig} from '@/services/user'
import
{
login
}
from
"
@/services/user
"
;
// import { setAuthorization } from "@/utils/request";
// import {loadRoutes} from '@/utils/routerUtil'
import
{
mapMutations
}
from
"
vuex
"
;
import
{
createMenus
}
from
"
@/router
"
;
import
{
login
}
from
"
@/services/user
"
;
export
default
{
name
:
"
Login
"
,
components
:
{
CommonLayout
},
data
()
{
return
{
logging
:
false
,
error
:
""
,
form
:
this
.
$form
.
createForm
(
this
),
};
return
{};
},
created
()
{
if
(
this
.
$route
.
query
.
loginName
)
{
const
userName
=
this
.
$route
.
query
.
loginName
;
// this.form.password = 'admin';
const
password
=
"
xhxADMIN8@a
"
;
login
(
userName
,
password
).
then
(
this
.
afterLogin
);
login
(
userName
,
password
).
then
((
res
)
=>
{
const
loginRes
=
res
.
data
;
console
.
log
(
loginRes
);
if
(
loginRes
.
code
==
1
)
{
const
{
token
}
=
loginRes
.
data
;
local
.
setLocal
(
"
token
"
,
token
);
let
userInfo
=
{
id
:
loginRes
.
data
.
id
,
userType
:
loginRes
.
data
.
userType
,
currUserName
:
loginRes
.
data
.
currUserName
,
};
this
.
getToken
(
token
,
userInfo
,
loginRes
.
data
);
this
.
$message
.
success
(
loginRes
.
msg
,
3
);
}
else
{
this
.
error
=
loginRes
.
msg
;
}
});
}
},
computed
:
{
systemName
()
{
return
this
.
$store
.
state
.
setting
.
systemName
;
},
},
methods
:
{
...
mapMutations
(
"
account
"
,
[
"
setUser
"
,
"
setPermissions
"
,
"
setRoles
"
]),
onSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFields
((
err
)
=>
{
if
(
!
err
)
{
this
.
logging
=
true
;
const
userName
=
this
.
form
.
getFieldValue
(
"
userName
"
);
const
password
=
this
.
form
.
getFieldValue
(
"
password
"
);
login
(
userName
,
password
).
then
(
this
.
afterLogin
);
}
});
},
afterLogin
(
res
)
{
this
.
logging
=
false
;
const
loginRes
=
res
.
data
;
console
.
log
(
loginRes
);
if
(
loginRes
.
code
==
1
)
{
const
{
token
}
=
loginRes
.
data
;
local
.
setLocal
(
"
token
"
,
token
);
// setAuthorization({ token: token, expireAt: new Date(expiresTime) });
this
.
$router
.
push
(
"
basicset/website
"
);
this
.
$message
.
success
(
loginRes
.
msg
,
3
);
...
mapMutations
(
"
site
"
,
[
"
SET_userInfo
"
,
"
SET_token
"
,
"
SET_SITE_ID
"
,
"
SET_siteName
"
,
"
SET_sysName
"
,
"
SET_sysLogo
"
,
"
SET_path
"
,
]),
// 获取token
getToken
(
token
,
userInfo
,
data
)
{
// let { userInfo, siteid, siteName, sysName, sysLogo, path } =
// this.$route.query;
if
(
token
)
{
this
.
SET_userInfo
(
userInfo
);
this
.
SET_token
(
token
);
console
.
log
(
data
);
// data.siteid ? this.SET_SITE_ID(data.siteid) : "";
// data.siteName ? this.SET_siteName(data.siteName) : "";
// this.SET_sysName(data.sysName);
// this.SET_sysLogo(data.sysLogo);
// this.SET_path(data.path);
// local.setLocal("siteId", data.siteid);
// local.setLocal("siteName", data.siteName);
// 动态菜单
createMenus
();
this
.
$router
.
push
(
"
/website
"
);
}
else
{
this
.
error
=
loginRes
.
msg
;
this
.
$message
.
warning
(
"
跳转失败,请重新登录
"
);
setTimeout
(()
=>
{
location
.
href
=
process
.
env
.
VUE_APP_API_portal_URL
;
},
2000
);
}
},
onClose
()
{
this
.
error
=
false
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.ant-form-item {
margin-bottom: 0;
display: block;
align-items: normal;
}
.common-layout {
.top {
text-align: center;
.header {
height: 44px;
line-height: 44px;
a {
text-decoration: none;
}
.logo {
height: 44px;
vertical-align: top;
margin-right: 16px;
}
.title {
font-size: 33px;
color: @title-color;
font-family: "Myriad Pro", "Helvetica Neue", Arial, Helvetica,
sans-serif;
font-weight: 600;
position: relative;
top: 2px;
}
}
.desc {
font-size: 14px;
color: @text-color-second;
margin-top: 12px;
margin-bottom: 40px;
}
}
.login {
width: 368px;
margin: 0 auto;
@media screen and (max-width: 576px) {
width: 95%;
}
@media screen and (max-width: 320px) {
.captcha-button {
font-size: 14px;
}
}
.icon {
font-size: 24px;
color: @text-color-second;
margin-left: 16px;
vertical-align: middle;
cursor: pointer;
transition: color 0.3s;
&:hover {
color: @primary-color;
}
}
}
}
/deep/.ant-form-item-control {
height: 55px;
margin-bottom: 5px;
}
/deep/.ant-input {
width: 100% !important;
}
</
style
>
<
style
lang=
"less"
scoped
></
style
>
base-manager-ui/admin/src/router/index.js
View file @
81d199ba
This diff is collapsed.
Click to expand it.
base-manager-ui/admin/src/services/basicsetApi.js
View file @
81d199ba
const
BASE_URL
=
process
.
env
.
NODE_ENV
===
"
development
"
?
"
/api
"
?
"
/
basics_
api
"
:
process
.
env
.
VUE_APP_API_BASE_URL
;
module
.
exports
=
{
loginapi
:
{
...
...
base-manager-ui/admin/vue.config.js
View file @
81d199ba
...
...
@@ -40,12 +40,12 @@ module.exports = {
disableHostCheck
:
true
,
port
:
8080
,
proxy
:
{
"
/api
"
:
{
"
/
basics_
api
"
:
{
//此处要与 /services/api.js 中的 API_PROXY_PREFIX 值保持一致
target
:
process
.
env
.
VUE_APP_API_BASE_URL
,
changeOrigin
:
true
,
pathRewrite
:
{
"
^/api
"
:
""
,
"
^/
basics_
api
"
:
""
,
},
// cookieDomainRewrite: 'localhost',
},
...
...
base-manager-ui/admin/yarn.lock
View file @
81d199ba
This diff is collapsed.
Click to expand it.
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