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 | 86 +++++++++++++++++++++++++++---------------
1 files changed, 55 insertions(+), 31 deletions(-)
diff --git a/h5/pages/index_2/index.vue b/h5/pages/index_2/index.vue
index cdcd8ca..aed882f 100644
--- a/h5/pages/index_2/index.vue
+++ b/h5/pages/index_2/index.vue
@@ -92,6 +92,7 @@
<image src="@/static/ic_img@2x.png" mode="widthFix" @click="openImg(index)"></image>
<image src="@/static/ic_copy@2x.png" mode="widthFix" @click="copyItem(item)"></image>
<image src="@/static/ic_delete@2x.png" mode="widthFix" @click="deleItem(index)"></image>
+ <image src="@/static/ic_pk2@2x.png" mode="widthFix" @click="clickItem(-1, item.categoryId, item.categoryName,2,item)"></image>
</view>
</view>
</view>
@@ -112,9 +113,9 @@
class="productCategory_list_item"
v-for="(item, index) in category"
:key="index"
- @click="clickItem(index, item.id, item.name)">
+ @click="clickItem(index, item.id, item.name,1)">
<image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
- <text>{{item.name}}</text>
+ <text :style="{'font-size': !configuration || !configuration.listname?'16px':((configuration.listname.fontSize||16) +'px'),color: !configuration || !configuration.listname? '#ffffff' : configuration.listname.selType === 1 ? percentage(configuration.listname.selColor, configuration.listname.selAlpha) : '#ffffff'}">{{item.name}}</text>
</view>
<view class="productCategory_list_zw"></view>
<view class="productCategory_list_zw"></view>
@@ -215,7 +216,7 @@
<view class="productPage_shop_item_img">
<image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
</view>
- <text>{{item.name}}</text>
+ <text :style="{'font-size': !configuration || !configuration.listproname ?'16px':((configuration.listproname.fontSize||16) +'px'),color: !configuration || !configuration.listproname ? '#ffffff' : configuration.listproname.selType === 1 ? percentage(configuration.listproname.selColor, configuration.listproname.selAlpha) : '#ffffff',color: !configuration ||!configuration.listproname ? '#ffffff' : configuration.listproname.selType === 1 ? percentage(configuration.listproname.selColor, configuration.listproname.selAlpha) : '#ffffff'}">{{item.name}}</text>
</view>
<view class="productPage_shop_zw"></view>
<view class="productPage_shop_zw"></view>
@@ -225,7 +226,7 @@
<view class="productPage_parameter" v-if="isPK && pkcontent">
<view class="productPage_parameter_item" v-for="(item, index) in [leftShop, rightShop]" :key="index">
<view class="productPage_parameter_item_head" :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%)` : percentage(configuration.header.bgColor, configuration.header.bgAlpha), color: !configuration ? 'rgba(255, 255, 255, 1)' : configuration.header.type === 1 ? percentage(configuration.header.color, configuration.header.alpha) : 'rgba(255, 255, 255, 1)'}">
- {{item.name}}
+ <text>{{item.name}}</text>
</view>
<view class="productPage_parameter_item_content" :style="{background: !configuration ? 'rgba(137, 159, 197, 1)' : configuration.list.bgType === 1 ? percentage(configuration.list.bgColor, configuration.list.bgAlpha) : 'rgba(137, 159, 197, 1)'}">
<view class="productPage_parameter_item_content_price">
@@ -287,12 +288,14 @@
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() {
return {
status: 0, // 0棣栭〉 1鍟嗗搧鍒楄〃 2pk椤�
-
+ backPageNum:1,//杩斿洖椤垫暟
img: '',
opacity: 1,
@@ -350,24 +353,34 @@
zdj: 0,
select: [], // 宸查��
- configuration: null,
bgImg: '',
topImg: '',
pkImg: '',
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')
@@ -384,6 +397,7 @@
} else {
this.pkImg = this.configuration.pkImg.imgurl
}
+ console.log(this.configuration.listname)
})
var that = this
// 鐩戝惉閿洏缁勫悎閿�
@@ -513,6 +527,9 @@
}
},
methods: {
+ jumpPKNew(){
+ this.status = 1
+ },
aaa(index) {
this.fontColorIndex = index
},
@@ -558,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()
},
// 鑾峰彇鎼滅储鐨勬爣棰�
@@ -677,7 +686,7 @@
if (this.status === 0) return
this.$refs.search.close()
this.$refs.searchShopListRef.close()
- this.status = this.status - 1
+ this.status = this.status -(this.backPageNum>0?this.backPageNum:1)
if (this.status === 0) {
this.leftShop = {}
this.rightShop = {}
@@ -755,11 +764,12 @@
},
// 鐐瑰嚮鍔犲叆pk鍟嗗搧
openSearch(type) {
- if (type === 'left') {
+ this.$refs.search.open(type)
+ /* if (type === 'left') {
this.$refs.search.open('left')
} else if (type === 'right') {
this.$refs.search.open('right')
- }
+ } */
},
// 鐐瑰嚮鍟嗗搧鍒楄〃椤甸潰鏌ヨ
clickShopPageCheck(item, type) {
@@ -983,7 +993,7 @@
this.$forceUpdate()
},
// 鐐瑰嚮绫诲埆
- clickItem(index, id, name) {
+ clickItem(index, id, name,status,proItem) {
this.categoryId = id
this.categoryName = name
this.isSOU = false
@@ -997,7 +1007,7 @@
})
this.category.forEach((item, num) => {
- if (index === num) {
+ if (item.id === id) {
item.active = true
this.attrSecondList = []
@@ -1055,6 +1065,12 @@
this.shopPageData = this.shopData.filter(item => {
return item.categoryId === id
})
+ if(status ==2){
+ this.leftShop=proItem
+ this.backPageNum =2
+ }else{
+ this.backPageNum=1
+ }
console.log(this.shopPageData)
// this.shopData.forEach(item => {
// if (item.categoryId === id) {
@@ -1078,7 +1094,7 @@
id: '',
name: ''
},
- this.status = 1
+ this.status = status || 1
},
mousemove(e) {
if (e === this.index) return
@@ -1767,16 +1783,17 @@
width: 100%;
display: flex;
align-items: flex-start;
+ justify-content: space-between;
margin-bottom: 30px;
.productPage_parameter_item {
- flex: 1;
+ width: 49%;
&:first-child {
margin-right: 18px;
}
.productPage_parameter_item_head {
width: 100%;
height: 40px;
- background: rgba(0,224,255,0.34) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
+ // background: rgba(0,224,255,0.34) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
border-radius: 8px 8px 0px 0px;
display: flex;
align-items: center;
@@ -1784,10 +1801,17 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
- text-align: center;
- font-size: 16px;
- font-weight: 500;
- color: #FFFFFF;
+ text {
+ width: 100%;
+ text-align: center;
+ font-size: 16px;
+ font-family: SourceHanSansSC-Medium, SourceHanSansSC;
+ font-weight: 500;
+ color: #FFFFFF;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
}
.productPage_parameter_item_content {
width: 100%;
--
Gitblit v1.9.3