Commit 42cadc97 by 严久程

Merge branch 'feature/v3' of…

Merge branch 'feature/v3' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into feature/v3
parents 5f353dff c5e2b42b
......@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_TEST;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
......@@ -44,15 +44,15 @@ ext {
//第三步 若干
"m-confide" : "0.0.41.2",
"m-consultant" : "0.0.51.4",
"m-consultant" : "0.0.51.11",
"m-fm" : "0.0.23.4",
"m-user" : "0.0.41.1",
"m-home" : "0.0.6.20",
"m-home" : "0.0.6.25",
"m-muse" : "0.0.20.4",
"m-tests" : "0.0.15.3",
"m-course" : "0.0.34.4",
"m-im" : "0.0.3.3",
"m-im" : "0.0.3.7",
"m-dynamic" : "0.0.1.2",
......@@ -66,7 +66,7 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.4",
"m-im-api" : "0.0.5",
"m-dynamic-api" : "0.0.1",
//-------------- 功能组件 --------------
......@@ -74,14 +74,14 @@ ext {
"ydl-platform" : "0.0.29.3",
//第二步 若干
"ydl-webview" : "0.0.28.9",
"ydl-webview" : "0.0.28.11",
"ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.3",
"ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.5.17",
]
......@@ -111,7 +111,7 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.4",
"m-im-api" : "0.0.5",
"m-dynamic-api" : "0.0.1",
//-------------- 功能组件 --------------
......@@ -119,7 +119,7 @@ ext {
"ydl-platform" : "0.0.29.3",
//第二步 若干
"ydl-webview" : "0.0.28.6",
"ydl-webview" : "0.0.28.9",
"ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4",
......@@ -127,7 +127,7 @@ ext {
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.3",
"ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.5.17",
]
......
......@@ -1341,6 +1341,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
override fun onRefresh() {
refresh(false)
recommendListView.requestData()
}
//刷新列表
......
......@@ -1278,6 +1278,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onRefresh() {
refresh(false)
recommendListView.requestData()
}
//刷新列表
......
......@@ -19,18 +19,18 @@ public class ExpertSearchBigShotBean {
* topicImages : [{"id":88,"parentId":62,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:45 PM","updateTime":"Dec 16, 2019 4:31:42 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":133,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:23:00 PM","updateTime":"Dec 16, 2019 4:34:48 PM","createrId":0,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":134,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:03 PM","updateTime":"Dec 16, 2019 4:29:58 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":146,"parentId":62,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:15 PM","updateTime":"Dec 16, 2019 4:34:01 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private int id;
private String specialTopicName;
private int specialTopicType;
private String specialTopicTitle;
private String specialTopicSubhead;
private int status;
private int weight;
private int jumpWay;
private String createTime;
private String updateTime;
private int createrId;
private String specialTopicUrl;
private int id = 0;
private String specialTopicName = "";
private int specialTopicType = 0;
private String specialTopicTitle = "";
private String specialTopicSubhead = "";
private int status = 0;
private int weight = 0;
private int jumpWay = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String specialTopicUrl = "";
private List<TopicImagesBean> topicImages;
public int getId() {
......@@ -149,14 +149,14 @@ public class ExpertSearchBigShotBean {
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private int id;
private int parentId;
private int imageType;
private int isShow;
private String createTime;
private String updateTime;
private int createrId;
private String imageUrl;
private int id = 0;
private int parentId = 0;
private int imageType = 0;
private int isShow = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String imageUrl = "";
public int getId() {
return id;
......
......@@ -20,18 +20,18 @@ public class ExpertSearchRecommandBean {
* topicImages : [{"id":103,"parentId":68,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:47 PM","updateTime":"Dec 16, 2019 4:31:55 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":140,"parentId":68,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:05 PM","updateTime":"Dec 16, 2019 4:30:13 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":152,"parentId":68,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:18 PM","updateTime":"Dec 16, 2019 4:34:15 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private int id;
private String specialTopicName;
private int specialTopicType;
private String specialTopicTitle;
private String specialTopicSubhead;
private int status;
private int weight;
private int jumpWay;
private String createTime;
private String updateTime;
private int createrId;
private String specialTopicUrl;
private int id = 0;
private String specialTopicName = "";
private int specialTopicType = 0;
private String specialTopicTitle = "";
private String specialTopicSubhead = "";
private int status = 0;
private int weight = 0;
private int jumpWay = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String specialTopicUrl = "";
private List<TopicImagesBean> topicImages;
public int getId() {
......@@ -150,14 +150,14 @@ public class ExpertSearchRecommandBean {
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private int id;
private int parentId;
private int imageType;
private int isShow;
private String createTime;
private String updateTime;
private int createrId;
private String imageUrl;
private int id = 0;
private int parentId = 0;
private int imageType = 0;
private int isShow = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String imageUrl = "";
public int getId() {
return id;
......
......@@ -54,7 +54,6 @@ class RecommendItemView : LinearLayout {
layoutParams = params
orientation = HORIZONTAL
setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), 0, RxImageTool.dp2px(11f))
View.inflate(mContext, R.layout.consultant_expert_search_top_item_view, this)
}
......
......@@ -47,7 +47,8 @@ class RecommendListView : LinearLayout {
}
private var mContext: Context? = null
private var mSceneSpecialTopicList = ArrayList<ExpertSearchRecommandBean>() // viewPager的所有item数据
private var mSceneSpecialTopicList =
ArrayList<ExpertSearchRecommandBean>() // viewPager的所有item数据
private var mViewPagerList = ArrayList<LinearLayout>() //viewPager的数据
private var mDoctorSpecialTopicsList = ArrayList<ExpertSearchBigShotBean>() //viewPager的数据
private var minHeight: Int = 0 // viewPager最小高度
......@@ -84,18 +85,21 @@ class RecommendListView : LinearLayout {
.filter { true }
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
mSceneSpecialTopicList.clear()
mDoctorSpecialTopicsList.clear()
itemListView.removeAllViews()
if (null != mContext) {
if (it.sceneSpecialTopics == null || it.sceneSpecialTopics.size == 0) {
recommendViewPager.visibility = View.GONE
recommendViewPagerIndicator.visibility = View.GONE
}else {
} else {
mSceneSpecialTopicList.addAll(it.sceneSpecialTopics)
recommendViewPager.visibility = View.VISIBLE
recommendViewPagerIndicator.visibility = View.VISIBLE
}
if (it.doctorSpecialTopics == null || it.doctorSpecialTopics.size == 0) {
itemListView.visibility = View.GONE
}else {
} else {
mDoctorSpecialTopicsList.addAll(it.doctorSpecialTopics)
itemListView.visibility = View.VISIBLE
}
......@@ -129,10 +133,12 @@ class RecommendListView : LinearLayout {
private fun initViewPager() {
mContext?.let {
mViewPagerList.clear()
/**
* 渲染第一页数据
*/
val firstPagerHeight = RxImageTool.dp2px(60f * (getMinData(mSceneSpecialTopicList.size + 1, 4 + 1) / 2))
val firstPagerHeight =
RxImageTool.dp2px(60f * (getMinData(mSceneSpecialTopicList.size + 1, 4 + 1) / 2))
val firstPager = getLinearLayout(
mContext!!,
firstPagerHeight, VERTICAL
......@@ -141,11 +147,17 @@ class RecommendListView : LinearLayout {
val ll = getLinearLayout(mContext!!, RxImageTool.dp2px(60f), HORIZONTAL)
val item = RecommendItemView(mContext!!)
item.setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item.setData(mSceneSpecialTopicList[index])
ll.addView(item)
if (index + 1 < mSceneSpecialTopicList.size) {
val item1 = RecommendItemView(mContext!!)
item1.setData(mSceneSpecialTopicList[index])
item1.setPadding(0, RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item1.setData(mSceneSpecialTopicList[index + 1])
ll.addView(item1)
}
firstPager.addView(ll)
......@@ -155,7 +167,8 @@ class RecommendListView : LinearLayout {
/**
* 渲染第二页数据
*/
val secondPagerHeight = RxImageTool.dp2px(60f * ((mSceneSpecialTopicList.size - 4 + 1) / 2))
val secondPagerHeight =
RxImageTool.dp2px(60f * ((mSceneSpecialTopicList.size - 4 + 1) / 2))
maxHeight = secondPagerHeight + RxImageTool.dp2px(11f)
if (mSceneSpecialTopicList.size > 4) {
val secondPager = getLinearLayout(
......@@ -166,11 +179,17 @@ class RecommendListView : LinearLayout {
val ll = getLinearLayout(mContext!!, RxImageTool.dp2px(60f), HORIZONTAL)
val item = RecommendItemView(mContext!!)
item.setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item.setData(mSceneSpecialTopicList[index])
ll.addView(item)
if (index + 1 < mSceneSpecialTopicList.size) {
val item1 = RecommendItemView(mContext!!)
item1.setData(mSceneSpecialTopicList[index])
item1.setPadding(0, RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item1.setData(mSceneSpecialTopicList[index + 1])
ll.addView(item1)
}
secondPager.addView(ll)
......@@ -180,7 +199,12 @@ class RecommendListView : LinearLayout {
recommendViewPager.adapter = RecommendViewPagerAdapter()
recommendViewPager.currentItem = 0
setSelectedIndex(0) // 默认为左边选中
if (mSceneSpecialTopicList.size < 4) {
recommendViewPagerIndicator.visibility = View.GONE
} else {
setSelectedIndex(0) // 默认为左边选中
}
addListener()
}
......@@ -313,7 +337,11 @@ class RecommendListView : LinearLayout {
}
mDoctorSpecialTopicsList.size == 3 -> {
val mView = BigShotThreeView(mContext!!)
mView.setUrl(mDoctorSpecialTopicsList[0], mDoctorSpecialTopicsList[1], mDoctorSpecialTopicsList[2])
mView.setUrl(
mDoctorSpecialTopicsList[0],
mDoctorSpecialTopicsList[1],
mDoctorSpecialTopicsList[2]
)
itemListView.addView(mView)
}
mDoctorSpecialTopicsList.size == 4 -> {
......@@ -335,7 +363,11 @@ class RecommendListView : LinearLayout {
mView.layoutParams = params
val mView1 = BigShotTwoView(mContext!!)
mView.setUrl(mDoctorSpecialTopicsList[0], mDoctorSpecialTopicsList[1], mDoctorSpecialTopicsList[2])
mView.setUrl(
mDoctorSpecialTopicsList[0],
mDoctorSpecialTopicsList[1],
mDoctorSpecialTopicsList[2]
)
mView1.setUrl(mDoctorSpecialTopicsList[3], mDoctorSpecialTopicsList[4])
itemListView.addView(mView)
itemListView.addView(mView1)
......@@ -347,8 +379,16 @@ class RecommendListView : LinearLayout {
mView.layoutParams = params
val mView1 = BigShotThreeView(mContext!!)
mView.setUrl(mDoctorSpecialTopicsList[0], mDoctorSpecialTopicsList[1], mDoctorSpecialTopicsList[2])
mView1.setUrl(mDoctorSpecialTopicsList[3], mDoctorSpecialTopicsList[4], mDoctorSpecialTopicsList[5])
mView.setUrl(
mDoctorSpecialTopicsList[0],
mDoctorSpecialTopicsList[1],
mDoctorSpecialTopicsList[2]
)
mView1.setUrl(
mDoctorSpecialTopicsList[3],
mDoctorSpecialTopicsList[4],
mDoctorSpecialTopicsList[5]
)
itemListView.addView(mView)
itemListView.addView(mView1)
}
......
......@@ -32,6 +32,7 @@
android:gravity="left|top"
android:text="标题"
android:textSize="14dp"
android:maxLines="1"
android:textColor="#242424"
android:textStyle="bold"/>
......@@ -41,6 +42,7 @@
android:layout_height="wrap_content"
android:gravity="left|top"
android:text="我是描述"
android:maxLines="1"
android:textSize="11dp"
android:textColor="#999999"/>
</LinearLayout>
......
package com.yidianling.consultant.constants
package com.yidianling.home.constants
/**
* Created by xj on 2019/7/1.
......
......@@ -28,7 +28,7 @@ import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.consultant.constants.HomeBIConstants
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.R
import com.yidianling.home.api.event.HomeModuleTabEvent
import com.yidianling.home.constract.IHomeContract
......
......@@ -24,6 +24,7 @@ import com.yidianling.consultant.api.IConsultantService
import com.yidianling.home.R
import com.yidianling.home.adapter.YdlHomeAdapter
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.dialog.ActivityDialog
import com.yidianling.home.dialog.ActivityGuideDialog
import com.yidianling.home.event.HomeImpl
......@@ -39,6 +40,7 @@ import kotlinx.android.synthetic.xlzx.home_layout_home_module_head_bg.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_input.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_toolbar.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
* @描述: 壹点灵首页fragment
......@@ -63,10 +65,12 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
* tablayou上次选中的tab下标
*/
private var confideLastSelectPosition = 0
private var confideLastSelectType = ""
/**
* 咨询tablayout上次选中的西边
*/
private var consultLastSelectPosition = 0
private var consultLastSelectType= ""
/**
* 悬浮tablayout监听事件
*/
......@@ -177,11 +181,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
*/
override fun getConfideData(type: String, selectPosition: Int) {
confideLastSelectPosition = selectPosition
confideLastSelectType = type
mPresenter?.getConfideData(type, selectPosition)
}
override fun getConsultData(type: String, selectPosition: Int) {
consultLastSelectPosition = selectPosition
consultLastSelectType = type
mPresenter?.getConsultData(type, selectPosition)
}
......@@ -261,6 +267,13 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
//每次全局更新后重置下标位
confideLastSelectPosition = 0
consultLastSelectPosition = 0
for (bean in list) {
//咨询模块
if (bean.type == YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW) {
consultLastSelectType = bean.headerBean!!.consultCategoryData!![0].id.toString()
}
}
}
private fun initHeader(list: MutableList<HomePagerDataBean>) {
......@@ -388,7 +401,10 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override fun onResume() {
super.onResume()
if (userVisibleHint) {
mPresenter?.loadHomeData()
mPresenter?.getConsultData(consultLastSelectType, consultLastSelectPosition)
mPresenter?.getConfideData(confideLastSelectType, confideLastSelectPosition)
mPresenter?.prepareCoupon(activity)
//走咨询助理浮层展示逻辑,是否展示由内部条件与接口判断
......
......@@ -134,7 +134,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
ContextCompat.getDrawable(context, R.drawable.home_consult_chat_rest_bg)
}
tv_consult_chat.setOnClickListener {
homeEvent!!.consultChatClick(bodyBean.doctorUid.toString())
homeEvent!!.consultChatClick(bodyBean.uid.toString())
}
}
......
......@@ -23,7 +23,7 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.api.IConsultantService
import com.yidianling.consultant.constants.HomeBIConstants
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.R
import com.yidianling.home.adapter.YdlHomeAdapter
import com.yidianling.home.constract.IHomeContract
......@@ -294,7 +294,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
consultLastSelectPosition = 0
//初始化fragment中的tablayout布局,悬停效果使用
for (bean in list) {
//倾述模块
//咨询模块
if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
initTabLayout(bean.headerBean!!.listenCategoryDate)
initConsultTabLayout(bean.headerBean!!.consultCategoryData)
......
......@@ -5,14 +5,14 @@ import android.text.TextUtils
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean
import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.URLUtils
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean
import kotlinx.android.synthetic.ydl.home_consult_item_view.view.*
/**
......@@ -113,7 +113,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
*/
private fun setConfideButton(bodyBean: HomeConsultBean.ListBean) {
tv_consult_chat.setOnClickListener {
homeEvent!!.consultChatClick(bodyBean.doctorUid.toString())
homeEvent!!.consultChatClick(bodyBean.uid.toString())
}
}
......
......@@ -11,7 +11,7 @@ import android.view.animation.DecelerateInterpolator
import android.view.animation.TranslateAnimation
import android.widget.LinearLayout
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.constants.HomeBIConstants
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-im-api"
//开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -58,7 +58,7 @@ public class MsgReceiveHelper {
int sum = 0;
for (int i=0;i<list.length;i++) {
try {
sum += Integer.parseInt(list[0].toString());
sum += Integer.parseInt(list[i].toString());
}catch (Exception e) {
sum += 0;
}
......
......@@ -59,7 +59,7 @@ class NewMultiMessageFragment : BaseFragment() {
}
override fun getStatusViewOptions(): StatusBarOptions {
return StatusBarOptions(true)
return StatusBarOptions(isAddStatusView = true, statusBarDarkMode = true)
}
override fun onCreate(savedInstanceState: Bundle?) {
......
......@@ -66,11 +66,11 @@ public class RequestLogInterceptor implements Interceptor {
String bodyString = null;
if (responseBody != null && isParseable(responseBody.contentType())) {
bodyString = printResult(request, originalResponse);
if (mRequestHandler != null){
mRequestHandler.onHttpResultResponse(bodyString, chain, originalResponse);
}
}
if (mRequestHandler != null)
mRequestHandler.onHttpResultResponse(bodyString, chain, originalResponse);
if(mIsDebug) {
final List<String> segmentList = request.url().encodedPathSegments();
final String header = originalResponse.headers().toString();
......
......@@ -130,18 +130,22 @@ class HttpConfig {
chain: Interceptor.Chain,
response: Response
): Response {
val gson = GsonProvider.getGson()
val resultData= gson.fromJson(httpResult, BaseAPIResponse::class.java)
when (resultData.code) {
AUTH_INEFFECTIVE_CODE -> {
//签证签名失败
ToastUtil.toastShort(resultData.msg)
//更新动态密钥
if (resultData.data!=null){
var authBean = gson.fromJson<AuthBean>(gson.toJson(resultData.data),AuthBean::class.java)
DYNAMIC_SESSION_KEY = authBean?.appKey.toString()
try {
val gson = GsonProvider.getGson()
val resultData= gson.fromJson(httpResult, BaseAPIResponse::class.java)
when (resultData.code) {
AUTH_INEFFECTIVE_CODE -> {
//签证签名失败
ToastUtil.toastShort(resultData.msg)
//更新动态密钥
if (resultData.data!=null){
var authBean = gson.fromJson<AuthBean>(gson.toJson(resultData.data),AuthBean::class.java)
DYNAMIC_SESSION_KEY = authBean?.appKey.toString()
}
}
}
} catch (e: Exception) {
LogUtil.e("getRequestHandler:$e")
}
return response
}
......
......@@ -45,8 +45,13 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att
msg_new.setVisibility(View.INVISIBLE)
}*/
un_read_num.text = ModularServiceManager.provide(IImService::class.java).getAllUnReadNum().toString()
var unreadNum = ModularServiceManager.provide(IImService::class.java).getAllUnReadNum()
if (unreadNum <= 0) {
un_read_num.visibility = View.GONE
}
else {
un_read_num.text = unreadNum.toString()
}
}
......
......@@ -38,6 +38,7 @@
android:id="@+id/un_read_num"
android:layout_width="wrap_content"
android:layout_height="14dp"
android:minWidth="14dp"
android:textSize="10dp"
tools:text="10"
android:textColor="#ffffff"
......
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