doum
2025-09-11 7298d5354963a88643a543b51b90192dc9fc934c
h5/pages/driver/register.vue
@@ -3,7 +3,7 @@
    <image class="login_bg" src="@/static/login_bg@2x.png" />
    <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
    <view class="login_title">安泰物流智慧园区</view>
    <view class="login_title">物流车司机登录</view>
    <view class="login_title">物流车司机</view>
    <view class="login_list">
      <view class="login_list_item">
        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
@@ -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)
        }
      })
    }