From 4f912f23e61912cb3195ca168f23bb521bf8b309 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期四, 21 九月 2023 13:37:16 +0800
Subject: [PATCH] 企业端
---
h5/pages/index/index.vue | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 55 insertions(+), 1 deletions(-)
diff --git a/h5/pages/index/index.vue b/h5/pages/index/index.vue
index 2df63d8..3a3651d 100644
--- a/h5/pages/index/index.vue
+++ b/h5/pages/index/index.vue
@@ -230,7 +230,12 @@
</view>
</view>
<view class="productPage_parameter_item_content_nr">
- <view class="item" v-for="(child, i) in item.goodsParamList" :key="i">
+ <view class="item" v-if="item.param1" v-for="(child, i) in item.param1" :key="child.index">
+ <view class="label">{{child.name}}锛�</view>
+ <view class="value">{{child.val}}</view>
+ </view>
+ <view v-if="item.param2" class="paramline"></view>
+ <view class="item" v-if="item.param2" v-for="(child, j) in item.param2" :key="child.index">
<view class="label">{{child.name}}锛�</view>
<view class="value">{{child.val}}</view>
</view>
@@ -858,6 +863,51 @@
this.leftShop = JSON.parse(JSON.stringify(val))
} else if (this.$refs.search.typeName === 'right') {
this.rightShop = JSON.parse(JSON.stringify(val))
+ let leftParamList = this.leftShop.goodsParamList;
+ let rightParamList = this.rightShop.goodsParamList;
+ let leftList1 = new Array();
+ let leftList2 = new Array();
+ let rightList1 = new Array();
+ let rightList2 = new Array();
+ if(leftParamList && leftParamList.length>0){
+ leftParamList.forEach(item => {
+ let flag =0;
+ let rightTemp = null;
+ if(rightParamList && rightParamList.length>0){
+ rightParamList.forEach(item1 => {
+ if (item.name === item1.name ) {
+ flag =1;
+ rightTemp = item1;
+ return;
+ }
+ })
+ }
+ if(flag === 1){
+ leftList1.push(item);
+ rightList1.push(rightTemp);
+ }else{
+ leftList2.push(item);
+ }
+ })
+ }
+ if(rightParamList && rightParamList.length>0){
+ rightParamList.forEach(item=> {
+ let flag1 = 0;
+ rightList1.forEach(item1 => {
+ if (item.name === item1.name ) {
+ flag1 =1;
+ //return;
+ }
+ })
+ if(flag1 === 0){
+ rightList2.push(item);
+ }
+ })
+ }
+ Reflect.set(this.leftShop, "param1",leftList1);
+ Reflect.set(this.leftShop, "param2",leftList2);
+ Reflect.set(this.rightShop, "param1",rightList1);
+ Reflect.set(this.rightShop, "param2",rightList2);
} else {
this.shopList.push(JSON.parse(JSON.stringify(val)))
}
@@ -1805,6 +1855,10 @@
margin-top: 12px;
display: flex;
flex-direction: column;
+ .paramline{
+ border-bottom: #c7c9ce 2px dashed;
+ margin-bottom: 15px;
+ }
.item {
display: flex;
align-items: flex-start;
--
Gitblit v1.9.3