| | |
| | | </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"> |
| | | 空空如也 |
| | |
| | | </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"> |
| | |
| | | </u-checkbox-group> |
| | | <span class="invalid" v-else style="font-size: 24rpx">失效</span> |
| | | </view> |
| | | <u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx" |
| | | <!-- <video border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" |
| | | v-if="skuItem.goodsSku.goodsVideo" :src="skuItem.goodsSku.goodsVideo" |
| | | style="width: 160rpx;height: 160rpx;" |
| | | :initial-time="0" |
| | | :controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false"/> --> |
| | | <u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx" |
| | | :src="skuItem.goodsSku.thumbnail" /> |
| | | </view> |
| | | <view class="goods-content"> |
| | |
| | | <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> |
| | |
| | | </template> |
| | | <script> |
| | | |
| | | import UNavbar from '@/uview-components/uview-ui/components/u-navbar/u-navbar.vue'; |
| | | import UCheckboxGroup from '@/uview-components/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'; |
| | | import UCheckbox from '@/uview-components/uview-ui/components/u-checkbox/u-checkbox.vue'; |
| | | import USwipeAction from '@/uview-components/uview-ui/components/u-swipe-action/u-swipe-action.vue'; |
| | | import UImage from '@/uview-components/uview-ui/components/u-image/u-image.vue'; |
| | | import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue'; |
| | | import UPopup from '@/uview-components/uview-ui/components/u-popup/u-popup.vue'; |
| | | import UCountDown from '@/uview-components/uview-ui/components/u-count-down/u-count-down.vue'; |
| | | import UModal from '@/uview-components/uview-ui/components/u-modal/u-modal.vue'; |
| | | import UToast from '@/uview-components/uview-ui/components/u-toast/u-toast.vue'; |
| | | import '@/components/uview-components/uview-ui'; |
| | | import * as API_Trade from "@/api/trade"; |
| | | import { debounce } from "@/utils/tools.js"; |
| | | import uniNumberBox from '@/components/uni-number-box' |
| | | // import uniNumberBox from '@/components/uni-number-box' |
| | | export default { |
| | | components:{uniNumberBox,UNavbar,UCheckboxGroup,UCheckbox,USwipeAction,UImage,UIcon,UPopup,UCountDown,UModal,UToast}, // 数量加减组件 |
| | | data() { |
| | | return { |
| | | loading:false, |
| | |
| | | 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 }); |