Commit 14134f56 by 严久程

动态bug修复

im模块4.0.20内容增加
basecommand字段修改
parents ca3a5007 c0d6d99e
...@@ -20,7 +20,9 @@ class DemoModel : BaseModel(), DemoContract.Model { ...@@ -20,7 +20,9 @@ class DemoModel : BaseModel(), DemoContract.Model {
return YDLHttpUtils.obtainApi(DemoService::class.java) return YDLHttpUtils.obtainApi(DemoService::class.java)
.getFMData() .getFMData()
.compose(RxUtils.resultJavaData()) .compose(RxUtils.resultJavaData())
.map {
throw RuntimeException("runtime exception")
}
} }
override fun getHome(): Observable<JsonObject> { override fun getHome(): Observable<JsonObject> {
......
...@@ -7,6 +7,7 @@ import com.ydl.media.audio.AudioPlayer ...@@ -7,6 +7,7 @@ import com.ydl.media.audio.AudioPlayer
import com.ydl.media.audio.model.Music import com.ydl.media.audio.model.Music
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.mvp.base.BasePresenter import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlnet.client.observer.CommonObserver import com.ydl.ydlnet.client.observer.CommonObserver
/** /**
...@@ -21,15 +22,18 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(), ...@@ -21,15 +22,18 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(),
.compose(RxUtils.applySchedulers(mView)) .compose(RxUtils.applySchedulers(mView))
.subscribe(object : CommonObserver<HomeFMBean>() { .subscribe(object : CommonObserver<HomeFMBean>() {
override fun onError(errorMsg: String) { override fun onError(errorMsg: String) {
LogUtil.d("RxJava loadUsers ---->: $errorMsg")
} }
override fun onSuccess(homeFMBean: HomeFMBean) { override fun onSuccess(homeFMBean: HomeFMBean) {
throw RuntimeException("runtime exception")
homeFMBean.list?.let { homeFMBean.list?.let {
AudioPlayer.get().addPlayList(stringToMusicPlayerList(it)) AudioPlayer.get().addPlayList(stringToMusicPlayerList(it))
mView.setData("") mView.setData("")
} }
} }
}) })
} }
override fun loadHome() = mModel.getHome() override fun loadHome() = mModel.getHome()
...@@ -52,6 +56,7 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(), ...@@ -52,6 +56,7 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(),
.compose(RxUtils.applySchedulers(mView))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁 .compose(RxUtils.applySchedulers(mView))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁
.subscribe(object : CommonObserver<JsonArray>() { .subscribe(object : CommonObserver<JsonArray>() {
override fun onError(errorMsg: String) { override fun onError(errorMsg: String) {
LogUtil.d("RxJava loadUsers ---->: $errorMsg")
} }
override fun onSuccess(users: JsonArray) { override fun onSuccess(users: JsonArray) {
......
...@@ -44,10 +44,10 @@ ext { ...@@ -44,10 +44,10 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.41.1", "m-confide" : "0.0.41.1",
"m-consultant" : "0.0.51.1", "m-consultant" : "0.0.51.3",
"m-fm" : "0.0.23.3", "m-fm" : "0.0.23.3",
"m-user" : "0.0.40.3", "m-user" : "0.0.40.3",
"m-home" : "0.0.6.6", "m-home" : "0.0.6.18",
"m-muse" : "0.0.20.3", "m-muse" : "0.0.20.3",
"m-tests" : "0.0.15.2", "m-tests" : "0.0.15.2",
......
...@@ -151,7 +151,7 @@ public class ExpertSearchBigShotBean { ...@@ -151,7 +151,7 @@ public class ExpertSearchBigShotBean {
private int id; private int id;
private int parentId; private int parentId;
private int iamgeType; private int imageType;
private int isShow; private int isShow;
private String createTime; private String createTime;
private String updateTime; private String updateTime;
...@@ -174,12 +174,12 @@ public class ExpertSearchBigShotBean { ...@@ -174,12 +174,12 @@ public class ExpertSearchBigShotBean {
this.parentId = parentId; this.parentId = parentId;
} }
public int getIamgeType() { public int getImageType() {
return iamgeType; return imageType;
} }
public void setIamgeType(int iamgeType) { public void setImageType(int iamgeType) {
this.iamgeType = iamgeType; this.imageType = iamgeType;
} }
public int getIsShow() { public int getIsShow() {
......
...@@ -152,7 +152,7 @@ public class ExpertSearchRecommandBean { ...@@ -152,7 +152,7 @@ public class ExpertSearchRecommandBean {
private int id; private int id;
private int parentId; private int parentId;
private int iamgeType; private int imageType;
private int isShow; private int isShow;
private String createTime; private String createTime;
private String updateTime; private String updateTime;
...@@ -175,12 +175,12 @@ public class ExpertSearchRecommandBean { ...@@ -175,12 +175,12 @@ public class ExpertSearchRecommandBean {
this.parentId = parentId; this.parentId = parentId;
} }
public int getIamgeType() { public int getImageType() {
return iamgeType; return imageType;
} }
public void setIamgeType(int iamgeType) { public void setImageType(int iamgeType) {
this.iamgeType = iamgeType; this.imageType = iamgeType;
} }
public int getIsShow() { public int getIsShow() {
......
...@@ -3,5 +3,5 @@ package com.yidianling.consultant.bean ...@@ -3,5 +3,5 @@ package com.yidianling.consultant.bean
class ExpertSearchTopShowBean ( class ExpertSearchTopShowBean (
var doctorSpecialTopics: ArrayList<ExpertSearchBigShotBean>, var doctorSpecialTopics: ArrayList<ExpertSearchBigShotBean>,
var sceneSpecialTopic: ArrayList<ExpertSearchRecommandBean> var sceneSpecialTopics: ArrayList<ExpertSearchRecommandBean>
) )
...@@ -79,7 +79,7 @@ class RecommendListView : LinearLayout { ...@@ -79,7 +79,7 @@ class RecommendListView : LinearLayout {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer { .subscribe(Consumer {
if (null != mContext) { if (null != mContext) {
mSceneSpecialTopicList.addAll(it.sceneSpecialTopic) mSceneSpecialTopicList.addAll(it.sceneSpecialTopics)
mDoctorSpecialTopicsList.addAll(it.doctorSpecialTopics) mDoctorSpecialTopicsList.addAll(it.doctorSpecialTopics)
setData() setData()
} }
......
[{"headerBean":{"askCategoryData":[{"cateId":1,"cateTitle":"恋爱咨询","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/eusz6pcbf8zaou1e.png","url":"https://h2.yidianling.com/experts/search?cat\u003d1\u0026"},{"cateId":1,"cateTitle":"婚姻咨询","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/35kd8ih9fiwgv16r.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":23,"cateTitle":"亲子教育","coverUrl":"https://img.ydlcdn.com/file/2018/09/05/09mwdfydytsdg1gt.png","url":"https://h2.yidianling.com/experts/search?cat\u003d23\u0026"},{"cateId":25,"cateTitle":"人际关系","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/d6xi5o3ii3lsy4yr.png","url":"https://h2.yidianling.com/experts/search?cat\u003d25\u0026"},{"cateId":27,"cateTitle":"情绪压力","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/no02u0gfo1kgzt8y.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":22,"cateTitle":"职场心理","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/ra5tbfuo05upjl66.png","url":"https://h2.yidianling.com/experts/search?cat\u003d22\u0026"},{"cateId":26,"cateTitle":"个人成长","coverUrl":"https://img.ydlcdn.com/file/2018/09/05/ge29bumccrtykv9r.png","url":"https://h2.yidianling.com/experts/search?cat\u003d26\u0026"},{"cateId":229,"cateTitle":"法律咨询","coverUrl":"https://img.ydlcdn.com/file/2019/04/02/ofb8othapbpkb6zx.png","url":"https://h2.yidianling.com/experts/search?cat\u003d229\u0026"},{"cateId":1,"cateTitle":"情感挽回","coverUrl":"https://img.ydlcdn.com/file/2019/04/03/7zhoecx4amc23gah.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":0,"cateTitle":"全部","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/xoo4q3k6irtrhsjc.png","url":"https://h2.yidianling.com/experts/cates"}],"consultCategoryData":[{"id":1,"name":"恋爱咨询"},{"id":1,"name":"婚姻咨询"},{"id":23,"name":"亲子教育"},{"id":25,"name":"人际关系"},{"id":27,"name":"情绪压力"},{"id":22,"name":"职场心理"},{"id":26,"name":"个人成长"}],"doctorName":"","focusList":[{"focId":11405,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/22/b4wgh83z4tr962a0.jpg","imageUrl":"https://img.ydlcdn.com/file/2019/05/22/7z7mzwfnx7zp6ke5.jpg","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fjvyux2jq%22%7D","shareData":{"title":"钟媛媛 明星咨询师推荐","cover":"https://img.ydlcdn.com/file/2019/05/22/7z7mzwfnx7zp6ke5.jpg","desc":"","shareUrl":""},"title":"钟媛媛 明星咨询师推荐"},{"focId":11284,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/17/3wyxa3dqzrrxdema.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/17/jmtc5w1jzzk77hva.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fjtnzsdmg%22%7D","shareData":{"title":"人气咨询师排行榜-壹点灵","cover":"https://img.ydlcdn.com/file/2019/05/17/jmtc5w1jzzk77hva.png","desc":"","shareUrl":""},"title":"人气咨询师排行榜-壹点灵"},{"focId":11130,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/09/eije5jwiyjcyyub6.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/09/5cwmsbzfydshzh92.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fydlaplus1%22%7D","shareData":{"title":"A++融资公告","cover":"https://img.ydlcdn.com/file/2019/05/09/5cwmsbzfydshzh92.png","desc":"","shareUrl":""},"title":"A++融资公告"},{"focId":10853,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/24/pgx73v43ty9zzcn0.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/24/synob5zlakccjcb5.png","linkUrl":"ydl-user://h5/confide?params\u003d%7b%22url%22%3a%22https%3a%2f%2fwebapp2.ydl.com%2factivity%2flisten%2fcoupon%22%7d","shareData":{"title":"128元倾诉新用户活动","cover":"https://img.ydlcdn.com/file/2019/04/24/synob5zlakccjcb5.png","desc":"","shareUrl":""},"title":"128元倾诉新用户活动"},{"focId":10730,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/11/str4mvjunwuul5lq.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/11/jluqy3kasv2fl63b.png","linkUrl":"ydl-user://h5/confide?params\u003d%7b%22url%22%3a%22https%3a%2f%2fh5.ydl.com%2fconfideMatch%22%7d","shareData":{"title":"一键倾诉","cover":"https://img.ydlcdn.com/file/2019/04/11/jluqy3kasv2fl63b.png","desc":"","shareUrl":""},"title":"一键倾诉"},{"focId":10131,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/24/bedrm9rjwflt2vhd.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/24/6n2pb6n6ctipmvux.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwebapp.ydl.com%2Ffe-app-yidianling%2Fcourse%2Fdetail%2F2757%22%7D","shareData":{"title":"【重磅课程】丁Sir说挽回:像心理学家一样去挽回","cover":"https://img.ydlcdn.com/file/2019/04/24/6n2pb6n6ctipmvux.png","desc":"","shareUrl":""},"title":"【重磅课程】丁Sir说挽回:像心理学家一样去挽回"},{"focId":906,"imageIphonex":"https://img.ydlcdn.com/file/2019/01/30/xt55wf76k13c8qb6.png","imageUrl":"https://img.ydlcdn.com/file/2019/01/30/gvca1sh5xg5ao85w.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fct%2Flist%3F%22%7D","shareData":{"title":"免费体验","cover":"https://img.ydlcdn.com/file/2019/01/30/gvca1sh5xg5ao85w.png","desc":"","shareUrl":"https://h2.yidianling.com/ct/list?"},"title":"免费体验"},{"focId":11519,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/27/dc09x8zkkbhyfc21.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/27/v5k0yg761a8qxv25.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fzhiyeceshi%22%7D","shareData":{"title":"职场晋升攻略","cover":"https://img.ydlcdn.com/file/2019/05/27/v5k0yg761a8qxv25.png","desc":"","shareUrl":""},"title":"职场晋升攻略"},{"focId":11133,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/15/bojyl3stwslfgct0.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/15/o5cpxtbgpxv6a7ry.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwjwlkj.wjx.cn%2Fjq%2F39247133.aspx%22%7D","shareData":{"title":"亲密关系问卷","cover":"https://img.ydlcdn.com/file/2019/05/15/o5cpxtbgpxv6a7ry.png","desc":"","shareUrl":""},"title":"亲密关系问卷"},{"focId":9714,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/05/73s6p5r7zk7u6b4u.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/05/1agqihpp9o8w276v.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwebapp.ydl.com%2Ffe-app-yidianling%2Fcourse%2Fdetail%2F3029%22%7D","shareData":{"title":"【【新课推荐】读心术,读懂你的另一半","cover":"https://img.ydlcdn.com/file/2019/04/05/1agqihpp9o8w276v.png","desc":"","shareUrl":""},"title":"【【新课推荐】读心术,读懂你的另一半"}],"homeSaleData":[{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:19:30 PM","doctorId":4422,"doctorName":"段宁","nickName":"y**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F4422%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:22:23 PM","doctorId":9295,"doctorName":"朱礼火","nickName":"老**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F9295%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:30:15 PM","doctorId":5954,"doctorName":"吴杰","nickName":"","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F5954%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:34:51 PM","doctorId":1261,"doctorName":"吴立秀","nickName":"M**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F1261%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:34:53 PM","doctorId":10330,"doctorName":"徐听","nickName":"","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F10330%22%7D"}],"keywordData":[{"id":5,"keyword":"性心理","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%80%A7%26%22%7D"},{"id":2,"keyword":"抑郁","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%8A%91%E9%83%81%26%22%7D"},{"id":3,"keyword":"焦虑","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E7%84%A6%E8%99%91%26%22%7D"},{"id":4,"keyword":"婚姻挽回","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%A9%9A%E5%A7%BB%26%22%7D"},{"id":8,"keyword":"早恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%97%A9%E6%81%8B%26%22%7D"},{"id":6,"keyword":"同性恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%90%8C%E6%80%A7%E6%81%8B%26%22%7D"},{"id":7,"keyword":"出轨","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%87%BA%E8%BD%A8%26%22%7D"},{"id":1,"keyword":"失恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%81%8B%26%22%7D"},{"id":9,"keyword":"情感修复","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch2%3Fsearch_word%3D%E6%83%85%E6%84%9F%E4%BF%AE%E5%A4%8D%26%22%7D"}],"listenCategoryDate":[{"id":1,"name":"恋爱"},{"id":2,"name":"婚姻家庭"},{"id":3,"name":"陪聊治愈"},{"id":4,"name":"情绪压力"},{"id":5,"name":"亲子教育"},{"id":7,"name":"职业"},{"id":8,"name":"人际"},{"id":9,"name":"个人成长"}],"isRealEmpty":false},"type":10001},{"type":10002},{"consultBean":{"endRow":3,"isHasNextPage":false,"isHasPreviousPage":false,"isIsFirstPage":false,"isIsLastPage":false,"list":[{"city":"唐山","doctorHead":"https://img.ydlcdn.com/file/2019/05/10/vw6sx2i72exvbr95.jpg!s120x120","doctorId":1261,"doctorName":"吴立秀","doctorUid":49874,"feedbackRate":5.00,"hUrl":"https://h2.yidianling.com/experts/1261","isOnline":1,"mUrl":"https://m.ydl.com/experts/1261","profesBack":"二级心理咨询师\r\n三级心理咨询师\r\n壹点灵签约心理咨询师\r\n中科院心理研究所心理学研究生在读","province":"河北省","serviceFee":175,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/10/vw6sx2i72exvbr95.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/1261","title":"吴立秀咨询工作室"},"tags":"恋爱情感|婚姻家庭|个人成长","zixunOrderNum":7978},{"city":"温州","doctorHead":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","doctorId":1131,"doctorName":"朱静","doctorUid":34649,"feedbackRate":5.00,"hUrl":"https://h2.yidianling.com/experts/1131","isOnline":1,"mUrl":"https://m.ydl.com/experts/1131","profesBack":"三级心理咨询师","province":"浙江省","serviceFee":250,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/1131","title":"朱静咨询工作室"},"tags":"恋爱婚姻|情绪压力|人际关系","zixunOrderNum":7431},{"city":"苏州","doctorHead":"https://img.ydlcdn.com/file/2019/05/08/vp663mvqvf193phi.jpg!s120x120","doctorId":7387,"doctorName":"钟媛媛","doctorUid":1915807,"feedbackRate":5.00,"hUrl":"https://h2.yidianling.com/experts/7387","isOnline":1,"mUrl":"https://m.ydl.com/experts/7387","profesBack":"三级心理咨询师","province":"江苏省","serviceFee":150,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/08/vp663mvqvf193phi.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/7387","title":"钟媛媛咨询工作室"},"tags":"恋爱婚姻|情绪压力|个人成长","zixunOrderNum":1135}],"navigateFirstPage":1,"navigateLastPage":8,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7,8],"nextPage":2,"pageNum":1,"pageSize":3,"pages":2034,"prePage":0,"size":3,"startRow":1,"total":6100,"isRealEmpty":false},"type":10003},{"courseBean":{"endRow":3,"isHasNextPage":false,"isHasPreviousPage":false,"isIsFirstPage":false,"isIsLastPage":false,"list":[{"applyFee":99.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A2705537%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F12511%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2019/05/25/exkclexoa7ki5v5a.png","hostId":12511,"hostName":"王秀兰","hostUid":2705537,"id":3359,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":81,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":0.0,"pic":"https://img.ydlcdn.com/file/2019/05/19/36btxlb5hlnynn6j.jpg","promotionApplyFee":69.0,"readNums":2195,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/05/19/36btxlb5hlnynn6j.jpg","desc":"27个沟通秘术,让夫妻沟通更顺畅","shareUrl":"https://m.ydl.com/course/3359","title":"男女沟通秘籍,让老公乖乖听话的秘密"},"title":"男女沟通秘籍,让老公乖乖听话的秘密"},{"applyFee":39.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A1334422%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F4304%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2018/05/06/4ab73371ed439a0ac0920af7a6fa04af..jpg","hostId":4304,"hostName":"徐泽旭","hostUid":1334422,"id":3235,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":237,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":99.0,"pic":"https://img.ydlcdn.com/file/2019/04/25/pzehq0yiqpdc76rh.jpg","promotionApplyFee":39.0,"readNums":8909,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/04/25/pzehq0yiqpdc76rh.jpg","desc":"改变负面语言模式,重塑自信人生","shareUrl":"https://m.ydl.com/course/3235","title":"自卑、胆怯、不敢说话?扭转自卑语言,重塑自信人生!"},"title":"自卑、胆怯、不敢说话?扭转自卑语言,重塑自信人生!"},{"applyFee":129.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A2441930%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F9945%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2018/10/10/0xcrep11r0ibykmd.png","hostId":9945,"hostName":"壹点灵|产品研究院","hostUid":2441930,"id":3174,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":337,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":299.0,"pic":"https://img.ydlcdn.com/file/2019/04/18/b3gti2nci9y5oi7a.jpg","promotionApplyFee":0.0,"readNums":3767,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/04/18/b3gti2nci9y5oi7a.jpg","desc":"孩子学习不好是因为注意力不好造成的?!不不不,正确对待注意力缺失,注意力不好也能学习好!","shareUrl":"https://m.ydl.com/course/3174","title":"父母必修课—注意力不好的娃如何更好的成长"},"title":"父母必修课—注意力不好的娃如何更好的成长"}],"navigateFirstPage":1,"navigateLastPage":8,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7,8],"nextPage":2,"pageNum":1,"pageSize":3,"pages":21,"prePage":0,"size":3,"startRow":1,"total":63,"isRealEmpty":false},"type":10004},{"confideBean":{"body":[{"confideAddress":"沈阳","confideConnection":"100%","confideContent":"不必失落,适合自己的人生就是最好的人生。","confideFee":"50","confideHearNum":"已聆听324次","confideLine":3,"confideNum":"324人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://img.ydlcdn.com/file/2019/02/26/0idx62mjf22q9r8y.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/05/07/pxkkwuh1pkeg80bu.jpg!s200x200","confidedId":839,"confidedName":"吴杰","confidedTag":["恋爱婚姻","家庭关系","个人成长"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":5954,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d839","status":2,"tags":"恋爱婚姻,家庭关系,个人成长","uid":1645151},{"confideAddress":"淮安","confideConnection":"100%","confideContent":"用心陪伴,用爱倾听,留下烦恼,带走轻松。","confideFee":"50","confideHearNum":"已聆听1539次","confideLine":1,"confideNum":"1539人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://video.ydlcdn.com/2017/09/11/718dbba7c20d0b4ea1dcf35b024aab51.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/05/a3646cb80aea494682c488e4c22be8fe.jpg!s200x200","confidedId":554,"confidedName":"翟曙霞","confidedTag":["80后","恋爱婚姻","情绪压力","人际关系"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":2353,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d554","status":1,"tags":"80后,恋爱婚姻,情绪压力,人际关系","uid":1085815},{"confideAddress":"","confideConnection":"100%","confideContent":"慢慢地陪着你走,慢慢地听花开的声音","confideFee":"50","confideHearNum":"已聆听272次","confideLine":1,"confideNum":"272人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://img.ydlcdn.com/file/2019/02/26/jxv0beey8ukn5jpc.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/03/30/ewaq0g790zgo6jbn.png!s200x200","confidedId":838,"confidedName":"林岚","confidedTag":["恋爱婚姻","学生成长"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":9433,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d838","status":1,"tags":"恋爱婚姻,学生成长","uid":2327655}],"diviLine":1,"type":5,"isRealEmpty":false},"type":10005},{"testListBean":[{ [{"headerBean":{"askCategoryData":[{"cateId":1,"cateTitle":"恋爱咨询","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/eusz6pcbf8zaou1e.png","url":"https://h2.yidianling.com/experts/search?cat\u003d1\u0026"},{"cateId":1,"cateTitle":"婚姻咨询","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/35kd8ih9fiwgv16r.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":23,"cateTitle":"亲子教育","coverUrl":"https://img.ydlcdn.com/file/2018/09/05/09mwdfydytsdg1gt.png","url":"https://h2.yidianling.com/experts/search?cat\u003d23\u0026"},{"cateId":25,"cateTitle":"人际关系","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/d6xi5o3ii3lsy4yr.png","url":"https://h2.yidianling.com/experts/search?cat\u003d25\u0026"},{"cateId":27,"cateTitle":"情绪压力","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/no02u0gfo1kgzt8y.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":22,"cateTitle":"职场心理","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/ra5tbfuo05upjl66.png","url":"https://h2.yidianling.com/experts/search?cat\u003d22\u0026"},{"cateId":26,"cateTitle":"个人成长","coverUrl":"https://img.ydlcdn.com/file/2018/09/05/ge29bumccrtykv9r.png","url":"https://h2.yidianling.com/experts/search?cat\u003d26\u0026"},{"cateId":229,"cateTitle":"法律咨询","coverUrl":"https://img.ydlcdn.com/file/2019/04/02/ofb8othapbpkb6zx.png","url":"https://h2.yidianling.com/experts/search?cat\u003d229\u0026"},{"cateId":1,"cateTitle":"情感挽回","coverUrl":"https://img.ydlcdn.com/file/2019/04/03/7zhoecx4amc23gah.png","url":"https://h2.yidianling.com/experts/search?cat\u003d27\u0026"},{"cateId":0,"cateTitle":"全部","coverUrl":"https://img.ydlcdn.com/file/2018/08/14/xoo4q3k6irtrhsjc.png","url":"https://h2.yidianling.com/experts/cates"}],"consultCategoryData":[{"id":1,"name":"恋爱咨询"},{"id":1,"name":"婚姻咨询"},{"id":23,"name":"亲子教育"},{"id":25,"name":"人际关系"},{"id":27,"name":"情绪压力"},{"id":22,"name":"职场心理"},{"id":26,"name":"个人成长"}],"doctorName":"","focusList":[{"focId":11405,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/22/b4wgh83z4tr962a0.jpg","imageUrl":"https://img.ydlcdn.com/file/2019/05/22/7z7mzwfnx7zp6ke5.jpg","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fjvyux2jq%22%7D","shareData":{"title":"钟媛媛 明星咨询师推荐","cover":"https://img.ydlcdn.com/file/2019/05/22/7z7mzwfnx7zp6ke5.jpg","desc":"","shareUrl":""},"title":"钟媛媛 明星咨询师推荐"},{"focId":11284,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/17/3wyxa3dqzrrxdema.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/17/jmtc5w1jzzk77hva.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fjtnzsdmg%22%7D","shareData":{"title":"人气咨询师排行榜-壹点灵","cover":"https://img.ydlcdn.com/file/2019/05/17/jmtc5w1jzzk77hva.png","desc":"","shareUrl":""},"title":"人气咨询师排行榜-壹点灵"},{"focId":11130,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/09/eije5jwiyjcyyub6.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/09/5cwmsbzfydshzh92.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fydlaplus1%22%7D","shareData":{"title":"A++融资公告","cover":"https://img.ydlcdn.com/file/2019/05/09/5cwmsbzfydshzh92.png","desc":"","shareUrl":""},"title":"A++融资公告"},{"focId":10853,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/24/pgx73v43ty9zzcn0.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/24/synob5zlakccjcb5.png","linkUrl":"ydl-user://h5/confide?params\u003d%7b%22url%22%3a%22https%3a%2f%2fwebapp2.ydl.com%2factivity%2flisten%2fcoupon%22%7d","shareData":{"title":"128元倾诉新用户活动","cover":"https://img.ydlcdn.com/file/2019/04/24/synob5zlakccjcb5.png","desc":"","shareUrl":""},"title":"128元倾诉新用户活动"},{"focId":10730,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/11/str4mvjunwuul5lq.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/11/jluqy3kasv2fl63b.png","linkUrl":"ydl-user://h5/confide?params\u003d%7b%22url%22%3a%22https%3a%2f%2fh5.ydl.com%2fconfideMatch%22%7d","shareData":{"title":"一键倾诉","cover":"https://img.ydlcdn.com/file/2019/04/11/jluqy3kasv2fl63b.png","desc":"","shareUrl":""},"title":"一键倾诉"},{"focId":10131,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/24/bedrm9rjwflt2vhd.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/24/6n2pb6n6ctipmvux.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwebapp.ydl.com%2Ffe-app-yidianling%2Fcourse%2Fdetail%2F2757%22%7D","shareData":{"title":"【重磅课程】丁Sir说挽回:像心理学家一样去挽回","cover":"https://img.ydlcdn.com/file/2019/04/24/6n2pb6n6ctipmvux.png","desc":"","shareUrl":""},"title":"【重磅课程】丁Sir说挽回:像心理学家一样去挽回"},{"focId":906,"imageIphonex":"https://img.ydlcdn.com/file/2019/01/30/xt55wf76k13c8qb6.png","imageUrl":"https://img.ydlcdn.com/file/2019/01/30/gvca1sh5xg5ao85w.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fct%2Flist%3F%22%7D","shareData":{"title":"免费体验","cover":"https://img.ydlcdn.com/file/2019/01/30/gvca1sh5xg5ao85w.png","desc":"","shareUrl":"https://h2.yidianling.com/ct/list?"},"title":"免费体验"},{"focId":11519,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/27/dc09x8zkkbhyfc21.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/27/v5k0yg761a8qxv25.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fl.yidianling.com%2Fp%2Fq%2Fzhiyeceshi%22%7D","shareData":{"title":"职场晋升攻略","cover":"https://img.ydlcdn.com/file/2019/05/27/v5k0yg761a8qxv25.png","desc":"","shareUrl":""},"title":"职场晋升攻略"},{"focId":11133,"imageIphonex":"https://img.ydlcdn.com/file/2019/05/15/bojyl3stwslfgct0.png","imageUrl":"https://img.ydlcdn.com/file/2019/05/15/o5cpxtbgpxv6a7ry.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwjwlkj.wjx.cn%2Fjq%2F39247133.aspx%22%7D","shareData":{"title":"亲密关系问卷","cover":"https://img.ydlcdn.com/file/2019/05/15/o5cpxtbgpxv6a7ry.png","desc":"","shareUrl":""},"title":"亲密关系问卷"},{"focId":9714,"imageIphonex":"https://img.ydlcdn.com/file/2019/04/05/73s6p5r7zk7u6b4u.png","imageUrl":"https://img.ydlcdn.com/file/2019/04/05/1agqihpp9o8w276v.png","linkUrl":"ydl-user://h5/h5?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fwebapp.ydl.com%2Ffe-app-yidianling%2Fcourse%2Fdetail%2F3029%22%7D","shareData":{"title":"【【新课推荐】读心术,读懂你的另一半","cover":"https://img.ydlcdn.com/file/2019/04/05/1agqihpp9o8w276v.png","desc":"","shareUrl":""},"title":"【【新课推荐】读心术,读懂你的另一半"}],"homeSaleData":[{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:19:30 PM","doctorId":4422,"doctorName":"段宁","nickName":"y**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F4422%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:22:23 PM","doctorId":9295,"doctorName":"朱礼火","nickName":"老**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F9295%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:30:15 PM","doctorId":5954,"doctorName":"吴杰","nickName":"","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F5954%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:34:51 PM","doctorId":1261,"doctorName":"吴立秀","nickName":"M**","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F1261%22%7D"},{"contentAfter":"的电话倾诉","contentBefore":"刚刚","createTime":"May 27, 2019 5:34:53 PM","doctorId":10330,"doctorName":"徐听","nickName":"","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F10330%22%7D"}],"keywordData":[{"id":5,"keyword":"性心理","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%80%A7%26%22%7D"},{"id":2,"keyword":"抑郁","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%8A%91%E9%83%81%26%22%7D"},{"id":3,"keyword":"焦虑","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E7%84%A6%E8%99%91%26%22%7D"},{"id":4,"keyword":"婚姻挽回","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%A9%9A%E5%A7%BB%26%22%7D"},{"id":8,"keyword":"早恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%97%A9%E6%81%8B%26%22%7D"},{"id":6,"keyword":"同性恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%90%8C%E6%80%A7%E6%81%8B%26%22%7D"},{"id":7,"keyword":"出轨","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E5%87%BA%E8%BD%A8%26%22%7D"},{"id":1,"keyword":"失恋","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch%3Fsearch_word%3D%E6%81%8B%26%22%7D"},{"id":9,"keyword":"情感修复","url":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2Fsearch2%3Fsearch_word%3D%E6%83%85%E6%84%9F%E4%BF%AE%E5%A4%8D%26%22%7D"}],"listenCategoryDate":[{"id":1,"name":"恋爱"},{"id":2,"name":"婚姻家庭"},{"id":3,"name":"陪聊治愈"},{"id":4,"name":"情绪压力"},{"id":5,"name":"亲子教育"},{"id":7,"name":"职业"},{"id":8,"name":"人际"},{"id":9,"name":"个人成长"}],"isRealEmpty":false},"type":10001},{"type":10002},{"consultBean":{"endRow":3,"isHasNextPage":false,"isHasPreviousPage":false,"isIsFirstPage":false,"isIsLastPage":false,"list":[{"city":"唐山","doctorHead":"https://img.ydlcdn.com/file/2019/05/10/vw6sx2i72exvbr95.jpg!s120x120","head":"https://img.ydlcdn.com/file/2019/05/10/vw6sx2i72exvbr95.jpg!s120x120","doctorId":1261,"name":"吴立秀","doctorName":"吴立秀","doctorUid":49874,"feedbackRate":5.00,"minBookingPrice":5.00,"hUrl":"https://h2.yidianling.com/experts/1261","isOnline":1,"mUrl":"https://m.ydl.com/experts/1261","profesBack":"二级心理咨询师\r\n三级心理咨询师\r\n壹点灵签约心理咨询师\r\n中科院心理研究所心理学研究生在读","province":"河北省","serviceFee":175,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/10/vw6sx2i72exvbr95.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/1261","title":"吴立秀咨询工作室"},"tags":"恋爱情感|婚姻家庭|个人成长","zixunOrderNum":7978},{"city":"温州","doctorHead":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","head":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","doctorId":1131,"name":"朱静","doctorName":"朱静","doctorUid":34649,"feedbackRate":5.00,"minBookingPrice":5.00,"hUrl":"https://h2.yidianling.com/experts/1131","isOnline":1,"mUrl":"https://m.ydl.com/experts/1131","profesBack":"三级心理咨询师","province":"浙江省","serviceFee":250,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/1131","title":"朱静咨询工作室"},"tags":"恋爱婚姻|情绪压力|人际关系","zixunOrderNum":7431},{"city":"苏州","doctorHead":"https://img.ydlcdn.com/file/2019/05/08/vp663mvqvf193phi.jpg!s120x120","head":"https://img.ydlcdn.com/file/2019/05/08/krzlfwzfn5h1w7wu.jpg!s120x120","doctorId":7387,"name":"钟媛媛","doctorName":"钟媛媛","doctorUid":1915807,"feedbackRate":5.00,"minBookingPrice":5.00,"hUrl":"https://h2.yidianling.com/experts/7387","isOnline":1,"mUrl":"https://m.ydl.com/experts/7387","profesBack":"三级心理咨询师","province":"江苏省","serviceFee":150,"share":{"cover":"https://img.ydlcdn.com/file/2019/05/08/vp663mvqvf193phi.jpg!s120x120","desc":"","shareUrl":"https://m.ydl.com/experts/7387","title":"钟媛媛咨询工作室"},"tags":"恋爱婚姻|情绪压力|个人成长","zixunOrderNum":1135}],"navigateFirstPage":1,"navigateLastPage":8,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7,8],"nextPage":2,"pageNum":1,"pageSize":3,"pages":2034,"prePage":0,"size":3,"startRow":1,"total":6100,"isRealEmpty":false},"type":10003},{"courseBean":{"endRow":3,"isHasNextPage":false,"isHasPreviousPage":false,"isIsFirstPage":false,"isIsLastPage":false,"list":[{"applyFee":99.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A2705537%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F12511%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2019/05/25/exkclexoa7ki5v5a.png","hostId":12511,"hostName":"王秀兰","hostUid":2705537,"id":3359,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":81,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":0.0,"pic":"https://img.ydlcdn.com/file/2019/05/19/36btxlb5hlnynn6j.jpg","promotionApplyFee":69.0,"readNums":2195,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/05/19/36btxlb5hlnynn6j.jpg","desc":"27个沟通秘术,让夫妻沟通更顺畅","shareUrl":"https://m.ydl.com/course/3359","title":"男女沟通秘籍,让老公乖乖听话的秘密"},"title":"男女沟通秘籍,让老公乖乖听话的秘密"},{"applyFee":39.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A1334422%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F4304%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2018/05/06/4ab73371ed439a0ac0920af7a6fa04af..jpg","hostId":4304,"hostName":"徐泽旭","hostUid":1334422,"id":3235,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":237,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":99.0,"pic":"https://img.ydlcdn.com/file/2019/04/25/pzehq0yiqpdc76rh.jpg","promotionApplyFee":39.0,"readNums":8909,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/04/25/pzehq0yiqpdc76rh.jpg","desc":"改变负面语言模式,重塑自信人生","shareUrl":"https://m.ydl.com/course/3235","title":"自卑、胆怯、不敢说话?扭转自卑语言,重塑自信人生!"},"title":"自卑、胆怯、不敢说话?扭转自卑语言,重塑自信人生!"},{"applyFee":129.0,"chatLinkUri":"ydl-user://chat/private?params\u003d%7B%22toUid%22%3A2441930%2C%22userType%22%3A2%7D","consultLinkUri":"ydl-user://h5/consult?params\u003d%7B%22url%22%3A%22https%3A%2F%2Fh2.yidianling.com%2Fexperts%2F9945%22%7D","hostConfidedId":0,"hostHead":"https://img.ydlcdn.com/file/2018/10/10/0xcrep11r0ibykmd.png","hostId":9945,"hostName":"壹点灵|产品研究院","hostUid":2441930,"id":3174,"isAvailable":0,"isInvite":0,"isOpenChat":1,"isOpenConsult":1,"isOpenListen":0,"isPromotion":2,"isShowHostButton":0,"joinNum":337,"listenLinkUri":"https://h2.yidianling.com/listen/detail/0","originalApplyFee":299.0,"pic":"https://img.ydlcdn.com/file/2019/04/18/b3gti2nci9y5oi7a.jpg","promotionApplyFee":0.0,"readNums":3767,"shareData":{"cover":"https://img.ydlcdn.com/file/2019/04/18/b3gti2nci9y5oi7a.jpg","desc":"孩子学习不好是因为注意力不好造成的?!不不不,正确对待注意力缺失,注意力不好也能学习好!","shareUrl":"https://m.ydl.com/course/3174","title":"父母必修课—注意力不好的娃如何更好的成长"},"title":"父母必修课—注意力不好的娃如何更好的成长"}],"navigateFirstPage":1,"navigateLastPage":8,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7,8],"nextPage":2,"pageNum":1,"pageSize":3,"pages":21,"prePage":0,"size":3,"startRow":1,"total":63,"isRealEmpty":false},"type":10004},{"confideBean":{"body":[{"confideAddress":"沈阳","confideConnection":"100%","confideContent":"不必失落,适合自己的人生就是最好的人生。","confideFee":"50","confideHearNum":"已聆听324次","confideLine":3,"confideNum":"324人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://img.ydlcdn.com/file/2019/02/26/0idx62mjf22q9r8y.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/05/07/pxkkwuh1pkeg80bu.jpg!s200x200","confidedId":839,"confidedName":"吴杰","confidedTag":["恋爱婚姻","家庭关系","个人成长"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":5954,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d839","status":2,"tags":"恋爱婚姻,家庭关系,个人成长","uid":1645151},{"confideAddress":"淮安","confideConnection":"100%","confideContent":"用心陪伴,用爱倾听,留下烦恼,带走轻松。","confideFee":"50","confideHearNum":"已聆听1539次","confideLine":1,"confideNum":"1539人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://video.ydlcdn.com/2017/09/11/718dbba7c20d0b4ea1dcf35b024aab51.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/05/a3646cb80aea494682c488e4c22be8fe.jpg!s200x200","confidedId":554,"confidedName":"翟曙霞","confidedTag":["80后","恋爱婚姻","情绪压力","人际关系"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":2353,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d554","status":1,"tags":"80后,恋爱婚姻,情绪压力,人际关系","uid":1085815},{"confideAddress":"","confideConnection":"100%","confideContent":"慢慢地陪着你走,慢慢地听花开的声音","confideFee":"50","confideHearNum":"已聆听272次","confideLine":1,"confideNum":"272人","confidePraise":"100.0%","confideSex":2,"confideVoice":"https://img.ydlcdn.com/file/2019/02/26/jxv0beey8ukn5jpc.mp3","confidedIcon":"https://img.ydlcdn.com/file/2019/03/30/ewaq0g790zgo6jbn.png!s200x200","confidedId":838,"confidedName":"林岚","confidedTag":["恋爱婚姻","学生成长"],"couponMoney":"0","couponText":"新用户送120元红包","doctorId":9433,"linkUrl":"https://h5.ydl.com/confideDetail?id\u003d838","status":1,"tags":"恋爱婚姻,学生成长","uid":2327655}],"diviLine":1,"type":5,"isRealEmpty":false},"type":10005},{"testListBean":[{
"recommendLinkUrl": "ydl-user://ceshi/detail?params\u003d%7B%22id%22%3A738%7D", "recommendLinkUrl": "ydl-user://ceshi/detail?params\u003d%7B%22id%22%3A738%7D",
"id": 738, "id": 738,
"name": "心理健康测评-SCL90专业版", "name": "心理健康测评-SCL90专业版",
......
...@@ -105,7 +105,7 @@ class IHomeBaseContract { ...@@ -105,7 +105,7 @@ class IHomeBaseContract {
/** /**
*获取咨询列表 *获取咨询列表
*/ */
fun getConsultData(type: String, selectPosition: Int) fun getConsultData(type: String, selectPosition: Int, isCancelHome: Boolean = true)
/** /**
* 首页问答 - 点赞 * 首页问答 - 点赞
......
...@@ -58,9 +58,9 @@ abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseC ...@@ -58,9 +58,9 @@ abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseC
//首页缓存版本号 //首页缓存版本号
var HOME_PAGER_DATA_CACHE_VERISON = "HOME_PAGER_DATA_CACHE_VERISON" var HOME_PAGER_DATA_CACHE_VERISON = "HOME_PAGER_DATA_CACHE_VERISON"
private var mConsultDisposable: Disposable? = null var mConsultDisposable: Disposable? = null
private var mConfideDisposable: Disposable? = null var mConfideDisposable: Disposable? = null
private var mHomeDisposable: Disposable? = null var mHomeDisposable: Disposable? = null
var mConfideType: String = "" var mConfideType: String = ""
var mConsultType: String = "" var mConsultType: String = ""
...@@ -151,10 +151,13 @@ abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseC ...@@ -151,10 +151,13 @@ abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseC
/** /**
*获取咨询列表 *获取咨询列表
*/ */
override fun getConsultData(type: String, selectPosition: Int) { override fun getConsultData(type: String, selectPosition: Int, isCancelHome: Boolean) {
disposeConsult() disposeConsult()
if (isCancelHome) {
disposeHome() disposeHome()
}
mConsultType = type mConsultType = type
......
...@@ -161,7 +161,7 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac ...@@ -161,7 +161,7 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
disposeHome() disposeHome()
val homeList: MutableList<HomePagerDataBean> = mutableListOf() val homeList: MutableList<HomePagerDataBean> = mutableListOf()
LogUtil.d("mConsultType-loadHomeData:$mConsultType") LogUtil.d("mConsultType-loadHomeData:$mConsultType")
Observable.mergeArray( mHomeDisposable = Observable.mergeArray(
mModel.headerRequest() mModel.headerRequest()
.compose(RxUtils.applySchedulers(mView)) .compose(RxUtils.applySchedulers(mView))
.map { it -> .map { it ->
...@@ -183,7 +183,7 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac ...@@ -183,7 +183,7 @@ class HomePresenterImpl : BaseHomePresenterImpl<IHomeContract.View, IHomeContrac
if (it.consultCategoryData != null && it.consultCategoryData!!.isNotEmpty()) { if (it.consultCategoryData != null && it.consultCategoryData!!.isNotEmpty()) {
//咨询分类和缓存分类不一致,重新加载咨询列表数据 //咨询分类和缓存分类不一致,重新加载咨询列表数据
if (it.consultCategoryData!![0].id.toString() != mConsultType) { if (it.consultCategoryData!![0].id.toString() != mConsultType) {
getConsultData("${it.consultCategoryData!![0].id}", 0) getConsultData("${it.consultCategoryData!![0].id}", 0, false)
} }
} }
// homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW)) // homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW))
......
...@@ -61,7 +61,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -61,7 +61,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
//设置红包、原价 //设置红包、原价
setPrice(bean) setPrice(bean)
this.setOnClickListener { this.setOnClickListener {
val url = URLUtils.appendParmas(bean.hUrl, "cateId", cateId) val url = URLUtils.appendParmas(bean.linkUrl, "cateId", cateId)
homeEvent!!.consultItemClick(url, bean.doctorId) homeEvent!!.consultItemClick(url, bean.doctorId)
} }
} }
......
...@@ -9,11 +9,11 @@ import android.view.View ...@@ -9,11 +9,11 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.adapter.YdlHomeAdapter import com.yidianling.home.adapter.YdlHomeAdapter
import com.yidianling.home.constract.IHomeContract import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.constract.YdlHomeViewHolderConstract import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
/** /**
* @author yuanwai * @author yuanwai
...@@ -24,7 +24,7 @@ import com.yidianling.common.tools.RxImageTool ...@@ -24,7 +24,7 @@ import com.yidianling.common.tools.RxImageTool
*/ */
class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
private var mContext : Context? = null private var mContext: Context? = null
private var mCurrentPosition = 0 private var mCurrentPosition = 0
...@@ -32,25 +32,25 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -32,25 +32,25 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
//倾诉筛选layout //倾诉筛选layout
private var confideFilterView: LinearLayout? = null private var confideFilterView: LinearLayout? = null
//咨询筛选layout //咨询筛选layout
private var consultFilterView : LinearLayout? = null private var consultFilterView: LinearLayout? = null
//首页界面View接口 //首页界面View接口
private var mHomeView : IHomeContract.View? = null private var mHomeView: IHomeContract.View? = null
private var adapter: YdlHomeAdapter? = null private var adapter: YdlHomeAdapter? = null
private var mPhoneCallView : ImageView? = null private var mPhoneCallView: ImageView? = null
//是否执行收缩动画 //是否执行收缩动画
private var excuteStartAnim : Boolean = true private var excuteStartAnim: Boolean = true
//是否执行展开动画 //是否执行展开动画
private var excuteEndAnim : Boolean = true private var excuteEndAnim: Boolean = true
private var dp5 : Int = 0 private var dp5: Int = 0
private var dp14 : Int = 0 private var dp14: Int = 0
private var dp15 : Int = 0 private var dp15: Int = 0
private var dp34 : Int = 0 private var dp34: Int = 0
private var cvWidth : Int = 0 private var cvWidth: Int = 0
private var maxCVWidth : Int = 0 private var maxCVWidth: Int = 0
private var minCVWidth : Int = 0 private var minCVWidth: Int = 0
init { init {
dp5 = RxImageTool.dip2px(5f) dp5 = RxImageTool.dip2px(5f)
...@@ -59,14 +59,14 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -59,14 +59,14 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
dp34 = RxImageTool.dip2px(34f) dp34 = RxImageTool.dip2px(34f)
} }
fun setContext(context: Context){ fun setContext(context: Context) {
mContext = context mContext = context
cvWidth = RxDeviceTool.getScreenWidth(context) - RxImageTool.dip2px(73f) cvWidth = RxDeviceTool.getScreenWidth(context) - RxImageTool.dip2px(73f)
minCVWidth = RxImageTool.dip2px(105f) minCVWidth = RxImageTool.dip2px(105f)
maxCVWidth = cvWidth maxCVWidth = cvWidth
} }
fun setHomeView(homeView : IHomeContract.View){ fun setHomeView(homeView: IHomeContract.View) {
this.mHomeView = homeView this.mHomeView = homeView
} }
...@@ -74,7 +74,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -74,7 +74,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
this.confideFilterView = filterView this.confideFilterView = filterView
} }
fun setConsultFilterView(filterView: LinearLayout){ fun setConsultFilterView(filterView: LinearLayout) {
this.consultFilterView = filterView this.consultFilterView = filterView
} }
...@@ -82,7 +82,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -82,7 +82,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
this.adapter = adapter this.adapter = adapter
} }
fun setPhoneCallImageView(callView : ImageView){ fun setPhoneCallImageView(callView: ImageView) {
this.mPhoneCallView = callView this.mPhoneCallView = callView
} }
...@@ -101,14 +101,15 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -101,14 +101,15 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
Log.e("Tag", "-------dy=$dy") Log.e("Tag", "-------dy=$dy")
// moveSearchView(dy) // moveSearchView(dy)
val manager = recyclerView!!.layoutManager as LinearLayoutManager val manager = recyclerView!!.layoutManager as LinearLayoutManager
if (mCurrentPosition != manager.findFirstVisibleItemPosition()) { if (mCurrentPosition != manager.findFirstVisibleItemPosition() && manager.findFirstVisibleItemPosition() != -1) {
mCurrentPosition = manager.findFirstVisibleItemPosition() mCurrentPosition = manager.findFirstVisibleItemPosition()
} }
if (adapter!!.itemCount > mCurrentPosition && mCurrentPosition != 0) {
if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONFIDE_VIEW) { if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONFIDE_VIEW) {
val view = manager.findViewByPosition(mCurrentPosition) val view = manager.findViewByPosition(mCurrentPosition)
if (view != null) { if (view != null) {
if (view is ViewGroup) { if (view is ViewGroup) {
if (view.getChildAt(1) is TabLayout) { if (view.childCount > 1 && view.getChildAt(1) is TabLayout) {
val tabLayout = view.getChildAt(1) val tabLayout = view.getChildAt(1)
val location = IntArray(2) val location = IntArray(2)
tabLayout.getLocationOnScreen(location) tabLayout.getLocationOnScreen(location)
...@@ -127,7 +128,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -127,7 +128,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
confideFilterView!!.visibility = View.INVISIBLE confideFilterView!!.visibility = View.INVISIBLE
} }
} }
}else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONSULT_VIEW) { } else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONSULT_VIEW) {
val view = manager.findViewByPosition(mCurrentPosition) val view = manager.findViewByPosition(mCurrentPosition)
if (view != null) { if (view != null) {
if (view is ViewGroup) { if (view is ViewGroup) {
...@@ -150,32 +151,33 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() { ...@@ -150,32 +151,33 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
consultFilterView!!.visibility = View.INVISIBLE consultFilterView!!.visibility = View.INVISIBLE
} }
} }
}else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW){ } else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW) {
if (excuteStartAnim){ if (excuteStartAnim) {
mHomeView?.startAnim() mHomeView?.startAnim()
excuteStartAnim = false excuteStartAnim = false
excuteEndAnim = true excuteEndAnim = true
} }
confideFilterView?.visibility = View.INVISIBLE confideFilterView?.visibility = View.INVISIBLE
consultFilterView?.visibility = View.INVISIBLE consultFilterView?.visibility = View.INVISIBLE
} else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW){ } else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
if (excuteEndAnim){ if (excuteEndAnim) {
mHomeView?.endAnim() mHomeView?.endAnim()
excuteEndAnim = false excuteEndAnim = false
excuteStartAnim = true excuteStartAnim = true
} }
confideFilterView?.visibility = View.INVISIBLE confideFilterView?.visibility = View.INVISIBLE
consultFilterView?.visibility = View.INVISIBLE consultFilterView?.visibility = View.INVISIBLE
}else { } else {
confideFilterView?.visibility = View.INVISIBLE confideFilterView?.visibility = View.INVISIBLE
consultFilterView?.visibility = View.INVISIBLE consultFilterView?.visibility = View.INVISIBLE
} }
} }
}
/** /**
* 移动搜索View * 移动搜索View
*/ */
private fun moveSearchView(dy : Int){ private fun moveSearchView(dy: Int) {
// if (null != mCardView){ // if (null != mCardView){
// cvWidth -= dy // cvWidth -= dy
// if (cvWidth < minCVWidth){ // if (cvWidth < minCVWidth){
......
...@@ -20,8 +20,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers ...@@ -20,8 +20,10 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Action import io.reactivex.functions.Action
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
/** /**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a> * @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
* @描述: * @描述:
...@@ -42,7 +44,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -42,7 +44,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
disposeHome() disposeHome()
val homeList: MutableList<HomePagerDataBean> = mutableListOf() val homeList: MutableList<HomePagerDataBean> = mutableListOf()
LogUtil.d("mConsultType-loadHomeData:$mConsultType") LogUtil.d("mConsultType-loadHomeData:$mConsultType")
Observable.mergeArray( mHomeDisposable = Observable.mergeArray(
mModel.headerRequest() mModel.headerRequest()
.compose(RxUtils.applySchedulers(mView)).map { it -> .compose(RxUtils.applySchedulers(mView)).map { it ->
//首页头部数据 分类 & Banner //首页头部数据 分类 & Banner
...@@ -57,7 +59,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -57,7 +59,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
if (it.consultCategoryData != null && it.consultCategoryData!!.isNotEmpty()) { if (it.consultCategoryData != null && it.consultCategoryData!!.isNotEmpty()) {
//咨询分类和缓存分类不一致,重新加载咨询列表数据 //咨询分类和缓存分类不一致,重新加载咨询列表数据
if (it.consultCategoryData!![0].id.toString() != mConsultType) { if (it.consultCategoryData!![0].id.toString() != mConsultType) {
getConsultData("${it.consultCategoryData!![0].id}", 0) getConsultData("${it.consultCategoryData!![0].id}", 0, false)
} }
} }
homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW)) homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW))
...@@ -130,6 +132,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -130,6 +132,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
.subscribe(Consumer {}, object : ThrowableConsumer() { .subscribe(Consumer {}, object : ThrowableConsumer() {
override fun accept(msg: String) { override fun accept(msg: String) {
mView.homeDataFail(msg) mView.homeDataFail(msg)
mHomeDisposable?.dispose()
} }
}, Action { }, Action {
homeList.sortWith(compareBy { it.type }) homeList.sortWith(compareBy { it.type })
......
...@@ -66,6 +66,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -66,6 +66,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
* tablayou上次选中的tab下标 * tablayou上次选中的tab下标
*/ */
private var confideLastSelectPosition = 0 private var confideLastSelectPosition = 0
private var confideLastSelectType = ""
/** /**
* TabLayout.OnTabSelectedListener * TabLayout.OnTabSelectedListener
*/ */
...@@ -75,6 +76,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -75,6 +76,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
* 咨询tablayout上次选中的下标 * 咨询tablayout上次选中的下标
*/ */
private var consultLastSelectPosition = 0 private var consultLastSelectPosition = 0
private var consultLastSelectType= ""
/** /**
* 悬浮tablayout监听事件 * 悬浮tablayout监听事件
*/ */
...@@ -207,7 +209,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -207,7 +209,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
*/ */
override fun getConfideData(type: String, selectPosition: Int) { override fun getConfideData(type: String, selectPosition: Int) {
confideLastSelectPosition = selectPosition confideLastSelectPosition = selectPosition
// tab_layout.getTabAt(confideLastSelectPosition)!!.select() confideLastSelectType = type
mPresenter?.getConfideData(type, selectPosition) mPresenter?.getConfideData(type, selectPosition)
} }
...@@ -216,7 +218,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -216,7 +218,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
*/ */
override fun getConsultData(type: String, selectPosition: Int) { override fun getConsultData(type: String, selectPosition: Int) {
consultLastSelectPosition = selectPosition consultLastSelectPosition = selectPosition
// tab_consultLayout.getTabAt(consultLastSelectPosition) consultLastSelectType = type
mPresenter?.getConsultData(type, selectPosition) mPresenter?.getConsultData(type, selectPosition)
} }
...@@ -296,10 +298,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -296,10 +298,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) { if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
initTabLayout(bean.headerBean!!.listenCategoryDate) initTabLayout(bean.headerBean!!.listenCategoryDate)
initConsultTabLayout(bean.headerBean!!.consultCategoryData) initConsultTabLayout(bean.headerBean!!.consultCategoryData)
consultLastSelectType = bean.headerBean!!.consultCategoryData!![0].id.toString()
} }
} }
//每次全局更新后重置下标位
consultLastSelectPosition = 0
} }
/** /**
...@@ -419,7 +420,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -419,7 +420,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
super.onResume() super.onResume()
if (userVisibleHint) { if (userVisibleHint) {
ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT) ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT)
mPresenter?.loadHomeData() mPresenter?.getConsultData(consultLastSelectType, consultLastSelectPosition)
mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition)
showConsultAssistantDialog() showConsultAssistantDialog()
} }
......
...@@ -46,7 +46,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -46,7 +46,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
//设置头像 //设置头像
setHead(bean) setHead(bean)
//设置名称 //设置名称
tv_consult_name.text = bean.doctorName tv_consult_name.text = bean.name
//咨询师标签 //咨询师标签
tag_view.initData(StringUtils.strToList(bean.tags)) tag_view.initData(StringUtils.strToList(bean.tags))
//设置向TA倾诉人数 //设置向TA倾诉人数
...@@ -58,7 +58,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -58,7 +58,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
//设置红包、原价 //设置红包、原价
setPrice(bean) setPrice(bean)
this.setOnClickListener { this.setOnClickListener {
val url = URLUtils.appendParmas(bean.hUrl,"cateId",cateId) val url = URLUtils.appendParmas(bean.linkUrl,"cateId",cateId)
homeEvent!!.consultItemClick(url,bean.doctorId) homeEvent!!.consultItemClick(url,bean.doctorId)
} }
} }
...@@ -71,7 +71,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -71,7 +71,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
op.errorPic = R.drawable.platform_head_place_hold_pic op.errorPic = R.drawable.platform_head_place_hold_pic
op.loadingPic = R.drawable.platform_head_place_hold_pic op.loadingPic = R.drawable.platform_head_place_hold_pic
op.transform = 0 op.transform = 0
YDLImageCacheManager.showImage(mContext, bean.doctorHead, img_consult_head, op) YDLImageCacheManager.showImage(mContext, bean.head, img_consult_head, op)
} }
/** /**
...@@ -118,7 +118,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -118,7 +118,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
} }
private fun setPrice(bodyBean: HomeConsultBean.ListBean) { private fun setPrice(bodyBean: HomeConsultBean.ListBean) {
val confideFee = bodyBean.serviceFee val confideFee = bodyBean.minBookingPrice
val sb = StringBuffer() val sb = StringBuffer()
tv_price.text = sb.append("¥").append(confideFee).toString() tv_price.text = sb.append("¥").append(confideFee).toString()
} }
......
...@@ -19,8 +19,8 @@ class UserBIConstants { ...@@ -19,8 +19,8 @@ class UserBIConstants {
//百度监测 用户注册行为 //百度监测 用户注册行为
const val APP_REGISTER_PAGE = "app_register_page" const val APP_REGISTER_PAGE = "app_register_page"
const val POSITION_LOGIN_CLICK = "login_main|login_click" //登录点击 const val POSITION_LOGIN_CLICK = PART_ID_LOGIN_MAIN_PREFIX+"login_click" //登录点击
const val POSITION_LOGIN_SUCCESS_CLICK = "login_main|login_success_click" //登录成功点击 const val POSITION_LOGIN_SUCCESS_CLICK = PART_ID_LOGIN_MAIN_PREFIX+"login_success_click" //登录成功点击
//百度监测 应用启动 //百度监测 应用启动
const val POSITION_APP_START_UP_CLICK = "app_start_up_click" //应用启动 const val POSITION_APP_START_UP_CLICK = "app_start_up_click" //应用启动
......
...@@ -57,7 +57,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -57,7 +57,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
} else { } else {
ToastUtil.toastShort("修改密码成功") ToastUtil.toastShort("修改密码成功")
saveUserData(it.data) saveUserData(it.data)
ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,UserBIConstants.ACTION_TYPE_RESET_PWD) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.data.uid!!,UserBIConstants.ACTION_TYPE_RESET_PWD)
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true) ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true)
// 重设密码登录已经不可能是首次登录,所以不进行百度埋点 // 重设密码登录已经不可能是首次登录,所以不进行百度埋点
...@@ -78,10 +78,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -78,10 +78,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
*/ */
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
override fun userLoginByPassword(inputPassword: String, phone: String, phoneCountryCode: String) { override fun userLoginByPassword(inputPassword: String, phone: String, phoneCountryCode: String) {
ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_PWD_LOGIN)
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_PWD_LOGIN)
ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK, UserBIConstants.ACTION_TYPE_RESET_PWD)
var param = PhoneLoginPwdParam(StringUtils.md5(inputPassword), phoneCountryCode, phone) var param = PhoneLoginPwdParam(StringUtils.md5(inputPassword), phoneCountryCode, phone)
mModel.userLoginByPassword(param) mModel.userLoginByPassword(param)
......
...@@ -59,7 +59,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -59,7 +59,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
override fun autoLogin(bean: PhoneLoginAutoParam) { override fun autoLogin(bean: PhoneLoginAutoParam) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_DIRECT_LOGIN) ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_DIRECT_LOGIN)
mModel.autoLogin(bean) mModel.autoLogin(bean)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -177,7 +177,6 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -177,7 +177,6 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
val sign1 = if (media == SHARE_MEDIA.QQ) UserBIConstants.ACTION_TYPE_QQ_THIRD_LOGIN else UserBIConstants.ACTION_TYPE_WX_THIRD_LOGIN val sign1 = if (media == SHARE_MEDIA.QQ) UserBIConstants.ACTION_TYPE_QQ_THIRD_LOGIN else UserBIConstants.ACTION_TYPE_WX_THIRD_LOGIN
ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK, sign1) ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK, sign1)
UserHttpImpl.getInstance() UserHttpImpl.getInstance()
.umLogin(activity, media) .umLogin(activity, media)
.doOnSubscribe { mView.showProgressView() } .doOnSubscribe { mView.showProgressView() }
...@@ -202,14 +201,14 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -202,14 +201,14 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true) ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true)
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK)
} else { } else {
ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, sign1) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
} }
} else { } else {
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true) ModularServiceManager.provide(IHomeService::class.java).setDouble11ShowType(true)
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK)
} else { } else {
ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, sign1) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
} }
} }
}, { }, {
......
...@@ -130,7 +130,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -130,7 +130,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
* 验证码验证码登录 * 验证码验证码登录
*/ */
override fun loginByMsgCode(phone: String, phoneCountryCode: String, msgCode: String) { override fun loginByMsgCode(phone: String, phoneCountryCode: String, msgCode: String) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_CODE_LOGIN) ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_CODE_LOGIN)
var param = PhoneLoginCodeParam(msgCode, phoneCountryCode, phone) var param = PhoneLoginCodeParam(msgCode, phoneCountryCode, phone)
mModel.loginByMsgCode(param) mModel.loginByMsgCode(param)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
......
...@@ -17,6 +17,7 @@ import com.ydl.ydlnet.client.interfaces.BuildHeadersListener; ...@@ -17,6 +17,7 @@ import com.ydl.ydlnet.client.interfaces.BuildHeadersListener;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.InputStream;
import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -25,6 +26,7 @@ import javax.net.ssl.HostnameVerifier; ...@@ -25,6 +26,7 @@ import javax.net.ssl.HostnameVerifier;
import okhttp3.Cache; import okhttp3.Cache;
import okhttp3.Interceptor; import okhttp3.Interceptor;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Protocol;
/** /**
* Created by haorui on 2019-09-02 . * Created by haorui on 2019-09-02 .
...@@ -45,7 +47,7 @@ public class OkHttpConfig { ...@@ -45,7 +47,7 @@ public class OkHttpConfig {
private static OkHttpClient okHttpClient; private static OkHttpClient okHttpClient;
public OkHttpConfig() { public OkHttpConfig() {
okHttpClientBuilder = new OkHttpClient.Builder(); okHttpClientBuilder = new OkHttpClient.Builder().protocols(Collections.singletonList(Protocol.HTTP_1_1));
} }
public static OkHttpConfig getInstance() { public static OkHttpConfig getInstance() {
......
...@@ -29,7 +29,11 @@ public abstract class BaseObserver<T> implements Observer<T>, ISubscriber<T> { ...@@ -29,7 +29,11 @@ public abstract class BaseObserver<T> implements Observer<T>, ISubscriber<T> {
@Override @Override
public void onNext(@NonNull T t) { public void onNext(@NonNull T t) {
try {
doOnNext(t); doOnNext(t);
} catch (Exception e) {
onError(e);
}
} }
@Override @Override
......
...@@ -2,8 +2,10 @@ package com.yidianling.ydl_pay.toast ...@@ -2,8 +2,10 @@ package com.yidianling.ydl_pay.toast
import android.content.Context import android.content.Context
import android.support.annotation.StringRes import android.support.annotation.StringRes
import android.text.TextUtils
import android.widget.Toast import android.widget.Toast
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.LogUtil
import com.yidianling.common.tools.ToastUtil
/** /**
* author : Zhangwenchao * author : Zhangwenchao
...@@ -31,16 +33,16 @@ class ToastHelper private constructor() { ...@@ -31,16 +33,16 @@ class ToastHelper private constructor() {
} }
private fun show(context: Context, text: CharSequence) { private fun show(context: Context, text: CharSequence) {
if (TextUtils.isEmpty(text)) return ToastUtil.toastShort(text.toString())
if (toast == null) toast = Toast.makeText(context, text, Toast.LENGTH_SHORT)
else toast?.setText(text)
toast?.show()
} }
private fun show(context: Context, @StringRes resId: Int) { private fun show(context: Context, @StringRes resId: Int) {
if (toast == null) toast = Toast.makeText(context, resId, Toast.LENGTH_SHORT) try {
else toast?.setText(resId) val text = BaseApp.getApp().resources.getString(resId)
toast?.show() ToastUtil.toastShort(text)
} catch (e: Exception) {
LogUtil.e(e.message)
}
} }
private object Holder { private object Holder {
......
...@@ -8,10 +8,13 @@ import com.lzy.imagepicker.view.CropImageView ...@@ -8,10 +8,13 @@ import com.lzy.imagepicker.view.CropImageView
import com.ydl.devicesidlib.DeviceIDHelper import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.client.exception.ApiException
import com.yidianling.common.tools.RxTool import com.yidianling.common.tools.RxTool
import io.reactivex.plugins.RxJavaPlugins
/** /**
...@@ -41,6 +44,22 @@ object YdlRepository { ...@@ -41,6 +44,22 @@ object YdlRepository {
// } // }
// refWatcher = LeakCanary.install(app) // refWatcher = LeakCanary.install(app)
initARouter(app, isDebug) initARouter(app, isDebug)
initRxPlugin()
}
private fun initRxPlugin() {
//保障RxJava调用链流程不会崩溃
RxJavaPlugins.setErrorHandler {
LogUtil.e("RxJava ErrorHandler ---->: $it")
try {
val apiException = ApiException.handleException(it)
UpLoadLogUtils.upLoadLog(
"RxJava Error Handler ", apiException.code, apiException.message?:""
)
} catch (e: Exception) {
LogUtil.d("RxJava ErrorHandler UpLoad Log Error ---->: $it")
}
}
} }
/** /**
......
package com.ydl.ydlcommon.data.http package com.ydl.ydlcommon.data.http
import android.text.TextUtils import android.text.TextUtils
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxNetTool import com.yidianling.common.tools.RxNetTool
import com.ydl.ydlcommon.R
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
/** /**
......
package com.ydl.ydlcommon.utils.remind package com.ydl.ydlcommon.utils.remind
import android.support.annotation.StringRes import android.support.annotation.StringRes
import android.text.TextUtils
import android.widget.Toast
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.LogUtil
import com.yidianling.common.tools.ToastUtil
/** /**
* author : Zhangwenchao * author : Zhangwenchao
...@@ -14,8 +14,6 @@ import com.ydl.ydlcommon.base.BaseApp ...@@ -14,8 +14,6 @@ import com.ydl.ydlcommon.base.BaseApp
*/ */
class ToastHelper private constructor() { class ToastHelper private constructor() {
private var toast: Toast? = null
companion object { companion object {
private fun getInstance(): ToastHelper { private fun getInstance(): ToastHelper {
return Holder.INSTANCE return Holder.INSTANCE
...@@ -31,16 +29,16 @@ class ToastHelper private constructor() { ...@@ -31,16 +29,16 @@ class ToastHelper private constructor() {
} }
private fun show(text: CharSequence) { private fun show(text: CharSequence) {
if (TextUtils.isEmpty(text)) return ToastUtil.toastShort(text.toString())
if (toast == null) toast = Toast.makeText(BaseApp.getApp(), text, Toast.LENGTH_SHORT)
else toast?.setText(text)
toast?.show()
} }
private fun show(@StringRes resId: Int) { private fun show(@StringRes resId: Int) {
if (toast == null) toast = Toast.makeText(BaseApp.getApp(), resId, Toast.LENGTH_SHORT) try {
else toast?.setText(resId) val text = BaseApp.getApp().resources.getString(resId)
toast?.show() ToastUtil.toastShort(text)
} catch (e: Exception) {
LogUtil.e(e.message)
}
} }
private object Holder { private object Holder {
......
package com.yidianling.common.tools; package com.yidianling.common.tools;
import android.content.Context; import android.content.Context;
import android.graphics.Color;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.text.TextUtils; import android.text.TextUtils;
...@@ -42,6 +41,7 @@ public class ToastUtil { ...@@ -42,6 +41,7 @@ public class ToastUtil {
handler.post(() -> toastShort(RxTool.getContext(), msg)); handler.post(() -> toastShort(RxTool.getContext(), msg));
} }
} }
private static void showShortToast(Context mContext, String msg) { private static void showShortToast(Context mContext, String msg) {
if (toast == null) { if (toast == null) {
toast = Toast.makeText(mContext.getApplicationContext(), msg, Toast.LENGTH_SHORT); toast = Toast.makeText(mContext.getApplicationContext(), msg, Toast.LENGTH_SHORT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment