Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
linshenxs-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈超
linshenxs-shop
Commits
a80cc97d
Commit
a80cc97d
authored
Jul 29, 2022
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A
parent
90b68f49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
11 deletions
+36
-11
src/components/uploader.vue
+20
-8
src/page/index/index.vue
+0
-1
src/page/index/top/index.vue
+14
-0
vue.config.js
+2
-2
No files found.
src/components/uploader.vue
View file @
a80cc97d
...
@@ -95,13 +95,7 @@
...
@@ -95,13 +95,7 @@
watch
:
{
watch
:
{
lazyList
(
n
,
o
)
{
lazyList
(
n
,
o
)
{
if
(
n
&&
n
.
length
>
0
&&
!
this
.
lazyLoaded
)
{
if
(
n
&&
n
.
length
>
0
&&
!
this
.
lazyLoaded
)
{
this
.
lazyLoaded
=
true
this
.
lazyLoad
(
n
)
this
.
pushList
(
n
.
split
(
","
).
map
(
url
=>
{
return
{
url
:
url
,
name
:
url
}
}))
}
}
}
}
},
},
...
@@ -114,8 +108,16 @@
...
@@ -114,8 +108,16 @@
}
}
}))
}))
}
}
let
n
=
this
.
lazyList
if
(
n
&&
n
.
length
>
0
&&
!
this
.
lazyLoaded
)
{
this
.
lazyLoad
(
n
)
}
},
},
methods
:
{
methods
:
{
lazyLoad
(
n
)
{
this
.
lazyLoaded
=
true
this
.
delayInit
(
n
)
},
onUpload
(
req
)
{
onUpload
(
req
)
{
let
f
=
req
.
file
let
f
=
req
.
file
let
bucket
=
""
let
bucket
=
""
...
@@ -163,6 +165,16 @@
...
@@ -163,6 +165,16 @@
this
.
nowUrl
=
f
.
url
this
.
nowUrl
=
f
.
url
}
}
},
},
delayInit
(
urls
)
{
this
.
$nextTick
(()
=>
{
this
.
fileList
=
urls
.
split
(
","
).
map
(
url
=>
{
return
{
url
:
url
,
name
:
url
}
})
})
},
initList
(
list
)
{
initList
(
list
)
{
this
.
fileList
=
list
this
.
fileList
=
list
},
},
...
@@ -179,7 +191,7 @@
...
@@ -179,7 +191,7 @@
})
})
},
},
isImage
(
str
)
{
isImage
(
str
)
{
let
sufix
=
[
'png'
,
'jpg'
,
'jpeg'
,
'bmp'
,
'gif'
,
'webp'
,
'psd'
,
'svg'
,
'tiff'
]
let
sufix
=
[
'png'
,
'jpg'
,
'jpeg'
,
'bmp'
,
'gif'
,
'webp'
,
'psd'
,
'svg'
,
'tiff'
,
'ico'
]
for
(
let
i
=
0
;
i
<
sufix
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
sufix
.
length
;
i
++
)
{
let
sf
=
sufix
[
i
]
let
sf
=
sufix
[
i
]
if
(
str
.
endsWith
(
sf
))
{
if
(
str
.
endsWith
(
sf
))
{
...
...
src/page/index/index.vue
View file @
a80cc97d
...
@@ -43,7 +43,6 @@ import {checkToken} from '@/api/login'
...
@@ -43,7 +43,6 @@ import {checkToken} from '@/api/login'
import
{
calcScreen
}
from
'@/util'
import
{
calcScreen
}
from
'@/util'
import
GlobalWebSocket
from
'@/components/WebSocket/GlobalWebSocket'
import
GlobalWebSocket
from
'@/components/WebSocket/GlobalWebSocket'
export
default
{
export
default
{
name
:
'Index'
,
name
:
'Index'
,
provide
()
{
provide
()
{
...
...
src/page/index/top/index.vue
View file @
a80cc97d
...
@@ -64,6 +64,8 @@ import topLogs from './top-logs'
...
@@ -64,6 +64,8 @@ import topLogs from './top-logs'
import
topColor
from
'./top-color'
import
topColor
from
'./top-color'
import
topSetting
from
'./top-setting'
import
topSetting
from
'./top-setting'
const
synth
=
window
.
speechSynthesis
export
default
{
export
default
{
name
:
'Top'
,
name
:
'Top'
,
components
:
{
components
:
{
...
@@ -170,6 +172,7 @@ export default {
...
@@ -170,6 +172,7 @@ export default {
z
.
forEach
(
d
=>
{
z
.
forEach
(
d
=>
{
showList
.
forEach
(
item
=>
{
showList
.
forEach
(
item
=>
{
if
(
item
.
tag
==
d
.
type
)
{
if
(
item
.
tag
==
d
.
type
)
{
this
.
checkNeedSpeak
(
item
,
d
)
item
.
number
=
d
.
value
item
.
number
=
d
.
value
}
}
})
})
...
@@ -191,6 +194,17 @@ export default {
...
@@ -191,6 +194,17 @@ export default {
})
})
},
},
checkNeedSpeak
(
item
,
remote
)
{
if
(
item
.
number
<
remote
.
value
)
{
const
msg
=
new
SpeechSynthesisUtterance
()
msg
.
text
=
"有新的"
+
item
.
title
+
"消息,请注意查收"
msg
.
volume
=
'1'
msg
.
rate
=
'1'
msg
.
pitch
=
'0'
msg
.
lang
=
'zh-cn'
synth
.
speak
(
msg
)
}
},
handleScreen
()
{
handleScreen
()
{
fullscreenToggel
()
fullscreenToggel
()
},
},
...
...
vue.config.js
View file @
a80cc97d
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* 配置参考:
* 配置参考:
* https://cli.vuejs.org/zh/config/
* https://cli.vuejs.org/zh/config/
*/
*/
//
const url = 'http://linshenxs-gateway:9999'
const
url
=
'http://linshenxs-gateway:9999'
const
url
=
'http://47.108.51.175:9999'
//
const url = 'http://47.108.51.175:9999'
const
CompressionWebpackPlugin
=
require
(
'compression-webpack-plugin'
)
const
CompressionWebpackPlugin
=
require
(
'compression-webpack-plugin'
)
const
productionGzipExtensions
=
[
'js'
,
'css'
]
const
productionGzipExtensions
=
[
'js'
,
'css'
]
module
.
exports
=
{
module
.
exports
=
{
...
...
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