k94314517
2024-10-16 17efddc6a667670dca682bf36b51a43e99615e6d
h5/pages/driver/register.vue
@@ -49,12 +49,11 @@
</template>
<script>
import { resetPassword, sendSms } from '@/api'
import { driverRegister, sendSms } from '@/api'
export default {
  data() {
    return {
      form: {
      },
      form: {},
      isShowProtocol: false,
      countDown: 0
    }
@@ -84,7 +83,7 @@
    onLogin() {
      const { form } = this
         if (!form.name) return uni.showToast({
           title: '手机号姓名',
           title: '姓名不能为空',
           icon: 'none'
         })
      if (!form.phone) return uni.showToast({
@@ -99,20 +98,16 @@
        title: '密码不能为空',
        icon: 'none'
      })
      resetPassword({
      driverRegister({
        ...form
      }).then(res => {
        if (res && res.code == 200) {
               this.showToast('注册成功,请前往登录')
          setTimeout(() => {
            uni.showToast({
              title: '注册成功,请前往登录',
              icon: 'success',
              duration: 2000
            })
          })
          uni.redirectTo({
            url: "/pages/driver/login"
          })
                  uni.redirectTo({
                    url: "/pages/driver/login"
                  })
               }, 500)
        }
      })
    }