|
@@ -40,9 +40,6 @@ import spectaculars from "./spectaculars.vue";
|
|
|
import patrolScheme from "./patrolScheme.vue";
|
|
|
import { getWeek, getYMD } from "../../../utils/getTime";
|
|
|
import workorder from "./workorderList"
|
|
|
-import {
|
|
|
- getCity
|
|
|
-} from "../../../utils/tool";
|
|
|
const QQMapWX = require("../../../utils/qqmap-wx-jssdk.min.js");
|
|
|
var qqmapsdk;
|
|
|
export default {
|
|
@@ -80,28 +77,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getWeather() {
|
|
|
- const content = uni.getStorageSync('city');
|
|
|
- content.date = Date.now()
|
|
|
- if (content) {
|
|
|
- this.$Http.basic({
|
|
|
- "id": "20230608120801",
|
|
|
- content
|
|
|
- }).then(res => {
|
|
|
- console.log("获取天气信息", res)
|
|
|
- if (this.cutoff(res.msg)) {
|
|
|
- this.setCustomBar(0);
|
|
|
- } else {
|
|
|
- this.setCustomBar(66);
|
|
|
- let detail = res.data.predict.detail[0];
|
|
|
- this.weather = `${getWeek()} ${getYMD().split("年")[1]} | ${detail.day.weather.temperature == '9999' ? detail.night.weather.temperature : detail.night.weather.temperature + '~' + detail.day.weather.temperature}℃ ${res.data.real.weather.info}`
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- getCity.bind(this)().then(res => {
|
|
|
- res && uni.setStorageSync("city", res)
|
|
|
- this.getWeather()
|
|
|
- })
|
|
|
- }
|
|
|
+ this.$Http.basic({
|
|
|
+ id: "20231012093701",
|
|
|
+ content: {}
|
|
|
+ }).then(res => {
|
|
|
+ console.log("获取天气信息", res)
|
|
|
+ if (this.cutoff(res.msg)) {
|
|
|
+ this.setCustomBar(0);
|
|
|
+ } else {
|
|
|
+ this.setCustomBar(66);
|
|
|
+ let detail = res.data.predict.detail[0];
|
|
|
+ this.weather = `${getWeek()} ${getYMD().split("年")[1]} | ${detail.day.weather.temperature == '9999' ? detail.night.weather.temperature : detail.night.weather.temperature + '~' + detail.day.weather.temperature}℃ ${res.data.real.weather.info}`
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
setLocation() {
|
|
|
let that = this;
|