ソースを参照

ui”
git commit -m ui”

liujiaxin 1 週間 前
コミット
b4fb5bd586

+ 1 - 1
pages/home/index.vue

@@ -74,7 +74,7 @@
 							{{ item.name }}
 							<view class="tab-bg" v-show="status ==item.value"></view>
 							<!-- <image v-show="status ==item.value" class="tab-bg" src="/static/images/tab_bg.png" mode=""> -->
-							</image>
+							<!-- </image> -->
 						</view>
 					</view>
 					<image class="white-gradient" src="/static/images/white_gradient_bg.png"></image>

+ 226 - 125
pages/shopping/index.vue

@@ -24,23 +24,17 @@
 						<view class="name" :class="index===activeIndex?'active':''">{{item.name}}</view>
 					</view>
 				</view> -->
-				<scroll-view 
-				          class="column-list-scroll" 
-				          :class="isExpand?'column-list2':''"
-				          scroll-x="true" 
-				          :scroll-with-animation="true"
-				          :show-scrollbar="false"
-				          :enable-flex="true"
-				        >
-				          <view class="column-list" :class="isExpand?'column-list2':''">
-				            <view class="item" v-for="(item,index) in columnList" :key="index" @click="selectColumn(item)">
-				              <view class="img-item" :class="index===activeIndex?'active':''">
-				                <image class="img" src="../../static/images/img.png" mode=""></image>
-				              </view>
-				              <view class="name" :class="index===activeIndex?'active':''">{{item.name}}</view>
-				            </view>
-				          </view>
-				        </scroll-view>
+				<scroll-view class="column-list-scroll" :class="isExpand?'column-list2':''" scroll-x="true"
+					:scroll-with-animation="true" :show-scrollbar="false" :enable-flex="true">
+					<view class="column-list" :class="isExpand?'column-list2':''">
+						<view class="item" v-for="(item,index) in columnList" :key="index" @click="selectColumn(item)">
+							<view class="img-item" :class="index===activeIndex?'active':''">
+								<image class="img" src="../../static/images/img.png" mode=""></image>
+							</view>
+							<view class="name" :class="index===activeIndex?'active':''">{{item.name}}</view>
+						</view>
+					</view>
+				</scroll-view>
 				<view class="expand" @click="expand" :class="{'expand2': isExpand}">
 					<view>{{isExpand ? '收起' : '展开'}}</view>
 					<image class="expand-icon"
@@ -60,6 +54,28 @@
 				</view>
 			</view>
 			<view class="medic">
+				<view class="tab-inner">
+					<view v-for="(item,index) in selectList" :key="index"
+						:class="selectIndex == item.value?'item active':'item'" @click="onSelect(item)">
+						<view class="text">
+							<text>{{ item.name }}</text>
+							<image v-if="item.value==2" class="tab-bg" src="/static/images/shaixuan_moren.png" mode="">
+							</image>
+						</view>
+					</view>
+					<view class="icon-search">
+						<image @click="showChange(2)" v-if="showType==1" src="../../static/images/demonstrations1.png"
+							mode="">
+						</image>
+						<image @click="showChange(1)" v-if="showType==2" src="../../static/images/demonstrations2.png"
+							mode="">
+						</image>
+						<view class="filter">
+							<text>筛选</text>
+							<image class="ml8" @click="toFilter" src="../../static/images/filter_icon.png" mode="">
+						</view>
+					</view>
+				</view>
 				<view class="medic-list">
 					<view v-for="(item,index) in dataList" :key="index" class="item" @click="showDetail(item)">
 						<view class="img-box">
@@ -121,6 +137,20 @@
 	export default {
 		data() {
 			return {
+				selectIndex: 0,
+				selectList: [{
+					name: '综合',
+					value: 0
+				}, {
+					name: '销量',
+					value: 1
+				}, {
+					name: '价格',
+					value: 2
+				}, {
+					name: '惊艳度',
+					value: 3
+				}],
 				isExpand: false, //是否展开
 				activeIndex: 0,
 				columnList: [{
@@ -214,6 +244,10 @@
 			this.getAdv();
 		},
 		methods: {
+			onSelect(item) {
+				console.log("item", item)
+				this.selectIndex = item.value
+			},
 			splitPrice(price) {
 				const priceStr = parseFloat(price).toFixed(2).toString();
 				return {
@@ -390,7 +424,7 @@
 					.icon-search {
 						width: 28rpx;
 						height: 28rpx;
-						margin-right: 20rpx;
+						margin-left: 42rpx;
 					}
 
 					input {
@@ -402,113 +436,113 @@
 			}
 
 			.column-box {
-			  display: flex;
-			  padding-left: 16rpx;
-			  margin: 16rpx 0 24rpx;
-			  
-			  &.column-box2 {
-			    display: flex;
-			    flex-direction: column;
-			  }
-			  
-			  .column-list-scroll {
-			    flex: 1;
-			    overflow: hidden;
-			    white-space: nowrap;
-			    
-			    &.column-list2 {
-			      flex-wrap: wrap;
-			      height: auto;
-			    }
-			    
-			    .column-list {
-			      display: inline-flex;  // 改为行内flex
-			      align-items: center;
-			      padding-bottom: 10rpx; // 增加底部padding,防止滚动条遮挡
-			      
-			      &.column-list2 {
-			        display: flex;
-			        flex-wrap: wrap;
-			        width: 100%;
-			      }
-			      
-			      .item {
-			        display: inline-flex;  // 改为行内flex
-			        flex-direction: column;
-			        align-items: center;
-			        margin-right: 16rpx;
-			        margin-bottom: 20rpx;
-			        flex-shrink: 0; // 防止收缩
-			        
-			        .img-item {
-			          width: 88rpx;
-			          height: 88rpx;
-			          flex-shrink: 0;
-			          
-			          &.active {
-			            border: 3rpx solid #02B176;
-			            box-sizing: border-box;
-			            border-radius: 44rpx;
-			          }
-			          
-			          .img {
-			            width: 100%;
-			            height: 100%;
-			            border-radius: 44rpx;
-			          }
-			        }
-			        
-			        .name {
-			          width: 128rpx;
-			          height: 44rpx;
-			          font-size: 24rpx;
-			          color: #333333;
-			          text-align: center;
-			          line-height: 44rpx;
-			          margin-top: 16rpx;
-			          white-space: nowrap;
-			          overflow: hidden;
-			          text-overflow: ellipsis;
-			          
-			          &.active {
-			            font-weight: 500;
-			            color: #FFFFFF;
-			            background: #02B176;
-			            border-radius: 22rpx;
-			          }
-			        }
-			      }
-			    }
-			  }
-			  
-			  .expand {
-			    margin: 0 20rpx;
-			    font-size: 24rpx;
-			    color: #000000;
-			    width: 24rpx;
-			    display: flex;
-			    flex-direction: column;
-			    align-items: center;
-			    flex-shrink: 0; // 防止收缩
-			    
-			    .expand-icon {
-			      width: 24rpx;
-			      height: 24rpx;
-			      margin-top: 6rpx;
-			    }
-			  }
-			  
-			  .expand2 {
-			    margin-top: 8rpx;
-			    width: 100%;
-			    justify-content: center;
-			    flex-direction: row;
-			    align-items: center;
-			    
-			    .expand-icon {
-			      margin-left: 12rpx;
-			    }
-			  }
+				display: flex;
+				padding-left: 16rpx;
+				margin: 16rpx 0 24rpx;
+
+				&.column-box2 {
+					display: flex;
+					flex-direction: column;
+				}
+
+				.column-list-scroll {
+					flex: 1;
+					overflow: hidden;
+					white-space: nowrap;
+
+					&.column-list2 {
+						flex-wrap: wrap;
+						height: auto;
+					}
+
+					.column-list {
+						display: inline-flex; // 改为行内flex
+						align-items: center;
+						padding-bottom: 10rpx; // 增加底部padding,防止滚动条遮挡
+
+						&.column-list2 {
+							display: flex;
+							flex-wrap: wrap;
+							width: 100%;
+						}
+
+						.item {
+							display: inline-flex; // 改为行内flex
+							flex-direction: column;
+							align-items: center;
+							margin-right: 16rpx;
+							margin-bottom: 20rpx;
+							flex-shrink: 0; // 防止收缩
+
+							.img-item {
+								width: 88rpx;
+								height: 88rpx;
+								flex-shrink: 0;
+
+								&.active {
+									border: 3rpx solid #02B176;
+									box-sizing: border-box;
+									border-radius: 44rpx;
+								}
+
+								.img {
+									width: 100%;
+									height: 100%;
+									border-radius: 44rpx;
+								}
+							}
+
+							.name {
+								width: 128rpx;
+								height: 44rpx;
+								font-size: 24rpx;
+								color: #333333;
+								text-align: center;
+								line-height: 44rpx;
+								margin-top: 16rpx;
+								white-space: nowrap;
+								overflow: hidden;
+								text-overflow: ellipsis;
+
+								&.active {
+									font-weight: 500;
+									color: #FFFFFF;
+									background: #02B176;
+									border-radius: 22rpx;
+								}
+							}
+						}
+					}
+				}
+
+				.expand {
+					margin: 0 20rpx;
+					font-size: 24rpx;
+					color: #000000;
+					width: 24rpx;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					flex-shrink: 0; // 防止收缩
+
+					.expand-icon {
+						width: 24rpx;
+						height: 24rpx;
+						margin-top: 6rpx;
+					}
+				}
+
+				.expand2 {
+					margin-top: 8rpx;
+					width: 100%;
+					justify-content: center;
+					flex-direction: row;
+					align-items: center;
+
+					.expand-icon {
+						margin-left: 12rpx;
+					}
+				}
 			}
 		}
 
@@ -556,6 +590,73 @@
 				width: calc(100% - 200rpx);
 				height: 100%;
 
+				.tab-inner {
+					height: 88upx;
+					line-height: 88upx;
+					display: flex;
+					overflow-x: auto;
+					align-items: center;
+					font-size: 26rpx;
+					color: #666666;
+					margin-left: 24rpx;
+
+					.item {
+						font-size: 24rpx;
+						white-space: nowrap;
+						line-height: 1;
+						font-family: PingFang SC;
+						background: #F5F7FA;
+						border-radius: 8rpx 8rpx 8rpx 8rpx;
+						padding: 12rpx 12rpx 10rpx;
+						margin-right: 20upx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+
+
+						&:last-child {
+							margin-right: 0;
+						}
+
+						&.active {
+							font-weight: 600;
+							color: #02B176;
+							background: #EBFAF6;
+						}
+
+						.text {
+
+							position: relative;
+							z-index: 1;
+							display: flex;
+							align-items: center;
+
+						}
+
+						.tab-bg {
+							width: 24upx;
+							height: 24upx;
+							margin-left: 8rpx;
+						}
+					}
+
+					.icon-search {
+						display: flex;
+						align-items: center;
+						image {
+							width: 32upx;
+							height: 32upx;
+						}
+
+						.filter {
+							display: flex;
+							align-items: center;
+						}
+
+					}
+
+				}
+
 				.medic-list {
 					.item {
 						box-sizing: border-box;

+ 123 - 38
pages_shopping/shopping/productDetails.vue

@@ -241,7 +241,6 @@
 				</view>
 			</view>
 		</view>
-
 		<view class="life-box">
 			<view class="title-box">
 				<text class="title">生活号(80)</text>
@@ -251,21 +250,36 @@
 				</view>
 			</view>
 			<view class="life-list">
-				<view class="item">
-					<image class="play" src="/static/image/video_icon.png"></image>
-					<image src="/static/images/img.png"></image>
-				</view>
-				<view class="item">
-					<image class="play" src="/static/image/video_icon.png"></image>
-					<image src="/static/images/img.png"></image>
-				</view>
-				<view class="item">
-					<image class="play" src="/static/image/video_icon.png"></image>
-					<image src="/static/images/img.png"></image>
+				<!-- 左边大列 - 1个大图 -->
+				<view class="left-column">
+					<view class="item">
+						<image class="play" src="/static/images/video_icon.png"></image>
+						<image :src="vidioList[0]" mode="widthFix"></image>
+					</view>
 				</view>
-				<view class="item">
-					<image class="play" src="/static/image/video_icon.png"></image>
-					<image src="/static/images/img.png"></image>
+
+				<!-- 右边两小列 - 每列2个小图 -->
+				<view class="right-columns">
+					<view class="middle-column">
+						<view class="item">
+							<image class="play" src="/static/images/video_icon.png"></image>
+							<image :src="vidioList[1]" mode="widthFix"></image>
+						</view>
+						<view class="item">
+							<image class="play" src="/static/images/video_icon.png"></image>
+							<image :src="vidioList[2]" mode="widthFix"></image>
+						</view>
+					</view>
+					<view class="right-column">
+						<view class="item">
+							<image class="play" src="/static/images/video_icon.png"></image>
+							<image :src="vidioList[3]" mode="aspectFill"></image>
+						</view>
+						<view class="item">
+							<image class="play" src="/static/images/video_icon.png"></image>
+							<image :src="vidioList[4] || vidioList[0]" mode="aspectFill"></image>
+						</view>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -436,6 +450,10 @@
 		},
 		data() {
 			return {
+				vidioList: [
+					"/static/images/img.png", "/static/images/bg_1.png", "/static/images/img.png",
+					"/static/images/img.png", "/static/images/img.png", "/static/images/img.png"
+				],
 				dataList: [{
 					cateId: 364,
 					image: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20251216/6a3c96bd3fc44b15b760871670302e9a.jpg",
@@ -1485,9 +1503,74 @@
 		background: #ffffff;
 		border-radius: 16rpx 16rpx 16rpx 16rpx;
 
+		overflow: hidden;
+
 		.life-list {
+			display: flex;
+			height: 100%;
+			border-radius: 16rpx;
+			overflow: hidden;
+			height: 412rpx;
+
+			/* 左边大列 - 1个大图 */
+			.left-column {
+				width: 278rpx;
+				margin-right: 8rpx;
+
+				.item {
+					height: 100%;
+				}
+			}
+
+			/* 右边两小列 */
+			.right-columns {
+				flex: 1;
+				display: flex;
+				justify-content: space-between;
+
+
+				.middle-column,
+				.right-column {
+					width: 180rpx;
+					display: flex;
+					flex-direction: column;
+					margin-right: 12rpx;
+
+					&:last-child {
+						margin-right: 0;
+					}
+				}
+
+				.item {
+					&:first-child {
+						margin-bottom: 8rpx;
+					}
+				}
+
+			}
+
 			.item {
 				position: relative;
+				overflow: hidden;
+
+				/* 左边大图 */
+				.left-column & {
+					image:last-child {
+						width: 100%;
+						height: 100%;
+						object-fit: cover;
+					}
+				}
+
+				/* 右边小图 */
+				.right-columns & {
+					image:last-child {
+						width: 100%;
+						height: auto;
+						/* 高度自适应 */
+						display: block;
+					}
+				}
 
 				.play {
 					position: absolute;
@@ -1495,6 +1578,7 @@
 					right: 20rpx;
 					width: 40rpx;
 					height: 40rpx;
+					z-index: 2;
 				}
 			}
 		}
@@ -1550,6 +1634,7 @@
 
 	.like {
 		padding-bottom: 130rpx;
+
 		.title-box {
 			margin-top: 36rpx 0 24rpx;
 			font-weight: 600;
@@ -1564,7 +1649,7 @@
 			padding: 20upx;
 			display: flex;
 			flex-wrap: wrap;
-		
+
 			.item {
 				margin-right: 18rpx;
 				margin-bottom: 18rpx;
@@ -1572,28 +1657,28 @@
 				background: #FFFFFF;
 				border-radius: 16rpx;
 				overflow: hidden;
-		
+
 				&:nth-child(2n) {
 					margin-right: 0;
 				}
-		
+
 				.img-box {
 					width: 100%;
 					height: 342upx;
-		
+
 					image {
 						width: 100%;
 						height: 100%;
 					}
 				}
-		
+
 				.info-box {
 					box-sizing: border-box;
 					padding: 20upx 20upx 30upx;
 					display: flex;
 					flex-direction: column;
 					justify-content: space-between;
-		
+
 					.title {
 						font-size: 26upx;
 						font-family: PingFang SC;
@@ -1601,23 +1686,23 @@
 						color: #111111;
 						margin-bottom: 4rpx;
 					}
-		
+
 					.intro {
 						font-weight: 400;
 						font-size: 22rpx;
 						color: #D46C0D;
 						margin-bottom: 8upx;
 					}
-		
+
 					.sale {
 						font-size: 21rpx;
 						color: #999999;
 					}
-		
+
 					.lable-group {
 						display: flex;
 						margin-top: 8rpx;
-		
+
 						.lable-item {
 							margin-right: 8rpx;
 							height: 30rpx;
@@ -1628,29 +1713,29 @@
 							color: #FF4B33;
 						}
 					}
-		
+
 					.prce-num {
 						display: flex;
 						align-items: center;
 						justify-content: space-between;
 						margin-top: 8upx;
-		
+
 						.price {
 							font-weight: 600;
 							font-size: 26rpx;
 							color: #FA341E;
 							font-size: 26rpx;
-		
+
 							.unit {
 								font-size: 20upx;
 							}
-		
+
 							.bold {
 								font-size: 36upx;
 							}
 						}
 					}
-		
+
 					.card {
 						margin-top: 20rpx;
 						display: flex;
@@ -1662,23 +1747,23 @@
 						height: 40rpx;
 						padding: 8rpx 10rpx;
 						box-sizing: border-box;
-		
+
 						.card-item {
 							display: flex;
 							align-items: center;
-		
+
 							.img {
 								width: 24rpx;
 								height: 24rpx;
 								margin-right: 4rpx;
 							}
-		
+
 							.ranking {
 								font-size: 20rpx;
 								color: #4D4D4D;
 								margin-right: 4rpx;
 							}
-		
+
 							.bold {
 								font-family: Roboto Flex, Roboto Flex;
 								font-weight: 600;
@@ -1691,7 +1776,7 @@
 								/* transform需要inline-block或block */
 							}
 						}
-		
+
 						.go {
 							width: 16rpx;
 							height: 16rpx;
@@ -1700,7 +1785,7 @@
 				}
 			}
 		}
-		
+
 	}
 
 	.btn-foot {
@@ -1778,7 +1863,7 @@
 				}
 
 				&.cart {
-					background: linear-gradient( 90deg, #FFC95F 0%, #FEA633 100%);
+					background: linear-gradient(90deg, #FFC95F 0%, #FEA633 100%);
 
 					.share {
 						display: inline-block;
@@ -1792,7 +1877,7 @@
 				}
 
 				&.buy {
-					background: linear-gradient( 136deg, #38D97D 0%, #02B176 100%);
+					background: linear-gradient(136deg, #38D97D 0%, #02B176 100%);
 				}
 			}
 		}

+ 1 - 1
pages_shopping/shopping/productList.vue

@@ -2,7 +2,7 @@
 	<view>
 		<view class="top-fixed">
 			<view class="status_bar" :style="{height: statusBarHeight}"></view>
-			
+
 			<view class="search-cont">
 				<image class="w64 h64" src="/static/images/back_black.png"></image>
 				<view class="inner">