Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
c28c8274
Commit
c28c8274
authored
Oct 16, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化登录
parent
44ef027f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
6 deletions
+81
-6
portal-manager-ui/admin/src/request/request.js
portal-manager-ui/admin/src/request/request.js
+1
-0
portal-manager-ui/admin/src/utils/js/cookie.js
portal-manager-ui/admin/src/utils/js/cookie.js
+74
-0
portal-manager-ui/admin/src/views/signIn/signIn.vue
portal-manager-ui/admin/src/views/signIn/signIn.vue
+1
-2
portal-manager-ui/admin/vue.config.js
portal-manager-ui/admin/vue.config.js
+5
-4
No files found.
portal-manager-ui/admin/src/request/request.js
View file @
c28c8274
...
@@ -11,6 +11,7 @@ import storage from "@/utils/js/Storage";
...
@@ -11,6 +11,7 @@ import storage from "@/utils/js/Storage";
// 请求超时时间
// 请求超时时间
axios
.
defaults
.
timeout
=
60
*
1000
;
axios
.
defaults
.
timeout
=
60
*
1000
;
axios
.
defaults
.
withCredentials
=
true
;
// 设置统一服务器地址
// 设置统一服务器地址
// axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
// axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
...
...
portal-manager-ui/admin/src/utils/js/cookie.js
0 → 100644
View file @
c28c8274
export
default
{
getItem
:
function
(
sKey
)
{
return
(
decodeURIComponent
(
document
.
cookie
.
replace
(
new
RegExp
(
"
(?:(?:^|.*;)
\\
s*
"
+
encodeURIComponent
(
sKey
).
replace
(
/
[\-\.\+\*]
/g
,
"
\\
$&
"
)
+
"
\\
s*
\\
=
\\
s*([^;]*).*$)|^.*$
"
),
"
$1
"
)
)
||
null
);
},
setItem
:
function
(
sKey
,
sValue
,
vEnd
,
sPath
,
sDomain
,
bSecure
)
{
if
(
!
sKey
||
/^
(?:
expires|max
\-
age|path|domain|secure
)
$/i
.
test
(
sKey
))
{
return
false
;
}
var
sExpires
=
""
;
if
(
vEnd
)
{
switch
(
vEnd
.
constructor
)
{
case
Number
:
sExpires
=
vEnd
===
Infinity
?
"
; expires=Fri, 31 Dec 9999 23:59:59 GMT
"
:
"
; max-age=
"
+
vEnd
;
break
;
case
String
:
sExpires
=
"
; expires=
"
+
vEnd
;
break
;
case
Date
:
sExpires
=
"
; expires=
"
+
vEnd
.
toUTCString
();
break
;
}
}
document
.
cookie
=
encodeURIComponent
(
sKey
)
+
"
=
"
+
encodeURIComponent
(
sValue
)
+
sExpires
+
(
sDomain
?
"
; domain=
"
+
sDomain
:
""
)
+
(
sPath
?
"
; path=
"
+
sPath
:
""
)
+
(
bSecure
?
"
; secure
"
:
""
);
return
true
;
},
removeItem
:
function
(
sKey
,
sPath
,
sDomain
)
{
if
(
!
sKey
||
!
this
.
hasItem
(
sKey
))
{
return
false
;
}
document
.
cookie
=
encodeURIComponent
(
sKey
)
+
"
=; expires=Thu, 01 Jan 1970 00:00:00 GMT
"
+
(
sDomain
?
"
; domain=
"
+
sDomain
:
""
)
+
(
sPath
?
"
; path=
"
+
sPath
:
""
);
return
true
;
},
hasItem
:
function
(
sKey
)
{
return
new
RegExp
(
"
(?:^|;
\\
s*)
"
+
encodeURIComponent
(
sKey
).
replace
(
/
[\-\.\+\*]
/g
,
"
\\
$&
"
)
+
"
\\
s*
\\
=
"
).
test
(
document
.
cookie
);
},
keys
:
/* optional method: you can safely remove it! */
function
()
{
var
aKeys
=
document
.
cookie
.
replace
(
/
((?:
^|
\s
*;
)[^\=]
+
)(?=
;|$
)
|^
\s
*|
\s
*
(?:\=[^
;
]
*
)?(?:\1
|$
)
/g
,
""
)
.
split
(
/
\s
*
(?:\=[^
;
]
*
)?
;
\s
*/
);
for
(
var
nIdx
=
0
;
nIdx
<
aKeys
.
length
;
nIdx
++
)
{
aKeys
[
nIdx
]
=
decodeURIComponent
(
aKeys
[
nIdx
]);
}
return
aKeys
;
},
};
portal-manager-ui/admin/src/views/signIn/signIn.vue
View file @
c28c8274
...
@@ -394,8 +394,7 @@ export default {
...
@@ -394,8 +394,7 @@ export default {
// 加时间戳印记用于刷新gif
// 加时间戳印记用于刷新gif
let
mark
=
new
Date
().
getTime
();
let
mark
=
new
Date
().
getTime
();
// this.form.mark = mark;
// this.form.mark = mark;
this
.
imgCode
=
this
.
imgCode
=
this
.
api
+
"
/zwfw/securitycode/createCode
"
+
`?t=
${
mark
}
`
;
this
.
api
+
"
/zwfw/securitycode/createCode
"
+
`?mark=
${
mark
}
`
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
async
(
valid
)
=>
{
this
.
$refs
.
form
.
validate
(
async
(
valid
)
=>
{
...
...
portal-manager-ui/admin/vue.config.js
View file @
c28c8274
...
@@ -9,12 +9,13 @@ module.exports = defineConfig({
...
@@ -9,12 +9,13 @@ module.exports = defineConfig({
},
},
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
"
/
api
"
:
{
"
/
zwfw
"
:
{
target
:
process
.
env
.
VUE_APP_API_BASE_URL
,
target
:
process
.
env
.
VUE_APP_API_BASE_URL
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
// pathRewrite: {
"
^/api
"
:
""
,
// "^/api": "",
},
// },
cookieDomainRewrite
:
"
localhost
"
,
},
},
"
/file
"
:
{
"
/file
"
:
{
target
:
process
.
env
.
VUE_APP_API_BASE_URL
,
target
:
process
.
env
.
VUE_APP_API_BASE_URL
,
...
...
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