twt 1 місяць тому
батько
коміт
ca984e6f32
3 змінених файлів з 58 додано та 9 видалено
  1. 25 2
      pages/index/goodsList.vue
  2. 7 4
      pages/index/index.vue
  3. 26 3
      pages/index/sgoodsList.vue

+ 25 - 2
pages/index/goodsList.vue

@@ -62,7 +62,7 @@
 						<view class="lineRgiht">
 							<view class="goodsName">{{item.name}} {{item.specificationModel}}</view>
 							<view class="goodsMs">{{item.factoryNumber}}</view>
-							<view class="goodsMs">{{item.carmodelremark}}</view>
+							<view class="goodsMs modelRemark" @click.stop="modelRemarkFn(item.modelRemark)">{{item.carmodelremark}}</view>
 						</view>
 						
 					</view>
@@ -88,7 +88,11 @@
 		</view>
 
 
-
+<uni-popup ref="popup"  background-color="#fff">
+<!-- <uni-popup-message type="center" :message="messageText" :duration="2000"></uni-popup-message> -->
+ <view class="popup-content" ><text
+						class="text">{{messageText}}</text></view>
+</uni-popup>
 	</view>
 </template>
 
@@ -117,6 +121,7 @@
 				   {name:'火花塞',componentCode:'003003'},
 			   ],
 			   leftIndex:0,
+			   messageText:'',
 			}
 		},
 		onLoad(opt) {
@@ -145,6 +150,10 @@
 			  //this.queryOilInfoByGroupID()
 		},
 		methods: {
+			modelRemarkFn(txt){
+				this.messageText=txt
+				this.$refs.popup.open('center')
+			},
 			queryCarModelGroupInfo(){
 				   uni.showLoading({ title: '加载中'});
 				   this.$http('matchingByOpen/queryCarModelGroupInfo', {
@@ -524,4 +533,18 @@ color: #E60006;
 	width: 170rpx;text-align: center;
 	font-size: 26rpx;
 }
+.modelRemark{
+	overflow: hidden;
+	  text-overflow: ellipsis;
+	  white-space: nowrap; /* 防止文本换行 */
+	width: 430rpx;
+}
+.popup-content {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 15px;
+		height: 50px;
+		background-color: #fff;
+	}
 </style>

+ 7 - 4
pages/index/index.vue

@@ -66,14 +66,14 @@
 			 			 				:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
 			 			 	<swiper-item >
 			 			 		<view class="swiper-itemTk" >
-			 			 			<image class="tkHdImg" src="http://dmsphoto.66km.com.cn/thFiles/06A3DFF0-2663-4CF2-B9F3-2AA99C9C59EA.png" mode="widthFix"></image>
+			 			 			<image class="tkHdImg" src="http://dmsphoto.66km.com.cn/thFiles/5153BA97-454B-4A26-A580-ABFF1F0128D8.png" mode="widthFix"></image>
 			 			 		</view>	
 			 			 	</swiper-item>
-			 				<swiper-item >
+			 				<!-- <swiper-item >
 			 					<view class="swiper-itemTk" >
 			 						<image class="tkHdImg" src="http://dmsphoto.66km.com.cn/thFiles/37B94D9D-5D8A-4754-9BBF-5715C1B5F665.jpg" mode="widthFix"></image>
 			 					</view>	
-			 				</swiper-item>
+			 				</swiper-item> -->
 			 			 </swiper>
 			 </view>
 			 
@@ -212,8 +212,11 @@
 					uni.navigateTo({
 						  url:'sgoodsList'
 					})
+					
+				}else{
+					this.vincarActiveNum=num
 				}
-				this.vincarActiveNum=num
+				
 				
 			},
 			goSgoods(){

+ 26 - 3
pages/index/sgoodsList.vue

@@ -33,7 +33,7 @@
 						<view class="lineRgiht">
 							<view class="goodsName">{{item.name}} {{item.factoryNumber}}</view>
 							<view class="goodsMs">{{item.specificationModel}}</view>
-							<view class="goodsMs">{{item.modelRemark}}</view>
+							<view class="goodsMs modelRemark" @click.stop="modelRemarkFn(item.modelRemark)">适用车型:{{item.modelRemark}}</view>
 						</view>
 						
 					</view>
@@ -46,7 +46,11 @@
 
 		</view>
 
-
+<uni-popup ref="popup"  background-color="#fff">
+<!-- <uni-popup-message type="center" :message="messageText" :duration="2000"></uni-popup-message> -->
+ <view class="popup-content" ><text
+						class="text">{{messageText}}</text></view>
+</uni-popup>
 
 	</view>
 </template>
@@ -77,6 +81,7 @@
 			   leftIndex:0,
 			   pageIndex:1,
 			   name:'',
+			   messageText:'',
 			}
 		},
 		onLoad(opt) {
@@ -87,6 +92,10 @@
 			 // this.queryOilInfoByGroupID()
 		},
 		methods: {
+			modelRemarkFn(txt){
+				this.messageText=txt
+				this.$refs.popup.open('center')
+			},
 			leftFn(index,item){
 			  this.pageIndex=1
 			  this.MaintainPartList=[]
@@ -203,7 +212,7 @@
 	}
 </script>
 
-<style scoped>
+<style scoped lang="less">
 .salesLine{
 	display: flex;
 	font-size: 24rpx;
@@ -486,4 +495,18 @@ color: #E60006;
 	width: 170rpx;text-align: center;
 	font-size: 26rpx;
 }
+.modelRemark{
+	overflow: hidden;
+	  text-overflow: ellipsis;
+	  white-space: nowrap; /* 防止文本换行 */
+	width: 430rpx;
+}
+.popup-content {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 15px;
+		height: 50px;
+		background-color: #fff;
+	}
 </style>