zhengjinyi 4 vuotta sitten
vanhempi
commit
9a97ed0598
3 muutettua tiedostoa jossa 134 lisäystä ja 34 poistoa
  1. 85 18
      h5/pages/other/brand.vue
  2. 2 0
      pages/goods/good-floor.vue
  3. 47 16
      pages/tabBar/category/index.vue

+ 85 - 18
h5/pages/other/brand.vue

@@ -4,14 +4,24 @@
 			<image :class="'banner-img'+index" :src="item" mode="" v-for="(item,index) in image1" :key="index"></image>
 		</view>	
 		<view class="banner" :style="{paddingBottom :isIphoneX ? '120rpx' : '60rpx'}" v-if="isBannerOems">
-			<image :class="'banner-imgs'+index+1" :src="item" mode="" v-for="(item,index) in image2" :key="index"></image>
-		</view>	
-		<view class="banner three" :style="{paddingBottom :isIphoneX ? '120rpx' : '60rpx'}" v-if="isBannerOhtr">
-			<image :src="banner" mode=""></image>
+			<image :class="'banner-imgs'+(index+1)" :src="item" mode="" v-for="(item,index) in image2" :key="index"></image>
 		</view>	
 		<view class="container-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '34rpx'}">
-			<view class="btn" @click="NavToH5Page">申请维修</view>
+			<view class="btn" @click="NavToH5Page(1)">
+				<view class="btn-text small">BRAND OEM SERVICE</view>
+				<view class="btn-text">品牌OEM服务</view>
+			</view>
+			<view class="btn" @click="NavToH5Page(2)" v-if="isBannerHome">
+				<view class="btn-text small">KNOW MORE ABOUT CAIMEI365</view>
+				<view class="btn-text">查看更多</view>
+			</view>
+			<view class="btn" @click="NavToH5Page(3)" v-if="isBannerOems">
+				<view class="btn-text">BACK</view>
+				<view class="btn-text">返回首页</view>
+			</view>
 		</view>
+		<!-- 侧边 -->
+		<scroll-top :isScrollTop="isScrollTop" :bottom="300"></scroll-top>
 	</view>
 </template> 
 
@@ -24,8 +34,6 @@
 				isIphoneX:this.$store.state.isIphoneX,
 				isBannerHome:true,
 				isBannerOems:false,
-				isBannerOhtr:false,
-				banner:'https://img.caimei365.com/group1/M00/03/82/Cmis214EJ4KANeefABcT34GgAI8964.jpg',
 				image1:[
 					'https://www.caimei365.com//img/investment/h5_1.jpg',
 					'https://www.caimei365.com//img/investment/h5_2.jpg',
@@ -34,17 +42,37 @@
 				image2:[
 					'https://www.caimei365.com//img/investment/h5_4.jpg',
 					'https://www.caimei365.com//img/investment/h5_5.jpg'
-				]
-			}
+				],
+				isScrollTop:false
+			} 
 		},
 		onLoad(option) {
 			
 		},
 		methods:{
-			NavToH5Page() {//跳转H5超皮秒防伪查询
-				 this.$api.navigateTo(`/h5/pages/article/page?linkType=101`)
+			NavToH5Page(index) {//跳转H5超皮秒防伪查询
+				switch(index){
+					case 1:
+						this.$api.navigateTo(`/h5/pages/activity/activity?id=223`)
+						break;
+					case 2:
+						this.isBannerHome = false
+						this.isBannerOems = true
+						break;
+					case 3:
+						this.isBannerHome = true
+						this.isBannerOems = false
+						break;
+				}
 			}
 		},
+		onPageScroll(e){//实时获取到滚动的值
+			if(e.scrollTop>400){
+				this.isScrollTop = true
+			}else{
+				this.isScrollTop = false
+			}	
+		},
 		onShow() {
 			
 		}
@@ -64,28 +92,67 @@
 			padding: 7rpx 24rpx;
 			background-color: #FFFFFF;
 			position: fixed;
+			display: flex;
 			bottom: 0;
 			left: 0;
 			z-index: 999;
 			.btn{
-				width: 100%;
-				height: 100%;
-				background-image: $btn-confirm;
+				flex: 1;
+				background-image: linear-gradient(270deg, #1045e1 0%, #2bb4ff 100%);
 				line-height: 84rpx;
 				border-radius: 42rpx;
 				text-align: center;
 				font-size: 26rpx;
 				color: #FFFFFF;
+				padding: 13rpx;
+				box-sizing:border-box;
+				margin: 0 10rpx;
+				.btn-text{
+					width: 100%;
+					height: 29rpx;
+					float: left;
+					line-height: 29rpx;
+					font-size: $font-size-24;
+					color: #FFFFFF;
+					text-align: center;
+					&.small{
+						font-size: 18rpx;
+					}
+				}
 			}
 		}
 		.banner{
-			width: 702rpx;
+			width: 100%;
 			height: auto;
 			float: left;
-			padding: 0 24rpx;
-			image{
+			.banner-img0{
+				width: 100%;
+				height: 1817rpx;
+				display: block;
+			}
+			.banner-img1{
+				width: 100%;
+				height: 2677rpx;
+				display: block;
+			}
+			.banner-img2{
+				width: 100%;
+				height: 1678rpx;
+				display: block;
+			}
+			.banner-imgs1{
+				width: 100%;
+				height: 2403rpx;
+				display: block;
+			}
+			.banner-imgs2{
+				width: 100%;
+				height: 1077rpx;
+				display: block;
+			}
+			.banner-img4{
 				width: 100%;
-				height: auto;
+				height: 2500rpx;
 				display: block;
 			}
 		}

+ 2 - 0
pages/goods/good-floor.vue

@@ -42,10 +42,12 @@
 				pageList:pageList,//楼层
 				isRequest:false,
 				isScrollTop:false,
+				linkId:'',
 			}
 		},
 		onLoad(option) {
 			console.log(option)
+			this.linkId = option.linkId
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
 				this.userID = resolve.userID ? resolve.userID : 0;

+ 47 - 16
pages/tabBar/category/index.vue

@@ -14,20 +14,29 @@
 			</scroll-view>
 			<!--右侧子导航-->
 			<scroll-view  scroll-y="true" class="right-aside" :style="{top:(CustomBar+38)+'px',height:(windowHeight-CustomBar+38)+'px'}">
-				<view class="category" v-if="n.smalltypeList.length > 0" v-for="(n,index) in categoryList" :key="index" v-show="index==showCategoryIndex" >
-					<view class="category-box" v-for="(o,oIndex) in n.smalltypeList" :key="oIndex">
-						<view class="title">{{o.name}}</view>
-						<view class="list" v-if="o.tinytypeList.length > 0">
-							<view class="box" v-for="(pro,proIndex) in o.tinytypeList" :key="proIndex" @click.stop="navToListPage(pro,proIndex)">
+				<view class="category" v-if="first.smalltypeList.length > 0" v-for="(first,index) in categoryList" :key="index" v-show="index==showCategoryIndex" >
+					<view class="category-box" v-for="(small,oIndex) in n.smalltypeList" :key="oIndex">
+						<view class="title">{{small.name}}</view>
+						<view class="list" v-if="small.tinytypeList.length > 0">
+							<view class="box" v-for="(pro,proIndex) in small.tinytypeList" :key="proIndex" @click.stop="navToListPage(pro,3)">
 								<image :src="pro.icon"></image>
 								<view class="text">{{pro.name}}</view>
 							</view>
 						</view>
 						<view v-else class="no-data">
-							该栏目暂无分类~
+							<view class="box" @click.stop="navToListPage(first,1)">
+								<image src="https://static-b.caimei365.com/app/img/icon/icon-noneproduct.jpg"></image>
+								<view class="text">全部商品</view>
+							</view>
 						</view>
 					</view>
 				</view>
+				<view v-else class="no-data">
+					<view class="box" @click.stop="navToListPage(small,2)">
+						<image src="https://static-b.caimei365.com/app/img/icon/icon-noneproduct.jpg"></image>
+						<view class="text">全部商品</view>
+					</view>
+				</view>
 			</scroll-view>
 		</view>
 	</view>
@@ -97,15 +106,18 @@
 					url: `/pages/search/search?search=${JSON.stringify(this.search)}`
 				})
 			},
-			navToListPage(pro,index){//分类导航跳转
-				let self = this;
-				uni.setStorage({
-					key: 'commodity_id',
-					data: pro.tinyTypeID,
-					success: function () {
-						self.$api.navToListPage({type:'4',value:pro.name,id:pro.tinyTypeID});
-					}
-				})
+			navToListPage(item,index){//分类导航跳转
+				switch(index){
+					case 1:
+						this.$api.navigateTo(`/pages/goods/goods-classify?title=${item.name}&id=${item.bigTypeID}`)
+						break;
+					case 2:
+						this.$api.navigateTo(`/pages/goods/goods-classify?title=${item.name}&id=${item.smallTypeID}`)
+						break;
+					case 3:
+						this.$api.navigateTo(`/pages/goods/goods-classify?title=${item.name}&id=${item.tinyTypeID}`)
+						break;
+				}
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
@@ -248,9 +260,28 @@
 						.no-data {
 							text-align: center;
 							margin: 30rpx 0;
-							color: #999999;
+							color: #666666;
 							font-size: 24rpx;
 							line-height: 80rpx;
+							.box{
+								width: calc(71.44vw / 3);
+								margin-bottom: 40rpx;
+								display: flex;
+								justify-content: center;
+								align-items: center;
+								flex-wrap: wrap;
+								image{
+									width: 140rpx;
+									height: 140rpx;
+								}
+								.text{
+									margin-top: 8rpx;
+									width: 100%;
+									display: flex;
+									justify-content: center;
+									font-size: $font-size-24;
+								}
+							}
 						}
 					}
 				}