@uxda/appkit 4.3.15 → 4.3.16

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 (32) hide show
  1. package/dist/appkit.css +105 -12
  2. package/dist/index.js +1105 -410
  3. package/package.json +2 -5
  4. package/src/balance/api/index.ts +1 -1
  5. package/src/balance/components/PromoterCard.vue +1 -0
  6. package/src/notice/api/index.ts +1 -1
  7. package/src/notice/components/NoticeList2.vue +234 -73
  8. package/src/notice/components/useCommonList.ts +1 -0
  9. package/src/payment/api/endpoints.ts +2 -0
  10. package/src/payment/api/index.ts +2 -1
  11. package/src/payment/components/RechargeResult.vue +0 -1
  12. package/src/payment/components/TradeView.vue +313 -108
  13. package/src/payment/services/request-payment.ts +9 -3
  14. package/src/payment/types.ts +1 -0
  15. package/src/register/components/SelfRegistration.vue +1 -1
  16. package/src/shared/components/AppVerify.vue +15 -6
  17. package/src/shared/components/OcrBank.vue +202 -0
  18. package/src/shared/components/OcrBusinessLicense.vue +20 -37
  19. package/src/shared/components/OcrIcon.vue +105 -67
  20. package/src/shared/components/OcrInvoice.vue +322 -0
  21. package/src/shared/components/index.ts +3 -1
  22. package/src/shared/composables/index.ts +1 -0
  23. package/src/shared/composables/useCompress.ts +64 -0
  24. package/src/shared/composables/useUpload.ts +96 -51
  25. package/src/shared/http/Http.ts +1 -0
  26. package/src/shared/tracking/tracking-sdk.ts +0 -1
  27. package/src/shared/weixin/jssdk.ts +1 -0
  28. package/src/user/api/index.ts +1 -1
  29. package/src/user/components/UserAuth.vue +1 -1
  30. package/src/user/components/UserFeedback.vue +1 -0
  31. package/src/user/components/UserInfo.vue +2 -0
  32. package/types/global.d.ts +2 -0
@@ -1,28 +1,58 @@
1
1
  <template>
2
2
  <view class="view recharge-view2">
3
3
  <view class="flex-grow">
4
- <rights-picker :items="amounts" :selected="state.selected" @change="onAmountSelect" />
4
+ <rights-picker
5
+ :items="amounts"
6
+ :selected="state.selected"
7
+ @change="onAmountSelect"
8
+ />
5
9
  <div class="bean-buy" v-if="amounts[state.selected]">
6
10
  <div class="left">
7
11
  <div class="title">使用云豆支付</div>
8
- <div class="amount" v-if="!selectBean">余额 {{ formatAmount(balance || 0) }}</div>
9
- <div class="amount" v-else>扣减后余额 {{ formatAmount(balance - amounts[state.selected].paymentAmount) }}</div>
12
+ <div class="amount" v-if="!selectBean || isCombinedPayment">
13
+ 余额 {{ formatAmount(balance || 0) }}
14
+ </div>
15
+ <div class="amount" v-else>
16
+ 扣减后余额
17
+ {{ formatAmount(balance - amounts[state.selected].paymentAmount) }}
18
+ </div>
10
19
  </div>
11
- <div class="right" v-if="balance >= amounts[state.selected].paymentAmount" @click="selectBean = !selectBean">
12
- <div class="amount">-{{ formatAmount(amounts[state.selected].paymentAmount || 0) }}</div>
13
- <img class="icon"
14
- :src="selectBean ? 'https://cdn.ddjf.com/static/images/appkit/select.svg' : 'https://cdn.ddjf.com/static/images/appkit/not-select.svg'" />
20
+ <div class="right" @click="selectBean = !selectBean">
21
+ <div class="amount">
22
+ -{{ formatAmount(amounts[state.selected].paymentAmount || 0) }}
23
+ </div>
24
+ <img
25
+ class="icon"
26
+ :src="
27
+ selectBean
28
+ ? 'https://cdn.ddjf.com/static/images/appkit/select.svg'
29
+ : 'https://cdn.ddjf.com/static/images/appkit/not-select.svg'
30
+ "
31
+ />
32
+ </div>
33
+
34
+ <div class="balance-warning" v-if="isCombinedPayment">
35
+ 云豆余额不足,还需额外支付{{ formatAmount(extraPaymentAmount) }}元
15
36
  </div>
16
37
  </div>
17
38
 
39
+ <div class="balance-warning-tip" v-if="isCombinedPayment">
40
+ 请在支付完成前确保元豆余额不被消耗,否则本次权益可能购买失败
41
+ </div>
18
42
 
19
43
  <slot name="banner"></slot>
20
44
  </view>
21
45
 
22
46
  <view class="amount-footer">
23
- <view class="agreement" v-if="!selectBean">
24
- <nut-checkbox v-model="state.agreed">我已阅读并同意<a v-track-click class="link inline"
25
- @click="onAgreementLinkClick">《大道云平台云豆充值服务协议》</a></nut-checkbox>
47
+ <view class="agreement" v-if="!selectBean || isCombinedPayment">
48
+ <nut-checkbox v-model="state.agreed"
49
+ >我已阅读并同意<a
50
+ v-track-click
51
+ class="link inline"
52
+ @click="onAgreementLinkClick"
53
+ >《大道云平台云豆充值服务协议》</a
54
+ ></nut-checkbox
55
+ >
26
56
  </view>
27
57
  <div class="buy-amount">
28
58
  <div class="left">
@@ -31,27 +61,52 @@
31
61
  <i>¥</i>{{ formatAmount(currentAmount) }}
32
62
  </span>
33
63
  </div>
34
- <nut-button block shape="square" :loading="state.buttonLoading" v-track-click @click="onPayClick"
35
- class="recharge-button">购买</nut-button>
64
+ <nut-button
65
+ block
66
+ shape="square"
67
+ :loading="state.buttonLoading"
68
+ v-track-click
69
+ @click="onPayClick"
70
+ class="recharge-button"
71
+ >购买</nut-button
72
+ >
36
73
  </div>
37
74
  </view>
38
- <nut-dialog title="确认购买" custom-class="trade-dialog" v-model:visible="showDialog" @cancel="showDialog = !showDialog"
39
- @ok="beanPay">
75
+ <nut-dialog
76
+ title="确认购买"
77
+ custom-class="trade-dialog"
78
+ v-model:visible="showDialog"
79
+ @cancel="showDialog = !showDialog"
80
+ @ok="beanPay"
81
+ >
40
82
  <template v-if="amounts[state.selected]">
41
- <div class="item">云豆扣减:{{ formatAmount(amounts[state.selected].paymentAmount || 0) }}</div>
42
- <div class="item">权益增加:{{ formatAmount(amounts[state.selected].priceRightNum || 0) }}笔</div>
43
- <div class="item">扣减后云豆余额:{{ formatAmount(balance - amounts[state.selected].paymentAmount) }}</div>
83
+ <div class="item">
84
+ 云豆扣减:{{
85
+ formatAmount(amounts[state.selected].paymentAmount || 0)
86
+ }}
87
+ </div>
88
+ <div class="item">
89
+ 权益增加:{{
90
+ formatAmount(amounts[state.selected].priceRightNum || 0)
91
+ }}笔
92
+ </div>
93
+ <div class="item">
94
+ 扣减后云豆余额:{{
95
+ formatAmount(balance - amounts[state.selected].paymentAmount)
96
+ }}
97
+ </div>
44
98
  </template>
45
99
  </nut-dialog>
46
100
  </view>
47
101
  </template>
48
102
 
49
103
  <script lang="ts" setup>
50
- import { computed, onMounted, reactive, ref } from 'vue'
104
+ import { computed, onMounted, reactive, ref } from "vue";
51
105
  import RightsPicker, { Amount } from './RightsPicker.vue'
52
106
  import { endpoints, useHttp } from '../api'
107
+ import { endpoints as balanceEndpoints } from "../../balance/api";
53
108
  import { requestBrandWCPayByBean, requestPaymentByBean } from '../services'
54
- import Taro, { showToast, useRouter } from '@tarojs/taro'
109
+ import Taro, { showToast, useRouter, showModal } from '@tarojs/taro'
55
110
  import { useAmount } from '../../shared/composables/useAmount'
56
111
  import { isAlipay,isAndroid,isChrome,isIOS,isSafari,isWechat } from '../../shared/composables/useDeviceEnv'
57
112
 
@@ -63,11 +118,11 @@ export interface RechargeViewProps {
63
118
  /**
64
119
  * header头中的appcode,一般情况下与app参数一致,当无应用权限时,此参数未空
65
120
  **/
66
- headerApp: string,
121
+ headerApp: string;
67
122
  /**
68
123
  * 应用
69
124
  **/
70
- app: string,
125
+ app: string;
71
126
  /**
72
127
  * 充值场景
73
128
  */
@@ -75,16 +130,20 @@ export interface RechargeViewProps {
75
130
  /**
76
131
  * 租户
77
132
  */
78
- tenant: string,
133
+ tenant: string;
79
134
  /**
80
135
  * h5支付完成后跳转地址
81
136
  */
82
- payFinishJumpUrl?: ''
137
+ payFinishJumpUrl?: "";
138
+ /**
139
+ * 所有应用
140
+ **/
141
+ apps?: string;
83
142
  }
84
143
 
85
- const props = defineProps<RechargeViewProps>()
86
- const { formatAmount } = useAmount()
87
- const { params } = useRouter()
144
+ const props = defineProps<RechargeViewProps>();
145
+ const { formatAmount } = useAmount();
146
+ const { params } = useRouter();
88
147
 
89
148
  const emit = defineEmits<{
90
149
  (event: 'complete', value: { result: boolean, type: string }): void,
@@ -100,26 +159,60 @@ const state = reactive({
100
159
  thirdPayId: '',
101
160
  })
102
161
 
103
-
104
- const balance = ref<number>(0)
105
- const amounts = ref<Amount[]>([])
106
- const selectBean = ref<boolean>(false)
162
+ const balance = ref<number>(0);
163
+ const amounts = ref<Amount[]>([]);
164
+ const selectBean = ref<boolean>(false);
107
165
 
108
166
  const onAgreementLinkClick = (e) => {
109
- e.preventDefault()
110
- e.stopImmediatePropagation()
111
- emit('agree')
167
+ e.preventDefault();
168
+ e.stopImmediatePropagation();
169
+ emit("agree");
112
170
  // state.agreementOpen = true
113
- }
171
+ };
114
172
 
115
173
  const onAmountSelect = (selected: number) => {
116
- state.selected = selected
117
- selectBean.value = false
118
- }
174
+ state.selected = selected;
175
+ selectBean.value = false;
176
+ };
177
+
178
+ // 计算额外支付金额(当云豆余额不足时)
179
+ const extraPaymentAmount = computed(() => {
180
+ if (!selectBean.value || !amounts.value[state.selected]) {
181
+ return 0;
182
+ }
183
+ const paymentAmount = amounts.value[state.selected].paymentAmount || 0;
184
+ const currentBalance = balance.value || 0;
185
+ return Math.max(0, paymentAmount - currentBalance);
186
+ });
119
187
 
188
+ // 计算待支付金额
120
189
  const currentAmount = computed(() => {
121
- return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0
122
- })
190
+ if (!amounts.value[state.selected]) {
191
+ return 0;
192
+ }
193
+
194
+ // 如果选择了云豆支付
195
+ if (selectBean.value) {
196
+ // 如果余额不足,返回额外需要支付的金额
197
+ if (balance.value < amounts.value[state.selected].paymentAmount) {
198
+ return extraPaymentAmount.value;
199
+ }
200
+ // 如果余额充足,返回0(全部用云豆支付)
201
+ return 0;
202
+ }
203
+
204
+ // 如果没有选择云豆支付,返回全额
205
+ return amounts.value[state.selected].paymentAmount || 0;
206
+ });
207
+
208
+ // 判断是否为组合支付
209
+ const isCombinedPayment = computed(() => {
210
+ return (
211
+ selectBean.value &&
212
+ amounts.value[state.selected] &&
213
+ balance.value < amounts.value[state.selected].paymentAmount
214
+ );
215
+ });
123
216
 
124
217
  onMounted(() => {
125
218
  const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
@@ -133,87 +226,125 @@ onMounted(() => {
133
226
  })
134
227
  })
135
228
 
136
- // 云豆支付
137
- const showDialog = ref<boolean>(false)
229
+ // 云豆支付对话框
230
+ const showDialog = ref<boolean>(false);
231
+
232
+ // 处理确认支付(纯云豆支付)
138
233
  async function beanPay() {
139
- const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
140
- $http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response: any) => {
234
+ const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant });
235
+ try {
236
+ const response: any = await $http.post(
237
+ `/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`
238
+ );
141
239
  if (response) {
142
- showDialog.value = false
143
- emit('complete', { result: response, type: 'bean' })
240
+ showDialog.value = false;
241
+ emit("complete", { result: response, type: "bean" });
144
242
  } else {
145
243
  showToast({
146
- title: response.message,
147
- icon: 'none',
148
- })
244
+ title: (response as any)?.message || "支付失败",
245
+ icon: "none",
246
+ });
149
247
  }
150
- })
151
- }
152
-
153
-
154
- const onPayClick = () => {
155
- // 用云豆支付
156
- if (selectBean.value) {
157
- showDialog.value = true
158
- return
248
+ } catch (error: any) {
249
+ showToast({
250
+ title: error?.message || "支付失败",
251
+ icon: "none",
252
+ });
159
253
  }
254
+ }
160
255
 
161
- // 微信支付
162
- if (!selectBean.value && !state.agreed) {
256
+ // 执行微信支付(用于组合支付或纯微信支付)
257
+ function proceedWechatPayment() {
258
+ if (!state.agreed) {
163
259
  showToast({
164
- title: '请勾选《大道云平台云豆充值协议》',
165
- icon: 'none',
166
- })
167
- return false
260
+ title: "请勾选《大道云平台云豆充值协议》",
261
+ icon: "none",
262
+ });
263
+ return false;
168
264
  }
169
- state.buttonLoading = true
170
265
 
171
- if (Taro.getEnv() === 'WEB') {
266
+ state.buttonLoading = true;
267
+
268
+ if (Taro.getEnv() === "WEB") {
172
269
  // if (!isWechat()) {
173
270
  // showToast({
174
- // title: '请使用微信浏览器打开',
175
- // icon: 'none',
176
- // })
177
- // state.buttonLoading = false
178
- // return false
271
+ // title: "请使用微信浏览器打开",
272
+ // icon: "none",
273
+ // });
274
+ // state.buttonLoading = false;
275
+ // return false;
179
276
  // }
277
+ // 组合支付或纯微信支付:传递caseConfigId和amount,后端会自动处理云豆扣减
180
278
  requestBrandWCPayByBean({
181
279
  caseConfigId: amounts.value[state.selected].id,
182
- amount: amounts.value[state.selected].paymentAmount,
183
- app: 'loankitMp',
280
+ amount: currentAmount.value,
281
+ app: "loankitMp",
184
282
  tenant: props.tenant,
185
283
  accountAuthFlag: false,
186
284
  channelCode: getChannelCode(),
187
285
  payFinishJumpUrl: props.payFinishJumpUrl,
188
- fromMini: !!params.from
189
- }).then((result: any) => {
190
- state.buttonLoading = false;
191
- if (typeof result === "boolean" && result) {
192
- window.location.href = props.payFinishJumpUrl as string;
193
- } else if (typeof result === 'object' && result?.paymentType === 'H5' && result?.prePayStr) {
194
- state.thirdPayId = result?.thirdPayId || ''
195
- window.location.href = result?.prePayStr;
196
- } else {
197
- emit('complete', { result, type: 'wePay' })
198
- }
286
+ fromMini: !!params.from,
287
+ useCloudBean: isCombinedPayment.value
199
288
  })
289
+ .then((result: any) => {
290
+ state.buttonLoading = false;
291
+ if (typeof result === "boolean" && result) {
292
+ window.location.href = props.payFinishJumpUrl as string;
293
+ } else if (typeof result === 'object' && result?.paymentType === 'H5' && result?.prePayStr) {
294
+ state.thirdPayId = result?.thirdPayId || ''
295
+ window.location.href = result?.prePayStr;
296
+ } else {
297
+ emit("complete", {
298
+ result,
299
+ type: isCombinedPayment.value ? "combined" : "wePay",
300
+ });
301
+ }
302
+ })
303
+ .catch((error) => {
304
+ state.buttonLoading = false;
305
+ showToast({
306
+ title: error.message || "支付失败",
307
+ icon: "none",
308
+ });
309
+ });
200
310
  } else {
201
311
  wx.login({
202
312
  success({ code }: { code: string }) {
203
- requestPaymentByBean({
204
- caseConfigId: amounts.value[state.selected].id,
205
- amount: amounts.value[state.selected].paymentAmount,
206
- app: props.app,
207
- tenant: props.tenant,
208
- user: code,
209
- }, props.headerApp).then(result => {
210
- state.buttonLoading = false
211
- if (result) {
212
- emit('complete', { result: true, type: 'wePay' })
213
- }
214
- })
215
- }
216
- })
313
+ requestPaymentByBean(
314
+ {
315
+ caseConfigId: amounts.value[state.selected].id,
316
+ amount: currentAmount.value,
317
+ app: props.app,
318
+ tenant: props.tenant,
319
+ user: code,
320
+ },
321
+ props.headerApp
322
+ )
323
+ .then((result) => {
324
+ state.buttonLoading = false;
325
+ if (result) {
326
+ emit("complete", {
327
+ result: true,
328
+ type: isCombinedPayment.value ? "combined" : "wePay",
329
+ });
330
+ }
331
+ })
332
+ .catch((error) => {
333
+ state.buttonLoading = false;
334
+ showToast({
335
+ title: error.message || "支付失败",
336
+ icon: "none",
337
+ });
338
+ });
339
+ },
340
+ fail() {
341
+ state.buttonLoading = false;
342
+ showToast({
343
+ title: "登录失败,请重试",
344
+ icon: "none",
345
+ });
346
+ },
347
+ });
217
348
  }
218
349
  }
219
350
 
@@ -228,6 +359,59 @@ function getChannelCode() {
228
359
  }
229
360
  }
230
361
 
362
+ const onPayClick = async () => {
363
+ // 用云豆支付(纯云豆支付)
364
+ if (selectBean.value && !isCombinedPayment.value) {
365
+ showDialog.value = true;
366
+ return;
367
+ }
368
+
369
+ if (isCombinedPayment.value) {
370
+ // 检验云豆是否已经改变,改变则刷新选择
371
+ const res = await checkBalance()
372
+ if (!res) return
373
+ }
374
+
375
+ // 纯微信支付
376
+ proceedWechatPayment();
377
+ }
378
+
379
+ /**
380
+ * 校验余额是否充足
381
+ */
382
+ async function checkBalance() {
383
+ const $http = useHttp()
384
+ return new Promise((resolve, reject) => {
385
+ state.buttonLoading = true;
386
+ $http
387
+ .get<any>(balanceEndpoints.获取余额明细, {
388
+ app: props.apps,
389
+ })
390
+ .then((data) => {
391
+ state.buttonLoading = false;
392
+ if (data.commonAccount < balance.value) {
393
+ showModal({
394
+ title: '温馨提示',
395
+ content: '云豆不足,请刷新后再次确认',
396
+ showCancel: false,
397
+ confirmText: '刷新',
398
+ confirmColor: '#017fff',
399
+ success: () => {
400
+ balance.value = data.commonAccount;
401
+ }
402
+ })
403
+ resolve(false)
404
+
405
+ } else {
406
+ resolve(true)
407
+ }
408
+ }).catch((error) => {
409
+ state.buttonLoading = false;
410
+ resolve(false)
411
+ })
412
+ })
413
+ }
414
+
231
415
  const payResultCheck = () => {
232
416
  if (!state.thirdPayId) return
233
417
 
@@ -238,7 +422,7 @@ const payResultCheck = () => {
238
422
  if (response.payStatus === 'paid') {
239
423
  emit("complete", {
240
424
  result: true,
241
- type: "wePay",
425
+ type: isCombinedPayment.value ? "combined" : "wePay",
242
426
  });
243
427
  }
244
428
  })
@@ -263,15 +447,16 @@ defineExpose({
263
447
  .bean-buy {
264
448
  margin: 0 15px;
265
449
  padding: 10px;
266
- background: #FFFBF3;
450
+ background: #fffbf3;
267
451
  border-radius: 5px;
268
452
  display: flex;
269
453
  justify-content: space-between;
270
454
  align-items: center;
455
+ flex-wrap: wrap;
271
456
 
272
457
  .left {
273
458
  .title {
274
- color: #FD6701;
459
+ color: #fd6701;
275
460
  font-size: 14px;
276
461
  font-weight: 600;
277
462
  line-height: 20px;
@@ -282,7 +467,7 @@ defineExpose({
282
467
  color: #353535;
283
468
  font-size: 13px;
284
469
  line-height: 16px;
285
- background-image: url('https://cdn.ddjf.com/static/images/appkit/yundou.png');
470
+ background-image: url("https://cdn.ddjf.com/static/images/appkit/yundou.png");
286
471
  background-repeat: no-repeat;
287
472
  background-size: 16px 16px;
288
473
  padding-left: 24px;
@@ -309,9 +494,24 @@ defineExpose({
309
494
  }
310
495
  }
311
496
 
497
+ .balance-warning {
498
+ width: 100%;
499
+ padding: 8px 10px;
500
+ margin-top: 10px;
501
+ background: #fdefe6;
502
+ border-radius: 5px;
503
+ color: #fd6701;
504
+ font-size: 12px;
505
+
506
+ &-tip {
507
+ margin: 10px 26px 0;
508
+ color: #666666;
509
+ font-size: 10px;
510
+ }
511
+ }
512
+
312
513
  .amount-footer {
313
514
  padding: 10px 0;
314
- padding-bottom: 20px;
315
515
 
316
516
  .agreement {
317
517
  font-size: 12px;
@@ -336,7 +536,7 @@ defineExpose({
336
536
  font-size: 13px;
337
537
 
338
538
  .amount {
339
- color: #FD6701;
539
+ color: #fd6701;
340
540
  font-size: 20px;
341
541
  font-weight: 600;
342
542
 
@@ -348,7 +548,12 @@ defineExpose({
348
548
  }
349
549
 
350
550
  .recharge-button {
351
- background: linear-gradient(90deg, #FFEBC1 0%, #FFD7A7 52.29%, #FFB875 100%);
551
+ background: linear-gradient(
552
+ 90deg,
553
+ #ffebc1 0%,
554
+ #ffd7a7 52.29%,
555
+ #ffb875 100%
556
+ );
352
557
  color: #353535;
353
558
  margin: 12px 0;
354
559
  border: 0;
@@ -369,7 +574,7 @@ defineExpose({
369
574
 
370
575
  .link {
371
576
  display: inline;
372
- color: #FD6701;
577
+ color: #fd6701;
373
578
  }
374
579
  }
375
580
  }
@@ -377,7 +582,7 @@ defineExpose({
377
582
  .trade-dialog {
378
583
  .nut-dialog__header {
379
584
  font-size: 16px;
380
- color: #262626
585
+ color: #262626;
381
586
  }
382
587
 
383
588
  .item {
@@ -388,13 +593,13 @@ defineExpose({
388
593
 
389
594
  .nut-dialog__footer-cancel {
390
595
  color: #353535 !important;
391
- border-color: #CCCCCC !important;
596
+ border-color: #cccccc !important;
392
597
  }
393
598
 
394
599
  .nut-dialog__footer-ok {
395
600
  border: none;
396
601
  color: #353535;
397
- background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
602
+ background: linear-gradient(90deg, #ffebc1 0%, #ffb875 100%);
398
603
  }
399
604
  }
400
605
  </style>
@@ -68,13 +68,15 @@ const requestBrandWCPay = (params: PaymentParams, Appcode = '') => {
68
68
  ...params,
69
69
  })
70
70
  .then((response: any) => {
71
- if (!response.json) {
71
+ if (!response.json && !response.prePayStr) {
72
72
  showToast({
73
73
  title: response.message,
74
74
  icon: 'none',
75
75
  })
76
76
  resolve(false)
77
- } else if (params.fromMini) {
77
+ } else if (!response.json && response.prePayStr) {
78
+ resolve(response)
79
+ } else if (params.fromMini) {
78
80
  resolve(response.json)
79
81
  } else {
80
82
  requestWxH5Pay(response.json).then((result) => {
@@ -100,12 +102,14 @@ const requestBrandWCPayByBean = (params: PaymentParams, Appcode = '') => {
100
102
  ...params,
101
103
  })
102
104
  .then((response: any) => {
103
- if (!response.json) {
105
+ if (!response.json && !response.prePayStr) {
104
106
  showToast({
105
107
  title: response.message,
106
108
  icon: 'none',
107
109
  })
108
110
  resolve(false)
111
+ } else if (!response.json && response.prePayStr) {
112
+ resolve(response)
109
113
  } else if (params.fromMini) {
110
114
  resolve(response.json)
111
115
  } else {
@@ -117,6 +121,8 @@ const requestBrandWCPayByBean = (params: PaymentParams, Appcode = '') => {
117
121
  }
118
122
  })
119
123
  }
124
+ }).catch(() => {
125
+ resolve(false)
120
126
  })
121
127
  })
122
128
  }
@@ -28,6 +28,7 @@ export type PaymentParams = {
28
28
  payFinishJumpUrl?: string
29
29
  fromMini?: Boolean
30
30
  clientInfo?: string
31
+ useCloudBean?: boolean
31
32
  }
32
33
 
33
34
  export type RechargeParams = Pick<PaymentParams, 'app' | 'tenant'>
@@ -124,7 +124,7 @@ async function submit() {
124
124
  <nut-form-item label="你的姓名" required>
125
125
  <div class="self-registration__input">
126
126
  <input v-model="formState.name" class="nut-input-text" placeholder="请输入或拍照识别" type="text" :maxlength="20" />
127
- <OcrIcon @complete="onOCRInfo">
127
+ <OcrIcon :has-upload-vo="false" @complete="onOCRInfo">
128
128
  <template #icon>
129
129
  <img style="width: 20px; height: 20px; margin-left: 5px;"
130
130
  src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgZmlsbD0ibm9uZSI+PHBhdGggb3BhY2l0eT0iLjAxIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQw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