File tree 1 file changed +2
-11
lines changed
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 32
32
</div >
33
33
34
34
<div >
35
- <!-- 留给后面章节的登录 -->
35
+ <!-- 留给后面章节的用户登录 -->
36
36
</div >
37
37
</div >
38
38
68
68
alert (' 用户注册成功,快去登录吧!' );
69
69
})
70
70
.catch (function (error ) {
71
-
72
71
alert (error .message );
73
-
74
72
// Handling Error here...
75
-
76
73
// https://github.com/axios/axios#handling-errors
77
-
78
74
});
79
75
},
80
76
}
81
77
}
82
78
</script >
83
79
84
80
<style scoped >
85
-
86
81
#grid {
87
82
display : grid ;
88
83
grid-template-columns : 1fr 1fr ;
89
84
}
90
-
91
85
#signup {
92
86
text-align : center ;
93
87
}
94
-
95
88
.form-elem {
96
89
padding : 10px ;
97
90
}
98
-
99
91
input {
100
92
height : 25px ;
101
93
padding-left : 10px ;
102
94
}
103
-
104
95
button {
105
96
height : 35px ;
106
97
cursor : pointer ;
114
105
</style >
115
106
```
116
107
117
- 代码看起来有点多,但其实没有多少新内容 ;功能上就是将表单中的用户名和密码 ` post ` 到 ` /api/user/ ` 接口,若创建成功则提醒用户前往登录,失败则将提示信息显示出来。
108
+ 代码看起来有点多,但其实 ** 没有新知识 ** ;功能上就是将表单中的用户名和密码 ` post ` 到 ` /api/user/ ` 接口,若创建成功则提醒用户前往登录,失败则将提示信息显示出来。
118
109
119
110
> 如果注册失败,教程只是简单的弹出提示框,实际的博客项目应该优化为更加友好的方式。
120
111
You can’t perform that action at this time.
0 commit comments