Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
75243275
Commit
75243275
authored
Apr 16, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 登录完成
parent
5c8b03ca
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
287 additions
and
170 deletions
+287
-170
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
MDTLoginActivity.java
app/src/main/java/com/ydl/component/rtc/MDTLoginActivity.java
+0
-159
MDTLoginActivity.kt
app/src/main/java/com/ydl/component/rtc/MDTLoginActivity.kt
+176
-0
MDTMainActivity.java
app/src/main/java/com/ydl/component/rtc/MDTMainActivity.java
+1
-1
UserSigBean.kt
app/src/main/java/com/ydl/component/rtc/bean/UserSigBean.kt
+11
-0
UserSigResponse.kt
app/src/main/java/com/ydl/component/rtc/bean/UserSigResponse.kt
+14
-0
GenerateTestUserSig.java
app/src/main/java/com/ydl/component/rtc/debug/GenerateTestUserSig.java
+2
-1
MDTHttp.kt
app/src/main/java/com/ydl/component/rtc/http/MDTHttp.kt
+11
-0
MDTHttpImpl.kt
app/src/main/java/com/ydl/component/rtc/http/MDTHttpImpl.kt
+43
-0
MDTService.kt
app/src/main/java/com/ydl/component/rtc/http/MDTService.kt
+24
-0
AndroidManifest.xml
m-mdt-tuicalling/src/main/AndroidManifest.xml
+0
-5
UserModel.java
m-mdt-tuicalling/src/main/java/com/tencent/liteav/basic/UserModel.java
+1
-0
HttpConfig.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/base/config/HttpConfig.kt
+2
-2
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
75243275
...
...
@@ -21,9 +21,9 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
//
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
lifecycles
.
add
(
new
DemoAppLifecycles
());
...
...
app/src/main/java/com/ydl/component/rtc/MDTLoginActivity.java
deleted
100644 → 0
View file @
5c8b03ca
package
com
.
ydl
.
component
.
rtc
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.Toast
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.tencent.imsdk.v2.V2TIMCallback
;
import
com.tencent.imsdk.v2.V2TIMManager
;
import
com.tencent.imsdk.v2.V2TIMSDKConfig
;
import
com.tencent.imsdk.v2.V2TIMSDKListener
;
import
com.tencent.imsdk.v2.V2TIMUserFullInfo
;
import
com.tencent.imsdk.v2.V2TIMValueCallback
;
import
com.tencent.liteav.basic.UserModel
;
import
com.tencent.liteav.basic.UserModelManager
;
import
com.tencent.qcloud.tuicore.TUILogin
;
import
com.ydl.component.R
;
import
com.ydl.component.rtc.debug.GenerateTestUserSig
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
MDTLoginActivity
extends
AppCompatActivity
{
private
static
final
String
TAG
=
"LoginActivity"
;
private
EditText
mEditUserId
;
private
Button
mButtonLogin
;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_login
);
initStatusBar
();
initView
();
}
private
void
initView
()
{
mEditUserId
=
(
EditText
)
findViewById
(
R
.
id
.
et_userId
);
initButtonLogin
();
}
private
void
initButtonLogin
()
{
mButtonLogin
=
(
Button
)
findViewById
(
R
.
id
.
tv_login
);
mButtonLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
login
();
}
});
}
private
void
login
()
{
String
userId
=
mEditUserId
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
userId
))
{
Toast
.
makeText
(
this
,
R
.
string
.
user_id_is_empty
,
Toast
.
LENGTH_SHORT
).
show
();
return
;
}
final
UserModelManager
manager
=
UserModelManager
.
getInstance
();
final
UserModel
userModel
=
manager
.
getUserModel
();
userModel
.
phone
=
userId
;
userModel
.
userId
=
userId
;
userModel
.
userSig
=
GenerateTestUserSig
.
genTestUserSig
(
userId
);
manager
.
setUserModel
(
userModel
);
V2TIMSDKConfig
config
=
new
V2TIMSDKConfig
();
config
.
setLogLevel
(
V2TIMSDKConfig
.
V2TIM_LOG_DEBUG
);
TUILogin
.
init
(
this
,
GenerateTestUserSig
.
SDKAPPID
,
null
,
new
V2TIMSDKListener
()
{
@Override
public
void
onKickedOffline
()
{
}
@Override
public
void
onUserSigExpired
()
{
}
});
TUILogin
.
login
(
userModel
.
userId
,
userModel
.
userSig
,
new
V2TIMCallback
()
{
@Override
public
void
onError
(
int
code
,
String
msg
)
{
ToastUtils
.
showLong
(
"登录IM失败,所有功能不可用[%d]%s"
,
code
,
msg
);
Log
.
d
(
TAG
,
"login fail code: "
+
code
+
" msg:"
+
msg
);
}
@Override
public
void
onSuccess
()
{
Log
.
d
(
TAG
,
"login onSuccess"
);
getUserInfo
();
}
});
}
private
void
getUserInfo
()
{
final
UserModelManager
manager
=
UserModelManager
.
getInstance
();
final
UserModel
userModel
=
manager
.
getUserModel
();
//先查询用户是否存在
List
<
String
>
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
userModel
.
userId
);
Log
.
d
(
TAG
,
"setUserInfo: userIdList = "
+
userIdList
);
V2TIMManager
.
getInstance
().
getUsersInfo
(
userIdList
,
new
V2TIMValueCallback
<
List
<
V2TIMUserFullInfo
>>()
{
@Override
public
void
onError
(
int
code
,
String
msg
)
{
Log
.
e
(
TAG
,
"get group info list fail, code:"
+
code
+
" msg: "
+
msg
);
}
@Override
public
void
onSuccess
(
List
<
V2TIMUserFullInfo
>
resultList
)
{
if
(
resultList
==
null
||
resultList
.
isEmpty
())
{
return
;
}
V2TIMUserFullInfo
result
=
resultList
.
get
(
0
);
String
userName
=
result
.
getNickName
();
String
userAvatar
=
result
.
getFaceUrl
();
Log
.
d
(
TAG
,
"onSuccess: userName = "
+
userName
+
" , userAvatar = "
+
userAvatar
);
//如果用户名和头像为空,则跳转设置界面进行设置
if
(
TextUtils
.
isEmpty
(
userName
)
||
TextUtils
.
isEmpty
(
userAvatar
))
{
Intent
intent
=
new
Intent
(
MDTLoginActivity
.
this
,
ProfileActivity
.
class
);
startActivity
(
intent
);
finish
();
}
else
{
userModel
.
userAvatar
=
userAvatar
;
userModel
.
userName
=
userName
;
manager
.
setUserModel
(
userModel
);
//如果用户信息不为空,则直接进入主界面
Intent
intent
=
new
Intent
(
MDTLoginActivity
.
this
,
MDTMainActivity
.
class
);
startActivity
(
intent
);
finish
();
}
}
});
}
private
void
initStatusBar
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
Window
window
=
getWindow
();
window
.
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
);
window
.
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
);
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
setStatusBarColor
(
Color
.
TRANSPARENT
);
}
else
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
);
}
}
}
app/src/main/java/com/ydl/component/rtc/MDTLoginActivity.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.graphics.Color
import
android.os.Build
import
android.os.Bundle
import
android.text.TextUtils
import
android.util.Log
import
android.view.View
import
android.view.WindowManager
import
android.widget.Button
import
android.widget.EditText
import
android.widget.Toast
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.ToastUtils
import
com.tencent.imsdk.v2.*
import
com.tencent.liteav.basic.UserModel
import
com.tencent.liteav.basic.UserModelManager
import
com.tencent.qcloud.tuicore.TUILogin
import
com.ydl.component.R
import
com.ydl.component.rtc.bean.UserSigResponse
import
com.ydl.component.rtc.http.MDTHttpImpl.Companion.getInstance
import
com.ydl.ydlcommon.modular.ModularServiceManager.provide
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.service.IUserService
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
java.util.*
class
MDTLoginActivity
:
AppCompatActivity
()
{
private
var
mEditUserId
:
EditText
?
=
null
private
var
mButtonLogin
:
Button
?
=
null
public
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_login
)
initStatusBar
()
initView
()
}
private
fun
initView
()
{
mEditUserId
=
findViewById
<
View
>(
R
.
id
.
et_userId
)
as
EditText
initButtonLogin
()
}
private
fun
initButtonLogin
()
{
mButtonLogin
=
findViewById
<
View
>(
R
.
id
.
tv_login
)
as
Button
mButtonLogin
!!
.
setOnClickListener
{
getSigin
()
}
}
@SuppressLint
(
"CheckResult"
)
private
fun
getSigin
()
{
var
user
=
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
val
uid
=
user
?.
uid
mEditUserId
!!
.
setText
(
uid
)
val
userId
=
mEditUserId
!!
.
text
.
toString
().
trim
{
it
<=
' '
}
if
(
TextUtils
.
isEmpty
(
userId
))
{
Toast
.
makeText
(
this
,
R
.
string
.
user_id_is_empty
,
Toast
.
LENGTH_SHORT
).
show
()
return
}
val
manager
=
UserModelManager
.
getInstance
()
val
userModel
=
manager
.
userModel
uid
?.
let
{
uid
->
getInstance
().
getSecret
(
UserSigResponse
(
uid
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
->
val
data
=
response
.
data
if
(
"200"
==
response
.
code
)
{
userModel
.
appId
=
Integer
.
valueOf
(
data
.
appId
)
userModel
.
phone
=
userId
userModel
.
userId
=
userId
userModel
.
userSig
=
data
.
userSig
userModel
.
userAvatar
=
user
?.
head
userModel
.
userName
=
user
?.
nick_name
manager
.
userModel
=
userModel
login
(
userModel
)
}
else
{
ToastUtil
.
toastShort
(
response
.
msg
)
}
},
{
error
->
ToastUtil
.
toastShort
(
error
.
message
)
})
}
}
private
fun
login
(
userModel
:
UserModel
)
{
val
config
=
V2TIMSDKConfig
()
config
.
logLevel
=
V2TIMSDKConfig
.
V2TIM_LOG_DEBUG
TUILogin
.
init
(
this
,
userModel
.
appId
,
null
,
object
:
V2TIMSDKListener
()
{
override
fun
onKickedOffline
()
{}
override
fun
onUserSigExpired
()
{}
})
TUILogin
.
login
(
userModel
.
userId
,
userModel
.
userSig
,
object
:
V2TIMCallback
{
override
fun
onError
(
code
:
Int
,
msg
:
String
)
{
ToastUtils
.
showLong
(
"登录IM失败,所有功能不可用[%d]%s"
,
code
,
msg
)
Log
.
d
(
TAG
,
"login fail code: $code msg:$msg"
)
}
override
fun
onSuccess
()
{
Log
.
d
(
TAG
,
"login onSuccess"
)
userInfo
}
})
}
//如果用户信息不为空,则直接进入主界面//如果用户名和头像为空,则跳转设置界面进行设置
//先查询用户是否存在
private
val
userInfo
:
Unit
private
get
()
{
val
manager
=
UserModelManager
.
getInstance
()
val
userModel
=
manager
.
userModel
//先查询用户是否存在
val
userIdList
:
MutableList
<
String
>
=
ArrayList
()
userIdList
.
add
(
userModel
.
userId
)
Log
.
d
(
TAG
,
"setUserInfo: userIdList = $userIdList"
)
V2TIMManager
.
getInstance
()
.
getUsersInfo
(
userIdList
,
object
:
V2TIMValueCallback
<
List
<
V2TIMUserFullInfo
>?>
{
override
fun
onError
(
code
:
Int
,
msg
:
String
)
{
Log
.
e
(
TAG
,
"get group info list fail, code:$code msg: $msg"
)
}
override
fun
onSuccess
(
resultList
:
List
<
V2TIMUserFullInfo
>?)
{
if
(
resultList
==
null
||
resultList
.
isEmpty
())
{
return
}
val
result
=
resultList
[
0
]
val
userName
=
result
.
nickName
val
userAvatar
=
result
.
faceUrl
Log
.
d
(
TAG
,
"onSuccess: userName = $userName , userAvatar = $userAvatar"
)
//如果用户名和头像为空,则跳转设置界面进行设置
if
(
TextUtils
.
isEmpty
(
userName
)
||
TextUtils
.
isEmpty
(
userAvatar
))
{
val
intent
=
Intent
(
this
@MDTLoginActivity
,
ProfileActivity
::
class
.
java
)
startActivity
(
intent
)
finish
()
}
else
{
userModel
.
userAvatar
=
userAvatar
userModel
.
userName
=
userName
manager
.
userModel
=
userModel
//如果用户信息不为空,则直接进入主界面
val
intent
=
Intent
(
this
@MDTLoginActivity
,
MDTMainActivity
::
class
.
java
)
startActivity
(
intent
)
finish
()
}
}
})
}
private
fun
initStatusBar
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
val
window
=
window
window
.
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
)
window
.
decorView
.
systemUiVisibility
=
(
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
)
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
)
window
.
statusBarColor
=
Color
.
TRANSPARENT
}
else
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
)
}
}
companion
object
{
private
const
val
TAG
=
"LoginActivity"
}
}
\ No newline at end of file
app/src/main/java/com/ydl/component/rtc/MDTMainActivity.java
View file @
75243275
...
...
@@ -142,7 +142,7 @@ public class MDTMainActivity extends AppCompatActivity {
}
private
void
initData
()
{
TUICallingImpl
.
sharedInstance
(
this
).
enableFloatWindow
(
tru
e
);
TUICallingImpl
.
sharedInstance
(
this
).
enableFloatWindow
(
fals
e
);
}
protected
List
<
TRTCItemEntity
>
createTRTCItems
()
{
...
...
app/src/main/java/com/ydl/component/rtc/bean/UserSigBean.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc.bean
/**
* 获取用户密钥
* */
data class
UserSigBean
(
var
appId
:
String
,
var
region
:
String
,
var
secretId
:
String
,
var
userSig
:
String
)
app/src/main/java/com/ydl/component/rtc/bean/UserSigResponse.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc.bean
/**
* @Author: 刘鹏
* @Description:
* @CreateDate: 2022/4/15 16:37
* -------------------------------
* @UpdateUser:
* @UpdateDate: 2022/4/15 16:37
* @UpdateRemark:
* @Version:
*/
class
UserSigResponse
(
var
key
:
String
,
var
channel
:
String
=
"tencent"
)
\ No newline at end of file
app/src/main/java/com/ydl/component/rtc/debug/GenerateTestUserSig.java
View file @
75243275
...
...
@@ -86,7 +86,8 @@ public class GenerateTestUserSig {
* 文档:https://cloud.tencent.com/document/product/269/32688#Server
*/
public
static
String
genTestUserSig
(
String
userId
)
{
return
GenTLSSignature
(
SDKAPPID
,
userId
,
EXPIRETIME
,
null
,
SECRETKEY
);
// return GenTLSSignature(SDKAPPID, userId, EXPIRETIME, null, SECRETKEY);
return
"eJyrVgrxCdZLrSjILEpVsjIzMLEwMNABi5WlFilZKRnpGShB*MUp2YkFBZkpSlaGJgYGZiZmJgZGEJnMlNS8ksy0TLAGQ2MDS1NjSzNLmLbMdKCoiVNEmHl6lpt2kEtVoUdaUl5iWGSgV3JuuIVjiYebRZ6XdklEpktquFtJpC1UY0lmLtBFhmYmlpaGppbGprUAOugw0Q__"
;
}
/**
...
...
app/src/main/java/com/ydl/component/rtc/http/MDTHttp.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc.http
import
com.ydl.component.rtc.bean.UserSigBean
import
com.ydl.component.rtc.bean.UserSigResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
io.reactivex.Observable
interface
MDTHttp
{
fun
getSecret
(
bean
:
UserSigResponse
):
Observable
<
BaseAPIResponse
<
UserSigBean
>>
}
\ No newline at end of file
app/src/main/java/com/ydl/component/rtc/http/MDTHttpImpl.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc.http
import
com.google.gson.Gson
import
com.ydl.component.rtc.bean.UserSigBean
import
com.ydl.component.rtc.bean.UserSigResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
io.reactivex.Observable
import
okhttp3.MediaType
import
okhttp3.RequestBody
class
MDTHttpImpl
:
MDTHttp
{
private
var
mdtService
:
MDTService
?
=
null
object
Holder
{
val
INSTANCE
=
MDTHttpImpl
()
}
companion
object
{
fun
getInstance
():
MDTHttpImpl
{
return
Holder
.
INSTANCE
}
}
private
fun
getMdtService
():
MDTService
{
if
(
mdtService
==
null
)
{
mdtService
=
YDLHttpUtils
.
obtainApi
(
MDTService
::
class
.
java
)
}
return
mdtService
!!
}
//获取登录信息
override
fun
getSecret
(
bean
:
UserSigResponse
):
Observable
<
BaseAPIResponse
<
UserSigBean
>>
{
val
str
=
Gson
().
toJson
(
bean
)
val
body
:
RequestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
return
getMdtService
().
getSecret
(
body
)
}
}
\ No newline at end of file
app/src/main/java/com/ydl/component/rtc/http/MDTService.kt
0 → 100644
View file @
75243275
package
com.ydl.component.rtc.http
import
com.ydl.component.rtc.bean.UserSigBean
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
io.reactivex.Observable
import
okhttp3.RequestBody
import
retrofit2.http.Body
import
retrofit2.http.Headers
import
retrofit2.http.POST
interface
MDTService
{
//获取用户密钥
@POST
(
"video/secret"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
fun
getSecret
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
UserSigBean
>>
}
m-mdt-tuicalling/src/main/AndroidManifest.xml
View file @
75243275
...
...
@@ -31,10 +31,6 @@
android:enabled=
"true"
android:exported=
"false"
/>
<service
android:name=
".ui.floatwindow.FloatWindowService"
android:enabled=
"true"
android:exported=
"false"
/>
</application>
</manifest>
\ No newline at end of file
m-mdt-tuicalling/src/main/java/com/tencent/liteav/basic/UserModel.java
View file @
75243275
...
...
@@ -3,6 +3,7 @@ package com.tencent.liteav.basic;
import
java.io.Serializable
;
public
class
UserModel
implements
Serializable
{
public
int
appId
;
public
String
phone
;
public
String
userId
;
public
String
userSig
;
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/base/config/HttpConfig.kt
View file @
75243275
...
...
@@ -190,7 +190,7 @@ class HttpConfig {
return
Interceptor
{
val
request
:
Request
=
it
.
request
()
val
originalResponse
:
Response
=
it
.
proceed
(
request
)
//
if (!appDebug){
if
(!
appDebug
){
val
code
=
originalResponse
.
code
()
// 接口返回错误的情况下,埋点告诉服务器原因
if
(
code
!=
200
)
{
...
...
@@ -222,7 +222,7 @@ class HttpConfig {
AliYunRichLogsHelper
.
getInstance
().
sendRichLog
(
AliYunLogConfig
.
API
,
"writeMaiDianDatacode$code:$api---params:$params ---- message:$message"
)
}
}
//
}
}
originalResponse
}
}
...
...
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