jufubao-base 1.0.159-beta1 → 1.0.159-beta2

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.
Files changed (68) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +3 -2
  3. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +3 -2
  4. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +3 -2
  5. package/src/components/JfbBaseBack/JfbBaseBack.vue +3 -2
  6. package/src/components/JfbBaseBackground/JfbBaseBackground.vue +3 -2
  7. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +3 -2
  8. package/src/components/JfbBaseCard/JfbBaseCard.vue +4 -3
  9. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +3 -2
  10. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +0 -1
  11. package/src/components/JfbBaseCardDetailEntry/Attr.js +22 -0
  12. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +52 -35
  13. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +3 -3
  14. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +3 -4
  15. package/src/components/JfbBaseCardEntry/Attr.js +22 -1
  16. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +80 -34
  17. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +20 -0
  18. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +3 -2
  19. package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +3 -2
  20. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +3 -2
  21. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +3 -10
  22. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +15 -18
  23. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +3 -2
  24. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +14 -14
  25. package/src/components/JfbBaseCity/JfbBaseCity.vue +3 -2
  26. package/src/components/JfbBaseClear/JfbBaseClear.vue +3 -2
  27. package/src/components/JfbBaseConList/JfbBaseConList.vue +3 -2
  28. package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +3 -2
  29. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +4 -3
  30. package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetail.vue +3 -4
  31. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +17 -15
  32. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +0 -1
  33. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +3 -2
  34. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +14 -4
  35. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +6 -8
  36. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +3 -3
  37. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +6 -5
  38. package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +3 -2
  39. package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCard.vue +28 -27
  40. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +3 -4
  41. package/src/components/JfbBaseMy/JfbBaseMy.vue +3 -3
  42. package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +6 -4
  43. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +6 -4
  44. package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottom.vue +3 -2
  45. package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTop.vue +3 -2
  46. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +3 -2
  47. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +3 -2
  48. package/src/components/JfbBasePay/JfbBasePay.vue +3 -2
  49. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +12 -7
  50. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +13 -7
  51. package/src/components/JfbBasePosterType/FourScreen.vue +12 -6
  52. package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +4 -4
  53. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +3 -4
  54. package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetail.vue +4 -7
  55. package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccess.vue +6 -9
  56. package/src/components/JfbBaseSearch/JfbBaseSearch.vue +3 -2
  57. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +3 -2
  58. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +3 -2
  59. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +4 -3
  60. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +6 -4
  61. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +3 -2
  62. package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +5 -8
  63. package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +5 -8
  64. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +3 -4
  65. package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +8 -17
  66. package/src/components/JfbBaseWebview/JfbBaseWebview.vue +4 -3
  67. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +3 -2
  68. package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +3 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.159-beta1",
3
+ "version": "1.0.159-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -193,8 +193,9 @@ export default {
193
193
  },
194
194
  },
195
195
  watch: {
196
- container(value) {
197
- this.init(value);
196
+ container(value,oldValue) {
197
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
198
+ if (this.$configProject['isPreview']) this.init(value)
198
199
  },
199
200
  showAddress(val) {
200
201
  if (val === false) this.defaultValue = null;
@@ -178,8 +178,9 @@ export default {
178
178
  };
179
179
  },
180
180
  watch: {
181
- container(value) {
182
- this.init(value);
181
+ container(value,oldValue) {
182
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
183
+ if (this.$configProject['isPreview']) this.init(value)
183
184
  },
184
185
  },
185
186
  computed: {
@@ -162,8 +162,9 @@ export default {
162
162
  };
163
163
  },
164
164
  watch: {
165
- container(value) {
166
- this.init(value);
165
+ container(value,oldValue) {
166
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
167
+ if (this.$configProject['isPreview']) this.init(value)
167
168
  },
168
169
  },
169
170
  computed: {
@@ -55,8 +55,9 @@
55
55
  }
56
56
  },
57
57
  watch: {
58
- container(value) {
59
- this.init(value)
58
+ container(value,oldValue) {
59
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
60
+ if (this.$configProject['isPreview']) this.init(value)
60
61
  }
61
62
  },
62
63
  created() {
@@ -41,8 +41,9 @@ export default {
41
41
  };
42
42
  },
43
43
  watch: {
44
- container(value) {
45
- this.init(value);
44
+ container(value,oldValue) {
45
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
46
+ if (this.$configProject['isPreview']) this.init(value)
46
47
  },
47
48
  },
48
49
  destroyed() {
@@ -43,8 +43,9 @@
43
43
  }
44
44
  },
45
45
  watch: {
46
- container(value) {
47
- this.init(value)
46
+ container(value,oldValue) {
47
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
48
+ if (this.$configProject['isPreview']) this.init(value)
48
49
  }
49
50
  },
50
51
  created() {
@@ -282,9 +282,10 @@ export default {
282
282
  })
283
283
 
284
284
  },
285
- container(value) {
286
- this.init(value)
287
- }
285
+ container(value,oldValue) {
286
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
287
+ if (this.$configProject['isPreview']) this.init(value)
288
+ },
288
289
  },
289
290
  data() {
290
291
  return {
@@ -103,8 +103,9 @@
103
103
  }
104
104
  },
105
105
  watch: {
106
- container(value) {
107
- this.init(value)
106
+ container(value,oldValue) {
107
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
108
+ if (this.$configProject['isPreview']) this.init(value)
108
109
  }
109
110
  },
110
111
  created() {
@@ -302,7 +302,6 @@ export default {
302
302
  width: "80%",
303
303
  isTitle: true,
304
304
  zIndex: 2000,
305
- vm: this,
306
305
  success: (res) => {
307
306
  if (res.confirm) {
308
307
  this.timeStr = ""
@@ -4,6 +4,28 @@ export default {
4
4
  style: [],
5
5
  advanced: [],
6
6
  content: [
7
+ {
8
+ label: '选择综合入口类型:',
9
+ ele: 'xd-site-select-list',
10
+ valueKey: 'entryGroupId',
11
+ value: 'default',
12
+ placeholder: '请选择综合入口类型',
13
+ multiple: false,
14
+ groupKey:'content',
15
+ className: 'input50',
16
+ rules: [
17
+ {required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
18
+ ],
19
+ handleCustom({action, data}) {
20
+ XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
21
+ .then(res => {
22
+ data.cb(res.list)
23
+ })
24
+ .catch(error => {
25
+ console.error(error);
26
+ });
27
+ },
28
+ },
7
29
  {
8
30
  label: '票券解绑成功回跳地址:',
9
31
  ele: 'xd-select-pages-path',
@@ -74,7 +74,7 @@
74
74
  <view v-if="info.is_exchange==='Y'">
75
75
  <xd-button
76
76
  width="100%"
77
- @click="handleToShift"
77
+ @click="handleToShift()"
78
78
  size="small"
79
79
  type="primary"
80
80
  >券转换</xd-button>
@@ -82,7 +82,7 @@
82
82
  <view v-if="isShowUnbind">
83
83
  <xd-button
84
84
  width="100%"
85
- @click="handleUnBindCard"
85
+ @click="handleUnBindCard()"
86
86
  size="small"
87
87
  type="primary">解除绑定</xd-button>
88
88
  </view>
@@ -106,6 +106,7 @@ import XdPwPay from "./XdPwPay";
106
106
  import XdEditPwd from "./XdEditPwd";
107
107
  import XdUnit from "@/components/XdUnit/XdUnit";
108
108
  import XdButton from '@/components/XdButton/XdButton'
109
+ import {parsePath} from "@/utils/linkUrl";
109
110
  export default {
110
111
  name: "JfbBaseCardDetailEntry",
111
112
  components: {
@@ -121,6 +122,7 @@ export default {
121
122
  data() {
122
123
  return {
123
124
  userInfo: null, //用户信息(暂时不可用)
125
+ entryGroupId: '',//加载入口数据组别
124
126
 
125
127
  info: null,
126
128
  timeStr: "",
@@ -202,6 +204,8 @@ export default {
202
204
  init(container) {
203
205
  this.backUrl = getContainerPropsValue(container, "content.back_url", { value: "" }).value;
204
206
  this.shift_url = getContainerPropsValue(container, "content.shift_url", { value: "" }).value;
207
+ //'wechat_mini_program|default'
208
+ this.entryGroupId = getContainerPropsValue(container,"content.entryGroupId","default");
205
209
  },
206
210
  /**
207
211
  * @description 获取卡详情
@@ -212,6 +216,7 @@ export default {
212
216
  data: {
213
217
  card_number: this.card_number,
214
218
  is_show_entry_settings: "Y",
219
+ group_id: this.entryGroupId
215
220
  },
216
221
  })
217
222
  .then((res) => {
@@ -227,6 +232,9 @@ export default {
227
232
  100
228
233
  );
229
234
  }
235
+
236
+ res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
237
+
230
238
  if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
231
239
  res.site_entry_settings = res.site_entry_settings.filter(item=>{
232
240
  item['image_url'] = getServiceUrl(item['image_url'])
@@ -314,7 +322,7 @@ export default {
314
322
  //#ifdef MP-WEIXIN
315
323
  if (this.jfbAuthorize !== null) {
316
324
  this.jfbAuthorize.setCardToken(res);
317
- this.handleToApp(entry);
325
+ this.handleClick(entry);
318
326
  }
319
327
  //#endif
320
328
  if (this.$configProject.isPreview) {
@@ -322,51 +330,61 @@ export default {
322
330
  }
323
331
 
324
332
  else {
325
- this.handleToApp(entry);
333
+ this.handleClick(entry);
326
334
  }
327
335
  })
328
336
  .catch((res) => {
329
337
  this.$xdHideLoading();
330
338
  });
331
339
  },
332
- toApp(url){
333
- this.$xdUniHelper.redirectTo({
334
- url
335
- })
336
- },
337
- handleToApp(entry){
338
- let item, redirectUrl;
339
- try{
340
- item = JSON.parse(entry['redirect_data']);
341
- }catch (e) {
342
- return;
343
- }
344
- const {dir, path, host} = item;
340
+
341
+
342
+ handleClick(entry){
343
+ const {dir, path, host, appType} = entry['redirect_data'];
344
+ let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
345
+ let regSp = /(-apiuri\/v)/;
346
+
347
+ if(appType === undefined) entry.redirect_data.appType = 'h5';
345
348
  let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
346
349
 
347
350
  //外站配置地址
348
- if (entry.redirect_type === 'URL') {
349
- if (item['path'].indexOf('?') === -1) {
350
- redirectUrl = `${item['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
351
- } else redirectUrl = `${item['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
352
- this.toApp(redirectUrl);
353
- return;
351
+ if(entry.redirect_type === 'URL') {
352
+ if(regHttp.test(entry.redirect_data['path']) || regSp.test(entry.redirect_data['path'])) {
353
+ this.$xdUniHelper.redirectTo({
354
+ url:`${entry.redirect_data['path']}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
355
+ }, false)
356
+ }
357
+ else {
358
+ console.error(`配置错误:${entry.redirect_data['path']}`);
359
+ throw new Error(`配置错误:${entry.redirect_data['path']}`)
360
+ }
361
+ return
354
362
  }
355
363
 
356
- //站内转换
357
- let jumpUrl = item.path;
358
- //#ifdef H5
359
- jumpUrl = `//${host}/${dir}${path}`;
360
- //#endif
364
+ //站内应用处理
365
+ let jumpUrl = '';
366
+ let jumpUrlObj = parsePath(path);
367
+ let cardPathStr = '';
368
+ if(jumpUrlObj.isSameApp) jumpUrl = jumpUrlObj.url;
369
+ else jumpUrl = `//${host}/${jumpUrlObj.dir}${jumpUrlObj.url}`;
361
370
 
362
- if (item['fixed_business_code'] === '') {
363
- redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
364
- }
365
- else {
366
- redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
371
+ //#ifdef MP-WEIXIN
372
+ //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
373
+ if(entry.redirect_data.appType === 'h5') {
374
+ const custom_redirect_data = this.$xdUniHelper.checkVarType(entry['custom_redirect_data']) === 'object'?entry['custom_redirect_data']:{};
375
+ const cardPathObject = this.getCardPath(custom_redirect_data);
376
+ if(cardPathObject !== null) {
377
+ const {cardPath, cardSelf} =cardPathObject
378
+ if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
379
+ }
367
380
  }
368
- this.toApp(redirectUrl);
381
+ //#endif
382
+
383
+ jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
384
+ if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
385
+ else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
369
386
  },
387
+
370
388
  handleOnClose() {
371
389
  this.editShow = false;
372
390
  },
@@ -391,7 +409,6 @@ export default {
391
409
  width: "80%",
392
410
  isTitle: true,
393
411
  zIndex: 2000,
394
- vm: this,
395
412
  success: (res) => {
396
413
  if (res.confirm) {
397
414
  this.timeStr = ""
@@ -115,8 +115,9 @@ export default {
115
115
  };
116
116
  },
117
117
  watch: {
118
- container(value) {
119
- this.init(value);
118
+ container(value,oldValue) {
119
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
120
+ if (this.$configProject['isPreview']) this.init(value)
120
121
  },
121
122
  },
122
123
  created() {
@@ -166,7 +167,6 @@ export default {
166
167
  width: "80%",
167
168
  isTitle: true,
168
169
  zIndex: 2000,
169
- vm: this,
170
170
  success: (res) => {
171
171
  if (res.confirm) {
172
172
  jfbRootExec("disabledCardUnbind", {
@@ -182,8 +182,9 @@ export default {
182
182
  },
183
183
  },
184
184
  watch: {
185
- container(value) {
186
- this.init(value);
185
+ container(value,oldValue) {
186
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
187
+ if (this.$configProject['isPreview']) this.init(value)
187
188
  },
188
189
  },
189
190
  created() {
@@ -231,7 +232,6 @@ export default {
231
232
  width: "80%",
232
233
  isTitle: true,
233
234
  zIndex: 2000,
234
- vm: this,
235
235
  success: (res) => {
236
236
  if (res.confirm) {
237
237
  let cardIds = this.cardOrgList.map(item=>{
@@ -264,7 +264,6 @@ export default {
264
264
  width: "80%",
265
265
  isTitle: true,
266
266
  zIndex: 2000,
267
- vm: this,
268
267
  success: (res) => {
269
268
  if (res.confirm) {
270
269
  jfbRootExec("disabledCardUnbindEntry", {
@@ -4,6 +4,28 @@ export default {
4
4
  style: [],
5
5
  advanced: [],
6
6
  content: [
7
+ {
8
+ label: '选择综合入口类型:',
9
+ ele: 'xd-site-select-list',
10
+ valueKey: 'entryGroupId',
11
+ value: 'default',
12
+ placeholder: '请选择综合入口类型',
13
+ multiple: false,
14
+ groupKey:'content',
15
+ className: 'input50',
16
+ rules: [
17
+ {required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
18
+ ],
19
+ handleCustom({action, data}) {
20
+ XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
21
+ .then(res => {
22
+ data.cb(res.list)
23
+ })
24
+ .catch(error => {
25
+ console.error(error);
26
+ });
27
+ },
28
+ },
7
29
  {
8
30
  label: '提示内容:',
9
31
  ele: 'xd-site-news',
@@ -312,6 +334,5 @@ export default {
312
334
  },
313
335
  inline: false,
314
336
  },
315
-
316
337
  ],
317
338
  };
@@ -387,6 +387,8 @@ import { mapState, mapActions } from "vuex";
387
387
  import { getContainerPropsValue, isWechat,isQrCode } from "@/utils/xd.base";
388
388
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
389
389
  import { Base64 } from "js-base64";
390
+ import getServiceUrl from "@/common/getServiceUrl";
391
+ import {parsePath} from "@/utils/linkUrl";
390
392
  const Color = require("color");
391
393
 
392
394
  export default {
@@ -414,8 +416,9 @@ export default {
414
416
  }
415
417
  },
416
418
  watch: {
417
- container(value) {
418
- this.init(value)
419
+ container(value,oldValue) {
420
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
421
+ if (this.$configProject['isPreview']) this.init(value)
419
422
  },
420
423
  tabIndex(){
421
424
  this.clearDefault();
@@ -434,6 +437,7 @@ export default {
434
437
  isPreview: false,
435
438
  noticeStatus: false,
436
439
  loadingCardList: true,
440
+ entryGroupId: '',//加载入口数据组别
437
441
 
438
442
  cutIndex: 1,
439
443
  tabIndex: 1,
@@ -487,7 +491,6 @@ export default {
487
491
  methods: {
488
492
 
489
493
  init(container){
490
- //设置
491
494
  this.cardLayout = getContainerPropsValue(container,"content.cardLayout","1");
492
495
  this.changeUrl = getContainerPropsValue(container,"content.change_url",{value: ""}).value;
493
496
  this.disabledUrl = getContainerPropsValue(container,"content.disabled_url",{value: ""}).value;
@@ -497,6 +500,8 @@ export default {
497
500
  this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
498
501
  this.isShowCode = getContainerPropsValue(container, "content.isShowCode", "Y");
499
502
  this.bindCard = getContainerPropsValue(container,"content.bindCard","1");
503
+ //'wechat_mini_program|default'
504
+ this.entryGroupId = getContainerPropsValue(container,"content.entryGroupId","default");
500
505
  },
501
506
 
502
507
  handleToLink(path) {
@@ -578,6 +583,7 @@ export default {
578
583
  /**
579
584
  * @description 已绑定卡登录
580
585
  * @param item
586
+ * @param entry
581
587
  */
582
588
  handleBindLogin(item , entry) {
583
589
  //卡券登录
@@ -596,7 +602,7 @@ export default {
596
602
  //#ifdef MP-WEIXIN
597
603
  if (this.jfbAuthorize !== null) {
598
604
  this.jfbAuthorize.setCardToken(res);
599
- this.handleToApp(entry);
605
+ this.handleClick(entry);
600
606
  }
601
607
  //#endif
602
608
  if (this.$configProject.isPreview) {
@@ -604,7 +610,7 @@ export default {
604
610
  }
605
611
 
606
612
  else {
607
- this.handleToApp(entry);
613
+ this.handleClick(entry);
608
614
  }
609
615
  })
610
616
  .catch((res) => {
@@ -619,43 +625,78 @@ export default {
619
625
  }, false);
620
626
  }
621
627
  },
622
- toApp(url){
623
- this.$xdUniHelper.redirectTo({
624
- url
625
- })
626
- },
627
- handleToApp(entry){
628
- let item, redirectUrl;
629
- try{
630
- item = JSON.parse(entry['redirect_data']);
631
- }catch (e) {
632
- return;
628
+
629
+
630
+ getCardPath(custom_redirect_data = {}){
631
+ //#ifdef H5
632
+ return null;
633
+ //#endif
634
+ //#ifdef MP-WEIXIN
635
+ const dir = custom_redirect_data.dir;
636
+ const actDir = this.projectAttr['deploy_dir'];
637
+ if(custom_redirect_data.appType === 'wxmp') {
638
+ if(dir === actDir) {
639
+ return {
640
+ cardPath: custom_redirect_data.path,
641
+ cardSelf: 'wxmp',
642
+ };
643
+ }
644
+ else return null;
645
+ }
646
+ else if(custom_redirect_data.appType === 'h5'){
647
+ return {
648
+ cardPath: custom_redirect_data.site_url,
649
+ cardSelf: 'h5',
650
+ };
633
651
  }
634
- const {dir, path, host} = item;
652
+ else return null;
653
+ //#endif
654
+ },
655
+
656
+ handleClick(entry){
657
+ const {dir, path, host, appType} = entry['redirect_data'];
658
+ let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
659
+ let regSp = /(-apiuri\/v)/;
660
+
661
+ if(appType === undefined) entry.redirect_data.appType = 'h5';
635
662
  let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
636
663
 
637
664
  //外站配置地址
638
- if (entry.redirect_type === 'URL') {
639
- if (item['path'].indexOf('?') === -1) {
640
- redirectUrl = `${item['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
641
- } else redirectUrl = `${item['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
642
- this.toApp(redirectUrl);
643
- return;
665
+ if(entry.redirect_type === 'URL') {
666
+ if(regHttp.test(entry.redirect_data['path']) || regSp.test(entry.redirect_data['path'])) {
667
+ this.$xdUniHelper.redirectTo({
668
+ url:`${entry.redirect_data['path']}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
669
+ }, false)
670
+ }
671
+ else {
672
+ console.error(`配置错误:${entry.redirect_data['path']}`);
673
+ throw new Error(`配置错误:${entry.redirect_data['path']}`)
674
+ }
675
+ return
644
676
  }
645
677
 
646
- //站内转换
647
- let jumpUrl = item.path;
648
- //#ifdef H5
649
- jumpUrl = `//${host}/${dir}${path}`;
678
+ //站内应用处理
679
+ let jumpUrl = '';
680
+ let jumpUrlObj = parsePath(path);
681
+ let cardPathStr = '';
682
+ if(jumpUrlObj.isSameApp) jumpUrl = jumpUrlObj.url;
683
+ else jumpUrl = `//${host}/${jumpUrlObj.dir}${jumpUrlObj.url}`;
684
+
685
+ //#ifdef MP-WEIXIN
686
+ //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
687
+ if(entry.redirect_data.appType === 'h5') {
688
+ const custom_redirect_data = this.$xdUniHelper.checkVarType(entry['custom_redirect_data']) === 'object'?entry['custom_redirect_data']:{};
689
+ const cardPathObject = this.getCardPath(custom_redirect_data);
690
+ if(cardPathObject !== null) {
691
+ const {cardPath, cardSelf} =cardPathObject
692
+ if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
693
+ }
694
+ }
650
695
  //#endif
651
696
 
652
- if (item['fixed_business_code'] === '') {
653
- redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
654
- }
655
- else {
656
- redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
657
- }
658
- this.toApp(redirectUrl);
697
+ jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
698
+ if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
699
+ else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
659
700
  },
660
701
 
661
702
  toDetail(item, out=true) {
@@ -693,6 +734,7 @@ export default {
693
734
  if(options['jfb_business_code']) {
694
735
  params['card_business_code'] = options['jfb_business_code'];
695
736
  }
737
+ if(this.entryGroupId) params['group_id'] = this.entryGroupId;
696
738
  this.$xdShowLoading({});
697
739
  jfbRootExec("getListEntryCardBind", {
698
740
  vm: this,
@@ -714,6 +756,10 @@ export default {
714
756
  ),
715
757
  };
716
758
  });
759
+
760
+ //过滤入口配置
761
+ res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
762
+
717
763
  this.ajaxCardList = res;
718
764
  this.hasChangeStatus = this.getCardGroupItem(this.ajaxCardList.list.filter((item) => {
719
765
  return item["is_exchange"] === "Y";
@@ -36,10 +36,20 @@
36
36
  v-model="card_password"
37
37
  :placeholder="card_pwd_placeholder"
38
38
  />
39
+ <!--#ifdef H5-->
39
40
  <xd-font-icon
40
41
  @click="handleIcon()"
41
42
  :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
42
43
  ></xd-font-icon>
44
+ <!--#endif-->
45
+ <!--#ifdef MP-WEIXIN-->
46
+ <xd-font-icon
47
+ :width="72"
48
+ :height="72"
49
+ @click="handleIcon()"
50
+ :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
51
+ ></xd-font-icon>
52
+ <!--#endif-->
43
53
  </view>
44
54
  </view>
45
55
  <view class="jfb-base-card-info__body-footer" :style="prod_bottom">
@@ -403,6 +413,16 @@ export default {
403
413
  color: #a6a6a6;
404
414
  margin-right: unit(70, rpx);
405
415
  text-align: center;
416
+
417
+
418
+ }
419
+
420
+ & .mp {
421
+ display: flex;
422
+ justify-content: center;
423
+ align-items: center;
424
+ width: 72rpx;
425
+ height: 72rpx
406
426
  }
407
427
 
408
428
  input {
@@ -168,8 +168,9 @@ export default {
168
168
  };
169
169
  },
170
170
  watch: {
171
- container(value) {
172
- this.init(value);
171
+ container(value,oldValue) {
172
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
173
+ if (this.$configProject['isPreview']) this.init(value)
173
174
  },
174
175
  },
175
176
  computed: {
@@ -135,8 +135,9 @@ export default {
135
135
  }),
136
136
  },
137
137
  watch: {
138
- container(value) {
139
- this.init(value);
138
+ container(value,oldValue) {
139
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
140
+ if (this.$configProject['isPreview']) this.init(value)
140
141
  },
141
142
  },
142
143
  created() {