绿满眶商城微信小程序-uniapp
peng
2025-06-27 b6b1a34a610795ed5ea8dd8658955ea4c9a0d401
pages/tabbar/cart/cartList.vue
@@ -6,7 +6,7 @@
      </div>
    </u-navbar> 
    <!-- 空白页-->
    <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
    <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty"  :style="{height: windowHeight - marginBottom - 50 + 'px'}">
      <image src="/static/emptyCart.png" mode="aspectFit"></image>
      <view class="empty-tips">
        空空如也
@@ -14,7 +14,7 @@
      </view>
    </view>
    <!-- 店铺商品信息 -->
    <div class="content">
    <div class="content" :style="{height: windowHeight - marginBottom - 50 + 'px'}">
      <div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList"
        :key="index">
        <view class="tab">
@@ -126,7 +126,7 @@
    <u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="deleteConfirm" show-cancel-button
      :content="deleteContent" :async-close="true"></u-modal>
    <!-- 结账 -->
    <div class="box box6">
    <div class="box box6" :style="{bottom: marginBottom + 50 + 'px'}">
      <view class="navL">
        <u-checkbox shape="circle" :active-color="lightColor" v-model="checkout" @change="checkOut()" label-size="24">全选
        </u-checkbox>
@@ -219,10 +219,14 @@
      isEdit: false, // 是否是编辑
      checkout: false, //全选按钮
      WEIXIN_num: "", //购物车兼容微信步进器
     marginBottom: 0 ,// 底部安全区域
     windowHeight: 0 // 可使用屏幕高度
    };
  },
  mounted() {
     this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
     this.windowHeight = uni.getSystemInfoSync().windowHeight
    // #ifdef MP-WEIXIN
    // 小程序默认分享
    uni.showShareMenu({ withShareTicket: true });