Commit fd7f9a0d by 霍志良

feat:首页接口增加字段判断免费标签展示

parent a87a2277
......@@ -21,9 +21,9 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_PROD;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
lifecycles.add(new DemoAppLifecycles());
......
......@@ -9,7 +9,7 @@ ext {
"m-consultant" : "0.0.60.10",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.96",
"m-home" : "0.0.22.85",
"m-home" : "0.0.22.87",
"m-im" : "0.0.21.18",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10",
......@@ -93,7 +93,7 @@ ext {
"m-consultant" : "0.0.60.10",
"m-fm" : "0.0.30.07",
"m-user" : "0.0.61.96",
"m-home" : "0.0.22.85",
"m-home" : "0.0.22.87",
"m-im" : "0.0.21.18",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.8",
......
......@@ -8,6 +8,7 @@
"linkUrl": "ydl-user://h5/course?params=%7b%22url%22%3a%22https%3a%2f%2fm.ydl.com%2fcourse%2fDetail%2fv2%2f6194%22%7d",
"title": ""
},
"listenFree": false,
"askCategoryData": [
{
"cateId": 0,
......
......@@ -257,7 +257,8 @@
"imageUrl": "",
"btnLinkurl": "",
"imageBanner": "https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree": false
},
"type": 10001
},
......@@ -523,7 +524,8 @@
"imageUrl": "",
"btnLinkurl": "",
"imageBanner": "https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree": false
},
"type": 10002
},
......@@ -990,7 +992,8 @@
"imageUrl": "",
"btnLinkurl": "",
"imageBanner": "https://pic.ydlcdn.com/HFfHKt6tNj.png"
}
},
"listenFree": false
},
"type": 10003
},
......
......@@ -43,6 +43,10 @@ class HomeHeaderBean : HomeItemBaseBean {
* 专家名称
*/
var doctorName : String? = null
/*
* 倾诉免费标识
* */
var listenFree : Boolean? = null
class AskCategoryDataBean {
/**
......
......@@ -57,6 +57,11 @@ class YdlHomeAdapter(private val mContext: Context,
*/
var consultCategoryData: List<HomeHeaderBean.ConsultCategoryDateBean>? = null
/*
倾诉免费标识
* */
var listenFree:Boolean?=false
fun updateItems(list: MutableList<HomePagerDataBean>) {
if (null == this.list || this.list!!.isEmpty()) {
this.list = ArrayList()
......@@ -64,6 +69,7 @@ class YdlHomeAdapter(private val mContext: Context,
this.list.clear()
}
this.list.addAll(list)
this.listenFree= list[0]?.headerBean?.listenFree
//重置标记位
confidePosition = -1
consultPosition = -1
......@@ -131,7 +137,9 @@ class YdlHomeAdapter(private val mContext: Context,
}
//顶部预约专家,即时倾诉,心理测试按钮模块
HomeViewConfig.getOrder().buttonIndex -> {
return HomeButtonBannerViewHolder(HomeButtonBannerView(mContext, homeEvent),viewType)
return HomeButtonBannerViewHolder(HomeButtonBannerView(mContext, homeEvent,
listenFree!!
),viewType)
}
//倾诉*排解模块
HomeViewConfig.getOrder().confideIndex -> {
......
......@@ -22,7 +22,7 @@ import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
* @Company 壹点灵
* @date 2019/02/13
*/
class HomeButtonBannerView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) : LinearLayout(mContext) {
class HomeButtonBannerView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?,var listenFree:Boolean) : LinearLayout(mContext) {
private var buttonParams: LinearLayout.LayoutParams? = null
private var buttonParamsFrame: FrameLayout.LayoutParams? = null
......@@ -36,10 +36,14 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val params = RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this)
Glide.with(context)
.load(R.drawable.qingsu_new_free_temp)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
if (listenFree){
qingsuGif.visibility=View.VISIBLE
Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
}
initButtonView()
homeModuleButtonBannerFirst.setOnClickListener {
......@@ -67,7 +71,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
buttonParams = LinearLayout.LayoutParams(viewWidth, viewHeight)
buttonParamsFrame = FrameLayout.LayoutParams(viewWidth, viewHeight)
buttonParamsFrame2= FrameLayout.LayoutParams((viewWidth/2.0).toInt(), (viewHeight/2.3).toInt())
buttonParamsFrame2!!.setMargins((((viewWidth/6f).toInt())),0,0,0)
buttonParamsFrame2!!.setMargins((((viewWidth/12f).toInt())),0,0,0)
qingsuGif.layoutParams=buttonParamsFrame2
homeModuleButtonBannerFirst.layoutParams = buttonParams
......
......@@ -111,6 +111,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/qingsuGif"
android:visibility="gone"
>
</ImageView>
</FrameLayout>
......
......@@ -57,7 +57,9 @@ public class DefaultFormatPrinter {
logLines(tag, new String[]{URL_TAG + request.url()}, false);
logLines(tag, getRequest(request), true);
logLines(tag, requestBody.split(LINE_SEPARATOR), true);
NetLogUtils.debugInfo(tag, END_LINE);
if (!request.url().toString().contains("writemaidiandata")){
NetLogUtils.debugInfo(tag, END_LINE);
}
}
/**
......
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