Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_highgold
Commits
226515d1
Commit
226515d1
authored
Apr 10, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
55b07e22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
LoanService.java
...app/src/main/java/com/mints/highgold/net/LoanService.java
+25
-25
No files found.
highgold/app/src/main/java/com/mints/highgold/net/LoanService.java
View file @
226515d1
...
...
@@ -507,32 +507,32 @@ public interface LoanService {
builder
.
interceptors
().
add
(
okHttpInterceptor
);
Retrofit
retrofit
;
if
(
BuildConfig
.
DEBUG
)
{
SPUtil
spUtil
=
SPUtil
.
getInstance
(
context
);
if
(
TextUtils
.
isEmpty
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
)))
{
spUtil
.
putString
(
Constant
.
LOCAL_IP
,
"http://39.106.5.102:9082/gs-api/"
);
}
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
spUtil
.
getString
(
Constant
.
LOCAL_IP
))
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
else
{
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
}
// if (BuildConfig.DEBUG) {
// SPUtil spUtil = SPUtil.getInstance(context);
// if (TextUtils.isEmpty(spUtil.getString(Constant.LOCAL_IP))) {
// spUtil.putString(Constant.LOCAL_IP, "http://39.106.5.102:9082/gs-api/");
// }
// retrofit = new Retrofit.Builder()
// .client(builder.build())
// .baseUrl(spUtil.getString(Constant.LOCAL_IP))
// .addConverterFactory(GsonConverterFactory.create())
// .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
// .build();
// } else {
// retrofit = new Retrofit.Builder()
// .client(builder.build())
// .baseUrl(BuildConfig.MainIp)
// .addConverterFactory(GsonConverterFactory.create())
// .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
// .build();
// }
retrofit
=
new
Retrofit
.
Builder
()
.
client
(
builder
.
build
())
.
baseUrl
(
BuildConfig
.
MainIp
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addCallAdapterFactory
(
RxJavaCallAdapterFactory
.
create
())
.
build
();
return
retrofit
.
create
(
LoanService
.
class
);
...
...
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