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
612b796e
Commit
612b796e
authored
Nov 06, 2019
by
洪国微
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stash
parent
f961eb92
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
364 additions
and
68 deletions
+364
-68
build.gradle
m-audioim/build.gradle
+21
-8
AVRouterImpl.kt
m-audioim/src/main/java/com/ydl/audioim/AVRouterImpl.kt
+8
-8
ExpertInfoBean.java
m-audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
+27
-13
build.gradle
m-confide/build.gradle
+36
-5
AndroidManifest.xml
m-confide/src/main/AndroidManifest.xml
+0
-4
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+22
-8
ConfideConnectResponse.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideConnectResponse.kt
+40
-0
ConnectParamJava.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConnectParamJava.kt
+22
-0
IConfideHomeContract.kt
m-confide/src/main/java/com/ydl/confide/home/contract/IConfideHomeContract.kt
+1
-1
ConfideHomeEventImpl.kt
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
+25
-10
ConfideHomeApi.kt
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeApi.kt
+8
-0
ConfideHomeHttpImpl.kt
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeHttpImpl.kt
+11
-0
IConfideHomeHttp.kt
m-confide/src/main/java/com/ydl/confide/home/http/IConfideHomeHttp.kt
+6
-0
ConfideHomePresenterImpl.kt
m-confide/src/main/java/com/ydl/confide/home/presenter/ConfideHomePresenterImpl.kt
+4
-4
ConfideHomeFilterView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeFilterView.kt
+1
-1
PhoneCallImp.kt
m-confide/src/main/java/com/ydl/confide/router/PhoneCallImp.kt
+12
-1
PhoneCallIn.kt
m-confide/src/main/java/com/ydl/confide/router/PhoneCallIn.kt
+2
-0
platform_ic_arrow_drop_down_green_18dp.png
m-confide/src/main/res/drawable/platform_ic_arrow_drop_down_green_18dp.png
+0
-0
view_empty.xml
m-confide/src/main/res/layout/view_empty.xml
+5
-0
confidehome_banner.xml
m-confide/src/main/res/layouts/confidehome/layout/confidehome_banner.xml
+1
-1
confidehome_banner_view.xml
m-confide/src/main/res/layouts/confidehome/layout/confidehome_banner_view.xml
+1
-1
confidehome_category_view.xml
m-confide/src/main/res/layouts/confidehome/layout/confidehome_category_view.xml
+2
-2
confidehome_home_activity.xml
m-confide/src/main/res/layouts/confidehome/layout/confidehome_home_activity.xml
+3
-1
colors.xml
m-confide/src/main/res/values/colors.xml
+6
-0
dimens.xml
m-confide/src/main/res/values/dimens.xml
+100
-0
No files found.
m-audioim/build.gradle
View file @
612b796e
...
...
@@ -9,13 +9,17 @@ kapt {
}
}
android
{
compileSdkVersion
rootProject
.
ext
.
android
[
"compileSdkVersion"
]
buildToolsVersion
rootProject
.
ext
.
android
[
"buildToolsVersion"
]
// compileSdkVersion rootProject.ext.android["compileSdkVersion"]
// buildToolsVersion rootProject.ext.android["buildToolsVersion"]
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
defaultConfig
{
minSdkVersion
rootProject
.
ext
.
android
[
"minSdkVersion"
]
targetSdkVersion
rootProject
.
ext
.
android
[
"targetSdkVersion"
]
// minSdkVersion rootProject.ext.android["minSdkVersion"]
// targetSdkVersion rootProject.ext.android["targetSdkVersion"]
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
1
versionName
"1.0"
...
...
@@ -30,13 +34,13 @@ android {
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
buildConfigField
"String"
,
"AGORA_APPID"
,
"3387e9b251f3491e9221a9877e8f7830"
buildConfigField
"String"
,
"AGORA_APPID"
,
'"3387e9b251f3491e9221a9877e8f7830"'
}
debug
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
buildConfigField
"String"
,
"AGORA_APPID"
,
"13b1536698f64905a1e7e5bb978ba821"
buildConfigField
"String"
,
"AGORA_APPID"
,
'"13b1536698f64905a1e7e5bb978ba821"'
}
}
publishNonDefault
true
...
...
@@ -57,10 +61,19 @@ dependencies {
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt
"com.alibaba:arouter-compiler:$arouter_compiler"
implementation
project
(
":ydl-platform"
)
api
"com.alibaba:arouter-api:$arouter_api"
implementation
(
'com.ydl:ydl-av:1.1.8@aar'
){
transitive
=
true
}
implementation
project
(
":ydl-webview"
)
// implementation project(":ydl-webview")
// implementation project(":ydl-platform")
implementation
'com.ydl:ydl-webview:0.0.14@aar'
implementation
(
'com.ydl:ydl-platform:0.0.11@aar'
)
{
transitive
=
true
// exclude group: 'com.ydl', module: 'ydl-utils'
// exclude group: 'com.ydl', module: 'ydl-js'
// exclude group: 'com.ydl', module: 'ydl-pushagent'
}
}
m-audioim/src/main/java/com/ydl/audioim/AVRouterImpl.kt
View file @
612b796e
package
com.ydl.audioim
import
com.ydl.audioim.api.IAVRouter
//
import com.ydl.audioim.api.IAVRouter
class
AVRouterImpl
:
IAVRouter
{
override
fun
loginAgora
(
userId
:
String
?)
{
YDLavManager
.
instances
.
login
(
userId
)
}
}
\ No newline at end of file
//class AVRouterImpl: IAVRouter {
// override fun loginAgora(userId: String?) {
// YDLavManager.instances.login(userId)
// }
//
//}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
View file @
612b796e
...
...
@@ -8,17 +8,31 @@ package com.ydl.audioim.bean;
* @date 2018/11/10
*/
public
class
ExpertInfoBean
{
public
String
expertHeadUrl
;
//专家头像地址
public
String
expertName
;
//专家姓名
public
String
expertTips
;
//专家文案
public
String
token
;
//token
public
String
signalToken
;
//信令
public
String
listenerUid
;
//聆听者UID
public
int
listenerStatus
;
//1 空闲 2 倾听中(只用这个字段判断老师状态,下面两个字段都不用)
public
String
listenerIsOpen
;
//1 开启 2 关闭
public
String
listenOrderStatus
;
//1未链接2连接中3连接失败4连接成功
public
String
channelId
;
//声网点对点聊天房间id
public
String
remainingTime
;
//倾诉剩余时长(时长单位s,eg:剩余2min15s,返回135)
public
String
totalDuration
;
//总时长
public
String
commentUrl
;
//评价页URL
public
String
expertHeadUrl
;
public
String
expertName
;
public
String
expertTips
;
public
String
token
;
public
String
signalToken
;
public
String
listenerUid
;
public
int
listenerStatus
;
public
String
listenerIsOpen
;
public
String
listenOrderStatus
;
public
String
channelId
;
public
ExpertInfoBean
.
ListenRemainingTime
remainingTime
;
public
String
totalDuration
;
public
String
commentUrl
;
public
ExpertInfoBean
()
{
}
public
static
class
ListenRemainingTime
{
public
String
remainingTime
;
public
ListenRemainingTime
()
{
}
public
ListenRemainingTime
(
String
remainingTime
)
{
this
.
remainingTime
=
remainingTime
;
}
}
}
m-confide/build.gradle
View file @
612b796e
...
...
@@ -9,13 +9,18 @@ kapt {
}
android
{
compileSdkVersion
rootProject
.
ext
.
android
[
"compileSdkVersion"
]
buildToolsVersion
rootProject
.
ext
.
android
[
"buildToolsVersion"
]
// compileSdkVersion rootProject.ext.android["compileSdkVersion"]
// buildToolsVersion rootProject.ext.android["buildToolsVersion"]
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
defaultConfig
{
minSdkVersion
rootProject
.
ext
.
android
[
"minSdkVersion"
]
targetSdkVersion
rootProject
.
ext
.
android
[
"targetSdkVersion"
]
// minSdkVersion rootProject.ext.android["minSdkVersion"]
// targetSdkVersion rootProject.ext.android["targetSdkVersion"]
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles
'consumer-rules.pro'
...
...
@@ -24,9 +29,17 @@ android {
}
buildTypes
{
debug
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
buildConfigField
"String"
,
"AGORA_APPID"
,
'"13b1536698f64905a1e7e5bb978ba821"'
}
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
buildConfigField
"String"
,
"AGORA_APPID"
,
'"3387e9b251f3491e9221a9877e8f7830"'
}
}
...
...
@@ -36,6 +49,12 @@ android {
xlzx
{}
}
//设置JDK1.8
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
sourceSets
{
main
{
res
.
srcDirs
=
[
...
...
@@ -62,6 +81,18 @@ dependencies {
api
"com.alibaba:arouter-api:$arouter_api"
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt
"com.alibaba:arouter-compiler:$arouter_compiler"
implementation
project
(
":ydl-platform"
)
implementation
'com.alibaba:fastjson:1.2.38'
api
project
(
':m-audioim'
)
implementation
'com.ydl:router:1.0.0-SNAPSHOT@aar'
// implementation project(":ydl-platform")
implementation
(
'com.ydl:ydl-platform:0.0.11@aar'
)
{
transitive
=
true
// exclude group: 'com.ydl', module: 'ydl-utils'
// exclude group: 'com.ydl', module: 'ydl-js'
// exclude group: 'com.ydl', module: 'ydl-pushagent'
}
api
'com.ydl:ydl-media:0.0.1@aar'
}
m-confide/src/main/AndroidManifest.xml
View file @
612b796e
...
...
@@ -2,13 +2,9 @@
package=
"com.ydl.confide"
>
<application>
<activity
android:name=
".PhoneCallActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".home.ConfideHomeActivity"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
"com.yidianling.phonecall.order.DownOrderActivity"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
612b796e
...
...
@@ -24,10 +24,15 @@ import com.ydl.confide.home.listener.ConfideHomeRecycleViewListener
import
com.ydl.confide.home.listener.ConfideHomeRecyleSuspendListener
import
com.ydl.confide.home.presenter.ConfideHomePresenterImpl
import
com.ydl.confide.home.util.ConfideHomeUtils
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.utils.UMEventUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.DrawableRightTextView
import
com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import
com.yidianling.router.RouterManager
import
kotlinx.android.synthetic.main.confidehome_home_activity.*
import
kotlinx.android.synthetic.main.confidehome_title_bar.*
/**
* @author yuanwai
...
...
@@ -37,12 +42,21 @@ import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
* @date 2018/8/10
*/
@Route
(
path
=
"/confide/home"
)
class
ConfideHomeActivity
:
BaseLceActivity
<
IConfideHomeContract
.
View
,
IConfideHomeContract
.
Presenter
>(),
XRecyclerView
.
LoadingListener
{
class
ConfideHomeActivity
:
BaseLceActivity
<
IConfideHomeContract
.
View
,
IConfideHomeContract
.
Presenter
>(),
IConfideHomeContract
.
View
,
XRecyclerView
.
LoadingListener
{
override
fun
loadData
()
{
override
fun
getContentViewId
():
Int
{
return
R
.
id
.
rv_list
}
override
fun
getStateViewId
():
Int
{
}
override
fun
reLoadData
()
{
}
//是否从启动页直接进入
var
isSplash
:
Boolean
=
false
/**
...
...
@@ -96,7 +110,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
override
fun
createPresenter
():
IConfideHomeContract
.
Presenter
{
return
ConfideHomePresenterImpl
(
this
)
return
ConfideHomePresenterImpl
()
}
override
fun
layoutResId
():
Int
{
...
...
@@ -110,7 +124,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//重置页
page
=
2
allFiltersBean
!!
.
page
=
page
p
resenter
.
confideHomeRequest
()
mP
resenter
.
confideHomeRequest
()
}
/**
...
...
@@ -129,7 +143,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//显示加载中
showProgressDialog
()
allFiltersBean
!!
.
notInUid
=
ArrayList
()
p
resenter
.
recommendList
(
ConfideHomeUtils
.
createParam
(
allFiltersBean
!!
))
mP
resenter
.
recommendList
(
ConfideHomeUtils
.
createParam
(
allFiltersBean
!!
))
}
else
if
(
page
>
1
)
{
var
listData
=
mConfideAdapter
?.
getList
()
var
notUidList
=
ArrayList
<
Int
>()
...
...
@@ -144,7 +158,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
}
allFiltersBean
!!
.
notInUid
=
notUidList
p
resenter
.
recommendListMore
(
ConfideHomeUtils
.
createParam
(
allFiltersBean
!!
))
mP
resenter
.
recommendListMore
(
ConfideHomeUtils
.
createParam
(
allFiltersBean
!!
))
}
}
...
...
@@ -160,7 +174,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//显示加载中
// showProgressDialog()
//加载本地缓存
p
resenter
.
loadLocalData
(
this
)
mP
resenter
.
loadLocalData
(
this
)
initClick
()
initQuickConsultDialog
()
...
...
@@ -479,7 +493,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
rv_list
.
visibility
=
View
.
VISIBLE
}
override
fun
showError
(
msg
:
String
?)
{
override
fun
showError
1
(
msg
:
String
?)
{
rv_list
.
loadMoreComplete
()
msg
?.
let
{
...
...
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideConnectResponse.kt
0 → 100644
View file @
612b796e
package
com.ydl.confide.home.bean
import
com.ydl.audioim.bean.ExpertInfoBean
/**
* 倾诉连接响应数据
*/
class
ConfideConnectResponse
{
var
dialDetail
:
DialDetail
?
=
null
var
listenOrderId
:
Long
?
=
0
//订单ID
var
callId
:
String
?
=
null
//
var
payId
:
String
?=
null
//支付ID
var
payTitle
:
String
?
=
null
//支付标题
var
listenOrderPrice
:
Double
?
=
null
//订单金额
var
userBaseInfoRespDto
:
UserBaseInfoRespDto
?=
null
var
coupon
:
CouponData
?
=
null
//优惠信息
}
class
DialDetail
{
var
agoraExpertInfo
:
ExpertInfoBean
?
=
null
var
callConnectType
:
Int
?
=
null
var
dialReason
:
String
?
=
null
//连接失败原因
var
dialStatus
:
Int
?
=
null
//连接状态
var
phoneNu
:
String
?=
null
//axb号码
}
class
UserBaseInfoRespDto
{
var
availableMoney
:
Double
?
=
null
var
companyMoney
:
Double
?
=
null
var
doctorId
:
Long
?
=
null
var
phone
:
Long
?
=
null
var
userType
:
String
?=
null
}
class
CouponData
{
var
couponMoney
:
Double
?
=
0.00
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/bean/ConnectParamJava.kt
0 → 100644
View file @
612b796e
package
com.ydl.confide.home.bean
import
com.ydl.ydlcommon.data.http.BaseCommand
/**
* author : harvie
* e-mail : zhangwch@yidianling.com
* time : 2018/03/08
*/
class
ConnectParamJava
:
BaseCommand
{
var
id
:
String
=
"0"
//倾诉id
var
type
:
String
=
"1"
//1 走AxB 2双呼 3声网
constructor
()
:
super
()
constructor
(
id
:
String
,
type
:
String
)
:
super
()
{
this
.
id
=
id
this
.
type
=
type
}
}
m-confide/src/main/java/com/ydl/confide/home/contract/IConfideHomeContract.kt
View file @
612b796e
...
...
@@ -77,7 +77,7 @@ interface IConfideHomeContract{
/**
* 显示错误信息
*/
fun
showError
(
msg
:
String
?)
fun
showError
1
(
msg
:
String
?)
fun
getContext
()
:
Context
...
...
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
View file @
612b796e
...
...
@@ -2,10 +2,12 @@ package com.ydl.confide.home.event
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.support.v7.app.AppCompatActivity
import
android.text.TextUtils
import
android.view.View
import
com.ydl.confide.home.ConfideHomeActivity
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.yidianling.common.tools.ToastUtil
...
...
@@ -21,9 +23,16 @@ import com.ydl.confide.home.popwindow.ConfideHomeSortPopupWindow
import
com.ydl.confide.home.util.ConfideHomeUtils
import
com.ydl.confide.home.widget.ConfideHomeFilterView
import
com.ydl.confide.router.PhoneCallIn
import
com.ydl.media.audio.AudioPlayer
import
com.ydl.media.audio.model.Music
import
com.ydl.media.view.PlayerFloatHelper
import
com.ydl.media.view.PlayerFloatView
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.UMEventUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.router.RouterManager
import
com.yidianling.router.im.IMRequestCallback
/**
* @author yuanwai
...
...
@@ -152,7 +161,9 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
//埋点
UMEventUtils
.
umEvent
(
"听声寻人点击"
,
"图片点击"
,
"图片点击"
)
YDLMusicHelper
.
confidePlay
(
playUrl
)
val
mu
=
Music
()
mu
.
path
=
playUrl
AudioPlayer
.
get
().
singlePlay
(
mu
)
umengPlayVoice
(
type
)
confideHomeView
.
updataPlayStatu
(
type
,
index
!!
,
0
,
true
)
initCache
(
type
,
index
!!
,
0
,
playUrl
)
...
...
@@ -160,10 +171,12 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
}
override
fun
playVoice
(
type
:
Int
?,
index
:
Int
?,
recommendId
:
Int
,
playUrl
:
String
?,
name
:
String
?)
{
YDLMusicHelper
.
name
=
name
YDLMusicHelper
.
confidePlay
(
playUrl
)
val
mu
=
Music
()
mu
.
title
=
name
mu
.
path
=
playUrl
AudioPlayer
.
get
().
singlePlay
(
mu
)
if
(
PlayerFloatHelper
.
isShow
(
mContext
!!
))
{
if
(
YDLMusicHelper
.
playType
==
1
)
{
if
(
AudioPlayer
.
get
().
playMode
.
value
()
==
1
)
{
PlayerFloatHelper
.
removeView
(
mContext
!!
)
PlayerFloatHelper
.
show
(
mContext
!!
)
...
...
@@ -242,7 +255,7 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
if
(
TextUtils
.
isEmpty
(
cachePlayUrl
))
{
return
}
YDLMusicHelper
.
start
()
AudioPlayer
.
get
().
playPause
()
confideHomeView
.
updataPlayStatu
(
cacheType
,
cacheIndex
!!
,
cacheSubIndex
,
true
)
}
...
...
@@ -250,7 +263,7 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* 暂停播放音频文件
*/
override
fun
pauseVoice
()
{
YDLMusicHelper
.
p
ause
()
AudioPlayer
.
get
().
playP
ause
()
PlayerFloatHelper
.
updatePlayState
()
//因为9999 类型不存在 所以就能把状态全部置为暂停状态了 偷个懒
confideHomeView
.
updataPlayStatu
(
9999
,
0
,
0
,
false
)
...
...
@@ -258,8 +271,8 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
override
fun
destoryPlayer
()
{
PlayerFloatHelper
.
hide
()
YDLMusicHelper
.
clearTempData
()
YDLMusicHelper
.
stop
()
PlayerFloatHelper
.
playTempData
=
hashMapOf
<
String
,
String
>
()
AudioPlayer
.
get
().
stopPlayer
()
floatViewClickListener
?.
let
{
PlayerFloatHelper
.
removeClickListener
(
it
)
};
}
...
...
@@ -310,9 +323,11 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
if
(
"listen"
==
uri
.
host
)
{
var
tabIndex
=
uri
.
getQueryParameter
(
"type"
)
if
(
TextUtils
.
isEmpty
(
tabIndex
))
{
PhoneCallActivity
.
start
(
mContext
!!
)
val
intent1
=
Intent
(
mContext
,
ConfideHomeActivity
::
class
.
java
)
mContext
?.
startActivity
(
intent1
)
}
else
{
PhoneCallActivity
.
start
(
mContext
!!
,
tabIndex
.
toInt
())
val
intent1
=
Intent
(
mContext
,
ConfideHomeActivity
::
class
.
java
)
mContext
?.
startActivity
(
intent1
)
}
}
}
else
if
(
linkUrl
.
startsWith
(
"http"
))
{
...
...
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeApi.kt
View file @
612b796e
package
com.ydl.confide.home.http
import
com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.confide.home.bean.ConfideHomeDataBean
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
...
...
@@ -7,6 +8,7 @@ import com.ydl.ydlcommon.data.http.BaseAPIResponse
import
io.reactivex.Observable
import
retrofit2.http.GET
import
retrofit2.http.Headers
import
retrofit2.http.QueryMap
import
retrofit2.http.Url
/**
...
...
@@ -26,4 +28,9 @@ interface ConfideHomeApi{
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
fun
recommedChange
(
@Url
url
:
String
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
//连接-java接口
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"auth/listen/dial"
)
fun
connectJava
(
@QueryMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/http/ConfideHomeHttpImpl.kt
View file @
612b796e
package
com.ydl.confide.home.http
import
com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.confide.home.bean.ConfideHomeDataBean
import
com.ydl.confide.home.bean.ConnectParamJava
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.RxUtils
...
...
@@ -62,4 +64,12 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{
confideHomeApi
.
recommedChange
(
HttpConfig
.
SERVER_API_JAVA_URL
+
"auth/listen/search?"
+
confideParam
)
}
}
override
fun
connectionJava
(
connectParam
:
ConnectParamJava
):
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
{
return
RxUtils
.
mapObservable
(
connectParam
)
.
flatMap
{
it
->
YDLHttpUtils
.
obtainApi
(
ConfideHomeApi
::
class
.
java
).
connectJava
(
it
)
}
}
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/http/IConfideHomeHttp.kt
View file @
612b796e
package
com.ydl.confide.home.http
import
com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.confide.home.bean.ConfideHomeDataBean
import
com.ydl.confide.home.bean.ConnectParamJava
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
io.reactivex.Observable
...
...
@@ -21,4 +23,7 @@ interface IConfideHomeHttp{
* 为你推荐列表
*/
fun
recommendList
(
param
:
ConfideRecommendParam
):
Observable
<
BaseAPIResponse
<
ConfideHomeDataBean
>>
//倾诉链接,java接口,支持axb和声网
fun
connectionJava
(
connectParam
:
ConnectParamJava
)
:
Observable
<
BaseAPIResponse
<
ConfideConnectResponse
>>
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/presenter/ConfideHomePresenterImpl.kt
View file @
612b796e
...
...
@@ -119,7 +119,7 @@ class ConfideHomePresenterImpl : BasePresenter<IConfideHomeContract.View,IConfid
*/
override
fun
recommendList
(
param
:
ConfideRecommendParam
)
{
if
(!
RxNetTool
.
isConnected
(
mView
.
getContext
())){
mView
.
showError
(
"网络不给力"
)
mView
.
showError
1
(
"网络不给力"
)
return
}
val
disposable
=
mModel
.
recommendList
(
param
)
...
...
@@ -130,7 +130,7 @@ class ConfideHomePresenterImpl : BasePresenter<IConfideHomeContract.View,IConfid
mView
.
recommendListResponse
(
it
)
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
mView
.
showError
(
msg
)
mView
.
showError
1
(
msg
)
}
})
}
...
...
@@ -140,7 +140,7 @@ class ConfideHomePresenterImpl : BasePresenter<IConfideHomeContract.View,IConfid
*/
override
fun
recommendListMore
(
param
:
ConfideRecommendParam
)
{
if
(!
RxNetTool
.
isConnected
(
mView
.
getContext
())){
mView
.
showError
(
"网络不给力"
)
mView
.
showError
1
(
"网络不给力"
)
return
}
val
disposable
=
mModel
.
recommendList
(
param
)
...
...
@@ -151,7 +151,7 @@ class ConfideHomePresenterImpl : BasePresenter<IConfideHomeContract.View,IConfid
mView
.
recommendListMoreResponse
(
it
)
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
mView
.
showError
(
msg
)
mView
.
showError
1
(
msg
)
}
})
}
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeFilterView.kt
View file @
612b796e
...
...
@@ -82,7 +82,7 @@ class ConfideHomeFilterView(mContext: Context, @Nullable attrs: AttributeSet?, d
}
private
fun
setDrawableRight
(
textView
:
DrawableRightTextView
){
var
drawable
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
ic_arrow_drop_down_grey_500_18dp
)
var
drawable
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
platform_
ic_arrow_drop_down_grey_500_18dp
)
// 这一步必须要做,否则不会显示.
drawable
.
setBounds
(
0
,
0
,
drawable
.
minimumWidth
,
drawable
.
minimumHeight
)
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawable
,
null
)
...
...
m-confide/src/main/java/com/ydl/confide/router/PhoneCallImp.kt
View file @
612b796e
...
...
@@ -3,10 +3,21 @@ package com.ydl.confide.router
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
com.ydl.confide.api.IPhoneCallRouter
import
android.support.v4.app.DialogFragment
import
com.ydl.confide.home.ConfideHomeActivity
import
com.yidianling.router.phoneCall.IPhoneCallRouter
class
PhoneCallImp
:
IPhoneCallRouter
{
override
fun
phoneCallFragment
(
head
:
String
,
callId
:
String
):
DialogFragment
{
//废弃
return
DialogFragment
()
}
override
fun
phoneCallIntent
(
activity
:
Activity
):
Intent
{
//废弃
val
intent
=
Intent
(
activity
,
ConfideHomeActivity
::
class
.
java
)
return
intent
}
override
fun
openConfideHome
(
context
:
Context
)
{
val
intent
=
Intent
(
context
,
ConfideHomeActivity
::
class
.
java
)
...
...
m-confide/src/main/java/com/ydl/confide/router/PhoneCallIn.kt
View file @
612b796e
...
...
@@ -3,6 +3,8 @@ package com.ydl.confide.router
import
android.app.Activity
import
android.content.Intent
import
android.support.v7.app.AppCompatActivity
import
com.yidianling.router.RouterManager
import
com.yidianling.router.user.UserResponse
/**
* author : Zhangwenchao
...
...
m-confide/src/main/res/drawable/platform_ic_arrow_drop_down_green_18dp.png
0 → 100644
View file @
612b796e
2.83 KB
m-confide/src/main/res/layout/view_empty.xml
0 → 100644
View file @
612b796e
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.Space
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"0px"
/>
\ No newline at end of file
m-confide/src/main/res/layouts/confidehome/layout/confidehome_banner.xml
View file @
612b796e
...
...
@@ -6,7 +6,7 @@
android:layout_height=
"wrap_content"
android:background=
"@color/white"
>
<com.y
idianling
.ydlcommon.view.banner.Banner
<com.y
dl
.ydlcommon.view.banner.Banner
android:id=
"@+id/confide_home_banner"
android:layout_width=
"match_parent"
android:layout_height=
"145dp"
...
...
m-confide/src/main/res/layouts/confidehome/layout/confidehome_banner_view.xml
View file @
612b796e
...
...
@@ -11,7 +11,7 @@
android:layout_marginTop=
"@dimen/dp_10"
android:layout_height=
"160dp"
android:layout_marginBottom=
"20dp"
>
<com.y
idianling
.ydlcommon.view.banner.Banner
<com.y
dl
.ydlcommon.view.banner.Banner
android:id=
"@+id/banner"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
...
...
m-confide/src/main/res/layouts/confidehome/layout/confidehome_category_view.xml
View file @
612b796e
...
...
@@ -2,7 +2,7 @@
<merge
android:layout_width=
"match_parent"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<com.y
idianling.phonecall
.home.widget.ConfideHomeCategoryItemView
<com.y
dl.confide
.home.widget.ConfideHomeCategoryItemView
android:id=
"@+id/v_item1"
android:layout_width=
"0px"
android:layout_marginLeft=
"@dimen/dp_15"
...
...
@@ -12,7 +12,7 @@
android:layout_weight=
"1"
app:cardCornerRadius=
"6dp"
app:cardElevation=
"1dp"
/>
<com.y
idianling.phonecall
.home.widget.ConfideHomeCategoryItemView
<com.y
dl.confide
.home.widget.ConfideHomeCategoryItemView
android:id=
"@+id/v_item2"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/dp_19"
...
...
m-confide/src/main/res/layouts/confidehome/layout/confidehome_home_activity.xml
View file @
612b796e
...
...
@@ -60,11 +60,12 @@
android:background=
"#80000000"
android:visibility=
"gone"
/>
<com.y
idianling.phonecall
.home.widget.ConfideHomeFilterView
<com.y
dl.confide
.home.widget.ConfideHomeFilterView
android:id=
"@+id/v_filterView"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:layout_marginTop=
"48dp"
android:background=
"@color/white"
android:visibility=
"gone"
/>
</RelativeLayout>
\ No newline at end of file
m-confide/src/main/res/values/colors.xml
0 → 100644
View file @
612b796e
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"new_divide_color"
>
#f0f0f0
</color>
</resources>
\ No newline at end of file
m-confide/src/main/res/values/dimens.xml
0 → 100644
View file @
612b796e
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<!--分割线粗细-->
<dimen
name=
"divide_line_stroke_width"
>
0.5dp
</dimen>
<!--距离部分-->
<dimen
name=
"default_dis_size_nano"
>
2dp
</dimen>
<dimen
name=
"default_dis_size_micro"
>
4dp
</dimen>
<dimen
name=
"default_dis_size_small"
>
6dp
</dimen>
<dimen
name=
"default_dis_size"
>
8dp
</dimen>
<dimen
name=
"default_dis_size_big"
>
10dp
</dimen>
<dimen
name=
"default_dis_size_large"
>
12dp
</dimen>
<dimen
name=
"default_dis_size_huge"
>
14dp
</dimen>
<dimen
name=
"default_dis_size_huge_more"
>
16dp
</dimen>
<!--字体大小部分-->
<dimen
name=
"default_text_size_micro"
>
8sp
</dimen>
<dimen
name=
"default_text_size_little"
>
10sp
</dimen>
<dimen
name=
"default_text_size_small"
>
12sp
</dimen>
<dimen
name=
"default_text_size"
>
14sp
</dimen>
<dimen
name=
"default_text_size_big"
>
16sp
</dimen>
<dimen
name=
"default_text_size_large"
>
18sp
</dimen>
<!--TitleBar高度-->
<dimen
name=
"title_bar_height"
>
45dp
</dimen>
<dimen
name=
"action_bar_height"
>
48dip
</dimen>
<!--JumpTextView部分-->
<dimen
name=
"jump_text_view_min_height"
>
55dp
</dimen>
<dimen
name=
"jump_text_view_icon_size"
>
25dp
</dimen>
<!-- dialog -->
<dimen
name=
"normal_text_size"
>
16sp
</dimen>
<dimen
name=
"big_text_size"
>
17sp
</dimen>
<dimen
name=
"light_line_size"
>
1px
</dimen>
<dimen
name=
"dialog_padding_vertical"
>
20dip
</dimen>
<dimen
name=
"custom_dialog_padding_vertical"
>
15dip
</dimen>
<dimen
name=
"dark_line_size"
>
3px
</dimen>
<dimen
name=
"dialog_text_margin_horizontal"
>
15dip
</dimen>
<dimen
name=
"very_samll_text_size"
>
9sp
</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen
name=
"activity_horizontal_margin"
>
16dp
</dimen>
<dimen
name=
"activity_vertical_margin"
>
16dp
</dimen>
<!--动态-->
<!--顶部title Size-->
<dimen
name=
"title_height"
>
45dp
</dimen>
<dimen
name=
"title_txt_sp"
>
20sp
</dimen>
<!-- map -->
<dimen
name=
"chatroom_head_height"
>
200dp
</dimen>
<dimen
name=
"dp_1"
>
1dp
</dimen>
<dimen
name=
"dp_2"
>
2dp
</dimen>
<dimen
name=
"dp_3"
>
3dp
</dimen>
<dimen
name=
"dp_4"
>
4dp
</dimen>
<dimen
name=
"dp_5"
>
5dp
</dimen>
<dimen
name=
"dp_6"
>
6dp
</dimen>
<dimen
name=
"dp_7"
>
7dp
</dimen>
<dimen
name=
"dp_8"
>
8dp
</dimen>
<dimen
name=
"dp_9"
>
9dp
</dimen>
<dimen
name=
"dp_10"
>
10dp
</dimen>
<dimen
name=
"dp_11"
>
11dp
</dimen>
<dimen
name=
"dp_12"
>
12dp
</dimen>
<dimen
name=
"dp_13"
>
13dp
</dimen>
<dimen
name=
"dp_14"
>
14dp
</dimen>
<dimen
name=
"dp_15"
>
15dp
</dimen>
<dimen
name=
"dp_16"
>
16dp
</dimen>
<dimen
name=
"dp_17"
>
17dp
</dimen>
<dimen
name=
"dp_18"
>
18dp
</dimen>
<dimen
name=
"dp_19"
>
19dp
</dimen>
<dimen
name=
"dp_20"
>
20dp
</dimen>
<dimen
name=
"dp_21"
>
21dp
</dimen>
<dimen
name=
"dp_22"
>
22dp
</dimen>
<dimen
name=
"dp_23"
>
23dp
</dimen>
<dimen
name=
"dp_24"
>
24dp
</dimen>
<dimen
name=
"dp_25"
>
25dp
</dimen>
<dimen
name=
"dp_26"
>
26dp
</dimen>
<dimen
name=
"dp_27"
>
27dp
</dimen>
<dimen
name=
"dp_28"
>
28dp
</dimen>
<dimen
name=
"dp_29"
>
29dp
</dimen>
<dimen
name=
"dp_30"
>
30dp
</dimen>
<dimen
name=
"dp_31"
>
31dp
</dimen>
<dimen
name=
"dp_32"
>
32dp
</dimen>
<dimen
name=
"dp_33"
>
33dp
</dimen>
<dimen
name=
"dp_34"
>
34dp
</dimen>
<dimen
name=
"dp_35"
>
35dp
</dimen>
<dimen
name=
"dp_36"
>
36dp
</dimen>
<dimen
name=
"dp_37"
>
37dp
</dimen>
<dimen
name=
"dp_38"
>
38dp
</dimen>
<dimen
name=
"dp_48"
>
48dp
</dimen>
<dimen
name=
"dp_60"
>
60dp
</dimen>
<dimen
name=
"dp_64"
>
64dp
</dimen>
<dimen
name=
"dp_88"
>
88dp
</dimen>
<dimen
name=
"dp_99"
>
99dp
</dimen>
<dimen
name=
"dp_115"
>
115dp
</dimen>
<dimen
name=
"dp_127"
>
127dp
</dimen>
</resources>
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