@uxda/appkit 4.2.65 → 4.2.67

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
@@ -125,6 +125,7 @@ function requestWxH5Pay(options) {
125
125
  timeStamp: options.timeStamp
126
126
  },
127
127
  function(res) {
128
+ console.log(res, "-------res");
128
129
  if (res.err_msg == "get_brand_wcpay_request:ok") {
129
130
  resolve(true);
130
131
  } else {
@@ -168,7 +169,7 @@ function requestPayment$2(json) {
168
169
  });
169
170
  }
170
171
 
171
- const services$2 = [getSdkConfig$1];
172
+ const jssdkServices = [getSdkConfig$1];
172
173
 
173
174
  function useSafeArea() {
174
175
  const systemInfo = getSystemInfoSync(), capsule = Taro.getEnv() === "WEAPP" ? getMenuButtonBoundingClientRect() : { top: 0, height: 0 };
@@ -411,8 +412,14 @@ function generateUniqueId(pre) {
411
412
  function useLogger(options) {
412
413
  const appkitOptions = useAppKitOptions();
413
414
  const url = appkitOptions.baseUrl();
414
- if (url.includes("ytech.ddjf.com")) {
415
- defaultLogOptions.projectName = "ddyk-prod";
415
+ if (Taro.getEnv() === "WEB") {
416
+ if (location.origin.includes("ytech.ddjf.com")) {
417
+ defaultLogOptions.projectName = "ddyk-prod";
418
+ }
419
+ } else {
420
+ if (url.includes("ytech.ddjf.com")) {
421
+ defaultLogOptions.projectName = "ddyk-prod";
422
+ }
416
423
  }
417
424
  if (options) {
418
425
  options = Object.assign(defaultLogOptions, options);
@@ -1662,6 +1669,7 @@ const requestBrandWCPay = (params, Appcode = "") => {
1662
1669
  $http.post(endpoints.\u83B7\u53D6\u5FAE\u4FE1\u652F\u4ED8\u53C2\u6570\u5305, {
1663
1670
  ...params
1664
1671
  }).then((response) => {
1672
+ console.log(response, "-----response");
1665
1673
  if (!response.json) {
1666
1674
  showToast({
1667
1675
  title: response.message,
@@ -8737,7 +8745,7 @@ const nutComponents = [
8737
8745
  ({
8738
8746
  ...components
8739
8747
  });
8740
- const services = [...services$1, ...services$2];
8748
+ const services = [...services$1, ...jssdkServices];
8741
8749
  const $app = {
8742
8750
  setToken: (token) => {
8743
8751
  const appKitOptions = useAppKitOptions();
@@ -8775,4 +8783,4 @@ const AppKit = {
8775
8783
  }
8776
8784
  };
8777
8785
 
8778
- export { script$q as AccountView, script$J as AmountPicker, script$H as AppDrawer, script$G as AppVerify, script$w as BalanceCard, script$p as BalanceReminder, script$o as DateRange, script$E as DeviceVersion, script$m as ListFilter, script$2 as LoginSetting, script$f as NoticeBanner, script$e as NoticeEntry, script$c as NoticeList, script$C as OcrBusinessLicense, script$D as OcrIcon, script$I as PageHeader, script$l as PromoterCard, script$z as RechargeResult, script$B as RechargeView, script$h as SelfRegistration, script$x as TradeView, script$A as UserAgreement, script as UserAuth, script$8 as UserBinding, script$7 as UserBindingSuccess, script$b as UserEntry, script$4 as UserFeedback, script$3 as UserFeedbackEntry, script$5 as UserHeadCrop, script$9 as UserInfo, script$1 as UserResourceEmpty, components, createHttp, AppKit as default, defaultCryptoConfig, generateUniqueId, getSdkConfig, requestPayment$2 as requestPayment, requestWxH5Pay, useAppKit, useCountdown, useCrypto, useEncode, useLogger, useSafeArea, useTabbar, useUpload, useValidator };
8786
+ export { script$q as AccountView, script$J as AmountPicker, script$H as AppDrawer, script$G as AppVerify, script$w as BalanceCard, script$p as BalanceReminder, script$o as DateRange, script$E as DeviceVersion, script$m as ListFilter, script$2 as LoginSetting, script$f as NoticeBanner, script$e as NoticeEntry, script$c as NoticeList, script$C as OcrBusinessLicense, script$D as OcrIcon, script$I as PageHeader, script$l as PromoterCard, script$z as RechargeResult, script$B as RechargeView, script$h as SelfRegistration, script$x as TradeView, script$A as UserAgreement, script as UserAuth, script$8 as UserBinding, script$7 as UserBindingSuccess, script$b as UserEntry, script$4 as UserFeedback, script$3 as UserFeedbackEntry, script$5 as UserHeadCrop, script$9 as UserInfo, script$1 as UserResourceEmpty, components, createHttp, AppKit as default, defaultCryptoConfig, generateUniqueId, getSdkConfig, jssdkServices, requestPayment$2 as requestPayment, requestWxH5Pay, services$1 as services, useAppKit, useCountdown, useCrypto, useEncode, useLogger, useSafeArea, useTabbar, useUpload, useValidator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.65",
3
+ "version": "4.2.67",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { App } from 'vue'
2
2
  import { components as paymentComponents } from './payment/components'
3
3
  import { services as paymentServices } from './payment'
4
- import { services as jssdkServices } from './shared'
4
+ import { jssdkServices } from './shared'
5
5
  import // Grid,
6
6
  // GridItem,
7
7
  // Button,
@@ -68,6 +68,7 @@ const requestBrandWCPay = (params: PaymentParams, Appcode = '') => {
68
68
  ...params,
69
69
  })
70
70
  .then((response: any) => {
71
+ console.log(response, '-----response')
71
72
  if (!response.json) {
72
73
  showToast({
73
74
  title: response.message,
@@ -32,9 +32,16 @@ export function useLogger(options?: LogType) {
32
32
  const appkitOptions = useAppKitOptions()
33
33
  const url = appkitOptions.baseUrl()
34
34
 
35
- if (url.includes('ytech.ddjf.com')) {
36
- defaultLogOptions.projectName = 'ddyk-prod'
35
+ if (Taro.getEnv() === 'WEB') {
36
+ if (location.origin.includes('ytech.ddjf.com')) {
37
+ defaultLogOptions.projectName = 'ddyk-prod'
38
+ }
39
+ } else {
40
+ if (url.includes('ytech.ddjf.com')) {
41
+ defaultLogOptions.projectName = 'ddyk-prod'
42
+ }
37
43
  }
44
+
38
45
  if (options) {
39
46
  options = Object.assign(defaultLogOptions, options)
40
47
  } else {
@@ -3,6 +3,6 @@ export * from './components'
3
3
  export * from './composables'
4
4
  export * from './http'
5
5
 
6
- import services from './weixin'
6
+ import jssdkServices from './weixin'
7
7
 
8
- export { services }
8
+ export { jssdkServices }
@@ -1,9 +1,9 @@
1
1
  import { Service } from '../../payment/services'
2
2
  import getSdkConfig from './jssdk'
3
3
 
4
- const services: Service[] = [getSdkConfig]
4
+ const jssdkServices: Service[] = [getSdkConfig]
5
5
 
6
- export default services
6
+ export default jssdkServices
7
7
 
8
8
  export * from './payment'
9
9
  export * from './jssdk'
@@ -56,6 +56,7 @@ function requestWxH5Pay(options: PrePayOptions) {
56
56
  timeStamp: options.timeStamp,
57
57
  },
58
58
  function (res) {
59
+ console.log(res, '-------res')
59
60
  if (res.err_msg == 'get_brand_wcpay_request:ok') {
60
61
  //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。
61
62
  resolve(true)