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>
<view class="pic" v-else-if="type == 1"> <view class="pic" v-else-if="type == 1">
<text>{{ goodsInfo.goods_price || '0.00' }}</text> <text>{{ goodsInfo.goods_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_marketprice || '0.00' }}</s>
</view> </view>
<view class="collect" @click="switchCollect(goodsInfo.is_collect)"> <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> <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 class="order-status">{{ item.order_status | viewStatus }}</view>
</view> </view>
<view class="order-info"> <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 v-if="item.deliver_goods_type == 2 && item.order_status == 20">
<view>骑手名字{{ item.takeawayer_name || '' }}</view> <view>骑手名字{{ item.takeawayer_name || '' }}</view>
<view>联系方式{{ item.takeawayer_mobile || '' }}</view> <view>联系方式{{ item.takeawayer_mobile || '' }}</view>

View File

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