shuishen
2022-02-21 ed9709a6e101a7f2eca4403f93e7aa4f71a78220
pages/grabOrders/map.vue
@@ -1,6 +1,7 @@
<template>
   <view class="content">
      <u-top-tips ref="uTips"></u-top-tips>
      <!-- <u-button type="info" @click="acc">测试</u-button> -->
      <web-view :src="urls"></web-view>
   </view>
</template>
@@ -11,15 +12,40 @@
         return {
            urls: '',
            // dataList: [],
            fn: null,
            rid: ''
         }
      },
      methods: {
      methods: {},
      computed: {
         isOnTaskValue() {
            if (this.$store.state.changes) {
               return this.$store.state.isOnTaskValue;
            } else {
               return this.$store.state.isOnTaskValue;
            }
         }
      },
      watch: {
         isOnTaskValue: {
            handler(newName, oldName) {
               // console.log("map", this.isOnTaskValue);
               for (let k in this.isOnTaskValue) {
                  if (this.isOnTaskValue[k].id == this.rid) {
                     if (this.fn) {
                        this.fn(this.isOnTaskValue[k].intlat);
                     }
                  }
               }
            },
            deep: true
         }
      },
      mounted() {},
      onReady() {
         let that = this;
         window.hBackMsg = (val) => {
            // console.log(val)
            let d = {
               rid: val.data.id,
               serid: val.data.serid,
@@ -27,10 +53,25 @@
               that: that,
               fn: () => {
                  // that.getGrabOrders(that.current); //重获取数据
                  val.fn();
                  if (val.fn) {
                     // console.log(111)
                     val.fn("success");
                  }
               }
            }
            that.$store.commit('useWebScoketApi', d);
         }
         window.setIntLat = (val) => {
            // console.log(fn);
            that.fn = val.fn || '';
            that.rid = val.rid || '';
         }
         window.showTip = (val) => {
            that.$refs.uTips.show({
               title: val,
               type: "warning",
               duration: '2300'
            })
         }
      },
      onLoad: function(options) {
@@ -79,6 +120,7 @@
         if (b == '/api') {
            name = 1;
         }
         // "E:\liumy\qfqk\qfqks\qfqk-android\leafletMapOur\grabOrdersMap\xcxmap.html"
         let a = name == 1 ? "http://127.0.0.1:8848/qfqk-android/leafletMapOur/" : b.slice(0, b.indexOf('api'));
         // this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
         // a = a.slice(0, a.indexOf('api'));