Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
dab5de01
authored
2024-08-21 17:10:01 +0800
by
杨炀
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
隐藏天气插件
1 parent
ff1d1919
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
src/viewsPc/home.vue
vite.config.js
src/viewsPc/home.vue
View file @
dab5de0
...
...
@@ -43,16 +43,18 @@
<ul
class=
"wlist"
>
<li
v-for=
"n in weatherObj.forecast.slice(1,6)"
>
<div
class=
"type"
>
<weather-icon
:type=
"n.type"
:width=
"32"
/>
<weather-icon
:type=
"n.type
||n.wea
"
:width=
"32"
/>
</div>
<div
class=
"wd"
>
{{
n
.
low
.
slice
(
2
,
-
1
)
}}
/
{{
n
.
high
.
slice
(
2
)
}}
</div>
<div
class=
"wd"
v-if=
"n.low"
>
{{
n
.
low
.
slice
(
2
,
-
1
)
}}
/
{{
n
.
high
.
slice
(
2
)
}}
</div>
<div
class=
"wd"
v-if=
"n.tem_night"
>
{{
n
.
tem_night
}}
/
{{
n
.
tem_day
}}
</div>
<div
class=
"week"
v-if=
"language==1"
>
{{
n
.
week
==
'星期一'
?
'Mon'
:
n
.
week
==
'星期二'
?
'Tue'
:
n
.
week
==
'星期三'
?
'Wed'
:
n
.
week
==
'星期四'
?
'Thu'
:
n
.
week
==
'星期五'
?
'Fri'
:
n
.
week
==
'星期六'
?
'Sat'
:
n
.
week
==
'星期日'
?
'Sun'
:
''
}}
</div>
<div
class=
"week"
v-else
>
{{
n
.
week
}}
</div>
<div
class=
"date mt10"
>
{{
n
.
ymd
.
slice
(
5
,
10
)
}}
</div>
<div
class=
"date mt10"
v-if=
"n.ymd"
>
{{
n
.
ymd
.
slice
(
5
,
10
)
}}
</div>
<div
class=
"date mt10"
v-else
>
{{
n
.
date
.
slice
(
5
,
10
)
}}
</div>
</li>
</ul>
</div>
...
...
@@ -83,7 +85,7 @@ import {ref} from "vue";
import
{
getWeather
}
from
"@/apiPc/webSite"
;
import
{
getCurrentInstance
}
from
"@vue/runtime-core"
;
const
{
proxy
}
=
getCurrentInstance
()
const
showgg
=
ref
(
tru
e
)
const
showgg
=
ref
(
fals
e
)
const
language
=
useStorage
(
'language'
,
0
)
const
weatherObj
=
ref
({
...
...
@@ -94,9 +96,8 @@ init()
function
init
(){
getWeather
().
then
(
res
=>
{
weatherObj
.
value
=
JSON
.
parse
(
res
.
data
).
data
console
.
log
(
weatherObj
.
value
)
showgg
.
value
=
true
}).
catch
(
err
=>
{
console
.
log
(
err
)
showgg
.
value
=
false
})
}
...
...
vite.config.js
View file @
dab5de0
...
...
@@ -81,11 +81,11 @@ export default defineConfig(({ mode, command }) => {
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-webSite/
,
''
)
},
'/dev-api'
:
{
target
:
'http://192.168.1.118:8081/'
,
//
target: 'http://192.168.1.118:8081/',
// target: 'http://192.168.1.131:8081/',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'http://124.70.181.90:1880/stage-api',
//
target: 'https://wdsfwuxicenter.com/stage-api/',
target
:
'https://wdsfwuxicenter.com/stage-api/'
,
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api/
,
''
)
},
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment