|
@@ -15,11 +15,11 @@
|
15
|
15
|
</div>
|
16
|
16
|
<div class="formItem name">
|
17
|
17
|
<label>姓 名</label>
|
18
|
|
- <input class="duiqi" type="text" :placeholder="placeHolderName" v-model="formData.userName" @focus="nameFocus" @blur="nameBlur"/>
|
|
18
|
+ <input class="duiqi" type="text" :class="{placeHodler: userName}" v-model="formData.userName" @focus="nameFocus" @blur="nameBlur"/>
|
19
|
19
|
</div>
|
20
|
20
|
<div class="formItem phonediv">
|
21
|
21
|
<label>手 机 号</label>
|
22
|
|
- <input class="duiqi" type="text" :placeholder="placeHolderPhone" v-model="formData.phone" @focus="phoneFocus" @blur="phoneBlur"/>
|
|
22
|
+ <input class="duiqi" type="text" :class="{placeHodler: phone}" v-model="formData.phone" @focus="phoneFocus" @blur="phoneBlur"/>
|
23
|
23
|
</div>
|
24
|
24
|
<div class="formItem intendedProductdiv" @click="showPicker = true">
|
25
|
25
|
<label>意向产品</label>
|
|
@@ -60,19 +60,19 @@ export default {
|
60
|
60
|
Unchecked: `./images/signup/Unchecked.png`,
|
61
|
61
|
ischecked: true,
|
62
|
62
|
showPicker: false,
|
63
|
|
- placeHolderPhone:'请输入手机号',
|
64
|
|
- placeHolderName:'请输入姓名',
|
65
|
63
|
formData: {
|
66
|
64
|
role: '用户',
|
67
|
65
|
userName: undefined,
|
68
|
|
- phone: undefined,
|
|
66
|
+ phone: '请输入手机号',
|
69
|
67
|
intendedProduct: undefined,
|
70
|
68
|
address: undefined
|
71
|
69
|
},
|
72
|
70
|
productList: ['COLMO子母太空舱', 'COLMO星图干洗护理套装', 'COLMO星辰干洗护理套装', 'COLMO星际干洗护理套装', 'COLMO TURING套系智慧干洗护理空间站'],
|
73
|
71
|
pickerVisibleProduct: false,
|
74
|
72
|
intendedProduct: undefined,
|
75
|
|
- address: undefined
|
|
73
|
+ address: undefined,
|
|
74
|
+ phone:true,
|
|
75
|
+ userName:true
|
76
|
76
|
}
|
77
|
77
|
},
|
78
|
78
|
|
|
@@ -114,7 +114,7 @@ export default {
|
114
|
114
|
if (!this.formData.userName) {
|
115
|
115
|
alert('请输入您的姓名')
|
116
|
116
|
return false
|
117
|
|
- } else if (!this.formData.phone) {
|
|
117
|
+ } else if (!this.formData.phone || this.formData.phone==='请输入手机号') {
|
118
|
118
|
alert('请输入您的手机号')
|
119
|
119
|
return false
|
120
|
120
|
} else if (!this.formData.intendedProduct) {
|
|
@@ -129,16 +129,28 @@ export default {
|
129
|
129
|
} else return true
|
130
|
130
|
},
|
131
|
131
|
nameFocus() {
|
132
|
|
- this.placeHolderName=''
|
|
132
|
+ if (this.formData.userName === '请输入您的姓名') {
|
|
133
|
+ this.userName = false
|
|
134
|
+ this.formData.userName = ''
|
|
135
|
+ }
|
133
|
136
|
},
|
134
|
137
|
phoneFocus() {
|
135
|
|
- this.placeHolderPhone=''
|
|
138
|
+ if (this.formData.phone === '请输入手机号') {
|
|
139
|
+ this.phone = false
|
|
140
|
+ this.formData.phone = ''
|
|
141
|
+ }
|
136
|
142
|
},
|
137
|
143
|
nameBlur() {
|
138
|
|
- this.placeHolderName='请输入姓名'
|
|
144
|
+ if (this.formData.userName === '') {
|
|
145
|
+ this.userName = true
|
|
146
|
+ this.formData.userName = '请输入您的姓名'
|
|
147
|
+ }
|
139
|
148
|
},
|
140
|
149
|
phoneBlur() {
|
141
|
|
- this.placeHolderPhone='请输入手机号'
|
|
150
|
+ if (this.formData.phone === '') {
|
|
151
|
+ this.phone = true
|
|
152
|
+ this.formData.phone = '请输入手机号'
|
|
153
|
+ }
|
142
|
154
|
},
|
143
|
155
|
sumbit() {
|
144
|
156
|
if (this.verification()) {
|
|
@@ -234,6 +246,10 @@ export default {
|
234
|
246
|
}
|
235
|
247
|
}
|
236
|
248
|
|
|
249
|
+ .placeHodler {
|
|
250
|
+ color: #696f6e !important;
|
|
251
|
+ }
|
|
252
|
+
|
237
|
253
|
.grey {
|
238
|
254
|
color: #696969;
|
239
|
255
|
}
|