Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
葛齐林
energyai_vue
Commits
b3734185
Commit
b3734185
authored
May 11, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
126b6c9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
8 deletions
+32
-8
layout.vue
src/layout/header-aside/layout.vue
+32
-8
No files found.
src/layout/header-aside/layout.vue
View file @
b3734185
...
...
@@ -23,18 +23,18 @@
</div>
<div
class=
"weather-container"
>
<div
class=
"user-img"
>
室内
</div>
<div
class=
"weather-info"
v-if=
'list'
>
<div
class=
"weather-info"
v-if=
"snqxzBean"
>
<!--
<span
:class=
"station.length
<
6
?
'
lineFeed
'
:
''"
>
{{
station
}}
</span>
-->
<div>
温度
{{
list
.
snqxzList
[
0
].
temperature
}}
℃
</div>
<div>
湿度
{{
list
.
snqxzList
[
0
].
humidity
}}
%
</div>
<div>
温度
{{
snqxzBean
.
temperature
}}
℃
</div>
<div>
湿度
{{
snqxzBean
.
humidity
}}
%
</div>
</div>
</div>
<div
class=
"weather-container"
>
<div
class=
"user-img"
>
室外
</div>
<div
class=
"weather-info"
v-if=
'list'
>
<div
class=
"weather-info"
v-if=
"swqxzBean"
>
<!--
<span
:class=
"station.length
<
6
?
'
lineFeed
'
:
''"
>
{{
station
}}
</span>
-->
<div>
温度
{{
list
.
swqxzList
[
0
].
temperature
}}
℃
</div>
<div>
湿度
{{
list
.
swqxzList
[
0
].
humidity
}}
%
</div>
<div>
温度
{{
swqxzBean
.
temperature
}}
℃
</div>
<div>
湿度
{{
swqxzBean
.
humidity
}}
%
</div>
</div>
</div>
<!--
<d2-header-theme
/>
-->
...
...
@@ -117,7 +117,9 @@ export default {
timer
:
null
,
logTimeout
:
null
,
countNum
:
0
,
station
:
''
station
:
''
,
snqxzBean
:
{},
swqxzBean
:
{}
}
},
mounted
()
{
...
...
@@ -181,6 +183,14 @@ export default {
watch
:
{
size
(
val
)
{
this
.
countNum
=
val
},
list
:
{
handler
(
n
,
o
)
{
if
(
n
)
{
this
.
setData
()
}
},
deep
:
true
}
},
methods
:
{
...
...
@@ -224,7 +234,21 @@ export default {
if
(
!
this
.
station
||
this
.
station
==
'undefined'
)
{
setTimeout
(
this
.
getStation
,
3000
)
}
}
},
setData
()
{
// console.log('list:', this.list)
if
(
this
.
list
)
{
if
(
this
.
list
.
snqxzList
.
length
>
0
)
{
this
.
snqxzBean
=
this
.
list
.
snqxzList
[
0
]
}
if
(
this
.
list
.
swqxzList
.
length
>
0
)
{
this
.
swqxzBean
=
this
.
list
.
swqxzList
[
0
]
}
}
// console.log('snqxzBean:', this.snqxzBean)
// console.log('swqxzBean:', this.swqxzBean)
},
setSwqxzData
()
{}
}
}
</
script
>
...
...
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