Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bill-manager-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
赵啸非
bill-manager-ui
Commits
13e21e21
Commit
13e21e21
authored
Aug 02, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化页面
parent
81682abb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
admin_2/src/main.js
admin_2/src/main.js
+2
-0
admin_2/src/pages/home/Home.vue
admin_2/src/pages/home/Home.vue
+7
-1
admin_2/src/utils/request.js
admin_2/src/utils/request.js
+3
-5
admin_2/src/utils/resetMessage.js
admin_2/src/utils/resetMessage.js
+1
-1
No files found.
admin_2/src/main.js
View file @
13e21e21
...
...
@@ -16,6 +16,8 @@ import "@/assets/css/reset.css";
import
"
@/assets/css/common.less
"
;
import
"
@/assets/css/tailwindcss.css
"
;
// nprogress样式
// import "nprogress/nprogress.css";
// 事件总线
Vue
.
prototype
.
$bus
=
new
Vue
();
...
...
admin_2/src/pages/home/Home.vue
View file @
13e21e21
<
template
>
<div
class=
"home flex min-h-full w-full flex-col items-center"
>
<div
class=
"home flex min-h-full w-full flex-col items-center"
v-loading=
"loading"
>
<div
class=
"top-data-total flex h-[360px] w-full justify-center pt-[66px]"
>
<div
class=
"flex h-full flex-col"
>
<div
class=
"mb-[53px] flex flex-col items-center"
>
...
...
@@ -86,6 +89,7 @@ export default {
},
data
()
{
return
{
loading
:
false
,
totalDataset
:
{
dimensions
:
[
"
name
"
,
"
value
"
],
source
:
[],
...
...
@@ -107,7 +111,9 @@ export default {
mounted
()
{},
methods
:
{
async
getHomeData
()
{
this
.
loading
=
true
;
let
res
=
await
getHomeData
();
this
.
loading
=
false
;
if
(
res
.
data
.
code
==
1
)
{
let
{
data
}
=
res
.
data
;
let
{
thirtyPhStatList
,
thirtyPjStatList
,
thirtyStatList
}
=
data
;
...
...
admin_2/src/utils/request.js
View file @
13e21e21
...
...
@@ -6,7 +6,7 @@ import router from "@/router";
import
store
from
"
@/store
"
;
import
{
message
}
from
"
@/utils/resetMessage
"
;
// 加载条插件
import
NProgress
from
"
nprogress
"
;
//
import NProgress from "nprogress";
// 请求超时时间
axios
.
defaults
.
timeout
=
60
*
1000
;
...
...
@@ -20,7 +20,7 @@ axios.interceptors.request.use(
if
(
token
)
{
config
.
headers
.
Authorization
=
token
;
}
NProgress
.
start
();
//
NProgress.start();
return
config
;
},
(
err
)
=>
{
...
...
@@ -52,7 +52,7 @@ axios.interceptors.response.use(
},
2000
);
}
}
NProgress
.
done
();
//
NProgress.done();
return
response
;
},
(
error
)
=>
{
...
...
@@ -103,8 +103,6 @@ axios.interceptors.response.use(
}
message
.
error
({
message
:
error
.
message
,
maxCount
:
1
,
duration
:
1
,
});
return
Promise
.
resolve
(
error
.
response
);
...
...
admin_2/src/utils/resetMessage.js
View file @
13e21e21
...
...
@@ -22,7 +22,7 @@ const Messages = (opt) => {
if
(
typeof
opt
===
"
string
"
)
{
opt
=
{
message
:
opt
,
duration
:
1
000
,
duration
:
3
000
,
};
}
...
...
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