@uxda/appkit 4.3.14 → 4.3.15

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