Browse Source

重置密码修复

wbspool 1 year ago
parent
commit
ee1a5c4891

+ 1 - 1
BusinessAirFryer/src/main/assets/config_010.json

@@ -1,5 +1,5 @@
 {
-  "baseQrUrl": "https://recettes.schneiderconsumer.com/h5/index.html",
+  "baseQrUrl": "https://icook.schneiderconsumer.com/h5/index.html",
   "workModes": [
     {
       "type": "ADAPTED_COOKING",

+ 10 - 1
BusinessAuth/src/main/java/com/develop/auth/ui/MemberForgotFragment.kt

@@ -67,7 +67,16 @@ class MemberForgotFragment : CommonBVMFragment<FragmentMemberForgotBinding, Memb
         viewModel.resetPasswordLiveData.observe(viewLifecycleOwner) {
             dismissPlainDialog()
             it.msg?.apply {
-                showToast(this)
+
+                if("验证码不正确" == this){
+                    showToast(getString(com.develop.common.R.string.verify_code_uncorrect))
+                }else if("操作成功" == this){
+                    showToast(getString(com.develop.common.R.string.success))
+                }else{
+                    showToast(this)
+                }
+
+
             }
         }
         viewModel.sendEmailLiveData.observe(viewLifecycleOwner){

+ 2 - 5
BusinessAuth/src/main/java/com/develop/auth/viewmodel/MemberViewModel.kt

@@ -12,16 +12,13 @@ import com.develop.common.data_repo.db.AuthModel
 import com.develop.common.data_repo.db.entity.UserInfo
 import com.develop.common.data_repo.net.Api
 import com.develop.common.data_repo.net.model.request.*
-import com.develop.common.data_repo.net.model.response.LoginResult
-import com.develop.common.data_repo.net.model.response.PerfectInfoResult
-import com.develop.common.data_repo.net.model.response.RegisterResult
-import com.develop.common.data_repo.net.model.response.VerifyCodeResult
 import com.develop.common.tag.API_TOKEN
 import com.develop.common.tag.CURRENT_USER_ID
 import com.develop.common.tag.CURRENT_USER_ID_TAG
 import com.develop.common.tag.LOGIN_TAG
 import com.drake.net.Post
 import com.develop.base.util.UnPeekLiveData
+import com.develop.common.data_repo.net.model.response.*
 
 class MemberViewModel : BaseViewModel() {
     private var mVerifyCodeKey = ""
@@ -98,7 +95,7 @@ class MemberViewModel : BaseViewModel() {
         captcha: String,
         password: String
     ) = scopeNetLife {
-        Post<Any>(Api.UPDATE_PWD) {
+        Post<ResetPasswordResult>(Api.UPDATE_PWD) {
             body = UpdatePasswordBody.genUpdatePasswordBody(
                 email,
                 password,

+ 9 - 0
BusinessCommon/src/main/java/com/develop/common/data_repo/net/model/response/ResetPasswordResult.kt

@@ -0,0 +1,9 @@
+package com.develop.common.data_repo.net.model.response
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class ResetPasswordResult(
+    val token: String,
+    val user: User
+)

+ 3 - 0
BusinessCommon/src/main/res/values-fr/strings.xml

@@ -279,4 +279,7 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="dev_error">Atención: Le robot ne fonctionne pas correctement. Effectuez un contrôle.</string>
     <string name="reset_button">Remise à zéro</string>
     <string name="add_to_favourite">Ajouter à mes recettes favorites</string>
+    <string name="verify_code_uncorrect">Code de vérification incorrect.</string>
+    <string name="success">Opération réussie.</string>
+
 </resources>

+ 2 - 0
BusinessCommon/src/main/res/values/strings.xml

@@ -290,5 +290,7 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="dev_error">Attention: The device is abnormal, please check the device</string>
     <string name="login_expire_tips">Failed to login, please try again</string>
     <string name="add_to_favourite">Add to favourite</string>
+    <string name="verify_code_uncorrect">Verify code uncorrect</string>
+    <string name="success">Success</string>
 
 </resources>