@aks-dev/easyui 1.0.65 → 1.0.68

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.
@@ -5,10 +5,10 @@ buildscript {
5
5
  mavenCentral()
6
6
  google()
7
7
  ///https://blog.csdn.net/xiaopihair123/article/details/119422895
8
- maven{ url 'https://maven.aliyun.com/repository/google'}
9
- maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
10
- maven{ url 'https://maven.aliyun.com/repository/public'}
11
- // maven{ url 'https://maven.aliyun.com/repository/jcenter'}
8
+ // maven{ url 'https://maven.aliyun.com/repository/google'}
9
+ // maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
10
+ // maven{ url 'https://maven.aliyun.com/repository/public'}
11
+ // maven{ url 'https://maven.aliyun.com/repository/jcenter'}
12
12
  }
13
13
 
14
14
  dependencies {
@@ -2,12 +2,16 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-06-02 13:16:45
5
+ * @LastEditTime: 2022-07-07 10:40:51
6
6
  * @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/RNEasyuiModule.java
7
7
  */
8
8
 
9
9
  package com.easyui;
10
10
 
11
+ import android.content.Intent;
12
+
13
+ import androidx.core.app.ActivityCompat;
14
+
11
15
  import com.facebook.react.bridge.Promise;
12
16
  import com.facebook.react.bridge.ReactApplicationContext;
13
17
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
@@ -63,4 +67,11 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
63
67
  }
64
68
 
65
69
 
70
+ @ReactMethod
71
+ public void gotoDesktop() {
72
+ //启动一个意图,回到桌面
73
+ Intent desktop = new Intent(Intent.ACTION_MAIN);
74
+ desktop.addCategory(Intent.CATEGORY_HOME);
75
+ ActivityCompat.startActivity(getCurrentActivity(), desktop, null);
76
+ }
66
77
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-19 10:23:01
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-31 18:42:45
5
+ * @LastEditTime: 2022-07-07 10:41:19
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
7
7
  */
8
8
 
@@ -27,4 +27,9 @@ export const getNavigationBarHeight = () => {
27
27
 
28
28
  return Promise.resolve(44)
29
29
 
30
- }
30
+ }
31
+
32
+
33
+ export const gotoDesktop = () => {
34
+ if (Platform.OS == 'android') RNEasyui?.goHome();
35
+ }
package/jsbridge/index.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-19 10:23:01
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-06-02 11:03:49
5
+ * @LastEditTime: 2022-07-07 10:41:01
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
7
  */
8
8
 
@@ -43,4 +43,11 @@ export declare const getStatusBarHeight: () => Promise<number>;
43
43
  * @description: 获取navigation_bar_height
44
44
  * @return {*}
45
45
  */
46
- export declare const getNavigationBarHeight: () => Promise<number>;
46
+ export declare const getNavigationBarHeight: () => Promise<number>;
47
+
48
+
49
+ /**
50
+ * only android
51
+ * 返回桌面
52
+ */
53
+ export declare const gotoDesktop: ()=>void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.65",
3
+ "version": "1.0.68",
4
4
  "description": "移动端App开发工具包",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
package/utils/mode.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-18 18:40:07
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-09 16:21:37
6
- * @FilePath: /@aks/easyui/utils/mode.tsx
5
+ * @LastEditTime: 2022-07-07 09:18:06
6
+ * @FilePath: /@aks-dev/easyui/utils/mode.ts
7
7
  */
8
8
  import type { CallBack } from '.'
9
9
 
@@ -45,4 +45,5 @@ export const callTelephone = (phone: number | string) => {
45
45
  console.warn('[sg:mode]', error.toString())
46
46
  })
47
47
 
48
- }
48
+ }
49
+