From 3ac279c9df7181c9f21d35a689a321b990b87b22 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 08 六月 2026 17:42:33 +0800
Subject: [PATCH] aaa

---
 h5/pages/index_2/index.vue |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/h5/pages/index_2/index.vue b/h5/pages/index_2/index.vue
index d8b3355..aed882f 100644
--- a/h5/pages/index_2/index.vue
+++ b/h5/pages/index_2/index.vue
@@ -288,6 +288,8 @@
 	import search from '@/components/search.vue'
 	import searchShopList from '@/components/searchShopList.vue'
 	import { categoryList, goodsList, brandList, h5Image, logout, getByLoginNew, listForH5 } from '@/apis/index.js'
+	import { ANCHOR_PAGE_V3, getAnchorHomePath, normalizeAnchorPageVersion } from '@/utils/anchorHome.js'
+	import { matchKeyword } from '@/utils/goodsFilter.js'
 	import { mapState } from 'vuex'
 	export default {
 		data() {
@@ -357,17 +359,28 @@
 				
 				title: '',
 				fontColor: 'rgba(255, 220, 108, 1)',
-				fontColorIndex: ''
+				fontColorIndex: '',
+				configuration: null
 			}
 		},
 		components: { bigImg, search, searchShopList },
 		onLoad() {
 			getByLoginNew({})
 				.then(res => {
-					if (!res.data) {
+					const data = (res && res.data) || res
+					if (!data) {
 						return
 					}
-					this.configuration = JSON.parse(res.data.newParam)
+					const version = normalizeAnchorPageVersion(data.anchorPageVersion)
+					if (version === ANCHOR_PAGE_V3) {
+						uni.redirectTo({ url: getAnchorHomePath(version) })
+						return
+					}
+					const paramStr = data.newParam
+					if (!paramStr) {
+						return
+					}
+					this.configuration = JSON.parse(paramStr)
 					this.fontColor = this.configuration.pull.selType === 1 ? this.percentage(this.configuration.pull.selColor, this.configuration.pull.selAlpha) : 'rgba(255, 220, 108, 1)'
 					if (this.configuration.bgImg.type === 0) {
 						this.bgImg = require('@/static/mb.png')
@@ -562,20 +575,12 @@
 			},
 			// 宸查�夊晢鍝佸垪琛ㄦ悳绱㈠搧鐗�
 			searchBrand(e, item) {
-				item.brandSearchList = item.brandList.filter(item => {
-					if (item.name.indexOf(e.detail.value) > -1) {
-						return item
-					}
-				})
+				item.brandSearchList = item.brandList.filter(brand => matchKeyword(brand, e.detail.value))
 				this.$forceUpdate()
 			},
 			// 宸查�夊晢鍝佸垪琛ㄦ悳绱㈠瀷鍙�
 			searchModel(e, item) {
-				item.modelSearchList = item.xhData.filter(item => {
-					if (item.name.indexOf(e.detail.value) !== -1) {
-						return item
-					}
-				})
+				item.modelSearchList = item.xhData.filter(goods => matchKeyword(goods, e.detail.value))
 				this.$forceUpdate()
 			},
 			// 鑾峰彇鎼滅储鐨勬爣棰�

--
Gitblit v1.9.3