login.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <view class="section">
  3. <view class="text-area content">
  4. <text class="title">智慧用电</text>
  5. </view>
  6. <form class="padding-lg flex flex-direction">
  7. <view class="login-box shadow ">
  8. <view class="phone-box">
  9. <input type="text" placeholder="13636363636" onfocus="this.placeholder=''">
  10. <span class="icon iconfont left-icon">&#xe64f;</span>
  11. <span class="icon iconfont right-icon">&#xe610;</span>
  12. </view>
  13. <view class="password-box">
  14. <input type="text" placeholder="请输入验证码">
  15. <text class="icon iconfont left-icon">&#xe86a;</text>
  16. <view class="right-icon verify">获取验证码</view>
  17. </view>
  18. <view class="btn-area">
  19. <navigator open-type="switchTab" url="/pages/index/index" hover-class="navigator-hover">
  20. <button class="submit">提 交 </button>
  21. </navigator>
  22. </view>
  23. </view>
  24. </form>
  25. <view class="box ">
  26. <view class="cu-bar tabbar bg-white">
  27. <view class="action" data-cur="login">
  28. <view class="cuIcon-cu-image">
  29. <span class="icon iconfont">&#xe64e;</span>
  30. </view>
  31. <view class="text-green">主页</view>
  32. </view>
  33. <view class="action">
  34. <view class="cuIcon-cu-image">
  35. <span class="icon iconfont">&#xe606;</span>
  36. </view>
  37. <view class="text-gray">消息</view>
  38. </view>
  39. <view class="action">
  40. <view class="cuIcon-cu-image">
  41. <span class="icon iconfont">&#xe858;</span>
  42. <view class="cu-tag badge">99</view>
  43. </view>
  44. <view class="text-gray">分析</view>
  45. </view>
  46. <view class="action">
  47. <view class="cuIcon-cu-image">
  48. <span class="icon iconfont">&#xe606;</span>
  49. <view class="cu-tag badge"></view>
  50. </view>
  51. <view class="text-gray">设置</view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. title: 'Hello222',
  62. InputBottom: 0
  63. }
  64. },
  65. onLoad() {
  66. uni.setNavigationBarColor({
  67. frontColor: "#ffffff", //文字颜色
  68. backgroundColor: "#4866DF", //底部背景色
  69. })
  70. uni.setNavigationBarTitle({
  71. title: '登录'
  72. });
  73. },
  74. methods: {
  75. }
  76. }
  77. </script>
  78. <style>
  79. .section {
  80. height: 400rpx;
  81. background-image: url(/static/login-bg.png);
  82. background-size: cover;
  83. background-repeat: no-repeat;
  84. }
  85. .content {
  86. height: 434rpx;
  87. text-align: center;
  88. position: relative;
  89. }
  90. .login-box {
  91. height: 600rpx;
  92. position: relative;
  93. top: -150rpx;
  94. background: #fff;
  95. border-radius: 30rpx;
  96. padding: 100rpx 20rpx;
  97. }
  98. .shadow {
  99. box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
  100. }
  101. .title {
  102. position: absolute;
  103. color: #fff;
  104. font-size: 60rpx;
  105. bottom: 180rpx;
  106. display: block;
  107. width: 100%;
  108. }
  109. input,
  110. button {
  111. width: 100%;
  112. height: 100rpx;
  113. line-height: 100rpx;
  114. opacity: 1;
  115. border: 1px solid #dbdbdb;
  116. border-radius: 100rpx;
  117. background: #fff;
  118. coloe: #333;
  119. margin: 40rpx 0;
  120. font-size: 34rpx;
  121. }
  122. input {
  123. text-indent: 100rpx;
  124. }
  125. .submit {
  126. background: #4074E7;
  127. color: #fff
  128. }
  129. .phone-box,
  130. .password-box {
  131. position: relative;
  132. }
  133. .phone-box text,
  134. .password-box text {
  135. font-size: 38rpx;
  136. color: #999999
  137. }
  138. .left-icon {
  139. position: absolute;
  140. left: 48rpx;
  141. top: 50%;
  142. margin-top: -20rpx;
  143. line-height: 100%
  144. }
  145. .right-icon {
  146. position: absolute;
  147. right: 48rpx;
  148. top: 50%;
  149. margin-top: -20rpx;
  150. line-height: 100%
  151. }
  152. .right-icon.verify {
  153. margin-top: -10rpx;
  154. color: #4074E7
  155. }
  156. .iconfont {
  157. color: #999
  158. }
  159. /* 底部 */
  160. .box {
  161. display: none;
  162. position: fixed;
  163. bottom: 0;
  164. width: 100%;
  165. border-top: 1px solid pink
  166. }
  167. .cuIcon-cu-image .iconfont {
  168. width: 38rpx;
  169. height: 38rpx;
  170. display: inline-block;
  171. margin-bottom: 10rpx;
  172. }
  173. .text-gray {
  174. font-size: 26rpx;
  175. }
  176. </style>