艺易修小程序24.08.21
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
2.7 KiB

9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="content">
  3. <view class="topBox">
  4. <h3 class="title">{{ index ? "注册" : "登录"}}</h3>
  5. <h3>欢迎使用xx报修</h3>
  6. </view>
  7. <view class="inputBox">
  8. <view class="ipt">
  9. <h4>学号</h4>
  10. <input type="text" value="" placeholder="请输入学生学号" />
  11. </view>
  12. <view class="ipt">
  13. <h4>密码</h4>
  14. <input type="text" value="" placeholder="请输入密码" />
  15. </view>
  16. <button class="loginBtn">{{ index ? '注册' : '登录' }}</button>
  17. <button @click="changeState(1)" class="registerBtn">{{ index ? '已有账号立即登录' : "暂无账号立即注册" }}</button>
  18. <!-- <view class="tipbox">
  19. <view class="txt">
  20. 其他账号登录
  21. </view>
  22. <view class="otherUser">
  23. <uni-icons type="qq" size="40" color="rgb(66,157,250)"></uni-icons>
  24. <uni-icons type="weixin" size="40" color="rgb(2,187,17)"></uni-icons>
  25. </view>
  26. </view> -->
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. index : 0
  35. }
  36. },
  37. methods: {
  38. //切换状态
  39. changeState(index){
  40. this.index = this.index ? 0 : 1
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. .content {
  47. height: 100vh;
  48. background-color: aquamarine;
  49. background: url("@/static/login/bj.jpg") no-repeat center;
  50. background-size: cover;
  51. }
  52. .topBox {
  53. font-size: 34rpx;
  54. color: #fff;
  55. padding: 80rpx 50rpx;
  56. }
  57. .topBox .title{
  58. font-size: 45rpx;
  59. }
  60. h3 {
  61. margin-bottom: 10rpx;
  62. }
  63. .inputBox {
  64. position: fixed;
  65. bottom: 0;
  66. left: 0;
  67. width: 750rpx;
  68. height: 85vh;
  69. background-color: #fff;
  70. border-top-left-radius: 40rpx;
  71. border-top-right-radius: 40rpx;
  72. padding: 60rpx;
  73. box-sizing: border-box;
  74. }
  75. .ipt {
  76. margin-bottom: 50rpx;
  77. }
  78. .ipt h4 {
  79. margin-bottom: 20rpx;
  80. font-size: 36rpx;
  81. color: #333;
  82. }
  83. .ipt input {
  84. border-bottom: 1px solid #dedede;
  85. padding-bottom: 20rpx;
  86. font-size: 28rpx;
  87. }
  88. .loginBtn {
  89. margin-top: 20rpx;
  90. line-height: 85rpx;
  91. text-align: center;
  92. background: #3c9cff;
  93. border-radius: 40rpx;
  94. color: #fff;
  95. margin-top: 50rpx;
  96. }
  97. .registerBtn {
  98. margin-top: 20rpx;
  99. line-height: 85rpx;
  100. text-align: center;
  101. border-radius: 40rpx;
  102. color: #ccc;
  103. margin-top: 50rpx;
  104. border: none;
  105. }
  106. .tipbox {
  107. position: fixed;
  108. bottom: 120rpx;
  109. left: 50%;
  110. transform: translate(-50%, -120px);
  111. }
  112. .otherUser {
  113. margin-top: 30rpx;
  114. display: flex;
  115. justify-content: center;
  116. }
  117. .txt {
  118. font-size: 28rpx;
  119. color: #969696;
  120. }
  121. .otherUser .uni-icons {
  122. margin-left: 20rpx;
  123. }
  124. </style>