Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yma16
myblogVue_django
提交
92c3237d
M
myblogVue_django
项目概览
yma16
/
myblogVue_django
通知
5
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
myblogVue_django
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
92c3237d
编写于
4月 19, 2022
作者:
yma16
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:打包路径修改myblog_static
上级
17ecc436
变更
21
显示空白变更内容
内联
并排
Showing
21 changed file
with
226 addition
and
233 deletion
+226
-233
build/webpack.dev.conf.js
build/webpack.dev.conf.js
+2
-2
build/webpack.prod.conf.js
build/webpack.prod.conf.js
+3
-3
config/index.js
config/index.js
+3
-3
index.html
index.html
+4
-4
myblog_static/.gitkeep
myblog_static/.gitkeep
+0
-0
myblog_static/utils/fx_background/css/core.css
myblog_static/utils/fx_background/css/core.css
+0
-0
myblog_static/utils/fx_background/image/background.png
myblog_static/utils/fx_background/image/background.png
+0
-0
myblog_static/utils/fx_background/image/gg.jpg
myblog_static/utils/fx_background/image/gg.jpg
+0
-0
myblog_static/utils/fx_background/image/img_fbx.jpg
myblog_static/utils/fx_background/image/img_fbx.jpg
+0
-0
myblog_static/utils/fx_background/image/logo.ico
myblog_static/utils/fx_background/image/logo.ico
+0
-0
myblog_static/utils/fx_background/image/logo.jpg
myblog_static/utils/fx_background/image/logo.jpg
+0
-0
myblog_static/utils/fx_background/image/logo.png
myblog_static/utils/fx_background/image/logo.png
+0
-0
myblog_static/utils/fx_background/image/previewFix.jpg
myblog_static/utils/fx_background/image/previewFix.jpg
+0
-0
myblog_static/utils/fx_background/js/jquery-2.1.4.min.js
myblog_static/utils/fx_background/js/jquery-2.1.4.min.js
+0
-0
myblog_static/utils/fx_background/js/jquery.min.js
myblog_static/utils/fx_background/js/jquery.min.js
+2
-2
src/App.vue
src/App.vue
+80
-86
src/components/Article.vue
src/components/Article.vue
+1
-1
src/components/Loading.vue
src/components/Loading.vue
+1
-1
src/components/Onlinewebsocket.vue
src/components/Onlinewebsocket.vue
+3
-3
src/plugins/axios.js
src/plugins/axios.js
+26
-26
src/router/index.js
src/router/index.js
+101
-102
未找到文件。
build/webpack.dev.conf.js
浏览文件 @
92c3237d
...
...
@@ -57,10 +57,10 @@ const devWebpackConfig = merge(baseWebpackConfig, {
template
:
'
index.html
'
,
inject
:
true
}),
// copy custom static assets
// copy custom
myblog_
static assets
new
CopyWebpackPlugin
([
{
from
:
path
.
resolve
(
__dirname
,
'
../static
'
),
from
:
path
.
resolve
(
__dirname
,
'
../
myblog_
static
'
),
to
:
config
.
dev
.
assetsSubDirectory
,
ignore
:
[
'
.*
'
]
}
...
...
build/webpack.prod.conf.js
浏览文件 @
92c3237d
...
...
@@ -112,10 +112,10 @@ const webpackConfig = merge(baseWebpackConfig, {
minChunks
:
3
}),
// copy custom static assets
// copy custom
myblog_
static assets
new
CopyWebpackPlugin
([
{
from
:
path
.
resolve
(
__dirname
,
'
../static
'
),
from
:
path
.
resolve
(
__dirname
,
'
../
myblog_
static
'
),
to
:
config
.
build
.
assetsSubDirectory
,
ignore
:
[
'
.*
'
]
}
...
...
config/index.js
浏览文件 @
92c3237d
...
...
@@ -7,7 +7,7 @@ const path = require("path");
module
.
exports
=
{
dev
:
{
// Paths
assetsSubDirectory
:
"
static
"
,
assetsSubDirectory
:
"
myblog_
static
"
,
assetsPublicPath
:
"
/
"
,
proxyTable
:
{
"
/api/
"
:
{
...
...
@@ -78,8 +78,8 @@ module.exports = {
// https://webpack.js.org/configuration/devtool/#production
devtool
:
"
#source-map
"
,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Gzip off by default as many popular
myblog_
static hosts such as
// Surge or Netlify already gzip all
myblog_
static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip
:
false
,
...
...
index.html
浏览文件 @
92c3237d
...
...
@@ -6,16 +6,16 @@
<title>
yma16前端日记
</title>
<link
rel=
"shortcut icon"
href=
"
./
static/utils/fx_background/image/logo.ico"
href=
"
myblog_
static/utils/fx_background/image/logo.ico"
/>
<!-- up -->
<script
src=
"
./
static/utils/fx_background/js/jquery-2.1.4.min.js"
></script>
<link
rel=
"stylesheet"
href=
"
./
static/utils/fx_background/css/core.css"
/>
<script
src=
"
myblog_
static/utils/fx_background/js/jquery-2.1.4.min.js"
></script>
<link
rel=
"stylesheet"
href=
"
myblog_
static/utils/fx_background/css/core.css"
/>
<!-- 我的阿里图标库 -->
<script
src=
"http://at.alicdn.com/t/font_1957918_9kt1mmflyr8.js"
></script>
<style>
body
{
background
:
url(
./
static/utils/fx_background/image/background.png)
;
background
:
url(
myblog_
static/utils/fx_background/image/background.png)
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
overflow
:
hidden
;
...
...
static/.gitkeep
→
myblog_
static/.gitkeep
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/css/core.css
→
myblog_
static/utils/fx_background/css/core.css
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/background.png
→
myblog_
static/utils/fx_background/image/background.png
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/gg.jpg
→
myblog_
static/utils/fx_background/image/gg.jpg
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/img_fbx.jpg
→
myblog_
static/utils/fx_background/image/img_fbx.jpg
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/logo.ico
→
myblog_
static/utils/fx_background/image/logo.ico
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/logo.jpg
→
myblog_
static/utils/fx_background/image/logo.jpg
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/logo.png
→
myblog_
static/utils/fx_background/image/logo.png
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/image/previewFix.jpg
→
myblog_
static/utils/fx_background/image/previewFix.jpg
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/js/jquery-2.1.4.min.js
→
myblog_
static/utils/fx_background/js/jquery-2.1.4.min.js
浏览文件 @
92c3237d
文件已移动
static/utils/fx_background/js/jquery.min.js
→
myblog_
static/utils/fx_background/js/jquery.min.js
浏览文件 @
92c3237d
...
...
@@ -248,7 +248,7 @@
q
.
setAttribute
(
"
className
"
,
"
t
"
),
q
.
innerHTML
=
"
<link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>
"
,
d
=
q
.
getElementsByTagName
(
"
*
"
),
e
=
q
.
getElementsByTagName
(
"
a
"
)[
0
];
if
(
!
d
||
!
d
.
length
||
!
e
)
return
{};
g
=
c
.
createElement
(
"
select
"
),
h
=
g
.
appendChild
(
c
.
createElement
(
"
option
"
)),
i
=
q
.
getElementsByTagName
(
"
input
"
)[
0
],
b
=
{
leadingWhitespace
:
q
.
firstChild
.
nodeType
===
3
,
tbody
:
!
q
.
getElementsByTagName
(
"
tbody
"
).
length
,
htmlSerialize
:
!!
q
.
getElementsByTagName
(
"
link
"
).
length
,
style
:
/top/
.
test
(
e
.
getAttribute
(
"
style
"
)),
hrefNormalized
:
e
.
getAttribute
(
"
href
"
)
===
"
/a
"
,
opacity
:
/^0.55/
.
test
(
e
.
style
.
opacity
),
cssFloat
:
!!
e
.
style
.
cssFloat
,
checkOn
:
i
.
value
===
"
on
"
,
optSelected
:
h
.
selected
,
getSetAttribute
:
q
.
className
!==
"
t
"
,
enctype
:
!!
c
.
createElement
(
"
form
"
).
enctype
,
html5Clone
:
c
.
createElement
(
"
nav
"
).
cloneNode
(
!
0
).
outerHTML
!==
"
<:nav></:nav>
"
,
submitBubbles
:
!
0
,
changeBubbles
:
!
0
,
focusinBubbles
:
!
1
,
deleteExpando
:
!
0
,
noCloneEvent
:
!
0
,
inlineBlockNeedsLayout
:
!
1
,
shrinkWrapBlocks
:
!
1
,
reliableMarginRight
:
!
0
},
i
.
checked
=
!
0
,
b
.
noCloneChecked
=
i
.
cloneNode
(
!
0
).
checked
,
g
.
disabled
=
!
0
,
b
.
optDisabled
=
!
h
.
disabled
;
try
{
delete
q
.
test
}
catch
(
s
)
{
b
.
deleteExpando
=
!
1
}
!
q
.
addEventListener
&&
q
.
attachEvent
&&
q
.
fireEvent
&&
(
q
.
attachEvent
(
"
onclick
"
,
function
()
{
b
.
noCloneEvent
=
!
1
}),
q
.
cloneNode
(
!
0
).
fireEvent
(
"
onclick
"
)),
i
=
c
.
createElement
(
"
input
"
),
i
.
value
=
"
t
"
,
i
.
setAttribute
(
"
type
"
,
"
radio
"
),
b
.
radioValue
=
i
.
value
===
"
t
"
,
i
.
setAttribute
(
"
checked
"
,
"
checked
"
),
q
.
appendChild
(
i
),
k
=
c
.
createDocumentFragment
(),
k
.
appendChild
(
q
.
lastChild
),
b
.
checkClone
=
k
.
cloneNode
(
!
0
).
cloneNode
(
!
0
).
lastChild
.
checked
,
b
.
appendChecked
=
i
.
checked
,
k
.
removeChild
(
i
),
k
.
appendChild
(
q
),
q
.
innerHTML
=
""
,
a
.
getComputedStyle
&&
(
j
=
c
.
createElement
(
"
div
"
),
j
.
style
.
width
=
"
0
"
,
j
.
style
.
marginRight
=
"
0
"
,
q
.
style
.
width
=
"
2px
"
,
q
.
appendChild
(
j
),
b
.
reliableMarginRight
=
(
parseInt
((
a
.
getComputedStyle
(
j
,
null
)
||
{
marginRight
:
0
}).
marginRight
,
10
)
||
0
)
===
0
);
if
(
q
.
attachEvent
)
for
(
o
in
{
submit
:
1
,
change
:
1
,
focusin
:
1
})
n
=
"
on
"
+
o
,
p
=
n
in
q
,
p
||
(
q
.
setAttribute
(
n
,
"
return;
"
),
p
=
typeof
q
[
n
]
==
"
function
"
),
b
[
o
+
"
Bubbles
"
]
=
p
;
k
.
removeChild
(
q
),
k
=
g
=
h
=
j
=
q
=
i
=
null
,
f
(
function
()
{
var
a
,
d
,
e
,
g
,
h
,
i
,
j
,
k
,
m
,
n
,
o
,
r
=
c
.
getElementsByTagName
(
"
body
"
)[
0
];
!
r
||
(
j
=
1
,
k
=
"
position:absolute;top:0;left:0;width:1px;height:1px;margin:0;
"
,
m
=
"
visibility:hidden;border:0;
"
,
n
=
"
style='
"
+
k
+
"
border:5px solid #000;padding:0;'
"
,
o
=
"
<div
"
+
n
+
"
><div></div></div>
"
+
"
<table
"
+
n
+
"
cellpadding='0' cellspacing='0'>
"
+
"
<tr><td></td></tr></table>
"
,
a
=
c
.
createElement
(
"
div
"
),
a
.
style
.
cssText
=
m
+
"
width:0;height:0;position:static;top:0;margin-top:
"
+
j
+
"
px
"
,
r
.
insertBefore
(
a
,
r
.
firstChild
),
q
=
c
.
createElement
(
"
div
"
),
a
.
appendChild
(
q
),
q
.
innerHTML
=
"
<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>
"
,
l
=
q
.
getElementsByTagName
(
"
td
"
),
p
=
l
[
0
].
offsetHeight
===
0
,
l
[
0
].
style
.
display
=
""
,
l
[
1
].
style
.
display
=
"
none
"
,
b
.
reliableHiddenOffsets
=
p
&&
l
[
0
].
offsetHeight
===
0
,
q
.
innerHTML
=
""
,
q
.
style
.
width
=
q
.
style
.
paddingLeft
=
"
1px
"
,
f
.
boxModel
=
b
.
boxModel
=
q
.
offsetWidth
===
2
,
typeof
q
.
style
.
zoom
!=
"
undefined
"
&&
(
q
.
style
.
display
=
"
inline
"
,
q
.
style
.
zoom
=
1
,
b
.
inlineBlockNeedsLayout
=
q
.
offsetWidth
===
2
,
q
.
style
.
display
=
""
,
q
.
innerHTML
=
"
<div style='width:4px;'></div>
"
,
b
.
shrinkWrapBlocks
=
q
.
offsetWidth
!==
2
),
q
.
style
.
cssText
=
k
+
m
,
q
.
innerHTML
=
o
,
d
=
q
.
firstChild
,
e
=
d
.
firstChild
,
h
=
d
.
nextSibling
.
firstChild
.
firstChild
,
i
=
{
doesNotAddBorder
:
e
.
offsetTop
!==
5
,
doesAddBorderForTableAndCells
:
h
.
offsetTop
===
5
},
e
.
style
.
position
=
"
fixed
"
,
e
.
style
.
top
=
"
20px
"
,
i
.
fixedPosition
=
e
.
offsetTop
===
20
||
e
.
offsetTop
===
15
,
e
.
style
.
position
=
e
.
style
.
top
=
""
,
d
.
style
.
overflow
=
"
hidden
"
,
d
.
style
.
position
=
"
relative
"
,
i
.
subtractsBorderForOverflowNotVisible
=
e
.
offsetTop
===
-
5
,
i
.
doesNotIncludeMarginInBodyOffset
=
r
.
offsetTop
!==
j
,
r
.
removeChild
(
a
),
q
=
a
=
null
,
f
.
extend
(
b
,
i
))
});
return
b
}();
k
.
removeChild
(
q
),
k
=
g
=
h
=
j
=
q
=
i
=
null
,
f
(
function
()
{
var
a
,
d
,
e
,
g
,
h
,
i
,
j
,
k
,
m
,
n
,
o
,
r
=
c
.
getElementsByTagName
(
"
body
"
)[
0
];
!
r
||
(
j
=
1
,
k
=
"
position:absolute;top:0;left:0;width:1px;height:1px;margin:0;
"
,
m
=
"
visibility:hidden;border:0;
"
,
n
=
"
style='
"
+
k
+
"
border:5px solid #000;padding:0;'
"
,
o
=
"
<div
"
+
n
+
"
><div></div></div>
"
+
"
<table
"
+
n
+
"
cellpadding='0' cellspacing='0'>
"
+
"
<tr><td></td></tr></table>
"
,
a
=
c
.
createElement
(
"
div
"
),
a
.
style
.
cssText
=
m
+
"
width:0;height:0;position:
myblog_
static;top:0;margin-top:
"
+
j
+
"
px
"
,
r
.
insertBefore
(
a
,
r
.
firstChild
),
q
=
c
.
createElement
(
"
div
"
),
a
.
appendChild
(
q
),
q
.
innerHTML
=
"
<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>
"
,
l
=
q
.
getElementsByTagName
(
"
td
"
),
p
=
l
[
0
].
offsetHeight
===
0
,
l
[
0
].
style
.
display
=
""
,
l
[
1
].
style
.
display
=
"
none
"
,
b
.
reliableHiddenOffsets
=
p
&&
l
[
0
].
offsetHeight
===
0
,
q
.
innerHTML
=
""
,
q
.
style
.
width
=
q
.
style
.
paddingLeft
=
"
1px
"
,
f
.
boxModel
=
b
.
boxModel
=
q
.
offsetWidth
===
2
,
typeof
q
.
style
.
zoom
!=
"
undefined
"
&&
(
q
.
style
.
display
=
"
inline
"
,
q
.
style
.
zoom
=
1
,
b
.
inlineBlockNeedsLayout
=
q
.
offsetWidth
===
2
,
q
.
style
.
display
=
""
,
q
.
innerHTML
=
"
<div style='width:4px;'></div>
"
,
b
.
shrinkWrapBlocks
=
q
.
offsetWidth
!==
2
),
q
.
style
.
cssText
=
k
+
m
,
q
.
innerHTML
=
o
,
d
=
q
.
firstChild
,
e
=
d
.
firstChild
,
h
=
d
.
nextSibling
.
firstChild
.
firstChild
,
i
=
{
doesNotAddBorder
:
e
.
offsetTop
!==
5
,
doesAddBorderForTableAndCells
:
h
.
offsetTop
===
5
},
e
.
style
.
position
=
"
fixed
"
,
e
.
style
.
top
=
"
20px
"
,
i
.
fixedPosition
=
e
.
offsetTop
===
20
||
e
.
offsetTop
===
15
,
e
.
style
.
position
=
e
.
style
.
top
=
""
,
d
.
style
.
overflow
=
"
hidden
"
,
d
.
style
.
position
=
"
relative
"
,
i
.
subtractsBorderForOverflowNotVisible
=
e
.
offsetTop
===
-
5
,
i
.
doesNotIncludeMarginInBodyOffset
=
r
.
offsetTop
!==
j
,
r
.
removeChild
(
a
),
q
=
a
=
null
,
f
.
extend
(
b
,
i
))
});
return
b
}();
var
j
=
/^
(?:\{
.*
\}
|
\[
.*
\])
$/
,
k
=
/
([
A-Z
])
/g
;
f
.
extend
({
cache
:
{},
uuid
:
0
,
expando
:
"
jQuery
"
+
(
f
.
fn
.
jquery
+
Math
.
random
()).
replace
(
/
\D
/g
,
""
),
noData
:
{
embed
:
!
0
,
object
:
"
clsid:D27CDB6E-AE6D-11cf-96B8-444553540000
"
,
applet
:
!
0
},
hasData
:
function
(
a
)
{
a
=
a
.
nodeType
?
f
.
cache
[
a
[
f
.
expando
]]
:
a
[
f
.
expando
];
return
!!
a
&&
!
m
(
a
)
},
data
:
function
(
a
,
c
,
d
,
e
)
{
if
(
!!
f
.
acceptData
(
a
))
{
var
g
,
h
,
i
,
j
=
f
.
expando
,
...
...
src/App.vue
浏览文件 @
92c3237d
...
...
@@ -26,10 +26,10 @@
<el-submenu
index=
"1-1"
>
<
template
slot=
"title"
>
yma16
</
template
>
<el-menu-item
index=
"1-1-1"
>
stay hungry
</el-menu-item>
<a
@
click=
"
toe
charts"
>
<a
@
click=
"
jumpToE
charts"
>
<el-menu-item
index=
"1-1-2"
>
echarts
</el-menu-item>
</a>
<a
@
click=
"
toa
dmin"
>
<a
@
click=
"
jumpToA
dmin"
>
<el-menu-item
index=
"1-1-3"
>
superuser
</el-menu-item>
</a>
</el-submenu>
...
...
@@ -58,7 +58,7 @@
<el-submenu
index=
"3"
>
<
template
slot=
"title"
>
<i
class=
"el-icon-chat-line-round"
:click=
"online
w
ebsocket"
></i
<i
class=
"el-icon-chat-line-round"
:click=
"online
W
ebsocket"
></i
>
线上聊天
</
template
>
</el-submenu>
...
...
@@ -125,163 +125,157 @@
</el-footer>
</el-container>
</el-container>
<!-- <img src="./assets/logo.png"> -->
</div>
</template>
<
script
>
import
axios
from
"
axios
"
;
export
default
{
name
:
"
App
"
,
data
()
{
name
:
'
App
'
,
data
()
{
return
{
authSlogan
:
"
yma16
"
,
authSlogan
:
'
yma16
'
,
chat_flag
:
false
,
msg
:
"
yma16
"
,
msg
:
'
yma16
'
,
navigate_flag
:
true
,
value
:
new
Date
(),
baseurl
:
"
/api/
"
,
// baseurl: 'http://yongma16.xyz/',
src
:
"
https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg
"
,
url
:
"
/image/logo/logo.jpg
"
,
baseUrl
:
'
/api/
'
,
src
:
'
https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg
'
,
url
:
'
/image/logo/logo.jpg
'
,
srcList
:
[
"
https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg
"
,
"
https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg
"
,
'
https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg
'
,
'
https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg
'
],
headerData
:
[
"
从现在开始,种一棵树
"
,
"
从现在开始,种一棵树
"
],
readCount
:
0
,
}
;
headerData
:
[
'
从现在开始,种一棵树
'
,
'
从现在开始,种一棵树
'
],
readCount
:
0
}
},
mounted
()
{
this
.
addReadCountFun
()
;
this
.
readCountFun
()
;
mounted
()
{
this
.
addReadCountFun
()
this
.
readCountFun
()
},
methods
:
{
jumpIpDns
:
function
()
{
try
{
window
.
open
(
"
https://beian.miit.gov.cn
"
);
window
.
open
(
'
https://beian.miit.gov.cn
'
)
}
catch
(
r
)
{
window
.
location
.
href
=
"
https://beian.miit.gov.cn
"
;
throw
Error
(
r
)
;
window
.
location
.
href
=
'
https://beian.miit.gov.cn
'
throw
Error
(
r
)
}
},
addReadCountFun
:
function
()
{
cons
ole
.
log
(
"
addfun
"
);
let
client
ip
=
"
未知
"
;
cons
t
that
=
this
let
client
Ip
=
'
未知
'
try
{
console
.
log
(
"
ip待定
"
);
console
.
log
(
'
ip待定
'
)
}
catch
(
e
)
{
console
.
log
(
e
)
;
console
.
log
(
e
)
}
console
.
log
(
"
最终ip
"
,
clientip
);
axios
.
post
(
this
.
baseurl
+
"
count/add/
"
,
{
ip
:
clientip
,
that
.
$axios
.
post
(
this
.
baseUrl
+
'
count/add/
'
,
{
ip
:
clientIp
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
;
console
.
log
(
res
)
})
.
catch
((
e
)
=>
{
console
.
log
(
e
);
})
;
throw
Error
(
e
)
})
},
readCountFun
:
function
()
{
let
that
=
this
;
axios
.
get
(
that
.
base
url
+
"
count/get/
"
)
let
that
=
this
that
.
$
axios
.
get
(
that
.
base
Url
+
'
count/get/
'
)
.
then
((
res
)
=>
{
console
.
log
(
res
,
"
count
"
);
this
.
readCount
=
res
.
data
.
num
;
this
.
readCount
=
res
.
data
.
num
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
changeNavigate
:
function
()
{
this
.
navigate_flag
=
!
this
.
navigate_flag
;
// 取反
this
.
navigate_flag
=
!
this
.
navigate_flag
// 取反
},
handleOpen
(
key
,
keyPath
)
{
console
.
log
(
key
,
keyPath
)
;
if
(
key
===
"
3
"
)
{
console
.
log
(
"
打开3号
"
);
this
.
chat_flag
=
true
;
this
.
online
websocket
();
// 调用跳转
handleOpen
(
key
,
keyPath
)
{
console
.
log
(
key
,
keyPath
)
if
(
key
===
'
3
'
)
{
console
.
log
(
'
打开3号
'
)
this
.
chat_flag
=
true
this
.
online
Websocket
()
// 调用跳转
}
if
(
key
===
"
2-1
"
)
{
this
.
chat_flag
=
false
;
this
.
loginAction
()
;
// 调用跳转
if
(
key
===
'
2-1
'
)
{
this
.
chat_flag
=
false
this
.
loginAction
()
// 调用跳转
}
if
(
key
===
"
2-2
"
)
{
this
.
chat_flag
=
false
;
this
.
registerAction
()
;
// 调用跳转
if
(
key
===
'
2-2
'
)
{
this
.
chat_flag
=
false
this
.
registerAction
()
// 调用跳转
}
},
handleClose
(
key
,
keyPath
)
{
console
.
log
(
key
,
keyPath
);
console
.
log
(
"
关闭
"
);
if
(
key
===
"
3
"
)
{
this
.
chat_flag
=
false
;
handleClose
(
key
,
keyPath
)
{
console
.
info
(
key
,
keyPath
)
if
(
key
===
'
3
'
)
{
this
.
chat_flag
=
false
}
},
jumpRouter
:
function
(
params
)
{
this
.
$router
.
push
({
name
:
`
${
params
}
`
,
name
:
`
${
params
}
`
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
online
w
ebsocket
:
function
()
{
online
W
ebsocket
:
function
()
{
// console.log(this.$router);
this
.
$router
.
push
({
path
:
"
/onlinewebsocket
"
,
path
:
'
/onlinewebsocket
'
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
})
;
throw
Error
(
error
)
})
},
toe
charts
:
function
()
{
jumpToE
charts
:
function
()
{
// console.log(this.$router);
this
.
$router
.
push
({
path
:
"
/bilicom
"
,
path
:
'
/bilicom
'
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
toa
dmin
:
function
()
{
jumpToA
dmin
:
function
()
{
this
.
$router
.
push
({
path
:
"
/mavoneditor
"
,
path
:
'
/mavoneditor
'
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
loginAction
:
function
()
{
this
.
$router
.
push
({
path
:
"
/login
"
,
path
:
'
/login
'
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
registerAction
:
function
()
{
this
.
$router
.
push
({
path
:
"
/register
"
,
path
:
'
/register
'
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
}
,
}
,
}
;
console
.
log
(
error
)
})
}
}
}
</
script
>
<
style
>
...
...
@@ -293,7 +287,7 @@ body,
padding
:
0%
;
border
:
0px
;
height
:
100%
;
/* background: url(../static/utils/fx_background/image/gg.jpg) center top no-repeat; */
/* background: url(../
myblog_
static/utils/fx_background/image/gg.jpg) center top no-repeat; */
/* background: url(/image/snow/gg.jpg) center top no-repeat; */
}
...
...
@@ -352,7 +346,7 @@ body {
/* background-color: #e9eef3; */
text-align
:
left
;
opacity
:
1
;
/* background: url(../static/utils/fx_background/image/gg.jpg) center top no-repeat; */
/* background: url(../
myblog_
static/utils/fx_background/image/gg.jpg) center top no-repeat; */
margin
:
0
;
padding
:
0
;
}
...
...
src/components/Article.vue
浏览文件 @
92c3237d
...
...
@@ -148,7 +148,7 @@
<!--
<el-card
class=
"weather_class2"
cellpadding=
"1px"
shadow=
"always"
style=
"position: static; margin-top: 2%"
style=
"position:
myblog_
static; margin-top: 2%"
>
</el-card>
-->
...
...
src/components/Loading.vue
浏览文件 @
92c3237d
...
...
@@ -38,7 +38,7 @@ export default {
// scene.add(cube);
const
gltfLoader
=
new
GLTFLoader
()
gltfLoader
.
load
(
'
/static/utils/fx_background/model/glb/snow.glb
'
,
'
/
myblog_
static/utils/fx_background/model/glb/snow.glb
'
,
function
(
gltf
)
{
console
.
log
(
gltf
)
scene
.
add
(
gltf
.
scene
)
...
...
src/components/Onlinewebsocket.vue
浏览文件 @
92c3237d
...
...
@@ -705,7 +705,7 @@ export default {
}
.input_chat1
{
/* position: static; */
/* position:
myblog_
static; */
margin-top
:
5%
;
text-align
:
letf
;
line-height
:
50px
;
...
...
@@ -713,7 +713,7 @@ export default {
}
.input_chat2
{
/* position: static; */
/* position:
myblog_
static; */
margin-top
:
5%
;
text-align
:
letf
;
line-height
:
50px
;
...
...
@@ -859,7 +859,7 @@ export default {
}
.input_chat2
{
/* position: static; */
/* position:
myblog_
static; */
margin-top
:
5%
;
width
:
100%
;
text-align
:
letf
;
...
...
src/plugins/axios.js
浏览文件 @
92c3237d
"
use strict
"
;
'
use strict
'
import
Vue
from
'
vue
'
;
import
axios
from
"
axios
"
;
import
Vue
from
'
vue
'
import
axios
from
'
axios
'
// Full config: https://github.com/axios/axios#request-config
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
...
...
@@ -12,50 +12,50 @@ let config = {
// baseURL: process.env.baseURL || process.env.apiUrl || ""
// timeout: 60 * 1000, // Timeout
// withCredentials: true, // Check cross-site Access-Control
}
;
}
const
_axios
=
axios
.
create
(
config
)
;
const
_axios
=
axios
.
create
(
config
)
_axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
function
(
config
)
{
// Do something before request is sent
return
config
;
return
config
},
function
(
error
)
{
function
(
error
)
{
// Do something with request error
return
Promise
.
reject
(
error
)
;
return
Promise
.
reject
(
error
)
}
)
;
)
// Add a response interceptor
_axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
function
(
response
)
{
// Do something with response data
return
response
;
return
response
},
function
(
error
)
{
function
(
error
)
{
// Do something with response error
return
Promise
.
reject
(
error
)
;
return
Promise
.
reject
(
error
)
}
)
;
)
Plugin
.
install
=
function
(
Vue
,
options
)
{
Vue
.
axios
=
_axios
;
window
.
axios
=
_axios
;
Plugin
.
install
=
function
(
Vue
,
options
)
{
Vue
.
axios
=
_axios
window
.
axios
=
_axios
Object
.
defineProperties
(
Vue
.
prototype
,
{
axios
:
{
get
()
{
return
_axios
;
get
()
{
return
_axios
}
},
$axios
:
{
get
()
{
return
_axios
;
get
()
{
return
_axios
}
}
,
})
;
}
;
}
})
}
Vue
.
use
(
Plugin
)
export
default
Plugin
;
export
default
Plugin
src/router/index.js
浏览文件 @
92c3237d
...
...
@@ -4,7 +4,7 @@ import Nprogress from 'nprogress'
import
'
nprogress/nprogress.css
'
import
{
getToken
}
from
'
@/utils/auth
'
import
{
isEmpty
}
from
'
@/utils
'
import
VueRouter
from
"
vue-router
"
import
VueRouter
from
'
vue-router
'
// import Router from 'vue-router'
import
store
from
'
@/store
'
// store
...
...
@@ -20,59 +20,58 @@ import Loading from '@/components/Loading'
import
GrilShow
from
'
@/components/GrilShow
'
import
Csslearn
from
'
@/components/Csslearn
'
Vue
.
use
(
VueRouter
)
const
defaultRoutes
=
[{
const
defaultRoutes
=
[
{
path
:
'
/
'
,
name
:
'
Article
'
,
component
:
Article
},
{
},
{
path
:
'
/login
'
,
name
:
'
Login
'
,
component
:
Login
},
{
},
{
path
:
'
/register
'
,
name
:
'
Register
'
,
component
:
Register
},
{
},
{
path
:
'
/home
'
,
name
:
'
Home
'
,
component
:
Home
},
{
},
{
path
:
'
/onlinewebsocket
'
,
name
:
'
Onlinewebsocket
'
,
component
:
Onlinewebsocket
},
{
},
{
path
:
'
/bilicom
'
,
name
:
'
Bilicom
'
,
component
:
Bilicom
},
{
},
{
path
:
'
/mavoneditor
'
,
name
:
'
Mavoneditor
'
,
component
:
Mavoneditor
},
{
},
{
path
:
'
/loading
'
,
name
:
'
loading
'
,
component
:
Loading
},
{
},
{
path
:
'
/gril
'
,
name
:
'
grilshow
'
,
component
:
GrilShow
},
{
},
{
path
:
'
/css
'
,
name
:
'
css
'
,
component
:
Csslearn
}
}
// {
// path: '/register',
// name: 'Register',
...
...
@@ -105,20 +104,21 @@ const defaultRoutes = [{
// }
]
let
routes
=
[...
defaultRoutes
,
let
routes
=
[
...
defaultRoutes
// ...modulesRoutes,
// ...errorRoutes,
// ...dashboardRouters
]
;
const
originalPush
=
VueRouter
.
prototype
.
push
;
VueRouter
.
prototype
.
push
=
function
push
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
((
err
)
=>
err
);
}
;
]
const
originalPush
=
VueRouter
.
prototype
.
push
VueRouter
.
prototype
.
push
=
function
push
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
((
err
)
=>
err
)
}
const
router
=
new
VueRouter
({
routes
})
;
})
const
whiteList
=
[
"
/login
"
];
const
whiteList
=
[
'
/login
'
]
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
// Nprogress.start()
...
...
@@ -126,15 +126,15 @@ router.beforeEach(async (to, from, next) => {
// let hasToken = getToken()
next
()
console
.
log
(
'
localStorage
'
,
localStorage
)
let
name
=
localStorage
.
getItem
(
"
yma16siteUserInfoName
"
)
let
pwd
=
localStorage
.
getItem
(
"
yma16siteUserInfoPwd
"
)
let
name
=
localStorage
.
getItem
(
'
yma16siteUserInfoName
'
)
let
pwd
=
localStorage
.
getItem
(
'
yma16siteUserInfoPwd
'
)
let
hasToken
=
{
name
:
name
,
password
:
pwd
}
console
.
log
(
'
hasToken
'
,
hasToken
)
console
.
log
(
'
store.state 初始化
'
,
store
.
state
)
if
(
hasToken
.
name
&&
hasToken
.
password
)
{
if
(
hasToken
.
name
&&
hasToken
.
password
)
{
console
.
log
(
'
store.state.user 存在
'
,
store
.
state
.
user
)
if
(
isEmpty
(
store
.
state
.
user
.
userInfo
))
{
// 空的 modules下的user
...
...
@@ -157,11 +157,10 @@ router.beforeEach(async (to, from, next) => {
// Nprogress.done();
}
}
});
})
router
.
afterEach
((
to
,
from
)
=>
{
Nprogress
.
done
()
})
export
default
router
;
\ No newline at end of file
export
default
router
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录