|
@@ -420,6 +420,7 @@ export default defineComponent({
|
|
|
},
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
try {
|
|
|
+ // debugger;
|
|
|
let mac: any = getCookieMac();
|
|
|
if (mac && mac != "null") {
|
|
|
next();
|
|
@@ -977,23 +978,30 @@ export default defineComponent({
|
|
|
},
|
|
|
// 设置天气icon
|
|
|
getWeatherIcon(text: string) {
|
|
|
- if (text && text.indexOf("晴") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
|
|
|
- } else if (text && text.indexOf("雨") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "rain.png");
|
|
|
- } else if (
|
|
|
- (text && text.indexOf("阴") > -1) ||
|
|
|
- text.indexOf("云") > -1
|
|
|
- ) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "cloudy.png");
|
|
|
- } else if (text && text.indexOf("霾") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "mai.png");
|
|
|
- } else if (text && text.indexOf("雾") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "fog.png");
|
|
|
- } else if (text && text.indexOf("风") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "wind.png");
|
|
|
- } else if (text && text.indexOf("雷") > -1) {
|
|
|
- proxyData.outWeather.imgname = parseImgUrl("weather", "thunder.png");
|
|
|
+ if (text) {
|
|
|
+ if (text && text.indexOf("晴") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
|
|
|
+ } else if (text && text.indexOf("雨") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "rain.png");
|
|
|
+ } else if (
|
|
|
+ (text && text.indexOf("阴") > -1) ||
|
|
|
+ text.indexOf("云") > -1
|
|
|
+ ) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "cloudy.png");
|
|
|
+ } else if (text && text.indexOf("霾") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "mai.png");
|
|
|
+ } else if (text && text.indexOf("雾") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "fog.png");
|
|
|
+ } else if (text && text.indexOf("风") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "wind.png");
|
|
|
+ } else if (text && text.indexOf("雷") > -1) {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl(
|
|
|
+ "weather",
|
|
|
+ "thunder.png"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
|
|
|
+ }
|
|
|
} else {
|
|
|
proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
|
|
|
}
|