Introduction.vue
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
<div class="introduction">
<h2 @click="back"><</h2>
<h1>自我介绍</h1>
<van-field
v-model="message"
rows="6"
autosize
type="textarea"
maxlength="100"
placeholder="介绍自己,讲述您的故事~"
show-word-limit
@input="getIntroduction"
/>
<div class="btn" @click="go">下一步</div>
</div>
</template>
<script>
export default {
name: 'introduction',
components: {
},
data () {
return {
message: ''
}
},
methods:{
back () {
this.$router.go(-1)
},
go () {
this.$router.push('condition')
},
getIntroduction () {
let that = this
let params = {
'about_me': that.message
}
let qs = require('qs')
let data = qs.stringify(params)
that.$axios.post('/api/Register/register_is_fourth', data).then((res) => {
that.message = res.data
console.log(that.message)
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style lang="scss" scoped>
.introduction{
width:100%;
height:100%;
background:#11A7FC;
padding-top:5%;
padding-left:5%;
h2{
font-size:.2rem;
color:#fff;
margin-bottom:.5rem;
}
h1{
font-size:.28rem;
color:#ccc;
}
.van-field{
margin-top:.3rem;
width:90%;
height:1.9rem;
border-radius:.2rem;
}
.btn{
width:90%;
height:.4rem;
background:#fff;
font-size:.2rem;
color:#11A7FC;
line-height:.4rem;
text-align:center;
margin-top:.9rem;
font-weight:bold;
border-radius:.2rem;
}
}
</style>