From 24edc1a0e27ff5a04df0722a3443de21521176ec Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 10 Jul 2022 17:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=AD=A2=E8=BF=9E?= =?UTF-8?q?=E7=BB=AD=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/write/distribution.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pages/write/distribution.vue b/pages/write/distribution.vue index 0ad722d..077d5ae 100644 --- a/pages/write/distribution.vue +++ b/pages/write/distribution.vue @@ -103,7 +103,8 @@ name: '...', tel: '...', address: '...' - } + }, + onSubmit:false, }; }, onLoad(options){ @@ -136,8 +137,12 @@ submit(){ if(this.expressIndex === '') return this.$msg('请选择快递公司'); if(!this.oddNumber) return this.$msg('请输入快递单号'); + if(this.onSubmit) return; let data = {}; - + this.onSubmit = true; + uni.showLoading({ + title:"订单提交中" + }) if(this.$isRight(this.baseInfoCache)){ // 从我的订单 寄送藏品 进入的 data = { express_type: this.expressList[this.expressIndex].label, @@ -176,10 +181,15 @@ let id = res.data.datas.order_id; this.$msg('提交成功', {icon: 'success'}).then(() => { setTimeout(()=> { + this.onSubmit = false + uni.hideLoading(); this.$url('/pages/index/index', {type: 'launch'}); }, 300); //this.$url('/packages/sonpingDetail/sonpingDetail?id='+ id, {type: 'launch'}); // 关闭所有页面跳转到详情 - }) + }).catch((res)=>{ + this.onSubmit = false + uni.hideLoading(); + }); }) }, // 稍后再填不记录快递信息