Commit 1a3df678 authored by hywang's avatar hywang

1.升级一个版本

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