name:"register",
data (){return{
cur:0,
account:'',
password:'',
name:''}
},
methods:{//注册
register:function(){var accounts = this.account;var passwords =this.password;var names =this.name;this.$http.get('/api/register', {
params:{
account: accounts,
password: passwords,
name:names
}
},{}).then((response)=>{
console.log(response);
})
},//登录
login:function(){var accounts = this.account;var passwords =this.password;this.$http.get('/api/login', {
params:{
account: accounts,
password: passwords,
}
},{}).then((response)=>{
console.log(response);
})
},
git:function() {//发送get请求
this.$http.post('/api/list').then(function(res){
console.log(res);
},function(){
console.log('请求失败处理');
});
}
},
mounted() {
}
}
width: 300px;
min-height: 100px;
border: 1px solid #dedede;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%, -50%);
border-radius: 8px;
}
.cl_middle-all {
width:100%;
height: 35px;
line-height: 35px;
overflow: hidden;
}
.cl_register {
width:50%;
text-align: center;float: left;
cursor: pointer;
color: red;
position: relative;
}
.cl_login {
width:50%;
text-align: center;float: right;
cursor: pointer;
color: mediumspringgreen;
position: relative;
}
.cl_register:before{
content:"";
width: 30px;
height: 2px;
background: red;
position: absolute;
left:50%;
bottom: 2px;
transform: translate(-50%, 100%);
display: none;
}
.cl_register:after{
content:"";
width: 1px;
height: 20px;
position: absolute;
right:0%;
top:50%;
transform: translate(-50%, -50%);
background: rgba(0,0,0,0.6);
}
.cl_login:before{
content:"";
width: 30px;
height: 2px;
background: mediumspringgreen;
position: absolute;
left:50%;
bottom: 2px;
transform: translate(-50%, 100%);
display: none;
}
.cl_color.cl_login:before{
display: block;
}
.cl_color.cl_register:before{
display: block;
}
.cl_color:nth-child(2){
color: mediumspringgreen;
}
.cl_tab_list{
border-top: 1px solid #dedede;
background: rgba(0,0,0,0.02);
}
.cl_register_list {
width:100%;
min-height: 100px;
}
.cl_login_list {
width:100%;
min-height: 100px;
}
.cl_input {
width:96%;
height: 32px;
margin: 12px auto;
border: 1px solid #dedede;
border-radius: 4px;
}
.cl_input_text {
width:100%;
height: 32px;
border: none;
appearance: none;
outline: none;
outline: medium;
padding:012px;
box-sizing: border-box;
cursor: pointer;
border-radius: 4px;
}
.cl_input_btn {
width:100%;
border: none;
height: 32px;
outline: none;
outline: medium;
cursor: pointer;
border-radius: 4px;
}
.cl_register_btn{
background: red;
color: #ffffff;
}
.cl_login_btn{
background: mediumspringgreen;
color: #ffffff;
}

被折叠的 条评论
为什么被折叠?



