Commit 60c50b67 authored by jyx's avatar jyx

首页添加客服入口

parent 8a804c9b
...@@ -10,8 +10,8 @@ android { ...@@ -10,8 +10,8 @@ android {
applicationId "com.duben.funplayskitsu" applicationId "com.duben.funplayskitsu"
minSdkVersion rootProject.ext.androidMinSdkVersion minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 720 versionCode 721
versionName "7.2.0" versionName "7.2.1"
flavorDimensions "default" flavorDimensions "default"
// dex突破65535的限制 // dex突破65535的限制
......
...@@ -33,7 +33,6 @@ import com.duben.funplayskitsu.ui.fragment.base.LazyLoadBaseFragment ...@@ -33,7 +33,6 @@ import com.duben.funplayskitsu.ui.fragment.base.LazyLoadBaseFragment
import com.duben.funplayskitsu.utils.AppPreferencesManager import com.duben.funplayskitsu.utils.AppPreferencesManager
import com.duben.funplayskitsu.utils.SpanUtils import com.duben.funplayskitsu.utils.SpanUtils
import com.duben.library.utils.GlideUtils import com.duben.library.utils.GlideUtils
import com.duben.library.utils.json.JsonUtil
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.funplayskitsu.ui.activitys.* import com.duben.funplayskitsu.ui.activitys.*
import kotlinx.android.synthetic.main.fragment_main.* import kotlinx.android.synthetic.main.fragment_main.*
...@@ -138,7 +137,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -138,7 +137,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
// showRecommendAct() // showRecommendAct()
} }
AppConfig.showVipAdDialog=false AppConfig.showVipAdDialog = false
} }
} }
...@@ -151,12 +150,24 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -151,12 +150,24 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
iv_main_watching_close.setOnClickListener(this) iv_main_watching_close.setOnClickListener(this)
tv_main_watching_goto.setOnClickListener(this) tv_main_watching_goto.setOnClickListener(this)
ll_lucky.setOnClickListener(this) ll_lucky.setOnClickListener(this)
iv_kefu_main.setOnClickListener(this)
context?.let {
GlideUtils.loadImageViewGifForCenterCrop(
it,
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_kefu_main.png",
iv_kefu_main,
1
)
}
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return if (AntiShake.check(v?.id)) return
when (v?.id) { when (v?.id) {
R.id.iv_kefu_main -> {
(requireActivity() as MainActivity).backPhoneDialog()
}
R.id.iv_main_watching_close -> { R.id.iv_main_watching_close -> {
LocalVedioManager.closeCacheVedio() LocalVedioManager.closeCacheVedio()
ll_main_watching_root.visibility = View.GONE ll_main_watching_root.visibility = View.GONE
...@@ -196,8 +207,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -196,8 +207,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
override fun onItemClick(position: Int) { override fun onItemClick(position: Int) {
if (topList.size > 0) { if (topList.size > 0) {
LocalVedioManager.startVedioDetailActivityForType( LocalVedioManager.startVedioDetailActivityForType(
requireActivity(), requireActivity(),
topList[position] topList[position]
) )
} }
} }
...@@ -266,9 +277,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -266,9 +277,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val cacheVedio = LocalVedioManager.getCacheVedio() val cacheVedio = LocalVedioManager.getCacheVedio()
if (cacheVedio != null) { if (cacheVedio != null) {
GlideUtils.loadImageViewGifForCenterCrop( GlideUtils.loadImageViewGifForCenterCrop(
requireContext(), requireContext(),
cacheVedio.coverImage, cacheVedio.coverImage,
iv_main_watching_pic iv_main_watching_pic
) )
tv_main_watching_name.text = cacheVedio.title tv_main_watching_name.text = cacheVedio.title
tv_main_watching_text1.text = "上次观看至第${cacheVedio.seeIndex}集" tv_main_watching_text1.text = "上次观看至第${cacheVedio.seeIndex}集"
...@@ -305,22 +316,22 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -305,22 +316,22 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
} }
banner.addBannerLifecycleObserver(this) banner.addBannerLifecycleObserver(this)
.setAdapter(ImageTitleAdapter(bannerList)) .setAdapter(ImageTitleAdapter(bannerList))
.setOnBannerListener { data2, position -> .setOnBannerListener { data2, position ->
val banner = data.list.get(position) val banner = data.list.get(position)
if (banner.createType == 4) { if (banner.createType == 4) {
// 九宫格 // 九宫格
val bundle = Bundle() val bundle = Bundle()
bundle.putBoolean(NineActivity.IS_AD_SHOW, true) bundle.putBoolean(NineActivity.IS_AD_SHOW, true)
readyGo(NineActivity::class.java, bundle) readyGo(NineActivity::class.java, bundle)
} else { } else {
LocalVedioManager.startVedioDetailActivityForType( LocalVedioManager.startVedioDetailActivityForType(
requireActivity(), requireActivity(),
banner banner
) )
}
} }
}
} }
} }
...@@ -368,16 +379,16 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -368,16 +379,16 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val need = data.need val need = data.need
if (complete >= need) { if (complete >= need) {
tv_lucky_status.text = SpanUtils() tv_lucky_status.text = SpanUtils()
.append("可领取") .append("可领取")
.setForegroundColor(resources.getColor(R.color.apk_uninstalled)) .setForegroundColor(resources.getColor(R.color.apk_uninstalled))
.create() .create()
} else { } else {
tv_lucky_status.text = SpanUtils() tv_lucky_status.text = SpanUtils()
.append(complete.toString()) .append(complete.toString())
.setForegroundColor(resources.getColor(R.color.red)) .setForegroundColor(resources.getColor(R.color.red))
.append("/") .append("/")
.append(need.toString()) .append(need.toString())
.create() .create()
} }
} }
...@@ -411,7 +422,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -411,7 +422,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) { if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
// 1、第一次打开app并关闭付费页进首页时出现一次 // 1、第一次打开app并关闭付费页进首页时出现一次
val mainFirstRecommend = val mainFirstRecommend =
AppPreferencesManager.get().getBoolean(Constant.MAIN_FIRST_RECOMMEND, false) AppPreferencesManager.get().getBoolean(Constant.MAIN_FIRST_RECOMMEND, false)
if (!mainFirstRecommend) { if (!mainFirstRecommend) {
if (AppConfig.enterVipAct) { if (AppConfig.enterVipAct) {
AppConfig.enterVipAct = false AppConfig.enterVipAct = false
......
...@@ -243,15 +243,26 @@ ...@@ -243,15 +243,26 @@
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/iv_kefu_main"
android:layout_width="80dp"
android:layout_height="88dp"
android:layout_marginEnd="5dp"
android:layout_marginBottom="90dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/ll_lucky" android:id="@+id/ll_lucky"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_marginBottom="120dp" android:layout_marginBottom="120dp"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"> app:layout_constraintEnd_toEndOf="parent">
......
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