@aks-dev/easyui 1.0.105 → 1.0.107

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.
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 10:40:51
5
+ * @LastEditTime: 2022-10-24 16:08:50
6
6
  * @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/RNEasyuiModule.java
7
7
  */
8
8
 
@@ -16,6 +16,7 @@ import com.facebook.react.bridge.Promise;
16
16
  import com.facebook.react.bridge.ReactApplicationContext;
17
17
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
18
18
  import com.facebook.react.bridge.ReactMethod;
19
+ import android.os.Build;
19
20
 
20
21
  public class RNEasyuiModule extends ReactContextBaseJavaModule {
21
22
 
@@ -32,6 +33,11 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
32
33
  }
33
34
 
34
35
 
36
+ @ReactMethod
37
+ public void getDeviceBrand(Promise promise) {
38
+ promise.resolve( Build.BRAND+ Build.MODEL);
39
+ }
40
+
35
41
  @Deprecated
36
42
  @ReactMethod
37
43
  public void getStatusBarHeight(final Promise promise) {
@@ -48,6 +54,9 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
48
54
  }
49
55
 
50
56
 
57
+
58
+
59
+
51
60
  @Deprecated
52
61
  @ReactMethod
53
62
  public void getNavigationBarHeight(final Promise promise) {
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-05-05 13:57:25
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-06-08 10:55:21
5
+ * @LastEditTime: 2022-10-24 16:07:27
6
6
  * @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/UpgradeModule.java
7
7
  */
8
8
  package com.easyui;
@@ -100,6 +100,11 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
100
100
  promise.resolve(this.getAppVersionName());
101
101
  }
102
102
 
103
+ @ReactMethod
104
+ public void getOSVersion(Promise promise) {
105
+ promise.resolve(android.os.Build.VERSION.RELEASE);
106
+ }
107
+
103
108
 
104
109
  @ReactMethod
105
110
  public void upgrade(final ReadableMap info, final Promise promise) {
package/i.sh ADDED
@@ -0,0 +1,14 @@
1
+
2
+ ###
3
+ # @Author: shiguo
4
+ # @Date: 2022-09-26 17:09:38
5
+ # @LastEditors: shiguo
6
+ # @LastEditTime: 2022-09-26 17:26:37
7
+ # @FilePath: /@aks-dev/taro-h5/i.sh
8
+ ###
9
+
10
+ #chmod u+x *.sh
11
+ git add .
12
+ git commit -m '脚本更新'
13
+ npm version patch
14
+ npm publish
package/ios/RNEasyui.m CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  #import "RNEasyui.h"
3
+ #import "RomUtil.h"
3
4
 
4
5
  @implementation RNEasyui
5
6
 
@@ -9,5 +10,11 @@
9
10
  }
10
11
  RCT_EXPORT_MODULE()
11
12
 
13
+ RCT_EXPORT_METHOD(getDeviceBrand:(RCTPromiseResolveBlock)resolve
14
+ reject:(RCTPromiseRejectBlock)reject){
15
+ resolve([RomUtil getCurrentDeviceModel]);
16
+ }
17
+
18
+
12
19
  @end
13
20
 
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-19 10:23:01
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 10:41:19
5
+ * @LastEditTime: 2022-10-24 16:14:40
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
7
7
  */
8
8
 
@@ -12,6 +12,9 @@ const { RNEasyui } = NativeModules;
12
12
 
13
13
 
14
14
 
15
+ export const getDeviceBrand = () => RNEasyui.getDeviceBrand();
16
+
17
+
15
18
 
16
19
  export const getStatusBarHeight = () => {
17
20
  if (Platform.OS == 'android') return RNEasyui.getStatusBarHeight();
@@ -2,8 +2,8 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-05-05 14:19:39
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-24 14:08:49
6
- * @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.tsx
5
+ * @LastEditTime: 2022-10-24 16:13:01
6
+ * @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.ts
7
7
  */
8
8
  import { NativeModules, PermissionsAndroid, Platform } from 'react-native';
9
9
 
@@ -13,6 +13,7 @@ import type { UpgradeOptions } from '.'
13
13
 
14
14
  export const getAppVersion = () => UpgradeModule.getAppVersion();
15
15
 
16
+ export const getOSVersion = () => UpgradeModule.getOSVersion();
16
17
 
17
18
  export const upgrade = async (options: UpgradeOptions ) => {
18
19
  const { title = '提示' } = options
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-07-07 10:41:01
5
+ * @LastEditTime: 2022-10-24 16:14:01
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
7
  */
8
8
 
@@ -14,6 +14,18 @@
14
14
  */
15
15
  export declare const getAppVersion: () => Promise<string>;
16
16
 
17
+ /**
18
+ * @description: 获取操作系统版本
19
+ * @return {*}
20
+ */
21
+ export declare const getOSVersion: () => Promise<string>;
22
+
23
+ /**
24
+ * @description: 获取设备品牌
25
+ * @return {*}
26
+ */
27
+ export declare const getDeviceBrand: () => Promise<string>;
28
+
17
29
 
18
30
  export declare type UpgradeOptions = {
19
31
  title?: string;
@@ -168,7 +168,7 @@ const styles = StyleSheet.create({
168
168
  alignItems: 'center',
169
169
 
170
170
  backgroundColor: 'white',
171
- marginTop: px2dp(0.5)
171
+ marginTop: px2dp(0.75)
172
172
  },
173
173
  itemText: {
174
174
  fontSize: px2sp(12),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.105",
3
+ "version": "1.0.107",
4
4
  "description": "工具箱",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
@@ -25,7 +25,8 @@
25
25
  "/**/*.png",
26
26
  "/**/*.bundle",
27
27
  "!/tsconfig.json",
28
- "!/tsconfig.md"
28
+ "!/tsconfig.md",
29
+ "/i.sh"
29
30
  ],
30
31
  "homepage": "https://gitee.com/the_period_of_the_ten_kingdoms",
31
32
  "repository": {