Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-device-start
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
765e31ac
authored
Aug 22, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面适应
parent
c96732dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
26 deletions
+46
-26
dist.zip
+0
-0
src/assets/phone.gif
+0
-0
src/views/Home.vue
+45
-21
vue.config.js
+1
-5
No files found.
dist.zip
0 → 100644
View file @
765e31ac
File added
src/assets/phone.gif
0 → 100644
View file @
765e31ac
3.55 KB
src/views/Home.vue
View file @
765e31ac
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</div>
</div>
<div
class=
"icon"
>
<div
class=
"icon"
>
<div
class=
"phone"
>
<div
class=
"phone"
>
<img
src=
"../assets/phone.
png
"
alt
/>
<img
src=
"../assets/phone.
gif
"
alt
/>
</div>
</div>
<!--
<img
:src=
"connectIdCode"
alt=
""
>
-->
<!--
<img
:src=
"connectIdCode"
alt=
""
>
-->
</div>
</div>
...
@@ -45,17 +45,15 @@
...
@@ -45,17 +45,15 @@
<loading></loading>
正在绑定,请稍后...
<loading></loading>
正在绑定,请稍后...
</div>
</div>
<div
class=
"bottom-tips-item"
v-show=
"state == 'MAIN_INIT_QRCODE'"
>
初始化二维码页
</div>
<div
class=
"bottom-tips-item"
v-show=
"state == 'MAIN_INIT_QRCODE'"
>
初始化二维码页
</div>
<div
class=
"bottom-tips-item"
v-show=
"state == 'MAIN_STANDBY'"
>
<div
class=
"bottom-tips-item"
v-show=
"state == 'MAIN_STANDBY'"
>
待机页面
</div>
待机页面
</div>
<div
class=
"bottom-tips-item"
v-show=
"isConnected"
>
蓝牙已连接
</div>
<div
class=
"bottom-tips-item"
v-show=
"isConnected"
>
蓝牙已连接
</div>
</div>
</div>
<div
class=
"progress-container"
>
<div
class=
"progress-container"
>
<div
class=
"progress"
v-show=
"isLoading"
>
<div
class=
"progress"
v-show=
"isLoading"
>
<div
class=
"progress2"
ref=
"progress"
></div>
<div
class=
"progress2"
ref=
"progress"
></div>
</div>
</div>
<div
class=
"progress"
v-show=
"state == 'MAIN_BONDING' || state == 'MAIN_INIT_QRCODE'"
>
<div
class=
"progress"
v-show=
"state == 'MAIN_BONDING' || state == 'MAIN_INIT_QRCODE'"
>
<div
class=
"progress3"
></div>
<div
class=
"progress3"
></div>
<div
class=
"progress4"
v-show=
"state == 'MAIN_BONDING'"
></div>
<div
class=
"progress4"
v-show=
"state == 'MAIN_BONDING'"
></div>
</div>
</div>
</div>
</div>
...
@@ -86,7 +84,8 @@ export default {
...
@@ -86,7 +84,8 @@ export default {
return
{
return
{
qrcode
:
"http://www.maxrocky.com/"
,
qrcode
:
"http://www.maxrocky.com/"
,
link
:
"http://www.maxrocky.com/"
,
link
:
"http://www.maxrocky.com/"
,
state
:
""
,
state
:
"MAIN_BONDING"
,
loadingState
:
""
,
connectIdCode
:
""
,
connectIdCode
:
""
,
isLoading
:
false
,
isLoading
:
false
,
isConnected
:
false
isConnected
:
false
...
@@ -130,12 +129,14 @@ export default {
...
@@ -130,12 +129,14 @@ export default {
duration
:
10000
duration
:
10000
});
});
},
},
closeLoading
()
{
loadingFinished
()
{
anime
({
anime
({
targets
:
this
.
$refs
[
"progress"
],
targets
:
this
.
$refs
[
"progress"
],
width
:
"100%"
,
width
:
"100%"
,
duration
:
0
duration
:
20
0
});
});
},
closeLoading
()
{
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
anime
({
anime
({
targets
:
this
.
$refs
[
"progress"
],
targets
:
this
.
$refs
[
"progress"
],
...
@@ -167,10 +168,24 @@ export default {
...
@@ -167,10 +168,24 @@ export default {
},
},
watch
:
{
watch
:
{
isConnected
:
function
(
value
)
{
isConnected
:
function
(
value
)
{
if
(
value
)
{
console
.
log
(
value
);
alert
(
value
);
// if (value) {
}
else
{
// alert(value);
alert
(
value
);
// } else {
// alert(value);
// }
},
loadingState
:
function
(
value
)
{
switch
(
value
)
{
case
"LOADING"
:
this
.
showLoading
();
break
;
case
"SUCCESS"
:
this
.
loadingFinished
();
break
;
case
"FAILED"
:
this
.
closeLoading
();
break
;
}
}
},
},
state
:
function
(
value
)
{
state
:
function
(
value
)
{
...
@@ -183,17 +198,19 @@ export default {
...
@@ -183,17 +198,19 @@ export default {
case
"MAIN_STANDBY"
:
case
"MAIN_STANDBY"
:
this
.
MAIN_STANDBY
();
this
.
MAIN_STANDBY
();
break
;
break
;
case
"SHOW_LOADING"
:
this
.
showLoading
();
break
;
case
"SHOW_FINISH"
:
this
.
closeLoading
();
break
;
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
MAIN_INIT_QRCODE
();
this
.
MAIN_INIT_QRCODE
();
window
.
addEventListener
(
"resize"
,
()
=>
{
console
.
log
(
window
.
innerWidth
/
1920
,
window
.
innerWidth
);
this
.
$refs
[
"home"
].
style
.
zoom
=
window
.
innerWidth
/
1920
;
// this.$refs["home"].style.transform = `scale(${window.innerWidth / 1920})`;
});
this
.
$refs
[
"home"
].
style
.
zoom
=
window
.
innerWidth
/
1920
;
// this.$refs["home"].style.transform = `scale(${window.innerWidth / 1920})`;
},
},
created
()
{
created
()
{
window
.
test
=
this
;
window
.
test
=
this
;
...
@@ -226,6 +243,9 @@ export default {
...
@@ -226,6 +243,9 @@ export default {
window
.
$observer
(
"app.onPageChange"
,
state
=>
{
window
.
$observer
(
"app.onPageChange"
,
state
=>
{
this
.
state
=
state
.
new
;
this
.
state
=
state
.
new
;
});
});
window
.
$observer
(
"app.onFilmLoadStateChange"
,
state
=>
{
this
.
loadingState
=
state
;
});
});
});
// LAUNCH, // 启动页(预留)
// LAUNCH, // 启动页(预留)
// MAIN_INIT_QRCODE, // 初始化二维码页
// MAIN_INIT_QRCODE, // 初始化二维码页
...
@@ -237,7 +257,9 @@ export default {
...
@@ -237,7 +257,9 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.home
{
.home
{
height
:
100vh
;
height
:
1080px
;
width
:
1920px
;
margin
:
0
auto
;
background
:
url("../assets/01_启动页1.jpg")
no-repeat
center
;
background
:
url("../assets/01_启动页1.jpg")
no-repeat
center
;
background-size
:
cover
;
background-size
:
cover
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -355,7 +377,8 @@ export default {
...
@@ -355,7 +377,8 @@ export default {
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
height
:
100vh
;
bottom
:
0
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -366,6 +389,7 @@ export default {
...
@@ -366,6 +389,7 @@ export default {
position
:
relative
;
position
:
relative
;
background-color
:
rgba
(
255
,
255
,
255
,
0.5
);
background-color
:
rgba
(
255
,
255
,
255
,
0.5
);
border-radius
:
2px
;
border-radius
:
2px
;
margin-top
:
-60px
;
.progress2
{
.progress2
{
content
:
""
;
content
:
""
;
position
:
absolute
;
position
:
absolute
;
...
...
vue.config.js
View file @
765e31ac
...
@@ -52,11 +52,7 @@ module.exports = {
...
@@ -52,11 +52,7 @@ module.exports = {
//添加代码压缩工具,及设置生产环境自动删除console
//添加代码压缩工具,及设置生产环境自动删除console
new
UglifyJsPlugin
({
new
UglifyJsPlugin
({
uglifyOptions
:
{
uglifyOptions
:
{
compress
:
{
warnings
:
false
,
drop_debugger
:
true
,
drop_console
:
true
,
},
},
},
sourceMap
:
false
,
sourceMap
:
false
,
parallel
:
true
,
parallel
:
true
,
...
...
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