jufubao-mall 2.0.16-beta9 → 2.0.17

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-mall",
3
- "version": "2.0.16-beta9",
3
+ "version": "2.0.17",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -68,7 +68,7 @@ module.exports = [
68
68
  {
69
69
  mapFnName: 'cardList',
70
70
  title: '展示可选卡列表',
71
- path: '/mall/v1/order/list-binded-cards',
71
+ path: '/mall/v1/order/list-binded-cards/mall',
72
72
  isRule: false,
73
73
  params: {},
74
74
  isConsole: true,
@@ -86,7 +86,7 @@ module.exports = [
86
86
  {
87
87
  mapFnName: 'selectCard',
88
88
  title: '选择卡',
89
- path: '/mall/v1/order/use-binded-card',
89
+ path: '/mall/v1/order/use-binded-card/mall',
90
90
  isRule: false,
91
91
  data: {
92
92
  namespace: ['namespace', 'String', true],
@@ -119,7 +119,7 @@ module.exports = [
119
119
  {
120
120
  mapFnName: 'addCard',
121
121
  title: '添加卡',
122
- path: '/mall/v1/order/use-new-card',
122
+ path: '/mall/v1/order/use-new-card/mall',
123
123
  isRule: false,
124
124
  data: {
125
125
  namespace: ['namespace', 'String', true],
@@ -266,7 +266,7 @@ module.exports = [
266
266
  {
267
267
  mapFnName: "useBindedWallet",
268
268
  title: "使用已绑钱包",
269
- path: "/mall/v1/order/use-binded-wallet",
269
+ path: "/mall/v1/order/use-binded-wallet/mall",
270
270
  isRule: false,
271
271
  data: {
272
272
  selected_card_list_json: ['卡', 'string', true],
@@ -514,7 +514,7 @@
514
514
 
515
515
  let data = {
516
516
  ...this.options,
517
- namespace: 'cake',//this.xnamespace,
517
+ namespace: this.xnamespace,
518
518
  keyword: this.keyword,
519
519
  city_code: this.stateCity.city_code,
520
520
  type:'sell',
@@ -285,7 +285,9 @@
285
285
  rowSpacing: 16,
286
286
  columnSpacing: 16,
287
287
  showPrice: "",
288
+ showDiscount: "",
288
289
  isAddCart: "",
290
+ differ: "",
289
291
  }
290
292
  },
291
293
  watch: {
@@ -293,6 +295,13 @@
293
295
  if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
294
296
  if (this.$configProject['isPreview']) this.init(value)
295
297
  },
298
+ isShowCodeProduct(value){
299
+ if(this.$configProject.isPreview){
300
+ if(value){
301
+ this.p_getProductList();
302
+ }
303
+ }
304
+ }
296
305
  },
297
306
  computed: {
298
307
  ...mapState({
@@ -305,11 +314,7 @@
305
314
  },
306
315
 
307
316
  outPadding(){
308
- let str = `${this.checkValue(this.padding.top, 32)}rpx`;
309
- str = `${str} ${this.checkValue(this.padding.right, 32)}rpx`;
310
- str = `${str} ${this.checkValue(this.padding.bottom, 32)}rpx`;
311
- str = `${str} ${this.checkValue(this.padding.left,32)}rpx`;
312
- return str
317
+ return this.getMarginAndPadding(this.padding, 32);
313
318
  },
314
319
  contProductStyles(){
315
320
  let itemWidth = (750 - this.padding.right - this.padding.left - (this.columnSpacing * (this.row_num - 1))) / this.row_num;
@@ -340,7 +345,7 @@
340
345
  }
341
346
  },
342
347
  isShowCodeProduct(){
343
- return this.showCode === 'Y' && this.shopInfo.consume_options.find(item => item.consume_mode === 'CODE')
348
+ return this.showCode === 'Y' && this.shopInfo.consume_options.findIndex(item => item.consume_mode === 'CODE') !== -1;
344
349
  },
345
350
  cartIcon(){
346
351
  return this.cartStyle || 'icongouwuche-01';
@@ -478,39 +483,45 @@
478
483
  * @param container {object} 业务组件对象自己
479
484
  */
480
485
  init(container) {
481
- this.showExchange = gCPVal(container, 'showExchange', 'Y');
482
- this.exchangeName = gCPVal(container, 'exchangeName', '聚好兑');
486
+ let isShowCashier = getContainerPropsValue(container, 'content.isShowCashier', '');
487
+ let isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', '');
488
+ let oldShowCashier = isShowCashier || isShowExchange;
489
+
490
+ this.showExchange = oldShowCashier || gCPVal(container, 'showExchange', 'Y');
491
+ let exchangeOldName = gCPVal(container, 'name', '');
492
+ this.exchangeName = exchangeOldName || gCPVal(container, 'exchangeName', '聚好兑');
483
493
  this.exchangeBtnName = gCPVal(container, 'exchangeBtnName', '聚好兑');
484
494
  this.exchangeRemark = getContainerPropsValue(container, 'content.remark', '到店消费任意金额可用');
485
495
  this.exchangePath = getContainerPropsValue(container, 'content.exchangePath', {value: ""}).value;
486
- this.showScan = gCPVal(container, 'showScan', 'Y');
496
+ this.showScan = oldShowCashier || gCPVal(container, 'showScan', 'Y');
487
497
  this.scanName = getContainerPropsValue(container, 'content.scanName', '扫码提货');
488
498
  this.scanBtnName = gCPVal(container, 'scanBtnName', '扫一扫')
489
499
  this.scanRemark = getContainerPropsValue(container, 'content.scanRemark', '');
490
500
  this.scanPath = getContainerPropsValue(container, 'content.scanPath', {value: ""}).value;
491
- this.showTake = gCPVal(container, 'showTake', 'Y');
501
+ this.showTake = oldShowCashier || gCPVal(container, 'showTake', 'Y');
492
502
  this.takeBtnName = gCPVal(container, 'takeBtnName', '去提货');
493
503
  this.takeName = getContainerPropsValue(container, 'content.takeName', '快捷提货');
494
504
  this.takeRemark = getContainerPropsValue(container, 'content.takeRemark', '');
495
505
  this.takePath = getContainerPropsValue(container, 'content.takePath', {value: ""}).value;
496
- this.showMovie = gCPVal(container, 'showMovie', 'Y');
506
+ this.showMovie = gCPVal(container, 'showMovie', ['Y',"N"], {isOld: true});
497
507
  this.movieName = gCPVal(container, 'movieName', '在线选座');
498
508
  this.movieBtnName = gCPVal(container, 'movieBtnName', '去订票');
499
509
  this.moviePath = getContainerPropsValue(container, 'content.moviePath', {value: ""}).value;
500
- this.showFood = gCPVal(container, 'showFood', 'Y');
510
+ this.showFood = gCPVal(container, 'showFood', ['Y',"N"], {isOld: true});
511
+ console.log("this.showFood", this.showFood);
512
+
501
513
  this.foodName = gCPVal(container, 'foodName', '到店自取');
502
514
  this.foodBtnName = gCPVal(container, 'foodBtnName', '去下单');
503
515
  this.foodPath = getContainerPropsValue(container, 'content.foodPath', {value: ""}).value;
504
- this.showTravel = gCPVal(container, 'showTravel', 'Y');
516
+ this.showTravel = gCPVal(container, 'showTravel', ['Y',"N"], {isOld: true});
505
517
  this.travelName = gCPVal(container, 'travelName', '旅游门店');
506
518
  this.travelBtnName = gCPVal(container, 'travelBtnName', '去订票');
507
519
  this.travelPath = getContainerPropsValue(container, 'content.travelPath', {value: ""}).value;
508
- this.showCode = gCPVal(container, 'showCode', 'Y');
520
+ this.showCode = gCPVal(container, 'showCode', ['Y',"N"], {isOld: true});
509
521
  this.productInfoPath = getContainerPropsValue(container, 'content.productInfoPath', {value: ""}).value;
510
522
  this.codePath = getContainerPropsValue(container, 'content.codePath', {value: ""}).value;
511
523
 
512
- this.isShowCashier = getContainerPropsValue(container, 'content.isShowCashier', 'Y');
513
- this.padding = getContainerPropsValue(container, "content.padding",{});
524
+ this.padding = gCPVal(container, 'padding', [16], {sKey: 'paddingStatus', isPMR:true, isCPM: true, fields:['padding']});
514
525
  this.spacing = Number(getContainerPropsValue(container, 'content.spacing', 32));
515
526
 
516
527
  //商品样式关联属性
@@ -533,7 +544,9 @@
533
544
  this.cartStyle = gCPVal(container, 'cartStyle', 'icongouwuche-01');
534
545
  this.cartName = gCPVal(container, 'cartName', '购买');
535
546
  this.showPrice = gCPVal(container, 'showPrice', 'Y');
547
+ this.showDiscount = gCPVal(container, 'showDiscount', 'Y');
536
548
  this.isAddCart = gCPVal(container, 'isAddCart', 'Y');
549
+ this.differ = gCPVal(container, 'differ', 1);
537
550
 
538
551
  console.log("cartStyle", this.cartName, this.cartStyle);
539
552
 
@@ -541,6 +554,12 @@
541
554
  console.log("this.row_num", this.row_num);
542
555
  },
543
556
  p_getProductList(){
557
+ let params = {}
558
+ if(this.showPrice==='Y' && this.showDiscount==='Y'){
559
+ params.is_show_uprice = this.$xdUniHelper.multiplyFloatNumber(this.differ,100)
560
+ } else {
561
+ params.is_show_uprice=-1
562
+ }
544
563
  jfbRootExec("getShopProductList", {
545
564
  vm: this,
546
565
  data: {
@@ -554,6 +573,7 @@
554
573
  sort: 'default',
555
574
  page_size: this.page_size,
556
575
  page_token: this.page_token,
576
+ ...params,
557
577
  }
558
578
  }).then(res => {
559
579
  let list = res.list.map(item => {
@@ -14,7 +14,9 @@ export default function (data, gValue,gColor,oldData){
14
14
  if(gValue.isAdd === true && gValue.isFirst) {
15
15
  showOtherEnter = "Y";
16
16
  }
17
-
17
+ if(data.name){
18
+ data.exchangeName = data.exchangeName || data.name;
19
+ }
18
20
  return [
19
21
  {
20
22
  ele: 'title',
@@ -114,7 +116,7 @@ export default function (data, gValue,gColor,oldData){
114
116
  ele: 'el-input',
115
117
  valueKey: 'exchangeName',
116
118
  labelInline: true,
117
- value: dataVal({ data, key: 'exchangeName', dValue: data.name||'', gValue }),
119
+ value: dataVal({ data, key: 'exchangeName', dValue: '', gValue }),
118
120
  hidden: data.showExchange !== 'Y',
119
121
  groupKey: 'content',
120
122
  className: 'input80',
@@ -52,7 +52,7 @@ export default function (data={},gValue={},gColor={},oldData) {
52
52
  value: dataVal({
53
53
  data,
54
54
  key:'padding',
55
- dValue:[0],
55
+ dValue:[16],
56
56
  gValue,
57
57
  isPM: true,
58
58
  isCPM: true,
@@ -21,7 +21,7 @@
21
21
  <view
22
22
  class="query_wrap"
23
23
  v-if="showQuery === 'Y'"
24
- :class="{isFixed:isFixed}"
24
+ :class="{isFixed:isFixed}"
25
25
  :style="[queryWrapStyle]"
26
26
  >
27
27
  <view class="query_item" style="visibility:hidden" @click="switchQueryModal('sort')">
@@ -225,7 +225,7 @@
225
225
  filterBgcColor:'',
226
226
  filterColor: '',
227
227
  filterStyle: {},
228
- showQuery:'',
228
+ showQuery:'',
229
229
  isFixed: false,
230
230
  keyFilter: 'keyFilter',
231
231
  brand_ids: "",
@@ -597,7 +597,7 @@
597
597
 
598
598
  .jfb-mall-shop-list {
599
599
  &__body{
600
- z-index: 101;
600
+ z-index: 99;
601
601
  .query_header_fixed{
602
602
  height: unit(100, rpx);
603
603
  }
@@ -637,7 +637,7 @@
637
637
  border-top: 1px solid #F5F5F5;
638
638
  width: 100%;
639
639
  }
640
-
640
+
641
641
  }
642
642
  .modal{
643
643
  position: fixed;
@@ -725,7 +725,7 @@
725
725
  height: unit(40, rpx);
726
726
  border-radius: unit(20, rpx);
727
727
  line-height: unit(40, rpx);
728
- color: #FF8D1A;
728
+ color: #FF8D1A;
729
729
  font-size: unit(20, rpx);
730
730
  flex-shrink: 0;
731
731
  margin-left: unit(16, rpx);