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
dca7401d
Commit
dca7401d
authored
Jul 01, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release' into feat/fq/fq_evaluation_4.3.99
# Conflicts: # config.gradle
parents
ce0d08ac
dd0109d2
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
203 additions
and
143 deletions
+203
-143
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+53
-31
config.gradle
config.gradle
+21
-24
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+9
-4
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+3
-1
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+1
-2
ShareMeditationDialog.kt
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
+1
-3
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+19
-21
PersonalInfoActivity.java
m-user/src/main/java/com/yidianling/user/mine/PersonalInfoActivity.java
+4
-6
OneKeyLoginHelp.kt
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
+12
-4
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+5
-2
ChannelConfig.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/base/config/ChannelConfig.kt
+20
-0
PlatformRamImpl.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/data/PlatformRamImpl.kt
+13
-8
BuryPointUtils.java
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/BuryPointUtils.java
+6
-5
MoreClickView.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/view/MoreClickView.kt
+2
-1
TRTCCalling.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
+24
-25
YDLInvitionActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
+7
-2
MoreClickView.kt
ydl-webview/src/main/java/com/ydl/view/MoreClickView.kt
+2
-1
ShareMeditationDialog.kt
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
+1
-3
No files found.
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
dca7401d
...
...
@@ -9,11 +9,15 @@ import android.content.ServiceConnection
import
android.net.Uri
import
android.os.IBinder
import
android.provider.Settings
import
android.text.TextUtils
import
android.util.Log
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.launcher.ARouter
import
com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.tencent.qcloud.tuicore.calling.trtccalling.model.TRTCCalling
import
com.tencent.qcloud.tuicore.calling.videocall.Constant
import
com.tencent.qcloud.tuicore.calling.videocall.YDLInvitionActivity
import
com.umeng.analytics.MobclickAgent
import
com.ydl.audioim.YDLavManager
import
com.ydl.component.music.FragmentContainerActivity
...
...
@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
import
com.yidianling.muse.helper.MediaPlayerManager
import
com.yidianling.muse.service.MeditationWindowService
import
com.yidianling.tests.home.NewTestHomeActivity
import
com.yidianling.user.StatusUtils
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import
com.yidianling.user.ui.login.OneKeyLoginHelp
...
...
@@ -52,15 +55,15 @@ import kotlinx.android.synthetic.main.activity_main.*
@Route
(
path
=
"/main/main"
)
class
MainActivity
:
BaseLceActivity
<
DemoContract
.
View
,
DemoContract
.
Presenter
>(),
DemoContract
.
View
{
private
var
secretDescriptionDialog
:
SecretDescriptionDialog
?
=
null
//
private var secretDescriptionDialog: SecretDescriptionDialog? = null
private
var
serviceConnection
:
ServiceConnection
?
=
null
private
var
meditationServiceConnection
:
ServiceConnection
?
=
null
private
var
meditationServiceConnection
:
ServiceConnection
?
=
null
private
var
secretDialog
:
SecretDialog
?
=
null
protected
var
playService
:
PlayService
?
=
null
protected
var
meditationService
:
MeditationWindowService
?=
null
protected
var
meditationService
:
MeditationWindowService
?
=
null
override
fun
getContentViewId
():
Int
{
return
R
.
id
.
lce_content_view
...
...
@@ -92,10 +95,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
YdlCommonRouterManager
.
initYdlCommonRoute
(
PlatformTempCommonRouteImpl
())
// 初始化一键登录sdk
OneKeyLoginHelp
.
sdkInit
(
this
,
OneKeyLoginHelp
.
YDL_USER_APP
,
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
OneKeyLoginHelp
.
sdkInit
(
this
,
OneKeyLoginHelp
.
YDL_USER_APP
,
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
bindService
()
bindMeditationService
()
reLoadData
()
requestPermission
()
bt_mdt
.
setOnClickListener
{
...
...
@@ -116,7 +123,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// .withBoolean("bind_phone", false)
// .withBoolean("isFromGuide", true)
// .navigation()
OneKeyLoginHelp
.
startLogin
(
this
,
false
)
OneKeyLoginHelp
.
startLogin
(
this
,
false
)
}
bt_to_consultant
.
setOnClickListener
{
// ARouter.getInstance()
...
...
@@ -161,7 +168,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
startActivity
(
Intent
(
this
,
CollectSexAndBirthActivity
::
class
.
java
))
}
bt_to_confide
.
setOnClickListener
{
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
)
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
)
startActivity
(
Intent
(
this
,
ConfideHomeActivity
::
class
.
java
))
}
...
...
@@ -227,7 +236,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_privacy
.
setOnClickListener
{
startActivity
(
Intent
(
this
@MainActivity
,
TestAppActivity
::
class
.
java
))
}
}
...
...
@@ -241,20 +249,24 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
val
rxPermissions
=
RxPermissions
(
this
)
rxPermissions
.
requestEach
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
permission
->
if
(
permission
.
granted
)
{
ToastUtil
.
toastShort
(
"Permission Success"
)
}
else
if
(
permission
.
shouldShowRequestPermissionRationale
)
{
requestPermission
()
}
else
{
ToastUtil
.
toastLong
(
this
,
getString
(
R
.
string
.
platform_need_storage_permission_hint
)
)
val
intent
=
Intent
(
Settings
.
ACTION_APPLICATION_DETAILS_SETTINGS
)
val
uri
=
Uri
.
fromParts
(
"package"
,
packageName
,
null
)
intent
.
data
=
uri
startActivity
(
intent
)
finish
()
when
{
permission
.
granted
->
{
ToastUtil
.
toastShort
(
"Permission Success"
)
}
permission
.
shouldShowRequestPermissionRationale
->
{
requestPermission
()
}
else
->
{
ToastUtil
.
toastLong
(
this
,
getString
(
R
.
string
.
platform_need_storage_permission_hint
)
)
val
intent
=
Intent
(
Settings
.
ACTION_APPLICATION_DETAILS_SETTINGS
)
val
uri
=
Uri
.
fromParts
(
"package"
,
packageName
,
null
)
intent
.
data
=
uri
startActivity
(
intent
)
finish
()
}
}
}
...
...
@@ -267,11 +279,11 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bindService
(
intent
,
serviceConnection
,
Context
.
BIND_AUTO_CREATE
)
}
private
fun
bindMeditationService
(){
private
fun
bindMeditationService
()
{
val
intent
=
Intent
()
intent
.
setClass
(
this
,
MeditationWindowService
::
class
.
java
)
intent
.
setClass
(
this
,
MeditationWindowService
::
class
.
java
)
meditationServiceConnection
=
MeditationServiceConnection
()
bindService
(
intent
,
meditationServiceConnection
,
Context
.
BIND_AUTO_CREATE
)
bindService
(
intent
,
meditationServiceConnection
,
Context
.
BIND_AUTO_CREATE
)
}
override
fun
onResume
()
{
...
...
@@ -281,6 +293,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java)
// .
// (this)
val
trtcCalling
=
TRTCCalling
.
sharedInstance
(
this
)
if
(!
TextUtils
.
isEmpty
(
trtcCalling
.
mRoomId
)
&&
!
TextUtils
.
isEmpty
(
trtcCalling
.
mUserId
))
{
val
intent
=
Intent
(
mContext
,
YDLInvitionActivity
::
class
.
java
)
intent
.
putExtra
(
Constant
.
ROOM_ID
,
trtcCalling
.
mRoomId
)
intent
.
putExtra
(
Constant
.
USER_ID
,
trtcCalling
.
mUserId
)
intent
.
putExtra
(
Constant
.
INVITE_ID
,
trtcCalling
.
mInviteId
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
mContext
.
startActivity
(
intent
)
}
}
override
fun
onPause
()
{
...
...
@@ -289,8 +311,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
}
fun
onEvent
(
event
:
MeditationFloatEvent
)
{
fun
onEvent
(
event
:
MeditationFloatEvent
)
{
}
@SuppressLint
(
"MissingSuperCall"
)
...
...
@@ -298,12 +320,12 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
if
(
serviceConnection
!=
null
)
{
unbindService
(
serviceConnection
)
}
if
(
meditationServiceConnection
!=
null
)
{
if
(
meditationServiceConnection
!=
null
)
{
EventBus
.
getDefault
().
post
(
MeditationFloatEvent
(
false
))
MediaPlayerManager
.
getInstance
(
this
)
?.
stop
()
unbindService
(
meditationServiceConnection
)
}
if
(
EventBus
.
getDefault
().
isRegistered
(
this
))
{
if
(
EventBus
.
getDefault
().
isRegistered
(
this
))
{
EventBus
.
getDefault
().
unregister
(
this
)
}
super
.
onDestroy
()
...
...
@@ -319,7 +341,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
}
private
inner
class
MeditationServiceConnection
:
ServiceConnection
{
private
inner
class
MeditationServiceConnection
:
ServiceConnection
{
override
fun
onServiceConnected
(
name
:
ComponentName
?,
service
:
IBinder
?)
{
meditationService
=
(
service
as
MeditationWindowService
.
MeditationBinder
).
service
}
...
...
config.gradle
View file @
dca7401d
...
...
@@ -5,33 +5,30 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.4
5
"
,
"m-consultant"
:
"0.0.60.7
3
"
,
"m-confide"
:
"0.0.50.4
6
"
,
"m-consultant"
:
"0.0.60.7
4
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.7
1
"
,
"m-home"
:
"0.0.23.9
8
"
,
"m-im"
:
"0.0.21.6
6
"
,
"m-dynamic"
:
"0.0.7.
79
"
,
"m-user"
:
"0.0.62.7
2
"
,
"m-home"
:
"0.0.23.9
9
"
,
"m-im"
:
"0.0.21.6
7
"
,
"m-dynamic"
:
"0.0.7.
80
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.8
4
"
,
"m-muse"
:
"0.0.28.8
5
"
,
"m-tests"
:
"0.0.24.24"
,
"m-course"
:
"0.0.43.39"
,
//-------------- 功能组件 --------------
//mdt 组件
"ydl-tuicore"
:
"0.0.25"
,
//第一步
"ydl-platform"
:
"0.0.41.5
0
"
,
"ydl-platform"
:
"0.0.41.5
1
"
,
//第二步 若干
"ydl-webview"
:
"0.0.3
8.99
"
,
"ydl-webview"
:
"0.0.3
9.01
"
,
"ydl-media"
:
"0.0.21.52"
,
"ydl-pay"
:
"0.0.18.21"
,
"m-audioim"
:
"0.0.49.30.23"
,
"ydl-flutter-base"
:
"0.0.14.4
0
"
,
"ydl-flutter-base"
:
"0.0.14.4
4
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -91,15 +88,15 @@ ext {
ydlCompileVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.4
5
"
,
"m-consultant"
:
"0.0.60.7
3
"
,
"m-confide"
:
"0.0.50.4
6
"
,
"m-consultant"
:
"0.0.60.7
4
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.7
1
"
,
"m-home"
:
"0.0.23.9
8
"
,
"m-im"
:
"0.0.21.6
6
"
,
"m-dynamic"
:
"0.0.7.
79
"
,
"m-user"
:
"0.0.62.7
2
"
,
"m-home"
:
"0.0.23.9
9
"
,
"m-im"
:
"0.0.21.6
7
"
,
"m-dynamic"
:
"0.0.7.
80
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.8
4
"
,
"m-muse"
:
"0.0.28.8
5
"
,
"m-tests"
:
"0.0.24.24"
,
"m-course"
:
"0.0.43.39"
,
//-------------- 功能组件 --------------
...
...
@@ -107,15 +104,15 @@ ext {
//mdt 组件
"ydl-tuicore"
:
"0.0.25"
,
//第一步
"ydl-platform"
:
"0.0.41.5
0
"
,
"ydl-platform"
:
"0.0.41.5
1
"
,
//第二步 若干
"ydl-webview"
:
"0.0.3
8.99
"
,
"ydl-webview"
:
"0.0.3
9.01
"
,
"ydl-media"
:
"0.0.21.52"
,
"ydl-pay"
:
"0.0.18.21"
,
"m-audioim"
:
"0.0.49.30.23"
,
"ydl-flutter-base"
:
"0.0.14.4
0
"
,
"ydl-flutter-base"
:
"0.0.14.4
4
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -281,7 +278,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base"
:
"com.ydl:ydl-flutter-base:${ydlCompileVersion["
ydl
-
flutter
-
base
"]}"
,
//组件化项目中的flutter base模块
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.
46
@aar"
,
//flutter aar
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.
51
@aar"
,
//flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
dca7401d
...
...
@@ -708,9 +708,13 @@ class YDLavManager {
session
:
String
?,
line
:
String
)
{
AudioApiRequestUtil
.
callEventSave
(
session
,
line
,
status
,
"用户端:${res}"
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
()
//保证session有值
session
?.
let
{
sessionLet
->
AudioApiRequestUtil
.
callEventSave
(
sessionLet
,
line
,
status
,
"用户端:${res}"
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
()
}
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
dca7401d
...
...
@@ -27,6 +27,7 @@ import com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydlcommon.base.BaseMvpFragment
import
com.ydl.ydlcommon.base.config.ChannelConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.ui.LogoLoadingView
...
...
@@ -90,8 +91,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
(
ffrom
.
startsWith
(
"ATK_android_yyjlcs"
))
(
ffrom
.
endsWith
(
ChannelConfig
.
Xinliceshiyiyu
.
name
))
)
{
//抑郁焦虑测试
rl_hot_fix_for_huawei
.
visibility
=
View
.
GONE
}
else
{
rl_hot_fix_for_huawei
.
visibility
=
View
.
VISIBLE
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
dca7401d
...
...
@@ -478,8 +478,7 @@ class PlayMeditationActivity : BaseActivity() {
shareContent
=
mDesc
,
shareUrl
=
mMediaUrl
,
shareImageUrl
=
mMediaCoverUrl
,
miniId
=
"gh_c154608001f0"
,
// miniId = mMinProgramId!!,
miniId
=
mMinProgramId
!!
,
miniPath
=
mMinProgramPath
!!
)
}
...
...
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
View file @
dca7401d
...
...
@@ -49,11 +49,9 @@ class ShareMeditationDialog : DialogFragment() {
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
val
view
=
inflater
.
inflate
(
R
.
layout
.
layout_share_meditation_dialog
,
container
)
dialog
?.
setCanceledOnTouchOutside
(
true
)
initView
(
view
)
return
view
}
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
dca7401d
...
...
@@ -43,7 +43,6 @@ import com.yidianling.user.api.event.RefreshRecentContactListEvent
import
com.yidianling.user.api.service.IAppService
import
com.yidianling.user.constants.UserBIConstants.UserMyPageEvent
import
com.yidianling.user.mine.bean.CouponNumBean
import
com.yidianling.user.mine.data.AppDataManager
import
com.yidianling.user.mine.data.AppDataManager.getHttp
import
com.yidianling.user.mine.data.AppDataManager.getLocal
import
com.yidianling.user.mine.http.MineHttpImpl
...
...
@@ -249,32 +248,31 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
val
userInfo
=
getUserInfo
()
?:
return
if
(
userInfo
.
uid
!=
null
)
{
getConfideOrder
(
userInfo
.
uid
!!
)
}
val
userInfo
=
getUserInfo
()
//获取用户信息
MineHttpImpl
.
getInstance
().
getNewCoupon
(
BaseCommand
())
.
compose
(
netCheck
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
:
BaseResponse
<
CouponNumBean
>
->
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
?.
count
?:
0
>
0
)
{
view_new_coupon
.
visibility
=
View
.
VISIBLE
getLocal
().
setCoupon
(
true
)
userInfo
?.
uid
?.
let
{
uid
->
getConfideOrder
(
uid
)
//获取用户信息
MineHttpImpl
.
getInstance
().
getNewCoupon
(
BaseCommand
())
.
compose
(
netCheck
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
response
:
BaseResponse
<
CouponNumBean
>
->
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
?.
count
?:
0
>
0
)
{
view_new_coupon
.
visibility
=
View
.
VISIBLE
getLocal
().
setCoupon
(
true
)
}
else
{
view_new_coupon
.
visibility
=
View
.
GONE
getLocal
().
setCoupon
(
false
)
}
}
else
{
view_new_coupon
.
visibility
=
View
.
GONE
getLocal
().
setCoupon
(
false
)
}
}
else
{
}
)
{
throwable
:
Throwable
?
->
getLocal
().
setCoupon
(
false
)
}
})
{
throwable
:
Throwable
?
->
getLocal
().
setCoupon
(
false
)
}
}
}
/**
...
...
m-user/src/main/java/com/yidianling/user/mine/PersonalInfoActivity.java
View file @
dca7401d
...
...
@@ -406,6 +406,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
resultCode
==
RESULT_OK
)
{
switch
(
requestCode
)
{
case
21001
:
...
...
@@ -432,6 +433,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
case
21003
:
if
(
imgUri
!=
null
)
{
showProgressDialog
(
"保存中..."
);
String
path
=
fileUtils
.
getPathByUri4kitkat
(
this
,
imgUri
);
Bitmap
bitmap
=
BitmapFactory
.
decodeFile
(
path
);
bitmap
=
fileUtils
.
getZoomImage
(
bitmap
,
200
);
...
...
@@ -569,12 +571,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
*/
@SuppressLint
(
"CheckResult"
)
void
uploadImage
(
final
String
path
,
final
int
requestCode
)
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
showProgressDialog
(
"保存中..."
);
}
});
UserHttp
userHttp
=
UserHttpImpl
.
Companion
.
getInstance
();
userHttp
.
uploadHead
(
new
HeadParam
(
new
File
(
path
)))
...
...
@@ -610,6 +607,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
.
transform
(
new
GlideCircleTransform
(
PersonalInfoActivity
.
this
))
.
into
(
persion_head_iv
);
}
dismissProgressDialog
();
},
new
ThrowableConsumer
()
{
@Override
public
void
accept
(
@NotNull
String
msg
)
{
...
...
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
View file @
dca7401d
...
...
@@ -12,7 +12,6 @@ import android.view.View
import
android.widget.ImageView
import
android.widget.RelativeLayout
import
android.widget.TextView
import
com.blankj.utilcode.util.ToastUtils
import
com.mobile.auth.gatewayauth.*
import
com.mobile.auth.gatewayauth.model.TokenRet
import
com.ydl.ydlcommon.base.BaseActivity
...
...
@@ -131,10 +130,13 @@ object OneKeyLoginHelp {
*/
private
fun
toLoginActivity
()
{
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
true
,
isFromGuide
=
fals
e
)
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
true
,
isFromGuide
=
mIsFromGuid
e
)
}
else
{
RegisterAndLoginActivity
.
start
(
mActivity
,
false
,
mIsFromGuide
)
}
if
(!
mIsFromGuide
)
{
quitLoginPage
()
}
}
/**
...
...
@@ -150,7 +152,10 @@ object OneKeyLoginHelp {
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
mActivity
)
}
else
{
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
false
,
isFromGuide
=
true
)
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
false
,
isFromGuide
=
!
isOpenDialog
)
}
if
(!
mIsFromGuide
)
{
quitLoginPage
()
}
}
}
...
...
@@ -630,7 +635,10 @@ object OneKeyLoginHelp {
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
context
)
}
else
{
RegisterAndLoginActivity
.
start
(
context
,
isFromOneKey
=
false
,
isFromGuide
=
true
)
RegisterAndLoginActivity
.
start
(
context
,
isFromOneKey
=
false
,
isFromGuide
=
!
isOpenDialog
)
}
if
(
isOpenDialog
)
{
quitLoginPage
()
}
}
}
...
...
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
dca7401d
...
...
@@ -113,7 +113,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
intent
.
putExtra
(
IS_FROM_GUIDE
,
isFromGuide
)
context
.
startActivity
(
intent
)
}
/**
* 注意:此方法仅限于启动页调用,其他页面不要调用此方法
*/
...
...
@@ -723,7 +722,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
super
.
onBackPressed
()
}
}
else
{
OneKeyLoginHelp
.
checkEnvAvailable
(
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
if
(!
OneKeyLoginHelp
.
mIsFromGuide
)
{
finish
()
}
else
{
OneKeyLoginHelp
.
checkEnvAvailable
(
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
}
super
.
onBackPressed
()
}
}
else
{
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/base/config/ChannelConfig.kt
0 → 100644
View file @
dca7401d
package
com.ydl.ydlcommon.base.config
/**
* 渠道枚举
* */
enum
class
ChannelConfig
{
/**
* @property Xinliceshiyiyu 抑郁焦虑测试
* @property Ydl 壹点灵
* @property android 旧版壹点灵
* @property ATK_3 秘密倾诉
* @property ATK_4 心理测试
* @property ATK_5 心理FM
* @property ATK_6 525心理
* @property ATK_7 旧版心理咨询
*
* */
Xinliceshiyiyu
,
Ydl
,
android
,
ATK_3
,
ATK_4
,
ATK_5
,
ATK_6
,
ATK_7
}
\ No newline at end of file
ydl-platform/src/main/java/com/ydl/ydlcommon/data/PlatformRamImpl.kt
View file @
dca7401d
...
...
@@ -2,6 +2,7 @@ package com.ydl.ydlcommon.data
import
com.meituan.android.walle.WalleChannelReader
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.ChannelConfig
import
com.ydl.ydlcommon.bean.GlobalInfo
import
com.ydl.ydlcommon.router.YdlCommonOut
...
...
@@ -10,7 +11,7 @@ import com.ydl.ydlcommon.router.YdlCommonOut
* e-mail : zhangwch@yidianling.com
* time : 2018/05/03
*/
class
PlatformRamImpl
private
constructor
():
IPlatformRam
{
class
PlatformRamImpl
private
constructor
()
:
IPlatformRam
{
private
var
globalInfo
:
GlobalInfo
?
=
null
...
...
@@ -31,14 +32,18 @@ class PlatformRamImpl private constructor(): IPlatformRam {
private
val
ydlChannel
:
String
by
lazy
{
val
appFrom
=
BaseApp
.
instance
.
getGlobalConfig
().
appFrom
;
var
channel
=
WalleChannelReader
.
getChannel
(
YdlCommonOut
.
getApp
())
if
(
channel
.
isNullOrEmpty
()){
channel
=
"${appFrom}_zhuzhan"
return
@lazy
channel
!!
if
(
appFrom
.
endsWith
(
ChannelConfig
.
Xinliceshiyiyu
.
name
))
{
//新版channel拼接规则
return
@lazy
appFrom
}
else
{
if
(
channel
.
isNullOrEmpty
())
{
channel
=
"${appFrom}_zhuzhan"
return
@lazy
channel
!!
}
channel
=
appFrom
+
"_"
+
channel
channel
?:
"android"
}
channel
=
appFrom
+
"_"
+
channel
channel
?:
"android"
}
override
fun
getChannelName
():
String
{
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/BuryPointUtils.java
View file @
dca7401d
...
...
@@ -5,6 +5,7 @@ import android.content.Context;
import
android.text.TextUtils
;
import
com.meituan.android.walle.WalleChannelReader
;
import
com.ydl.ydlcommon.base.BaseApp
;
import
com.ydl.ydlcommon.base.config.ChannelConfig
;
import
com.yidianling.common.tools.LogUtil
;
import
com.ydl.ydlcommon.BuildConfig
;
import
com.ydl.ydlcommon.data.PlatformDataManager
;
...
...
@@ -101,15 +102,15 @@ public class BuryPointUtils {
private
static
String
getShareTitle
()
{
String
ffrom
=
PlatformDataManager
.
INSTANCE
.
getRam
().
getChannelName
();
if
(
ffrom
.
startsWith
(
"ATK_3"
))
{
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_3
.
name
()
))
{
return
"秘密倾诉"
;
}
else
if
(
ffrom
.
startsWith
(
"ATK_4"
))
{
}
else
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_4
.
name
()
))
{
return
"心理测试"
;
}
else
if
(
ffrom
.
startsWith
(
"ATK_5"
))
{
}
else
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_5
.
name
()
))
{
return
"心理FM"
;
}
else
if
(
ffrom
.
startsWith
(
"ATK_6"
))
{
}
else
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_6
.
name
()
))
{
return
"525心理"
;
}
else
if
(
ffrom
.
startsWith
(
"ATK_7"
))
{
}
else
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_7
.
name
()
))
{
return
"心理咨询"
;
}
else
{
return
"壹点灵"
;
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/view/MoreClickView.kt
View file @
dca7401d
...
...
@@ -9,6 +9,7 @@ import android.view.View
import
android.widget.PopupWindow
import
android.widget.RelativeLayout
import
com.ydl.ydlcommon.R
import
com.ydl.ydlcommon.base.config.ChannelConfig
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.router.YdlCommonRouterManager
import
com.ydl.ydlcommon.view.dialog.CommonDialog
...
...
@@ -63,7 +64,7 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att
}
private
fun
setMoreMsg
()
{
if
(
PlatformDataManager
.
getRam
().
getChannelName
().
startsWith
(
"ATK_3"
))
{
if
(
PlatformDataManager
.
getRam
().
getChannelName
().
startsWith
(
ChannelConfig
.
ATK_3
.
name
))
{
YdlCommonRouterManager
.
getYdlCommonRoute
().
startMain
(
context
,
2
,
null
)
}
else
{
YdlCommonRouterManager
.
getYdlCommonRoute
().
startMain
(
context
,
3
,
null
)
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
View file @
dca7401d
...
...
@@ -117,7 +117,13 @@ public class TRTCCalling {
* 是否正在接听界面
*/
public
boolean
mIsBeingInvited
=
false
;
private
String
mRoomId
=
"0"
;
/**
* 记录进入房间需要的一些信息(vivo,小米手机有后台弹出界面的权限,导致app后台状态下,消费掉通话邀请信令,再进入app无法打开通话邀请界面)
*/
public
String
mRoomId
=
""
;
public
String
mUserId
=
""
;
public
String
mInviteId
=
""
;
/**
* 当前邀请列表
* C2C通话时会记录自己邀请的用户
...
...
@@ -187,7 +193,7 @@ public class TRTCCalling {
public
MdtCallBack
mdtCallBack
;
public
interface
MdtCallBack
{
public
interface
MdtCallBack
{
void
onReceiveNewInvitation
(
String
roomId
);
void
onInviteeAccepted
(
String
roomId
);
...
...
@@ -338,26 +344,26 @@ public class TRTCCalling {
private
V2TIMSignalingListener
mTIMSignallingListener
=
new
V2TIMSignalingListener
()
{
@Override
public
void
onReceiveNewInvitation
(
String
inviteID
,
String
inviter
,
String
groupID
,
List
<
String
>
inviteeList
,
String
data
)
{
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
mRoomId
=
groupID
;
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
for
(
String
s
:
inviteeList
)
{
if
(
s
.
equals
(
userModel
.
userId
)){
Intent
intent
=
new
Intent
(
mContext
,
YDLInvitionActivity
.
class
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
groupID
);
intent
.
putExtra
(
Constant
.
USER_ID
,
userModel
.
userId
);
intent
.
putExtra
(
Constant
.
INVITE_ID
,
inviter
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
mContext
.
startActivity
(
intent
);
if
(
inviteeList
.
contains
(
userModel
.
userId
))
{
mRoomId
=
groupID
;
mUserId
=
userModel
.
userId
;
mInviteId
=
inviter
;
Intent
intent
=
new
Intent
(
mContext
,
YDLInvitionActivity
.
class
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
groupID
);
intent
.
putExtra
(
Constant
.
USER_ID
,
userModel
.
userId
);
intent
.
putExtra
(
Constant
.
INVITE_ID
,
inviter
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
mContext
.
startActivity
(
intent
);
if
(!
mIsInRoom
)
{
startRing
();
}
mdtCallBack
.
onReceiveNewInvitation
(
mRoomId
);
}
if
(!
mIsInRoom
){
startRing
();
}
mdtCallBack
.
onReceiveNewInvitation
(
mRoomId
);
}
@Override
...
...
@@ -1194,13 +1200,6 @@ public class TRTCCalling {
return
;
}
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
// Intent intent = new Intent(mContext, YDLInvitionActivity.class);
// intent.putExtra(Constant.ROOM_ID, groupId);
// intent.putExtra(Constant.USER_ID, userModel.userId);
// intent.putExtra(Constant.INVITE_ID, userIdList.get(0));
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// internalCall(userIdList, type, groupId);
}
/**
...
...
@@ -2101,7 +2100,7 @@ public class TRTCCalling {
if
(
TextUtils
.
isEmpty
(
mCallingBellPath
))
{
mMediaPlayHelper
.
start
(
R
.
raw
.
phone_ringing
);
}
else
{
if
(!
mMediaPlayHelper
.
getMediaPlayer
().
isPlaying
()){
if
(!
mMediaPlayHelper
.
getMediaPlayer
().
isPlaying
())
{
mMediaPlayHelper
.
start
(
mCallingBellPath
);
}
}
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
View file @
dca7401d
...
...
@@ -59,10 +59,15 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
MDTRxActivityTool
.
addActivity
(
this
);
handleIntent
();
setContentView
(
R
.
layout
.
video_invition_activity
);
TRTCCalling
trtcCalling
=
TRTCCalling
.
sharedInstance
(
this
);
// 响铃
TRTCCalling
.
sharedInstance
(
this
)
.
startRing
();
trtcCalling
.
startRing
();
// 正在被邀请
TRTCCalling
.
sharedInstance
(
this
).
mIsBeingInvited
=
true
;
trtcCalling
.
mIsBeingInvited
=
true
;
// 清除TRTCCalling类中记录的邀请信息
trtcCalling
.
mRoomId
=
""
;
trtcCalling
.
mUserId
=
""
;
trtcCalling
.
mInviteId
=
""
;
// 发送清空通知栏的通知
EventBus
.
getDefault
().
post
(
new
ClearJPushEvent
());
initView
();
...
...
ydl-webview/src/main/java/com/ydl/view/MoreClickView.kt
View file @
dca7401d
...
...
@@ -9,6 +9,7 @@ import android.widget.PopupWindow
import
android.widget.RelativeLayout
import
com.ydl.webview.IJavascriptHandler
import
com.ydl.webview.R
import
com.ydl.ydlcommon.base.config.ChannelConfig
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.router.YdlCommonRouterManager
...
...
@@ -98,7 +99,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
}
private
fun
setMoreMsg
()
{
if
(
PlatformDataManager
.
getRam
().
getChannelName
().
startsWith
(
"ATK_3"
))
{
if
(
PlatformDataManager
.
getRam
().
getChannelName
().
startsWith
(
ChannelConfig
.
ATK_3
.
name
))
{
YdlCommonRouterManager
.
getYdlCommonRoute
().
startMain
(
context
,
2
,
null
)
}
else
{
YdlCommonRouterManager
.
getYdlCommonRoute
().
startMain
(
context
,
3
,
null
)
...
...
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
View file @
dca7401d
...
...
@@ -58,11 +58,9 @@ class ShareMeditationDialog : DialogFragment() {
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
val
view
=
inflater
.
inflate
(
R
.
layout
.
layout_share_meditation_dialog
,
container
)
dialog
?.
setCanceledOnTouchOutside
(
true
)
initView
(
view
)
return
view
}
...
...
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