Commit 7940dd18 by 严久程

Merge branch 'feature/userinfo_collect' of…

Merge branch 'feature/userinfo_collect' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into feature/userinfo_collect

 Conflicts:
	config.gradle
parents a655c6a6 f7e35c52
......@@ -20,7 +20,6 @@ import com.alibaba.android.arouter.launcher.ARouter
import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.analytics.MobclickAgent
import com.ydl.component.music.FragmentContainerActivity
import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter
import com.ydl.media.audio.PlayService
import com.ydl.ydlcommon.modular.ModularServiceManager
......@@ -34,6 +33,13 @@ import com.yidianling.user.widget.SecretDescriptionDialog.OnSecretDescriptionDia
import com.yidianling.user.widget.SecretDialog
import com.yidianling.user.widget.SecretDialog.OnSecretDialogListener
import kotlinx.android.synthetic.main.activity_main.*
import com.ydl.ydlcommon.utils.ResUtil.getResources
import com.alibaba.fastjson.serializer.AwtCodec.support
import android.support.v4.app.SupportActivity
import android.support.v4.app.SupportActivity.ExtraData
import com.ydl.component.mvp.DemoContract
/**
* Created by haorui on 2019-09-01 .
......@@ -216,7 +222,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
override fun reLoadData() {
mPresenter.loadHome()
}
......
......@@ -45,9 +45,9 @@ ext {
"m-confide" : "0.0.48.6",
"m-consultant" : "0.0.57.4",
"m-fm" : "0.0.29.3",
"m-user" : "0.0.59.14",
"m-user" : "0.0.59.23",
"m-home" : "0.0.19.1",
"m-im" : "0.0.16.4",
"m-im" : "0.0.16.9",
"m-dynamic" : "0.0.6.1",
"m-muse" : "0.0.28.9",
......@@ -69,10 +69,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.6",
"ydl-platform" : "0.0.39.16",
//第二步 若干
"ydl-webview" : "0.0.38.5",
"ydl-webview" : "0.0.38.15",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.1",
......@@ -115,10 +115,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.6",
"ydl-platform" : "0.0.39.16",
//第二步 若干
"ydl-webview" : "0.0.38.5",
"ydl-webview" : "0.0.38.15",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.1",
......
......@@ -172,7 +172,7 @@ class CollectUserInformationView(
return@setOnClickListener
}
ageStr = "年龄:${(Calendar.getInstance().get(Calendar.YEAR) - year)}岁"
if ((Calendar.getInstance().get(Calendar.YEAR) - year) < 16) {
if ((Calendar.getInstance().get(Calendar.YEAR) - year) <= 16) {
isNeedShowCheckAgeDialog = true
}
......
......@@ -10,6 +10,7 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -72,7 +73,7 @@ class CollectFocusActivity : BaseActivity() {
}).setNullTitleDesc(
"确定要退出吗?\n" +
"很多人在这里得到了帮助哦~"
"很多人在这里得到了帮助哦"
).setCancelText("确定").setSureText("取消")
}
collectOutDialog?.show()
......@@ -94,7 +95,7 @@ class CollectFocusActivity : BaseActivity() {
userInfoBean.userInfoList = ArrayList()
userInfoBean.userInfoList.add(
UserInfoCollectParam(
mList.filter { it.isFocus }.joinToString { it.id },
mList.filter { it.isFocus }.map { it.id }.joinToString(","),
"consultAttention"
)
)
......@@ -223,6 +224,7 @@ class CollectFocusActivity : BaseActivity() {
@SuppressLint("CheckResult")
private fun jumpToNewUserH5() {
var cateIds = mList.filter { it.isFocus }.map { it.id }.joinToString(",")
UserHttpImpl.getInstance().getNewUserJumpUrl()
.compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.newThread())
......@@ -232,7 +234,7 @@ class CollectFocusActivity : BaseActivity() {
upload_focus_info_btn.postDelayed({
completeDialog?.dismiss()
if (!isFinishing) {
val h5Params = H5Params(it, "mainPage")
val h5Params = H5Params("$it?cateIds=$cateIds", H5Params.BackLimit.NewUserBackLimit)
NewH5Activity.start(this, h5Params)
}
}, 1000)
......
......@@ -3,6 +3,7 @@ package com.yidianling.user.ui.collect
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Color
import android.support.v4.content.ContextCompat
import android.util.Log
import android.view.KeyEvent
import android.widget.NumberPicker
......@@ -94,7 +95,7 @@ class CollectSexAndBirthActivity : BaseActivity() {
}
}).setNullTitleDesc("确定要退出吗?\n" +
"很多人在这里得到了帮助哦~").setCancelText("确定").setSureText("取消")
"很多人在这里得到了帮助哦").setCancelText("确定").setSureText("取消")
}
collectOutDialog?.show()
}
......@@ -114,17 +115,19 @@ class CollectSexAndBirthActivity : BaseActivity() {
val param = RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RxImageTool.dp2px(175f))
user_collect_date_pick.layoutParams = param
user_collect_date_pick.value = selectedYear
user_collect_date_pick?.value = selectedYear
}
}
user_collect_date_pick.displayedValues = yearList.toTypedArray()
user_collect_date_pick.value = selectedYear
user_collect_date_pick.minValue = 1900
user_collect_date_pick.maxValue = nowYear
user_collect_date_pick.descendantFocusability = NumberPicker.FOCUS_BLOCK_DESCENDANTS // 关闭编辑功能
user_collect_date_pick.wrapSelectorWheel = false // 关闭循环
user_collect_date_pick.value = selectedYear
//更新用户选择的年份
user_collect_date_pick.setOnValueChangedListener { _, _, newVal -> selectedYear = newVal }
}
......@@ -164,6 +167,7 @@ class CollectSexAndBirthActivity : BaseActivity() {
})
}
@SuppressLint("ResourceAsColor")
private fun checkUpSelect() {
if (selectedSex == 1) {
male_rl.setBackgroundResource(R.drawable.user_collect_select_bg)
......@@ -171,7 +175,7 @@ class CollectSexAndBirthActivity : BaseActivity() {
male_img.setImageResource(R.drawable.user_male_selected)
female_img.setImageResource(R.drawable.user_female_unselected)
male_txt.setTextColor(Color.parseColor("#1DA1F2"))
female_txt.setTextColor(Color.parseColor("#242424"))
female_txt.setTextColor(ContextCompat.getColor(mContext, R.color.user_main_theme))
sex_and_birth_upload_btn.setBackgroundResource(R.drawable.user_collect_bottom_btn_bg)
} else if (selectedSex == 2) {
......@@ -180,7 +184,7 @@ class CollectSexAndBirthActivity : BaseActivity() {
male_img.setImageResource(R.drawable.user_male_unselected)
female_img.setImageResource(R.drawable.user_female_selected)
male_txt.setTextColor(Color.parseColor("#242424"))
female_txt.setTextColor(Color.parseColor("#1DA1F2"))
female_txt.setTextColor(ContextCompat.getColor(mContext, R.color.user_main_theme))
sex_and_birth_upload_btn.setBackgroundResource(R.drawable.user_collect_bottom_btn_bg)
} else {
......
package com.yidianling.user.ui.collect.widget
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Color
import android.graphics.Typeface
import android.support.v4.content.ContextCompat
import android.util.AttributeSet
import android.view.Gravity
import android.view.View
......@@ -52,12 +55,15 @@ class CollectFocusView : LinearLayout {
}
@SuppressLint("ResourceAsColor")
fun setFocus(focus: Boolean) {
if (focus) {
user_focus_title.setTextColor(Color.parseColor("#1DA1F2"))
user_focus_desc.setTextColor(Color.parseColor("#1DA1F2"))
user_focus_title.setTextColor(ContextCompat.getColor(mContext, R.color.user_main_theme))
user_focus_desc.setTextColor(ContextCompat.getColor(mContext, R.color.user_main_theme))
user_focus_title.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
setBackgroundResource(R.drawable.user_collect_select_bg)
} else {
user_focus_title.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
user_focus_title.setTextColor(Color.parseColor("#242424"))
user_focus_desc.setTextColor(Color.parseColor("#666666"))
setBackgroundResource(R.drawable.user_collect_unselect_bg)
......
......@@ -8,6 +8,6 @@
android:color="@color/user_main_theme"/>
<solid
android:color="#EDF8FF"/>
android:color="@color/user_main_theme_bright"/>
</shape>
\ No newline at end of file
......@@ -38,7 +38,7 @@
android:textSize="18dp"
android:textColor="#242424"
android:layout_marginTop="40dp"
android:layout_marginBottom="17dp"
android:layout_marginBottom="22dp"
android:textStyle="bold"/>
<LinearLayout
......@@ -121,12 +121,12 @@
android:layout_weight="1"
android:layout_marginTop="22dp"
android:layout_marginBottom="2dp"
android:gravity="center">
android:gravity="center_horizontal">
<com.yidianling.user.ui.collect.widget.CustomNumberPicker
android:id="@+id/user_collect_date_pick"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
</com.yidianling.user.ui.collect.widget.CustomNumberPicker>
</RelativeLayout>
......@@ -139,13 +139,14 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center">
android:gravity="center_horizontal">
<TextView
android:id="@+id/sex_and_birth_upload_btn"
android:layout_marginLeft="17dp"
android:layout_marginRight="17dp"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="确定"
android:textSize="17dp"
......
......@@ -15,7 +15,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提交成功"
android:text="提交成功!"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold"
......
......@@ -12,8 +12,7 @@
android:layout_height="wrap_content"
android:text="情绪压力"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold" />
android:textSize="18dp" />
<TextView
android:id="@+id/user_focus_desc"
......@@ -24,8 +23,7 @@
android:maxLines="1"
android:text="#焦虑#困惑#失眠多梦#"
android:textColor="#666666"
android:textSize="12dp"
android:textStyle="bold" />
android:textSize="12dp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="22dp"/>
<gradient
android:angle="180"
android:startColor="@color/user_main_theme"
android:endColor="@color/user_main_theme"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="22dp"/>
<gradient
android:angle="180"
android:startColor="@color/user_main_theme_66"
android:endColor="@color/user_main_theme_66"/>
</shape>
\ No newline at end of file
......@@ -2,6 +2,8 @@
<resources>
<!--主题色-->
<color name="user_main_theme">#fdbd00</color>
<color name="user_main_theme_66">#66fdbd00</color>
<!--主题浅色-->
<color name="user_main_theme_light">#FFEC8C</color>
<!--主题亮色-->
......
......@@ -2,6 +2,8 @@
<resources>
<!--主题色-->
<color name="user_main_theme">#1da1f2</color>
<color name="user_main_theme_66">#661da1f2</color>
<!--主题浅色-->
<color name="user_main_theme_light">#60BDF5</color>
<!--主题亮色-->
......
......@@ -2,18 +2,24 @@ package com.ydl.ydlcommon.base
import android.app.Activity
import android.content.res.Resources
import android.graphics.Color
import android.os.Bundle
import android.support.annotation.LayoutRes
import android.support.v7.app.AppCompatActivity
import android.util.Log
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout
import com.trello.rxlifecycle2.android.ActivityEvent
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.lifecycle.IActivityLifecycleable
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.ui.LoadingDialogFragment
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.AndroidSystemHelper
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.yidianling.common.tools.RxImageTool
import io.reactivex.subjects.BehaviorSubject
import io.reactivex.subjects.Subject
import kotlin.properties.Delegates
......@@ -24,7 +30,7 @@ import kotlin.properties.Delegates
* e-mail : zhangwch@yidianling.com
* time : 2018/01/27
*/
abstract class BaseActivity : AppCompatActivity(),IActivityLifecycleable {
abstract class BaseActivity : AppCompatActivity(), IActivityLifecycleable {
private val mLifecycleSubject = BehaviorSubject.create<ActivityEvent>()
var mContext: Activity by Delegates.notNull()
......@@ -57,18 +63,48 @@ abstract class BaseActivity : AppCompatActivity(),IActivityLifecycleable {
override fun setContentView(@LayoutRes layoutResID: Int) {
if (getStatusViewOptions()?.isAddStatusView) {
val returnViews = StatusBarUtils.initStatusBarView(this, layoutResID, getStatusViewOptions())
val options = getStatusViewOptions()
options.bottomStatusColor = getDefaultBottomColor()
val returnViews =
StatusBarUtils.initStatusBarView(this, layoutResID, getStatusViewOptions())
if(returnViews.size > 1){
if (returnViews.size > 1) {
statusView = returnViews[1];
}
super.setContentView(returnViews[0])
AndroidSystemHelper.fixAndroidBug5497Workaround(this)
} else {
//判定是否有底部小横条
if (StatusBarUtils.hasBottomNavigatorLine(this)) {
val containerView =
View.inflate(this, R.layout.platform_layout_bottom_fit_root, null) as ViewGroup
val rootView = containerView.findViewById<FrameLayout>(R.id.ll_bottom_fit_root);
val layoutView = View.inflate(this, layoutResID, null)
val params =
ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
rootView.addView(layoutView, params)
val bottomView = containerView.findViewById<View>(R.id.ll_bottom_fit_v)
bottomView.visibility = View.VISIBLE
bottomView.setBackgroundColor(getDefaultBottomColor())
super.setContentView(containerView)
} else {
super.setContentView(layoutResID)
}
}
}
open fun getDefaultBottomColor(): Int {
return Color.parseColor("#00000000")
}
override fun onDestroy() {
super.onDestroy()
......@@ -88,7 +124,7 @@ abstract class BaseActivity : AppCompatActivity(),IActivityLifecycleable {
return AndroidSystemHelper.fixResourcesScale(res)
}
open fun getStatusViewOptions():StatusBarOptions{
open fun getStatusViewOptions(): StatusBarOptions {
return StatusBarOptions()
}
......
......@@ -55,7 +55,7 @@ abstract class BaseFragment : Fragment() ,IFragmentLifecycleable{
layoutResId != 0 -> {
val childView = inflater.inflate(layoutResId, container, false)
if (getStatusViewOptions().isAddStatusView){
val returnViews = StatusBarUtils.initStatusBarView(activity!!, childView, getStatusViewOptions())
val returnViews = StatusBarUtils.initStatusBarView(activity!!, childView, getStatusViewOptions(), true)
return returnViews[0]
}else{
......
package com.ydl.ydlcommon.bean
import android.graphics.Color
import android.os.Build
/**
......@@ -20,6 +21,7 @@ class StatusBarOptions {
return "#1da1f2"
}
}
var bottomStatusColor: Int = Color.parseColor("#00000000") //底部颜色默认透明色,个别页面自己设置即可
constructor(isAddStatusView: Boolean = false, statusBarDarkMode: Boolean= false) {
this.isAddStatusView = isAddStatusView
......
......@@ -15,6 +15,7 @@ import android.support.v4.widget.DrawerLayout
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.widget.FrameLayout
import android.widget.LinearLayout
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.bean.StatusBarOptions
......@@ -997,25 +998,38 @@ class StatusBarUtils {
return initStatusBarView(
context,
child,
statusBarOptions
statusBarOptions,
false
)
}
fun initStatusBarView(
context: Activity,child:View,
statusBarOptions: StatusBarOptions
context: Activity,
child:View,
statusBarOptions: StatusBarOptions,
isFragment: Boolean = false
): Array<View> {
var returnView = arrayOfNulls<View>(2)
val containerView = View.inflate(context, R.layout.platform_layout_root, null) as ViewGroup
val rootView = containerView.findViewById<LinearLayout>(R.id.ll_root);
val rootView = containerView.findViewById<FrameLayout>(R.id.ll_root)
val statusView =
initStatus(context, rootView, statusBarOptions);
initStatus(context, containerView, statusBarOptions)
val params =
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
rootView.addView(child, params)
if (!isFragment && hasBottomNavigatorLine(context)) {
val bottomView = containerView.findViewById<View>(R.id.ll_bottom_v)
bottomView.visibility = View.VISIBLE
bottomView.setBackgroundColor(statusBarOptions.bottomStatusColor)
}
returnView[0] = containerView
if (statusView != null){
......@@ -1025,21 +1039,39 @@ class StatusBarUtils {
return returnView as Array<View>
}
/**
* 判定是否含有底部小横条,当底部导航高度像素小于50时,认为是有小横条
*/
fun hasBottomNavigatorLine(context: Context): Boolean {
return try {
val clazz = Class.forName("com.android.internal.R\$dimen")
val `object` = clazz.newInstance()
val heightStr = clazz.getField("navigation_bar_height").get(`object`).toString()
val height = Integer.parseInt(heightStr)
val bottomNavigatorHeight = context.resources.getDimensionPixelSize(height)
bottomNavigatorHeight < 50
} catch (e: Exception) {
false
}
}
fun initStatus(
context: Activity,
rootView: View,
containerView: View,
statusBarOptions: StatusBarOptions
):View? {
var statusView:View ?=null
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
statusView = rootView.findViewById<View>(R.id.view_status_place_holder)
statusView = containerView.findViewById<View>(R.id.view_status_place_holder)
statusView?.setBackgroundColor(Color.parseColor(statusBarOptions.statusColor))
val statusBarHeight =
getStatusBarHeight(context)
statusView?.let {
val layoutParams = statusView?.getLayoutParams() as LinearLayout.LayoutParams
layoutParams.height = statusBarHeight
statusView?.layoutParams = layoutParams
}
setTransparentForImageView(context, null)
}
if (statusBarOptions.statusBarDarkMode) {
......
......@@ -3,8 +3,9 @@
android:shape="rectangle">
<gradient
android:endColor="#fdbd00"
android:startColor="#FFEC8C"/>
android:angle="0"
android:startColor="#fdbd00"
android:endColor="#fdbd00"/>
<corners android:bottomRightRadius="8dp" />
......
......@@ -3,6 +3,7 @@
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="#1DA1F2"
android:startColor="#23B2FA"/>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/ll_bottom_fit_root"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
</FrameLayout>
<View
android:id="@+id/ll_bottom_fit_v"
android:layout_width="match_parent"
android:layout_height="10dp"
android:visibility="gone">
</View>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -11,4 +10,19 @@
android:background="@color/platform_white"
android:layout_height="0dp"/>
<FrameLayout
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
</FrameLayout>
<View
android:id="@+id/ll_bottom_v"
android:layout_width="match_parent"
android:layout_height="10dp"
android:visibility="gone">
</View>
</LinearLayout>
\ No newline at end of file
......@@ -14,7 +14,7 @@ class H5Params : Serializable {
this.title = title
}
constructor(url: String, backLimit: String, boolean: Boolean = true): super() {
constructor(url: String, backLimit: BackLimit, boolean: Boolean = true): super() {
this.url =url
if (boolean) {
this.backLimit = backLimit
......@@ -69,7 +69,11 @@ class H5Params : Serializable {
var phone: String? = null
/**
* h5页面返回按钮限制(根据传入的backLimit判断返回至哪个页面)
* mainPage -- 首页
*/
var backLimit: String = ""
var backLimit: BackLimit = BackLimit.NewUserBackLimit
enum class BackLimit{
NewUserBackLimit //新用户H5页面返回拦截
}
}
\ No newline at end of file
......@@ -623,10 +623,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
finish();
}
else if ("mainPage".equals(h5Params.getBackLimit())) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
}
else {
if (ActivityManager.Companion.getInstance().getActivitys().size() == 1) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
......@@ -823,10 +819,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title.setImageListener(v -> {
if (wv_content.canGoBack()) {
wv_content.goBack();
}
else if ("mainPage".equals(h5Params.getBackLimit())) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
} else {
finish();
}
......@@ -841,12 +833,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (h5Params.getShowUrlTitle()) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
}
else if ("mainPage".equals(h5Params.getBackLimit())) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
}
else {
} else {
if (ActivityManager.Companion.getInstance().getActivitys().size() == 1) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
}
......@@ -1140,11 +1127,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (h5Params.isSplash()) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
}
else if ("mainPage".equals(h5Params.getBackLimit())) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
finish();
}else {
} else {
if (ActivityManager.Companion.getInstance().getActivitys().size() == 1) {
WebModularServiceUtils.Companion.startMain(NewH5Activity.this);
}
......@@ -1288,8 +1271,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
/**
* 如果进行返回按钮限制,则判断限制类型
*/
if ("mainPage".equals(h5Params.getBackLimit())) {
ModularServiceManager.INSTANCE.provide(IAppService.class).mainIntent(this);
if (H5Params.BackLimit.NewUserBackLimit.equals(h5Params.getBackLimit())) {
callJSFunc("showGuideModal");
return false;
}
......
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