jufubao-mall 2.0.73 → 2.0.74-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -255,7 +255,7 @@ export default {
|
|
|
255
255
|
ele: 'xd-margin-padding',
|
|
256
256
|
groupKey:'style',
|
|
257
257
|
valueKey: 'itemPadding',
|
|
258
|
-
value: data['itemPadding'] ||
|
|
258
|
+
value: data['itemPadding'] || { bottom: 24, left: 24, right: 24, top: 48 },
|
|
259
259
|
setting: {
|
|
260
260
|
type: 'margin',
|
|
261
261
|
},
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
<view
|
|
22
22
|
class="jfb-mall-product-type__body"
|
|
23
23
|
:style="{
|
|
24
|
-
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'
|
|
24
|
+
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx',
|
|
25
|
+
'--main-color': mainColor
|
|
25
26
|
}"
|
|
26
27
|
>
|
|
27
28
|
<view v-if="loadingList" class="skeleton-wrap">
|
|
@@ -94,26 +95,53 @@
|
|
|
94
95
|
{{item.category_name}}
|
|
95
96
|
</view>
|
|
96
97
|
</scroll-view>
|
|
97
|
-
<
|
|
98
|
-
<view
|
|
99
|
-
<view
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
98
|
+
<view class="jfb-mall-product-type__body_type2_content_right">
|
|
99
|
+
<view class="jfb-mall-product-type__body_type2_content_sort">
|
|
100
|
+
<view class="sort_item" :class="{active: sortType === 'default'}" @click="handleSort('default')">综合</view>
|
|
101
|
+
<view class="sort_item sort_item_with_icon" :class="{active: sortType === 'price_asc' || sortType === 'price_desc'}" @click="handleSort('price')">
|
|
102
|
+
<view>价格</view>
|
|
103
|
+
<view class="sort_icon_wrap">
|
|
104
|
+
<view class="sort_icon_item" :class="{highlight: sortType === 'price_asc'}">
|
|
105
|
+
<xd-font-icon icon="iconrepository-xialaxuanxiangup" :color="sortType === 'price_asc' ? mainColor : '#ccc'" size="18"></xd-font-icon>
|
|
106
|
+
</view>
|
|
107
|
+
<view class="sort_icon_item" :class="{highlight: sortType === 'price_desc'}">
|
|
108
|
+
<xd-font-icon icon="iconrepository-xialaxuanxiangdown" :color="sortType === 'price_desc' ? mainColor : '#ccc'" size="18"></xd-font-icon>
|
|
109
|
+
</view>
|
|
110
|
+
</view>
|
|
111
|
+
</view>
|
|
112
|
+
<view class="sort_item sort_item_with_icon" :class="{active: sortType === 'sale_num_asc' || sortType === 'sale_num_desc'}" @click="handleSort('sale_num')">
|
|
113
|
+
<view>销量</view>
|
|
114
|
+
<view class="sort_icon_wrap">
|
|
115
|
+
<view class="sort_icon_item" :class="{highlight: sortType === 'sale_num_asc'}">
|
|
116
|
+
<xd-font-icon icon="iconrepository-xialaxuanxiangup" :color="sortType === 'sale_num_asc' ? mainColor : '#ccc'" size="18"></xd-font-icon>
|
|
117
|
+
</view>
|
|
118
|
+
<view class="sort_icon_item" :class="{highlight: sortType === 'sale_num_desc'}">
|
|
119
|
+
<xd-font-icon icon="iconrepository-xialaxuanxiangdown" :color="sortType === 'sale_num_desc' ? mainColor : '#ccc'" size="18"></xd-font-icon>
|
|
120
|
+
</view>
|
|
121
|
+
</view>
|
|
113
122
|
</view>
|
|
114
|
-
<view v-if="!hasNext" class="noMore">—— 我是有底线的 ——</view>
|
|
115
123
|
</view>
|
|
116
|
-
|
|
124
|
+
<scroll-view :scroll-top="scrollTop" @scroll="handleScroll" @scrolltolower="handleScrolltolower" :style="{height:'calc(100% - 80rpx)'}" scroll-y="true" class="jfb-mall-product-type__body_type2_content_product">
|
|
125
|
+
<view :key="productKey" v-if="productList&&productList.length">
|
|
126
|
+
<view v-for="(item,index) in productList" :key="index" :style="[contProductStyles]">
|
|
127
|
+
<cus-product
|
|
128
|
+
:image-radius="imageRadius"
|
|
129
|
+
:brand-color="brandColor"
|
|
130
|
+
:height="contProductImageHeight"
|
|
131
|
+
:cell="column_num"
|
|
132
|
+
:name-font="itemFontStyle"
|
|
133
|
+
:product-config="productConfig"
|
|
134
|
+
:isPlus="is_plus_site"
|
|
135
|
+
:item="item"
|
|
136
|
+
:row-spacing="rowSpacing"
|
|
137
|
+
:cell-spacing="itemSpacing"
|
|
138
|
+
@on-product-detail="toProductInfo"
|
|
139
|
+
></cus-product>
|
|
140
|
+
</view>
|
|
141
|
+
<view v-if="!hasNext" class="noMore">—— 我是有底线的 ——</view>
|
|
142
|
+
</view>
|
|
143
|
+
</scroll-view>
|
|
144
|
+
</view>
|
|
117
145
|
</view>
|
|
118
146
|
<xd-no-data v-else height="300rpx">{{noData}}</xd-no-data>
|
|
119
147
|
</view>
|
|
@@ -188,6 +216,10 @@
|
|
|
188
216
|
is_plus_site: false,
|
|
189
217
|
productKey: 'productKey',
|
|
190
218
|
curParentIndex: 0,
|
|
219
|
+
hideMask: true,
|
|
220
|
+
|
|
221
|
+
// 排序功能
|
|
222
|
+
sortType: 'default', // default, price_desc, price_asc, sale_num_desc, sale_num_asc
|
|
191
223
|
}
|
|
192
224
|
},
|
|
193
225
|
computed: {
|
|
@@ -316,7 +348,7 @@
|
|
|
316
348
|
random_score_seed: this.random_score_seed,
|
|
317
349
|
page_token: this.page_token,
|
|
318
350
|
page_size: this.page_size,
|
|
319
|
-
sort:
|
|
351
|
+
sort: this.sortType,
|
|
320
352
|
custom_category_id: this.selectNav.category_id,
|
|
321
353
|
}
|
|
322
354
|
if(this.productConfig.isShowDiscount==='Y'){
|
|
@@ -518,6 +550,7 @@
|
|
|
518
550
|
handleChoseParentNav(data, index) {
|
|
519
551
|
this.navChildrenList = data.children;
|
|
520
552
|
this.curParentIndex = index;
|
|
553
|
+
this.sortType = 'default';
|
|
521
554
|
if(data.children.length){
|
|
522
555
|
this.selectNav = this.navChildrenList[0]
|
|
523
556
|
this.selectNavIndex = 0;
|
|
@@ -532,6 +565,31 @@
|
|
|
532
565
|
handleChoseNav(data,index) {
|
|
533
566
|
this.selectNav = data;
|
|
534
567
|
this.selectNavIndex = index;
|
|
568
|
+
this.sortType = 'default';
|
|
569
|
+
},
|
|
570
|
+
|
|
571
|
+
handleSort(type) {
|
|
572
|
+
if (type === 'default') {
|
|
573
|
+
this.sortType = 'default';
|
|
574
|
+
} else if (type === 'price') {
|
|
575
|
+
if (this.sortType === 'price_asc') {
|
|
576
|
+
this.sortType = 'price_desc';
|
|
577
|
+
} else if (this.sortType === 'price_desc') {
|
|
578
|
+
this.sortType = 'price_asc';
|
|
579
|
+
} else {
|
|
580
|
+
this.sortType = 'price_asc';
|
|
581
|
+
}
|
|
582
|
+
} else if (type === 'sale_num') {
|
|
583
|
+
if (this.sortType === 'sale_num_asc') {
|
|
584
|
+
this.sortType = 'sale_num_desc';
|
|
585
|
+
} else if (this.sortType === 'sale_num_desc') {
|
|
586
|
+
this.sortType = 'sale_num_asc';
|
|
587
|
+
} else {
|
|
588
|
+
this.sortType = 'sale_num_desc';
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
this.page_token = '1';
|
|
592
|
+
this.getProductList();
|
|
535
593
|
},
|
|
536
594
|
|
|
537
595
|
/**
|
|
@@ -831,6 +889,51 @@
|
|
|
831
889
|
padding: 20rpx 0;
|
|
832
890
|
}
|
|
833
891
|
}
|
|
892
|
+
&_content_right {
|
|
893
|
+
flex: 1;
|
|
894
|
+
display: flex;
|
|
895
|
+
flex-direction: column;
|
|
896
|
+
overflow: hidden;
|
|
897
|
+
}
|
|
898
|
+
&_content_sort {
|
|
899
|
+
height: 80rpx;
|
|
900
|
+
display: flex;
|
|
901
|
+
align-items: center;
|
|
902
|
+
justify-content: space-between;
|
|
903
|
+
padding: 0 24rpx;
|
|
904
|
+
background-color: #fff;
|
|
905
|
+
border-bottom: 1rpx solid #f5f5f5;
|
|
906
|
+
flex-shrink: 0;
|
|
907
|
+
.sort_item {
|
|
908
|
+
font-size: 26rpx;
|
|
909
|
+
color: #333;
|
|
910
|
+
display: flex;
|
|
911
|
+
align-items: center;
|
|
912
|
+
&.active {
|
|
913
|
+
color: var(--main-color);
|
|
914
|
+
font-weight: 500;
|
|
915
|
+
}
|
|
916
|
+
&.sort_item_with_icon {
|
|
917
|
+
justify-content: center;
|
|
918
|
+
align-items: center;
|
|
919
|
+
.sort_icon_wrap {
|
|
920
|
+
display: flex;
|
|
921
|
+
flex-direction: column;
|
|
922
|
+
align-items: center;
|
|
923
|
+
margin-left: 6rpx;
|
|
924
|
+
.sort_icon_item {
|
|
925
|
+
line-height: 1;
|
|
926
|
+
&.highlight {
|
|
927
|
+
color: var(--main-color);
|
|
928
|
+
}
|
|
929
|
+
& + .sort_icon_item {
|
|
930
|
+
margin-top: 2rpx;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
834
937
|
}
|
|
835
938
|
}
|
|
836
939
|
}
|
package/get.package.path.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 第三方库
|
|
5
|
-
* @param threePackagePath {String} 第三方库所在项目路径存放路径路
|
|
6
|
-
* @param packname {String} 包名字
|
|
7
|
-
* @returns {string|*}
|
|
8
|
-
*/
|
|
9
|
-
const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
|
|
10
|
-
if(packname === 'gxd-commands-bussiness') {
|
|
11
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (packname === 'gxd-uni-library-editx') {
|
|
15
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = {
|
|
21
|
-
getPackagePath
|
|
22
|
-
}
|