comment 8.1

This commit is contained in:
2020-08-01 16:36:48 +08:00
parent 865e2a741a
commit 854976c8f0
18 changed files with 356 additions and 120 deletions

View File

@@ -35,6 +35,9 @@ export default {
// this.getAllEvalue();
this.getEvaluateSpec();
},
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
},
watch: {
current(value) {
this.page = 0;

View File

@@ -19,7 +19,8 @@
</view>
<view class="info">
<view class="title u-line-2">
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
<text class="store-name">{{ goodsInfo.store_name }}</text>
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
</view>
<view class="pic">
<text>{{ goodsInfo.goods_price }}</text>
@@ -40,7 +41,7 @@
</view>
</view>
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
<view class="comment-none">暂无评价</view>
<view class="comment-none" v-else>暂无评价</view>
</view>
<view class="hr"></view>
<view class="group-user" v-if="groupUser.length">
@@ -227,6 +228,9 @@ export default {
this.showGroupUser = false;
this.showInvolvementUser = false;
},
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
},
beforeDestroy() {
clearInterval(this.timer);
},
@@ -379,7 +383,7 @@ export default {
},
/*
* @description 下单 订单步骤1展示结算数据
* @params {Number} type 拼团或者开团
* @params {Number} type involvement 拼团或者 默认开团
* @params {Number} num 数量
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
**/
@@ -553,17 +557,20 @@ export default {
.title{
flex-wrap: wrap;
margin-bottom: 30rpx;
line-height: 1.2;
>text{
display: inline-block;
.store-name {
display: inline-block;
padding: 8rpx 10rpx;
margin: 0 10rpx 4rpx 0;
vertical-align: middle;
font-size: 20rpx;
color: #fff;
border-radius: 30rpx;
background-color: #FF780F;
}
background-color: #FF780F;
margin-bottom: 10rpx;
}
.goods-name {
line-height: 1.5;
}
}
.pic{
>text{

View File

@@ -97,7 +97,7 @@ export default {
return false;
}
if(!this.$u.test.mobile(this.phone)) {
this.$u.toast('请填写正确的新手机号');
this.$u.toast('请正确填写手机号');
return false;
}
if(this.$u.test.isEmpty(this.address)) {
@@ -116,6 +116,10 @@ export default {
this.$u.toast('预约时间错误');
return false;
}
if(this.number > this.goodsInfo.goods_storage) {
this.$u.toast('库存不足');
return false;
}
return true;
},
chooseDate(e) {
@@ -134,9 +138,17 @@ export default {
store_id: this.store.store_id,
appointment_time: new Date(this.time),
}).then(res => {
this.$u.toast(res.message);
if (res.errCode == 0) {
// this.$u.route({ type: 'navigateBack' });
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
},