Commit 68e9b8e0 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent b2192874
......@@ -308,11 +308,10 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
// val city = "北京市"
squarePresenter.saveGps(curLatitude.toString(), curLongitude.toString(), city)
if (city.isEmpty()) {
LogUtil.d("mcg=----->>>mapLocationListener upcity空空空空空空空空空空空空空空")
} else {
if (!isGetCity) {
LogUtil.d("mcg=----->>>mapLocationListener upcity")
vpAdapter?.let {
(it.getFragments()[0] as SquareListFragment).refresh()
}
......@@ -342,8 +341,8 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
override fun getBaseMsgSuc(data: UserBean) {
this.idStatus = data.idcardStatus
if (data.planSex == 1) {
// if (false) {
// if (data.planSex == 1) {
if (false) {
// 男
ll_user_root.visibility = View.GONE
if (!UserManager.getInstance().userHasBasic()) {
......@@ -351,10 +350,16 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent)
}
} else if (data.planSex == 2) {
// } else {
// } else if (data.planSex == 2) {
} else {
// 女
// 认证状态,0-未认证 1 已认证 2-认证中
if (AppConfig.basicUserProfileFlag || UserManager.getInstance().userHasBasic()) {
vpAdapter?.let {
(it.getFragments()[0] as SquareListFragment).refresh()
}
}
if (idStatus == 0) {
// 未认证
ll_user_root.visibility = View.VISIBLE
......
......@@ -46,9 +46,8 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
private var mType = 1
private var hotPage = 1 // 分页
private var hotPageSize = Constant.PAGE_SIZE // 分页
private lateinit var squareAdapter: SquareAdapter
private var isLoadFlag=false
private lateinit var squareAdapter: SquareAdapter
override fun getContentViewLayoutID() = R.layout.fragment_square_list
......
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