@uxda/appkit 4.2.36 → 4.2.38
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
|
@@ -1519,7 +1519,10 @@ var invokeRecharge$1 = {
|
|
|
1519
1519
|
|
|
1520
1520
|
const requestPayment = (params) => {
|
|
1521
1521
|
return new Promise((resolve, reject) => {
|
|
1522
|
-
const $http = useHttp$2(
|
|
1522
|
+
const $http = useHttp$2({
|
|
1523
|
+
Appcode: params.app !== "cloudkitPro" ? params.app : "",
|
|
1524
|
+
Tenant: params.tenant
|
|
1525
|
+
});
|
|
1523
1526
|
$http.post(endpoints.\u83B7\u53D6\u5FAE\u4FE1\u652F\u4ED8\u53C2\u6570\u5305, {
|
|
1524
1527
|
...params
|
|
1525
1528
|
// amount: 0.01,
|
|
@@ -1536,7 +1539,10 @@ const requestPayment = (params) => {
|
|
|
1536
1539
|
};
|
|
1537
1540
|
const requestPaymentByBean = (params) => {
|
|
1538
1541
|
return new Promise((resolve, reject) => {
|
|
1539
|
-
const $http = useHttp$2(
|
|
1542
|
+
const $http = useHttp$2({
|
|
1543
|
+
Appcode: params.app !== "cloudkitPro" ? params.app : "",
|
|
1544
|
+
Tenant: params.tenant
|
|
1545
|
+
});
|
|
1540
1546
|
$http.post(endpoints.\u83B7\u53D6\u6743\u76CA\u5FAE\u4FE1\u652F\u4ED8, {
|
|
1541
1547
|
...params
|
|
1542
1548
|
}).then((response) => {
|
|
@@ -1933,7 +1939,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1933
1939
|
return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
|
|
1934
1940
|
});
|
|
1935
1941
|
onMounted(() => {
|
|
1936
|
-
const $http = useHttp$2();
|
|
1942
|
+
const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
|
|
1937
1943
|
$http.get(endpoints.\u83B7\u53D6\u589E\u503C\u6743\u76CA\u7C7B\u76EE, {
|
|
1938
1944
|
rightCode: props.app === "cloudkitPro" ? "riskQueryCompany" : "riskQueryMulti"
|
|
1939
1945
|
}).then((res) => {
|
|
@@ -1943,7 +1949,7 @@ var script$x = /* @__PURE__ */ defineComponent({
|
|
|
1943
1949
|
});
|
|
1944
1950
|
const showDialog = ref(false);
|
|
1945
1951
|
async function beanPay() {
|
|
1946
|
-
const $http = useHttp$2();
|
|
1952
|
+
const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
|
|
1947
1953
|
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
|
|
1948
1954
|
if (response) {
|
|
1949
1955
|
showDialog.value = false;
|
package/package.json
CHANGED
|
@@ -110,7 +110,7 @@ const currentAmount = computed(() => {
|
|
|
110
110
|
})
|
|
111
111
|
|
|
112
112
|
onMounted(() => {
|
|
113
|
-
const $http = useHttp()
|
|
113
|
+
const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' ? props.app : '', Tenant: props.tenant })
|
|
114
114
|
$http.get<any[]>(endpoints.获取增值权益类目, {
|
|
115
115
|
rightCode: props.app === 'cloudkitPro' ? 'riskQueryCompany' : 'riskQueryMulti',
|
|
116
116
|
}).then((res: any) => {
|
|
@@ -122,7 +122,7 @@ onMounted(() => {
|
|
|
122
122
|
// 云豆支付
|
|
123
123
|
const showDialog = ref<boolean>(false)
|
|
124
124
|
async function beanPay() {
|
|
125
|
-
const $http = useHttp()
|
|
125
|
+
const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' ? props.app : '', Tenant: props.tenant })
|
|
126
126
|
$http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response: any) => {
|
|
127
127
|
if (response) {
|
|
128
128
|
showDialog.value = false
|
|
@@ -6,54 +6,61 @@ import Taro from '@tarojs/taro'
|
|
|
6
6
|
|
|
7
7
|
const requestPayment = (params: PaymentParams) => {
|
|
8
8
|
return new Promise<boolean>((resolve, reject) => {
|
|
9
|
-
const $http = useHttp(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// amount: 0.01,
|
|
13
|
-
}).then(response => {
|
|
14
|
-
weappRequestPayment(response.json).then(result => {
|
|
15
|
-
if (result) {
|
|
16
|
-
resolve(true)
|
|
17
|
-
} else {
|
|
18
|
-
resolve(false)
|
|
19
|
-
}
|
|
20
|
-
})
|
|
9
|
+
const $http = useHttp({
|
|
10
|
+
Appcode: params.app !== 'cloudkitPro' ? params.app : '',
|
|
11
|
+
Tenant: params.tenant,
|
|
21
12
|
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...params,
|
|
30
|
-
}).then((response: any) => {
|
|
31
|
-
if(!response.json){
|
|
32
|
-
Taro.showToast({
|
|
33
|
-
title: response.message,
|
|
34
|
-
icon: 'none',
|
|
35
|
-
})
|
|
36
|
-
resolve(false)
|
|
37
|
-
}else {
|
|
38
|
-
weappRequestPayment(response.json).then(result => {
|
|
13
|
+
$http
|
|
14
|
+
.post(endpoints.获取微信支付参数包, {
|
|
15
|
+
...params,
|
|
16
|
+
// amount: 0.01,
|
|
17
|
+
})
|
|
18
|
+
.then((response) => {
|
|
19
|
+
weappRequestPayment(response.json).then((result) => {
|
|
39
20
|
if (result) {
|
|
40
21
|
resolve(true)
|
|
41
22
|
} else {
|
|
42
23
|
resolve(false)
|
|
43
24
|
}
|
|
44
25
|
})
|
|
45
|
-
}
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const requestPaymentByBean = (params: PaymentParams) => {
|
|
31
|
+
return new Promise<boolean>((resolve, reject) => {
|
|
32
|
+
const $http = useHttp({
|
|
33
|
+
Appcode: params.app !== 'cloudkitPro' ? params.app : '',
|
|
34
|
+
Tenant: params.tenant,
|
|
46
35
|
})
|
|
36
|
+
$http
|
|
37
|
+
.post(endpoints.获取权益微信支付, {
|
|
38
|
+
...params,
|
|
39
|
+
})
|
|
40
|
+
.then((response: any) => {
|
|
41
|
+
if (!response.json) {
|
|
42
|
+
Taro.showToast({
|
|
43
|
+
title: response.message,
|
|
44
|
+
icon: 'none',
|
|
45
|
+
})
|
|
46
|
+
resolve(false)
|
|
47
|
+
} else {
|
|
48
|
+
weappRequestPayment(response.json).then((result) => {
|
|
49
|
+
if (result) {
|
|
50
|
+
resolve(true)
|
|
51
|
+
} else {
|
|
52
|
+
resolve(false)
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
})
|
|
47
57
|
})
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export default {
|
|
51
|
-
install
|
|
61
|
+
install($app: DollarApp) {
|
|
52
62
|
$app.requestPayment = requestPayment
|
|
53
|
-
}
|
|
63
|
+
},
|
|
54
64
|
}
|
|
55
65
|
|
|
56
|
-
export {
|
|
57
|
-
requestPayment,
|
|
58
|
-
requestPaymentByBean
|
|
59
|
-
}
|
|
66
|
+
export { requestPayment, requestPaymentByBean }
|