|
@@ -3,248 +3,250 @@
|
|
|
class="container commodity-list-wrapper"
|
|
|
:style="{ overflow: showSkeleton ? 'hidden' : 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
|
|
|
>
|
|
|
- <view class="good-search clearfix" v-if="searchStatus">
|
|
|
- <view class="nav-tab-bar u-f-ajc">
|
|
|
- <block v-for="(tab, index) in tabBars" :key="tab.id" :class="{ current: tabIndex === index }">
|
|
|
- <view class="tabstyle u-f-ajc" :class="{ addstyle: tabIndex == index }" @tap="changeTab(index)">
|
|
|
- {{ tab.name }}<i v-if="tabIndex == index" class="nav-tab-line iconfont icon-gou"></i>
|
|
|
- </view>
|
|
|
- </block>
|
|
|
+ <list-skeleton :listType="0" v-if="showSkeleton" />
|
|
|
+ <template v-else>
|
|
|
+ <view class="good-search clearfix" v-if="searchStatus">
|
|
|
+ <view class="nav-tab-bar u-f-ajc">
|
|
|
+ <block v-for="(tab, index) in tabBars" :key="tab.id" :class="{ current: tabIndex === index }">
|
|
|
+ <view class="tabstyle u-f-ajc" :class="{ addstyle: tabIndex == index }" @tap="changeTab(index)">
|
|
|
+ {{ tab.name }}<i v-if="tabIndex == index" class="nav-tab-line iconfont icon-gou"></i>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ <view class="search-from name">
|
|
|
+ <text class="iconfont icon-iconfonticonfontsousuo1"></text>
|
|
|
+ <input
|
|
|
+ class="input"
|
|
|
+ type="text"
|
|
|
+ :focus="isFocus"
|
|
|
+ confirm-type="search"
|
|
|
+ v-model="searchInputVal"
|
|
|
+ placeholder="请输入商品关键词"
|
|
|
+ @input="onShowClose"
|
|
|
+ @confirm="searchOpertor(tabIndex)"
|
|
|
+ maxlength="20"
|
|
|
+ />
|
|
|
+ <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="search-from name">
|
|
|
- <text class="iconfont icon-iconfonticonfontsousuo1"></text>
|
|
|
- <input
|
|
|
- class="input"
|
|
|
- type="text"
|
|
|
- :focus="isFocus"
|
|
|
- confirm-type="search"
|
|
|
- v-model="searchInputVal"
|
|
|
- placeholder="请输入商品关键词"
|
|
|
- @input="onShowClose"
|
|
|
- @confirm="searchOpertor(tabIndex)"
|
|
|
- maxlength="20"
|
|
|
- />
|
|
|
- <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
|
|
|
+ <view class="empty-container" v-if="isShowEmpty">
|
|
|
+ <image
|
|
|
+ class="empty-container-image"
|
|
|
+ src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
|
|
|
+ ></image>
|
|
|
+ <text class="error-text">{{ isShowEmptyText }}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <list-skeleton v-if="showSkeleton"></list-skeleton>
|
|
|
- <view class="empty-container" v-if="isShowEmpty">
|
|
|
- <image
|
|
|
- class="empty-container-image"
|
|
|
- src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
|
|
|
- ></image>
|
|
|
- <text class="error-text">{{ isShowEmptyText }}</text>
|
|
|
- </view>
|
|
|
- <!-- 单一商品 -->
|
|
|
- <view class="product-container" v-else>
|
|
|
- <view :class="tabIndex" v-if="tabIndex === 0" :style="{ paddingTop: searchStatus ? '128rpx' : '' }">
|
|
|
- <scroll-view
|
|
|
- :style="{ height: scrollHeight + 'px' }"
|
|
|
- @scrolltolower="scrolltolower(tabIndex)"
|
|
|
- scroll-y
|
|
|
- v-if="listData.length > 0"
|
|
|
- >
|
|
|
- <view
|
|
|
- v-for="(pros, index) in listData"
|
|
|
- :key="index"
|
|
|
- :id="pros.productId"
|
|
|
- class="all-type-list-content commodity-list"
|
|
|
- @click.stop="navToDetailPage(pros.productId)"
|
|
|
+ <!-- 单一商品 -->
|
|
|
+ <view class="product-container" v-else>
|
|
|
+ <view :class="tabIndex" v-if="tabIndex === 0" :style="{ paddingTop: searchStatus ? '128rpx' : '' }">
|
|
|
+ <scroll-view
|
|
|
+ :style="{ height: scrollHeight + 'px' }"
|
|
|
+ @scrolltolower="scrolltolower(tabIndex)"
|
|
|
+ scroll-y
|
|
|
+ v-if="listData.length > 0"
|
|
|
>
|
|
|
- <view class="list-details-image">
|
|
|
- <image mode="widthFix" :src="pros.image" class="list-img" alt="list-img"></image>
|
|
|
- <view class="list-details-type" v-if="pros.productType == 2">医疗器械</view>
|
|
|
- </view>
|
|
|
- <view class="list-details-info">
|
|
|
- <text class="list-details-title">{{ isInterceptHtmlFn(pros.name) }}</text>
|
|
|
- <text class="list-details-specs">规格:{{ pros.unit ? pros.unit : '' }}</text>
|
|
|
- <text class="list-details-miniQuantity list-details-specs"
|
|
|
- >起订量:{{ pros.minBuyNumber }}</text
|
|
|
- >
|
|
|
- <view class="list-details-specs" v-if="pros.code != '' && pros.code != null">
|
|
|
- <view>商品编码:{{ pros.code }}</view>
|
|
|
- </view>
|
|
|
- <view class="list-details-price">
|
|
|
- <template v-if="priceLoading">
|
|
|
- <view class="list-price-loding">正在获取价格...</view>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <view class="list-shop">
|
|
|
- <view class="list-price">
|
|
|
- <text
|
|
|
- class="price-larger"
|
|
|
- :class="
|
|
|
- PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
- ? 'none'
|
|
|
- : ''
|
|
|
- "
|
|
|
- >
|
|
|
- ¥{{
|
|
|
- (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
- ? pros.originalPrice
|
|
|
- : pros.price) | NumFormat
|
|
|
- }}
|
|
|
- </text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <button class="add-cart-btn" @click.stop="operationHanld(pros)">数量</button>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- <view class="list-details-price">
|
|
|
- <view class="floor-item-act">
|
|
|
- <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
- <template v-if="pros.actStatus == 1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
- {{ pros.promotions.name }}<text>:¥{{ pros.price | NumFormat }}</text>
|
|
|
- </view>
|
|
|
- <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
- </template>
|
|
|
- <template v-if="pros.svipProductFlag == 1">
|
|
|
- <view class="svip-tags">
|
|
|
- <view class="tags">SVIP</view>
|
|
|
- <view class="price">{{ pros.svipPriceTag }}</view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="showLoading && listData.length > 4 && !showRegularBtn">
|
|
|
- <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
|
|
|
- >{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
|
|
|
- >
|
|
|
- <view class="loading-wrapper loading-wrapper-btm" v-else
|
|
|
- >———<text class="btm-text">已至底部</text>———</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- </view>
|
|
|
- <!-- 组合商品 -->
|
|
|
- <view :class="tabIndex" v-if="tabIndex === 1">
|
|
|
- <scroll-view
|
|
|
- :style="{ height: scrollHeight + 'px', paddingTop: searchStatus ? '112rpx' : '' }"
|
|
|
- @scrolltolower="scrolltolower(tabIndex)"
|
|
|
- scroll-y
|
|
|
- >
|
|
|
- <view class="all-zuhe-list" v-for="(item, index) in combinationProduct" :key="index" :id="item.id">
|
|
|
- <view class="zuhe_title" :class="index % 2 == 0 ? 'active' : ''">{{ item.name }}</view>
|
|
|
<view
|
|
|
- v-for="(pros, proIndex) in item.combinationProductList"
|
|
|
- :class="index % 2 == 0 ? 'stylecontent' : ''"
|
|
|
- :key="proIndex"
|
|
|
+ v-for="(pros, index) in listData"
|
|
|
+ :key="index"
|
|
|
:id="pros.productId"
|
|
|
- class="zuhe-list-content commodity-list"
|
|
|
+ class="all-type-list-content commodity-list"
|
|
|
+ @click.stop="navToDetailPage(pros.productId)"
|
|
|
>
|
|
|
+ <view class="list-details-image">
|
|
|
+ <image mode="widthFix" :src="pros.image" class="list-img" alt="list-img"></image>
|
|
|
+ <view class="list-details-type" v-if="pros.productType == 2">医疗器械</view>
|
|
|
+ </view>
|
|
|
<view class="list-details-info">
|
|
|
- <text class="list-details-title zuhe_list_text">商品编码:{{ pros.code }}</text>
|
|
|
- <text
|
|
|
- class="list-details-specs zuhe_list_text"
|
|
|
- @click.stop="navToDetailPage(pros.productId)"
|
|
|
- >{{ pros.name }}</text
|
|
|
+ <text class="list-details-title">{{ isInterceptHtmlFn(pros.name) }}</text>
|
|
|
+ <text class="list-details-specs">规格:{{ pros.unit ? pros.unit : '' }}</text>
|
|
|
+ <text class="list-details-miniQuantity list-details-specs"
|
|
|
+ >起订量:{{ pros.minBuyNumber }}</text
|
|
|
>
|
|
|
- <view class="list-details-price zuhe_list_price">
|
|
|
- <view class="list-shop com">
|
|
|
- <view class="list-price zuhe_list_price">
|
|
|
- <view class="zuhe_price-larger zuhe_list_text">
|
|
|
- <text class="price-larger">规格:{{ pros.unit }}</text>
|
|
|
+ <view class="list-details-specs" v-if="pros.code != '' && pros.code != null">
|
|
|
+ <view>商品编码:{{ pros.code }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="list-details-price">
|
|
|
+ <template v-if="priceLoading">
|
|
|
+ <view class="list-price-loding">正在获取价格...</view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="list-shop">
|
|
|
+ <view class="list-price">
|
|
|
<text
|
|
|
- class="price-btn"
|
|
|
- @click.stop="handleShowUnitPopup(pros, proIndex)"
|
|
|
- >重选</text
|
|
|
+ class="price-larger"
|
|
|
+ :class="
|
|
|
+ PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? 'none'
|
|
|
+ : ''
|
|
|
+ "
|
|
|
>
|
|
|
+ ¥{{
|
|
|
+ (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
</view>
|
|
|
- <view class="zuhe_price-larger zuhe_list_text">
|
|
|
- <view class="list-price-none" v-if="pros.repurchaseFlag == 1">
|
|
|
- <text class="price-none">价格:¥{{ pros.originalPrice }}</text>
|
|
|
+ </view>
|
|
|
+ <button class="add-cart-btn" @click.stop="operationHanld(pros)">数量</button>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="list-details-price">
|
|
|
+ <view class="floor-item-act">
|
|
|
+ <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
+ <template v-if="pros.actStatus == 1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
+ {{ pros.promotions.name }}<text>:¥{{ pros.price | NumFormat }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="pros.svipProductFlag == 1">
|
|
|
+ <view class="svip-tags">
|
|
|
+ <view class="tags">SVIP</view>
|
|
|
+ <view class="price">{{ pros.svipPriceTag }}</view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="showLoading && listData.length > 4 && !showRegularBtn">
|
|
|
+ <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
|
|
|
+ >{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
|
|
|
+ >
|
|
|
+ <view class="loading-wrapper loading-wrapper-btm" v-else
|
|
|
+ >———<text class="btm-text">已至底部</text>———</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ <!-- 组合商品 -->
|
|
|
+ <view :class="tabIndex" v-if="tabIndex === 1">
|
|
|
+ <scroll-view
|
|
|
+ :style="{ height: scrollHeight + 'px', paddingTop: searchStatus ? '112rpx' : '' }"
|
|
|
+ @scrolltolower="scrolltolower(tabIndex)"
|
|
|
+ scroll-y
|
|
|
+ >
|
|
|
+ <view class="all-zuhe-list" v-for="(item, index) in combinationProduct" :key="index" :id="item.id">
|
|
|
+ <view class="zuhe_title" :class="index % 2 == 0 ? 'active' : ''">{{ item.name }}</view>
|
|
|
+ <view
|
|
|
+ v-for="(pros, proIndex) in item.combinationProductList"
|
|
|
+ :class="index % 2 == 0 ? 'stylecontent' : ''"
|
|
|
+ :key="proIndex"
|
|
|
+ :id="pros.productId"
|
|
|
+ class="zuhe-list-content commodity-list"
|
|
|
+ >
|
|
|
+ <view class="list-details-info">
|
|
|
+ <text class="list-details-title zuhe_list_text">商品编码:{{ pros.code }}</text>
|
|
|
+ <text
|
|
|
+ class="list-details-specs zuhe_list_text"
|
|
|
+ @click.stop="navToDetailPage(pros.productId)"
|
|
|
+ >{{ pros.name }}</text
|
|
|
+ >
|
|
|
+ <view class="list-details-price zuhe_list_price">
|
|
|
+ <view class="list-shop com">
|
|
|
+ <view class="list-price zuhe_list_price">
|
|
|
+ <view class="zuhe_price-larger zuhe_list_text">
|
|
|
+ <text class="price-larger">规格:{{ pros.unit }}</text>
|
|
|
<text
|
|
|
- class="iconfont icon-wenhao"
|
|
|
- @click.stop="repurchModel"
|
|
|
- ></text>
|
|
|
+ class="price-btn"
|
|
|
+ @click.stop="handleShowUnitPopup(pros, proIndex)"
|
|
|
+ >重选</text
|
|
|
+ >
|
|
|
</view>
|
|
|
- <view class="price-larger">价格:¥{{ pros.price | NumFormat }}</view>
|
|
|
- </view>
|
|
|
- <view class="zuhe_price-larger zuhe_list_text">
|
|
|
- <view class="floor-item-act">
|
|
|
- <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
- <template v-if="pros.actStatus == 1">
|
|
|
- <view
|
|
|
- class="floor-tags"
|
|
|
- v-if="PromotionsFormat(pros.promotions)"
|
|
|
- >
|
|
|
- {{ pros.promotions.name
|
|
|
- }}<text>:¥{{ pros.price | NumFormat }}</text>
|
|
|
- </view>
|
|
|
- <view class="floor-tags" v-else>{{
|
|
|
- pros.promotions.name
|
|
|
- }}</view>
|
|
|
- </template>
|
|
|
- <template v-if="pros.svipProductFlag == 1">
|
|
|
- <view class="svip-tags">
|
|
|
- <view class="tags">SVIP</view>
|
|
|
- <view class="price">{{ pros.svipPriceTag }}</view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
+ <view class="zuhe_price-larger zuhe_list_text">
|
|
|
+ <view class="list-price-none" v-if="pros.repurchaseFlag == 1">
|
|
|
+ <text class="price-none">价格:¥{{ pros.originalPrice }}</text>
|
|
|
+ <text
|
|
|
+ class="iconfont icon-wenhao"
|
|
|
+ @click.stop="repurchModel"
|
|
|
+ ></text>
|
|
|
+ </view>
|
|
|
+ <view class="price-larger">价格:¥{{ pros.price | NumFormat }}</view>
|
|
|
</view>
|
|
|
- <view class="count">
|
|
|
- <view class="number-box">
|
|
|
- <view
|
|
|
- class="iconfont icon-jianhao"
|
|
|
- @click.stop="changeCountSub(item, pros)"
|
|
|
- ></view>
|
|
|
- <input
|
|
|
- class="btn-input"
|
|
|
- type="number"
|
|
|
- maxlength="6"
|
|
|
- v-model="pros.initProductNum"
|
|
|
- @blur="changeNnmber($event, item, pros)"
|
|
|
- />
|
|
|
- <view
|
|
|
- class="iconfont icon-jiahao"
|
|
|
- @click.stop="changeCountAdd(item, pros)"
|
|
|
- ></view>
|
|
|
+ <view class="zuhe_price-larger zuhe_list_text">
|
|
|
+ <view class="floor-item-act">
|
|
|
+ <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
+ <template v-if="pros.actStatus == 1">
|
|
|
+ <view
|
|
|
+ class="floor-tags"
|
|
|
+ v-if="PromotionsFormat(pros.promotions)"
|
|
|
+ >
|
|
|
+ {{ pros.promotions.name
|
|
|
+ }}<text>:¥{{ pros.price | NumFormat }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{
|
|
|
+ pros.promotions.name
|
|
|
+ }}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="pros.svipProductFlag == 1">
|
|
|
+ <view class="svip-tags">
|
|
|
+ <view class="tags">SVIP</view>
|
|
|
+ <view class="price">{{ pros.svipPriceTag }}</view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="count">
|
|
|
+ <view class="number-box">
|
|
|
+ <view
|
|
|
+ class="iconfont icon-jianhao"
|
|
|
+ @click.stop="changeCountSub(item, pros)"
|
|
|
+ ></view>
|
|
|
+ <input
|
|
|
+ class="btn-input"
|
|
|
+ type="number"
|
|
|
+ maxlength="6"
|
|
|
+ v-model="pros.initProductNum"
|
|
|
+ @blur="changeNnmber($event, item, pros)"
|
|
|
+ />
|
|
|
+ <view
|
|
|
+ class="iconfont icon-jiahao"
|
|
|
+ @click.stop="changeCountAdd(item, pros)"
|
|
|
+ ></view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="list-price-all" :style="{ overflow: 'hidden' }">
|
|
|
- <view class="price-two zuhe_list_text"
|
|
|
- >总价:<text class="zuhe_list_zj"
|
|
|
- >¥ {{ pros.totalPrice | NumFormat }}</text
|
|
|
- ></view
|
|
|
- >
|
|
|
+ <view class="list-price-all" :style="{ overflow: 'hidden' }">
|
|
|
+ <view class="price-two zuhe_list_text"
|
|
|
+ >总价:<text class="zuhe_list_zj"
|
|
|
+ >¥ {{ pros.totalPrice | NumFormat }}</text
|
|
|
+ ></view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="foot_conten">
|
|
|
- <view class="zuhe_foot-box">
|
|
|
- <view class="">
|
|
|
- <text>种类:{{ item.productKind }}</text>
|
|
|
- <text>总数:{{ item.productTotalNum }}</text>
|
|
|
+ <view class="foot_conten">
|
|
|
+ <view class="zuhe_foot-box">
|
|
|
+ <view class="">
|
|
|
+ <text>种类:{{ item.productKind }}</text>
|
|
|
+ <text>总数:{{ item.productTotalNum }}</text>
|
|
|
+ </view>
|
|
|
+ <text
|
|
|
+ >总额:<text class="foot_text">{{
|
|
|
+ item.productTotalAmount | NumFormat
|
|
|
+ }}</text></text
|
|
|
+ >
|
|
|
</view>
|
|
|
- <text
|
|
|
- >总额:<text class="foot_text">{{
|
|
|
- item.productTotalAmount | NumFormat
|
|
|
- }}</text></text
|
|
|
- >
|
|
|
+ <button type="default" class="buycart" @click.stop="operationHanld(item)">
|
|
|
+ 加入购物车
|
|
|
+ </button>
|
|
|
</view>
|
|
|
- <button type="default" class="buycart" @click.stop="operationHanld(item)">
|
|
|
- 加入购物车
|
|
|
- </button>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
|
|
|
- <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
|
|
|
- >{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
|
|
|
- >
|
|
|
- <view class="loading-wrapper loading-wrapper-btm" v-else
|
|
|
- >———<text class="btm-text">已至底部</text>———</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
+ <view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
|
|
|
+ <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
|
|
|
+ >{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
|
|
|
+ >
|
|
|
+ <view class="loading-wrapper loading-wrapper-btm" v-else
|
|
|
+ >———<text class="btm-text">已至底部</text>———</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
<!-- 组合商品规格弹窗 -->
|
|
|
<cmUnitSupporPopup
|
|
|
v-if="popupShow"
|
|
@@ -255,6 +257,7 @@
|
|
|
></cmUnitSupporPopup>
|
|
|
<!-- 可拖动悬浮按钮 -->
|
|
|
<cm-drag
|
|
|
+ v-if="!showSkeleton"
|
|
|
:cartNum="cartQuantity"
|
|
|
:isDock="true"
|
|
|
:existTabBar="true"
|
|
@@ -299,7 +302,7 @@ export default {
|
|
|
searchInputVal: '',
|
|
|
isModallayer: false,
|
|
|
windowHeight: '',
|
|
|
- showSkeleton: false,
|
|
|
+ showSkeleton: true,
|
|
|
priceLoading: true,
|
|
|
isShowEmpty: false,
|
|
|
isShowEmptyText: '搜索相关商品',
|
|
@@ -401,7 +404,6 @@ export default {
|
|
|
} else {
|
|
|
this.listData = [...resList]
|
|
|
this.getProductPrice()
|
|
|
- this.showSkeleton = false
|
|
|
}
|
|
|
// 防上拉暴滑
|
|
|
this.pullFlag = false
|
|
@@ -441,13 +443,16 @@ export default {
|
|
|
productIds: productIds,
|
|
|
source: 2
|
|
|
})
|
|
|
- .then(response => {
|
|
|
- this.listData = this.ReturnNewProducts(this.listData, response.data)
|
|
|
- this.priceLoading = false
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
- })
|
|
|
+ .then(response => {
|
|
|
+ this.listData = this.ReturnNewProducts(this.listData, response.data)
|
|
|
+ this.priceLoading = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.showSkeleton = false
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
|
+ })
|
|
|
},
|
|
|
ReturnNewProducts(Array, list) {
|
|
|
//合并字段
|