Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
nizhengjia888
gin-vue-admin
提交
f69dbe5d
G
gin-vue-admin
项目概览
nizhengjia888
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f69dbe5d
编写于
10月 12, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
局部更新和自动打开文档
上级
21a173f7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
44 addition
and
10 deletion
+44
-10
web/openDocument.js
web/openDocument.js
+23
-0
web/package.json
web/package.json
+1
-1
web/src/main.js
web/src/main.js
+1
-1
web/src/utils/request.js
web/src/utils/request.js
+4
-5
web/src/view/layout/index.vue
web/src/view/layout/index.vue
+9
-2
web/src/view/system/state.vue
web/src/view/system/state.vue
+6
-1
未找到文件。
web/openDocument.js
0 → 100644
浏览文件 @
f69dbe5d
/*
商用代码公司自用产品无需授权
若作为代码出售的产品(任何涉及代码交付第三方作为后续开发)必须保留此脚本
或标注原作者信息
否则将依法维权
*/
var
child_process
=
require
(
"
child_process
"
);
var
url
=
"
https://www.gin-vue-admin.com
"
,
cmd
=
''
;
console
.
log
(
process
.
platform
)
switch
(
process
.
platform
)
{
case
'
win32
'
:
cmd
=
'
start
'
;
child_process
.
exec
(
cmd
+
'
'
+
url
);
break
;
case
'
darwin
'
:
cmd
=
'
open
'
;
child_process
.
exec
(
cmd
+
'
'
+
url
);
break
;
}
\ No newline at end of file
web/package.json
浏览文件 @
f69dbe5d
...
...
@@ -3,7 +3,7 @@
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"serve"
:
"
node openDocument.js &&
vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"lint"
:
"vue-cli-service lint"
},
...
...
web/src/main.js
浏览文件 @
f69dbe5d
...
...
@@ -54,7 +54,7 @@ auth(Vue)
import
uploader
from
'
vue-simple-uploader
'
Vue
.
use
(
uploader
)
new
Vue
({
export
default
new
Vue
({
render
:
h
=>
h
(
App
),
router
,
store
...
...
web/src/utils/request.js
浏览文件 @
f69dbe5d
import
axios
from
'
axios
'
;
// 引入axios
import
{
Message
,
Loading
}
from
'
element-ui
'
;
import
{
Message
}
from
'
element-ui
'
;
import
{
store
}
from
'
@/store/index
'
import
context
from
'
@/main.js
'
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
timeout
:
99999
})
let
acitveAxios
=
0
let
loadingInstance
let
timer
const
showLoading
=
()
=>
{
acitveAxios
++
...
...
@@ -15,7 +15,7 @@ const showLoading = () => {
}
timer
=
setTimeout
(()
=>
{
if
(
acitveAxios
>
0
)
{
loadingInstance
=
Loading
.
service
({
fullscreen
:
true
}
)
context
.
$bus
.
emit
(
"
showLoading
"
)
}
},
400
);
}
...
...
@@ -24,13 +24,12 @@ const closeLoading = () => {
acitveAxios
--
if
(
acitveAxios
<=
0
)
{
clearTimeout
(
timer
)
loadingInstance
&&
loadingInstance
.
close
(
)
context
.
$bus
.
emit
(
"
closeLoading
"
)
}
}
//http request 拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
console
.
log
(
config
)
if
(
!
config
.
donNotShowLoading
)
{
showLoading
()
}
...
...
web/src/view/layout/index.vue
浏览文件 @
f69dbe5d
...
...
@@ -58,11 +58,11 @@
</transition>
<transition
mode=
"out-in"
name=
"el-fade-in-linear"
>
<keep-alive>
<router-view
class=
"admin-box"
v-if=
"$route.meta.keepAlive"
></router-view>
<router-view
v-loading=
"loadingFlag"
element-loading-text=
"正在加载中"
class=
"admin-box"
v-if=
"$route.meta.keepAlive"
></router-view>
</keep-alive>
</transition>
<transition
mode=
"out-in"
name=
"el-fade-in-linear"
>
<router-view
class=
"admin-box"
v-if=
"!$route.meta.keepAlive"
></router-view>
<router-view
v-loading=
"loadingFlag"
element-loading-text=
"正在加载中"
class=
"admin-box"
v-if=
"!$route.meta.keepAlive"
></router-view>
</transition>
<BottomInfo
/>
</el-main>
...
...
@@ -106,6 +106,7 @@ export default {
isMobile
:
false
,
isShadowBg
:
false
,
showPassword
:
false
,
loadingFlag
:
false
,
pwdModify
:
{},
rules
:
{
password
:
[
...
...
@@ -209,6 +210,12 @@ export default {
}
this
.
$bus
.
emit
(
'
collapse
'
,
this
.
isCollapse
)
this
.
$bus
.
emit
(
'
mobile
'
,
this
.
isMobile
)
this
.
$bus
.
on
(
"
showLoading
"
,()
=>
{
this
.
loadingFlag
=
true
})
this
.
$bus
.
on
(
"
closeLoading
"
,()
=>
{
this
.
loadingFlag
=
false
})
window
.
onresize
=
()
=>
{
return
(()
=>
{
let
screenWidth
=
document
.
body
.
clientWidth
...
...
web/src/view/system/state.vue
浏览文件 @
f69dbe5d
...
...
@@ -138,6 +138,7 @@ export default {
name
:
"
State
"
,
data
()
{
return
{
timer
:
null
,
state
:
{},
colors
:
[
{
color
:
"
#5cb87a
"
,
percentage
:
20
},
...
...
@@ -148,10 +149,14 @@ export default {
},
created
()
{
this
.
reload
();
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
reload
();
},
1000
*
10
);
},
beforeDestroy
(){
clearInterval
(
this
.
timer
)
this
.
timer
=
null
},
methods
:
{
async
reload
()
{
const
{
data
}
=
await
getSystemState
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录