@aks-dev/easyui 1.0.29 → 1.0.32
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-05-05 13:57:25
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-23
|
|
5
|
+
* @LastEditTime: 2022-05-23 19:16:19
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/UpgradeModule.java
|
|
7
7
|
*/
|
|
8
8
|
package com.easyui;
|
|
@@ -107,8 +107,8 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
107
107
|
String note = (String) hashMap.get("note");
|
|
108
108
|
Boolean force = (Boolean) hashMap.get("force");
|
|
109
109
|
if (!checkUpdate(version, this.getAppVersionName())) {
|
|
110
|
-
|
|
111
110
|
promise.reject("error_app_upgrade","已是最新版本");
|
|
111
|
+
return ;
|
|
112
112
|
}
|
|
113
113
|
Activity currentActivity = context.getCurrentActivity();
|
|
114
114
|
int permission = ActivityCompat.checkSelfPermission(context.getApplicationContext(),
|
|
@@ -120,6 +120,8 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
120
120
|
EXTERNAL_STORAGE_REQ_CODE);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
|
|
124
|
+
promise.resolve("发现新版本");
|
|
123
125
|
runOnMainThread(new Runnable() {
|
|
124
126
|
@Override
|
|
125
127
|
public void run() {
|
|
@@ -156,7 +158,7 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
156
158
|
@Override
|
|
157
159
|
public void onClick(View v) {
|
|
158
160
|
if (force) {
|
|
159
|
-
android.os.Process.killProcess(android.os.Process.myPid());
|
|
161
|
+
//android.os.Process.killProcess(android.os.Process.myPid());
|
|
160
162
|
} else {
|
|
161
163
|
dialog.dismiss();
|
|
162
164
|
}
|
|
@@ -165,7 +167,7 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
165
167
|
}
|
|
166
168
|
});
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
/**
|
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-05-23 18:
|
|
5
|
+
* @LastEditTime: 2022-05-23 18:25:02
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/jsbridge/index.ts
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -20,4 +20,8 @@
|
|
|
20
20
|
force: boolean;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @description: app升级
|
|
25
|
+
* @return {*}
|
|
26
|
+
*/
|
|
23
27
|
export declare const upgrade: (props: UpgradeOptions) => Promise<string>;
|