소스 검색

验证码样式

zxz 3 년 전
부모
커밋
f47ec128ae
1개의 변경된 파일16개의 추가작업 그리고 47개의 파일을 삭제
  1. 16 47
      pageD/identity/companyIdentity.vue

+ 16 - 47
pageD/identity/companyIdentity.vue

@@ -65,13 +65,12 @@
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" name="input" v-model="identityAuthenticationInfo.customerPhone"></input>
+					<input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
 				</view>
 			</view>
 			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode' class='getcode'>{{sendText}}</button>
 				<view style='width:70%;position:relative;margin-left: 200px;'>
-
 					<input v-model='verifyCode' placeholder="请输入验证码" type="text">
 				</view>
 			</view>
@@ -136,7 +135,7 @@
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" name="input" v-model="identityAuthenticationInfo.customerPhone"></input>
+					<input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
 				</view>
 			</view>
 			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
@@ -165,7 +164,6 @@
 		name: "buy",
 		data() {
 			return {
-				radios: 2,
 				inputContent: null,
 				customerPhone: '',
 				consentStatus: true,
@@ -176,9 +174,10 @@
 				sendText: '获取验证码',
 				platform: '',
 				sendDisabled: false,
-				identityAuthenticationInfo: {
-					customerPhone: ''
+				userInfo:{
+					phone: ''
 				},
+				identityAuthenticationInfo: {},
 			};
 		},
 		methods: {
@@ -190,14 +189,12 @@
 					this.consentStatus = false
 					this.consentStatus1 = true
 				}
-
 			},
-
 			getcode() {
 				var that = this
-				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.customerPhone)) {
+				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.identityAuthenticationInfo.customerPhone)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
-							phone: this.customerPhone
+							phone: this.identityAuthenticationInfo.customerPhone
 						}).then(res => {
 							if (res.data.code == 200) {
 								that.sendDisabled = true
@@ -233,25 +230,20 @@
 						duration: 2000
 					})
 				}
-
+			},
+			phoneinput(e){
+				if(e.detail.value.length==11){
+					this.codestatus=true
+				}
 			},
 			verifyCodeInput(e) {
 				this.verifyCode = e.detail.value
 			},
-			phoneinput(e) {
-				if (e.detail.value.length == 11) {
-					this.codestatus = true
-				}
-			},
 			cancel() {
 				this.inputShow = false
 				this.inputStatus = 'none'
 				this.isPhone = false
 			},
-			radioschenge(index) {
-				console.log(index)
-				this.radios = index
-			},
 			commit() {
 				this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this.identityAuthenticationInfo)
 					.then(res => {
@@ -272,7 +264,6 @@
 	.center {
 		padding: 10px 20px;
 	}
-
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -283,17 +274,6 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
-
-	.verificationCode {
-		margin-top: 20px;
-		background: #F5F6F9;
-		color: #AFB3BF;
-	}
-
-	.verificationCode:after {
-		border: none;
-	}
-
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -311,34 +291,23 @@
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-
-	.verificationCode.active {
-		background: #22C572;
-		color: #fff;
-	}
-
 	.getcode {
 		font-size: 14px;
 		position: absolute;
-		/* 	right:0; */
 		top: 50%;
 		transform: translateY(-50%);
 		color: #AFB3BF;
 		background: #F5F6F9;
 		height: 30px;
 		line-height: 30px;
-
 	}
-
-	.getcode:after {
+	.getcode.active {
 		border: none;
 	}
-
-	.uni-navigator {
-		display: inline-block;
-		color: #22C572;
+	.uni-navigator{
+		display:inline-block;
+		color:#22C572;
 	}
-
 	.getcode.active {
 		background: #22C572;
 		color: #fff;