liuyg
2022-02-21 bb04d82473b44a79e9b823ab2054ee79814098a2
pages/grabOrders/map.vue
@@ -1,5 +1,6 @@
<template>
   <view class="content">
      <u-top-tips ref="uTips"></u-top-tips>
      <web-view :src="urls"></web-view>
   </view>
</template>
@@ -12,14 +13,56 @@
            // dataList: [],
         }
      },
      methods: {},
      methods: {
      },
      mounted() {},
      onReady() {
         let that = this;
         window.hBackMsg = (val) => {
            let d = {
               rid: val.data.id,
               serid: val.data.serid,
               type: val.type,
               that: that,
               fn: () => {
                  // that.getGrabOrders(that.current); //重获取数据
                  val.fn();
               }
            }
            that.$store.commit('useWebScoketApi', d);
         }
      },
      onLoad: function(options) {
         var data = [];
         // console.log(options.data);
         if (options.data == undefined) {
            data =
               '{"id":7,"rname":"无数据","content":"无数据","time":"2021-11-02 16:31:47","province":"江西省","city":"南昌市","district":"青山湖区","jnum":2,"line":"LINESTRING(115.95983713142935 28.674674492655765,115.96086709969107 28.7012820060835,115.97254007332388 28.701625328837405,115.97305505745474 28.68875072556592,115.96704690926138 28.68274257737256,115.96739023201529 28.674674492655765,115.9600087928063 28.674846154032718,115.95983713142935 28.674846154032718)","raddress":null,"rtype":"0","serid":"1416311615662448641,1123598821738675201","num":2,"integral":"100","url":"http://223.82.109.183:2081/zhba/upload/20211102/7050fe68e5d1e9921a3e93329996a943.png","current":0,"buttype":0}'
            data = JSON.stringify({
               appenUrl: "http://192.168.0.108:83/",
               butCT: "begin",
               buttype: 0,
               captain: "我",
               city: "南昌市",
               content: "测试",
               district: "西湖区",
               id: 37,
               integral: "222",
               iscation: "1",
               jnum: 3,
               line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
               num: 1,
               nums: 0,
               province: "江西省",
               publisher: "管理",
               raddress: null,
               rname: "测试1",
               rtype: "0",
               serid: "1123598821738675201,",
               team: "你,他,它",
               time: "2022-02-18 14:15:52",
               type: "2",
               url: "http://223.82.109.183:2081/zhba/upload/20220218/67f0c8bf3e7b5024c64133691f265072.ico",
            })
         } else {
            data = options.data;
         }
@@ -33,10 +76,10 @@
         let name = 2; //1是本地  2是服务器
         // let name = 1;
         let b = this.$store.state.piAPI;
         if( b == '/api'){
         if (b == '/api') {
            name = 1;
         }
         let a = name == 1 ? "http://127.0.0.1:8848/qfqk-android/leafletMapOur/" :b.slice(0, b.indexOf('api'));
         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'));
         this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
@@ -51,4 +94,8 @@
</script>
<style>
   .content {
      flex: 1;
      height: 100%;
   }
</style>