|
@@ -175,6 +175,29 @@
|
|
// #ifdef MP
|
|
// #ifdef MP
|
|
this.top = uni.upx2px(150);
|
|
this.top = uni.upx2px(150);
|
|
// #endif
|
|
// #endif
|
|
|
|
+
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: 'https://jisutqybmf.market.alicloudapi.com/weather/query?city=%E5%AE%89%E9%A1%BA&citycode=citycode&cityid=cityid&ip=ip&location=location',
|
|
|
|
+ // data:{'src':'南京市'},//传入参数
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // success: res => {
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ uni.request({
|
|
|
|
+ url : "https://jisutqybmf.market.alicloudapi.com/weather/query",
|
|
|
|
+ type : "post",
|
|
|
|
+ beforeSend : function(req) {
|
|
|
|
+ req.setRequestHeader("Authorization", "APPCODE acacbfc4fac24722996q34b284935353562340cd77c8be");
|
|
|
|
+ },
|
|
|
|
+ dataType : "json",
|
|
|
|
+ success : function(data) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ error : function(e) {
|
|
|
|
+ alert("网络异常,请重试");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|