Commit 3dfd2b49 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent bcd165d0
...@@ -148,7 +148,9 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView { ...@@ -148,7 +148,9 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView {
override fun onClick(view: View) { override fun onClick(view: View) {
if(UserManager.getInstance().newFlag) {
if (!UserHelper.instance.isUserHaveBasic()) return if (!UserHelper.instance.isUserHaveBasic()) return
}
when (view.id) { when (view.id) {
R.id.tab_rl_video -> clickTab1Layout() R.id.tab_rl_video -> clickTab1Layout()
...@@ -172,11 +174,14 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView { ...@@ -172,11 +174,14 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView {
clickTab4Layout() clickTab4Layout()
} }
R.id.tab_rl_my -> { R.id.tab_rl_my -> {
if(UserManager.getInstance().newFlag){
if (showAuthDialog3) { if (showAuthDialog3) {
// 弹出真人认证 // 弹出真人认证
UserHelper.instance.isUserAuth() UserHelper.instance.isUserAuth()
showAuthDialog3 = false showAuthDialog3 = false
} }
}
clickTab5Layout() clickTab5Layout()
} }
} }
...@@ -184,6 +189,7 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView { ...@@ -184,6 +189,7 @@ class MainActivity : BaseActivity(), View.OnClickListener, MainActView {
override fun getBaseMsgSuc(data: UserBean) { override fun getBaseMsgSuc(data: UserBean) {
if (data.activiteFlag == 1) { if (data.activiteFlag == 1) {
// if (true) {
//匹配用户 //匹配用户
tab_rl_square.visibility = View.VISIBLE tab_rl_square.visibility = View.VISIBLE
tab_rl_invite.visibility = View.VISIBLE tab_rl_invite.visibility = View.VISIBLE
......
...@@ -73,7 +73,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -73,7 +73,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
initBanner() initBanner()
// initLocation() // initLocation()
tv_location.setOnClickListener(this) tv_location.setOnClickListener(this)
iv_user_next.setOnClickListener(this) ll_user_root.setOnClickListener(this)
iv_user_quit.setOnClickListener(this) iv_user_quit.setOnClickListener(this)
iv_share.setOnClickListener { iv_share.setOnClickListener {
...@@ -112,7 +112,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -112,7 +112,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
if (TextUtils.isEmpty(UserManager.getInstance().userID)) { if (TextUtils.isEmpty(UserManager.getInstance().userID)) {
squarePresenter.userLogin() squarePresenter.userLogin()
} else { } else {
TrackManager.getInstance().getBaseMsg() squarePresenter.getBaseMsg()
} }
if (AppConfig.basicUserProfileFlag || UserManager.getInstance().userHasBasic()) { if (AppConfig.basicUserProfileFlag || UserManager.getInstance().userHasBasic()) {
...@@ -348,8 +348,13 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -348,8 +348,13 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
ll_user_root.visibility = View.GONE ll_user_root.visibility = View.GONE
} else { } else {
// 女 // 女
if (AppConfig.basicUserProfileFlag || UserManager.getInstance().userHasBasic()) {
ll_user_root.visibility = View.GONE
}else{
ll_user_root.visibility = View.VISIBLE ll_user_root.visibility = View.VISIBLE
} }
}
} }
fun ViewPager2.desensitization() { fun ViewPager2.desensitization() {
...@@ -373,7 +378,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -373,7 +378,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
R.id.tv_location -> { R.id.tv_location -> {
requestPermissions() requestPermissions()
} }
R.id.iv_user_next -> { R.id.ll_user_root -> {
val intent= Intent(requireContext(), BasicUserProfileActivity::class.java) val intent= Intent(requireContext(), BasicUserProfileActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent) startActivity(intent)
...@@ -383,23 +388,4 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -383,23 +388,4 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
} }
} }
} }
fun newGirlDialog() {
if (!requireActivity().isFinishing && newGirlDialog != null && newGirlDialog!!.isShowing()) return
newGirlDialog = NewGirlDialog(requireContext(), object : DialogListener() {
override fun onClick(v: View) {
when (v.id) {
R.id.iv_dialog_quit -> {
newGirlDialog!!.dismiss()
}
R.id.iv_dialog_next -> {
UserHelper.instance.isUserAuth()
}
}
}
})
newGirlDialog!!.show()
}
} }
\ No newline at end of file
...@@ -196,6 +196,10 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -196,6 +196,10 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
} }
} }
override fun getBaseMsgSuc(data: UserBean) {
TODO("Not yet implemented")
}
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
hotPage = 1 hotPage = 1
srl_square.resetNoMoreData() srl_square.resetNoMoreData()
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
android:id="@+id/content_layout" android:id="@+id/content_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"
android:layout_marginBottom="56dp" android:layout_marginBottom="56dp"
android:orientation="vertical" /> android:orientation="vertical" />
......
...@@ -88,18 +88,18 @@ ...@@ -88,18 +88,18 @@
android:layout_marginBottom="200dp" android:layout_marginBottom="200dp"
android:src="@mipmap/ic_share_image" /> android:src="@mipmap/ic_share_image" />
<LinearLayout <RelativeLayout
android:id="@+id/ll_user_root" android:id="@+id/ll_user_root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:background="#90000000"
android:visibility="gone" android:visibility="gone"
android:background="#50000000"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/iv_user_next" android:id="@+id/iv_user_next"
android:layout_width="330dp" android:layout_width="330dp"
android:layout_centerInParent="true"
android:layout_height="315dp" android:layout_height="315dp"
android:src="@mipmap/bg_new_girl" /> android:src="@mipmap/bg_new_girl" />
...@@ -114,5 +114,5 @@ ...@@ -114,5 +114,5 @@
android:src="@mipmap/bg_pay_calcel" /> android:src="@mipmap/bg_pay_calcel" />
</LinearLayout> </RelativeLayout>
</FrameLayout> </FrameLayout>
\ No newline at end of file
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