@uxda/appkit 4.3.7 → 4.3.11
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/dist/appkit.css +12 -105
- package/dist/index.js +419 -1104
- package/package.json +5 -2
- package/src/balance/components/PromoterCard.vue +0 -1
- package/src/notice/components/NoticeList2.vue +73 -232
- package/src/notice/components/useCommonList.ts +0 -1
- package/src/payment/api/endpoints.ts +0 -2
- package/src/payment/api/index.ts +0 -1
- package/src/payment/components/RechargeResult.vue +1 -0
- package/src/payment/components/RechargeView.vue +4 -0
- package/src/payment/components/TradeView.vue +125 -331
- package/src/payment/services/request-payment.ts +0 -2
- package/src/payment/types.ts +0 -1
- package/src/register/components/SelfRegistration.vue +1 -1
- package/src/shared/components/AppVerify.vue +6 -15
- package/src/shared/components/OcrBusinessLicense.vue +37 -20
- package/src/shared/components/OcrIcon.vue +67 -105
- package/src/shared/components/index.ts +1 -3
- package/src/shared/composables/index.ts +0 -1
- package/src/shared/composables/useUpload.ts +51 -96
- package/src/shared/http/Http.ts +0 -1
- package/src/shared/tracking/tracking-sdk.ts +1 -0
- package/src/shared/weixin/jssdk.ts +0 -1
- package/src/user/components/UserAuth.vue +1 -1
- package/src/user/components/UserFeedback.vue +0 -1
- package/src/user/components/UserInfo.vue +0 -2
- package/types/global.d.ts +0 -2
- package/src/shared/components/OcrBank.vue +0 -202
- package/src/shared/components/OcrInvoice.vue +0 -322
- 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 ||
|
|
13
|
-
|
|
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
|
-
|
|
23
|
-
|
|
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
|
|
48
|
-
<nut-checkbox v-model="state.agreed"
|
|
49
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
105
|
-
import RightsPicker, { Amount } from
|
|
106
|
-
import { endpoints, useHttp } from
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import
|
|
110
|
-
import {
|
|
111
|
-
import { 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 { 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,273 +75,143 @@ 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
|
-
(event:
|
|
150
|
-
(event:
|
|
151
|
-
|
|
90
|
+
(event: 'complete', value: { result: boolean, type: string }): void,
|
|
91
|
+
(event: 'agree'): void,
|
|
92
|
+
(event: 'loaded'): void,
|
|
93
|
+
}>()
|
|
152
94
|
|
|
153
95
|
const state = reactive({
|
|
154
96
|
agreed: false,
|
|
155
97
|
selected: 0,
|
|
156
98
|
// agreementOpen: false,
|
|
157
99
|
buttonLoading: false,
|
|
158
|
-
})
|
|
100
|
+
})
|
|
159
101
|
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
const
|
|
102
|
+
|
|
103
|
+
const balance = ref<number>(0)
|
|
104
|
+
const amounts = ref<Amount[]>([])
|
|
105
|
+
const selectBean = ref<boolean>(false)
|
|
163
106
|
|
|
164
107
|
const onAgreementLinkClick = (e) => {
|
|
165
|
-
e.preventDefault()
|
|
166
|
-
e.stopImmediatePropagation()
|
|
167
|
-
emit(
|
|
108
|
+
e.preventDefault()
|
|
109
|
+
e.stopImmediatePropagation()
|
|
110
|
+
emit('agree')
|
|
168
111
|
// state.agreementOpen = true
|
|
169
|
-
}
|
|
112
|
+
}
|
|
170
113
|
|
|
171
114
|
const onAmountSelect = (selected: number) => {
|
|
172
|
-
state.selected = selected
|
|
173
|
-
selectBean.value = false
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// 计算额外支付金额(当云豆余额不足时)
|
|
177
|
-
const extraPaymentAmount = computed(() => {
|
|
178
|
-
if (!selectBean.value || !amounts.value[state.selected]) {
|
|
179
|
-
return 0;
|
|
180
|
-
}
|
|
181
|
-
const paymentAmount = amounts.value[state.selected].paymentAmount || 0;
|
|
182
|
-
const currentBalance = balance.value || 0;
|
|
183
|
-
return Math.max(0, paymentAmount - currentBalance);
|
|
184
|
-
});
|
|
115
|
+
state.selected = selected
|
|
116
|
+
selectBean.value = false
|
|
117
|
+
}
|
|
185
118
|
|
|
186
|
-
// 计算待支付金额
|
|
187
119
|
const currentAmount = computed(() => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// 如果选择了云豆支付
|
|
193
|
-
if (selectBean.value) {
|
|
194
|
-
// 如果余额不足,返回额外需要支付的金额
|
|
195
|
-
if (balance.value < amounts.value[state.selected].paymentAmount) {
|
|
196
|
-
return extraPaymentAmount.value;
|
|
197
|
-
}
|
|
198
|
-
// 如果余额充足,返回0(全部用云豆支付)
|
|
199
|
-
return 0;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// 如果没有选择云豆支付,返回全额
|
|
203
|
-
return amounts.value[state.selected].paymentAmount || 0;
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// 判断是否为组合支付
|
|
207
|
-
const isCombinedPayment = computed(() => {
|
|
208
|
-
return (
|
|
209
|
-
selectBean.value &&
|
|
210
|
-
amounts.value[state.selected] &&
|
|
211
|
-
balance.value < amounts.value[state.selected].paymentAmount
|
|
212
|
-
);
|
|
213
|
-
});
|
|
120
|
+
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0
|
|
121
|
+
})
|
|
214
122
|
|
|
215
123
|
onMounted(() => {
|
|
216
|
-
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
217
|
-
$http
|
|
218
|
-
.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
// 云豆支付对话框
|
|
229
|
-
const showDialog = ref<boolean>(false);
|
|
124
|
+
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
125
|
+
$http.get<any[]>(endpoints.获取增值权益类目, {
|
|
126
|
+
rightCode: props.app === 'corporateStar' ? 'riskQueryCompany' : 'riskQueryMulti',
|
|
127
|
+
}).then((res: any) => {
|
|
128
|
+
balance.value = res.balance
|
|
129
|
+
amounts.value = res.paymentCaseConfigVOS
|
|
130
|
+
emit('loaded')
|
|
131
|
+
})
|
|
132
|
+
})
|
|
230
133
|
|
|
231
|
-
//
|
|
134
|
+
// 云豆支付
|
|
135
|
+
const showDialog = ref<boolean>(false)
|
|
232
136
|
async function beanPay() {
|
|
233
|
-
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
234
|
-
|
|
235
|
-
const response: any = await $http.post(
|
|
236
|
-
`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`
|
|
237
|
-
);
|
|
137
|
+
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
138
|
+
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response: any) => {
|
|
238
139
|
if (response) {
|
|
239
|
-
showDialog.value = false
|
|
240
|
-
emit(
|
|
140
|
+
showDialog.value = false
|
|
141
|
+
emit('complete', { result: response, type: 'bean' })
|
|
241
142
|
} else {
|
|
242
143
|
showToast({
|
|
243
|
-
title:
|
|
244
|
-
icon:
|
|
245
|
-
})
|
|
144
|
+
title: response.message,
|
|
145
|
+
icon: 'none',
|
|
146
|
+
})
|
|
246
147
|
}
|
|
247
|
-
}
|
|
248
|
-
showToast({
|
|
249
|
-
title: error?.message || "支付失败",
|
|
250
|
-
icon: "none",
|
|
251
|
-
});
|
|
252
|
-
}
|
|
148
|
+
})
|
|
253
149
|
}
|
|
254
150
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
});
|
|
262
|
-
return false;
|
|
151
|
+
|
|
152
|
+
const onPayClick = () => {
|
|
153
|
+
// 用云豆支付
|
|
154
|
+
if (selectBean.value) {
|
|
155
|
+
showDialog.value = true
|
|
156
|
+
return
|
|
263
157
|
}
|
|
264
158
|
|
|
265
|
-
|
|
159
|
+
// 微信支付
|
|
160
|
+
if (!selectBean.value && !state.agreed) {
|
|
161
|
+
showToast({
|
|
162
|
+
title: '请勾选《大道云平台云豆充值协议》',
|
|
163
|
+
icon: 'none',
|
|
164
|
+
})
|
|
165
|
+
return false
|
|
166
|
+
}
|
|
167
|
+
state.buttonLoading = true
|
|
266
168
|
|
|
267
|
-
if (Taro.getEnv() ===
|
|
169
|
+
if (Taro.getEnv() === 'WEB') {
|
|
268
170
|
if (!isWechat()) {
|
|
269
171
|
showToast({
|
|
270
|
-
title:
|
|
271
|
-
icon:
|
|
272
|
-
})
|
|
273
|
-
state.buttonLoading = false
|
|
274
|
-
return false
|
|
172
|
+
title: '请使用微信浏览器打开',
|
|
173
|
+
icon: 'none',
|
|
174
|
+
})
|
|
175
|
+
state.buttonLoading = false
|
|
176
|
+
return false
|
|
275
177
|
}
|
|
276
|
-
// 组合支付或纯微信支付:传递caseConfigId和amount,后端会自动处理云豆扣减
|
|
277
178
|
requestBrandWCPayByBean({
|
|
278
179
|
caseConfigId: amounts.value[state.selected].id,
|
|
279
|
-
amount:
|
|
280
|
-
app:
|
|
180
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
181
|
+
app: 'loankitMp',
|
|
281
182
|
tenant: props.tenant,
|
|
282
183
|
accountAuthFlag: false,
|
|
283
|
-
channelCode:
|
|
184
|
+
channelCode: 'centergzh',
|
|
284
185
|
payFinishJumpUrl: props.payFinishJumpUrl,
|
|
285
|
-
fromMini: !!params.from
|
|
286
|
-
|
|
186
|
+
fromMini: !!params.from
|
|
187
|
+
}).then(result => {
|
|
188
|
+
console.log(result, '------requestBrandWCPay')
|
|
189
|
+
state.buttonLoading = false
|
|
190
|
+
if (typeof result === 'boolean' && result) {
|
|
191
|
+
window.location.href = props.payFinishJumpUrl as string
|
|
192
|
+
} else {
|
|
193
|
+
emit('complete', { result, type: 'wePay' })
|
|
194
|
+
}
|
|
287
195
|
})
|
|
288
|
-
.then((result) => {
|
|
289
|
-
state.buttonLoading = false;
|
|
290
|
-
if (typeof result === "boolean" && result) {
|
|
291
|
-
window.location.href = props.payFinishJumpUrl as string;
|
|
292
|
-
} else {
|
|
293
|
-
emit("complete", {
|
|
294
|
-
result,
|
|
295
|
-
type: isCombinedPayment.value ? "combined" : "wePay",
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
})
|
|
299
|
-
.catch((error) => {
|
|
300
|
-
state.buttonLoading = false;
|
|
301
|
-
showToast({
|
|
302
|
-
title: error.message || "支付失败",
|
|
303
|
-
icon: "none",
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
196
|
} else {
|
|
307
197
|
wx.login({
|
|
308
198
|
success({ code }: { code: string }) {
|
|
309
|
-
requestPaymentByBean(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
result: true,
|
|
324
|
-
type: isCombinedPayment.value ? "combined" : "wePay",
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
})
|
|
328
|
-
.catch((error) => {
|
|
329
|
-
state.buttonLoading = false;
|
|
330
|
-
showToast({
|
|
331
|
-
title: error.message || "支付失败",
|
|
332
|
-
icon: "none",
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
},
|
|
336
|
-
fail() {
|
|
337
|
-
state.buttonLoading = false;
|
|
338
|
-
showToast({
|
|
339
|
-
title: "登录失败,请重试",
|
|
340
|
-
icon: "none",
|
|
341
|
-
});
|
|
342
|
-
},
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
const onPayClick = async () => {
|
|
348
|
-
// 用云豆支付(纯云豆支付)
|
|
349
|
-
if (selectBean.value && !isCombinedPayment.value) {
|
|
350
|
-
showDialog.value = true;
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (isCombinedPayment.value) {
|
|
355
|
-
// 检验云豆是否已经改变,改变则刷新选择
|
|
356
|
-
const res = await checkBalance()
|
|
357
|
-
if (!res) return
|
|
199
|
+
requestPaymentByBean({
|
|
200
|
+
caseConfigId: amounts.value[state.selected].id,
|
|
201
|
+
amount: amounts.value[state.selected].paymentAmount,
|
|
202
|
+
app: props.app,
|
|
203
|
+
tenant: props.tenant,
|
|
204
|
+
user: code,
|
|
205
|
+
}, props.headerApp).then(result => {
|
|
206
|
+
state.buttonLoading = false
|
|
207
|
+
if (result) {
|
|
208
|
+
emit('complete', { result: true, type: 'wePay' })
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
})
|
|
358
213
|
}
|
|
359
|
-
|
|
360
|
-
// 纯微信支付
|
|
361
|
-
proceedWechatPayment();
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* 校验余额是否充足
|
|
366
|
-
*/
|
|
367
|
-
async function checkBalance() {
|
|
368
|
-
const $http = useHttp()
|
|
369
|
-
return new Promise((resolve, reject) => {
|
|
370
|
-
state.buttonLoading = true;
|
|
371
|
-
$http
|
|
372
|
-
.get<any>(balanceEndpoints.获取余额明细, {
|
|
373
|
-
app: props.apps,
|
|
374
|
-
})
|
|
375
|
-
.then((data) => {
|
|
376
|
-
state.buttonLoading = false;
|
|
377
|
-
if (data.commonAccount < balance.value) {
|
|
378
|
-
showModal({
|
|
379
|
-
title: '温馨提示',
|
|
380
|
-
content: '云豆不足,请刷新后再次确认',
|
|
381
|
-
showCancel: false,
|
|
382
|
-
confirmText: '刷新',
|
|
383
|
-
confirmColor: '#017fff',
|
|
384
|
-
success: () => {
|
|
385
|
-
balance.value = data.commonAccount;
|
|
386
|
-
}
|
|
387
|
-
})
|
|
388
|
-
resolve(false)
|
|
389
|
-
|
|
390
|
-
} else {
|
|
391
|
-
resolve(true)
|
|
392
|
-
}
|
|
393
|
-
}).catch((error) => {
|
|
394
|
-
state.buttonLoading = false;
|
|
395
|
-
resolve(false)
|
|
396
|
-
})
|
|
397
|
-
})
|
|
398
214
|
}
|
|
399
|
-
|
|
400
215
|
</script>
|
|
401
216
|
|
|
402
217
|
<style lang="scss">
|
|
@@ -413,16 +228,15 @@ const onPayClick = async () => {
|
|
|
413
228
|
.bean-buy {
|
|
414
229
|
margin: 0 15px;
|
|
415
230
|
padding: 10px;
|
|
416
|
-
background: #
|
|
231
|
+
background: #FFFBF3;
|
|
417
232
|
border-radius: 5px;
|
|
418
233
|
display: flex;
|
|
419
234
|
justify-content: space-between;
|
|
420
235
|
align-items: center;
|
|
421
|
-
flex-wrap: wrap;
|
|
422
236
|
|
|
423
237
|
.left {
|
|
424
238
|
.title {
|
|
425
|
-
color: #
|
|
239
|
+
color: #FD6701;
|
|
426
240
|
font-size: 14px;
|
|
427
241
|
font-weight: 600;
|
|
428
242
|
line-height: 20px;
|
|
@@ -433,7 +247,7 @@ const onPayClick = async () => {
|
|
|
433
247
|
color: #353535;
|
|
434
248
|
font-size: 13px;
|
|
435
249
|
line-height: 16px;
|
|
436
|
-
background-image: url(
|
|
250
|
+
background-image: url('https://cdn.ddjf.com/static/images/appkit/yundou.png');
|
|
437
251
|
background-repeat: no-repeat;
|
|
438
252
|
background-size: 16px 16px;
|
|
439
253
|
padding-left: 24px;
|
|
@@ -460,24 +274,9 @@ const onPayClick = async () => {
|
|
|
460
274
|
}
|
|
461
275
|
}
|
|
462
276
|
|
|
463
|
-
.balance-warning {
|
|
464
|
-
width: 100%;
|
|
465
|
-
padding: 8px 10px;
|
|
466
|
-
margin-top: 10px;
|
|
467
|
-
background: #fdefe6;
|
|
468
|
-
border-radius: 5px;
|
|
469
|
-
color: #fd6701;
|
|
470
|
-
font-size: 12px;
|
|
471
|
-
|
|
472
|
-
&-tip {
|
|
473
|
-
margin: 10px 26px 0;
|
|
474
|
-
color: #666666;
|
|
475
|
-
font-size: 10px;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
277
|
.amount-footer {
|
|
480
278
|
padding: 10px 0;
|
|
279
|
+
padding-bottom: 20px;
|
|
481
280
|
|
|
482
281
|
.agreement {
|
|
483
282
|
font-size: 12px;
|
|
@@ -502,7 +301,7 @@ const onPayClick = async () => {
|
|
|
502
301
|
font-size: 13px;
|
|
503
302
|
|
|
504
303
|
.amount {
|
|
505
|
-
color: #
|
|
304
|
+
color: #FD6701;
|
|
506
305
|
font-size: 20px;
|
|
507
306
|
font-weight: 600;
|
|
508
307
|
|
|
@@ -514,12 +313,7 @@ const onPayClick = async () => {
|
|
|
514
313
|
}
|
|
515
314
|
|
|
516
315
|
.recharge-button {
|
|
517
|
-
background: linear-gradient(
|
|
518
|
-
90deg,
|
|
519
|
-
#ffebc1 0%,
|
|
520
|
-
#ffd7a7 52.29%,
|
|
521
|
-
#ffb875 100%
|
|
522
|
-
);
|
|
316
|
+
background: linear-gradient(90deg, #FFEBC1 0%, #FFD7A7 52.29%, #FFB875 100%);
|
|
523
317
|
color: #353535;
|
|
524
318
|
margin: 12px 0;
|
|
525
319
|
border: 0;
|
|
@@ -540,7 +334,7 @@ const onPayClick = async () => {
|
|
|
540
334
|
|
|
541
335
|
.link {
|
|
542
336
|
display: inline;
|
|
543
|
-
color: #
|
|
337
|
+
color: #FD6701;
|
|
544
338
|
}
|
|
545
339
|
}
|
|
546
340
|
}
|
|
@@ -548,7 +342,7 @@ const onPayClick = async () => {
|
|
|
548
342
|
.trade-dialog {
|
|
549
343
|
.nut-dialog__header {
|
|
550
344
|
font-size: 16px;
|
|
551
|
-
color: #262626
|
|
345
|
+
color: #262626
|
|
552
346
|
}
|
|
553
347
|
|
|
554
348
|
.item {
|
|
@@ -559,13 +353,13 @@ const onPayClick = async () => {
|
|
|
559
353
|
|
|
560
354
|
.nut-dialog__footer-cancel {
|
|
561
355
|
color: #353535 !important;
|
|
562
|
-
border-color: #
|
|
356
|
+
border-color: #CCCCCC !important;
|
|
563
357
|
}
|
|
564
358
|
|
|
565
359
|
.nut-dialog__footer-ok {
|
|
566
360
|
border: none;
|
|
567
361
|
color: #353535;
|
|
568
|
-
background: linear-gradient(90deg, #
|
|
362
|
+
background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
|
|
569
363
|
}
|
|
570
364
|
}
|
|
571
365
|
</style>
|
package/src/payment/types.ts
CHANGED
|
@@ -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
|
|
127
|
+
<OcrIcon @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,PHN2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