dab5de01 by 杨炀

隐藏天气插件

1 parent ff1d1919
......@@ -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(true)
const showgg = ref(false)
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
})
}
......
......@@ -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/, '')
},
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!