Browse Source

品牌馆滚动条信息;收藏页布局逻辑调整;活动专区轮播图

sxx
whyneedname 2 years ago
parent
commit
6c2e4c53e9
  1. 22
      api/store.js
  2. 3
      pages/activity/activity/index.vue
  3. 198
      pages/shop/GoodsCollection/index.vue
  4. 24
      pages/shop/brands/index.vue
  5. 2
      pages/user/coupon/UserCoupon/index.vue

22
api/store.js

@ -226,24 +226,13 @@ export function getBrandByName() {
login: false
});
}
// <<<<<<< HEAD
// /**
// * 添加收藏
// *
// */
// export function getUserCollection(data) {
// console.log(9999999966);
// return request.post("/collectEvaluation/add", data, {
// login: true
// });
// =======
/**
* 添加收藏
*
*/
export function getUserCollection(data) {
return request.post("/collectEvaluation/add",data);
// >>>>>>> sxx
}
/**
*
@ -262,6 +251,15 @@ export function getBrandDetail(id) {
});
}
/**
* 品牌馆滚动条信息
*/
export function getBrandNoticeInfo() {
return request.get("/brandInfo", {}, {
login: false
});
}
/**
* 词条名查询
*/

3
pages/activity/activity/index.vue

@ -16,7 +16,7 @@
<view class="banner-box">
<swiper class="swiper" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item" @click="goBannerDetail">
<image class="swiper-image " :src="item" mode="aspectFill" lazy-load>
<image class="swiper-image " :src="item.pic" mode="aspectFill" lazy-load>
</image>
</swiper-item>
</swiper>
@ -358,6 +358,7 @@
}
.banner-box {
position: relative;
width: 750rpx;
height: 488rpx;
.swiper {

198
pages/shop/GoodsCollection/index.vue

@ -13,9 +13,9 @@
</cu-custom>
</view>
<view class="content-box" :style="'height:calc(100vh - '+CustomBar+'px);'">
<view class="content">
<view class="nav acea-row row-around" :style="'top:calc('+CustomBar+'px+2px)'">
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:'+CustomBar+'px;'">
<view class="nav acea-row row-around">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">甄选商品</view>
</view>
@ -23,56 +23,50 @@
<view :class="'title ' + (navType === 1 ? 'active' : '')">甄选评测</view>
</view>
</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">
{{ item.productInfo.attrInfo.sku }}</view>
</view>
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<!-- 评测 -->
<!-- <view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<view class="left acea-row row-column-between">
<view class="acea-row row-column-between">
<view class="title"></view>
<view class="title1"></view>
<view class="title2"></view>
</view>
<view @tap.stop="goMore" class="more">
MORE
</view>
</view>
<view class="right">
<image src="../../../static/images/earth-white.png" mode=""></image>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">
{{ item.productInfo.attrInfo.sku }}</view>
</view>
</view> -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<image class="img" :src="item.homeImage" mode="aspectFill"></image>
<!-- <view class="more">
MORE
</view> -->
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)"
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
<!-- 评测 -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<image class="img" :src="item.homeImage" mode="aspectFill"></image>
<!-- <view class="more">MORE</view> -->
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)"
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
<!--暂无收藏-->
<view v-else class="noCommodity" style="padding-top:208rpx;">
<view class="noPictrue">
<image src="@/static/images/no-more.png" class="image" />
</view>
<view class="text-big">
什么都没有大概被外星人带走了
</view>
<!-- <view class="text-small">
快去领取福利优惠券吧
</view> -->
</view>
</view>
@ -283,70 +277,7 @@
}
</script>
<style lang="less" scoped>
// .review-box{
// padding: 30rpx 30rpx 20rpx 30rpx;
// width: 687rpx;
// height: 250rpx;
// border-radius: 16rpx;
// background: #F5F6F8;
// box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
// .left{
// max-width: 460rpx;
// .title{
// font-size: 36rpx;
// font-weight: 500;
// text-transform: uppercase;
// }
// .title1{
// margin: 10rpx 0 5rpx 0;
// font-size: 24rpx;
// text-transform: uppercase;
// }
// .title2{
// font-size: 28rpx;
// }
// .more{
// font-size: 24rpx;
// position: relative;
// }
// .more::before{
// position: absolute;
// border-bottom: 1rpx solid black;
// bottom: -8rpx;
// left: -4rpx;
// content: '';
// width: 100rpx;
// background-color: black;
// height: 1rpx;
// }
// .more::after{
// margin-left: 10rpx;
// content: '';
// display: inline-block;
// width: 0;
// height: 0;
// border-top: 10rpx solid transparent;
// border-left: 10rpx solid black;
// border-bottom: 10rpx solid transparent;
// border-right: 10rpx solid transparent;
// }
// }
// .right{
// image{
// width: 200rpx;
// height: 100%;
// }
// }
// }
.review-box {
// padding: 30rpx 30rpx 20rpx 30rpx;
// width: 687rpx;
// height: 240rpx;
border-radius: 16rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
@ -417,10 +348,10 @@
}
}
.content-box {
padding-top: 4rpx;
width: 100vw;
position: relative;
// .content-box {
// padding-top: 4rpx;
// width: 100vw;
// position: relative;
.content {
width: 100%;
@ -428,15 +359,20 @@
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.nav {
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
position: fixed;
left: 0;
z-index: 5;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
@ -478,7 +414,7 @@
}
}
}
}
// }
.info-box {
width: 686rpx;
@ -505,7 +441,10 @@
line-height: 46rpx;
}
}
.collectionGoods {
padding-top: 114rpx;
}
.collectionGoods .item .delete {
position: absolute;
top: 0;
@ -528,4 +467,29 @@
height: 240rpx !important;
line-height: 240rpx !important;
}
.noCommodity{
.noPictrue{
width: 428rpx;
height: 526rpx;
}
.text-big{
padding: 0 30rpx;
text-align: center;
font-family: PingFangSC-Medium, PingFang SC;
font-style: 36rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.text-small{
padding: 0 80rpx;
font-family: PingFangSC-Medium, PingFang SC;
text-align: center;
font-style: 28rpx;
font-weight: 400;
color: #3A3A3C;
line-height: 40rpx;
}
}
</style>

24
pages/shop/brands/index.vue

@ -30,16 +30,16 @@
</view>
</view>
<view class="notice-box acea-row row-middle">
<view class="notice-box acea-row row-middle" v-if="noticeInfo.info">
<view class="title">
<image src="../../../static/images/yanjie-logo.png" mode=""></image>
</view>
<view class="min-title acea-row row-between-wrapper">
<view class="">选品标准</view>
<view class="">{{noticeInfo.title}}</view>
<image src="../../../static/images/laba.png" mode="aspectFill"></image>
</view>
<view class="uni-notice-bar-box">
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="60" text="热花今将机支物极十争才线来理始"></uni-notice-bar>
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="50" :text="noticeInfo.info"></uni-notice-bar>
</view>
</view>
@ -97,7 +97,7 @@
<script>
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import { getBrands, getProducts ,getBanner} from '@/api/store';
import { getBrands, getProducts ,getBanner, getBrandNoticeInfo} from '@/api/store';
import Loading from '@/components/Loading';
export default {
components: {
@ -108,6 +108,10 @@
return {
currents: 0,
imgUrls: [],
noticeInfo: {
title: '',
info: ''
},
brandList: [],
where: {
page: 1,
@ -125,11 +129,13 @@
onLoad() {
this.getBrandList();
this.getNewProducts();
getBanner(1).then(
res => {
this.$set(this,'imgUrls',res.data.banner)
})
getBanner(1).then(res => {
this.$set(this,'imgUrls',res.data.banner)
})
getBrandNoticeInfo().then(res => {
this.noticeInfo.title = res.data.title;
this.noticeInfo.info = res.data.info;
})
},
onReachBottom() {
!this.loading && this.getNewProducts();

2
pages/user/coupon/UserCoupon/index.vue

@ -14,7 +14,7 @@
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:calc('+CustomBar+'px)'">
<view class="nav-box" :style="'top:'+CustomBar+'px'">
<view class="nav acea-row row-around">
<view class="item" @click="setType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">待领取</view>

Loading…
Cancel
Save