18034727885
2026-08-07 237bd0e7494cb73bc351b2e6002831fa593eec4c
app/src/main/java/com/igo/user/ui/HomeActivity.kt
@@ -37,6 +37,7 @@
import com.igo.user.ui.mine.SettingActivity
import com.igo.user.ui.mine.ShareAppActivity
import com.igo.user.ui.mine.UserInfoActivity
import com.igo.user.ui.mine.VerifyPhoneForUpdatePwdActivity
import com.igo.user.ui.mine.WalletActivity
import com.igo.user.utils.Const
import com.igo.user.utils.ImageUtils
@@ -265,6 +266,12 @@
            ImageUtils.load(bind.img1, data?.imgUrlTaxi)
            ImageUtils.load(bind.img3, data?.imgUrlLogistics)
        }
        showNoticeSetPasswordDialog()
    }
    override fun onNewIntent(intent: Intent?) {
        super.onNewIntent(intent)
        showNoticeSetPasswordDialog()
    }
    //刷新广告
@@ -327,4 +334,34 @@
        }
        block.invoke(IGoApplication.getCurrentLocation())
    }
    //显示提示设置密码弹窗
    private fun showNoticeSetPasswordDialog() {
        if (SPUtils.instance().getString(Const.User.NEED_SET_PASSWORD) == "1") {
            HttpManager.queryUserInfo().request(this) { _, data ->
                data?.also {
                    SPUtils.instance().put(Const.User.PHONE, it.phone).apply()
                    val tipDialog = TipDialog()
                    tipDialog.arguments = bundleOf(
                        "msg" to getString(R.string.请设置密码),
                        "ok" to getString(R.string.前往),
                        "cancel" to getString(R.string.取消),
                        "isNotifyRed" to true
                    )
                    tipDialog.setCallback(object : TipDialog.OnClickCallback {
                        override fun onOk() {
                            startActivity<VerifyPhoneForUpdatePwdActivity>(
                                "phone" to it.phone,
                                "title" to getString(R.string.set_password)
                            )
                        }
                        override fun onCancel() {
                        }
                    })
                    tipDialog.showAllowingStateLoss(supportFragmentManager, "setPassword")
                }
            }
        }
    }
}