MrShi
2026-04-30 a240b43f1908abdecb87092502b3ed69d665336c
app/pages/order/order.vue
@@ -383,15 +383,31 @@
               return
            }
            uni.showLoading({ title: '上传中...' })
            uni.getLocation({
               type: 'gcj02',
               success: (locationRes) => {
                  this.doUploadPhotos(locationRes.latitude, locationRes.longitude)
               },
               fail: () => {
                  this.doUploadPhotos(null, null)
               }
            })
         },
         doUploadPhotos(latitude, longitude) {
            const uploadTasks = this.uploadedPhotos.map(path => {
               return new Promise((resolve, reject) => {
                  const formData = { folder: 'orders' }
                  if (latitude && longitude) {
                     formData.latitude = latitude
                     formData.longitude = longitude
                  }
                  console.log('formData:', formData)
                  uni.uploadFile({
                     url: this.$baseUrl + 'web/public/upload',
                     filePath: path,
                     name: 'file',
                     formData: {
                        folder: 'order'
                     },
                     formData: formData,
                     success: (uploadRes) => {
                        const data = JSON.parse(uploadRes.data)
                        if (data.code === 200) {
@@ -413,6 +429,10 @@
                  images: images.map(img => img.imgaddr),
                  orderId: this.selectedOrder.id,
                  remark: this.photoRemark
               }
               if (latitude && longitude) {
                  params.latitude = latitude
                  params.longitude = longitude
               }
               return this.$u.api[api](params)
            }).then(res => {
@@ -768,7 +788,6 @@
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f7fb;
      border-radius: 16rpx;
      image {