@uxda/appkit 4.2.34 → 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
@@ -916,7 +916,11 @@ function useHttp$3() {
916
916
 
917
917
  var script$E = /* @__PURE__ */ defineComponent({
918
918
  __name: "DeviceVersion",
919
+ props: {
920
+ versions: { type: String, required: false, default: "{}" }
921
+ },
919
922
  setup(__props) {
923
+ const props = __props;
920
924
  const showAlert = ref(false);
921
925
  const safeArea = useSafeArea();
922
926
  const topStype = computed(() => {
@@ -924,6 +928,10 @@ var script$E = /* @__PURE__ */ defineComponent({
924
928
  });
925
929
  const recommendVersions = ref();
926
930
  const getPropertieByCode = debounce(async () => {
931
+ if (props?.versions !== "{}") {
932
+ recommendVersions.value = JSON.parse(props.versions);
933
+ return;
934
+ }
927
935
  if (recommendVersions.value) return;
928
936
  const $http = useHttp$3();
929
937
  $http.get("/cas/properties/getPropertie", {
@@ -1511,7 +1519,10 @@ var invokeRecharge$1 = {
1511
1519
 
1512
1520
  const requestPayment = (params) => {
1513
1521
  return new Promise((resolve, reject) => {
1514
- const $http = useHttp$2();
1522
+ const $http = useHttp$2({
1523
+ Appcode: params.app !== "cloudkitPro" ? params.app : "",
1524
+ Tenant: params.tenant
1525
+ });
1515
1526
  $http.post(endpoints.\u83B7\u53D6\u5FAE\u4FE1\u652F\u4ED8\u53C2\u6570\u5305, {
1516
1527
  ...params
1517
1528
  // amount: 0.01,
@@ -1528,7 +1539,10 @@ const requestPayment = (params) => {
1528
1539
  };
1529
1540
  const requestPaymentByBean = (params) => {
1530
1541
  return new Promise((resolve, reject) => {
1531
- const $http = useHttp$2();
1542
+ const $http = useHttp$2({
1543
+ Appcode: params.app !== "cloudkitPro" ? params.app : "",
1544
+ Tenant: params.tenant
1545
+ });
1532
1546
  $http.post(endpoints.\u83B7\u53D6\u6743\u76CA\u5FAE\u4FE1\u652F\u4ED8, {
1533
1547
  ...params
1534
1548
  }).then((response) => {
@@ -1925,7 +1939,7 @@ var script$x = /* @__PURE__ */ defineComponent({
1925
1939
  return amounts.value[state.selected] && !selectBean.value ? amounts.value[state.selected].paymentAmount : 0;
1926
1940
  });
1927
1941
  onMounted(() => {
1928
- const $http = useHttp$2();
1942
+ const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
1929
1943
  $http.get(endpoints.\u83B7\u53D6\u589E\u503C\u6743\u76CA\u7C7B\u76EE, {
1930
1944
  rightCode: props.app === "cloudkitPro" ? "riskQueryCompany" : "riskQueryMulti"
1931
1945
  }).then((res) => {
@@ -1935,7 +1949,7 @@ var script$x = /* @__PURE__ */ defineComponent({
1935
1949
  });
1936
1950
  const showDialog = ref(false);
1937
1951
  async function beanPay() {
1938
- const $http = useHttp$2();
1952
+ const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
1939
1953
  $http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
1940
1954
  if (response) {
1941
1955
  showDialog.value = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.34",
3
+ "version": "4.2.38",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -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
- $http.post(endpoints.获取微信支付参数包, {
11
- ...params,
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
- const requestPaymentByBean = (params: PaymentParams) => {
26
- return new Promise<boolean>((resolve, reject) => {
27
- const $http = useHttp()
28
- $http.post(endpoints.获取权益微信支付, {
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 ($app: DollarApp) {
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 }
@@ -11,6 +11,15 @@ import Taro, { getSystemInfoSync } from '@tarojs/taro'
11
11
  import { useHttp } from '../../balance/api'
12
12
  import debounce from 'lodash-es/debounce'
13
13
 
14
+ const props = withDefaults(
15
+ defineProps<{
16
+ versions?: string
17
+ }>(),
18
+ {
19
+ versions: '{}',
20
+ }
21
+ )
22
+
14
23
  const showAlert = ref(false)
15
24
  const safeArea = useSafeArea()
16
25
 
@@ -21,6 +30,12 @@ const topStype = computed(() => {
21
30
  const recommendVersions = ref()
22
31
  // 获取系统配置 - 小程序推荐版本
23
32
  const getPropertieByCode = debounce(async () => {
33
+ if (props?.versions !== '{}') {
34
+ recommendVersions.value = JSON.parse(props.versions)
35
+
36
+ return
37
+ }
38
+
24
39
  if (recommendVersions.value) return
25
40
 
26
41
  const $http = useHttp()