18034727885
2026-04-07 da6e059a41cb4f221659c4d60bf8967def724822
去掉所有发送验证码人机验证
7个文件已修改
34 ■■■■■ 已修改文件
app/src/main/java/com/igo/user/network/ApiService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/network/HttpManager.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/ui/login/BindPhoneActivity.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/ui/login/ForgetActivity.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/ui/login/LoginActivity.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/ui/mine/ModifyPhoneActivity.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/ui/mine/VerifyPhoneForUpdatePwdActivity.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/igo/user/network/ApiService.kt
@@ -83,7 +83,7 @@
    @FormUrlEncoded
    @POST(Apis.GET_CODE)
    fun getCode(@Field("phone") phone: String,@Field("kaptcha") kaptcha: String,@Field("type") type: Int,@Field("token") token: String): Flowable<ResultData<JsonObject>>
    fun getCode(@Field("phone") phone: String,@Field("kaptcha") kaptcha: String,@Field("type") type: Int): Flowable<ResultData<JsonObject>>
    @FormUrlEncoded
    @POST(Apis.sedEmail)
app/src/main/java/com/igo/user/network/HttpManager.kt
@@ -77,7 +77,7 @@
     * @param type 1=身份验证,2=登录确认,3=用户注册,4=修改密码
     */
    fun sendSms(phone: String,kaptcha: String,type: Int,token:String): Flowable<ResultData<JsonObject>> {
        return request().getCode(phone,kaptcha,type,token)
        return request().getCode(phone,kaptcha,type)
    }
    /**
     * 发送验证码
app/src/main/java/com/igo/user/ui/login/BindPhoneActivity.kt
@@ -42,7 +42,7 @@
    private val et_phone by lazy { find<EditText>(R.id.et_phone) }
    private val et_code by lazy { find<EditText>(R.id.et_code) }
    private val viewModel: MainActivityViewModel by viewModels()
    private lateinit var recaptcha: RecaptchaVisual
//    private lateinit var recaptcha: RecaptchaVisual
    private val timer by lazy {
        object : CountDownTimer(60000, 1000) {
            override fun onFinish() {
@@ -85,7 +85,7 @@
            phone = areaCode.text.toString().replace("+","") + phone
            lifecycleScope.launch {
                try {
                    val token = recaptcha.runCaptcha().await()
                    val token = ""
                    viewModel.onLoginButtonClicked(token)
                    HttpManager.sendSms(phone, "", 1,token).request(
@@ -159,7 +159,7 @@
    override fun initView() {
        title = getString(R.string.完善手机号)
        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
//        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
    }
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
app/src/main/java/com/igo/user/ui/login/ForgetActivity.kt
@@ -36,7 +36,7 @@
    private val et_code by lazy { find<EditText>(R.id.et_code) }
    private val et_pwd by lazy { find<EditText>(R.id.et_pwd) }
    private val viewModel: MainActivityViewModel by viewModels()
    private lateinit var recaptcha: RecaptchaVisual
//    private lateinit var recaptcha: RecaptchaVisual
    private val timer by lazy {
        object : CountDownTimer(60000, 1000) {
            override fun onFinish() {
@@ -64,7 +64,7 @@
            lifecycleScope.launch {
                try {
                    val token = recaptcha.runCaptcha().await()
                    val token = ""
                    viewModel.onLoginButtonClicked(token)
                    HttpManager.sendSms(phone, "", 4,token).request(
@@ -132,7 +132,7 @@
    override fun initView() {
        title = getString(R.string.忘记密码)
        et_pwd.filters = arrayOf(DisableSpaceInputFilter(),LengthFilter(18))
        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
//        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
    }
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
app/src/main/java/com/igo/user/ui/login/LoginActivity.kt
@@ -84,7 +84,7 @@
    private val viewModel: MainActivityViewModel by viewModels()
    private lateinit var recaptcha: RecaptchaVisual
//    private lateinit var recaptcha: RecaptchaVisual
    private val areaCode by lazy { find<TextView>(R.id.areaCode) }
    private val tv_code by lazy { find<TextView>(R.id.tv_code) }
@@ -206,7 +206,7 @@
            phone = areaCode.text.toString().replace("+","") + phone
            lifecycleScope.launch {
                try {
                    val token = recaptcha.runCaptcha().await()
                    val token = ""
                    viewModel.onLoginButtonClicked(token)
                    HttpManager.sendSms(phone, "", 2,token).request(
@@ -494,7 +494,7 @@
    }
    override fun initView() {
        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
//        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
      //  viewModel.responseText.observe(this) { response -> myToast(response) }
app/src/main/java/com/igo/user/ui/mine/ModifyPhoneActivity.kt
@@ -40,7 +40,7 @@
    private val et_phone by lazy { find<EditText>(R.id.et_phone) }
    private val et_code by lazy { find<EditText>(R.id.et_code) }
    private val viewModel: MainActivityViewModel by viewModels()
    private lateinit var recaptcha: RecaptchaVisual
//    private lateinit var recaptcha: RecaptchaVisual
    private val countDownTimer = object : CountDownTimer(60 * 1000, 1000) {
        override fun onFinish() {
            tv_get_code.text = getString(R.string.重新获取)
@@ -129,7 +129,7 @@
        lifecycleScope.launch {
            try {
                val token = recaptcha.runCaptcha().await()
                val token = ""
                viewModel.onLoginButtonClicked(token)
                HttpManager.sendSms(phone, "", 1,token).request(
@@ -165,7 +165,7 @@
    override fun initView() {
        title = getString(R.string.修改手机号)
        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
//        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
    }
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
app/src/main/java/com/igo/user/ui/mine/VerifyPhoneForUpdatePwdActivity.kt
@@ -34,7 +34,7 @@
    private val tv_phone by lazy { find<TextView>(R.id.tv_phone) }
    private val et_code by lazy { find<EditText>(R.id.et_code) }
    private val viewModel: MainActivityViewModel by viewModels()
    private lateinit var recaptcha: RecaptchaVisual
//    private lateinit var recaptcha: RecaptchaVisual
    private val countDownTimer = object : CountDownTimer(60 * 1000, 1000) {
        override fun onFinish() {
            tv_get_code.text = getString(R.string.重新获取)
@@ -73,14 +73,14 @@
    override fun initView() {
        title = getString(R.string.set_pwd)
        tv_phone.text = getString(R.string.设置密码需先验证您的手机号,phone.hidePhone())
        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
//        recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL)
    }
    private fun sendSms() {
        lifecycleScope.launch {
            try {
                val token = recaptcha.runCaptcha().await()
                val token = ""
                viewModel.onLoginButtonClicked(token)
                HttpManager.sendSms(IGoApplication.phone, "", 4,token).request(