From 7986bc00e330411ffc73da24fdd168c6af8cf295 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 27 三月 2023 10:46:12 +0800
Subject: [PATCH] 0327测试
---
pages/register/register.vue | 36 +++++++++++-------------------------
1 files changed, 11 insertions(+), 25 deletions(-)
diff --git a/pages/register/register.vue b/pages/register/register.vue
index 1b90898..5767e42 100644
--- a/pages/register/register.vue
+++ b/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);
@@ -107,7 +102,7 @@
carImg: '',
drivingImg: '',
tuiJianMa: '',
- confirmPassword:''
+ confirmPassword: ''
},
fileList1: [],
fileList2: [],
@@ -149,7 +144,7 @@
message: '闀垮害鍦�6-12涓瓧绗︿箣闂�'
}
],
- confirmPassword:[
+ confirmPassword: [
{
required: true,
message: '璇疯缃垵濮嬪瘑鐮�',
@@ -182,7 +177,6 @@
trigger: ['blur', 'change']
}
},
- confirmPassword:'',
// 鍩烘湰妗堝垪鏁版嵁
radiolist1: [
{
@@ -229,7 +223,7 @@
},
methods: {
registerClick() {
- if(this.registerFormModel.password == this.registerFormModel.confirmPassword){
+ if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
this.$refs.regesterFormRef
.validate()
.then(res => {
@@ -237,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: '娉ㄥ唽鎴愬姛,鍗冲皢杩涘叆鐧诲綍锛�',
@@ -248,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 => {
@@ -260,15 +253,9 @@
uni.$u.toast('璇疯鑼冭緭鍏ュ唴瀹�');
});
} else {
- this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�')
+ this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
}
},
- // 闊宠棰戦�氳瘽
- // callingIn() {
- // uni.navigateTo({
- // url: '/pages/calling-index/calling-index'
- // });
- // },
// 鍗曢�夋浜嬩欢
groupChange(e) {
console.log('鍗曢�夋灏忕粍', e);
@@ -287,11 +274,10 @@
this.beforeChangeValue = e;
}
},
- jiaoYanPassword(){
- console.log('瀵嗙爜锛�',this.registerFormModel.password ,'纭瀵嗙爜锛�',this.confirmPassword);
- // if(this.registerFormModel.password != this.confirmPassword){
- // this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�')
- // }
+ jiaoYanPassword() {
+ if (this.registerFormModel.password != this.registerFormModel.confirmPassword) {
+ this.$u.toast('涓ゆ瀵嗙爜涓嶄竴鑷�');
+ }
},
// 涓婁紶鍥剧墖鏂规硶
// 鍒犻櫎鍥剧墖
--
Gitblit v1.9.1