|
@@ -245,9 +245,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getShareNum() {
|
|
getShareNum() {
|
|
- // uni.showLoading({
|
|
|
|
- // title: "雷能守护中...",
|
|
|
|
- // });
|
|
|
|
this.$http
|
|
this.$http
|
|
.post("wap/share/queryDevShare", {
|
|
.post("wap/share/queryDevShare", {
|
|
userId: uni.getStorageSync("userId"),
|
|
userId: uni.getStorageSync("userId"),
|
|
@@ -259,7 +256,6 @@ export default {
|
|
},
|
|
},
|
|
// 获取天气接口
|
|
// 获取天气接口
|
|
getWeather() {
|
|
getWeather() {
|
|
- console.log("获取天气", 999999);
|
|
|
|
uni.request({
|
|
uni.request({
|
|
url: "https://kp36x7gr79.re.qweatherapi.com/v7/weather/now", // 使用官方域名
|
|
url: "https://kp36x7gr79.re.qweatherapi.com/v7/weather/now", // 使用官方域名
|
|
data: {
|
|
data: {
|
|
@@ -314,6 +310,7 @@ export default {
|
|
this.getperSonInfo();
|
|
this.getperSonInfo();
|
|
this.getShareNum();
|
|
this.getShareNum();
|
|
this.getWarmList();
|
|
this.getWarmList();
|
|
|
|
+ this.getWeather();
|
|
this.isInitAlarm = true;
|
|
this.isInitAlarm = true;
|
|
this.isIniTenMinutes = true;
|
|
this.isIniTenMinutes = true;
|
|
}
|
|
}
|
|
@@ -322,16 +319,33 @@ export default {
|
|
if (!selectedService) {
|
|
if (!selectedService) {
|
|
uni.setStorageSync("sercviceChoice", "aloneServe");
|
|
uni.setStorageSync("sercviceChoice", "aloneServe");
|
|
}
|
|
}
|
|
- uni.getLocation({
|
|
|
|
- type: "wgs84",
|
|
|
|
- success: (res) => {
|
|
|
|
- if (res) {
|
|
|
|
- // this.weatherText = res.data.now.text;
|
|
|
|
- console.log(res, 99999);
|
|
|
|
- }
|
|
|
|
- this.getWeather();
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
|
|
+ // uni.getLocation({
|
|
|
|
+ // type: "wgs84",
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // console.log(res, 999999);
|
|
|
|
+ // if (res) {
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}&get_poi=0`,
|
|
|
|
+ // data: {
|
|
|
|
+ // // location: "101220101", // 城市ID
|
|
|
|
+ // // key: "72afe228cd7f436ebea7caa1345956f2", // 你的API Key
|
|
|
|
+ // },
|
|
|
|
+ // method: "GET",
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // console.log(res, 8870);
|
|
|
|
+ // if (res.statusCode === 200) {
|
|
|
|
+ // this.weatherText = res.data.now.text;
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // console.error("网络错误:", err);
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
|
|
+ // console.log(res, 99999);
|
|
|
|
+ // }
|
|
|
|
+ // this.getWeather();
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
onHide() {
|
|
onHide() {
|
|
this.isInitAlarm = false;
|
|
this.isInitAlarm = false;
|