|
@@ -1,100 +1,107 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="u-wrap">
|
|
|
|
|
- <login ref="login" @signIn="signIn"></login>
|
|
|
|
|
- <view class="u-search-box">
|
|
|
|
|
- <view class="nav" >
|
|
|
|
|
- <view class="header">
|
|
|
|
|
- <view class="left overflow-hidden">
|
|
|
|
|
- <view class="flex align-center overflow-hidden" v-if="takeType == takeTypeGlobal.delivery">
|
|
|
|
|
- <image src="/pagesD/static/icon/location1.png" style="width: 30rpx; height: 30rpx;"
|
|
|
|
|
- class="margin-right-10">
|
|
|
|
|
- </image>
|
|
|
|
|
- <text v-if="$isEmpty(vuex_userId)" @tap="showLogin">去登录</text>
|
|
|
|
|
- <view class="" v-else @click="$jump('/pagesD/pages/address/address')">
|
|
|
|
|
- <text v-if="$isEmpty(address)">请完善地址信息</text>
|
|
|
|
|
- <view style="margin-right: 20rpx;" v-else >
|
|
|
|
|
- <text class="text-cut-1">{{address.address}}</text>
|
|
|
|
|
|
|
+ <view class="u-wrap" :style="$isEmpty(goods)?'background-color: #FFFFFF;':''">
|
|
|
|
|
+ <view class="goods_empty" v-if="$isEmpty(goods)">
|
|
|
|
|
+ <image src="/pagesD/static/icon/goods_empty.png" mode=""></image>
|
|
|
|
|
+ <text style="font-weight: 400;">该商铺还未上架商品</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="" v-else>
|
|
|
|
|
+ <login ref="login" @signIn="signIn"></login>
|
|
|
|
|
+ <view class="u-search-box">
|
|
|
|
|
+ <view class="nav" >
|
|
|
|
|
+ <view class="header">
|
|
|
|
|
+ <view class="left overflow-hidden">
|
|
|
|
|
+ <view class="flex align-center overflow-hidden" v-if="takeType == takeTypeGlobal.delivery">
|
|
|
|
|
+ <image src="/pagesD/static/icon/location1.png" style="width: 30rpx; height: 30rpx;"
|
|
|
|
|
+ class="margin-right-10">
|
|
|
|
|
+ </image>
|
|
|
|
|
+ <text v-if="$isEmpty(vuex_userId)" @tap="showLogin">去登录</text>
|
|
|
|
|
+ <view class="" v-else @click="$jump('/pagesD/pages/address/address')">
|
|
|
|
|
+ <text v-if="$isEmpty(address)">请完善地址信息</text>
|
|
|
|
|
+ <view style="margin-right: 20rpx;" v-else >
|
|
|
|
|
+ <text class="text-cut-1">{{address.address}}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="flex align-center overflow-hidden" v-else>
|
|
|
|
|
+ <image src="/pagesD/static/icon/shop2.png" style="width: 30rpx; height: 30rpx;"
|
|
|
|
|
+ class="margin-right-10">
|
|
|
|
|
+ </image>
|
|
|
|
|
+ <text style="font-size: 36rpx;font-weight: 800;">杨国福麻辣烫</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex align-center overflow-hidden" v-else>
|
|
|
|
|
- <image src="/pagesD/static/icon/shop2.png" style="width: 30rpx; height: 30rpx;"
|
|
|
|
|
- class="margin-right-10">
|
|
|
|
|
- </image>
|
|
|
|
|
- <text style="font-size: 36rpx;font-weight: 800;">杨国福麻辣烫</text>
|
|
|
|
|
|
|
+ <view @click="modalCheckedShow" class="cu-btn round bg-red sm" style="font-size: 24rpx;">
|
|
|
|
|
+ <text class="center">{{takeType.substring(2,4)}}</text>
|
|
|
|
|
+ <text class="cuIcon-order center text-bold" style="transform: rotate(90deg);margin-left: 6rpx;"></text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view @click="modalCheckedShow" class="cu-btn round bg-red sm" style="font-size: 24rpx;">
|
|
|
|
|
- <text class="center">{{takeType.substring(2,4)}}</text>
|
|
|
|
|
- <text class="cuIcon-order center text-bold" style="transform: rotate(90deg);margin-left: 6rpx;"></text>
|
|
|
|
|
|
|
+ <view class="bg-white">
|
|
|
|
|
+ <u-notice-bar mode="horizontal" :list="appProperties.shopNotice"></u-notice-bar>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="bg-white">
|
|
|
|
|
- <u-notice-bar mode="horizontal" :list="appProperties.shopNotice"></u-notice-bar>
|
|
|
|
|
- </view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="u-menu-wrap">
|
|
|
|
|
- <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
|
|
|
|
|
- :scroll-into-view="itemId">
|
|
|
|
|
- <view v-for="(item,index) in goods" :key="index" class="u-tab-item"
|
|
|
|
|
- :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
|
|
|
|
- <text class="u-line-1">{{item.goodsCategoryName}}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
- <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
|
|
|
|
- @scroll="rightScroll">
|
|
|
|
|
- <view class="page-view">
|
|
|
|
|
- <view class="class-item" :id="'item' + index" v-for="(item , index) in goods" :key="index">
|
|
|
|
|
- <view class="item-title" >
|
|
|
|
|
- <text>{{item.goodsCategoryName}}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="item-container" >
|
|
|
|
|
- <view class="thumb-box" v-for="(goods, index1) in item.goodsList" :key="index1">
|
|
|
|
|
- <image class="item-menu-image" :src="goods.image" mode=""></image>
|
|
|
|
|
- <view class="item-content" >
|
|
|
|
|
- <view class="name">{{goods.name}}</view>
|
|
|
|
|
- <view class="tips">
|
|
|
|
|
- {{ goods.description && goods.description != '' ? goods.description : goods.name }}
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="price_and_action">
|
|
|
|
|
- <text class="price">¥{{ goods.defaultPrice / 100 }}</text>
|
|
|
|
|
- <!-- 商品没有下架 -->
|
|
|
|
|
- <view v-if="goods.isSell">
|
|
|
|
|
- <!-- 要选商品规格详细信息 -->
|
|
|
|
|
- <view class="btn-group"
|
|
|
|
|
- v-if="goods.goodsPropertyVos && goods.goodsPropertyVos.length">
|
|
|
|
|
- <button type="primary" class="btn property_btn" hover-class="none"
|
|
|
|
|
- size="mini" @tap="showGoodDetailModal(goods)">
|
|
|
|
|
- 选规格
|
|
|
|
|
- </button>
|
|
|
|
|
- <view class="dot" v-show="goodsCartNum(goods.id)">
|
|
|
|
|
- {{ goodsCartNum(goods.id) }}
|
|
|
|
|
|
|
+ <view class="u-menu-wrap">
|
|
|
|
|
+ <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
|
|
|
|
|
+ :scroll-into-view="itemId">
|
|
|
|
|
+ <view v-for="(item,index) in goods" :key="index" class="u-tab-item"
|
|
|
|
|
+ :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
|
|
|
|
+ <text class="u-line-1">{{item.goodsCategoryName}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
|
|
|
|
+ @scroll="rightScroll">
|
|
|
|
|
+ <view class="page-view">
|
|
|
|
|
+ <view class="class-item" :id="'item' + index" v-for="(item , index) in goods" :key="index">
|
|
|
|
|
+ <view class="item-title" >
|
|
|
|
|
+ <text>{{item.goodsCategoryName}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="item-container" >
|
|
|
|
|
+ <view class="thumb-box" v-for="(goods, index1) in item.goodsList" :key="index1">
|
|
|
|
|
+ <image class="item-menu-image" :src="goods.image" mode=""></image>
|
|
|
|
|
+ <view class="item-content" >
|
|
|
|
|
+ <view class="name">{{goods.name}}</view>
|
|
|
|
|
+ <view class="tips">
|
|
|
|
|
+ {{ goods.description && goods.description != '' ? goods.description : goods.name }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="price_and_action">
|
|
|
|
|
+ <text class="price">¥{{ goods.defaultPrice / 100 }}</text>
|
|
|
|
|
+ <!-- 商品没有下架 -->
|
|
|
|
|
+ <view v-if="goods.isSell">
|
|
|
|
|
+ <!-- 要选商品规格详细信息 -->
|
|
|
|
|
+ <view class="btn-group"
|
|
|
|
|
+ v-if="goods.goodsPropertyVos && goods.goodsPropertyVos.length">
|
|
|
|
|
+ <button type="primary" class="btn property_btn" hover-class="none"
|
|
|
|
|
+ size="mini" @tap="showGoodDetailModal(goods)">
|
|
|
|
|
+ 选规格
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <view class="dot" v-show="goodsCartNum(goods.id)">
|
|
|
|
|
+ {{ goodsCartNum(goods.id) }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <!-- 可以直接添加,不用选择商品属性 -->
|
|
|
|
|
- <view class="btn-group" v-else>
|
|
|
|
|
- <button type="default" v-show="goodsCartNum(goods.id)" plain
|
|
|
|
|
- class="btn reduce_btn" size="mini" hover-class="none"
|
|
|
|
|
- @tap="handleReduceFromCart(goods)">
|
|
|
|
|
- <view class="iconfont iconsami-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
- <view class="number" v-show="goodsCartNum(goods.id)">
|
|
|
|
|
- {{ goodsCartNum(goods.id) }}
|
|
|
|
|
|
|
+ <!-- 可以直接添加,不用选择商品属性 -->
|
|
|
|
|
+ <view class="btn-group" v-else>
|
|
|
|
|
+ <button type="default" v-show="goodsCartNum(goods.id)" plain
|
|
|
|
|
+ class="btn reduce_btn" size="mini" hover-class="none"
|
|
|
|
|
+ @tap="handleReduceFromCart(goods)">
|
|
|
|
|
+ <view class="iconfont iconsami-select"></view>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <view class="number" v-show="goodsCartNum(goods.id)">
|
|
|
|
|
+ {{ goodsCartNum(goods.id) }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button type="primary" class="btn add_btn" size="min" hover-class="none"
|
|
|
|
|
+ @tap="handleAddToCart(goods)">
|
|
|
|
|
+ <view class="iconfont iconadd-select"></view>
|
|
|
|
|
+ </button>
|
|
|
</view>
|
|
</view>
|
|
|
- <button type="primary" class="btn add_btn" size="min" hover-class="none"
|
|
|
|
|
- @tap="handleAddToCart(goods)">
|
|
|
|
|
- <view class="iconfont iconadd-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <!-- 已经下架了 -->
|
|
|
|
|
- <view v-else>
|
|
|
|
|
- <view class="btn-group">
|
|
|
|
|
- <button type="primary" disabled class="btn property_btn"
|
|
|
|
|
- style="text-decoration: line-through;background-color: rgba(255, 148, 71,.6);" size="mini">
|
|
|
|
|
- 已售空
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <!-- 已经下架了 -->
|
|
|
|
|
+ <view v-else>
|
|
|
|
|
+ <view class="btn-group">
|
|
|
|
|
+ <button type="primary" disabled class="btn property_btn"
|
|
|
|
|
+ style="text-decoration: line-through;background-color: rgba(255, 148, 71,.6);" size="mini">
|
|
|
|
|
+ 已售空
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -102,152 +109,152 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <view class="">
|
|
|
|
|
- <!-- 购物车栏 begin -->
|
|
|
|
|
- <view class="cart-box" v-if="cart && cart.length">
|
|
|
|
|
- <view class="mark" @tap="cartPopupVisible = !cartPopupVisible">
|
|
|
|
|
- <image src="/pagesD/static/icon/cart1.png" class="cart-img"></image>
|
|
|
|
|
- <view class="tag">{{ getCartGoodsNumber }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="price" @tap="cartPopupVisible = !cartPopupVisible">¥{{ getCartGoodsPrice / 100 }}</view>
|
|
|
|
|
- <view v-if="!appProperties.shopStatus"><button type="primary" class="pay-btn" disabled>商家休息中</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else-if="isBusinessTime">
|
|
|
|
|
- <button :style="!disabledPay?'background-color: #FF9447;':''" type="primary" class="pay-btn" @tap="toPay()"
|
|
|
|
|
- :disabled="disabledPay">{{ disabledPay ? `差${spread / 100}元起送` : '去结算' }}</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else><button type="primary" class="pay-btn" disabled>未在营业时段</button></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- 购物车栏 end -->
|
|
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
|
|
|
- <!-- 商品详情模态框 begin -->
|
|
|
|
|
- <modal :show="goodDetailModalVisible" class="good-detail-modal" color="#5A5B5C" width="90%" custom
|
|
|
|
|
- padding="0rpx" radius="12rpx">
|
|
|
|
|
- <view class="cover">
|
|
|
|
|
- <image v-if="currentGoods.image" :src="currentGoods.image" class="image"></image>
|
|
|
|
|
- <view class="btn-group">
|
|
|
|
|
- <image src="/pagesD/static/icon/close.png" @tap="closeGoodDetailModal"></image>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view class="">
|
|
|
|
|
+ <!-- 购物车栏 begin -->
|
|
|
|
|
+ <view class="cart-box" v-if="cart && cart.length">
|
|
|
|
|
+ <view class="mark" @tap="cartPopupVisible = !cartPopupVisible">
|
|
|
|
|
+ <image src="/pagesD/static/icon/cart1.png" class="cart-img"></image>
|
|
|
|
|
+ <view class="tag">{{ getCartGoodsNumber }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="price" @tap="cartPopupVisible = !cartPopupVisible">¥{{ getCartGoodsPrice / 100 }}</view>
|
|
|
|
|
+ <view v-if="!appProperties.shopStatus"><button type="primary" class="pay-btn" disabled>商家休息中</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else-if="isBusinessTime">
|
|
|
|
|
+ <button :style="!disabledPay?'background-color: #FF9447;':''" type="primary" class="pay-btn" @tap="toPay()"
|
|
|
|
|
+ :disabled="disabledPay">{{ disabledPay ? `差${spread / 100}元起送` : '去结算' }}</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view v-else><button type="primary" class="pay-btn" disabled>未在营业时段</button></view>
|
|
|
</view>
|
|
</view>
|
|
|
- <scroll-view class="detail" scroll-y style="padding-bottom: 100px;">
|
|
|
|
|
- <view class="wrapper">
|
|
|
|
|
- <view class="basic">
|
|
|
|
|
- <view class="name">{{ currentGoods.name }}</view>
|
|
|
|
|
- <view class="tips">{{ currentGoods.description }}</view>
|
|
|
|
|
|
|
+ <!-- 购物车栏 end -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 商品详情模态框 begin -->
|
|
|
|
|
+ <modal :show="goodDetailModalVisible" class="good-detail-modal" color="#5A5B5C" width="90%" custom
|
|
|
|
|
+ padding="0rpx" radius="12rpx">
|
|
|
|
|
+ <view class="cover">
|
|
|
|
|
+ <image v-if="currentGoods.image" :src="currentGoods.image" class="image"></image>
|
|
|
|
|
+ <view class="btn-group">
|
|
|
|
|
+ <image src="/pagesD/static/icon/close.png" @tap="closeGoodDetailModal"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- 商品的额外属性 -->
|
|
|
|
|
- <view class="properties"
|
|
|
|
|
- v-if="currentGoods.goodsPropertyVos && currentGoods.goodsPropertyVos.length">
|
|
|
|
|
- <view class="property" v-for="(goodsPropertyVo, index) in currentGoods.goodsPropertyVos"
|
|
|
|
|
- :key="index">
|
|
|
|
|
- <view class="title">
|
|
|
|
|
- <text class="name">
|
|
|
|
|
- <text v-if="goodsPropertyVo.required" style="color: red">*</text>
|
|
|
|
|
- {{ goodsPropertyVo.category }}
|
|
|
|
|
- </text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="values">
|
|
|
|
|
- <view class="value" v-for="(property, index2) in goodsPropertyVo.propertyList"
|
|
|
|
|
- :key="index2" :class="{ default: property.isDefault }"
|
|
|
|
|
- @tap="changePropertyDefault(index, index2)">
|
|
|
|
|
- {{ property.propertyOption }}
|
|
|
|
|
- {{ property.rebasePrice && property.rebasePrice >=0 ? '¥' + property.rebasePrice / 100 : property.extraPrice / 100 ? '¥' + property.extraPrice / 100 : '' }}
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <scroll-view class="detail" scroll-y style="padding-bottom: 100px;">
|
|
|
|
|
+ <view class="wrapper">
|
|
|
|
|
+ <view class="basic">
|
|
|
|
|
+ <view class="name">{{ currentGoods.name }}</view>
|
|
|
|
|
+ <view class="tips">{{ currentGoods.description }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- 商品的额外属性 -->
|
|
|
|
|
+ <view class="properties"
|
|
|
|
|
+ v-if="currentGoods.goodsPropertyVos && currentGoods.goodsPropertyVos.length">
|
|
|
|
|
+ <view class="property" v-for="(goodsPropertyVo, index) in currentGoods.goodsPropertyVos"
|
|
|
|
|
+ :key="index">
|
|
|
|
|
+ <view class="title">
|
|
|
|
|
+ <text class="name">
|
|
|
|
|
+ <text v-if="goodsPropertyVo.required" style="color: red">*</text>
|
|
|
|
|
+ {{ goodsPropertyVo.category }}
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="values">
|
|
|
|
|
+ <view class="value" v-for="(property, index2) in goodsPropertyVo.propertyList"
|
|
|
|
|
+ :key="index2" :class="{ default: property.isDefault }"
|
|
|
|
|
+ @tap="changePropertyDefault(index, index2)">
|
|
|
|
|
+ {{ property.propertyOption }}
|
|
|
|
|
+ {{ property.rebasePrice && property.rebasePrice >=0 ? '¥' + property.rebasePrice / 100 : property.extraPrice / 100 ? '¥' + property.extraPrice / 100 : '' }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
- <view class="action">
|
|
|
|
|
- <!-- 价格和属性 -->
|
|
|
|
|
- <view class="left">
|
|
|
|
|
- <view class="price">¥{{ currentGoods.realPrice / 100 }}</view>
|
|
|
|
|
- <view class="props" v-if="getGoodSelectedProps(currentGoods)">
|
|
|
|
|
- {{ getGoodSelectedProps(currentGoods) }}
|
|
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ <view class="action">
|
|
|
|
|
+ <!-- 价格和属性 -->
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <view class="price">¥{{ currentGoods.realPrice / 100 }}</view>
|
|
|
|
|
+ <view class="props" v-if="getGoodSelectedProps(currentGoods)">
|
|
|
|
|
+ {{ getGoodSelectedProps(currentGoods) }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- 模态窗里面增减商品 -->
|
|
|
|
|
+ <view class="btn-group">
|
|
|
|
|
+ <button type="default" plain class="btn" size="mini" hover-class="none"
|
|
|
|
|
+ @tap="changeCurrentGoodsNumber(-1)">
|
|
|
|
|
+ <view class="iconfont iconsami-select"></view>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <view class="number">{{ currentGoods.number }}</view>
|
|
|
|
|
+ <button type="primary" class="btn" size="min" hover-class="none" @tap="changeCurrentGoodsNumber(1)">
|
|
|
|
|
+ <view class="iconfont iconadd-select"></view>
|
|
|
|
|
+ </button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- 模态窗里面增减商品 -->
|
|
|
|
|
- <view class="btn-group">
|
|
|
|
|
- <button type="default" plain class="btn" size="mini" hover-class="none"
|
|
|
|
|
- @tap="changeCurrentGoodsNumber(-1)">
|
|
|
|
|
- <view class="iconfont iconsami-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
- <view class="number">{{ currentGoods.number }}</view>
|
|
|
|
|
- <button type="primary" class="btn" size="min" hover-class="none" @tap="changeCurrentGoodsNumber(1)">
|
|
|
|
|
- <view class="iconfont iconadd-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <view class="add-to-cart-btn" @tap="addCurrentGoodsToCart()">
|
|
|
|
|
+ <view>确认</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="add-to-cart-btn" @tap="addCurrentGoodsToCart()">
|
|
|
|
|
- <view>确认</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </modal>
|
|
|
|
|
- <!-- 商品详情模态框 end -->
|
|
|
|
|
-
|
|
|
|
|
- <!-- 购物车详情popup -->
|
|
|
|
|
-
|
|
|
|
|
- <u-popup z-index="99" v-model="cartPopupVisible" mode="bottom">
|
|
|
|
|
- <view class="cart-popup">
|
|
|
|
|
- <view class="top"><text @tap="handleCartClear">清空</text></view>
|
|
|
|
|
- <scroll-view class="cart-list" scroll-y>
|
|
|
|
|
- <view class="wrapper">
|
|
|
|
|
- <view class="item" v-for="(goods, index) in cart" :key="index">
|
|
|
|
|
- <view class="left">
|
|
|
|
|
- <view class="name">{{ goods.name }}</view>
|
|
|
|
|
- <view class="props">{{ getGoodSelectedProps(goods) }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="center">
|
|
|
|
|
- <text>¥{{ goods.realPrice / 100 }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="right">
|
|
|
|
|
- <!-- 购物车里添加数量 -->
|
|
|
|
|
- <button type="default" plain size="mini" class="btn" hover-class="none"
|
|
|
|
|
- @tap="handleCartItemReduce(index)">
|
|
|
|
|
- <view class="iconfont iconsami-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
- <view class="number">{{ goods.number }}</view>
|
|
|
|
|
- <!-- 购物车里减少数量 -->
|
|
|
|
|
- <button type="primary" class="btn" size="min" hover-class="none"
|
|
|
|
|
- @tap="handleCartItemAdd(index)">
|
|
|
|
|
- <view class="iconfont iconadd-select"></view>
|
|
|
|
|
- </button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="item" v-if="takeType == takeTypeGlobal.package">
|
|
|
|
|
- <view class="left">
|
|
|
|
|
- <view class="name">包装费</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="center">
|
|
|
|
|
- <text>¥{{ appProperties.packingPrice / 100 }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="item" v-if="takeType == takeTypeGlobal.delivery">
|
|
|
|
|
- <view class="left">
|
|
|
|
|
- <view class="name">包装费</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="center">
|
|
|
|
|
- <text>¥{{ appProperties.packingPrice / 100 }}</text>
|
|
|
|
|
|
|
+ </modal>
|
|
|
|
|
+ <!-- 商品详情模态框 end -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 购物车详情popup -->
|
|
|
|
|
+
|
|
|
|
|
+ <u-popup z-index="99" v-model="cartPopupVisible" mode="bottom">
|
|
|
|
|
+ <view class="cart-popup">
|
|
|
|
|
+ <view class="top"><text @tap="handleCartClear">清空</text></view>
|
|
|
|
|
+ <scroll-view class="cart-list" scroll-y>
|
|
|
|
|
+ <view class="wrapper">
|
|
|
|
|
+ <view class="item" v-for="(goods, index) in cart" :key="index">
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <view class="name">{{ goods.name }}</view>
|
|
|
|
|
+ <view class="props">{{ getGoodSelectedProps(goods) }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="center">
|
|
|
|
|
+ <text>¥{{ goods.realPrice / 100 }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="right">
|
|
|
|
|
+ <!-- 购物车里添加数量 -->
|
|
|
|
|
+ <button type="default" plain size="mini" class="btn" hover-class="none"
|
|
|
|
|
+ @tap="handleCartItemReduce(index)">
|
|
|
|
|
+ <view class="iconfont iconsami-select"></view>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <view class="number">{{ goods.number }}</view>
|
|
|
|
|
+ <!-- 购物车里减少数量 -->
|
|
|
|
|
+ <button type="primary" class="btn" size="min" hover-class="none"
|
|
|
|
|
+ @tap="handleCartItemAdd(index)">
|
|
|
|
|
+ <view class="iconfont iconadd-select"></view>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="left">
|
|
|
|
|
- <view class="name">配送费</view>
|
|
|
|
|
|
|
+ <view class="item" v-if="takeType == takeTypeGlobal.package">
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <view class="name">包装费</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="center">
|
|
|
|
|
+ <text>¥{{ appProperties.packingPrice / 100 }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="center">
|
|
|
|
|
- <text>¥{{ appProperties.sendingPrice / 100 }}</text>
|
|
|
|
|
|
|
+ <view class="item" v-if="takeType == takeTypeGlobal.delivery">
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <view class="name">包装费</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="center">
|
|
|
|
|
+ <text>¥{{ appProperties.packingPrice / 100 }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <view class="name">配送费</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="center">
|
|
|
|
|
+ <text>¥{{ appProperties.sendingPrice / 100 }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </u-popup>
|
|
|
|
|
- <!-- 购物车详情popup -->
|
|
|
|
|
-
|
|
|
|
|
- <modal-checked @confirm="modalConfirm" ref="modalChecked" :list="checkList"></modal-checked>
|
|
|
|
|
- <login ref="login" @signIn="signIn"></login>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-popup>
|
|
|
|
|
+ <!-- 购物车详情popup -->
|
|
|
|
|
+
|
|
|
|
|
+ <modal-checked @confirm="modalConfirm" ref="modalChecked" :list="checkList"></modal-checked>
|
|
|
|
|
+ <login ref="login" @signIn="signIn"></login>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -314,10 +321,6 @@
|
|
|
{
|
|
{
|
|
|
name:global.takeType.package,
|
|
name:global.takeType.package,
|
|
|
icon:"/pagesD/static/icon/pickup.png",
|
|
icon:"/pagesD/static/icon/pickup.png",
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name:global.takeType.delivery,
|
|
|
|
|
- icon:"/pagesD/static/icon/delivery2.png",
|
|
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -827,6 +830,25 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|
+ .goods_empty{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ margin-top: 300rpx;
|
|
|
|
|
+
|
|
|
|
|
+ image{
|
|
|
|
|
+ width: 270rpx;
|
|
|
|
|
+ height: 160rpx;
|
|
|
|
|
+ margin-bottom: 50rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ text:{
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #DDDDDD;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.nav {
|
|
.nav {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
@@ -1477,7 +1499,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.page-view {
|
|
.page-view {
|
|
|
- margin-bottom: 150rpx;
|
|
|
|
|
|
|
+ margin-bottom: 80rpx;
|
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
|
padding: 16rpx;
|
|
padding: 16rpx;
|
|
|
}
|
|
}
|