|
@@ -1,68 +1,116 @@
|
|
|
<template>
|
|
|
<view class="container shop clearfix" :style="{paddingTop:CustomBar+'px'}">
|
|
|
<!-- 主页内容 -->
|
|
|
- <view class="container-shop tui-skeleton">
|
|
|
- <!-- 轮播 -->
|
|
|
- <view class="shop-search">
|
|
|
- <text class="iconfont icon-sousuo"></text>
|
|
|
- <input class="input" maxlength="20" type="text" value="" v-model.trim="listQuery.keyword" confirm-type="search" @confirm="SubMitSearch()" placeholder="搜索本店铺商品" />
|
|
|
+ <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5"></tui-skeleton>
|
|
|
+ <template v-else>
|
|
|
+ <view class="shop-search-main">
|
|
|
+ <view class="shop-search">
|
|
|
+ <text class="iconfont icon-sousuo"></text>
|
|
|
+ <input class="input" maxlength="20" type="text" value="" v-model.trim="listQuery.keyword" confirm-type="search" @confirm="SubMitSearch()" placeholder="搜索本店铺商品" />
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="product-supplier" @click="goSupplier">
|
|
|
- <view class="logo"><img :src="shopLogo" alt=""></view>
|
|
|
- <view class="main">
|
|
|
- <view class="name">{{ shopName }}</view>
|
|
|
- <view class="massgs">
|
|
|
- <view class="label">满意度:</view>
|
|
|
- <view class="p-stars">
|
|
|
- <uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36" :widthInfo="176"></uni-stars>
|
|
|
- </view>
|
|
|
- <view class="acount">
|
|
|
- <text> {{ normalNum }} </text>件商品
|
|
|
+ <view class="container-shop tui-skeleton">
|
|
|
+ <!-- 轮播 -->
|
|
|
+ <view class="product-supplier" @click="goSupplier">
|
|
|
+ <view class="logo"><img :src="shopLogo" alt=""></view>
|
|
|
+ <view class="main">
|
|
|
+ <view class="name">{{ shopName }}</view>
|
|
|
+ <view class="massgs">
|
|
|
+ <view class="label">满意度:</view>
|
|
|
+ <view class="p-stars">
|
|
|
+ <uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36" :widthInfo="176"></uni-stars>
|
|
|
+ </view>
|
|
|
+ <view class="acount">
|
|
|
+ <text> {{ normalNum }} </text>件商品
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="right"><text class="iconfont icon-xiayibu"></text></view>
|
|
|
</view>
|
|
|
- <view class="right"><text class="iconfont icon-xiayibu"></text></view>
|
|
|
- </view>
|
|
|
- <banner :list="bannerImageList"></banner>
|
|
|
- </view>
|
|
|
- <view class="container-section tui-skeleton">
|
|
|
- <view class="tab-title">主推商品</view>
|
|
|
- <view class="section-product clearfix">
|
|
|
- <view class="floor-item" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.id)">
|
|
|
- <image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
|
|
|
- <view class="floor-item-content">
|
|
|
- <view class="title tui-skeleton-rect">
|
|
|
- <text class="mclap">{{item.name}}</text>
|
|
|
- </view>
|
|
|
- <view class="" v-if="hasLogin">
|
|
|
- <view v-if="userIdentity == 4">
|
|
|
- <view class="title-none" v-show="item.priceFlag == '1'">
|
|
|
- <text class="p big">¥未公开价格</text>
|
|
|
- </view>
|
|
|
- <view class="title-none" v-show="item.priceFlag == '2'">
|
|
|
- <text class="p big">¥价格仅会员可见</text>
|
|
|
- </view>
|
|
|
- <view class="price tui-skeleton-rect" v-show="item.priceFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
- <text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <banner :list="bannerImageList"></banner>
|
|
|
+ </view>
|
|
|
+ <view class="container-section tui-skeleton" v-if="recommendList.length > 0">
|
|
|
+ <view class="tab-title">主推商品</view>
|
|
|
+ <view class="section-product clearfix">
|
|
|
+ <view class="floor-item" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.id)">
|
|
|
+ <image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
|
|
|
+ <view class="floor-item-content">
|
|
|
+ <view class="title tui-skeleton-rect">
|
|
|
+ <text class="mclap">{{item.name}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="" v-if="hasLogin">
|
|
|
+ <template v-if="userIdentity == 4">
|
|
|
+ <view class="title-none" v-show="item.priceFlag == '1'">
|
|
|
+ <text class="p big">¥未公开价格</text>
|
|
|
+ </view>
|
|
|
+ <view class="title-none" v-show="item.priceFlag == '2'">
|
|
|
+ <text class="p big">¥价格仅会员可见</text>
|
|
|
+ </view>
|
|
|
+ <view class="price tui-skeleton-rect" v-show="item.priceFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-if="userIdentity == 3">
|
|
|
+ <template v-if="item.supplierId == shopId">
|
|
|
+ <view class="title-none" v-if="item.p_price_flag == '1'">
|
|
|
+ <text class="p big">未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
- </template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
- <view class="floor-tags">阶梯价格</view>
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="no-price">
|
|
|
+ <view class="p-stars">
|
|
|
+ <text class="p-no">¥</text>
|
|
|
+ <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="title-none" v-if="item.priceFlag == '1'">
|
|
|
+ <text class="p big">未公开价格</text>
|
|
|
+ </view>
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
- <view v-else>
|
|
|
- <view class="title-none" v-if="item.priceFlag == '1'">
|
|
|
- <text class="p big">未公开价格</text>
|
|
|
- </view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
- <text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <view v-else class="no-price">
|
|
|
+ <view class="p-stars">
|
|
|
+ <text class="p-no">¥</text>
|
|
|
+ <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
<template v-if="item.actStatus==1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
{{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
@@ -73,87 +121,103 @@
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view v-else class="no-price">
|
|
|
- <view class="p-stars">
|
|
|
- <text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
- </view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
- </template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
- <view class="floor-tags">阶梯价格</view>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="container-section tui-skeleton">
|
|
|
- <view class="tab-title">全部商品</view>
|
|
|
- <view class="section-product clearfix">
|
|
|
- <view class="floor-item" v-for="(item, index) in productList" :key="index" @click.stop="navToDetailPage(item.p_id)">
|
|
|
- <image class="item-img tui-skeleton-fillet" :src="item.p_image" mode="aspectFill"></image>
|
|
|
- <view class="floor-item-content">
|
|
|
- <view class="title tui-skeleton-rect">
|
|
|
- <text class="mclap">{{item.p_name}}</text>
|
|
|
- </view>
|
|
|
- <view class="" v-if="hasLogin">
|
|
|
- <view v-if="userIdentity == 4">
|
|
|
- <view class="title-none" v-show="item.p_price_flag == '1'">
|
|
|
- <text class="p big">¥未公开价格</text>
|
|
|
- </view>
|
|
|
- <view class="title-none" v-show="item.p_price_flag == '2'">
|
|
|
- <text class="p big">¥价格仅会员可见</text>
|
|
|
- </view>
|
|
|
- <view class="price tui-skeleton-rect" v-show="item.p_price_flag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
- <text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
- </view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
- </template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
- <view class="floor-tags">阶梯价格</view>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
+ <view class="container-section tui-skeleton">
|
|
|
+ <view class="tab-title">全部商品</view>
|
|
|
+ <view class="section-product clearfix">
|
|
|
+ <view class="floor-item-none" v-if="isEmpty">
|
|
|
+ <text>暂无数据~</text>
|
|
|
+ </view>
|
|
|
+ <view v-else class="floor-item" v-for="(item, index) in productList" :key="index" @click.stop="navToDetailPage(item.p_id)">
|
|
|
+ <image class="item-img tui-skeleton-fillet" :src="item.p_image" mode="aspectFill"></image>
|
|
|
+ <view class="floor-item-content">
|
|
|
+ <view class="title tui-skeleton-rect">
|
|
|
+ <text class="mclap">{{item.p_name}}</text>
|
|
|
</view>
|
|
|
- <view v-else>
|
|
|
- <view class="title-none" v-if="item.p_price_flag == '1'">
|
|
|
- <text class="p big">未公开价格</text>
|
|
|
- </view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
- <text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <view class="" v-if="hasLogin">
|
|
|
+ <template v-if="userIdentity == 4">
|
|
|
+ <view class="title-none" v-show="item.p_price_flag == '1'">
|
|
|
+ <text class="p big">¥未公开价格</text>
|
|
|
+ </view>
|
|
|
+ <view class="title-none" v-show="item.p_price_flag == '2'">
|
|
|
+ <text class="p big">¥价格仅会员可见</text>
|
|
|
+ </view>
|
|
|
+ <view class="price tui-skeleton-rect" v-show="item.p_price_flag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-if="userIdentity == 3">
|
|
|
+ <template v-if="item.supplierId == shopId">
|
|
|
+ <view class="title-none" v-if="item.p_price_flag == '1'">
|
|
|
+ <text class="p big">未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
- </template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
- <view class="floor-tags">阶梯价格</view>
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="no-price">
|
|
|
+ <view class="p-stars">
|
|
|
+ <text class="p-no">¥</text>
|
|
|
+ <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="title-none" v-if="item.p_price_flag == '1'">
|
|
|
+ <text class="p big">未公开价格</text>
|
|
|
+ </view>
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <text class="p sm">¥</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <template v-if="item.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
+ <view v-else class="no-price">
|
|
|
+ <view class="p-stars">
|
|
|
+ <text class="p-no">¥</text>
|
|
|
+ <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view v-else class="no-price">
|
|
|
- <view class="p-stars">
|
|
|
- <text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
<!-- 侧边 -->
|
|
|
<scroll-top v-if="isScrollTop"></scroll-top>
|
|
|
</view>
|
|
@@ -173,6 +237,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
userID:0,
|
|
|
+ supplierId:0,
|
|
|
shopId:0,
|
|
|
iconClass:'icon-aixin',
|
|
|
iconColor:'#ff9100',
|
|
@@ -180,9 +245,12 @@
|
|
|
shopName:'',
|
|
|
shopLogo:'',
|
|
|
normalNum:0,
|
|
|
+ isEmpty:false,
|
|
|
+ skeletonShow: true,
|
|
|
bannerImageList:[],
|
|
|
recommendList:[],
|
|
|
productList:[],
|
|
|
+ userIdentity:'',
|
|
|
listQuery:{
|
|
|
keyword: '',
|
|
|
pageSize: 10,
|
|
@@ -193,10 +261,15 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- this.listQuery.id = this.shopId = option.shopId
|
|
|
- console.log(this.shopId)
|
|
|
- console.log(this.listQuery.id)
|
|
|
- this.InitShopDataInfo()
|
|
|
+ this.listQuery.id = this.supplierId = option.shopId
|
|
|
+ this.$api.getStorage().then((resolve) =>{
|
|
|
+ this.shopId = resolve.shopID
|
|
|
+ this.userID = resolve.userID
|
|
|
+ this.userIdentity = resolve.userIdentity
|
|
|
+ this.InitShopDataInfo()
|
|
|
+ }).catch( error =>{
|
|
|
+ this.InitShopDataInfo()
|
|
|
+ })
|
|
|
},
|
|
|
filters: {
|
|
|
NumFormat:function(text) {//处理金额
|
|
@@ -213,16 +286,17 @@
|
|
|
this.GetSupplierHomeDeatils()
|
|
|
this.GetSupplierHomeProduct()
|
|
|
this.GetSupplierHomeProductList()
|
|
|
+ this.skeletonShow =false
|
|
|
},
|
|
|
GetSupplierHomeBanner(){//轮播图
|
|
|
- this.ShopService.GetSupplierHomeBanner({supplierId:this.shopId}).then(response =>{
|
|
|
+ this.ShopService.GetSupplierHomeBanner({supplierId:this.supplierId}).then(response =>{
|
|
|
this.bannerImageList = response.data;
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
})
|
|
|
},
|
|
|
GetSupplierHomeDeatils(){//商铺详情
|
|
|
- this.ShopService.GetSupplierHomeDeatils({supplierId:this.shopId}).then(response =>{
|
|
|
+ this.ShopService.GetSupplierHomeDeatils({supplierId:this.supplierId}).then(response =>{
|
|
|
let data = response.data
|
|
|
this.normalNum = data.normalNum
|
|
|
this.shopName = data.name
|
|
@@ -232,7 +306,7 @@
|
|
|
})
|
|
|
},
|
|
|
GetSupplierHomeProduct(){//主推商品
|
|
|
- this.ShopService.GetSupplierHomeProduct({supplierId:this.shopId}).then(response =>{
|
|
|
+ this.ShopService.GetSupplierHomeProduct({supplierId:this.supplierId}).then(response =>{
|
|
|
let data = response.data
|
|
|
this.QueryProductPrice(data)
|
|
|
}).catch(error =>{
|
|
@@ -245,8 +319,13 @@
|
|
|
let dataList = data.items
|
|
|
console.log(data)
|
|
|
this.total = data.total
|
|
|
- this.productList = dataList
|
|
|
- this.QueryProductPrice1(this.productList)
|
|
|
+ if(this.total>0){
|
|
|
+ this.isEmpty = false
|
|
|
+ this.productList = dataList
|
|
|
+ this.QueryProductPrice1(this.productList)
|
|
|
+ }else{
|
|
|
+ this.isEmpty = true
|
|
|
+ }
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
})
|
|
@@ -314,13 +393,23 @@
|
|
|
return NewArray
|
|
|
},
|
|
|
SubMitSearch() {//搜索
|
|
|
- if (this.searchInputVal == '') {
|
|
|
+ if (this.listQuery.keyword == '') {
|
|
|
this.$util.msg('请输入商品关键词',2000);
|
|
|
- }else{
|
|
|
- this.listQuery.pageNum = 1
|
|
|
- this.GetSupplierHomeProductList()
|
|
|
+ return
|
|
|
}
|
|
|
- },
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.GetSupplierHomeProductList()
|
|
|
+ },
|
|
|
+ PromotionsFormat(promo){//促销活动类型数据处理
|
|
|
+ if(promo!=null){
|
|
|
+ if(promo.type == 1 && promo.mode == 1){
|
|
|
+ return true
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
goSupplier(){//跳供应商资料页
|
|
|
this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.shopId)
|
|
|
},
|
|
@@ -362,40 +451,50 @@
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
}
|
|
|
- .container-shop{
|
|
|
+ .shop-search-main{
|
|
|
width: 100%;
|
|
|
- height: auto;
|
|
|
- padding:24rpx;
|
|
|
- box-sizing: border-box;
|
|
|
+ height: 86rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
- }
|
|
|
- .shop-search{
|
|
|
- width: 100%;
|
|
|
- height: 66rpx;
|
|
|
- border-radius: 33rpx;
|
|
|
- background-color: #F7F7F7;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 0 20rpx;
|
|
|
- .icon-sousuo{
|
|
|
- width: 60rpx;
|
|
|
- height: 66rpx;
|
|
|
- display: block;
|
|
|
- float: left;
|
|
|
- color: #707070;
|
|
|
- line-height: 66rpx;
|
|
|
- text-align: center;
|
|
|
- font-size: 36rpx;
|
|
|
- }
|
|
|
- .input{
|
|
|
- width: 600rpx;
|
|
|
+ padding:10rpx 24rpx;
|
|
|
+ position: fixed;
|
|
|
+ top:0;
|
|
|
+ left: 0;
|
|
|
+ z-index: 999;
|
|
|
+ .shop-search{
|
|
|
+ width: 100%;
|
|
|
height: 66rpx;
|
|
|
+ border-radius: 33rpx;
|
|
|
+ background-color: #F7F7F7;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 0 20rpx;
|
|
|
- color: #666666;
|
|
|
- overflow: hidden;
|
|
|
- font-size: $font-size-24;
|
|
|
+ .icon-sousuo{
|
|
|
+ width: 80rpx;
|
|
|
+ height: 66rpx;
|
|
|
+ display: block;
|
|
|
+ float: left;
|
|
|
+ color: #707070;
|
|
|
+ line-height: 66rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 36rpx;
|
|
|
+ }
|
|
|
+ .input{
|
|
|
+ width: 580rpx;
|
|
|
+ height: 66rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #666666;
|
|
|
+ overflow: hidden;
|
|
|
+ font-size: $font-size-24;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ .container-shop{
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ padding:24rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ margin-top: 96rpx;
|
|
|
+ }
|
|
|
.product-supplier{
|
|
|
width: 100%;
|
|
|
height: 140rpx;
|
|
@@ -481,6 +580,15 @@
|
|
|
.section-product{
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
+ .floor-item-none{
|
|
|
+ min-height: 300rpx;
|
|
|
+ line-height: 300rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: $font-size-28;
|
|
|
+ color: #999999;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ }
|
|
|
.floor-item{
|
|
|
width: 341rpx;
|
|
|
height: auto;
|
|
@@ -493,7 +601,7 @@
|
|
|
margin-bottom: 20rpx;
|
|
|
float: left;
|
|
|
box-sizing: border-box;
|
|
|
- padding-bottom: 16rpx;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
&:nth-child(2n){
|
|
|
margin-right: 0;
|
|
|
}
|
|
@@ -516,23 +624,24 @@
|
|
|
box-sizing: border-box;
|
|
|
padding: 16rpx 0;
|
|
|
margin-top: 8rpx;
|
|
|
- .floor-tags{
|
|
|
- float: left;
|
|
|
- height: 36rpx;
|
|
|
- border-radius: 4rpx;
|
|
|
- background-color: rgba(225, 86, 22, 0.1);
|
|
|
- line-height: 36rpx;
|
|
|
- color: $color-system;
|
|
|
- text-align: center;
|
|
|
- display: inline-block;
|
|
|
- padding:0 16rpx;
|
|
|
- font-size: $font-size-20;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .floor-tags{
|
|
|
+ height: 36rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ line-height: 36rpx;
|
|
|
+ color: $color-system;
|
|
|
+ text-align: center;
|
|
|
+ display: inline-block;
|
|
|
+ padding:0 16rpx;
|
|
|
+ font-size: $font-size-20;
|
|
|
+ margin-left: 15rpx;
|
|
|
+ border: 1px solid #E15616;
|
|
|
}
|
|
|
.title-none{
|
|
|
font-size: $font-size-26;
|
|
|
color: #FF2A2A;
|
|
|
- line-height: 44rpx;
|
|
|
+ line-height: 70rpx;
|
|
|
.btn{
|
|
|
display: inline-block;
|
|
|
float: right;
|
|
@@ -552,10 +661,10 @@
|
|
|
height: 72rpx;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- margin-bottom: 10rpx;
|
|
|
+ margin-bottom: 15rpx;
|
|
|
.mclap{
|
|
|
width: 100%;
|
|
|
- line-height: 36rpx;
|
|
|
+ line-height:40rpx;
|
|
|
text-overflow:ellipsis;
|
|
|
display: -webkit-box;
|
|
|
word-break: break-all;
|
|
@@ -577,13 +686,12 @@
|
|
|
float: left;
|
|
|
}
|
|
|
.p-stars{
|
|
|
- width: 230rpx;
|
|
|
float: left;
|
|
|
}
|
|
|
}
|
|
|
.price{
|
|
|
color: #FF2A2A;
|
|
|
- line-height: 44rpx;
|
|
|
+ line-height:70rpx;
|
|
|
&.none{
|
|
|
text-decoration: line-through;
|
|
|
color: #999999;
|