From 2193f1e8240e2a0ed5900dddc6347a1d9db081cf Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期四, 21 九月 2023 14:38:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
h5/pages/index/index.vue | 103 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 85 insertions(+), 18 deletions(-)
diff --git a/h5/pages/index/index.vue b/h5/pages/index/index.vue
index 1571973..2336445 100644
--- a/h5/pages/index/index.vue
+++ b/h5/pages/index/index.vue
@@ -198,16 +198,19 @@
</view>
</view>
<view class="productPage_shop" v-if="status === 1 && !pkcontent">
- <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
- <view class="productPage_shop_item_img">
- <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
+ <noData v-if="shopPageData.length === 0 && shopPageDataSou.length === 0" />
+ <template v-else>
+ <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
+ <view class="productPage_shop_item_img">
+ <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
+ </view>
+ <!-- stringOperations(item.name, 6) -->
+ <text>{{item.name}}</text>
</view>
- <!-- stringOperations(item.name, 6) -->
- <text>{{item.name}}</text>
- </view>
- <view class="productPage_shop_zw"></view>
- <view class="productPage_shop_zw"></view>
- <view class="productPage_shop_zw"></view>
+ <view class="productPage_shop_zw"></view>
+ <view class="productPage_shop_zw"></view>
+ <view class="productPage_shop_zw"></view>
+ </template>
</view>
<!-- v-if="status === 2" -->
<view class="productPage_parameter" v-if="isPK && pkcontent">
@@ -227,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.length>0" 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>
@@ -241,6 +249,10 @@
<!-- 鏌ョ湅澶у浘 -->
<bigImg
ref="bigImg"
+ :imgList="imgList"/>
+ <!-- 鏌ョ湅澶у浘 -->
+ <bigImg1
+ ref="bigImg1"
:imgList="imgList"/>
<!-- 鎼滅储 -->
@@ -259,7 +271,9 @@
<script>
import bigImg from '@/components/bigImg.vue'
+ import bigImg1 from '@/components/bigImg1.vue'
import search from '@/components/search.vue'
+ import noData from '@/components/noData.vue'
import { mapState } from 'vuex'
import { categoryList, goodsList, brandList, h5Image, goodsPage, listForH5 } from '@/apis/index.js'
export default {
@@ -338,7 +352,7 @@
page: 1
}
},
- components: { bigImg, search },
+ components: { bigImg, search, noData, bigImg1 },
onLoad() {
var that = this
// 鐩戝惉閿洏缁勫悎閿�
@@ -694,7 +708,12 @@
})
}
})
- this.$refs.bigImg.open(0)
+ // console.log(this.imgList)
+ this.$viewerApi({
+ images: this.imgList,
+ })
+ // this.$refs.bigImg.open(0)
+ // this.$refs.bigImg1.open(0)
},
empty() {
this.shopList = []
@@ -844,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)))
}
@@ -1135,7 +1199,7 @@
margin-top: 16px;
.commodityFrom_head {
width: 100%;
- height: 60px;
+ height: 45px;
padding: 10px 8px;
box-sizing: border-box;
background: rgba(0,224,255,0.24) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
@@ -1182,7 +1246,7 @@
flex-direction: column;
.commodityFrom_body_content_item {
width: 100%;
- height: 56px;
+ height: 45px;
display: flex;
align-items: center;
margin-bottom: 6px;
@@ -1203,7 +1267,7 @@
opacity: 0;
transform: translate(0%, 0%);
z-index: -1;
- height: 56px;
+ height: 45px;
display: flex;
align-items: center;
background: rgba(0,224,255,0.3);
@@ -1352,7 +1416,7 @@
}
.commodityFrom_body_total {
width: 100%;
- height: 56px;
+ height: 45px;
display: flex;
align-items: center;
.commodityFrom_body_total_item {
@@ -1444,7 +1508,6 @@
}
}
}
-
.productPage {
width: 100%;
padding: 0 22px;
@@ -1452,7 +1515,7 @@
margin-top: 16px;
.productPage_head {
width: 100%;
- height: 60px;
+ height: 45px;
display: flex;
align-items: center;
background: rgba(0,224,255,0.34) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
@@ -1792,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