结算按钮

This commit is contained in:
jqtmviyu@gmail.com 2021-03-05 02:17:48 +08:00
parent ac9b0c4d41
commit b75ab6fdef

View File

@ -19,7 +19,7 @@
<text class="select_text">全选</text>
<text class="total_text">合计</text>
<text class="price">{{totalPrice}}</text>
<view class="bottom_btn">去结算({{totalCount}})</view>
<view @tap="goToPay" class="bottom_btn" :class="{disable: totalCount === 0}">去结算({{totalCount}})</view>
</view>
</view>
</template>
@ -69,6 +69,16 @@ export default {
selectAllChange(){
let temp = !this.selectAll
this.cartList.forEach(item=>item.goods_select = temp)
},
//
goToPay(){
if(this.totalCount===0){
uni.showToast({
title:"请选择结算商品",
icon: "none"
})
}else{
console.log("跳转到结算页面") }
}
},
//
@ -183,6 +193,9 @@ export default {
display: flex;
justify-content: center;
align-items: center;
&.disable {
background-color: #ccc;
}
}
}
</style>