jufubao-food 1.0.12-beta6 → 1.0.12-beta8

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-food",
3
- "version": "1.0.12-beta6",
3
+ "version": "1.0.12-beta8",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件餐饮插件包",
6
6
  "main": "index.js",
@@ -135,7 +135,10 @@
135
135
  </xd-list-item>
136
136
  </view>
137
137
 
138
- <view :style="{height: '100rpx'}"></view>
138
+ <view class="placeholderBottom" :style="bottomFixedStylePlaceholder"></view>
139
+ <view v-if="orderInfo.order_status === 'N'" class="alert_bottom" :style="alertBottomStyleComp">
140
+ {{ orderInfo.error_tip }}
141
+ </view>
139
142
  <!-- 靠低支付 -->
140
143
  <view class="fixe_bottom" :style="prod_bottom">
141
144
  <view class="fixed_bottom_body" :style="[bottomBoxStyle]">
@@ -145,13 +148,13 @@
145
148
  </view>
146
149
  <view>
147
150
  <xd-button type="primary" width="200rpx" size="small"
148
- :disabled="is_can_buy!=='Y'"
151
+ :disabled="orderInfo.order_status!=='Y'"
149
152
  :radius="bottomBtnRadius + 'rpx'"
150
153
  :style="{
151
154
  height: bottomBtnHeight + 'rpx',
152
155
  lineHeight: bottomBtnHeight + 'rpx',
153
156
  }"
154
- @click="handlePayConfirm"
157
+ @click="handleCardPay"
155
158
  >{{bottomPayText}}</xd-button>
156
159
  </view>
157
160
  </view>
@@ -213,7 +216,7 @@
213
216
  </view>
214
217
  <view slot="btn" style="display: flex;margin-top: 40rpx;">
215
218
  <xd-button type="info" size="small" @click="handleChangeStop">更换门店</xd-button>
216
- <xd-button type="primary" size="small" style="margin-left: 40rpx;" @click="handleCardPay">就是这家</xd-button>
219
+ <xd-button type="primary" size="small" style="margin-left: 40rpx;" @click="handleCreatePayConfirm">就是这家</xd-button>
217
220
  </view>
218
221
  </XdDailog>
219
222
 
@@ -346,6 +349,13 @@
346
349
  prod_bottom() {
347
350
  return this.fixedStyle({height: 0, zIndex: 111});
348
351
  },
352
+ alertBottomStyleComp(){
353
+ return this.fixedStyle({paddingBottom: 106, zIndex: 110})
354
+ },
355
+ bottomFixedStylePlaceholder() {
356
+ let tipAlert = this.orderInfo && this.orderInfo.order_status==='N' ? 120: 0
357
+ return this.fixedStyle({paddingBottom: tipAlert, zIndex: 110}, 'bottom', false);
358
+ },
349
359
  bottomBoxStyle(){
350
360
  return {
351
361
  padding: '20rpx'
@@ -606,10 +616,6 @@
606
616
  this.showDialogChangeShop = true;
607
617
  this.showDialogConfirmShop = false;
608
618
  },
609
- handlePayConfirm(){
610
- if(!this.getCreateOrderParams()) return false;
611
- this.showDialogConfirmShop = true;
612
- },
613
619
  async handleCardPay(){
614
620
  if(!this.getCreateOrderParams()) return false;
615
621
  this.checkUseNewPay();
@@ -650,8 +656,22 @@
650
656
  }
651
657
  }
652
658
  }
659
+ this.showDialogConfirmShop = true;
660
+ // this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
661
+ },
662
+ //去创建订单
663
+ handleCreatePayConfirm(){
664
+ //已选卡
665
+ let selected_card_list = []
666
+ if(this.choseCard) {
667
+ selected_card_list = this.choseCard ? this.choseCard.selectedCardList : [];
668
+ } else if(this.choseCoupon) {
669
+ selected_card_list = this.choseCoupon ? this.choseCoupon.selectedCardList : [];
670
+ }
671
+ let selected_wallet_list = this.choseWallet ? this.choseWallet.selectedWalletList : []
653
672
  this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
654
673
  },
674
+
655
675
  //使用钱包跟票券一同支付
656
676
  useTickAndWalletPay(selected_card_list, selected_wallet_list){
657
677
  this.createSettleOrder({
@@ -903,6 +923,25 @@
903
923
  font-size: unit(24,rpx);
904
924
  }
905
925
  }
926
+ .placeholderBottom{
927
+
928
+ }
929
+ .alert_bottom{
930
+ background: rgba(255, 244, 191, 0.9);
931
+ color: rgba(255, 102, 26, 1);
932
+ display: flex;
933
+ justify-content: center;
934
+ text-align: center;
935
+ height: 60rpx;
936
+ line-height: 60rpx;
937
+ font-size: 28rpx;
938
+ position: fixed;
939
+ right:0;
940
+ left:0;
941
+ bottom:0;
942
+ width: 100%;
943
+ z-index: 111;
944
+ }
906
945
  .fixe_bottom{
907
946
  background: #FFF;
908
947
  box-shadow: 0 0 unit(16, rpx) rgba(0,0,0,.05);
@@ -146,6 +146,7 @@
146
146
  return {
147
147
  '--main-color': this.mainColor,
148
148
  '--bg-color': this.mainColorAlpha,
149
+ '--bg-main-color': this.mainColorAlpha,
149
150
  }
150
151
  },
151
152
  prod_bottom() {
@@ -363,18 +364,19 @@
363
364
  font-size: 32rpx;
364
365
  color: #333333;
365
366
  padding-right: 20rpx;
367
+ font-weight: 500;
366
368
  }
367
369
  }
368
370
  .sku_wrap{
369
371
  background-color: #FFFFFF;
370
- padding: 32rpx;
371
- margin: 20rpx;
372
+ padding: 24rpx;
373
+ margin: 16rpx;
372
374
  border-radius: 16rpx;
373
375
  }
374
376
  .attr_wrap{
375
377
  background-color: #FFFFFF;
376
- padding: 32rpx;
377
- margin: 20rpx;
378
+ padding: 24rpx;
379
+ margin: 16rpx;
378
380
  border-radius: 16rpx;
379
381
  }
380
382
  .fixed_bottom{
@@ -16,6 +16,68 @@ module.exports = {
16
16
  {
17
17
  product_sku: "",
18
18
  specs: [
19
+ {
20
+ code: "mahua_1",
21
+ name: "单选",
22
+ required: true,
23
+ multiple: false,
24
+ multiple_min: 1,
25
+ multiple_max: -1,
26
+ is_show_image: true,
27
+ values: [
28
+ {
29
+ code: "507887",
30
+ name: "奥利奥麦旋风",
31
+ image:
32
+ "https://menu-img.mcd.cn/pcm/prod/menu/20220713a/product/MS_507887_320.png",
33
+ price: 0,
34
+ num: 1,
35
+ checked: true,
36
+ enabled: true
37
+ },
38
+ {
39
+ code: "507888",
40
+ name: "草莓麦旋风",
41
+ image:
42
+ "https://menu-img.mcd.cn/pcm/prod/menu/20220713a/product/MS_507888_320.png",
43
+ price: 0,
44
+ num: 1,
45
+ checked: false,
46
+ enabled: true
47
+ },
48
+ {
49
+ code: "507889",
50
+ name: "草莓麦旋风",
51
+ image:
52
+ "https://menu-img.mcd.cn/pcm/prod/menu/20220713a/product/MS_507888_320.png",
53
+ price: 2,
54
+ num: 1,
55
+ checked: false,
56
+ enabled: true
57
+ },
58
+ {
59
+ code: "507890",
60
+ name: "草莓麦旋风",
61
+ image:
62
+ "https://menu-img.mcd.cn/pcm/prod/menu/20220713a/product/MS_507888_320.png",
63
+ price: 2,
64
+ num: 1,
65
+ checked: false,
66
+ enabled: true
67
+ },
68
+ {
69
+ code: "507891",
70
+ name: "草莓麦旋风",
71
+ image:
72
+ "https://menu-img.mcd.cn/pcm/prod/menu/20220713a/product/MS_507888_320.png",
73
+ price: 3,
74
+ num: 1,
75
+ checked: false,
76
+ enabled: true
77
+ },
78
+ ]
79
+ },
80
+
19
81
  {
20
82
  code: "Cupsize",
21
83
  name: "杯型",
@@ -267,7 +267,8 @@ export default {
267
267
  }
268
268
  .tag_tit{
269
269
  font-size: 28rpx;
270
- color: #242424;
270
+ color: #333333;
271
+ font-weight: 500;
271
272
  margin-bottom: 20rpx;
272
273
  display: flex;
273
274
  align-items: center;
@@ -291,14 +292,14 @@ export default {
291
292
  border-radius: 12rpx;
292
293
  background-color: #EDEDED;
293
294
  font-size: 28rpx;
294
- color: #666666;
295
- line-height: 60rpx;
295
+ color: #333333;
296
+ line-height: 70rpx;
296
297
  padding: 0 32rpx;
297
298
  margin-right: 20rpx;
298
299
  margin-bottom: 20rpx;
299
300
  // max-width: 208rpx;
300
301
  box-sizing: border-box;
301
- .uni-one-cut(60);
302
+ .uni-one-cut(70);
302
303
 
303
304
  &.is-img{
304
305
  border: none;
@@ -1,23 +1,33 @@
1
1
  <template>
2
2
  <view class="xd_spu">
3
3
  <view class="spu_group" v-for="(item, i) in uiList" :key="item.code">
4
- <view class="spu_title">{{ item.name }}</view>
4
+ <view class="spu_title">{{ item.name }} <text v-if="item.multiple_max > 0">(请选择{{item.multiple_max}}份)</text></view>
5
5
  <view class="specs_list img_list" v-if="item.is_show_image">
6
6
  <view v-for="(opt, ii) in item.values" :key="opt.code"
7
7
  class="specs_img_item" :class="{ 'active': opt.checked }"
8
8
  @click="handleCheck(i, ii)"
9
9
  >
10
10
  <image class="spec_img" :src="opt.image" mode=""></image>
11
- <view class="spec_name">{{ opt.name }}</view>
12
- <view>+{{ opt.price }}元</view>
13
- <view class="spec_num" @click.stop>
14
- <xd-number width="160" :disabled="checkIsDisabled(i, ii)" v-model="opt.num" :min="1" :max="99"></xd-number>
11
+ <view class="spec_main">
12
+ <view class="spec_name">{{ opt.name }}</view>
13
+ <view class="spec_price">
14
+ <template v-if="opt.price">+{{ opt.price/100 }}元</template>
15
+ </view>
16
+ <view v-if="item.multiple" class="spec_num" @click.stop>
17
+ <!-- <xd-number v-if="!checkIsDisabled(i, ii)" width="160" v-model="opt.num" :min="0" :max="99" @change="val => handleSpeNum(val, i, ii)"></xd-number> -->
18
+ <view v-if="!checkIsDisabled(i, ii)" class="num_box">
19
+ <view class="opt_box num_minus" @click="handleNumMinus(opt, i, ii)">-</view>
20
+ <view class="num_text">{{ opt.num }}</view>
21
+ <view class="opt_box num_plus" @click="handleNumAdd(opt, i, ii)">+</view>
22
+ </view>
23
+ </view>
15
24
  </view>
16
- <view class="p_t_r">
25
+ <!-- <view class="p_t_r">
17
26
  <xd-radio v-if="item.multiple" :disabled="checkIsDisabled(i, ii)" class="xdCheckbox" v-model="opt.checked" :isClickEvent="false"></xd-radio>
18
27
  <xd-radio v-else class="xdRadio" v-model="opt.checked" :isClickEvent="false"></xd-radio>
19
- </view>
28
+ </view> -->
20
29
  </view>
30
+ <view v-if="item.values.length%3===2" style="width:200rpx;height:1px;"></view>
21
31
  </view>
22
32
  <view class="specs_list" v-else>
23
33
  <view v-for="(opt, ii) in item.values" :key="opt.code"
@@ -47,7 +57,7 @@ export default {
47
57
  type: Array,
48
58
  default: ()=>[
49
59
  {
50
- "code":"Cupsize","name":"杯型","required":false,"multiple":true,"multiple_min":1,"multiple_max":-1,"is_show_image": true,
60
+ "code":"Cupsize","name":"杯型","required":true,"multiple":true,"multiple_min":1,"multiple_max":2,"is_show_image": true,
51
61
  "values":[
52
62
  {"code":"Tall","name":"中杯","image":"https://image.quanma51.com/self/mahua/sbk/product/6cdc540a91a84b2eb6b58ac510725a48!img","price":0,"num":1,"checked":true,"enabled":true},
53
63
  {"code":"Grande","name":"大杯","image":"https://image.quanma51.com/self/mahua/sbk/product/782ac850a8c14bd38b7b5a22f03d6c74!img","price":600,"num":1,"checked":false,"enabled":true},
@@ -65,7 +75,13 @@ export default {
65
75
  watch: {
66
76
  list: {
67
77
  handler(val){
68
- this.uiList = val;
78
+ this.uiList = val.map(item => {
79
+ item.values = item.values.map(opt => {
80
+ if(!opt.checked) opt.num = 0;
81
+ return opt;
82
+ })
83
+ return item;
84
+ });
69
85
  },
70
86
  immediate: true,
71
87
  },
@@ -78,10 +94,44 @@ export default {
78
94
  }
79
95
  },
80
96
  methods: {
97
+ handleNumAdd(opt, i, ii){
98
+ let parent = this.uiList[i];
99
+ let maxNum = parent.multiple_max;
100
+ let curNum = 0;
101
+ for(let j = 0; j < parent.values.length; j++){
102
+ if(parent.values[j].checked){
103
+ curNum += parent.values[j].num;
104
+ }
105
+ }
106
+ if(curNum >= maxNum) return;
107
+ if(this.checkIsDisabled(i, ii)) return;
108
+ this.$set(this.uiList[i].values[ii], 'num', opt.num + 1);
109
+ this.$set(this.uiList[i].values[ii], 'checked', true)
110
+ },
111
+ handleNumMinus(opt, i, ii){
112
+ let curNum = opt.num;
113
+ let parent = this.uiList[i];
114
+ if(curNum <= 0) return;
115
+ //如果是必选项,且最后一个选中项,则不允许减少到0
116
+ if(parent.required){
117
+ let checkedArr = this.uiList[i].values.filter(opt => opt.checked);
118
+ if(checkedArr.length === 1 && checkedArr[0].num === 1) return;
119
+ }
120
+
121
+ let nextVal = opt.num - 1;
122
+ this.$set(this.uiList[i].values[ii], 'num', nextVal);
123
+ if(nextVal === 0){
124
+ this.$set(this.uiList[i].values[ii], 'checked', false)
125
+ }
126
+ },
81
127
  handleCheck(i, ii){
128
+ let firstChild = this.uiList[i];
129
+ if(firstChild.multiple) return;
82
130
  let curVal = this.uiList[i].values[ii];
83
131
  if(!curVal.enabled) return;
84
-
132
+ this.setUIListChecked(i, ii);
133
+ },
134
+ setUIListChecked(i, ii){
85
135
  this.uiList = this.uiList.map((item, j) => {
86
136
  if(j === i){
87
137
  let checkedArr = item.values.filter(opt => opt.checked);
@@ -151,7 +201,8 @@ export default {
151
201
  .spu_title{
152
202
  font-size: 28rpx;
153
203
  color: #333333;
154
- margin-bottom: 16rpx;
204
+ margin-bottom: 24rpx;
205
+ font-weight: 500;
155
206
  }
156
207
  .specs_list{
157
208
  display: flex;
@@ -162,21 +213,25 @@ export default {
162
213
  }
163
214
 
164
215
  .specs_img_item{
165
- width: 200rpx;
166
- height: 320rpx;
167
- border: 1px solid #EEEEEE;
168
- border-radius: 4rpx;
216
+ border: 1px solid #F8F8F8;
217
+ border-radius: 8rpx;
169
218
  display: flex;
170
219
  flex-direction: column;
171
220
  align-items: center;
172
221
  font-size: 24rpx;
173
222
  box-sizing: border-box;
174
- padding: 16rpx;
175
223
  color: #333333;
176
224
  position: relative;
225
+ margin-bottom: 16rpx;
226
+ overflow: hidden;
177
227
 
178
228
  &.active{
179
- border-color: #FF6C00;
229
+ border-color: var(--main-color);
230
+
231
+ .spec_main{
232
+ background-color: var(--bg-main-color);
233
+ color: var(--main-color);
234
+ }
180
235
  }
181
236
  .p_t_r{
182
237
  position: absolute;
@@ -190,14 +245,60 @@ export default {
190
245
  }
191
246
 
192
247
  .spec_img{
193
- width: 160rpx;
194
- height: 160rpx;
248
+ width: 212rpx;
249
+ height: 212rpx;
250
+ }
251
+ .spec_main{
252
+ background-color: #F8F8F8;
253
+ width: 100%;
254
+ display: flex;
255
+ flex-direction: column;
256
+ align-items: center;
257
+ font-size: 28rpx;
258
+ color: #333333;
259
+ flex: 1;
195
260
  }
196
261
  .spec_name{
197
262
  margin-top: 16rpx;
198
263
  }
264
+ .spec_price{
265
+ height: 28rpx;
266
+ margin: 14rpx 0 20rpx;
267
+ line-height: 1;
268
+ }
199
269
  .spec_num{
200
- margin-top: 12rpx;
270
+ margin-bottom: 20rpx;
271
+ }
272
+ .num_box{
273
+ display: flex;
274
+ justify-content: center;
275
+ align-items: center;
276
+
277
+ .num_text{
278
+ padding: 0 40rpx;
279
+ }
280
+
281
+ .opt_box{
282
+ border-radius: 50%;
283
+ width: 40rpx;
284
+ height: 40rpx;
285
+ display: flex;
286
+ justify-content: center;
287
+ align-items: center;
288
+ font-size: 28rpx;
289
+ box-sizing: border-box;
290
+ padding-bottom: 4rpx;
291
+
292
+ &.num_plus{
293
+ background-color: var(--main-color);
294
+ color: #FFFFFF;
295
+ }
296
+ &.num_minus{
297
+ border: 1px solid var(--main-color);
298
+ color: var(--main-color);
299
+ background-color: #FFFFFF;
300
+ }
301
+ }
201
302
  }
202
303
  ::v-deep .uni-numbox{
203
304
  height: 40rpx;
@@ -219,16 +320,18 @@ export default {
219
320
 
220
321
  .specs_item{
221
322
  padding: 16rpx 32rpx;
222
- background-color: #EEEEEE;
223
- color: #999999;
224
- font-size: 24rpx;
225
- border-radius: 4rpx;
323
+ background-color: #F8F8F8;
324
+ color: #333333;
325
+ font-size: 28rpx;
326
+ border-radius: 8rpx;
226
327
  margin-bottom: 16rpx;
227
328
  margin-right: 16rpx;
329
+ border: 1px solid #F8F8F8;
228
330
 
229
331
  &.active{
230
- background-color: #FF6C00;
231
- color: #FFFFFF;
332
+ background-color: var(--bg-main-color);
333
+ color: var(--main-color);
334
+ border: 1px solid var(--main-color);
232
335
  }
233
336
  }
234
337
  }
@@ -47,7 +47,7 @@
47
47
  :scroll-top="prodScrollTop"
48
48
  @scroll="handleScroll"
49
49
  >
50
- <view v-for="(cate, i) in categoryList" :key="cate.category_id"
50
+ <view v-for="(cate, i) in showCategoryList" :key="cate.category_id"
51
51
  class="product_group"
52
52
  :id="getID(cate)"
53
53
  :data-next="cate.nextHeight"
@@ -55,19 +55,34 @@
55
55
  <view class="group_title">{{ cate.category_name }}</view>
56
56
  <view class="product_list" v-if="cate.productList.length">
57
57
  <view v-for="item in cate.productList" :key="item.key" :style="[contProductStyles]">
58
- <cus-product
59
- :image-radius="imageRadius"
60
- :brand-color="brandColor"
61
- :height="200"
62
- :cell="column_num"
63
- :name-font="itemFontStyle"
64
- :product-config="productConfig"
65
- :isPlus="is_plus_site"
66
- :item="item"
67
- :row-spacing="rowSpacing"
68
- :cell-spacing="itemSpacing"
69
- @on-product-detail="toProductDetail"
70
- ></cus-product>
58
+ <view class="product_item">
59
+ <view class="prod_img">
60
+ <image :src="item.thumb"/>
61
+ </view>
62
+ <view class="prod_info">
63
+ <view class="prod_tit"
64
+ :class="{
65
+ prod_tit_one:item.product_sku_name
66
+ }">{{item.product_name}}</view>
67
+ <!-- <view class="prod_brand" :style="{color:brandTextColor}" v-if="prod.brand_name">{{prod.brand_name}}</view> -->
68
+ <view class="prod_specs" v-if="item.sub_name">{{item.sub_name}}</view>
69
+ <view class="prod_price">
70
+ <view style="display:flex;align-items:center">
71
+ <CusPrice :isPlus="is_plus_site" :isShowIcon="false" :showPrice="item.show_prices"></CusPrice>
72
+ </view>
73
+ <view style="font-size: 28rpx;color:#999">
74
+ <view v-if="item.has_choose" class="chose_spu" @click="toProductDetail(item)">
75
+ 选规格
76
+ <view v-if="item.num" class="cart_edg">{{ item.num }}</view>
77
+ </view>
78
+ <view v-else>
79
+ <xd-number v-if="item.num" v-model="item.num" @change="val => handleCartNumChange(val, item)"></xd-number>
80
+ <xd-font-icon v-else icon="iconaddcart" :color="mainColor" size="46"></xd-font-icon>
81
+ </view>
82
+ </view>
83
+ </view>
84
+ </view>
85
+ </view>
71
86
  </view>
72
87
  </view>
73
88
  <view class="product_list" v-else>
@@ -91,7 +106,7 @@
91
106
  <xd-unit :price="cartPrice" :isOld="false"></xd-unit>
92
107
  </view>
93
108
  <view>
94
- <xd-button width="200rpx" size="small" type="primary" :disabled="!cartProductList.length" @click="handleSubmitCart">选好了</xd-button>
109
+ <xd-button width="170rpx" size="small" type="primary" :disabled="!cartProductList.length" @click="handleSubmitCart">选好了</xd-button>
95
110
  </view>
96
111
  </view>
97
112
  <view class="cart_product_modal" v-if="cartProductShow">
@@ -112,7 +127,7 @@
112
127
  <view class="prod_info">
113
128
  <view class="prod_tit"
114
129
  :class="{
115
- prod_tit_one:prod.product_sku_name
130
+ prod_tit_one:prod.sub_name
116
131
  }">{{prod.product_name}}</view>
117
132
  <!-- <view class="prod_brand" :style="{color:brandTextColor}" v-if="prod.brand_name">{{prod.brand_name}}</view> -->
118
133
  <view class="prod_specs" v-if="prod.sub_name">{{prod.sub_name}}</view>
@@ -128,7 +143,7 @@
128
143
  </view>
129
144
  </view>
130
145
  <view v-else class="prod_list">
131
- <xd-no-data>购物车暂无商品</xd-no-data>
146
+ <xd-no-data height="250rpx" :scaleSize="0.8">购物车暂无商品</xd-no-data>
132
147
  </view>
133
148
  </view>
134
149
  </view>
@@ -168,6 +183,7 @@
168
183
  ],
169
184
  data() {
170
185
  return {
186
+ closeMask: true,
171
187
  resource_shop_id: "",
172
188
  xnamespace: "",
173
189
  consume_mode: "",
@@ -244,6 +260,16 @@
244
260
  fixed_bottom() {
245
261
  return this.fixedStyle({height: 30, zIndex: 111});
246
262
  },
263
+ showCategoryList(){
264
+ return this.categoryList.map(item => {
265
+ item.productList = (item.productList || []).map(prod => {
266
+ let cartProd = this.cartProductList.find(item => item.product_id === prod.product_id);
267
+ prod.num = cartProd ? cartProd.num : 0;
268
+ return prod;
269
+ });
270
+ return item;
271
+ })
272
+ },
247
273
  },
248
274
  watch: {
249
275
  container(value, oldValue) {
@@ -561,7 +587,8 @@
561
587
  }
562
588
  }
563
589
  }).then(res => {
564
-
590
+ this.p_getFoodCartList();
591
+ this.p_getFoodCartCount();
565
592
  })
566
593
  },
567
594
  //获取购物车列表
@@ -627,7 +654,20 @@
627
654
 
628
655
  .jfb-food-product-list {
629
656
  &__body{
630
- background-color: #f8f8f8;
657
+ background-color: #FFFFFF;
658
+
659
+ .cart_edg{
660
+ position: absolute;
661
+ right: -8rpx;
662
+ top: -24rpx;
663
+ color: #FFFFFF;
664
+ background-color: #FF4D4F;
665
+ border-radius: 24rpx;
666
+ padding: 0 12rpx;
667
+ font-size: 24rpx;
668
+ // box-sizing: border-box;
669
+ border: 4rpx solid #FFFFFF;
670
+ }
631
671
  .flex-center{
632
672
  display: flex;
633
673
  align-items: center;
@@ -641,6 +681,7 @@
641
681
  background-color: #FFFFFF;
642
682
  box-sizing: border-box;
643
683
  margin-bottom: 20rpx;
684
+ border-bottom: 1px solid #F8F8F8;
644
685
  padding: 30rpx;
645
686
  position: fixed;
646
687
  top: 0;
@@ -657,18 +698,17 @@
657
698
  text-overflow: ellipsis;
658
699
  max-width: 460rpx;
659
700
  flex: 1;
701
+ font-weight: 500;
660
702
  }
661
703
  }
662
704
  .section_main{
663
705
  display: flex;
664
- padding-top: 16rpx;
665
706
  box-sizing: border-box;
666
707
  .left_nav{
667
708
  width: 160rpx;
668
- background-color: #FFFFFF;
709
+ background-color: #F8F8F8;
669
710
  font-size: 24rpx;
670
- border-radius: 16rpx;
671
- margin-left: 16rpx;
711
+ color: #333333;
672
712
  .nav_item{
673
713
  padding: 24rpx;
674
714
  text-align: center;
@@ -687,14 +727,15 @@
687
727
  }
688
728
 
689
729
  &.active{
690
- color: var(--main-color);
730
+ // color: var(--main-color);
731
+ font-weight: 500;
691
732
  &::after{
692
733
  content: '';
693
734
  position: absolute;
694
735
  left: 0;
695
- top: 24rpx;
696
- bottom: 24rpx;
697
- width: 6rpx;
736
+ top: 28rpx;
737
+ bottom: 28rpx;
738
+ width: 12rpx;
698
739
  background-color: var(--main-color);
699
740
  }
700
741
  }
@@ -702,17 +743,19 @@
702
743
  }
703
744
  .right_product{
704
745
  flex: 1;
705
- margin: 0 16rpx;
746
+ margin: 0 16rpx 0 32rpx;
706
747
 
707
748
  .product_group{
708
749
  .group_title{
709
750
  font-size: 24rpx;
751
+ color: #333333;
752
+ font-weight: 500;
710
753
  background-color: #FFFFFF;
711
754
  margin-bottom: 16rpx;
712
755
  height: 64rpx;
713
756
  line-height: 64rpx;
714
- text-align: center;
715
757
  border-radius: 16rpx;
758
+ padding-left: 16rpx;
716
759
  }
717
760
  .product_list{
718
761
  .product_loading{
@@ -723,6 +766,69 @@
723
766
  color: #999999;
724
767
  min-height: 200px;
725
768
  }
769
+ .product_item{
770
+ box-sizing: border-box;
771
+ height: auto;
772
+ background: #FFFFFF;
773
+ display: flex;
774
+
775
+ .chose_spu{
776
+ padding: 12rpx 16rpx;
777
+ background-color: var(--main-color);
778
+ color: #FFFFFF;
779
+ font-size: 24rpx;
780
+ border-radius: 40rpx;
781
+ box-sizing: border-box;
782
+ position: relative;
783
+ }
784
+
785
+ .prod_img{
786
+ width: 200rpx;
787
+ height: 200rpx;
788
+ margin-right: 16rpx;
789
+ background: #f8f8f8;
790
+ // border-radius: 16rpx;
791
+ image{
792
+ width: 100%;
793
+ height: 100%;
794
+ }
795
+ }
796
+ .prod_info{
797
+ flex: 1;
798
+ display: flex;
799
+ flex-direction: column;
800
+ justify-content: space-between;
801
+ width: 100rpx;
802
+ }
803
+ .prod_tit{
804
+ font-size: 28rpx;
805
+ color: #333333;
806
+ .uni-max-cut(2, 80);
807
+ line-height: unit(40, rpx);
808
+ }
809
+ .prod_tit_one {
810
+ .uni-max-cut(1, 40);
811
+ }
812
+
813
+ .prod_brand {
814
+ font-size: 26rpx;
815
+ padding-top: unit(10, rpx);
816
+ line-height: unit(32, rpx);
817
+ }
818
+
819
+ .prod_specs{
820
+ padding-top: unit(10, rpx);
821
+ display: block;
822
+ font-size: 26rpx;
823
+ color: #999999;
824
+ line-height: unit(32, rpx);
825
+ }
826
+ .prod_price{
827
+ display: flex;
828
+ align-items: flex-end;
829
+ justify-content: space-between;
830
+ }
831
+ }
726
832
  }
727
833
  }
728
834
  }
@@ -775,7 +881,7 @@
775
881
  width: 200rpx;
776
882
  height: 200rpx;
777
883
  margin-right: 24rpx;
778
- background: #DDD;
884
+ // background: #DDD;
779
885
  image{
780
886
  width: 100%;
781
887
  height: 100%;
@@ -789,7 +895,8 @@
789
895
  width: 100rpx;
790
896
  }
791
897
  .prod_tit{
792
- font-size: 32rpx;
898
+ font-size: 28rpx;
899
+ color: #333333;
793
900
  .uni-max-cut(2, 80);
794
901
  line-height: unit(40, rpx);
795
902
  }
@@ -806,7 +913,7 @@
806
913
  .prod_specs{
807
914
  padding-top: unit(10, rpx);
808
915
  display: block;
809
- font-size: 26rpx;
916
+ font-size: 28rpx;
810
917
  color: #999999;
811
918
  line-height: unit(32, rpx);
812
919
  }
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- getFoodShopDetail: {"resource_shop_id":8003557,"shop_id":1170110,"shop_name":"星巴克(平谷国泰店)","shop_icon":"","province_code":"","province_name":"","city_code":"jfb1","city_name":"北京","area_code":"","area_name":"","street_code":"","street_name":"","address":"平谷区文化北街13号国泰商场一层","about":"","latitude":"40.146809614188","longitude":"117.11770942955","distance":6722645,"meal_method":["in_store","take_away"],"phone":"(010)89968048","request_id":"e32700aa4017803f"},
4
+ getFoodShopDetail: {"resource_shop_id":8003557,"shop_id":1170110,"shop_name":"星巴克(平谷国泰店)","shop_icon":"","province_code":"","province_name":"","city_code":"jfb1","city_name":"北京","area_code":"","area_name":"","street_code":"","street_name":"","address":"平谷区文化北街13号国泰商场一层","about":"","latitude":"40.146809614188","longitude":"117.11770942955","distance":"519.5km","meal_method":["in_store","take_away"],"phone":"(010)89968048","request_id":"e32700aa4017803f"},
5
5
  getFoodShopCategory: {"categories":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","category_name":"限时特惠","cart_num":1},{"category_id":"c3e817f29eca3343734ef1e5e644b211","category_name":"夏日心动推荐","cart_num":0},{"category_id":"4700b6e5b19a9ff788b3dd421421ab6b","category_name":"真味无糖","cart_num":0},{"category_id":"54e63a4221698549900f442105821a95","category_name":"浓缩咖啡","cart_num":0},{"category_id":"b083cfcac8944b26225edbcdff22b0e3","category_name":"金烘浓缩","cart_num":0},{"category_id":"834cd2779458568a5278538eb3cb6920","category_name":"冷萃咖啡","cart_num":0},{"category_id":"af722afe78ed62dbe365b5d2360df690","category_name":"植物基咖啡","cart_num":0},{"category_id":"d6f14098f1d00bf849edef62f29ea094","category_name":"星巴克冰震浓缩","cart_num":0},{"category_id":"6af82de72ee20bbc204e4c25cac7326b","category_name":"浓小杯","cart_num":0},{"category_id":"8e39244d99a7b8ea0192842005be5ff4","category_name":"软雪星冰乐","cart_num":0},{"category_id":"61077dd3605a7bc2b8f4eb1ba3e6367b","category_name":"咖啡星冰乐","cart_num":0},{"category_id":"3c18282df5e406c82571de20d1e22f28","category_name":"无咖啡星冰乐","cart_num":0},{"category_id":"b88f8211c9249db7e85949fc8fc8c6f5","category_name":"冰摇茶","cart_num":0},{"category_id":"07378726d90bf8bf36a4e1a67bfbe904","category_name":"茶拿铁","cart_num":0},{"category_id":"258c7f91f59a21564947fc89a4c8fce3","category_name":"冰摇","cart_num":0},{"category_id":"04a8025f45c4b4bbe07d7021c0773538","category_name":"巧克力","cart_num":0},{"category_id":"4ee301588298388e3886cbda9673e6e6","category_name":"蒸气奶","cart_num":0}],"request_id":"2ff41432222daffd"},
6
- getFoodProductList: {"lists":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":707,"product_name":"双杯抹茶星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/7b45d7de7c684b48b14725c7816c4ec9!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6960,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":708,"product_name":"双杯红茶拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/c54d777ee7c34cd29a800c2e219249b0!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6240,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":709,"product_name":"双杯摩卡可可碎片星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E6%91%A9%E5%8D%A1%E5%8F%AF%E5%8F%AF%E7%A2%8E%E7%89%87%E6%98%9F%E5%86%B0%E4%B9%90.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7920,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":710,"product_name":"双杯拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/23787b1d58a7459086048182e9be4e22!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":711,"product_name":"双杯美式咖啡","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/58026111f5ab4091ade3a931b9f07648!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6480,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":712,"product_name":"双杯馥芮白®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E9%A6%A5%E8%8A%AE%E7%99%BD.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8400,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":713,"product_name":"双杯焦糖玛奇朵","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/49e18ceb560c476292bea632b8e7c63f!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":714,"product_name":"双杯燕麦拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/5298306078e742a3bbc2a951c26e6a23!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":715,"product_name":"双杯燕麦焦糖玛奇朵","thumb":"https:\/\/starbucks.quanma51.com\/MopPics\/202012\/209-MOPCatalog-0-342x324_2-zh.png?resize=p_4,w_228&image_process=image\/resize,w_228","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":716,"product_name":"双杯巴旦木拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/07468ac20918497c99984ae4ad51ddd7!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]}],"total_size":27,"next_page_token":"2","request_id":"542b04590116772b"},
7
- getFoodCartList: {"total":1,"total_amount":6969,"products":[{"product_id":707,"product_name":"双杯抹茶星冰乐®","product_sku":"","specs":[{"spec_code":"Cupsize","spec_name":"杯型","spec_value_code":"Grande","spec_value_name":"大杯","image":""},{"spec_code":"Temperature","spec_name":"温度","spec_value_code":"Cold","spec_value_name":"冰","image":""},{"spec_code":"Milk","spec_name":"添加或更换牛奶","spec_value_code":"6411150","spec_value_name":"全脂牛奶","image":""},{"spec_code":"Cream","spec_name":"饮品顶部","spec_value_code":"DefaultCream","spec_value_name":"标准搅打稀奶油","image":""},{"spec_code":"MultiChangeSyrup","spec_name":"无糖风味定制\/添加","spec_value_code":"710045678","spec_value_name":"香草风味","image":""},{"spec_code":"ChangeSugar","spec_name":"甜度选择","spec_value_code":"ClassicSugar","spec_value_name":"经典糖","image":""}],"sub_name":"大杯\/冰\/全脂牛奶\/标准搅打稀奶油\/香草风味\/经典糖","num":1,"thumb":"","show_prices":[{"p":6969,"n":"","t":"S"}],"max_buy":-1,"min_buy":-1,"status":"ok","tip":""}],"total_discount_price":0,"total_market_price":5806,"request_id":"ae2b655bf20b65bf"},
6
+ getFoodProductList: {"lists":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":707,"product_name":"双杯抹茶星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/7b45d7de7c684b48b14725c7816c4ec9!img","has_choose":false,"cart_num":0,"show_prices":[{"p":6960,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":708,"product_name":"双杯红茶拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/c54d777ee7c34cd29a800c2e219249b0!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6240,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":709,"product_name":"双杯摩卡可可碎片星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E6%91%A9%E5%8D%A1%E5%8F%AF%E5%8F%AF%E7%A2%8E%E7%89%87%E6%98%9F%E5%86%B0%E4%B9%90.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7920,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":710,"product_name":"双杯拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/23787b1d58a7459086048182e9be4e22!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":711,"product_name":"双杯美式咖啡","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/58026111f5ab4091ade3a931b9f07648!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6480,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":712,"product_name":"双杯馥芮白®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E9%A6%A5%E8%8A%AE%E7%99%BD.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8400,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":713,"product_name":"双杯焦糖玛奇朵","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/49e18ceb560c476292bea632b8e7c63f!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":714,"product_name":"双杯燕麦拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/5298306078e742a3bbc2a951c26e6a23!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":715,"product_name":"双杯燕麦焦糖玛奇朵","thumb":"https:\/\/starbucks.quanma51.com\/MopPics\/202012\/209-MOPCatalog-0-342x324_2-zh.png?resize=p_4,w_228&image_process=image\/resize,w_228","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":716,"product_name":"双杯巴旦木拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/07468ac20918497c99984ae4ad51ddd7!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]}],"total_size":27,"next_page_token":"2","request_id":"542b04590116772b"},
7
+ getFoodCartList: {"total":2,"total_amount":1185,"products":[{"product_id":794,"product_name":"鲜萃轻轻茉莉","product_sku":"SP3257-00010","specs":[],"sub_name":"温度\/咖啡液\/糖度\/杯型","num":1,"thumb":"https:\/\/img06.luckincoffeecdn.com\/group5\/M01\/24\/1D\/Ct1rZGhuSDGATZFPAAIB35XSyG4945.png","show_prices":[{"p":560,"n":"","t":"S"}],"max_buy":-1,"min_buy":-1,"status":"ok","tip":"","category_id":"45bff8619cf053e8697ba1d8ba8884bb"},{"product_id":1135,"product_name":"金桂花香拿铁","product_sku":"SP3414-00018","specs":[],"sub_name":"奶基\/温度\/糖度\/杯型","num":1,"thumb":"https:\/\/img02.luckincoffeecdn.com\/group5\/M00\/82\/F0\/Ct1rZGiN4-aAWpYOAA4lXwBx92g639.gif","show_prices":[{"p":625,"n":"","t":"S"}],"max_buy":-1,"min_buy":-1,"status":"ok","tip":"","category_id":"45bff8619cf053e8697ba1d8ba8884bb"}],"total_discount_price":0,"total_market_price":5500,"request_id":"35cb6f5a0db2a311"},
8
8
  getFoodCartCount: {"categories":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","card_num":1}],"total_num":1,"request_id":"9c2bfb2c0f6817fd"}
9
9
  }
@@ -45,95 +45,5 @@ 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: "row_num",
59
- value: dataVal({data, key:'row_num', dValue:2, gValue}),
60
- labelInline:true,
61
- className: 'input100',
62
- handleCustom(cusRes) {
63
- XdBus.getParentApi('getCompStylesOptions')({
64
- layout_ids: 'FzCwxOH7MQpT5ISYs8Xm6',
65
- key: Date.now()
66
- })
67
- .then(res => {
68
- res.list.map(item=>{
69
- item.value = Number(item.value)
70
- return item;
71
- })
72
- cusRes.data.cb(res)
73
- })
74
- .catch(error => {
75
- console.error(error);
76
- });
77
- },
78
- },
79
- {
80
- label: "商品样式",
81
- ele: "xd-style-image",
82
- groupKey: 'content',
83
- valueKey: "productStyle",
84
- cusStyle:{marginBottom: '5px'},
85
- value: customVal({
86
- data,
87
- key: 'productStyle',
88
- fields: { 'itemBgcColorStatus':['itemBgcColor'],'bgBorder':['contBorder','bs']},
89
- gValue,
90
- sValue:"{\"border\":0,\"backgroundColor\":\"#fff\"}",
91
- }),
92
- labelInline:true,
93
- className: 'input100',
94
- isTplRef:true,
95
- handleCustom(cusRes) {
96
- XdBus.getParentApi('getCompStylesOptions')({
97
- layout_ids: 'Y4oxNuIUOgVMaTD1LeWxp',
98
- key: Date.now()
99
- })
100
- .then(res => {
101
- cusRes.data.cb(res)
102
- })
103
- .catch(error => {
104
- console.error(error);
105
- });
106
- },
107
- },
108
- {
109
- label: "分类样式",
110
- ele: "xd-style-image",
111
- groupKey: 'content',
112
- valueKey: "titleFooterStyle",
113
- value: titleFooterStyle,
114
- labelInline:true,
115
- hidden: !(dataVal({data, key:'navStatus', dValue:'Y', gValue}) === 'Y'),
116
- cusStyle:{marginBottom: '0'},
117
- className: 'input100',
118
- handleCustom(cusRes) {
119
- XdBus.getParentApi('getCompStylesOptions')({
120
- layout_ids: 'GRiS78vhPtfNXlac1WA63',
121
- filter: false,
122
- })
123
- .then(res => {
124
- cusRes.data.cb(res)
125
- })
126
- .catch(error => {
127
- console.error(error);
128
- });
129
- },
130
- },
131
- {
132
- ele: 'title',
133
- label: '展示内容',
134
- size: 'small',
135
- groupKey:'content',
136
- },
137
- ...ProductAttr(data,gValue,gColor,oldData),
138
48
  ].filter(i=>i)
139
49
  }