Commit fd7f9a0d by 霍志良

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

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