Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hywang
AnchorCollect
Commits
f58d46b5
Commit
f58d46b5
authored
Apr 09, 2024
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.升级一个版本
parent
b3b6e825
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
19 deletions
+26
-19
build.gradle
app/build.gradle
+3
-3
Configs.java
app/src/main/java/com/phlx/anchorcollect/Configs.java
+4
-0
DaoMaster.java
...rc/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
+2
-2
RetrofitClient.java
.../main/java/com/phlx/anchorcollect/net/RetrofitClient.java
+7
-5
LoginActivity.java
...n/java/com/phlx/anchorcollect/ui/login/LoginActivity.java
+8
-7
LoginVM.java
...rc/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
+2
-2
No files found.
app/build.gradle
View file @
f58d46b5
...
@@ -9,8 +9,8 @@ android {
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.phlx.anchorcollect"
applicationId
"com.phlx.anchorcollect"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
29
targetSdkVersion
29
versionCode
1
2
versionCode
1
3
versionName
"2.
0.6
"
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
6
//数据库版本号
schemaVersion
7
//数据库版本号
daoPackage
'com.phlx.anchorcollect.db.gen'
daoPackage
'com.phlx.anchorcollect.db.gen'
targetGenDir
'src/main/java'
targetGenDir
'src/main/java'
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/Configs.java
View file @
f58d46b5
...
@@ -42,6 +42,10 @@ public class Configs {
...
@@ -42,6 +42,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"
;
...
...
app/src/main/java/com/phlx/anchorcollect/db/gen/DaoMaster.java
View file @
f58d46b5
...
@@ -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
6
): knows all DAOs.
* Master of DAO (schema version
7
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
6
;
public
static
final
int
SCHEMA_VERSION
=
7
;
/** 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
)
{
...
...
app/src/main/java/com/phlx/anchorcollect/net/RetrofitClient.java
View file @
f58d46b5
...
@@ -50,8 +50,8 @@ public class RetrofitClient {
...
@@ -50,8 +50,8 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
//服务端根路径
public
static
String
baseUrl
=
public
static
String
baseUrl
=
"serve.xlglmnmyzspt.org.cn"
//正式old
//
"serve.xlglmnmyzspt.org.cn"//正式old
//
"serve.xlglzy.org.cn"//正式
"serve.xlglzy.org.cn"
//正式
// "39.101.170.186"//阿里云测试
// "39.101.170.186"//阿里云测试
// "192.168.8.135"//董
// "192.168.8.135"//董
// "192.168.43.154"//张敏
// "192.168.43.154"//张敏
...
@@ -93,10 +93,12 @@ public class RetrofitClient {
...
@@ -93,10 +93,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://"
;
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_APP_PORT
,
port
);
url
+=
SPUtils
.
getInstance
().
getString
(
Configs
.
SP_APP_IP
,
baseUrl
)
+
":"
+
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
);
}
}
}
}
...
...
app/src/main/java/com/phlx/anchorcollect/ui/login/LoginActivity.java
View file @
f58d46b5
...
@@ -28,9 +28,9 @@ import me.tatarka.bindingcollectionadapter2.BR;
...
@@ -28,9 +28,9 @@ import me.tatarka.bindingcollectionadapter2.BR;
public
class
LoginActivity
extends
BaseActivity
<
ActivityLoginBinding
,
LoginVM
>
{
public
class
LoginActivity
extends
BaseActivity
<
ActivityLoginBinding
,
LoginVM
>
{
private
String
downloadUrl
;
private
String
downloadUrl
;
private
String
path
;
private
String
path
;
private
int
loginType
;
//登录后是否跳转,0跳转main 1不跳转
private
int
loginType
;
//登录后是否跳转,0跳转main 1不跳转
...
@@ -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
;
...
@@ -90,11 +90,11 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding, LoginVM> {
...
@@ -90,11 +90,11 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding, LoginVM> {
exitApp
();
exitApp
();
});
});
viewModel
.
appUpdateEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
viewModel
.
appUpdateEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
@Override
@Override
public
void
onChanged
(
Integer
s
)
{
public
void
onChanged
(
Integer
s
)
{
int
versionCode
=
ApkUtil
.
getVersionCode
(
LoginActivity
.
this
);
int
versionCode
=
ApkUtil
.
getVersionCode
(
LoginActivity
.
this
);
if
(
versionCode
!=
s
)
{
if
(
versionCode
!=
s
)
{
appUpdate
(
s
);
appUpdate
(
s
);
}
}
}
}
...
@@ -103,7 +103,8 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding, LoginVM> {
...
@@ -103,7 +103,8 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding, LoginVM> {
viewModel
.
dateEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
viewModel
.
dateEvent
.
observe
(
this
,
new
Observer
<
Integer
>()
{
@Override
@Override
public
void
onChanged
(
Integer
integer
)
{
public
void
onChanged
(
Integer
integer
)
{
new
MaterialDialog
.
Builder
(
LoginActivity
.
this
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
title
(
"系统提示"
).
content
(
"日期错误,请联网自动获取日期"
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
new
MaterialDialog
.
Builder
(
LoginActivity
.
this
).
cancelable
(
false
).
canceledOnTouchOutside
(
false
).
title
(
"系统提示"
).
content
(
"日期错误,请联网自动获取日期"
).
positiveText
(
"退出"
).
onAny
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
if
(
which
==
DialogAction
.
POSITIVE
)
{
if
(
which
==
DialogAction
.
POSITIVE
)
{
...
...
app/src/main/java/com/phlx/anchorcollect/ui/login/LoginVM.java
View file @
f58d46b5
...
@@ -80,8 +80,8 @@ public class LoginVM extends BaseViewModel<Repository> {
...
@@ -80,8 +80,8 @@ 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"
);
//
userName.set("15047917803");
password
.
set
(
"Tpsq7803*"
);
//
password.set("Tpsq7803*");
// userName.set("ewei");
// userName.set("ewei");
// password.set("123456");
// password.set("123456");
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment