微信小程序+SpringBoot实现用户登录

本文介绍了如何使用微信小程序结合SpringBoot实现用户登录功能。内容包括前端登录界面的wxml和wxss代码展示,后端SpringBoot的相关配置,如pom.xml依赖、实体类、持久层和控制器的实现。通过postman测试验证了登录接口的正确性。
摘要由CSDN通过智能技术生成

微信小程序+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
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值