Commit 3dfd2b49 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

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