fixing bug

This commit is contained in:
ghusermoon 2020-08-18 15:28:22 +08:00
parent f577de11f1
commit 1a2c40955b
3 changed files with 16 additions and 20 deletions

View File

@ -29,6 +29,7 @@
</view>
<view class="pic" v-else-if="type == 1">
<text>{{ goodsInfo.goods_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_marketprice || '0.00' }}</s>
</view>
<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
<u-icon name="star-fill" color="#FF7807" size="28" v-if="goodsInfo.is_collect == 1"></u-icon>

View File

@ -21,7 +21,7 @@
<view class="order-status">{{ item.order_status | viewStatus }}</view>
</view>
<view class="order-info">
<image :src="type == 1 ? item.goods_image : item.images[0]"></image>
<image :src="type == 1 ? item.goods_image : item.images[0]" mode="aspectFit"></image>
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
<view>骑手名字{{ item.takeawayer_name || '' }}</view>
<view>联系方式{{ item.takeawayer_mobile || '' }}</view>

View File

@ -85,7 +85,7 @@
</view>
</u-upload>
</view>
<view class="wash-btn" @click="submitImage">确认送洗</view>
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
@ -141,7 +141,7 @@
</view>
</u-upload>
</view>
<view class="wash-btn" @click="submitImage">确认送洗</view>
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view>
</swiper-item>
</swiper>
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
@ -297,8 +297,9 @@ export default {
return res;
},
submitImage() {
console.log(this.debounce);
if(!this.debounce) return;
// console.log(222);
if(!this.debounce) return false;
// console.log(111);
this.debounce = false;
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
},
@ -319,42 +320,42 @@ export default {
validationParams() {
if (this.current == 1) {
if(this.$u.test.isEmpty(this.goodsName)) {
this.showToast('商品名称不能为空', 'warning');
this.$u.toast('商品名称不能为空');
return false;
}
}
if(this.current == 0) {
if(JSON.stringify(this.checkedGoods) == '{}') {
this.showToast('订单不能为空', 'warning');
this.$u.toast('订单不能为空');
return false;
}
}
if(this.$u.test.isEmpty(this.goodsStatus)) {
this.showToast('衣服状况不能为空', 'warning');
this.$u.toast('衣服状况不能为空');
return false;
}
if(JSON.stringify(this.type) == '{}') {
this.showToast('商品类型不能为空', 'warning');
this.$u.toast('商品类型不能为空');
return false;
}
if(this.$u.test.isEmpty(this.name)) {
this.showToast('送洗人不能为空', 'warning');
this.$u.toast('送洗人不能为空');
return false;
}
if(this.$u.test.isEmpty(this.phone)) {
this.showToast('手机号不能为空', 'warning');
this.$u.toast('手机号不能为空');
return false;
}
if(!this.$u.test.mobile(this.phone)) {
this.showToast('手机号错误', 'warning');
this.$u.toast('手机号错误');
return false;
}
if(this.$u.test.isEmpty(this.area)) {
this.showToast('地址不能为空', 'warning');
this.$u.toast('地址不能为空');
return false;
}
if(this.$u.test.isEmpty(this.address)) {
this.showToast('详细地址不能为空', 'warning');
this.$u.toast('详细地址不能为空');
return false;
}
return true;
@ -452,12 +453,6 @@ export default {
this.choose = false;
}
},
showToast(message, type) {
this.$refs.uToast.show({
title: message,
type: type,
})
},
},
};
</script>