@uxda/appkit 4.2.40 → 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
|
@@ -1464,11 +1464,10 @@ const vendor$2 = {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
};
|
|
1466
1466
|
function useHttp$2(defaultHeader) {
|
|
1467
|
-
console.log(defaultHeader, "defaultHeader");
|
|
1468
1467
|
const appkitOptions = useAppKitOptions();
|
|
1469
1468
|
const headers = {
|
|
1470
1469
|
Token: appkitOptions.tempToken() || appkitOptions.token(),
|
|
1471
|
-
Appcode: defaultHeader?.Appcode
|
|
1470
|
+
Appcode: defaultHeader?.Appcode || appkitOptions.app(),
|
|
1472
1471
|
cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
|
|
1473
1472
|
gray: appkitOptions.gray ? appkitOptions.gray() : "0"
|
|
1474
1473
|
};
|
|
@@ -1538,10 +1537,10 @@ const requestPayment = (params) => {
|
|
|
1538
1537
|
});
|
|
1539
1538
|
});
|
|
1540
1539
|
};
|
|
1541
|
-
const requestPaymentByBean = (params) => {
|
|
1540
|
+
const requestPaymentByBean = (params, Appcode = "") => {
|
|
1542
1541
|
return new Promise((resolve, reject) => {
|
|
1543
1542
|
const $http = useHttp$2({
|
|
1544
|
-
Appcode
|
|
1543
|
+
Appcode,
|
|
1545
1544
|
Tenant: params.tenant
|
|
1546
1545
|
});
|
|
1547
1546
|
$http.post(endpoints.\u83B7\u53D6\u6743\u76CA\u5FAE\u4FE1\u652F\u4ED8, {
|
|
@@ -1910,6 +1909,7 @@ const _hoisted_16$2 = { class: "item" };
|
|
|
1910
1909
|
var script$x = /* @__PURE__ */ defineComponent({
|
|
1911
1910
|
__name: "TradeView",
|
|
1912
1911
|
props: {
|
|
1912
|
+
headerApp: { type: String, required: true },
|
|
1913
1913
|
app: { type: String, required: true },
|
|
1914
1914
|
tenant: { type: String, required: true }
|
|
1915
1915
|
},
|
|
@@ -1940,9 +1940,9 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1940
1940
|
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
|
|
1941
1941
|
});
|
|
1942
1942
|
onMounted(() => {
|
|
1943
|
-
const $http = useHttp$2({ Appcode: props.
|
|
1943
|
+
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
1944
1944
|
$http.get(endpoints.\u83B7\u53D6\u589E\u503C\u6743\u76CA\u7C7B\u76EE, {
|
|
1945
|
-
rightCode: props.app === "
|
|
1945
|
+
rightCode: props.app === "cloudkitPro" ? "riskQueryCompany" : "riskQueryMulti"
|
|
1946
1946
|
}).then((res) => {
|
|
1947
1947
|
balance.value = res.balance;
|
|
1948
1948
|
amounts.value = res.paymentCaseConfigVOS;
|
|
@@ -1950,7 +1950,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1950
1950
|
});
|
|
1951
1951
|
const showDialog = ref(false);
|
|
1952
1952
|
async function beanPay() {
|
|
1953
|
-
const $http = useHttp$2({ Appcode: props.
|
|
1953
|
+
const $http = useHttp$2({ Appcode: props.headerApp, Tenant: props.tenant });
|
|
1954
1954
|
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
|
|
1955
1955
|
if (response) {
|
|
1956
1956
|
showDialog.value = false;
|
|
@@ -1981,10 +1981,10 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1981
1981
|
requestPaymentByBean({
|
|
1982
1982
|
caseConfigId: amounts.value[state.selected].id,
|
|
1983
1983
|
amount: amounts.value[state.selected].paymentAmount,
|
|
1984
|
-
app: props.app
|
|
1984
|
+
app: props.app,
|
|
1985
1985
|
tenant: props.tenant,
|
|
1986
1986
|
user: code
|
|
1987
|
-
}).then((result) => {
|
|
1987
|
+
}, props.headerApp).then((result) => {
|
|
1988
1988
|
state.buttonLoading = false;
|
|
1989
1989
|
if (result) {
|
|
1990
1990
|
emit("complete", { result: true, type: "wePay" });
|
package/package.json
CHANGED
package/src/payment/api/index.ts
CHANGED
|
@@ -60,11 +60,10 @@ interface DefaultHeaderType {
|
|
|
60
60
|
Tenant?: string
|
|
61
61
|
}
|
|
62
62
|
function useHttp(defaultHeader?: DefaultHeaderType) {
|
|
63
|
-
console.log(defaultHeader, 'defaultHeader')
|
|
64
63
|
const appkitOptions = useAppKitOptions()
|
|
65
64
|
const headers = {
|
|
66
65
|
Token: appkitOptions.tempToken() || appkitOptions.token(),
|
|
67
|
-
Appcode: defaultHeader?.Appcode
|
|
66
|
+
Appcode: defaultHeader?.Appcode || appkitOptions.app(),
|
|
68
67
|
cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
|
|
69
68
|
gray: appkitOptions.gray ? appkitOptions.gray() : '0',
|
|
70
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
|