张延森 4 years ago
parent
commit
9aa7c5e600
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/pages/WoDe/YeZhuRenZheng/index.jsx

+ 6
- 0
src/pages/WoDe/YeZhuRenZheng/index.jsx View File

@@ -65,6 +65,12 @@ export default function YeZhuRenZheng () {
65 65
       clearTimeout(CodeTimer)
66 66
       setCodeTimerNum(60)
67 67
     }
68
+
69
+    return () => {
70
+      if (CodeTimer) {
71
+        clearTimeout(CodeTimer)
72
+      }
73
+    }
68 74
   }, [CodeTimerNum])
69 75
 
70 76
   const CheckPhone = () => { // 校验手机号