Your Name 2 years ago
parent
commit
132bf67d0c

+ 8
- 1
src/pages/login/components/Form.jsx View File

1
 import React from 'react';
1
 import React from 'react';
2
+import Taro from '@tarojs/taro';
2
 import { View } from '@tarojs/components';
3
 import { View } from '@tarojs/components';
3
 import { Form, FormItem, Field, Button } from '@antmjs/vantui'
4
 import { Form, FormItem, Field, Button } from '@antmjs/vantui'
4
 import { useModel } from '@/store';
5
 import { useModel } from '@/store';
31
     signin(res).then(onSuccess);
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
   return (
41
   return (
35
     <View className="login-form">
42
     <View className="login-form">
36
       <Form form={form} onFinish={onFinish}>
43
       <Form form={form} onFinish={onFinish}>
58
             placeholder="请输入您的登录密码"
65
             placeholder="请输入您的登录密码"
59
           ></Field>
66
           ></Field>
60
         </FormItem>
67
         </FormItem>
61
-        <View className="forget-password">
68
+        <View className="forget-password" onClick={onForgetPwd}>
62
           忘记密码?
69
           忘记密码?
63
         </View>
70
         </View>
64
         <View>
71
         <View>

+ 1
- 1
src/pages/reset-password/components/ResetPwd.jsx View File

48
         delta: 1,
48
         delta: 1,
49
         fail: () => {
49
         fail: () => {
50
           Taro.reLaunch({
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 View File

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