付延余
2023-03-21 d36eb757af8867278125c6999fcaa5bdb902151c
pages/register/register.vue
@@ -1,6 +1,5 @@
<template>
   <view class="register">
      <!-- <home-species title="注册"></home-species> -->
      <view class="registerForm">
         <u--form :rules="rules" :model="registerFormModel" ref="regesterFormRef">
            <u-form-item labelWidth="20%" label="选择身份" borderBottom ref="roleRef" required>
@@ -36,13 +35,13 @@
               <u--input v-model="registerFormModel.carNo" placeholder="请输入内容" clearable></u--input>
            </u-form-item>
            <u-form-item prop="carImg" label="车辆照片" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required>
               <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1" width="250" height="150">
               <u-upload :fileList="fileList1" deletable @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1" width="250" height="150">
                  <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
                  mode="widthFix" style="width: 250px;height: 150px;"></image> -->
               </u-upload>
            </u-form-item>
            <u-form-item prop="drivingImg" label="行驶证" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required>
               <u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1" width="250" height="150">
               <u-upload :fileList="fileList2" deletable @afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1" width="250" height="150">
                  <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
                  mode="widthFix" style="width: 250px;height: 150px;"></image> -->
               </u-upload>
@@ -58,7 +57,6 @@
</template>
<script>
// import HomeSpecies from '@/components/home-species/HomeSpecies.vue';
import { apiRegister } from '@/api/publicInterface.js';
import { BaseUrl } from '@/api/publicInterface.js';
export default {
@@ -77,9 +75,6 @@
   //     }
   //   })
   // },
   components: {
      // HomeSpecies
   },
   // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
   onReady() {
      // this.$refs.regesterFormRef.setRules(this.rules);
@@ -236,7 +231,6 @@
                  this.registerFormModel.username = this.registerFormModel.phone;
                  apiRegister(this.registerFormModel)
                     .then(res => {
                        console.log(res);
                        if (res.data.code == 0) {
                           uni.showToast({
                              title: '注册成功,即将进入登录!',
@@ -247,7 +241,7 @@
                              uni.redirectTo({ url: '/pages/login/login' });
                           }, 1000);
                        } else {
                           this.$u.toast(res.data.msg);
                           this.$u.toast(res.data.data?res.data.data:'添加失败');
                        }
                     })
                     .catch(err => {
@@ -262,12 +256,6 @@
            this.$u.toast('两次密码不一致');
         }
      },
      // 音视频通话
      // callingIn() {
      //    uni.navigateTo({
      //       url: '/pages/calling-index/calling-index'
      //    });
      // },
      // 单选框事件
      groupChange(e) {
         console.log('单选框小组', e);