jufubao-base 1.0.310 → 1.0.311-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-base",
3
- "version": "1.0.310",
3
+ "version": "1.0.311-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -16,5 +16,17 @@ export default {
16
16
  },
17
17
  inline: false,
18
18
  },
19
+ {
20
+ label: '收集手机号地址:',
21
+ ele: 'xd-select-pages-path',
22
+ valueKey: 'collect_phone_url',
23
+ groupKey:'advanced',
24
+ placeholder: '请选择收集手机号地址',
25
+ value: null,
26
+ setting: {
27
+ router: XdBus.getParentApi('getPagesTree'),
28
+ },
29
+ inline: false,
30
+ },
19
31
  ],
20
32
  };
@@ -94,6 +94,49 @@
94
94
  <!-- @onClose="handlePwdClose"-->
95
95
  <!-- ></xd-pw-pay>-->
96
96
  </view>
97
+ <xd-down-drawer
98
+ :show.sync="showDialog"
99
+ height="50vh"
100
+ >
101
+ <template>
102
+ <view class="top_title">请务必先关联,否则影响此卡使用</view>
103
+ <view class="method_item">
104
+ <view class="method_item_top">
105
+ <view class="method_title">方法一</view>
106
+ <view>复制文本,打开支付宝APP</view>
107
+ </view>
108
+ <view class="method_item_bottom">
109
+ <view class="method_item_bottom_left">吱口令:{{share_code}}</view>
110
+ <view class="method_item_bottom_right" @click="copy(share_code)">复制吱口令</view>
111
+ </view>
112
+ </view>
113
+ <view class="method_item">
114
+ <view class="method_item_top">
115
+ <view class="method_title">方法二</view>
116
+ <view>复制链接,在默认浏览器打开</view>
117
+ </view>
118
+ <view class="method_item_bottom">
119
+ <view class="method_item_bottom_left">{{sign_url}}</view>
120
+ <view class="method_item_bottom_right" @click="copy(sign_url)">复制链接</view>
121
+ </view>
122
+ </view>
123
+ <view class="method_item">
124
+ <view class="method_item_top">
125
+ <view class="method_title">方法三</view>
126
+ <view>保存图片,使用支付宝APP扫码</view>
127
+ </view>
128
+ <view class="method_item_bottom code_img">
129
+ <view>打开支付宝APP,点击扫一扫直接扫码或点击相册中保存图片</view>
130
+ <view class="code_box">
131
+ <view class="qr_code">
132
+ <image mode="aspectFit" :src="sign_url_qrcode"></image>
133
+ </view>
134
+ <view>长按保存二维码</view>
135
+ </view>
136
+ </view>
137
+ </view>
138
+ </template>
139
+ </xd-down-drawer>
97
140
  </view>
98
141
  </template>
99
142
 
@@ -110,6 +153,7 @@ import getBusinessImageUrl from "@/common/getBusinessImageUrl";
110
153
  import { Base64 } from "js-base64";
111
154
  import { getContainerPropsValue } from "@/utils/xd.base";
112
155
  import {mapState} from 'vuex';
156
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
113
157
 
114
158
  export default {
115
159
  name: "JfbBaseCardDetail",
@@ -118,6 +162,7 @@ export default {
118
162
  XdPwPay,
119
163
  XdEditPwd,
120
164
  XdUnit,
165
+ XdDownDrawer,
121
166
  },
122
167
  mixins: [componentsMixins, extsMixins, JfbBaseCardDetailMixin],
123
168
  computed:{
@@ -171,9 +216,25 @@ export default {
171
216
  isBrandLogo: false,
172
217
 
173
218
  isShowUnbind: false, //是否启动绑定按钮
219
+ collect_phone_url: "",//收集手机号地址
220
+ showDialog:false,
221
+ sign_url:'',
222
+ share_code:'',
223
+ sign_url_qrcode:'',
224
+ toCollectPhoneUrl:'',
174
225
  };
175
226
  },
176
- created() {},
227
+ created() {
228
+ // ifDef小程序拼接问题
229
+ let url = this.$xdUniHelper.parseURL();
230
+ // #ifdef MP-WEIXIN
231
+ this.toCollectPhoneUrl = url.relative
232
+ // #endif
233
+ // #ifdef H5
234
+ this.toCollectPhoneUrl = '@site_domain@'+''+url.relative
235
+ // #endif
236
+ console.log(this.toCollectPhoneUrl,encodeURIComponent(this.toCollectPhoneUrl),'this.toCollectPhoneUrl')
237
+ },
177
238
  methods: {
178
239
  onJfbLoad(options) {
179
240
  if (options["x-params"]) {
@@ -384,6 +445,8 @@ export default {
384
445
  this.timeStr = "01分19秒"
385
446
  }
386
447
  this.backUrl = getContainerPropsValue( this.container, "content.back_url", { value: "" }).value;
448
+ this.collect_phone_url = getContainerPropsValue(container, "content.collect_phone_url", { value: "" }).value;
449
+ console.log(this.collect_phone_url,'collect_phone_url')
387
450
  },
388
451
 
389
452
  /**
@@ -413,6 +476,19 @@ export default {
413
476
  }
414
477
 
415
478
  this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
479
+ //支付宝弹框
480
+ if(res.enterprise_info&&res.enterprise_info.is_need_activate==='Y'){
481
+ this.share_code = res.enterprise_info.share_code;
482
+ this.sign_url = res.enterprise_info.sign_url;
483
+ this.sign_url_qrcode = res.enterprise_info.sign_url_qrcode;
484
+ if(res.enterprise_info.is_need_collect_phone_number==='Y'){
485
+ let url = `${this.collect_phone_url}?callback_url=${encodeURIComponent(this.toCollectPhoneUrl)}`
486
+ this.$xdUniHelper.navigateTo({
487
+ url:url,
488
+ });
489
+ }
490
+ this.showDialog = true;
491
+ }
416
492
  })
417
493
  .catch((err) => {
418
494
  // this.$refs["pwPay"].clearPwd();
@@ -436,6 +512,26 @@ export default {
436
512
  handlePwdClose() {
437
513
  this.$helper.navigateBack();
438
514
  },
515
+ /**
516
+ *@description 复制功能
517
+ * @param text
518
+ */
519
+ copy(text) {
520
+ // #ifdef H5
521
+ this.$copyText(text).then((res) => {
522
+ this.$xdAlert({ content: "复制成功" });
523
+ });
524
+ // #endif
525
+ // #ifndef H5
526
+ uni.setClipboardData({
527
+ data: text,
528
+ showToast: false,
529
+ success: () => {
530
+ //this.$xdAlert({ content: "复制成功" });
531
+ },
532
+ });
533
+ // #endif
534
+ },
439
535
  },
440
536
  };
441
537
  </script>
@@ -595,5 +691,70 @@ export default {
595
691
  }
596
692
  }
597
693
  }
694
+ .method_item{
695
+ padding: unit(32, rpx);
696
+ border-bottom: 1px solid #F8F8F8;
697
+ color: #333333;
698
+ font-size: unit(28,rpx);
699
+ &_top{
700
+ display: flex;
701
+ align-items: center;
702
+ }
703
+ &_bottom{
704
+ display: flex;
705
+ justify-content: space-between;
706
+ align-items: flex-start;
707
+ margin-top: unit(16, rpx);
708
+ height: unit(32,rpx);
709
+ line-height: unit(32,rpx);
710
+ font-size: unit(24,rpx);
711
+ color: #666666;
712
+ &_right{
713
+ min-width: unit(180,rpx);
714
+ text-align: right;
715
+ color: #FF8D1A;
716
+ }
717
+ &_left{
718
+ color: #666666;
719
+ white-space: nowrap;
720
+ overflow: hidden;
721
+ text-overflow: ellipsis;
722
+ }
723
+ }
724
+ .code_img{
725
+ height: auto!important;
726
+ }
727
+
728
+ }
729
+ .method_title{
730
+ color: #fff;
731
+ background-color: #FF8D1A;
732
+ width: unit(120,rpx);
733
+ height: unit(50,rpx);
734
+ line-height: unit(50,rpx);
735
+ border-radius: unit(25,rpx);
736
+ text-align: center;
737
+ margin-right: unit(20,rpx);
738
+ font-size: unit(24,rpx);
739
+ }
740
+ .top_title{
741
+ height: unit(100,rpx);
742
+ text-align: center;
743
+ line-height:unit(100,rpx);
744
+ color:#333333;
745
+ font-size:unit(32,rpx);
746
+ border-bottom: 1px solid #F8F8F8;
747
+ }
748
+ .code_box{
749
+ text-align: center;
750
+ .qr_code{
751
+ width: unit(168,rpx);
752
+ height: unit(168,rpx);
753
+ image{
754
+ width: 100%;
755
+ height: 100%;
756
+ }
757
+ }
758
+ }
598
759
  }
599
760
  </style>
@@ -73,5 +73,17 @@ export default {
73
73
  },
74
74
  inline: false,
75
75
  },
76
+ {
77
+ label: '收集手机号地址:',
78
+ ele: 'xd-select-pages-path',
79
+ valueKey: 'collect_phone_url',
80
+ groupKey:'advanced',
81
+ placeholder: '请选择收集手机号地址',
82
+ value: null,
83
+ setting: {
84
+ router: XdBus.getParentApi('getPagesTree'),
85
+ },
86
+ inline: false,
87
+ },
76
88
  ],
77
89
  };
@@ -108,6 +108,49 @@
108
108
  </view>
109
109
  </view>
110
110
  </view>
111
+ <xd-down-drawer
112
+ :show.sync="showDialog"
113
+ height="50vh"
114
+ >
115
+ <template>
116
+ <view class="top_title">请务必先关联,否则影响此卡使用</view>
117
+ <view class="method_item">
118
+ <view class="method_item_top">
119
+ <view class="method_title">方法一</view>
120
+ <view>复制文本,打开支付宝APP</view>
121
+ </view>
122
+ <view class="method_item_bottom">
123
+ <view class="method_item_bottom_left">吱口令:{{share_code}}</view>
124
+ <view class="method_item_bottom_right" @click="copy(share_code)">复制吱口令</view>
125
+ </view>
126
+ </view>
127
+ <view class="method_item">
128
+ <view class="method_item_top">
129
+ <view class="method_title">方法二</view>
130
+ <view>复制链接,在默认浏览器打开</view>
131
+ </view>
132
+ <view class="method_item_bottom">
133
+ <view class="method_item_bottom_left">{{sign_url}}</view>
134
+ <view class="method_item_bottom_right" @click="copy(sign_url)">复制链接</view>
135
+ </view>
136
+ </view>
137
+ <view class="method_item">
138
+ <view class="method_item_top">
139
+ <view class="method_title">方法三</view>
140
+ <view>保存图片,使用支付宝APP扫码</view>
141
+ </view>
142
+ <view class="method_item_bottom code_img">
143
+ <view>打开支付宝APP,点击扫一扫直接扫码或点击相册中保存图片</view>
144
+ <view class="code_box">
145
+ <view class="qr_code">
146
+ <image mode="aspectFit" :src="sign_url_qrcode"></image>
147
+ </view>
148
+ <view>长按保存二维码</view>
149
+ </view>
150
+ </view>
151
+ </view>
152
+ </template>
153
+ </xd-down-drawer>
111
154
  </view>
112
155
  </template>
113
156
 
@@ -126,6 +169,7 @@ import XdPwPay from "./XdPwPay";
126
169
  import XdEditPwd from "./XdEditPwd";
127
170
  import XdUnit from "@/components/XdUnit/XdUnit";
128
171
  import XdButton from '@/components/XdButton/XdButton'
172
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
129
173
  import {parsePath} from "@/utils/linkUrl";
130
174
  export default {
131
175
  name: "JfbBaseCardDetailEntry",
@@ -134,7 +178,8 @@ export default {
134
178
  XdPwPay,
135
179
  XdEditPwd,
136
180
  XdUnit,
137
- XdButton
181
+ XdButton,
182
+ XdDownDrawer,
138
183
  },
139
184
  mixins: [
140
185
  componentsMixins,extsMixins,JfbBaseCardDetailEntryMixin,colorCardMixins,
@@ -176,7 +221,13 @@ export default {
176
221
  isBrandLogo: false,
177
222
  isShowUnbind: false, //是否启动绑定按钮
178
223
  headerBg: {},
179
- give_url: ""
224
+ give_url: "",
225
+ collect_phone_url: "",//收集手机号地址
226
+ showDialog:false,
227
+ sign_url:'',
228
+ share_code:'',
229
+ sign_url_qrcode:'',
230
+ toCollectPhoneUrl:'',
180
231
  };
181
232
  },
182
233
  watch: {
@@ -193,6 +244,15 @@ export default {
193
244
  },
194
245
  },
195
246
  created() {
247
+ // ifDef小程序拼接问题
248
+ let url = this.$xdUniHelper.parseURL();
249
+ // #ifdef MP-WEIXIN
250
+ this.toCollectPhoneUrl = url.relative
251
+ // #endif
252
+ // #ifdef H5
253
+ this.toCollectPhoneUrl = '@site_domain@'+''+url.relative
254
+ // #endif
255
+ console.log(this.toCollectPhoneUrl,encodeURIComponent(this.toCollectPhoneUrl),'this.toCollectPhoneUrl')
196
256
  this.init(this.container)
197
257
  },
198
258
  methods: {
@@ -228,6 +288,8 @@ export default {
228
288
  this.backUrl = getContainerPropsValue(container, "content.back_url", { value: "" }).value;
229
289
  this.shift_url = getContainerPropsValue(container, "content.shift_url", { value: "" }).value;
230
290
  this.give_url = getContainerPropsValue(container, "content.give_url", { value: "" }).value;
291
+ this.collect_phone_url = getContainerPropsValue(container, "content.collect_phone_url", { value: "" }).value;
292
+ console.log(this.collect_phone_url,'collect_phone_url')
231
293
  //'wechat_mini_program|default'
232
294
  this.entryGroupId = getContainerPropsValue(container,"content.entryGroupId","default");
233
295
  },
@@ -279,6 +341,19 @@ export default {
279
341
  this.show = false;
280
342
  console.log(this.getCardThemes(res.card_type_name),'this.getCardThemes(res.card_type_name)');
281
343
  this.headerBg = this.getCardThemes(res.card_type_name);
344
+ //支付宝弹框
345
+ if(res.enterprise_info&&res.enterprise_info.is_need_activate==='Y'){
346
+ this.share_code = res.enterprise_info.share_code;
347
+ this.sign_url = res.enterprise_info.sign_url;
348
+ this.sign_url_qrcode = res.enterprise_info.sign_url_qrcode;
349
+ if(res.enterprise_info.is_need_collect_phone_number==='Y'){
350
+ let url = `${this.collect_phone_url}?callback_url=${encodeURIComponent(this.toCollectPhoneUrl)}`
351
+ this.$xdUniHelper.navigateTo({
352
+ url:url,
353
+ });
354
+ }
355
+ this.showDialog = true;
356
+ }
282
357
  })
283
358
  .catch((err) => {
284
359
  // this.$refs["pwPay"].clearPwd();
@@ -558,6 +633,26 @@ export default {
558
633
  clearTimeout(this.refrushTimeer);
559
634
  }
560
635
  },
636
+ /**
637
+ *@description 复制功能
638
+ * @param text
639
+ */
640
+ copy(text) {
641
+ // #ifdef H5
642
+ this.$copyText(text).then((res) => {
643
+ this.$xdAlert({ content: "复制成功" });
644
+ });
645
+ // #endif
646
+ // #ifndef H5
647
+ uni.setClipboardData({
648
+ data: text,
649
+ showToast: false,
650
+ success: () => {
651
+ //this.$xdAlert({ content: "复制成功" });
652
+ },
653
+ });
654
+ // #endif
655
+ },
561
656
  },
562
657
  };
563
658
  </script>
@@ -1008,5 +1103,71 @@ export default {
1008
1103
 
1009
1104
  }
1010
1105
  }
1106
+ .method_item{
1107
+ padding: unit(32, rpx);
1108
+ border-bottom: 1px solid #F8F8F8;
1109
+ color: #333333;
1110
+ font-size: unit(28,rpx);
1111
+ &_top{
1112
+ display: flex;
1113
+ align-items: center;
1114
+ }
1115
+ &_bottom{
1116
+ display: flex;
1117
+ justify-content: space-between;
1118
+ align-items: flex-start;
1119
+ margin-top: unit(16, rpx);
1120
+ height: unit(32,rpx);
1121
+ line-height: unit(32,rpx);
1122
+ font-size: unit(24,rpx);
1123
+ color: #666666;
1124
+ &_right{
1125
+ min-width: unit(180,rpx);
1126
+ text-align: right;
1127
+ color: #FF8D1A;
1128
+ }
1129
+ &_left{
1130
+ color: #666666;
1131
+ white-space: nowrap;
1132
+ overflow: hidden;
1133
+ text-overflow: ellipsis;
1134
+ }
1135
+ }
1136
+ .code_img{
1137
+ height: auto!important;
1138
+ }
1139
+
1140
+ }
1141
+ .method_title{
1142
+ color: #fff;
1143
+ background-color: #FF8D1A;
1144
+ width: unit(120,rpx);
1145
+ height: unit(50,rpx);
1146
+ line-height: unit(50,rpx);
1147
+ border-radius: unit(25,rpx);
1148
+ text-align: center;
1149
+ margin-right: unit(20,rpx);
1150
+ font-size: unit(24,rpx);
1151
+ }
1152
+ .top_title{
1153
+ height: unit(100,rpx);
1154
+ text-align: center;
1155
+ line-height:unit(100,rpx);
1156
+ color:#333333;
1157
+ font-size:unit(32,rpx);
1158
+ border-bottom: 1px solid #F8F8F8;
1159
+ }
1160
+ .code_box{
1161
+ text-align: center;
1162
+ .qr_code{
1163
+ width: unit(168,rpx);
1164
+ height: unit(168,rpx);
1165
+ image{
1166
+ width: 100%;
1167
+ height: 100%;
1168
+ }
1169
+ }
1170
+ }
1171
+
1011
1172
  }
1012
1173
  </style>