【类 型】:feat

【原  因】:购物车按钮 组件  改为复用组件
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
air 2025-01-21 16:32:34 +08:00
parent 514afcbd22
commit c6ac6c9292

View File

@ -0,0 +1,43 @@
<template>
<view class="p-l-24 p-r-24 cartBox">
<view v-if="total === 0" class="rad16 bg-g flex ofh" style="height: 108rpx;">
<view class="bg-b" style="width: 152rpx;"></view>
<view class="flex1 flex mac p-l-24">
<u--image src="/static/icons/cafe-48.svg" width="96rpx" height="96rpx" />
<view class="m-l-12 fz36 fb">未选购餐品</view>
</view>
</view>
<view v-else class="bg-m rad16 flex" style="height: 108rpx;">
<view class="flex md p-b-12">
<u--image src="/static/icons/planeBox-100.svg" width="136rpx" height="136rpx"
@click="$store.commit('setCartShow',!$store.state.cartShow)" />
</view>
<view class="fci fz36 flex1 flex msb">
<view class="flex1 p-l-12 flex column mc" @click="$store.commit('setCartShow',!$store.state.cartShow)">
<view class="fz36 fb">¥{{total | formatPrice}}</view>
<view class="fz24" v-if="minimumOrderDifference>0">还差¥{{minimumOrderDifference | formatPrice}}起送
</view>
</view>
<view class="flex column mac mc" style="width: 180rpx;" @click="handleSeled">
<view class="fz36">选好了</view>
<view class="fz24">Order</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "cartBut",
data() {
return {
};
}
}
</script>
<style>
</style>