Pārlūkot izejas kodu

代码结构调整,删除无用代码

zwq 6 gadi atpakaļ
vecāks
revīzija
be10a54de4
1 mainītis faili ar 0 papildinājumiem un 11 dzēšanām
  1. 0 11
      src/view/index/index.vue

+ 0 - 11
src/view/index/index.vue

@@ -122,7 +122,6 @@
 </template>
 
 <script>
-    // import {postAction} from '@/api/manage'
     import {Button, Col, Row, Toast, Loading, Dialog} from 'vant';
     import {isToday} from '@/utils/util'
     import {getStore, clearAll} from "@/utils/storage";
@@ -165,7 +164,6 @@
             }
         },
         mounted() {
-            //
             //获取链接参数
             // var query = this.$route.query;
             // this.enterprise_id = query.enterprise_id;
@@ -248,7 +246,6 @@
                     .then((res) => {
                         console.log("res", res);
                         var _config = eval('(' + res.data.configValue + ')');
-                        console.log("12345====js", _config.appId)
                         wx.config({
                             debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                             appId: _config.appId, // 必填,公众号的唯一标识
@@ -276,7 +273,6 @@
             ,
             location() {
                 var that = this;
-                // return new Promise(((resolve, reject) => {
                 this.loading = true;
                 if (this.locationType) {
                     wx.getLocation({
@@ -285,13 +281,11 @@
                             console.log(222, JSON.stringify(res));
                             var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
                             var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
-                            // resolve({latitude, longitude});
                             that.changeLocation(latitude, longitude);
                         },
                         cancel: function () {
                             console.log("获取位置失败,请检查定位");
                             that.loading = false;
-                            // reject("获取位置失败,请检查定位");
                             Toast("取消获取位置,请定位")
                         },
                         fail: function () {
@@ -302,12 +296,10 @@
                         }
                     });
                 }
-                // }))
             }
             ,
             changeLocation(latitude, longitude) {
                 var that = this;
-                // return new Promise((resolve) => {
                 var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
                 var x = parseFloat(longitude);
                 var y = parseFloat(latitude);
@@ -330,15 +322,12 @@
                         that.district = addressComponent.district;
                         this.loading = false;
                         that.$router.push({name: 'staff_temperature', params: {province: addressComponent.city}});
-
-                        // resolve(addressComponent.province);
                     })
                     .catch((data) => {
                         this.loading = false;
                         Toast("位置转换失败,请检查定位");
                         console.log(data);
                     });
-                // })
             }
             ,