| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | import { driverRegister, sendSms } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | }, |
| | | form: {}, |
| | | isShowProtocol: false, |
| | | countDown: 0 |
| | | } |
| | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.name) return uni.showToast({ |
| | | title: '手机号姓名', |
| | | title: '姓名不能为空', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.phone) return uni.showToast({ |
| | |
| | | title: '密码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | driverRegister({ |
| | | ...form |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: '注册成功,请前往登录', |
| | | icon: 'success', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | }) |