Browse Source

2023-02-14

master
guoxing 2 years ago
parent
commit
4ac17b52d7
  1. 319
      mallplusui-uniapp-app2/pages/index/index.vue
  2. 10
      mallplusui-uniapp-app2/pagesA/product/product.vue

319
mallplusui-uniapp-app2/pages/index/index.vue

@ -187,74 +187,81 @@
</scroll-view>
</view>
<!-- 新品推荐 -->
<view v-if='homeNewProductList && homeNewProductList.length>0' class="f-header m-t"
@click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">新品推荐</text>
<!-- 新品推荐 -->
<view v-if='homeNewProductList && homeNewProductList.length>0' class="f-header m-t"
@click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">新品推荐</text>
</view>
<text class="yticon icon-you"></text>
</view>
<text class="yticon icon-you"></text>
</view>
<view class="guess-section">
<view v-for="(item, index) in homeNewProductList" :key="index" class="guess-item"
@click="navToDetailPage1(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
<view class="guess-section">
<view v-for="(item, index) in homeNewProductList" :key="index" class="guess-item"
@click="navToDetailPage1(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
</view>
<text class="title clamp">{{ item.productName }}</text>
<view>
<text class="price">惠农价{{ item.price }}</text>
<text class="m-price"> 县区商超价{{ item.price }}</text>
</view>
</view>
<text class="title clamp">{{ item.productName }}</text>
<text class="price">{{ item.price }}</text>
</view>
</view>
<!-- 人气推荐 -->
<view v-if='homeRecommendProductList && homeRecommendProductList.length>0' class="f-header m-t"
@click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">人气推荐</text>
<!-- 人气推荐 -->
<view v-if='homeRecommendProductList && homeRecommendProductList.length>0' class="f-header m-t"
@click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">人气推荐</text>
</view>
<text class="yticon icon-you"></text>
</view>
<text class="yticon icon-you"></text>
</view>
<view class="guess-section">
<view v-for="(item, index) in homeRecommendProductList" :key="index" class="guess-item"
@click="navToDetailPage1(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
<view class="guess-section">
<view v-for="(item, index) in homeRecommendProductList" :key="index" class="guess-item"
@click="navToDetailPage1(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
</view>
<text class="title clamp">{{ item.name }}</text>
<view>
<text class="price">惠农价{{ item.price }}</text>
<text class="m-price">县区商超价{{ item.price }}</text>
</view>
</view>
<text class="title clamp">{{ item.name }}</text>
<text class="price">{{ item.price }}</text>
</view>
</view>
<!-- 新品上市 -->
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">新品上市</text>
<!-- 新品上市 -->
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')">
<image src="/static/temp/h1.png"></image>
<view class="tit-box">
<text class="tit">新品上市</text>
</view>
<text class="yticon icon-you"></text>
</view>
<text class="yticon icon-you"></text>
</view>
<view class="guess-section">
<view v-for="(item, index) in newProductList" :key="index" class="guess-item"
@click="navToDetailPage(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
<view class="guess-section">
<view v-for="(item, index) in newProductList" :key="index" class="guess-item"
@click="navToDetailPage(item)">
<view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image>
</view>
<text class="title clamp">{{ item.name }}</text>
<text class="label">{{ item.storeName }}</text>
<text class="price">惠农价{{ item.price }}</text>
</view>
<text class="title clamp">{{ item.name }}</text>
<text class="price">{{ item.price }}</text>
<text>{{ item.storeName }}</text>
<uni-load-more :status="loadingType"></uni-load-more>
</view>
<uni-load-more :status="loadingType"></uni-load-more>
<!-- <mallplusCopyright></mallplusCopyright> -->
</view>
<!-- <mallplusCopyright></mallplusCopyright> -->
</view>
</view>
</template>
<script>
@ -1027,6 +1034,13 @@
.price {
color: $uni-color-primary;
}
.m-price {
font-size: $font-sm + 2upx;
text-decoration: line-through;
color: $font-color-light;
margin-left: 8upx;
}
}
}
@ -1147,192 +1161,6 @@
}
}
/* 分类推荐楼层 */
.hot-floor {
width: 100%;
overflow: hidden;
margin-bottom: 20upx;
.floor-img-box {
width: 100%;
height: 320upx;
position: relative;
&:after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
}
}
.floor-img {
width: 100%;
height: 100%;
}
.floor-list {
white-space: nowrap;
padding: 20upx;
padding-right: 50upx;
border-radius: 6upx;
margin-top: -140upx;
margin-left: 30upx;
background: #fff;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 1;
}
.scoll-wrapper {
display: flex;
align-items: flex-start;
}
.floor-item {
width: 180upx;
margin-right: 20upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
line-height: 1.8;
image {
width: 180upx;
height: 180upx;
border-radius: 6upx;
}
.price {
color: $uni-color-primary;
}
}
.more {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
flex-shrink: 0;
width: 180upx;
height: 180upx;
border-radius: 6upx;
background: #f3f3f3;
font-size: $font-base;
color: $font-color-light;
text:first-child {
margin-bottom: 4upx;
}
}
}
/* 单条商品 */
.goods-box-single {
display: flex;
padding: 20upx 0;
.goods-img {
display: block;
width: 120upx;
height: 120upx;
}
.right {
flex: 1;
display: flex;
flex-direction: column;
padding: 0 30upx 0 24upx;
overflow: hidden;
.title {
font-size: $font-base + 2upx;
color: $font-color-dark;
line-height: 1;
}
.attr-box {
font-size: $font-sm + 2upx;
color: $font-color-light;
padding: 10upx 12upx;
}
.price {
font-size: $font-base + 2upx;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
margin: 0 2upx 0 8upx;
}
}
}
}
.price-box {
display: flex;
justify-content: flex-end;
align-items: baseline;
padding: 20upx 30upx;
font-size: $font-sm + 2upx;
color: $font-color-light;
.num {
margin: 0 8upx;
color: $font-color-dark;
}
.price {
font-size: $font-lg;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
margin: 0 2upx 0 8upx;
}
}
}
.action-box {
display: flex;
justify-content: flex-end;
align-items: center;
height: 100upx;
position: relative;
padding-right: 30upx;
}
.action-btn {
width: 160upx;
height: 60upx;
margin: 0;
margin-left: 24upx;
padding: 0;
text-align: center;
line-height: 60upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
background: #fff;
border-radius: 100px;
&:after {
border-radius: 100px;
}
&.recom {
background: #fff9f9;
color: $base-color;
&:after {
border-color: #f7bcc8;
}
}
}
/* 猜你喜欢 */
.guess-section {
display: flex;
@ -1370,12 +1198,25 @@
line-height: 80upx;
}
.label {
margin-top: -10upx;
font-size: 30upx;
margin-left: -13upx;
}
.price {
font-size: $font-lg;
font-size: 18px;
color: $uni-color-primary;
line-height: 1;
}
.m-price {
font-size: $font-sm + 2upx;
text-decoration: line-through;
color: $font-color-light;
margin-left: 8upx;
}
.coupon_box {
width: 100%;
height: auto;

10
mallplusui-uniapp-app2/pagesA/product/product.vue

@ -11,12 +11,12 @@
<view class="introduce-section">
<text class="title">{{ goods.name }}</text>
<view class="price-box">
<text class="price-tip">¥</text>
<text class="price" v-if="goods.vipPrice && goods.vipPrice > 0">{{ (goods.price * goods.memberRate) / 10 }}</text>
<text class="price" v-else-if="!goods.vipPrice">{{ goods.price }}</text>
<text class="m-price" v-if="!goods.vipPrice">¥{{ goods.originalPrice }}</text>
<!-- <text class="price-tip">惠农价</text> -->
<text class="price" v-if="goods.vipPrice && goods.vipPrice > 0">惠农价¥{{ (goods.price * goods.memberRate) / 10 }}</text>
<text class="price" v-else-if="!goods.vipPrice">惠农价¥{{ goods.price }}</text>
<text class="m-price" v-if="!goods.vipPrice">县区商超价{{ goods.originalPrice }}</text>
<text class="m-price" v-else-if="goods.vipPrice && goods.vipPrice > 0">¥{{ goods.price }}</text>
<text class="price" v-if="goods.isFenxiao == 1 && goods.fenxiaoPrice > 0">佣金 ¥{{ goods.fenxiaoPrice }}</text>
<text class="price">优惠¥{{ goods.originalPrice- goods.price }}</text>
<text class="coupon-tip" v-if="goods.memberRate && goods.memberRate != 10">会员折扣{{ goods.memberRate }}</text>
</view>
<view class="bot-row">

Loading…
Cancel
Save