Your Name 2 yıl önce
ebeveyn
işleme
132bf67d0c

+ 8
- 1
src/pages/login/components/Form.jsx Dosyayı Görüntüle

@@ -1,4 +1,5 @@
1 1
 import React from 'react';
2
+import Taro from '@tarojs/taro';
2 3
 import { View } from '@tarojs/components';
3 4
 import { Form, FormItem, Field, Button } from '@antmjs/vantui'
4 5
 import { useModel } from '@/store';
@@ -31,6 +32,12 @@ export default (props) => {
31 32
     signin(res).then(onSuccess);
32 33
   }
33 34
 
35
+  const onForgetPwd = () => {
36
+    Taro.navigateTo({
37
+      url: '/pages/reset-password/index'
38
+    });
39
+  }
40
+
34 41
   return (
35 42
     <View className="login-form">
36 43
       <Form form={form} onFinish={onFinish}>
@@ -58,7 +65,7 @@ export default (props) => {
58 65
             placeholder="请输入您的登录密码"
59 66
           ></Field>
60 67
         </FormItem>
61
-        <View className="forget-password">
68
+        <View className="forget-password" onClick={onForgetPwd}>
62 69
           忘记密码?
63 70
         </View>
64 71
         <View>

+ 1
- 1
src/pages/reset-password/components/ResetPwd.jsx Dosyayı Görüntüle

@@ -48,7 +48,7 @@ export default (props) => {
48 48
         delta: 1,
49 49
         fail: () => {
50 50
           Taro.reLaunch({
51
-            url: '/pages/home/index',
51
+            url: '/pages/login/index',
52 52
           })
53 53
         }
54 54
       })

+ 2
- 1
src/pages/reset-password/index.jsx Dosyayı Görüntüle

@@ -1,4 +1,5 @@
1 1
 import React from 'react';
2
+import Taro from '@tarojs/taro';
2 3
 import { View } from '@tarojs/components';
3 4
 import Page from '@/layouts/index';
4 5
 import { changePwd } from '@/services/wxma'; 
@@ -23,7 +24,7 @@ export default (props) => {
23 24
       ...data,
24 25
     }
25 26
 
26
-    return changePwd(formData.current);
27
+    return changePwd(formData.current)
27 28
   }
28 29
   
29 30
   return (