Commit dcfd97cd authored by mengcuiguang2's avatar mengcuiguang2

usermanager 优化,地图查询优化

parent 53cf784a
......@@ -92,6 +92,7 @@
<activity android:name=".main.home.HistoricalimageActivity" />
<activity android:name=".main.my.BindMobileActivity" />
<activity android:name=".splash.GuideActivity"/>
<activity android:name=".main.home.SearchMapActivity"/>
<!-- ShareSDK start -->
<activity
android:name="com.mob.tools.MobUIShell"
......
......@@ -62,14 +62,9 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
override fun onResume() {
super.onResume()
// if (!TextUtils.isEmpty(userManager.getUserID())) {
//查询用户登录信息
if (userManager.userIsLogin()) {
viewModel.getmyInfo()
// refreshHighTask()
// } else {
// 游客登录
// myPresenter.userLogin()
// }
}
}
private fun initListener() {
......
......@@ -112,8 +112,9 @@ class UserManager {
* @return true为已登录 false 为未登录
*/
fun userIsLogin(): Boolean {
val kv = MMKV.mmkvWithID(WX_OPENID).decodeString(WX_OPENID, "")
return !TextUtils.isEmpty(kv)
val wxId = MMKV.mmkvWithID(WX_OPENID).decodeString(WX_OPENID, "")
val mobile = MMKV.mmkvWithID(MOBILE).decodeString(MOBILE, "")
return !TextUtils.isEmpty(wxId)||!TextUtils.isEmpty(mobile)
}
/**
......
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