From 00e3512ca69976b5b9f3c30c1995bfb9c3751f72 Mon Sep 17 00:00:00 2001
From: liuleilei <234@qq.com>
Date: 星期一, 28 十月 2024 14:04:34 +0800
Subject: [PATCH] 更新

---
 h5/pages/index_2/index.vue |   73 +++++++++++++++++++++++++-----------
 h5/components/search.vue   |   23 +++++++++--
 h5/utils/request.js        |    2 
 h5/manifest.json           |    2 
 4 files changed, 72 insertions(+), 28 deletions(-)

diff --git a/h5/components/search.vue b/h5/components/search.vue
index 59e2820..5d6613b 100644
--- a/h5/components/search.vue
+++ b/h5/components/search.vue
@@ -21,7 +21,11 @@
 			</view>
 			<view class="search_box_item_xl" v-if="searchData && searchData.length > 0">
 				<view class="search_box_item_xl_item" v-for="(item, i) in searchData" :key="i">
-					<view :class="index === i ? 'search_box_item_xl_item_name active' : 'search_box_item_xl_item_name'" @click="clickItem(item, i)">{{ item.name }}</view><span v-if="item.price">锟{ item.price }}</span>
+					<view :class="index === i ? 'search_box_item_xl_item_name active' : 'search_box_item_xl_item_name'" @click="clickItem(item, i)" @mouseenter="aaa(i)" @mouseleave="bbb">
+  
+						<span :style="{color: fontColorIndex === i ? fontColor : ''}">{{item.name}}</span>
+					</view>
+					<span v-if="item.price">锟{ item.price }}</span>
 				</view>
 			</view>
 			
@@ -62,7 +66,8 @@
 				name2: '',
 				
 				index: 0,
-				focus: true
+				focus: true,
+				fontColorIndex: ''
 			}
 		},
 		props: {
@@ -85,6 +90,10 @@
 			},
 			categoryid: {
 				type: Number | String
+			},
+		 
+			fontColor:{
+				type: Number | String
 			}
 		},
 		watch: {
@@ -101,6 +110,12 @@
 			}
 		},
 		methods: {
+			aaa(index) {
+				this.fontColorIndex = index
+			},
+			bbb() {
+				this.fontColorIndex = ''
+			},
 			percentage(bgColor, alpha) {
 				let res = +(alpha * 2.55).toFixed(0)
 				return bgColor + res.toString(16)
@@ -357,9 +372,9 @@
 					// 		color: #FFF200;
 					// 	}
 					// }
-					.active {
+					  .active {
 						color: #FFF200 !important;
-					}
+					}  
 					.search_box_item_xl_item_name {
 						flex: 1;
 						height: 100%;
diff --git a/h5/manifest.json b/h5/manifest.json
index 86f50bd..d2d407f 100644
--- a/h5/manifest.json
+++ b/h5/manifest.json
@@ -81,7 +81,7 @@
                 "/preselect_h5_interface" : {
                     // "target" : "http://127.0.0.1:10022/",
                     // "target" : "http://127.0.0.1:10024/",
-                    "target" : "https://dmtest.ahapp.net/preselect_h5_interface/",
+                    "target" : "https://yx.ahapp.net/h5_interface_v2/",
                     // "target" : "http://121.41.164.217/",
                     // "target" : "http://192.168.0.15:10022/",
                     // "target" : "https://dmtest.ahapp.net/",
diff --git a/h5/pages/index_2/index.vue b/h5/pages/index_2/index.vue
index 1099fef..cdcd8ca 100644
--- a/h5/pages/index_2/index.vue
+++ b/h5/pages/index_2/index.vue
@@ -45,9 +45,10 @@
 									<view class="commodityFrom_body_content_item_num_img">
 										<image :src="item.categoryImgurl" mode="widthFix"></image>
 									</view>
-									{{stringOperations(item.categoryName, 3)}}
+									<text>{{item.categoryName}}</text>
+								<!-- 	{{stringOperations(item.categoryName, 3)}} -->
 								</view>
-								 <!-- @click="open(index, 1)" -->
+								 <!-- @click="open(index, 1)" -->   
 								<view class="commodityFrom_body_content_item_num" @mouseenter.stop="mouseenterP(index, item.categoryId)" @mouseleave.stop="mouseleaveP(index)">
 									{{stringOperations(item.brandName, 4)}}
 									<view class="drop-down" :style="{ opacity: item.ppShow ? opacity : '0', zIndex: item.ppShow ? zIndex : '-1', background: !configuration ? 'rgba(108, 130, 170, 1)' : percentage(configuration.pull.bgColor, configuration.pull.bgAlpha) }">
@@ -55,14 +56,16 @@
 											<input type="text" placeholder="璇疯緭鍏�" v-model="item.brandVal" @input="searchBrand($event, item)" />
 										</view>
 										<!-- brandData -->
-										<view class="drop-down-item" v-for="(child, i) in item.brandVal ? item.brandSearchList : item.brandList" :key="i" @click.stop="clickBrand(item, child, index)">
-											{{child.name}}
+										<view class="drop-down-item" v-for="(child, i) in item.brandVal ? item.brandSearchList : item.brandList" :key="i" @click.stop="clickBrand(item, child, index)"  @mouseenter="aaa(i)" @mouseleave="bbb">
+										 
+											<text :style="{color: fontColorIndex === i ? fontColor : ''}">{{child.name}}</text>
 										</view>
 									</view>
 								</view>
 								 <!-- @click="open(index, 2)" -->
 								<view class="commodityFrom_body_content_item_num" @mouseenter.stop="mouseenterX(index)" @mouseleave.stop="mouseleaveX(index)">
-									{{item.name}}
+								 
+									{{stringOperations(item.name, 18)}}
 									<view class="drop-top" v-show="item.name">
 										{{item.name}}
 									</view>
@@ -70,8 +73,8 @@
 										<view class="drop-down-search">
 											<input type="text" placeholder="璇疯緭鍏�" v-model="item.modelVal" @input="searchModel($event, item)" />
 										</view>
-										<view class="drop-down-item" v-for="(data, s) in item.modelVal ? item.modelSearchList : item.xhData" :key="s" @click.stop="clickXH(data, index)">
-											{{data.name}}
+										<view class="drop-down-item" v-for="(data, s) in item.modelVal ? item.modelSearchList : item.xhData" :key="s" @click.stop="clickXH(data, index)"  @mouseenter="aaa(s)" @mouseleave="bbb">
+											<text :style="{color: fontColorIndex === s ? fontColor : ''}">{{data.name}}</text>
 										</view>
 									</view>
 								</view>
@@ -93,7 +96,7 @@
 							</view>
 						</view>
 						<view class="commodityFrom_body_total">
-							<view class="commodityFrom_body_total_item" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.header.backgroundType === 2 ? `linear-gradient(180deg, ${percentage(configuration.header.bgColor, configuration.header.bgAlpha)} 0%, ${percentage(configuration.header.bgColor2, configuration.header.bgAlpha2)} 100%)` : configuration.header.backgroundType === 1 ? percentage(configuration.header.bgColor, configuration.header.bgAlpha) : 'rgba(13, 30, 65, 1)', color: !configuration ? 'rgba(255, 255, 255, 1)' : configuration.header.type === 1 ? percentage(configuration.header.color, configuration.header.alpha) : '#ffffff', textAlign: 'left'}">鎬昏锛�</view>
+							<view class="commodityFrom_body_total_item" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.header.backgroundType === 2 ? `linear-gradient(180deg, ${percentage(configuration.header.bgColor, configuration.header.bgAlpha)} 0%, ${percentage(configuration.header.bgColor2, configuration.header.bgAlpha2)} 100%)` : configuration.header.backgroundType === 1 ? percentage(configuration.header.bgColor, configuration.header.bgAlpha) : 'rgba(13, 30, 65, 1)', color: !configuration ? 'rgba(255, 255, 255, 1)' : configuration.header.type === 1 ? percentage(configuration.header.color, configuration.header.alpha) : '#ffffff', textAlign: 'left'}">鍚堣锛�</view>
 							<view class="commodityFrom_body_total_item" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.header.backgroundType === 2 ? `linear-gradient(180deg, ${percentage(configuration.header.bgColor, configuration.header.bgAlpha)} 0%, ${percentage(configuration.header.bgColor2, configuration.header.bgAlpha2)} 100%)` : configuration.header.backgroundType === 1 ? percentage(configuration.header.bgColor, configuration.header.bgAlpha) : 'rgba(13, 30, 65, 1)', color: !configuration ? 'rgba(255, 220, 108, 1)' : configuration.pull.selType === 1 ? percentage(configuration.pull.selColor, configuration.pull.selAlpha) : '#FFDC6C'}">
 								{{simplifyNum(zdj)}}
 							</view>
@@ -130,8 +133,8 @@
 							<text>{{attributeOne.name ? attributeOne.name : attrFirstName}}</text>
 							<image src="@/static/ar_open@2x.png" mode="widthFix"></image>
 							<view class="productPage_xl" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.pull.bgType === 1 ? percentage(configuration.pull.bgColor, configuration.pull.bgAlpha) : '#0D1E41'}" v-if="attrFirstList.length > 0">
-								<view class="productPage_xl_iten" v-for="(item, index) in attrFirstList" :key="index" @click="clickShopPageCheck(item, 1)">
-									{{item.name}}
+								<view class="productPage_xl_iten" v-for="(item, index) in attrFirstList" :key="index" @click="clickShopPageCheck(item, 1)" @mouseenter="aaa(index)" @mouseleave="bbb">	 
+									<text :style="{color: fontColorIndex === index ? fontColor : ''}">{{item.name}}</text>
 								</view>
 							</view>
 						</view>
@@ -139,8 +142,8 @@
 							<text>{{attributeTwo.name ? attributeTwo.name : attrSecondName}}</text>
 							<image src="@/static/ar_open@2x.png" mode="widthFix"></image>
 							<view class="productPage_xl" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.pull.bgType === 1 ? percentage(configuration.pull.bgColor, configuration.pull.bgAlpha) : '#0D1E41'}" v-if="attrSecondList.length > 0">
-								<view class="productPage_xl_iten" v-for="(item, index) in attrSecondList" :key="index" @click="clickShopPageCheck(item, 2)">
-									{{item.name}}
+								<view class="productPage_xl_iten" v-for="(item, index) in attrSecondList" :key="index" @click="clickShopPageCheck(item, 2)" @mouseenter="aaa(index)" @mouseleave="bbb">
+									<text :style="{color: fontColorIndex === index ? fontColor : ''}">{{item.name}}</text>
 								</view>
 							</view>
 						</view>
@@ -149,12 +152,13 @@
 							<text v-else>{{budget.max && budget.min ? budget.min + '~' + budget.max : '棰勭畻'}}</text>
 							<image src="@/static/ar_open@2x.png" mode="widthFix"></image>
 							<view class="productPage_xl" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.pull.bgType === 1 ? percentage(configuration.pull.bgColor, configuration.pull.bgAlpha) : '#0D1E41'}" v-if="budgetList.length > 0">
-								<view class="productPage_xl_iten" v-for="(item, index) in budgetList" :key="index" @click="clickShopPageCheck(item, 3)">
+								<view class="productPage_xl_iten" v-for="(item, index) in budgetList" :key="index" @click="clickShopPageCheck(item, 3)" @mouseenter="aaa(index)" @mouseleave="bbb">
 									<template v-if="!item.name">
-										{{item.minamount}}~{{item.maxamount}}
+										
+										<text :style="{color: fontColorIndex === index ? fontColor : ''}">{{item.minamount}}~{{item.maxamount}}</text>
 									</template>
 									<template v-else>
-										{{item.name}}
+										<text :style="{color: fontColorIndex === index ? fontColor : ''}">{{item.name}}</text>
 									</template>
 								</view>
 							</view>
@@ -163,8 +167,8 @@
 							<text>{{shopPageBrand.name ? shopPageBrand.name : '鍝佺墝'}}</text>
 							<image src="@/static/ar_open@2x.png" mode="widthFix"></image>
 							<view class="productPage_xl" :style="{background: !configuration ? 'rgba(13, 30, 65, 1)' : configuration.pull.bgType === 1 ? percentage(configuration.pull.bgColor, configuration.pull.bgAlpha) : '#0D1E41'}" v-if="brandData.length > 0">
-								<view class="productPage_xl_iten" v-for="(item, index) in brandData1" :key="index" @click="clickShopPageCheck(item, 4)">
-									{{item.name}}
+								<view class="productPage_xl_iten" v-for="(item, index) in brandData1" :key="index" @click="clickShopPageCheck(item, 4)" @mouseenter="aaa(index)" @mouseleave="bbb">
+									<text :style="{color: fontColorIndex === index ? fontColor : ''}">{{item.name}}</text>
 								</view>
 							</view>
 						</view>
@@ -260,6 +264,8 @@
 			<search
 				ref="search"
 				:search="configuration ? configuration.search : null"
+				:conMark="configuration ? configuration : null"
+				:fontColor="fontColor"
 				:categoryList="category"
 				:shopList="shopData"
 				:categoryid="categoryId"
@@ -349,7 +355,9 @@
 				topImg: '',
 				pkImg: '',
 				
-				title: ''
+				title: '',
+				fontColor: 'rgba(255, 220, 108, 1)',
+				fontColorIndex: ''
 			}
 		},
 		components: { bigImg, search, searchShopList },
@@ -505,8 +513,15 @@
 			}
 		},
 		methods: {
+			aaa(index) {
+				this.fontColorIndex = index
+			},
+			bbb() {
+				this.fontColorIndex = ''
+			},
 			// 榧犳爣绉诲鍝佺墝
 			async mouseenterP(index, categoryId) {
+				this.shopList[index].ppShow = true
 				if (!this.shopList[index].brandList || this.shopList[index].brandList.length == 0) {
 					let res = await brandList({ categoryId })
 					if (res.code === 200) {
@@ -514,7 +529,7 @@
 						this.shopList[index].brandList = res.data
 					}
 				}
-				this.shopList[index].ppShow = true
+				
 				this.$forceUpdate()
 			},
 			mouseleaveP(index) {
@@ -1309,8 +1324,11 @@
 									font-weight: 500;
 								}
 								.commodityFrom_body_content_item_num_img {
-									width: 16px;
-									height: 16px;
+									width: 28px;
+									height: 28px;
+									display: flex;
+									align-items: center;
+									justify-content: center;
 									margin-right: 4px;
 									image {
 										width: 100%;
@@ -1387,6 +1405,17 @@
 										color: #FFFFFF;
 										&:hover {
 											color: #FFF200;
+										}
+										text {
+											width: 100%;
+											text-align: center;
+											font-size: 16px;
+											font-family: PingFangSC-Regular, PingFang SC;
+											font-weight: 400;
+											color: #FFFFFF;
+											overflow: hidden;
+											white-space: nowrap;
+											text-overflow: ellipsis;
 										}
 									}
 								}
@@ -1822,7 +1851,7 @@
 								}
 							}
 							.productPage_parameter_item_content_nr {
-								padding: 16px 32px;
+								padding: 16px 18px;
 								box-sizing: border-box;
 								background: #FFFFFF;
 								border-radius: 8px;
diff --git a/h5/utils/request.js b/h5/utils/request.js
index 50c2cfd..be17344 100644
--- a/h5/utils/request.js
+++ b/h5/utils/request.js
@@ -18,7 +18,7 @@
 		// http://127.0.0.1:10024/   娴嬭瘯
 		// https://yx.ahapp.net/h5_interface/${url}
 		uni.request({
-			url: `http://192.168.0.112:10024/${url}`,
+			url: `https://yx.ahapp.net/h5_interface_v2/${url}`,
 			method,
 			data,
 			header: {

--
Gitblit v1.9.3