@uxda/appkit 4.2.38 → 4.2.40

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,10 +1464,11 @@ const vendor$2 = {
1464
1464
  }
1465
1465
  };
1466
1466
  function useHttp$2(defaultHeader) {
1467
+ console.log(defaultHeader, "defaultHeader");
1467
1468
  const appkitOptions = useAppKitOptions();
1468
1469
  const headers = {
1469
1470
  Token: appkitOptions.tempToken() || appkitOptions.token(),
1470
- Appcode: defaultHeader?.Appcode || appkitOptions.app(),
1471
+ Appcode: defaultHeader?.Appcode !== void 0 ? defaultHeader?.Appcode : appkitOptions.app(),
1471
1472
  cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
1472
1473
  gray: appkitOptions.gray ? appkitOptions.gray() : "0"
1473
1474
  };
@@ -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.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
1943
+ const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" && props.app !== "aiapprove" ? props.app : "", Tenant: props.tenant });
1943
1944
  $http.get(endpoints.\u83B7\u53D6\u589E\u503C\u6743\u76CA\u7C7B\u76EE, {
1944
- rightCode: props.app === "cloudkitPro" ? "riskQueryCompany" : "riskQueryMulti"
1945
+ rightCode: props.app === "corporateStar" ? "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.app !== "cloudkitPro" ? props.app : "", Tenant: props.tenant });
1953
+ const $http = useHttp$2({ Appcode: props.app !== "cloudkitPro" && props.app !== "aiapprove" ? props.app : "", 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.38",
3
+ "version": "4.2.40",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -60,10 +60,11 @@ interface DefaultHeaderType {
60
60
  Tenant?: string
61
61
  }
62
62
  function useHttp(defaultHeader?: DefaultHeaderType) {
63
+ console.log(defaultHeader, 'defaultHeader')
63
64
  const appkitOptions = useAppKitOptions()
64
65
  const headers = {
65
66
  Token: appkitOptions.tempToken() || appkitOptions.token(),
66
- Appcode: defaultHeader?.Appcode || appkitOptions.app(),
67
+ Appcode: defaultHeader?.Appcode !== undefined ? defaultHeader?.Appcode : appkitOptions.app(),
67
68
  cookie: `tid=${defaultHeader?.Tenant || appkitOptions.tenant()}`,
68
69
  gray: appkitOptions.gray ? appkitOptions.gray() : '0',
69
70
  }
@@ -110,9 +110,9 @@ const currentAmount = computed(() => {
110
110
  })
111
111
 
112
112
  onMounted(() => {
113
- const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' ? props.app : '', Tenant: props.tenant })
113
+ const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' && props.app !== 'aiapprove' ? props.app : '', Tenant: props.tenant })
114
114
  $http.get<any[]>(endpoints.获取增值权益类目, {
115
- rightCode: props.app === 'cloudkitPro' ? 'riskQueryCompany' : 'riskQueryMulti',
115
+ rightCode: props.app === 'corporateStar' ? 'riskQueryCompany' : 'riskQueryMulti',
116
116
  }).then((res: any) => {
117
117
  balance.value = res.balance
118
118
  amounts.value = res.paymentCaseConfigVOS
@@ -122,7 +122,7 @@ onMounted(() => {
122
122
  // 云豆支付
123
123
  const showDialog = ref<boolean>(false)
124
124
  async function beanPay() {
125
- const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' ? props.app : '', Tenant: props.tenant })
125
+ const $http = useHttp({ Appcode: props.app !== 'cloudkitPro' && props.app !== 'aiapprove' ? 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