jufubao-mall 2.0.75 → 2.0.77-beta1
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 +1 -1
- package/src/components/JfbMallConfirm/JfbMallConfirm.vue +5 -1
- package/src/components/JfbMallProductList/ComFilterQuery.vue +20 -0
- package/src/components/JfbMallProductList/JfbMallProductList.vue +59 -22
- package/src/components/JfbMallProductList/cusAttr/content.js +122 -103
- package/src/components/JfbMallSearch/JfbMallSearch.vue +1 -1
package/package.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<xd-list-item v-if="shop.takeoutTimeList" :label="shop.time_label" show-right :paddingLR="isCardLayout ? '32rpx' : '48rpx'" paddingTB="24rpx" @click="toSetTakeoutTime(shopIndex,shop)" class="xd-my-list-item">
|
|
103
103
|
<view style="">{{shop.takeoutTime ? shop.takeoutTime.dateTime : '请选择'}}</view>
|
|
104
104
|
</xd-list-item>
|
|
105
|
-
</template>
|
|
105
|
+
</template>
|
|
106
106
|
</template>
|
|
107
107
|
</view>
|
|
108
108
|
<!-- <xd-list-item v-if="shop.delivery_message" :label="shop.delivery_message" paddingLR="48rpx" size="large"></xd-list-item> -->
|
|
@@ -132,6 +132,9 @@
|
|
|
132
132
|
<xd-list-item v-if="showLogisticsAmount&&main_show_delivery_price==='Y'" label="商品运费" :paddingLR="isCardLayout ? '32rpx' : '48rpx'">
|
|
133
133
|
<xd-unit :price="orderFee.user_logistics_amount_origin" :isOld="false" :fontSize="28" :iconSize="0.3"></xd-unit>
|
|
134
134
|
</xd-list-item>
|
|
135
|
+
<xd-list-item label="平台服务费" :paddingLR="isCardLayout ? '32rpx' : '48rpx'">
|
|
136
|
+
<xd-unit :price="orderFee.main_user_server_amount" :isOld="false" :fontSize="28" :iconSize="0.3"></xd-unit>
|
|
137
|
+
</xd-list-item>
|
|
135
138
|
</view>
|
|
136
139
|
<view v-if="showPrice === 'Y' || otherPayMethod.filter(it => it.method!=='third').length" class="money_box">
|
|
137
140
|
<template v-if="showPrice === 'Y'">
|
|
@@ -1554,6 +1557,7 @@
|
|
|
1554
1557
|
product_amount: res.product_amount,
|
|
1555
1558
|
plus_saving_money: res.plus_saving_money,
|
|
1556
1559
|
origin_amount: res.origin_amount,
|
|
1560
|
+
main_user_server_amount: res.main_user_server_amount,
|
|
1557
1561
|
}
|
|
1558
1562
|
//支付方式跟用户相关,与订单无关。
|
|
1559
1563
|
//只获取一次。
|
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
</view>
|
|
54
54
|
</view>
|
|
55
55
|
</template>
|
|
56
|
+
<view v-if="combLayout==='Y'" class="jfb-filter-menu-ext" @click="handleCombLayout">
|
|
57
|
+
<xd-font-icon :icon="combIcon" width="50" :size="28"/>
|
|
58
|
+
</view>
|
|
56
59
|
</view>
|
|
57
60
|
<view class="jfb-filter-pop" :style="[queryTopComp]">
|
|
58
61
|
<view
|
|
@@ -223,6 +226,15 @@ export default {
|
|
|
223
226
|
type: Number,
|
|
224
227
|
default: 3
|
|
225
228
|
},
|
|
229
|
+
|
|
230
|
+
//组合布局, 组合内布局可互相切换
|
|
231
|
+
combLayout: {
|
|
232
|
+
type: String,
|
|
233
|
+
default: "N"
|
|
234
|
+
},
|
|
235
|
+
combIcon: {
|
|
236
|
+
type: String
|
|
237
|
+
}
|
|
226
238
|
},
|
|
227
239
|
filters:{
|
|
228
240
|
fCusName(item){
|
|
@@ -799,6 +811,9 @@ export default {
|
|
|
799
811
|
|
|
800
812
|
},
|
|
801
813
|
//==其他菜单下拉操作====
|
|
814
|
+
handleCombLayout(){
|
|
815
|
+
this.$emit("switch-layout")
|
|
816
|
+
},
|
|
802
817
|
|
|
803
818
|
update(){
|
|
804
819
|
let params = {};
|
|
@@ -892,6 +907,11 @@ export default {
|
|
|
892
907
|
//}
|
|
893
908
|
}
|
|
894
909
|
|
|
910
|
+
&-ext{
|
|
911
|
+
display: flex;
|
|
912
|
+
align-items: center;
|
|
913
|
+
}
|
|
914
|
+
|
|
895
915
|
&-name {
|
|
896
916
|
|
|
897
917
|
&.fontWeight {
|
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
ref="filter-query"
|
|
75
75
|
:show-query="showQuery"
|
|
76
76
|
:layout-info="layoutInfo"
|
|
77
|
+
:comb-layout="combLayout"
|
|
78
|
+
:comb-icon="switchLayoutIcon"
|
|
77
79
|
:top-height="cateFixedHeight"
|
|
78
80
|
:cus-menu-style="queryMenuStyleComp"
|
|
79
81
|
:cus-pop-style="filterStyle"
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
:def-remote="defMenuValue"
|
|
85
87
|
:price-range="[startPrice, endPrice]"
|
|
86
88
|
@on-change="handleFitlerChange"
|
|
89
|
+
@switch-layout="handleSwitchLayout"
|
|
87
90
|
></com-filter-query>
|
|
88
91
|
</template>
|
|
89
92
|
<!--搜索条件-->
|
|
@@ -216,6 +219,7 @@
|
|
|
216
219
|
import posterMixins from "@/mixins/posterMixins";
|
|
217
220
|
import CusPoster from "@/components/CusPoster/CusPoster.vue";
|
|
218
221
|
import XdNoData from "@/components/XdNoData/XdNoData";
|
|
222
|
+
import storage from "@/common/storage";
|
|
219
223
|
|
|
220
224
|
export default {
|
|
221
225
|
name: "JfbMallProductList",
|
|
@@ -265,6 +269,7 @@
|
|
|
265
269
|
contentColor:'',
|
|
266
270
|
filterModeData:[],//菜单数量
|
|
267
271
|
parentId:0, //获取商品分类父级ID
|
|
272
|
+
combLayout: "N", //组合布局, 组合内布局可互相切换
|
|
268
273
|
|
|
269
274
|
//==搜索条件=============
|
|
270
275
|
filterPadding:{},
|
|
@@ -416,6 +421,14 @@
|
|
|
416
421
|
console.log('resultList', resultList);
|
|
417
422
|
return resultList;
|
|
418
423
|
},
|
|
424
|
+
switchLayoutIcon(){
|
|
425
|
+
//当前为2列时显示原始布局的icon,否则显示2列布局的icon
|
|
426
|
+
const targetLayout = this.column_num === 2
|
|
427
|
+
? (this.orgColumnNum === 2 ? 1 : this.orgColumnNum)
|
|
428
|
+
: 2;
|
|
429
|
+
const iconMap = { 1: 'iconfenlei', 2: 'icona-huaban1', 3: 'iconsanlie', 4: 'icondanlie' };
|
|
430
|
+
return iconMap[targetLayout] || 'icona-huaban6';
|
|
431
|
+
}
|
|
419
432
|
},
|
|
420
433
|
watch: {
|
|
421
434
|
container(value,oldValue) {
|
|
@@ -619,30 +632,20 @@
|
|
|
619
632
|
this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code||this.xnamespace);
|
|
620
633
|
this.listPadding = gCPVal(container,'listPadding', [{top:16, left:16, right:16,bottom:16},20], {sKey:'listPaddingStatus',fields:['listPadding'],isPMR: true});
|
|
621
634
|
this.contentColor = gCPVal(container,'contentColor', ['#f8f8f8','#fafafa'], {sKey:'contentColorStatus',fields:['contentColor']});
|
|
635
|
+
this.combLayout = gCPVal(container, 'combLayout', 'N');
|
|
622
636
|
let column_num = gCPVal(container, 'row_num', 2);
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
if(
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
//一列水平
|
|
632
|
-
if( column_num === 1) {
|
|
633
|
-
this.skeNumber = 10;
|
|
634
|
-
this.page_size = 20;
|
|
635
|
-
this.columnOneLayout = 'H';
|
|
636
|
-
}
|
|
637
|
-
if( column_num === 2) {
|
|
638
|
-
this.skeNumber = 5;
|
|
639
|
-
this.page_size = 20;
|
|
640
|
-
}
|
|
641
|
-
if(column_num === 3) {
|
|
642
|
-
this.skeNumber = 6;
|
|
643
|
-
this.page_size = 21;
|
|
637
|
+
// 读取缓存的布局,若与当前配置相等或为互斥组合,则使用缓存值
|
|
638
|
+
const cachedLayout = storage.get('jfb_mall_product_list_layout');
|
|
639
|
+
if (cachedLayout != null && this.combLayout === 'Y' && !this.$configProject['isPreview']) {
|
|
640
|
+
const validPairs = [[4,2], [1,2], [2,1], [3,2]];
|
|
641
|
+
const isValid = cachedLayout === column_num || validPairs.some(([a, b]) => a === cachedLayout && b === column_num);
|
|
642
|
+
if (isValid) {
|
|
643
|
+
column_num = cachedLayout;
|
|
644
|
+
}
|
|
644
645
|
}
|
|
645
|
-
|
|
646
|
+
this.column_num = column_num;
|
|
647
|
+
this.orgColumnNum = column_num;
|
|
648
|
+
this.handleColumnInit(column_num);
|
|
646
649
|
|
|
647
650
|
//广告位置
|
|
648
651
|
this.isPoster = gCPVal(container, 'isPoster', 'N');
|
|
@@ -975,7 +978,30 @@
|
|
|
975
978
|
//记载完成
|
|
976
979
|
this.initStatus = true;
|
|
977
980
|
},
|
|
981
|
+
handleColumnInit(column_num){
|
|
982
|
+
//一列垂直
|
|
983
|
+
if(column_num === 4) {
|
|
984
|
+
this.column_num = 1;
|
|
985
|
+
this.columnOneLayout = 'V';
|
|
986
|
+
this.skeNumber = 10;
|
|
987
|
+
this.page_size = 20;
|
|
988
|
+
}
|
|
989
|
+
//一列水平
|
|
990
|
+
if( column_num === 1) {
|
|
991
|
+
this.skeNumber = 10;
|
|
992
|
+
this.page_size = 20;
|
|
993
|
+
this.columnOneLayout = 'H';
|
|
994
|
+
}
|
|
995
|
+
if( column_num === 2) {
|
|
996
|
+
this.skeNumber = 5;
|
|
997
|
+
this.page_size = 20;
|
|
998
|
+
}
|
|
999
|
+
if(column_num === 3) {
|
|
1000
|
+
this.skeNumber = 6;
|
|
1001
|
+
this.page_size = 21;
|
|
1002
|
+
}
|
|
978
1003
|
|
|
1004
|
+
},
|
|
979
1005
|
//=====广告数据,商品列表, 分类数据,过滤条件===========
|
|
980
1006
|
//广告列表
|
|
981
1007
|
getPosterList(){
|
|
@@ -1242,6 +1268,17 @@
|
|
|
1242
1268
|
},
|
|
1243
1269
|
//==菜单相关操作==============
|
|
1244
1270
|
|
|
1271
|
+
handleSwitchLayout(){
|
|
1272
|
+
// 组合布局切换:当前布局 ↔ 2列布局
|
|
1273
|
+
if(this.column_num === 2) {
|
|
1274
|
+
this.column_num = this.orgColumnNum === 2 ? 1 : this.orgColumnNum;
|
|
1275
|
+
} else {
|
|
1276
|
+
this.column_num = 2;
|
|
1277
|
+
}
|
|
1278
|
+
storage.set('jfb_mall_product_list_layout', this.column_num);
|
|
1279
|
+
this.handleColumnInit(this.column_num);
|
|
1280
|
+
},
|
|
1281
|
+
|
|
1245
1282
|
toProductInfo(item){
|
|
1246
1283
|
if (this.$configProject['isPreview'])return;
|
|
1247
1284
|
toProductDetail(this, item, this.productInfoPath, item.isCart === 'Y');
|
|
@@ -129,113 +129,116 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
129
129
|
});
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
132
|
+
data.category !== 'none' && [
|
|
133
|
+
{ele: 'group_start'},
|
|
134
|
+
{
|
|
135
|
+
label: "全部名称",
|
|
136
|
+
ele: "el-input",
|
|
137
|
+
valueKey: "allName",
|
|
138
|
+
value: data.allName || "",
|
|
139
|
+
labelInline: true,
|
|
140
|
+
className: "input100",
|
|
141
|
+
groupKey:'content',
|
|
142
|
+
inline:false,
|
|
143
|
+
notice:'设置全部自定义名称,默认值:<span style="color:red">全部</span>',
|
|
144
|
+
rules: [
|
|
145
|
+
{
|
|
146
|
+
required: false,
|
|
147
|
+
validator: (rule, value, callback) => {
|
|
148
|
+
value = value.trim();
|
|
149
|
+
if(value.length === 0) return callback()
|
|
150
|
+
if (value.length < 2 || value.length > 4) callback('全部自定义名称长度为:1-4字符');
|
|
151
|
+
else callback()
|
|
152
|
+
},
|
|
153
|
+
trigger: 'blur'
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: '全部图标',
|
|
159
|
+
ele: 'xd-upload',
|
|
160
|
+
valueKey: 'allIcon',
|
|
161
|
+
value: data['allIcon'] || {},
|
|
162
|
+
defaultValue: data['allIcon'],
|
|
163
|
+
slot: true,
|
|
164
|
+
tipsformet: ``,
|
|
165
|
+
type: ['jpg', 'png', 'jpeg','gif'],
|
|
166
|
+
styleType: 'one',
|
|
167
|
+
uploadType: 'aliyun',
|
|
168
|
+
groupKey:'content',
|
|
169
|
+
size: .5,
|
|
170
|
+
action: 'aliyun',
|
|
171
|
+
oneWidth: 128,
|
|
172
|
+
oneHeight: 128,
|
|
173
|
+
labelInline: true,
|
|
174
|
+
inline:false,
|
|
175
|
+
notice:'建议尺寸:128*128像素',
|
|
176
|
+
rules: [
|
|
177
|
+
['v2', 'v3', 'v4'].includes(data.category) && {
|
|
178
|
+
validator: (rule, value, callback) => {
|
|
179
|
+
if(!value) callback('请上传全部图片图片');
|
|
180
|
+
else {
|
|
181
|
+
if(!isObject(value)){
|
|
182
|
+
callback('请上传全部图片图片');
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
if(!value.url)callback('请上传全部图片图片');
|
|
186
|
+
else callback()
|
|
187
|
+
}
|
|
182
188
|
}
|
|
189
|
+
},
|
|
190
|
+
message: '请上传全部图片图片',
|
|
191
|
+
trigger: ['blur', 'change'],
|
|
192
|
+
required: true,
|
|
193
|
+
}
|
|
194
|
+
].filter(i=>i),
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label: '父级分类',
|
|
198
|
+
ele: 'xd-radio',
|
|
199
|
+
groupKey: 'content',
|
|
200
|
+
valueKey: 'categoryParentType',
|
|
201
|
+
value: categoryParentType,
|
|
202
|
+
labelInline:true,
|
|
203
|
+
className: 'input100',
|
|
204
|
+
list: [
|
|
205
|
+
{label: '根目录', value: 'root'},
|
|
206
|
+
{label: '自定义', value: 'child'},
|
|
207
|
+
],
|
|
208
|
+
notice:'展示指定父级分类下的子级分类',
|
|
209
|
+
inline: false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: '',
|
|
213
|
+
ele: 'el-input',
|
|
214
|
+
type: 'number',
|
|
215
|
+
labelInline: true,
|
|
216
|
+
valueKey: 'categoryParent',
|
|
217
|
+
cusStyle: {
|
|
218
|
+
paddingLeft: '90px'
|
|
219
|
+
},
|
|
220
|
+
value: dataVal({data, key:'categoryParent', dValue:'', gValue}),
|
|
221
|
+
groupKey:'content',
|
|
222
|
+
className: 'input100',
|
|
223
|
+
hidden: categoryParentType === 'root',
|
|
224
|
+
rules: [
|
|
225
|
+
{
|
|
226
|
+
validator: (rule, value, callback) => {
|
|
227
|
+
if(categoryParentType === 'root') callback();
|
|
183
228
|
else {
|
|
184
|
-
if(!value
|
|
229
|
+
if(!value) callback('请输入父级分类ID');
|
|
185
230
|
else callback()
|
|
186
231
|
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
],
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
label: '父级分类',
|
|
197
|
-
ele: 'xd-radio',
|
|
198
|
-
groupKey: 'content',
|
|
199
|
-
valueKey: 'categoryParentType',
|
|
200
|
-
value: categoryParentType,
|
|
201
|
-
labelInline:true,
|
|
202
|
-
className: 'input100',
|
|
203
|
-
list: [
|
|
204
|
-
{label: '根目录', value: 'root'},
|
|
205
|
-
{label: '自定义', value: 'child'},
|
|
206
|
-
],
|
|
207
|
-
notice:'展示指定父级分类下的子级分类',
|
|
208
|
-
inline: false
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
label: '',
|
|
212
|
-
ele: 'el-input',
|
|
213
|
-
type: 'number',
|
|
214
|
-
labelInline: true,
|
|
215
|
-
valueKey: 'categoryParent',
|
|
216
|
-
cusStyle: {
|
|
217
|
-
paddingLeft: '90px'
|
|
232
|
+
},
|
|
233
|
+
message: '请输入父级分类ID',
|
|
234
|
+
trigger: ['blur', 'change'],
|
|
235
|
+
required: true,
|
|
236
|
+
}
|
|
237
|
+
],
|
|
218
238
|
},
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
hidden: categoryParentType === 'root',
|
|
223
|
-
rules: [
|
|
224
|
-
{
|
|
225
|
-
validator: (rule, value, callback) => {
|
|
226
|
-
if(categoryParentType === 'root') callback();
|
|
227
|
-
else {
|
|
228
|
-
if(!value) callback('请输入父级分类ID');
|
|
229
|
-
else callback()
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
message: '请输入父级分类ID',
|
|
233
|
-
trigger: ['blur', 'change'],
|
|
234
|
-
required: true,
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
},
|
|
238
|
-
{ele: 'group_end'},
|
|
239
|
+
{ele: 'group_end'},
|
|
240
|
+
],
|
|
241
|
+
|
|
239
242
|
{
|
|
240
243
|
label: "分类样式",
|
|
241
244
|
ele: "xd-style-image",
|
|
@@ -301,6 +304,22 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
301
304
|
});
|
|
302
305
|
},
|
|
303
306
|
},
|
|
307
|
+
{ele: 'group_start'},
|
|
308
|
+
{
|
|
309
|
+
label: "组合布局",
|
|
310
|
+
ele: "xd-radio",
|
|
311
|
+
groupKey: 'content',
|
|
312
|
+
valueKey: "combLayout",
|
|
313
|
+
value: dataVal({data, key:'combLayout', dValue:'N', gValue}),
|
|
314
|
+
labelInline:true,
|
|
315
|
+
inline: false,
|
|
316
|
+
list:[
|
|
317
|
+
{label:"开启", value:"Y"},
|
|
318
|
+
{label:"禁用", value:"N"}
|
|
319
|
+
],
|
|
320
|
+
notice:'开启组合布局后,用户可在多个布局之间切换 ',
|
|
321
|
+
},
|
|
322
|
+
{ele: 'group_end'},
|
|
304
323
|
{
|
|
305
324
|
label: "商品样式",
|
|
306
325
|
ele: "xd-style-image",
|
|
@@ -461,5 +480,5 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
461
480
|
|
|
462
481
|
...ProductAttr(data, gValue,gColor,oldData),
|
|
463
482
|
...PosterAttr(data, gValue,gColor,oldData)
|
|
464
|
-
]
|
|
483
|
+
].flat().filter(i=>i)
|
|
465
484
|
}
|