jufubao-food 1.0.15-beta1 → 1.0.15-beta3
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/JfbFoodConfirmV2/JfbFoodConfirmV2.vue +3 -1
- package/src/components/JfbFoodProductInfo/Attr.js +9 -15
- package/src/components/JfbFoodProductInfo/cusAttr/advanced.js +28 -0
- package/src/components/JfbFoodProductInfo/cusAttr/content.js +40 -0
- package/src/components/JfbFoodProductInfo/cusAttr/style.js +56 -0
- package/src/components/JfbFoodProductList/Api.js +14 -0
- package/src/components/JfbFoodProductList/JfbFoodProductList.vue +427 -141
- package/src/components/JfbFoodProductList/Mock.js +301 -7
- package/src/components/JfbFoodProductList/cusAttr/content.js +71 -0
- package/src/components/JfbFoodProductList/cusAttr/style.js +333 -42
|
@@ -1,9 +1,303 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
getFoodShopDetail: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
getFoodShopDetail: {
|
|
5
|
+
resource_shop_id: 8003557,
|
|
6
|
+
shop_id: 1170110,
|
|
7
|
+
shop_name: "星巴克(平谷国泰店)",
|
|
8
|
+
shop_icon: "",
|
|
9
|
+
province_code: "",
|
|
10
|
+
province_name: "",
|
|
11
|
+
city_code: "jfb1",
|
|
12
|
+
city_name: "北京",
|
|
13
|
+
area_code: "",
|
|
14
|
+
area_name: "",
|
|
15
|
+
street_code: "",
|
|
16
|
+
street_name: "",
|
|
17
|
+
address: "平谷区文化北街13号国泰商场一层",
|
|
18
|
+
about: "",
|
|
19
|
+
latitude: "40.146809614188",
|
|
20
|
+
longitude: "117.11770942955",
|
|
21
|
+
distance: "519.5km",
|
|
22
|
+
meal_method: ["in_store", "take_away"],
|
|
23
|
+
phone: "(010)89968048",
|
|
24
|
+
request_id: "e32700aa4017803f"
|
|
25
|
+
},
|
|
26
|
+
getFoodShopCategory: {
|
|
27
|
+
categories: [
|
|
28
|
+
{
|
|
29
|
+
category_id: "a0aacaff0fb278c5f8127cec63ec3a53",
|
|
30
|
+
category_name: "限时特惠",
|
|
31
|
+
cart_num: 1
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
category_id: "c3e817f29eca3343734ef1e5e644b211",
|
|
35
|
+
category_name: "夏日心动推荐",
|
|
36
|
+
cart_num: 0
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
category_id: "4700b6e5b19a9ff788b3dd421421ab6b",
|
|
40
|
+
category_name: "真味无糖",
|
|
41
|
+
cart_num: 0
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
category_id: "54e63a4221698549900f442105821a95",
|
|
45
|
+
category_name: "浓缩咖啡",
|
|
46
|
+
cart_num: 0
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
category_id: "b083cfcac8944b26225edbcdff22b0e3",
|
|
50
|
+
category_name: "金烘浓缩",
|
|
51
|
+
cart_num: 0
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
category_id: "834cd2779458568a5278538eb3cb6920",
|
|
55
|
+
category_name: "冷萃咖啡",
|
|
56
|
+
cart_num: 0
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
category_id: "af722afe78ed62dbe365b5d2360df690",
|
|
60
|
+
category_name: "植物基咖啡",
|
|
61
|
+
cart_num: 0
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
category_id: "d6f14098f1d00bf849edef62f29ea094",
|
|
65
|
+
category_name: "星巴克冰震浓缩",
|
|
66
|
+
cart_num: 0
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
category_id: "6af82de72ee20bbc204e4c25cac7326b",
|
|
70
|
+
category_name: "浓小杯",
|
|
71
|
+
cart_num: 0
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
category_id: "8e39244d99a7b8ea0192842005be5ff4",
|
|
75
|
+
category_name: "软雪星冰乐",
|
|
76
|
+
cart_num: 0
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
category_id: "61077dd3605a7bc2b8f4eb1ba3e6367b",
|
|
80
|
+
category_name: "咖啡星冰乐",
|
|
81
|
+
cart_num: 0
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
category_id: "3c18282df5e406c82571de20d1e22f28",
|
|
85
|
+
category_name: "无咖啡星冰乐",
|
|
86
|
+
cart_num: 0
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
category_id: "b88f8211c9249db7e85949fc8fc8c6f5",
|
|
90
|
+
category_name: "冰摇茶",
|
|
91
|
+
cart_num: 0
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
category_id: "07378726d90bf8bf36a4e1a67bfbe904",
|
|
95
|
+
category_name: "茶拿铁",
|
|
96
|
+
cart_num: 0
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
category_id: "258c7f91f59a21564947fc89a4c8fce3",
|
|
100
|
+
category_name: "冰摇",
|
|
101
|
+
cart_num: 0
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
category_id: "04a8025f45c4b4bbe07d7021c0773538",
|
|
105
|
+
category_name: "巧克力",
|
|
106
|
+
cart_num: 0
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
category_id: "4ee301588298388e3886cbda9673e6e6",
|
|
110
|
+
category_name: "蒸气奶",
|
|
111
|
+
cart_num: 0
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
request_id: "2ff41432222daffd"
|
|
115
|
+
},
|
|
116
|
+
getFoodProductList: {
|
|
117
|
+
lists: [
|
|
118
|
+
{
|
|
119
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
120
|
+
product_id: 1135,
|
|
121
|
+
product_name: "金桂花香拿铁",
|
|
122
|
+
thumb:
|
|
123
|
+
"https://img02.luckincoffeecdn.com/group5/M00/82/F0/Ct1rZGiN4-aAWpYOAA4lXwBx92g639.gif",
|
|
124
|
+
has_choose: true,
|
|
125
|
+
cart_num: 0,
|
|
126
|
+
show_prices: [
|
|
127
|
+
{ p: 1875, n: "", t: "S" },
|
|
128
|
+
{ p: 1625, n: "PLUS价", t: "D" },
|
|
129
|
+
{ "p": 2000, "n": "原价", "t": "U" },
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
134
|
+
product_id: 804,
|
|
135
|
+
product_name: "羽衣轻体果蔬茶",
|
|
136
|
+
thumb:
|
|
137
|
+
"https://img05.luckincoffeecdn.com/group5/M00/E6/7D/Ct1rZGhsxb2AItrVAAGqa_xIFyk658.png",
|
|
138
|
+
has_choose: true,
|
|
139
|
+
cart_num: 0,
|
|
140
|
+
show_prices: [
|
|
141
|
+
{ p: 1680, n: "", t: "S" },
|
|
142
|
+
{ p: 1456, n: "PLUS价", t: "D" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
147
|
+
product_id: 794,
|
|
148
|
+
product_name: "鲜萃轻轻茉莉",
|
|
149
|
+
thumb:
|
|
150
|
+
"https://img06.luckincoffeecdn.com/group5/M01/24/1D/Ct1rZGhuSDGATZFPAAIB35XSyG4945.png",
|
|
151
|
+
has_choose: false,
|
|
152
|
+
cart_num: 1,
|
|
153
|
+
num: 1,
|
|
154
|
+
show_prices: [
|
|
155
|
+
{ p: 1680, n: "", t: "S" },
|
|
156
|
+
{ p: 1456, n: "PLUS价", t: "D" }
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
161
|
+
product_id: 801,
|
|
162
|
+
product_name: "熊猫陨石拿铁",
|
|
163
|
+
thumb:
|
|
164
|
+
"https://img06.luckincoffeecdn.com/group5/M00/B2/D5/Ct1rZGhrsLyAW6EQAAH2jgMWeuE461.png",
|
|
165
|
+
has_choose: false,
|
|
166
|
+
cart_num: 0,
|
|
167
|
+
show_prices: [
|
|
168
|
+
{ p: 1800, n: "", t: "S" },
|
|
169
|
+
{ p: 1560, n: "PLUS价", t: "D" }
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
174
|
+
product_id: 800,
|
|
175
|
+
product_name: "椰青冰萃美式",
|
|
176
|
+
thumb:
|
|
177
|
+
"https://img06.luckincoffeecdn.com/group5/M00/B2/E1/Ct1qP2hrsNiAcTpjAAISxc0Swxk400.png",
|
|
178
|
+
has_choose: true,
|
|
179
|
+
cart_num: 0,
|
|
180
|
+
show_prices: [
|
|
181
|
+
{ p: 1680, n: "", t: "S" },
|
|
182
|
+
{ p: 1456, n: "PLUS价", t: "D" }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
187
|
+
product_id: 799,
|
|
188
|
+
product_name: "绿沙沙拿铁",
|
|
189
|
+
thumb:
|
|
190
|
+
"https://img01.luckincoffeecdn.com/group5/M00/16/3E/Ct1qP2h883SADF_1AAHVosFmhnM380.png",
|
|
191
|
+
has_choose: true,
|
|
192
|
+
cart_num: 0,
|
|
193
|
+
show_prices: [
|
|
194
|
+
{ p: 1800, n: "", t: "S" },
|
|
195
|
+
{ p: 1560, n: "PLUS价", t: "D" }
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
200
|
+
product_id: 1134,
|
|
201
|
+
product_name: "鲜萃轻轻桂花(特大杯)",
|
|
202
|
+
thumb:
|
|
203
|
+
"https://img03.luckincoffeecdn.com/group5/M00/1F/A7/Ct1rZGiMcMOAZvYmAAGUxbhbk1k138.png",
|
|
204
|
+
has_choose: true,
|
|
205
|
+
cart_num: 0,
|
|
206
|
+
show_prices: [
|
|
207
|
+
{ p: 1980, n: "", t: "S" },
|
|
208
|
+
{ p: 1716, n: "PLUS价", t: "D" }
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
213
|
+
product_id: 1211,
|
|
214
|
+
product_name: "阿克苏苹果拿铁",
|
|
215
|
+
thumb:
|
|
216
|
+
"https://img01.luckincoffeecdn.com/group5/M00/30/3A/Ct1qP2ixlp2ATBYnAA0lLGPLP5w379.gif",
|
|
217
|
+
has_choose: true,
|
|
218
|
+
cart_num: 0,
|
|
219
|
+
show_prices: [
|
|
220
|
+
{ p: 1800, n: "", t: "S" },
|
|
221
|
+
{ p: 1560, n: "PLUS价", t: "D" }
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
226
|
+
product_id: 806,
|
|
227
|
+
product_name: "生椰拿铁(首创)",
|
|
228
|
+
thumb:
|
|
229
|
+
"https://img01.luckincoffeecdn.com/group5/M00/B2/CF/Ct1qP2hrsF-AEzVYAAGXq_WH8UM393.png",
|
|
230
|
+
has_choose: true,
|
|
231
|
+
cart_num: 0,
|
|
232
|
+
show_prices: [
|
|
233
|
+
{ p: 1680, n: "", t: "S" },
|
|
234
|
+
{ p: 1456, n: "PLUS价", t: "D" }
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb",
|
|
239
|
+
product_id: 1136,
|
|
240
|
+
product_name: "芦荟冰茶",
|
|
241
|
+
thumb:
|
|
242
|
+
"https://img04.luckincoffeecdn.com/group5/M00/21/44/Ct1rZGiVz9SABO2bAAGxx8Ctfgg114.png",
|
|
243
|
+
has_choose: true,
|
|
244
|
+
cart_num: 0,
|
|
245
|
+
show_prices: [
|
|
246
|
+
{ p: 1800, n: "", t: "S" },
|
|
247
|
+
{ p: 1920, n: "PLUS价", t: "D" }
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
total_size: 35,
|
|
252
|
+
next_page_token: "2",
|
|
253
|
+
request_id: "94c4af67385798ea"
|
|
254
|
+
},
|
|
255
|
+
getFoodCartList: {
|
|
256
|
+
total: 2,
|
|
257
|
+
total_amount: 1185,
|
|
258
|
+
products: [
|
|
259
|
+
{
|
|
260
|
+
product_id: 794,
|
|
261
|
+
product_name: "鲜萃轻轻茉莉",
|
|
262
|
+
product_sku: "SP3257-00010",
|
|
263
|
+
specs: [],
|
|
264
|
+
sub_name: "温度/咖啡液/糖度/杯型",
|
|
265
|
+
num: 1,
|
|
266
|
+
thumb:
|
|
267
|
+
"https://img06.luckincoffeecdn.com/group5/M01/24/1D/Ct1rZGhuSDGATZFPAAIB35XSyG4945.png",
|
|
268
|
+
show_prices: [{ p: 560, n: "", t: "S" }],
|
|
269
|
+
max_buy: -1,
|
|
270
|
+
min_buy: -1,
|
|
271
|
+
status: "ok",
|
|
272
|
+
tip: "",
|
|
273
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
product_id: 1135,
|
|
277
|
+
product_name: "金桂花香拿铁",
|
|
278
|
+
product_sku: "SP3414-00018",
|
|
279
|
+
specs: [],
|
|
280
|
+
sub_name: "奶基/温度/糖度/杯型",
|
|
281
|
+
num: 1,
|
|
282
|
+
thumb:
|
|
283
|
+
"https://img02.luckincoffeecdn.com/group5/M00/82/F0/Ct1rZGiN4-aAWpYOAA4lXwBx92g639.gif",
|
|
284
|
+
show_prices: [{ p: 625, n: "", t: "S" }],
|
|
285
|
+
max_buy: -1,
|
|
286
|
+
min_buy: -1,
|
|
287
|
+
status: "ok",
|
|
288
|
+
tip: "",
|
|
289
|
+
category_id: "45bff8619cf053e8697ba1d8ba8884bb"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
total_discount_price: 0,
|
|
293
|
+
total_market_price: 5500,
|
|
294
|
+
request_id: "35cb6f5a0db2a311"
|
|
295
|
+
},
|
|
296
|
+
getFoodCartCount: {
|
|
297
|
+
categories: [
|
|
298
|
+
{ category_id: "a0aacaff0fb278c5f8127cec63ec3a53", card_num: 1 }
|
|
299
|
+
],
|
|
300
|
+
total_num: 1,
|
|
301
|
+
request_id: "9c2bfb2c0f6817fd"
|
|
302
|
+
}
|
|
303
|
+
};
|
|
@@ -45,5 +45,76 @@ export default function (data, gValue,gColor,oldData){
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
+
{
|
|
49
|
+
ele: 'title',
|
|
50
|
+
label: '组件样式',
|
|
51
|
+
size: 'small',
|
|
52
|
+
groupKey:'content',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "商品样式",
|
|
56
|
+
ele: "xd-style-image",
|
|
57
|
+
groupKey: 'content',
|
|
58
|
+
valueKey: "productStyle",
|
|
59
|
+
cusStyle:{marginBottom: '5px'},
|
|
60
|
+
value: customVal({
|
|
61
|
+
data,
|
|
62
|
+
key: 'productStyle',
|
|
63
|
+
fields: { 'itemBgcColorStatus':['itemBgcColor'],'bgBorder':['contBorder','bs']},
|
|
64
|
+
gValue,
|
|
65
|
+
sValue:"{\"border\":0,\"backgroundColor\":\"#fff\"}",
|
|
66
|
+
}),
|
|
67
|
+
labelInline:true,
|
|
68
|
+
className: 'input100',
|
|
69
|
+
isTplRef:true,
|
|
70
|
+
handleCustom(cusRes) {
|
|
71
|
+
XdBus.getParentApi('getCompStylesOptions')({
|
|
72
|
+
layout_ids: 'Y4oxNuIUOgVMaTD1LeWxp',
|
|
73
|
+
key: Date.now()
|
|
74
|
+
})
|
|
75
|
+
.then(res => {
|
|
76
|
+
cusRes.data.cb(res)
|
|
77
|
+
})
|
|
78
|
+
.catch(error => {
|
|
79
|
+
console.error(error);
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
ele: 'title',
|
|
85
|
+
label: '展示内容',
|
|
86
|
+
size: 'small',
|
|
87
|
+
groupKey:'content',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: '划线价',
|
|
91
|
+
ele: 'xd-cus-switch',
|
|
92
|
+
valueKey: 'showDiscount',
|
|
93
|
+
value: dataVal({ data, key: 'showDiscount', dValue: 'Y', gValue }),
|
|
94
|
+
className: 'input100',
|
|
95
|
+
labelInline: true,
|
|
96
|
+
groupKey: 'content',
|
|
97
|
+
setting: {
|
|
98
|
+
tips: ['显示', '不显示'],
|
|
99
|
+
isBackType: 'string'
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{ ele: 'group_start' },
|
|
103
|
+
{
|
|
104
|
+
label: '差值',
|
|
105
|
+
ele: 'el-input',
|
|
106
|
+
type: 'number',
|
|
107
|
+
valueKey: 'differ',
|
|
108
|
+
labelInline: true,
|
|
109
|
+
value: dataVal({ data, key: 'differ', dValue: '', gValue }),
|
|
110
|
+
hidden: data.showDiscount !== 'Y',
|
|
111
|
+
groupKey: 'content',
|
|
112
|
+
placeholder: '价差,默认值:1',
|
|
113
|
+
className: 'input80',
|
|
114
|
+
notice: '划线价取市场价,市场价-售价差值大于等于设置值时展示',
|
|
115
|
+
inline: false
|
|
116
|
+
},
|
|
117
|
+
{ ele: 'group_end' },
|
|
118
|
+
|
|
48
119
|
].filter(i=>i)
|
|
49
120
|
}
|