结算按钮
This commit is contained in:
parent
ac9b0c4d41
commit
b75ab6fdef
@ -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>
|
Loading…
Reference in New Issue
Block a user