微信小程序+SpringBoot实现用户登录
前言
微信小程序越来越吃香了(前话就这么多,嘿嘿)
前端
那就开始吧,登录界面就如此了
wxml内容如下,这是格式化后粘贴过来的,emmm,怪像那回事。
<view class="total">
<form bindsubmit="create_login">
<view class="t1">
<text class="text">账号</text>
<input type="text" name="moblie" class="box" placeholder="输入您的账号" value="{
{moblie}}" bindinput="mobileInput"></input>
</view>
<view class="t2">
<text class="text">密码</text>
<input type="password" name="password" class="box" placeholder="输入您的密码" value="{
{password}}" bindinput="passwordInput"></input>
</view>
<button bindtap="login" class="btn">
<text class="font2">登陆</text>
</button>
</form>
</view>
wxss是这样的,本来是不想发wxss的,发出来感觉有点看不起在座的各位,可能挨打,不过我寻思着,隔着屏幕你们又弄不死我,嘎嘎嘎,搞错了,桀桀桀
.total{
width:100%;
height:100%;
background-color: rgb(245,245,245);
}
.t1{
width:100%;
height:125rpx;
background-color: white;
position: relative;
top:50rpx;
}
.t2{
width:100%;
height:125rpx;
background-color: white;
position: relative;
top:60rpx;
}
.text{
position: relative;
left:40rpx;
top:40rpx;
color: rgb(143, 143, 143);
}
.box{
width:400rpx;
height:80rpx;
margin-left: 200rpx;
position: relative;
bottom: 25rpx;
}
#t3 text{
position: relative;
left:40rpx;
top:40rpx;
color: rgb(143, 143, 143);
}
#pass2{
width:400rpx;
height:80rpx;
margin-left: 320rpx;
position: relative;
bottom: 25rpx;
}
.btn{
position: relative;
top:100rpx;
background-color:rgb(51, 204, 170);
width:600rpx