智慧保安互联网APP
shuishen
2021-10-11 b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860
pages/map/map.vue
@@ -1,6 +1,16 @@
<template>
   <view class="content">
      <web-view :src="urls"></web-view>
   <view class="content" style="width: 100%; height: 100%;">
      <!-- <u-loading size="66" :show="flag" mode="circle"></u-loading> -->
      <view v-show="flag" class="loading">{{loadingText}}</view>
      <view v-show="!flag">
         <web-view :src="urls" style="width: 100%; height: 100%;"></web-view>
      </view>
   </view>
</template>
@@ -9,21 +19,41 @@
      data() {
         return {
            urls: '',
            flag: true,
            loadingText: '加载中...'
            // dataList: [],
         }
      },
      methods: {},
      mounted() {},
      mounted() {
         // uni.showNavigationBarLoading();
         this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction +
            "&userid=" + this.$store.state.UserData.user_id +
            "&roleName=" + this.$store.state.UserData.rname[0] +
            "&deptid=" + this.$store.state.UserData.dept_id;
         setTimeout(() => {
            // uni.hideNavigationBarLoading();
            this.flag = false
         }, 3000)
      },
      onLoad: function(options) {
         this.urls = "http://web.byisf.com/mapWz/xcxmap.html?id="+ this.$store.state.UserData.jurisdiction + "&userid="+ this.$store.state.UserData.role_id;
         // this.urls = "http://127.0.0.1:5500/mapWz/xcxmap.html?id=" + this.$store.state.UserData.jurisdiction +
         //    "&userid=" + this.$store.state.UserData.role_id;
         //    "&userid=" + this.$store.state.UserData.user_id;
      },
   }
</script>
<style>
   .loading {
      text-align: center;
      line-height: 80px;
   }
</style>