MrShi
2025-07-19 e43c64e21dc15acb024124347cd3ecf9e131877e
small-program/pages/freight/freight.vue
@@ -357,6 +357,7 @@
            if (!this.form.linkPhone) {
               return uni.showToast({ title: '请输入联系电话', icon: 'none' })
            }
            if (!this.form.id) {
            this.$u.api.release({ 
               ...this.form,
               price: Number(this.form.price) * 100,
@@ -380,6 +381,39 @@
                  })
               }
            })
            } else {
               this.$u.api.updateOrder({
                  ...this.form,
                  price: Number(this.form.price) * 100,
                  wayInfoDTOList: [
                     {
                        lat: this.form.lat,
                        lgt: this.form.lgt,
                        location: this.form.location
                     },
                     ...this.form.wayInfoDTOList,
                     {
                        lat: this.form.latEnd,
                        lgt: this.form.lgtEnd,
                        location: this.form.locationEnd
                     }
                  ]
               }).then(res => {
                  if (res.code == 200) {
                     uni.showToast({
                        title: '编辑成功',
                        icon: 'success',
                        mask: true,
                        duration: 2000
                     })
                     setTimeout(() => {
                        uni.navigateBack({ delta: 1 });
                        // uni.$emit('refresh')
                     }, 1500)
                  }
               })
            }
         },
         uploadImg() {
            var that = this;