forked from angelo/web-retail-h5
fix(cartBtmList): 修复购物车空态展示问题及结算按钮disable状态问题
This commit is contained in:
parent
076038ea73
commit
506f0226ce
|
@ -86,7 +86,7 @@
|
||||||
<!-- </u-checkbox-group> -->
|
<!-- </u-checkbox-group> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kong_t" v-show="shopCarList.length == 0">
|
<view class="kong_t" v-show="cartEmpty">
|
||||||
<img class="kong" src="@/static/images/kong.png" alt=""
|
<img class="kong" src="@/static/images/kong.png" alt=""
|
||||||
/></view>
|
/></view>
|
||||||
<view class="zhan"></view>
|
<view class="zhan"></view>
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
:loadingText="'购买中'"
|
:loadingText="'购买中'"
|
||||||
@tap="goBuy"
|
@tap="goBuy"
|
||||||
:disabled="shopCarList.length == 0"
|
:disabled="submitDisabled"
|
||||||
color="#FB3024"
|
color="#FB3024"
|
||||||
>{{ '去结算' }}
|
>{{ '去结算' }}
|
||||||
</u-button>
|
</u-button>
|
||||||
|
@ -159,6 +159,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from "@/config/goods";
|
import * as api from "@/config/goods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -183,6 +184,17 @@ export default {
|
||||||
// content:'确认删除该商品?'
|
// content:'确认删除该商品?'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
submitDisabled() {
|
||||||
|
if (this.goodsCheck[0]?.orderItemsParams) {
|
||||||
|
return this.goodsCheck[0]?.orderItemsParams?.length === 0
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
cartEmpty () {
|
||||||
|
return this.shopCarList.length === 0 || this.shopCarList[0]?.shoppingCartList?.length === 0
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selTable: {
|
selTable: {
|
||||||
handler(n, o) {
|
handler(n, o) {
|
||||||
|
@ -332,6 +344,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goBuy() {
|
goBuy() {
|
||||||
|
console.log(this.goodsCheck, '....goodsCheck')
|
||||||
|
return
|
||||||
let shoppArr = this.goodsCheck[0].orderItemsParams.map((item) => {
|
let shoppArr = this.goodsCheck[0].orderItemsParams.map((item) => {
|
||||||
return item.shoppingId;
|
return item.shoppingId;
|
||||||
});
|
});
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default {
|
||||||
waresCodeList: arr,
|
waresCodeList: arr,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.agreementList = res.data
|
this.agreementList = res.data || []
|
||||||
this.readTime = res.data.alertTime
|
this.readTime = res.data.alertTime
|
||||||
if (this.readTime > 0) {
|
if (this.readTime > 0) {
|
||||||
this.centerDialogVisible = true
|
this.centerDialogVisible = true
|
||||||
|
|
Loading…
Reference in New Issue