lishanshan 7 tháng trước cách đây
mục cha
commit
be9df35b67

+ 1 - 32
src/views/cancelOrder/cancelOrderAudit.vue

@@ -8,6 +8,7 @@
         customClass: 'orderDetailModal',
         appendToBody: true,
       }"
+      @onClose="close"
     >
       <!-- 订单详情 -->
       <el-form
@@ -221,16 +222,12 @@ export default {
       nextStep: false,
       id: '', // 主键id
       form: {},
-      arrival: '',
-      depart: '',
     }
   },
   methods: {
     open(e) {
       this.id = e.id
       this.form = {}
-      this.arrival = ''
-      this.depart = ''
       this.$refs.mv.open(this.title)
       if (e.auditStatus == '1') {
         this.title = '详情'
@@ -242,14 +239,6 @@ export default {
       refundOrderDetail({ id: id }).then(res => {
         if (res.code == 200 && res.data) {
           this.form = res.data
-          let Longitude = this.form.arrivalLongitude
-          let numLatitude = +this.form.arrivalLatitude
-          let Latitude = numLatitude.toFixed(6)
-          let location = Longitude + `,` + Latitude
-          let arrival = 'arrival' //到达
-          this.fetchLocation(arrival, location)
-          let depart = 'depart' //出发
-          this.fetchLocation(depart, location)
         }
       })
     },
@@ -279,26 +268,6 @@ export default {
       this.$refs.mv.close()
       this.$emit('close')
     },
-    /**解析经纬度 */
-    async fetchLocation(title, location) {
-      const key = '5457092e6c62b83c1b2e45dbe973d858'
-      const url = `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${location}&key=${key}&radius=500&extensions=all`
-      try {
-        const response = await fetch(url)
-        const data = await response.json()
-        if (title == 'arrival') {
-          data.regeocode.formatted_address.length > 0
-            ? (this.arrival = data.regeocode.formatted_address)
-            : ''
-        } else if (title == 'depart') {
-          data.regeocode.formatted_address.length > 0
-            ? (this.depart = data.regeocode.formatted_address)
-            : (this.depart = '')
-        }
-      } catch (error) {
-        console.error('请求失败:', error)
-      }
-    },
   },
 }
 </script>

+ 5 - 2
src/views/dynamic/dynamicAudit.vue

@@ -7,7 +7,7 @@
       width: '45%',
       customClass: 'auditModal',
     }"
-    @close="close"
+    @onClose="close"
   >
     <div class="dynamic-info">
       <div class="dynamic-title">{{ auditForm.title }}</div>
@@ -115,6 +115,9 @@ export default {
       getDynamicDetail(id).then(res => {
         if (res.code === 200) {
           this.auditForm = res.data
+          if (this.auditForm.mediaType == 2) {
+            this.auditForm.videoUrl = this.auditForm.mediaUrls[0]
+          }
           // 回显审核状态和原因(1待审核)
           if (res.data.auditStatus !== 1) {
             this.form.auditStatus = res.data.auditStatus
@@ -208,7 +211,7 @@ export default {
   .video-container {
     .video-preview {
       width: 240px;
-      height: 100%;
+      height: 180px;
       object-fit: contain;
     }
   }