Browse Source

commit - m 优化

zhengjinyi 4 years ago
parent
commit
d0c5a04be6
2 changed files with 105 additions and 88 deletions
  1. 1 3
      pages/tabBar/home/index.vue
  2. 104 85
      second/pages/product/product-list.vue

+ 1 - 3
pages/tabBar/home/index.vue

@@ -131,7 +131,6 @@
 							}else if(response.data.userIdentity === 3){
 								this.$api.navigateTo('/supplier/pages/index/index')
 							}
-							this.GetHomeFloorInfo()
 							this.getHomeInformation()
 						}).catch(error =>{
 							this.isLogin = false;
@@ -139,9 +138,7 @@
 							uni.removeStorageSync('sessionid')
 							uni.setStorageSync('sessionid','JSESSIONID='+error.data)
 							this.$store.commit('updateStatus',error.data)
-							this.GetHomeFloorInfo()
 							this.getHomeInformation()
-							
 						})
 					})
 				})
@@ -191,6 +188,7 @@
 					this.$store.commit('updateAllNum',data.shoppingCartCount)
 					this.GetHomeInit();
 					this.GetHomeRecommendInfo()
+					this.GetHomeFloorInfo()
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})

+ 104 - 85
second/pages/product/product-list.vue

@@ -19,54 +19,55 @@
 			<image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/banner.png" class="banner-img"></image>
 		</view>
 		<view class="main-content" v-if="searchHide">
-			<ul class="secondTitle">
-				<li class="ClassA mIcon off" @click="handle('1')" :class="currentId == '1' ? 'active':''">
+			<view class="secondTitle">
+				<view class="ClassA" @click="handle('1')">
 					{{ tabTitleName }}
-					<text class="iconfont" :class="mainflag?'icon-xiangxiajiantou':'icon-xiangshangjiantou'"></text>
-					<label class="line" v-if="currentId == '1'"></label>
-				</li>
-				<li class="ClassA" @click="handle('2')" :class="[currentId == '2' ? 'active':'',currentId == '2' ? 'off':'']">
+					<text class="iconfont" :class="mainflag ? 'icon-xiangxiajiantou':'icon-xiangshangjiantou'"></text>
+					<view class="line" v-if="currentId == '1'"></view>
+				</view>
+				<view class="ClassA" @click="handle('2')" :class="[currentId == '2' ? 'active':'',currentId == '2' ? 'off':'']">
 					临期产品
-					<label class="line" v-if="currentId == '2'"></label>
-				</li>
-				<li class="ClassA" @click="handle('3')" :class="[currentId == '3' ? 'active':'',currentId == '3' ? 'off':'']">
+					<view class="line" v-if="currentId == '2'"></view>
+				</view>
+				<view class="ClassA" @click="handle('3')" :class="[currentId == '3' ? 'active':'',currentId == '3' ? 'off':'']">
 					其他
-					<label class="line" v-if="currentId == '3'"></label>
-				</li>
+					<view class="line" v-if="currentId == '3'"></view>
+				</view>
 			</ul>
 		</view>
-		<ul class="mainTab" v-if="mainflag" v-show="searchHide">
-			 <li v-for="(item,index) in tabList" @click='handleChild(item)' :key="index" :class="currentID2 ==index?'addstyle':' '">{{item.name}}</li>
-		</ul>
+		<view class="mainTab" v-if="mainflag" v-show="searchHide">
+			 <view class="li" v-for="(item,index) in tabList" @click='handleChild(item)' :key="index" :class="currentID2 ==index?'addstyle':' '">{{item.name}}</view>
+		</view>
 		<view class="shopList" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
 			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="tabchildList.length > 0">
 		            <view class="Listitem" v-if="isShow" v-for="(item, index) in tabchildList" :key="index" :class="item.sold==1?'activeImg':''"
 					 :productid="item.productID" @click.stop="navToDetailPage(item.productID)">
-		                <a class="itemImg onhref" >
+		                <view class="itemImg onhref" >
 		                    <image :src="item.imageList[0]" class="bigImg"></image>
 							<image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/yishou.png" class="yishou_bg" v-if="item.sold==1&&item.newAdded==1||item.sold==1&&item.newAdded==0"></image>
-		                </a>
+		                </view>
 		               <view class="ItemInfo">
-		                        <span class="infotag news" v-if="item.sold==0&&item.newAdded==1">新</span>
-		                    <a class="productname" href="" :style="item.sold==0&&item.newAdded==1?'text-indent:60rpx':''">
+							<text class="infotag news" v-if="item.sold==0&&item.newAdded==1">新</text>
+		                    <view class="productname" href="" :style="item.sold==0&&item.newAdded==1?'text-indent:60rpx':''">
 		                        {{item.name}}
-		                    </a>
+		                    </view>
 		                    <view class="targetprice" >
-		                        <span v-if="item.detailTalkFlag ==2 && hasLogin==false">价格详聊</span>
-		                        <span v-else-if="!hasLogin" class="priceparam">登录查看价格</span>
-		                        <span v-else-if="hasLogin && item.detailTalkFlag==2">价格详聊</span>
-		                        <span v-else>¥{{item.price1Str}}</span>
+		                        <text v-if="item.detailTalkFlag ==2 && hasLogin==false">价格详聊</text>
+		                        <text v-else-if="!hasLogin" class="priceparam">登录查看价格</text>
+		                        <text v-else-if="hasLogin && item.detailTalkFlag==2">价格详聊</text>
+		                        <text v-else>¥{{item.price1Str}}</text>
 		                    </view>
 							<view class="shijian">
-								<i class="icon  shijian"></i> {{item.onLineDateStr}}
+								<text class="iconfont  icon-shijian"></text> {{item.onLineDateStr}}
 							</view>
 		                    <view class="dizhi">
 								<view class="dizhi_left">
-									<i class="icon mIcon dizhi"></i>
+									<text class="iconfont  icon-dizhi1"></text>
 									{{item.provinceCityDistrict}}
 								</view>
 		                        <view class="liulan_right">
-		                            <i class="icon mIcon  liulanliang"></i> {{item.viewingNum}}
+									<text class="iconfont  icon-kejian1"></text>
+		                           {{item.viewingNum}}
 		                        </view>
 		                    </view>
 		                </view>
@@ -77,15 +78,15 @@
 					</view>
 					</scroll-view>
 		            <view class="no-content" v-show="showflag" :class="showflag?'show':''">
-		                <img src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/kong_m.png"  />
+		                <image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/kong_m.png"  />
 		                <view class="error-message">
-		                    <p>此分类下面没有商品,换其它分类瞅瞅</p>
+		                    <view>此分类下面没有商品,换其它分类瞅瞅</view>
 		                </view>
 		            </view>
 		        </view>
 				<view class="fabu" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
-					 <span  class="intro"  @click.stop="gotointro" >市场介绍</span>
-					 <span  class="release" @click.stop="gotoform" >我要发布</span>
+					 <text  class="intro"  @click.stop="gotointro" >市场介绍</text>
+					 <text  class="release" @click.stop="gotoform" >我要发布</text>
 				</view>
 				<!-- 透明模态层 -->
 				<modal-layer v-if='isModallayer'></modal-layer>
@@ -380,22 +381,24 @@
 		position: absolute;
 		z-index: 1;
 	}
-	.mainTab li.addstyle {
+	.mainTab .li.addstyle {
 		color: #e15616;
 	}
-	.mainTab li {
-		height: 9.6vw;
-		line-height: 9.6vw;
-		text-align: center;
-		color: #627386;
-		cursor: pointer;
-	}
-	.line {
-		width: 75rpx;
-		margin: 0 auto;
-		height: 4rpx;
-		background-color: #e15616;
-		display: block;
+	.mainTab  {
+		.li{
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			color: #627386;
+			cursor: pointer;
+		}
+		.line {
+			width: 75rpx;
+			margin: 0 auto;
+			height: 4rpx;
+			background-color: #e15616;
+			display: block;
+		}
 	}
 	.no-content{
 		width: 100%;
@@ -423,10 +426,10 @@
 		float: left;
 		background: #000;
 		position: relative;
-	}
-	.itemImg .bigImg {
-		width: 100%;
-		height: 100%;
+		.bigImg {
+			width: 100%;
+			height: 100%;
+		}
 	}
 	.activeImg {
 		opacity: 0.5;
@@ -434,6 +437,16 @@
 	.ItemInfo {
 		float: right;
 		width:500rpx;
+		.dizhi{
+			font-size: 24rpx;
+			color: #999999;
+			margin-top: 10rpx;
+		}
+		.shijian{
+			font-size: 24rpx;
+			color: #999999;
+			margin-top: 10rpx;
+		}
 	}
 	.infotag{
 		font-size: 20rpx;
@@ -463,18 +476,20 @@
 		cursor: pointer;
 		margin: 15rpx 0;
 	}
-	.icon.shijian::before {
-		background-position: 20rpx;
-		width: 50rpx;
-		height: 50rpx;
-		position: absolute;
-		right: 2rpx;
-		top: -10rpx;
+	.icon-shijian{
+		font-size: 30rpx;
+		color: #999999;
+		margin-right: 10rpx;
 	}
-	.shijian,.dizhi{
-		font-size: 20rpx;
+	.icon-kejian1{
+		font-size: 30rpx;
+		color: #999999;
+		margin-right: 10rpx;
+	}
+	.icon-dizhi1{
+		font-size: 30rpx;
 		color: #999999;
-		margin-top: 5rpx;
+		margin-right: 10rpx;
 	}
 	.dizhi_left{
 		float: left;
@@ -483,38 +498,42 @@
 		float: right;
 		margin-right: 25rpx;
 	}
-	.itemImg  .yishou_bg{
-		width: 90rpx;
-		height: 90rpx;
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%)
-	}
-	.fabu span{
-		display: inline-block;
-		width: 280rpx;
-		height: 84rpx;
-		line-height: 84rpx;
-		text-align: center;
-		border-radius: 42rpx;
-		margin: 15rpx;
-		font-size: 30rpx;
+	.itemImg  {
+		.yishou_bg{
+			width: 90rpx;
+			height: 90rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%)
+		}
+	}
+	.fabu {
+		text{
+			display: inline-block;
+			width: 280rpx;
+			height: 84rpx;
+			line-height: 84rpx;
+			text-align: center;
+			border-radius: 42rpx;
+			margin: 15rpx;
+			font-size: 30rpx;
+		}
 	}
 	.fabu{
 		position: fixed;
 		bottom: 0;
 		width: 100%;
-		background: #fff
-	}
-	.fabu .intro{
-		background: #ffe6dc;
-		color: #e15616;
-	}
-	.fabu .release{
-		background: $btn-confirm;
-		color: #ffffff;
-		width: 402rpx;
+		background: #fff;
+		.intro{
+			background: #ffe6dc;
+			color: #e15616;
+		}
+		.release{
+			background: $btn-confirm;
+			color: #ffffff;
+			width: 402rpx;
+		}
 	}
 
 </style>