login_two.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="login_two">
  3. <view class="top">
  4. <view class="left" :className="current==0?info1:info2">手机号登录</view>
  5. <view class="right" :className="current==1?info1:info2">账号密码登录</view>
  6. </view>
  7. <swiper class="scroll-view-height" @change="swipeIndex" :current="current" :duration="300">
  8. <swiper-item>
  9. <view class="inputBox">
  10. <input type="text" class="inp" placeholder="手机号">
  11. <input type="text" class="inp" placeholder="请输入验证码">
  12. <button class="yzm">获取验证码</button>
  13. </view>
  14. </swiper-item>
  15. <swiper-item>
  16. <view class="inputBox">
  17. <input type="text" class="inp inp2" placeholder="用户名/绑定手机/绑定邮箱">
  18. <input type="text" class="inp" placeholder="登录密码">
  19. <button class="yzm">获取验证码</button>
  20. </view>
  21. <text @click="goto" style="font-size: 14px;float: right;padding: 20rpx;padding-right: 30rpx;">忘记密码</text>
  22. </swiper-item>
  23. </swiper>
  24. <view class="mid">
  25. <!-- <view class="quan"></view> -->
  26. <radio value="r1" @click="radioCheck" :checked="isOK" />
  27. <view class="">
  28. 我已阅读并同意<text>《教育小程序服务条款》</text>和 <text>《 隐私协议》</text>新用户自动注册
  29. </view>
  30. </view>
  31. <button class="btn">登录</button>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. current:0,
  39. info1:'',
  40. info2:'',
  41. isOK:false
  42. }
  43. },
  44. methods: {
  45. // 登录方式切换
  46. swipeIndex(index){
  47. // console.log(index);
  48. },
  49. // 是否同意条约
  50. radioCheck(){
  51. this.isOK=!this.isOK
  52. },
  53. // 忘记密码
  54. goto(){
  55. uni.navigateTo({
  56. url:"/pages/login_three/login_three"
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .login_two{
  64. .top{
  65. width: 500rpx;
  66. display: flex;
  67. justify-content: space-between;
  68. margin: auto;
  69. margin-top: 100rpx;
  70. margin-bottom: 60rpx;
  71. .info1{
  72. font-weight: bold;
  73. }
  74. .info2{
  75. }
  76. }
  77. .inputBox{
  78. padding: 0 30rpx;
  79. position: relative;
  80. .yzm{
  81. position: absolute;
  82. bottom: 10rpx;
  83. right: 20rpx;
  84. font-size: 12px;
  85. background-color: #7eb5f6;
  86. color: #fff;
  87. }
  88. .inp{
  89. padding: 10rpx 15rpx;
  90. // margin-top: 50rpx;
  91. border-bottom: 1px #ccc solid;
  92. }
  93. .inp:nth-child(1){
  94. margin-bottom: 50rpx;
  95. }
  96. }
  97. .mid{
  98. display: flex;
  99. justify-content: flex-start;
  100. width: 750rpx;
  101. padding: 0rpx 20rpx;
  102. font-size: 13px;
  103. /deep/ .uni-radio-input{
  104. width: 15px;
  105. height: 15px;
  106. }
  107. text{
  108. color: #4a97f2;
  109. }
  110. }
  111. .btn{
  112. background-color: #0056a8;
  113. color: #ffffff;
  114. border-radius: 30px;
  115. margin: 30rpx 35rpx;
  116. // padding: 0rpx 10rpx;
  117. font-size: 16px;
  118. }
  119. }
  120. </style>