Commit 1a3df678 authored by hywang's avatar hywang

1.升级一个版本

parent 472245d0
......@@ -9,8 +9,8 @@ android {
applicationId "com.phlx.anchorcollect_p"
minSdkVersion 21
targetSdkVersion 29
versionCode 16
versionName "2.0.11"
versionCode 17
versionName "2.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......@@ -50,7 +50,7 @@ android {
}
greendao {
schemaVersion 4 //数据库版本号
schemaVersion 5 //数据库版本号
daoPackage 'com.phlx.anchorcollect_p.db.gen'
targetGenDir 'src/main/java'
}
......
......@@ -39,6 +39,10 @@ public class Configs {
* 是否后缀端口
*/
public static boolean isAddPort = true;
/**
* 是否https
*/
public static boolean isHttps = true;
//ip port
public static final String SP_APP_IP = "sp_app_ip";
......
......@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 4): knows all DAOs.
* Master of DAO (schema version 5): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 4;
public static final int SCHEMA_VERSION = 5;
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
......
......@@ -92,10 +92,12 @@ public class RetrofitClient {
if (TextUtils.isEmpty(url)) {
if (Configs.isAddPort) {
url = "http://" + SPUtils.getInstance().getString(Configs.SP_APP_IP, baseUrl) + ":" +
url = Configs.isHttps ? "https://" : "http://";
url+= SPUtils.getInstance().getString(Configs.SP_APP_IP, baseUrl) + ":" +
SPUtils.getInstance().getString(Configs.SP_APP_PORT, port);
} else {
url = "http://" + SPUtils.getInstance().getString(Configs.SP_APP_IP, baseUrl);
url = Configs.isHttps ? "https://" : "http://" ;
url+= SPUtils.getInstance().getString(Configs.SP_APP_IP, baseUrl);
}
}
......
......@@ -63,8 +63,8 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding, LoginVM> {
viewModel.loginType = loginType;
downloadUrl = "http://"
+ SPUtils.getInstance().getString(Configs.SP_APP_IP, RetrofitClient.baseUrl)
downloadUrl = Configs.isHttps ? "https://" : "http://" ;
downloadUrl+= SPUtils.getInstance().getString(Configs.SP_APP_IP, RetrofitClient.baseUrl)
+ ":" +
SPUtils.getInstance().getString(Configs.SP_APP_PORT, RetrofitClient.port)
+ Configs.downloadApk;
......
......@@ -80,6 +80,9 @@ public class LoginVM extends BaseViewModel<Repository> {
userName.set(model.getUserName());
password.set(model.getPassword());
// userName.set("15047917803");
// password.set("Tpsq7803*");
// userName.set("zz");//正式测试 app
// userName.set("test_app");//阿里云测试 app
// password.set("123456");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment