@uxda/appkit 4.3.22 → 4.3.24

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
@@ -557,11 +557,12 @@ function useLogger(options) {
557
557
  }
558
558
 
559
559
  function useWxAuth() {
560
- function toWxAuth(source, redirectUri) {
560
+ function toWxAuth(source, redirectUri, authSource = null) {
561
561
  const $http = useHttp$2();
562
562
  $http.get("/cas/auth/render/", {
563
563
  source,
564
- redirectUri
564
+ redirectUri,
565
+ authSource
565
566
  }).then((res) => {
566
567
  location.replace(res);
567
568
  });
@@ -3478,36 +3479,12 @@ function isWechat() {
3478
3479
  let ua = window.navigator.userAgent.toLowerCase();
3479
3480
  return ua.includes("micromessenger");
3480
3481
  }
3481
- function isAlipay() {
3482
- let ua = window.navigator.userAgent.toLowerCase();
3483
- return ua.includes("alipayclient");
3484
- }
3485
3482
  const isIOS = () => {
3486
3483
  if (typeof window !== "undefined") {
3487
3484
  return /iPhone|iPad|iPod/i.test(window.navigator.userAgent);
3488
3485
  }
3489
3486
  return false;
3490
3487
  };
3491
- const isAndroid = () => {
3492
- if (typeof window !== "undefined") {
3493
- return /Android/i.test(window.navigator.userAgent);
3494
- }
3495
- return false;
3496
- };
3497
- function getBrowser() {
3498
- if (typeof window === "undefined") return "other";
3499
- const ua = window.navigator.userAgent.toLowerCase();
3500
- if (/edg\/|edge\//.test(ua) || /opr\/|opera/.test(ua)) return "other";
3501
- if (/chrome\/|crios\//.test(ua)) return "chrome";
3502
- if (/safari\//.test(ua) && !/chrome|crios/.test(ua)) return "safari";
3503
- return "other";
3504
- }
3505
- function isSafari() {
3506
- return getBrowser() === "safari";
3507
- }
3508
- function isChrome() {
3509
- return getBrowser() === "chrome";
3510
- }
3511
3488
 
3512
3489
  const _hoisted_1$B = { class: "view recharge-view" };
3513
3490
  const _hoisted_2$r = { class: "flex-grow" };
@@ -3605,10 +3582,8 @@ var script$E = /* @__PURE__ */ defineComponent({
3605
3582
  function getChannelCode() {
3606
3583
  if (isWechat()) {
3607
3584
  return "centergzh";
3608
- } else if (isAlipay() || isAndroid() || isIOS() && !isChrome() && !isSafari()) {
3609
- return "YundouZfb";
3610
3585
  } else {
3611
- return "distributor";
3586
+ return "YundouZfb";
3612
3587
  }
3613
3588
  }
3614
3589
  const payResultCheck = () => {
@@ -4102,10 +4077,8 @@ var script$A = /* @__PURE__ */ defineComponent({
4102
4077
  function getChannelCode() {
4103
4078
  if (isWechat()) {
4104
4079
  return "centergzh";
4105
- } else if (isAlipay() || isAndroid() || isIOS() && !isChrome() && !isSafari()) {
4106
- return "YundouZfb";
4107
4080
  } else {
4108
- return "distributor";
4081
+ return "YundouZfb";
4109
4082
  }
4110
4083
  }
4111
4084
  const onPayClick = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.3.22",
3
+ "version": "4.3.24",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -154,10 +154,8 @@ const onPayClick = () => {
154
154
  function getChannelCode() {
155
155
  if (isWechat()) {
156
156
  return 'centergzh';
157
- } else if (isAlipay() || isAndroid() || (isIOS() && !isChrome() && !isSafari())) {
158
- return 'YundouZfb';
159
157
  } else {
160
- return 'distributor';
158
+ return 'YundouZfb';
161
159
  }
162
160
  }
163
161
 
@@ -352,10 +352,8 @@ function proceedWechatPayment() {
352
352
  function getChannelCode() {
353
353
  if (isWechat()) {
354
354
  return 'centergzh';
355
- } else if (isAlipay() || isAndroid() || (isIOS() && !isChrome() && !isSafari())) {
356
- return 'YundouZfb';
357
355
  } else {
358
- return 'distributor';
356
+ return 'YundouZfb';
359
357
  }
360
358
  }
361
359
 
@@ -10,12 +10,13 @@ export function useWxAuth() {
10
10
  * @param source 设备码
11
11
  * @param redirectUri 重定向地址
12
12
  */
13
- function toWxAuth(source, redirectUri) {
13
+ function toWxAuth(source, redirectUri, authSource = null) {
14
14
  const $http = useHttp()
15
15
  $http
16
16
  .get('/cas/auth/render/', {
17
17
  source,
18
18
  redirectUri,
19
+ authSource
19
20
  })
20
21
  .then((res: any) => {
21
22
  location.replace(res)