jufubao-base 1.0.181-beta2 → 1.0.181-beta4

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-base",
3
- "version": "1.0.181-beta2",
3
+ "version": "1.0.181-beta4",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -46,7 +46,7 @@
46
46
  当前票券无套餐
47
47
  </xd-no-data>
48
48
  </view>
49
- <view class="wrap" style="margin-top: 28rpx" v-if="notice&&packageList !== null">
49
+ <view class="wrap" style="margin-top: 28rpx" v-if="notice&&packageList !== null&&packageList.length > 0">
50
50
  <view
51
51
  style="
52
52
  text-align: center;
@@ -293,6 +293,7 @@
293
293
  :couponBtnTextStyle="couponBtnTextStyle"
294
294
  :couponLeftBgColor="couponLeftBgColor"
295
295
  :item="item"
296
+ :mainColor="mainColor"
296
297
  @useCoupon="handleBindLogin(item,item['entries'][0])"
297
298
  @toDetail="toDetail(item)"
298
299
  ></xd-coupon-item>
@@ -22,6 +22,21 @@ export default {
22
22
  { required: true, message: '请选择领取地址', trigger: ['blur', 'change'] },
23
23
  ]
24
24
  },
25
+ {
26
+ label: '返回地址:',
27
+ ele: 'xd-select-pages-path',
28
+ valueKey: 'back_url',
29
+ groupKey:'advanced',
30
+ placeholder: '请选择返回地址',
31
+ value: data['back_url']||null,
32
+ setting: {
33
+ router: XdBus.getParentApi('getPagesTree'),
34
+ },
35
+ inline: false,
36
+ rules: [
37
+ { required: true, message: '请选择领取地址', trigger: ['blur', 'change'] },
38
+ ]
39
+ },
25
40
  {
26
41
  label: '分享图片:', //label
27
42
  ele: 'xd-upload', //package 名称
@@ -96,7 +96,12 @@
96
96
  <xd-button type="primary" @click="handleShare">再次分享</xd-button>
97
97
  <!-- #endif -->
98
98
  <!-- #ifdef MP-WEIXIN -->
99
- <button :style="{background:mainColor}" class="share-btn" @click="handleShare" open-type="share">
99
+ <button
100
+ :style="{ background: mainColor }"
101
+ class="share-btn"
102
+ @click="handleShare"
103
+ open-type="share"
104
+ >
100
105
  再次分享
101
106
  </button>
102
107
  <!-- #endif -->
@@ -115,7 +120,12 @@
115
120
  >超过24H未领取,票券会自动退回您的账户中。</view
116
121
  >
117
122
  <!-- #ifdef MP-WEIXIN -->
118
- <button :style="{background:mainColor}" class="share-btn" @click="handleShare" open-type="share">
123
+ <button
124
+ :style="{ background: mainColor }"
125
+ class="share-btn"
126
+ @click="handleShare"
127
+ open-type="share"
128
+ >
119
129
  通知微信好友
120
130
  </button>
121
131
  <!-- #endif -->
@@ -171,6 +181,7 @@ export default {
171
181
  greeting: "",
172
182
  dialogShow: false,
173
183
  get_url: null,
184
+ back_url: null,
174
185
  shareImage: "",
175
186
  isPreview: false,
176
187
  errMsg: "",
@@ -216,6 +227,10 @@ export default {
216
227
  this.info.card_point,
217
228
  100
218
229
  );
230
+ this.info.other_card_point = this.$xdUniHelper.divisionFloatNumber(
231
+ this.info.other_card_point,
232
+ 100
233
+ );
219
234
  this.greeting = res.transfer_record.greeting;
220
235
  this.info["theme"] = this.getCardThemes(this.info["card_type_name"]);
221
236
  if (
@@ -243,6 +258,9 @@ export default {
243
258
  this.get_url = getContainerPropsValue(container, "content.get_url", {
244
259
  value: "",
245
260
  }).value;
261
+ this.back_url = getContainerPropsValue(container, "content.back_url", {
262
+ value: "",
263
+ }).value;
246
264
  this.shareImage = getContainerPropsValue(
247
265
  container,
248
266
  "content.shareImage",
@@ -326,10 +344,11 @@ export default {
326
344
 
327
345
  // #endif
328
346
  },
329
- onJfbShow(options) {
330
- console.log("onJfbShow8888");
331
-
332
- // this.dialogShow = false;
347
+ onJfbBack(options) {
348
+ console.log("event.onJfbBack", options);
349
+ this.$xdUniHelper.navigateTo({
350
+ url: `${this.back_url}`,
351
+ });
333
352
  },
334
353
  },
335
354
  };
@@ -164,7 +164,7 @@ export default {
164
164
  info: null,
165
165
  transfer_auth_code: null,
166
166
  dialogShow: false,
167
- resultDialog: true,
167
+ resultDialog: false,
168
168
  isPreview: false,
169
169
  errMsg: "",
170
170
  };
@@ -7,6 +7,52 @@ export default {
7
7
  style: [],
8
8
  content: (data) => {
9
9
  return [
10
+ {
11
+ label: '可领取背景图:', //label
12
+ ele: 'xd-upload', //package 名称
13
+ valueKey: 'canReceiveBg', //form[valueKey]
14
+ value: data.canReceiveBg || null, //v-model
15
+ defaultValue: data.canReceiveBg || null, //默认图片对象
16
+ groupKey: "style",
17
+ slot: true, //按钮是否使用slot
18
+ oneWidth: 375, //单个图片显示宽度
19
+ oneHeight: 672, //单个图片显示高度
20
+ elinputClassName: 'input40',
21
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
22
+ type: ['jpg', 'png', 'jpeg'],
23
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
24
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
25
+ size: 5, //5M
26
+ action: 'aliyun',
27
+ sort: true, //当上传图片列表时候,是否启用排序
28
+ maxlen: 100, //当上传图片列表时候,最大数量数量
29
+ rules: [
30
+ { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
31
+ ]
32
+ },
33
+ {
34
+ label: '不可领取背景图:', //label
35
+ ele: 'xd-upload', //package 名称
36
+ valueKey: 'cannotReceiveBg', //form[valueKey]
37
+ value: data.cannotReceiveBg || null, //v-model
38
+ defaultValue: data.cannotReceiveBg || null, //默认图片对象
39
+ groupKey: "style",
40
+ slot: true, //按钮是否使用slot
41
+ oneWidth: 375, //单个图片显示宽度
42
+ oneHeight: 672, //单个图片显示高度
43
+ elinputClassName: 'input40',
44
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
45
+ type: ['jpg', 'png', 'jpeg'],
46
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
47
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
48
+ size: 5, //5M
49
+ action: 'aliyun',
50
+ sort: true, //当上传图片列表时候,是否启用排序
51
+ maxlen: 100, //当上传图片列表时候,最大数量数量
52
+ rules: [
53
+ { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
54
+ ]
55
+ },
10
56
  {
11
57
  label: '按钮背景图:', //label
12
58
  ele: 'xd-upload', //package 名称
@@ -15,14 +15,11 @@
15
15
  >
16
16
  </view>
17
17
  <!-- #endif -->
18
- <view
19
- :style="{ height: layoutInfo.bodyMinHeightRpx + 'rpx' }"
20
- class="jfb-base-card-receive-cover__body"
21
- >
22
- <view class="content" :style="contentBgStyle">
18
+ <view :style="bgStyle" class="jfb-base-card-receive-cover__body">
19
+ <view v-if="status==='N'" class="content" :style="contentBgStyle">
23
20
  <view class="content-info">{{ greeting }}</view>
24
21
  </view>
25
- <view class="btn" @click="handleToReceive" :style="btnBgStyle">{{
22
+ <view v-if="status==='N'" class="btn" @click="handleToReceive" :style="btnBgStyle">{{
26
23
  status === "T" ? "链接已失效" : "立即领取"
27
24
  }}</view>
28
25
  </view>
@@ -53,14 +50,24 @@ export default {
53
50
  btnColor: "",
54
51
  transfer_auth_code: null,
55
52
  status: "N",
53
+ cannotReceiveBg: "",
54
+ canReceiveBg: "",
56
55
  };
57
56
  },
58
57
  computed: {
58
+ bgStyle() {
59
+ let status = this.status;
60
+ return {
61
+ height: this.layoutInfo.bodyMinHeightRpx + "rpx",
62
+ backgroundImage: status==='N' ? `url(${this.canReceiveBg})` : `url(${this.cannotReceiveBg})`,
63
+ backgroundSize: "100% 100%",
64
+ };
65
+ },
59
66
  btnBgStyle() {
60
67
  return this.styleObjectToString({
61
68
  backgroundImage: "url(" + this.btnBg + ")",
62
69
  backgroundRepeat: "no-repeat",
63
- backgroundSize: 'cover',
70
+ backgroundSize: "cover",
64
71
  width: "326rpx",
65
72
  height: "90rpx",
66
73
  display: "flex",
@@ -107,14 +114,6 @@ export default {
107
114
  console.log(err, "err");
108
115
  });
109
116
  },
110
- /**
111
- * @description 监听事件变化
112
- * @param container {object} 业务组件对象自己
113
- */
114
- init(container) {
115
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
116
- //this.height = getContainerPropsValue(container, 'content.height', 10);
117
- },
118
117
  init(container) {
119
118
  this.btnBg = getContainerPropsValue(container, "content.btnBg", {
120
119
  path: "",
@@ -122,6 +121,20 @@ export default {
122
121
  this.contentBg = getContainerPropsValue(container, "content.contentBg", {
123
122
  path: "",
124
123
  }).path;
124
+ this.canReceiveBg = getContainerPropsValue(
125
+ container,
126
+ "content.canReceiveBg",
127
+ {
128
+ path: "",
129
+ }
130
+ ).path;
131
+ this.cannotReceiveBg = getContainerPropsValue(
132
+ container,
133
+ "content.cannotReceiveBg",
134
+ {
135
+ path: "",
136
+ }
137
+ ).path;
125
138
  this.receive_get_url = getContainerPropsValue(
126
139
  container,
127
140
  "content.receive_get_url",
@@ -136,7 +149,7 @@ export default {
136
149
  );
137
150
  },
138
151
  handleToReceive() {
139
- if(this.status === "T") return;
152
+ if (this.status === "T") return;
140
153
  this.$xdUniHelper.navigateTo({
141
154
  url: `${this.receive_get_url}?transfer_auth_code=${this.transfer_auth_code}`,
142
155
  });
@@ -617,14 +617,21 @@
617
617
  </view>
618
618
  </view>
619
619
  </view>
620
- <!-- todo -->
621
- <view v-if="info.extras.travel_booking_info.travelers&&info.extras.travel_booking_info.travelers.length>0" :style="{
622
- background: backgroundColor,
623
- border: borderBox,
624
- borderRadius: radius + 'rpx',
625
- boxShadow: shadowBox,
626
- marginBottom: padding + 'rpx',
627
- }" class="jfb-base-order-detail__body-card jfb-base-order-detail__body-booking">
620
+ <!--旅游模块-->
621
+ <view
622
+ v-if="info.extras &&
623
+ info.extras.travel_booking_info &&
624
+ info.extras.travel_booking_info['travelers'] &&
625
+ info.extras.travel_booking_info['travelers'].length > 0"
626
+ :style="{
627
+ background: backgroundColor,
628
+ border: borderBox,
629
+ borderRadius: radius + 'rpx',
630
+ boxShadow: shadowBox,
631
+ marginBottom: padding + 'rpx',
632
+ }"
633
+ class="jfb-base-order-detail__body-card jfb-base-order-detail__body-booking"
634
+ >
628
635
  <view class="jfb-base-order-detail__body-delivery-bottom-title">预订信息</view>
629
636
  <view class="jfb-base-order-detail__body-line"></view>
630
637
  <view class="jfb-base-order-detail__body-booking-list">
@@ -638,6 +645,7 @@
638
645
  </view>
639
646
  </view>
640
647
  </view>
648
+ <!--旅游模块-->
641
649
  <view
642
650
  v-if="info.productDetail"
643
651
  class="jfb-base-order-detail__body-card jfb-base-order-detail__body-shop"
@@ -918,9 +926,17 @@ export default {
918
926
  .then((res) => {
919
927
  this.biz_code = res.biz_code;
920
928
  this.is_not_show_price = res.is_not_show_price;
921
- if(res.extras.travel_booking_info) {
922
- res.extras.travel_booking_info = JSON.parse(res.extras.travel_booking_info)
929
+
930
+ //旅游模块
931
+ if(res.extras && res.extras.travel_booking_info) {
932
+ try{
933
+ res.extras.travel_booking_info = JSON.parse(res.extras.travel_booking_info)
934
+ }catch(e){
935
+ res.extras.travel_booking_info = {}
936
+ }
923
937
  }
938
+
939
+ //预览模块
924
940
  if (this.isPreview) {
925
941
  switch (this.viewStatus) {
926
942
  case "mall":