Commit b447274c by 严久程

课程列表页促销标签

parent 9f6ab835
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
package com.ydl.component.base; package com.ydl.component.base;
import android.content.Context; import android.content.Context;
import com.ydl.component.BuildConfig; import com.ydl.component.BuildConfig;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import com.ydl.ydlcommon.base.config.IConfigModule; import com.ydl.ydlcommon.base.config.IConfigModule;
import com.ydl.ydlcommon.base.config.YDLConstants; import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.base.delegate.IAppLifecycles; import com.ydl.ydlcommon.base.delegate.IAppLifecycles;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.List; import java.util.List;
...@@ -25,9 +27,9 @@ public final class DemoGlobalConfig implements IConfigModule { ...@@ -25,9 +27,9 @@ public final class DemoGlobalConfig implements IConfigModule {
@Override @Override
public void applyOptions(@NotNull Context context, @NotNull GlobalConfig.Builder builder) { public void applyOptions(@NotNull Context context, @NotNull GlobalConfig.Builder builder) {
builder.setFrom( "ydl".equals(BuildConfig.FLAVOR) ?YDLConstants.FROM_YDL :YDLConstants.FROM_XLZX) builder.setFrom("ydl".equals(BuildConfig.FLAVOR) ? YDLConstants.FROM_YDL : YDLConstants.FROM_XLZX)
.addUrl("github", APP_DOMAIN) .addUrl("github", APP_DOMAIN)
.setEnv(YDLConstants.ENV_PROD) .setEnv(YDLConstants.ENV_TEST)
.setDebug(BuildConfig.DEBUG); .setDebug(BuildConfig.DEBUG);
} }
} }
...@@ -102,6 +102,9 @@ public class Course { ...@@ -102,6 +102,9 @@ public class Course {
*/ */
public boolean isBuy = false; public boolean isBuy = false;
public boolean joinActivity = false;
public String activityImg;
public CourseHostInfoBean courseHostInfo; public CourseHostInfoBean courseHostInfo;
} }
\ No newline at end of file
...@@ -76,11 +76,11 @@ class CourseItemNewView : ConstraintLayout { ...@@ -76,11 +76,11 @@ class CourseItemNewView : ConstraintLayout {
.into(iv_head) .into(iv_head)
//活动标签 //活动标签
if(!TextUtils.isEmpty(course.courseHostInfo?.activityImg)){ if (course.joinActivity && !TextUtils.isEmpty(course.activityImg)) {
img_activity.visibility = View.VISIBLE img_activity.visibility = View.VISIBLE
GlideApp.with(context).load(course.courseHostInfo?.activityImg).into(img_activity) GlideApp.with(context).load(course.activityImg).into(img_activity)
tv_title.text = "\u3000\u3000\u3000\u0020"+course.title tv_title.text = "\u3000\u3000\u3000\u0020" + course.title
}else{ } else {
img_activity.visibility = View.GONE img_activity.visibility = View.GONE
tv_title.text = course.title tv_title.text = course.title
} }
......
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