@uxda/appkit 4.2.42 → 4.2.44
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/index.js
CHANGED
|
@@ -1467,7 +1467,7 @@ function useHttp$2(defaultHeader) {
|
|
|
1467
1467
|
const appkitOptions = useAppKitOptions();
|
|
1468
1468
|
const headers = {
|
|
1469
1469
|
Token: appkitOptions.tempToken() || appkitOptions.token(),
|
|
1470
|
-
Appcode: defaultHeader?.Appcode
|
|
1470
|
+
Appcode: defaultHeader?.Appcode || appkitOptions.app(),
|
|
1471
1471
|
cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
|
|
1472
1472
|
gray: appkitOptions.gray ? appkitOptions.gray() : "0"
|
|
1473
1473
|
};
|
|
@@ -1537,10 +1537,10 @@ const requestPayment = (params) => {
|
|
|
1537
1537
|
});
|
|
1538
1538
|
});
|
|
1539
1539
|
};
|
|
1540
|
-
const requestPaymentByBean = (params) => {
|
|
1540
|
+
const requestPaymentByBean = (params, Appcode = "") => {
|
|
1541
1541
|
return new Promise((resolve, reject) => {
|
|
1542
1542
|
const $http = useHttp$2({
|
|
1543
|
-
Appcode
|
|
1543
|
+
Appcode,
|
|
1544
1544
|
Tenant: params.tenant
|
|
1545
1545
|
});
|
|
1546
1546
|
$http.post(endpoints.\u83B7\u53D6\u6743\u76CA\u5FAE\u4FE1\u652F\u4ED8, {
|
|
@@ -1909,6 +1909,7 @@ const _hoisted_16$2 = { class: "item" };
|
|
|
1909
1909
|
var script$x = /* @__PURE__ */ defineComponent({
|
|
1910
1910
|
__name: "TradeView",
|
|
1911
1911
|
props: {
|
|
1912
|
+
headerApp: { type: String, required: true },
|
|
1912
1913
|
app: { type: String, required: true },
|
|
1913
1914
|
tenant: { type: String, required: true }
|
|
1914
1915
|
},
|
|
@@ -1939,9 +1940,9 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1939
1940
|
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
|
|
1940
1941
|
});
|
|
1941
1942
|
onMounted(() => {
|
|
1942
|
-
const $http = useHttp$2({ Appcode: props.
|
|
1943
|
+
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
1943
1944
|
$http.get(endpoints.\u83B7\u53D6\u589E\u503C\u6743\u76CA\u7C7B\u76EE, {
|
|
1944
|
-
rightCode: props.app === "
|
|
1945
|
+
rightCode: props.app === "cloudkitPro" ? "riskQueryCompany" : "riskQueryMulti"
|
|
1945
1946
|
}).then((res) => {
|
|
1946
1947
|
balance.value = res.balance;
|
|
1947
1948
|
amounts.value = res.paymentCaseConfigVOS;
|
|
@@ -1949,7 +1950,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1949
1950
|
});
|
|
1950
1951
|
const showDialog = ref(false);
|
|
1951
1952
|
async function beanPay() {
|
|
1952
|
-
const $http = useHttp$2({ Appcode: props.
|
|
1953
|
+
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
1953
1954
|
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
|
|
1954
1955
|
if (response) {
|
|
1955
1956
|
showDialog.value = false;
|
|
@@ -1980,10 +1981,10 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1980
1981
|
requestPaymentByBean({
|
|
1981
1982
|
caseConfigId: amounts.value[state.selected].id,
|
|
1982
1983
|
amount: amounts.value[state.selected].paymentAmount,
|
|
1983
|
-
app: props.app
|
|
1984
|
+
app: props.app,
|
|
1984
1985
|
tenant: props.tenant,
|
|
1985
1986
|
user: code
|
|
1986
|
-
}).then((result) => {
|
|
1987
|
+
}, props.headerApp).then((result) => {
|
|
1987
1988
|
state.buttonLoading = false;
|
|
1988
1989
|
if (result) {
|
|
1989
1990
|
emit("complete", { result: true, type: "wePay" });
|
package/package.json
CHANGED
package/src/payment/api/index.ts
CHANGED
|
@@ -63,7 +63,7 @@ function useHttp(defaultHeader?: DefaultHeaderType) {
|
|
|
63
63
|
const appkitOptions = useAppKitOptions()
|
|
64
64
|
const headers = {
|
|
65
65
|
Token: appkitOptions.tempToken() || appkitOptions.token(),
|
|
66
|
-
Appcode: defaultHeader?.Appcode
|
|
66
|
+
Appcode: defaultHeader?.Appcode || appkitOptions.app(),
|
|
67
67
|
cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
|
|
68
68
|
gray: appkitOptions.gray ? appkitOptions.gray() : '0',
|
|
69
69
|
}
|
|
@@ -59,6 +59,10 @@ import { useAmount } from '../../shared/composables/useAmount'
|
|
|
59
59
|
// 自动获取支付套餐包列表
|
|
60
60
|
// 并发起微信支付
|
|
61
61
|
export interface RechargeViewProps {
|
|
62
|
+
/**
|
|
63
|
+
* header头中的appcode,一般情况下与app参数一致,当无应用权限时,此参数未空
|
|
64
|
+
**/
|
|
65
|
+
headerApp: string,
|
|
62
66
|
/**
|
|
63
67
|
* 应用
|
|
64
68
|
**/
|
|
@@ -110,9 +114,9 @@ const currentAmount = computed(() => {
|
|
|
110
114
|
})
|
|
111
115
|
|
|
112
116
|
onMounted(() => {
|
|
113
|
-
const $http = useHttp({ Appcode: props.
|
|
117
|
+
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
114
118
|
$http.get<any[]>(endpoints.获取增值权益类目, {
|
|
115
|
-
rightCode: props.app === '
|
|
119
|
+
rightCode: props.app === 'cloudkitPro' ? 'riskQueryCompany' : 'riskQueryMulti',
|
|
116
120
|
}).then((res: any) => {
|
|
117
121
|
balance.value = res.balance
|
|
118
122
|
amounts.value = res.paymentCaseConfigVOS
|
|
@@ -122,7 +126,7 @@ onMounted(() => {
|
|
|
122
126
|
// 云豆支付
|
|
123
127
|
const showDialog = ref<boolean>(false)
|
|
124
128
|
async function beanPay() {
|
|
125
|
-
const $http = useHttp({ Appcode: props.
|
|
129
|
+
const $http = useHttp({ Appcode: props.headerApp, Tenant: props.tenant })
|
|
126
130
|
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response: any) => {
|
|
127
131
|
if (response) {
|
|
128
132
|
showDialog.value = false
|
|
@@ -158,10 +162,10 @@ const onPayClick = () => {
|
|
|
158
162
|
requestPaymentByBean({
|
|
159
163
|
caseConfigId: amounts.value[state.selected].id,
|
|
160
164
|
amount: amounts.value[state.selected].paymentAmount,
|
|
161
|
-
app: props.app
|
|
165
|
+
app: props.app,
|
|
162
166
|
tenant: props.tenant,
|
|
163
|
-
user: code
|
|
164
|
-
}).then(result => {
|
|
167
|
+
user: code,
|
|
168
|
+
}, props.headerApp).then(result => {
|
|
165
169
|
state.buttonLoading = false
|
|
166
170
|
if (result) {
|
|
167
171
|
emit('complete', { result: true, type: 'wePay' })
|
|
@@ -27,10 +27,10 @@ const requestPayment = (params: PaymentParams) => {
|
|
|
27
27
|
})
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const requestPaymentByBean = (params: PaymentParams) => {
|
|
30
|
+
const requestPaymentByBean = (params: PaymentParams, Appcode = '') => {
|
|
31
31
|
return new Promise<boolean>((resolve, reject) => {
|
|
32
32
|
const $http = useHttp({
|
|
33
|
-
Appcode:
|
|
33
|
+
Appcode: Appcode,
|
|
34
34
|
Tenant: params.tenant,
|
|
35
35
|
})
|
|
36
36
|
$http
|