Bläddra i källkod

Merge branch 'develop/3.1.5' into test

DESKTOP-SVI9JE1\muzen 1 år sedan
förälder
incheckning
cedde80438
2 ändrade filer med 28 tillägg och 21 borttagningar
  1. 1 1
      src/pages/content/index.vue
  2. 27 20
      src/pages/map/index.vue

+ 1 - 1
src/pages/content/index.vue

@@ -7,7 +7,7 @@
       <view v-if="form.contentShareLayoutList">
         <view class="item" v-for="item in form.contentShareLayoutList" :key="item.id">
           <!-- 图片 -->
-          <img v-if="item.layoutType === 0" mode="aspectFit" :src="item.contentPic" />
+          <img v-if="item.layoutType === 0" :src="item.contentPic" />
           <!-- 音频 -->
           <my-audio v-if="item.layoutType === 1" :ref="`video${item.sort}`" :bg="form.audioBackgroundImage"
             :pic="item.contentPic" :name="item.contentName" :singer="item.contentInfo.singerName"

+ 27 - 20
src/pages/map/index.vue

@@ -57,7 +57,7 @@
     <uni-popup ref="popup" type="bottom">
       <view class="popup">
         <view class="title" flex center>请选择地图</view>
-        <view class="item" flex center v-for="item in mapList" :key="item.value" @click="openMap(item.value)">
+        <view class="item" flex center v-for="item in mapList" :key="item.value" @click="openMap(item)">
           {{ item.name }}
         </view>
       </view>
@@ -108,14 +108,17 @@ export default {
       geolocation: null,
       // 地图App
       mapList: [{
-        value: 1,
-        name: '腾讯地图'
+        id: 1,
+        name: '腾讯地图',
+        value: 'qqMap'
       }, {
-        value: 2,
-        name: '百度地图'
+        id: 2,
+        name: '百度地图',
+        value: 'baiduMap'
       }, {
-        value: 3,
-        name: '高德地图'
+        id: 3,
+        name: '高德地图',
+        value: 'aMap'
       }],
       // 只触发一次
       only: true
@@ -275,21 +278,25 @@ export default {
     openMap(e) {
       this.$refs.popup.close()
       let url = ''
-      // 腾讯地图
-      if (e === 1) {
-        url = `https://apis.map.qq.com/uri/v1/routeplan?type=drive&from=我的位置&fromcoord=${this.form.latitude},${this.form.longitude}&to=${this.toName}&tocoord=${this.toLat},${this.toLng}&coord_type=2&referer=猫王妙播Pro}`
-      }
+      if (getApp().globalData.inside) {
+        openOtherApp.postMessage(`?page=${e.value}&longitude=${this.toLng}&latitude=${this.toLat}&name=${this.toName}`)
+      } else {
+        // 腾讯地图
+        if (e.id === 1) { 
+          url = `https://apis.map.qq.com/uri/v1/routeplan?type=drive&from=我的位置&fromcoord=${this.form.latitude},${this.form.longitude}&to=${this.toName}&tocoord=${this.toLat},${this.toLng}&coord_type=2&referer=猫王妙播Pro`
+        }
 
-      // 百度地图
-      if (e === 2) {
-        url = `http://api.map.baidu.com/direction?origin=latlng:${this.form.latitude},${this.form.longitude}|name:我的位置&destination=latlng:${this.toLat},${this.toLng}|name:${this.toName}&mode=driving&region=${this.province}&output=html&coord_type=gcj02&src=webapp.airsmart.猫王妙播Pro`
-      }
+        // 百度地图
+        if (e.id  === 2) {
+          url = `http://api.map.baidu.com/direction?origin=latlng:${this.form.latitude},${this.form.longitude}|name:我的位置&destination=latlng:${this.toLat},${this.toLng}|name:${this.toName}&mode=driving&region=${this.province}&output=html&coord_type=gcj02&src=webapp.airsmart.猫王妙播Pro`
+        }
 
-      // 高德地图
-      if (e === 3) {
-        url = `https://uri.amap.com/navigation?from=${this.form.longitude},${this.form.latitude},我的位置&to=${this.toLng},${this.toLat},${this.toName}&callnative=1`
+        // 高德地图
+        if (e.id  === 3) {
+          url = `https://uri.amap.com/navigation?from=${this.form.longitude},${this.form.latitude},我的位置&to=${this.toLng},${this.toLat},${this.toName}&callnative=1`
+        }
+        window.location.href = url
       }
-      window.location.href = url
     },
 
     // 重新定位
@@ -551,7 +558,7 @@ export default {
     border-radius: 16px;
     margin: 0 auto;
     position: absolute;
-    bottom: 0px;
+    bottom: 20px;
     left: 50%;
     transform: translate(-50%);