jufubao-food 1.0.15 → 1.0.16-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-food",
3
- "version": "1.0.15",
3
+ "version": "1.0.16-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件餐饮插件包",
6
6
  "main": "index.js",
@@ -84,12 +84,12 @@
84
84
  </view>
85
85
 
86
86
  <!-- 展示vip -->
87
- <view v-if="is_show_vip_card_list === 'Y'" class="section">
87
+ <!-- <view v-if="is_show_vip_card_list === 'Y'" class="section">
88
88
  <cus-vip-list :list="vipCardList"
89
89
  :vip_card_id="vip_card_id"
90
90
  :plus_saving_money="plus_saving_money"
91
91
  @choseVipCard="handleChoseVipCard"></cus-vip-list>
92
- </view>
92
+ </view> -->
93
93
 
94
94
  <view class="section">
95
95
  <xd-list-item label="商品价格" paddingLR="60rpx" size="small">
@@ -98,7 +98,7 @@
98
98
  </view>
99
99
  <view v-if="isShowPlusSaveMoney" class="section">
100
100
  <xd-list-item label="" paddingLR="60rpx" size="small">
101
- <view slot="label" style="color: #86541E;">PLUS专享立减</view>
101
+ <view slot="label" style="color: #86541E;">PLUS会员立减</view>
102
102
  <xd-unit :price="-plus_saving_money" :largeZero="false" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
103
103
  </xd-list-item>
104
104
  </view>
@@ -240,6 +240,13 @@
240
240
  <xd-button type="primary" size="small" style="margin-left: 40rpx;" @click="handleSwitchShop">继续更换</xd-button>
241
241
  </view>
242
242
  </XdDailog>
243
+ <CusVipOpenDialog
244
+ v-if="!isVip"
245
+ :bgImg="openVipBgImg"
246
+ :btnBgImg="openVipBtnBgImg"
247
+ @onOpen="handleToOpen"
248
+ @onClose="handleCloseOpenVip"
249
+ ></CusVipOpenDialog>
243
250
  </view>
244
251
  </view>
245
252
  </template>
@@ -262,6 +269,9 @@
262
269
  import OrderMixin from "./orderMixin"
263
270
  import extsMixins from "@/mixins/extsMixins";
264
271
  import { mapState } from "vuex";
272
+ import CusVipOpenDialog from "@/components/CusVipOpenDialog/CusVipOpenDialog"
273
+ import getServiceUrl from "@/common/getServiceUrl";
274
+
265
275
  export default {
266
276
  name: "JfbFoodConfirmV2",
267
277
  components: {
@@ -274,7 +284,8 @@
274
284
  XdWalletChose,
275
285
  CusCouponChose,
276
286
  XdDailog,
277
- CusVipList
287
+ CusVipList,
288
+ CusVipOpenDialog
278
289
  },
279
290
  mixins: [
280
291
  componentsMixins, extsMixins, JfbFoodConfirmV2Mixin, OrderMixin
@@ -341,6 +352,9 @@
341
352
  paySuccessPath: "",
342
353
  switchStorePath: "",
343
354
  productListPath: "",
355
+ openPath: "",
356
+ openVipBtnBgImg: "",
357
+ openVipBgImg: "",
344
358
  }
345
359
  },
346
360
  computed: {
@@ -423,7 +437,10 @@
423
437
  created() {
424
438
  this.is_plus_site = this.projectAttr.headers['X-Site-Group']==="vip";
425
439
  this.init(this.container);
426
- this.isVip = this.getTokenForKey('user_level') === 'VIP';
440
+ this.isVip = this.getTokenForKey('user_level') && this.getTokenForKey('user_level') === 'VIP' ? true : false;
441
+ if (this.$configProject['isPreview']) {
442
+ this.isVip=true
443
+ }
427
444
  //todo
428
445
  },
429
446
  methods: {
@@ -480,7 +497,13 @@
480
497
  this.bottomBtnHeight = gCPVal(container, 'bottomBtnHeight', [60], {sKey: "btnStyleStatus", fields: ['bottomBtnRadius', 'bottomBtnHeight', 'bottomPayText']});
481
498
  this.bottomPayText = gCPVal(container, 'bottomPayText', ["支付"], {sKey: "btnStyleStatus", fields: ['bottomBtnRadius', 'bottomBtnHeight', 'bottomPayText']});
482
499
  this.bottomPricePosition = gCPVal(container, 'bottomPricePosition', ['flex-start'], {sKey: "btnPriceStatus", fields: ['bottomPricePosition']});
483
-
500
+ this.openPath = getContainerPropsValue(container, 'content.openPath', {value: ""}).value;
501
+ this.openVipBgImg = getServiceUrl(
502
+ getContainerPropsValue(container, "content.openVipBgImg", { url: "" }).url,
503
+ );
504
+ this.openVipBtnBgImg = getServiceUrl(
505
+ getContainerPropsValue(container, "content.openVipBtnBgImg", { url: "" }).url
506
+ );
484
507
  this.$nextTick(()=>{
485
508
  let time = 500;
486
509
  //#ifdef H5
@@ -810,6 +833,14 @@
810
833
  meal_method: this.meal_method,
811
834
  };
812
835
  },
836
+ handleToOpen() {
837
+ this.$xdUniHelper.navigateTo({
838
+ url: this.openPath
839
+ });
840
+ },
841
+ handleCloseOpenVip() {
842
+ this.$xdUniHelper.navigateBack()
843
+ },
813
844
  onJfbScroll(options) {
814
845
  // console.log('event.onJfbScroll', options)
815
846
  },
@@ -818,6 +849,10 @@
818
849
  },
819
850
  onJfbShow(options) {
820
851
  console.log('event.onJfbShow', options)
852
+ this.isVip = this.getTokenForKey('user_level') && this.getTokenForKey('user_level') === 'VIP' ? true : false;
853
+ if (this.$configProject['isPreview']) {
854
+ this.isVip=true
855
+ }
821
856
  },
822
857
  onJfbHide(options) {
823
858
  console.log('event.onJfbHide', options)
@@ -54,7 +54,19 @@ export default (data)=>{
54
54
  groupKey:'advanced',
55
55
  className: 'input100',
56
56
  },
57
-
57
+ {
58
+ label: '开通会员',
59
+ ele: 'xd-select-pages-path',
60
+ valueKey: 'openPath',
61
+ placeholder: '请选择开通会员跳转页面',
62
+ value: data.openPath || null,
63
+ labelInline: true,
64
+ setting: {
65
+ router: XdBus.getParentApi('getPagesTree'),
66
+ },
67
+ groupKey: 'advanced',
68
+ className: 'input100',
69
+ },
58
70
  {
59
71
  label: '版本号:',
60
72
  ele: 'el-input',
@@ -557,6 +557,48 @@ export default function (data={},gValue={},gColor={},oldData) {
557
557
  showAlpha: true
558
558
  },
559
559
  },
560
- {ele: "group_end"},
560
+ { ele: "group_end" },
561
+ {
562
+ label: "开通PLUS背景图",
563
+ ele: 'xd-upload',
564
+ valueKey: "openVipBgImg",
565
+ groupKey: "style",
566
+ labelInline: true,
567
+ value: data.openVipBgImg || {},
568
+ defaultValue: data.openVipBgImg || null,
569
+ slot: true,
570
+ oneWidth: 355,
571
+ oneHeight: 355,
572
+ elinputClassName: 'input40',
573
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">710px</span>,高度为<span style="color:red">710px</span>',
574
+ type: ['jpg', 'png', 'jpeg'],
575
+ styleType: 'one',
576
+ uploadType: 'aliyun',
577
+ size: 5,
578
+ action: 'action',
579
+ sort: true,
580
+ maxlen: 100,
581
+ },
582
+ {
583
+ label: "开通PLUS按钮背景图",
584
+ ele: 'xd-upload',
585
+ valueKey: "openVipBtnBgImg",
586
+ groupKey: "style",
587
+ labelInline: true,
588
+ value: data.openVipBtnBgImg || {},
589
+ defaultValue: data.openVipBtnBgImg || null,
590
+ slot: true,
591
+ oneWidth: 223,
592
+ oneHeight: 44,
593
+ elinputClassName: 'input40',
594
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">446px</span>,宽度为<span style="color:red">88px</span>',
595
+ type: ['jpg', 'png', 'jpeg'],
596
+ styleType: 'one',
597
+ uploadType: 'aliyun',
598
+ size: 5,
599
+ action: 'action',
600
+ sort: true,
601
+ maxlen: 100,
602
+ },
561
603
  ]
562
604
  }