jufubao-food 1.0.15-beta1 → 1.0.15-beta10

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.15-beta1",
3
+ "version": "1.0.15-beta10",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件餐饮插件包",
6
6
  "main": "index.js",
@@ -21,7 +21,9 @@
21
21
  <view class="shop_wrap" @click="toSwitchShop">
22
22
  <view class="shop_info">
23
23
  <view class="_name"><xd-font-icon icon="iconshouye" :color="mainColor" size="36" style="margin-right: 8rpx;"></xd-font-icon>{{ shopInfo.shop_name }}</view>
24
- <view class="_dist">{{ shopInfo.distance_conversion}}
24
+ <view class="_dist">
25
+ <!-- {{ shopInfo.distance_conversion}} -->
26
+ 更多门店
25
27
  <xd-font-icon icon="iconxiangyou_xian" color="#666666" :size="20" style="margin-left: 8rpx;"></xd-font-icon>
26
28
  </view>
27
29
  </view>
@@ -1,26 +1,20 @@
1
1
  'use strict';
2
+ import style from "./cusAttr/style";
3
+ import advanced from "./cusAttr/advanced";
4
+ import content from "./cusAttr/content";
2
5
 
3
6
  /**
4
7
  * @description 当表单组件中有联动操作时候,使用方法进行返回
5
8
  */
6
9
  export default {
7
10
  style: [],
8
- content: (data) => {
11
+ advanced: [],
12
+ content: (data, gValue, gColor, oldData={})=>{
13
+
9
14
  return [
10
- {
11
- label: '商品列表页',
12
- ele: 'xd-select-pages-path',
13
- valueKey: 'foodProductListPath',
14
- placeholder: '请选择商品列表页跳转地址',
15
- value: data.foodProductListPath || null,
16
- labelInline: true,
17
- setting: {
18
- router: XdBus.getParentApi('getPagesTree'),
19
- },
20
- groupKey:'advanced',
21
- className: 'input100',
22
- },
15
+ ...content(data, gValue,gColor,oldData),
16
+ ...style(data, gValue,gColor,oldData),
17
+ ...advanced(data),
23
18
  ].filter(i=>i)
24
19
  },
25
- advanced: [],
26
20
  };
@@ -31,23 +31,25 @@
31
31
  </xd-swiper>
32
32
  <view class="xd-store-product__swiper-tips">{{swiperCurrent + 1}}/{{images.length}}</view>
33
33
  </view>
34
-
35
- <view class="prod_title_number">
36
- <view class="prod_title">{{ baseInfo.product_name }}</view>
37
- <view class="prod_number">
38
- <xd-number v-model="number" :min="1" :max="99" circle></xd-number>
34
+ <view :style="[contBodyStyleComp]">
35
+ <view class="prod_title_number">
36
+ <view class="prod_title">{{ baseInfo.product_name }}</view>
37
+ <view class="prod_number">
38
+ <xd-number v-model="number" :min="1" :max="99" circle></xd-number>
39
+ </view>
39
40
  </view>
40
- </view>
41
41
 
42
- <view v-if="skus.length" class="sku_wrap">
43
- <!-- <xd-sku @change="handleSkuChange"></xd-sku> -->
44
- <xd-sku :skus="skus" @change="handleSkuChange"></xd-sku>
45
- </view>
42
+ <view v-if="skus.length" class="sku_wrap">
43
+ <!-- <xd-sku @change="handleSkuChange"></xd-sku> -->
44
+ <xd-sku :skus="skus" @change="handleSkuChange"></xd-sku>
45
+ </view>
46
46
 
47
- <view v-if="spuList.length" class="attr_wrap">
48
- <!-- <xd-spu ref="mySpu" @change="handleSpuChange"></xd-spu> -->
49
- <xd-spu ref="mySpu" :list="spuList" @change="handleSpuChange"></xd-spu>
47
+ <view v-if="spuList.length" class="attr_wrap">
48
+ <!-- <xd-spu ref="mySpu" @change="handleSpuChange"></xd-spu> -->
49
+ <xd-spu ref="mySpu" :list="spuList" @change="handleSpuChange"></xd-spu>
50
+ </view>
50
51
  </view>
52
+
51
53
 
52
54
  <view style="height: 120rpx;"></view>
53
55
  <view class="fixed_bottom" :style="prod_bottom">
@@ -125,8 +127,10 @@
125
127
 
126
128
  is_plus_site: false,
127
129
  //面板
128
- isShowDiscount: "Y", //是否展示划线价
130
+ showDiscount: "Y", //是否展示划线价
129
131
  differ: 1, //原价与现价的差值
132
+ bodyPadding: "",
133
+ contentColor: "",
130
134
 
131
135
  shopBtnBgColor: "",
132
136
  bottomBtnRadius: "100",
@@ -150,6 +154,7 @@
150
154
  '--main-color': this.mainColor,
151
155
  '--bg-color': this.mainColorAlpha,
152
156
  '--bg-main-color': this.mainColorAlpha,
157
+ backgroundColor: this.contentColor
153
158
  }
154
159
  },
155
160
  prod_bottom() {
@@ -185,6 +190,11 @@
185
190
  item.p = p;
186
191
  return item;
187
192
  })
193
+ },
194
+ contBodyStyleComp(){
195
+ return {
196
+ padding: this.getMarginAndPadding(this.bodyPadding, 0)
197
+ }
188
198
  }
189
199
  },
190
200
  watch: {
@@ -214,6 +224,11 @@
214
224
  init(container) {
215
225
  this.foodProductListPath = getContainerPropsValue(container, 'content.foodProductListPath', {value: ""}).value;
216
226
  this.shopBtnBgColor = gCPVal(container, 'shopBtnBgColor', this.mainColor, {sKey:'cartBtnStatus',fields:['shopBtnBgColor']});
227
+ this.showDiscount = gCPVal(container, 'showDiscount', "Y");
228
+ this.differ = gCPVal(container, 'differ', 1);
229
+ this.bodyPadding = gCPVal(container, 'bodyPadding', [16], {sKey:'bodyPaddingStatus',fields:['bodyPadding'], isPMR:true});
230
+ this.contentColor = gCPVal(container,'contentColor', '#f8f8f8', {sKey:'contentColorStatus',fields:['contentColor']});
231
+ console.log("this.bodyPadding", this.bodyPadding)
217
232
  },
218
233
  handleSkuChange(sku){
219
234
  console.log('handleSkuChange', sku);
@@ -241,7 +256,7 @@
241
256
  category_id: this.category_id,
242
257
  consume_mode: this.consume_mode,
243
258
  shop_id: this.shop_id,
244
- is_show_uprice: this.isShowDiscount !== 'Y' ? 0 : this.multiply(this.differ),
259
+ is_show_uprice: this.showDiscount !== 'Y' ? 0 : this.multiply(this.differ),
245
260
  }
246
261
  }).then(res => {
247
262
  this.$xdHideLoading()
@@ -333,7 +348,6 @@
333
348
 
334
349
  .jfb-food-product-info {
335
350
  &__body{
336
- background-color: #f8f8f8;
337
351
  .xd-store-product {
338
352
  color: #333;
339
353
  &__swiper {
@@ -358,7 +372,7 @@
358
372
  .prod_title_number{
359
373
  background-color: #FFFFFF;
360
374
  padding: 24rpx 32rpx;
361
- margin: 20rpx;
375
+ margin: 20rpx 0;
362
376
  border-radius: 16rpx;
363
377
  display: flex;
364
378
  align-items: center;
@@ -378,13 +392,13 @@
378
392
  .sku_wrap{
379
393
  background-color: #FFFFFF;
380
394
  padding: 24rpx;
381
- margin: 16rpx;
395
+ margin: 16rpx 0;
382
396
  border-radius: 16rpx;
383
397
  }
384
398
  .attr_wrap{
385
399
  background-color: #FFFFFF;
386
400
  padding: 24rpx;
387
- margin: 16rpx;
401
+ margin: 16rpx 0;
388
402
  border-radius: 16rpx;
389
403
  }
390
404
  .fixed_bottom{
@@ -213,7 +213,7 @@ export default {
213
213
  margin-bottom: 20rpx;
214
214
  flex-wrap: wrap;
215
215
  &.img_list{
216
- justify-content: space-between;
216
+ // justify-content: space-between;
217
217
  }
218
218
 
219
219
  .specs_img_item{
@@ -229,6 +229,10 @@ export default {
229
229
  position: relative;
230
230
  margin-bottom: 16rpx;
231
231
  overflow: hidden;
232
+ margin-right: 16rpx;
233
+ &:nth-of-type(3n){
234
+ margin-right: 0;
235
+ }
232
236
 
233
237
  &.active{
234
238
  border-color: var(--main-color);
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ export default (data)=>{
4
+ return [
5
+ {
6
+ label: '商品列表页',
7
+ ele: 'xd-select-pages-path',
8
+ valueKey: 'foodProductListPath',
9
+ placeholder: '请选择商品列表页跳转地址',
10
+ value: data.foodProductListPath || null,
11
+ labelInline: true,
12
+ setting: {
13
+ router: XdBus.getParentApi('getPagesTree'),
14
+ },
15
+ groupKey:'advanced',
16
+ className: 'input100',
17
+ },
18
+ {
19
+ label: '版本号:',
20
+ ele: 'el-input',
21
+ type: 'text',
22
+ groupKey: 'advanced',
23
+ valueKey: 'version',
24
+ value: 'v2.0',
25
+ hidden: true,
26
+ },
27
+ ]
28
+ }
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal ,
4
+ statusShow,
5
+ statusDataVal,
6
+ customVal,
7
+ cusDisabled ,
8
+ getCustomAttr,
9
+ } from "@/utils/AttrTools";
10
+ import ProductAttr from "@/utils/Attr/ProductAttr";
11
+
12
+ export default function (data, gValue,gColor,oldData){
13
+ return [
14
+ {
15
+ ele: 'title',
16
+ label: '基础',
17
+ size: 'small',
18
+ groupKey:'content',
19
+ },
20
+ {
21
+ label: "业务线",
22
+ ele: "xd-choose-namespace",
23
+ valueKey: "xnamespace",
24
+ value: dataVal({data, key:'xnamespace', dValue:null, gValue}),
25
+ className: 'input100',
26
+ placeholder: '请选择业务线',
27
+ labelInline:true,
28
+ groupKey:'content',
29
+ notice:'空继承上级业务线',
30
+ inline: false,
31
+ handleCustom: (cb) => {
32
+ XdBus.getParentApi('getOptionsNamespaces')()
33
+ .then(res => {
34
+ cb(res.list)
35
+ })
36
+ .catch();
37
+ }
38
+ },
39
+ {
40
+ ele: 'title',
41
+ label: '展示内容',
42
+ size: 'small',
43
+ groupKey:'content',
44
+ },
45
+ {
46
+ label: '划线价',
47
+ ele: 'xd-cus-switch',
48
+ valueKey: 'showDiscount',
49
+ value: dataVal({ data, key: 'showDiscount', dValue: 'Y', gValue }),
50
+ className: 'input100',
51
+ labelInline: true,
52
+ groupKey: 'content',
53
+ setting: {
54
+ tips: ['显示', '不显示'],
55
+ isBackType: 'string'
56
+ },
57
+ },
58
+ { ele: 'group_start' },
59
+ {
60
+ label: '差值',
61
+ ele: 'el-input',
62
+ type: 'number',
63
+ valueKey: 'differ',
64
+ labelInline: true,
65
+ value: dataVal({ data, key: 'differ', dValue: '', gValue }),
66
+ hidden: data.showDiscount !== 'Y',
67
+ groupKey: 'content',
68
+ placeholder: '价差,默认值:1',
69
+ className: 'input80',
70
+ notice: '划线价取市场价,市场价-售价差值大于等于设置值时展示',
71
+ inline: false
72
+ },
73
+ { ele: 'group_end' },
74
+ ]
75
+ }
@@ -0,0 +1,85 @@
1
+ import {
2
+ dataVal,
3
+ statusShow,
4
+ statusDataVal,
5
+ customVal,
6
+ cusDisabled,
7
+ getCustomAttr,
8
+ oldTonNewBorAndSha,
9
+ cRaBorShadow,
10
+ isDefStatus
11
+ } from "@/utils/AttrTools";
12
+ import productStyle from "@/utils/Attr/productStyle";
13
+ const Color = require('color');
14
+
15
+ export default function (data={},gValue={},gColor={},oldData) {
16
+ return [
17
+ {
18
+ ele: 'title',
19
+ label: '常规',
20
+ size: 'small',
21
+ groupKey:'style',
22
+ },
23
+ {
24
+ label: '内容区边距',
25
+ ele: 'xd-radio',
26
+ groupKey: 'style',
27
+ valueKey: 'bodyPaddingStatus',
28
+ value: statusDataVal({data, key:'bodyPaddingStatus', dValue: 'D', gValue}),
29
+ labelInline:true,
30
+ list: [
31
+ {label: '默认', value: 'D'},
32
+ {label: '自定义', value: 'C'},
33
+ ]
34
+ },
35
+ {ele: 'group_start'},
36
+ {
37
+ label: '',
38
+ ele: 'xd-margin-padding',
39
+ groupKey:'style',
40
+ valueKey: 'bodyPadding',
41
+ hidden:!statusShow({data, key: 'bodyPaddingStatus', fields:['bodyPadding'], gValue}),
42
+ value: dataVal({
43
+ data,
44
+ key:'bodyPadding',
45
+ dValue:[16],
46
+ gValue,
47
+ isPM: true,
48
+ isCPM: true,
49
+ }),
50
+ setting: {
51
+ type: 'margin',
52
+ },
53
+ },
54
+ {ele: 'group_end'},
55
+
56
+ {
57
+ label: '背景色',
58
+ ele: 'xd-radio',
59
+ groupKey: 'style',
60
+ valueKey: 'contentColorStatus',
61
+ value: statusDataVal({data, key: 'contentColorStatus', fields:['contentColor'], gValue}),
62
+ labelInline:true,
63
+ list: [
64
+ {label: '默认', value: 'D'},
65
+ {label: '自定义', value: 'C'},
66
+ ]
67
+ },
68
+ {ele: 'group_start'},
69
+ {
70
+ label: '',
71
+ ele: 'xd-color',
72
+ groupKey:'style',
73
+ valueKey: 'contentColor',
74
+ value: dataVal({data, key:'contentColor', dValue: '#f8f8f8', gValue}),
75
+ hidden: !statusShow({data, key: 'contentColorStatus', fields:['contentColor'], gValue}),
76
+ placeholder: '请选择背景颜色',
77
+ classNmae: 'input80',
78
+ setting: {
79
+ showAlpha: true
80
+ },
81
+ inline: false,
82
+ },
83
+ {ele: 'group_end'},
84
+ ]
85
+ }
@@ -5,6 +5,20 @@
5
5
  * @type {*[]}
6
6
  */
7
7
  module.exports = [
8
+ {
9
+ mapFnName: "getFoodShopList",
10
+ title: "获取门店列表",
11
+ path: "/mall/v1/shop/list",
12
+ isRule: false,
13
+ params: {
14
+ brand_id: ['brand_id', 'String', 'true'],
15
+ city_code: ['city_code', 'String', 'true'],
16
+ latitude: ['latitude', 'String', 'true'],
17
+ longitude: ['longitude', 'String', 'true'],
18
+ },
19
+ isConsole: true,
20
+ disabled: true
21
+ },
8
22
  {
9
23
  mapFnName: 'getFoodShopDetail',
10
24
  title: '获取餐饮门店详情',