自主项目,食堂系统,前端uniapp
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.

100 lines
2.2 KiB

  1. <template>
  2. <view>
  3. <view class="head"></view>
  4. <view class="content">
  5. <view>
  6. <!-- 账号 -->
  7. <view class="lf-flex lf-m-b-10">
  8. <u-icon name="account-fill"></u-icon>
  9. <text class="lf-m-l-10 lf-font-28 lf-color-333">登录账号</text>
  10. </view>
  11. <input class="input" :adjust-position="false" :auto-blur="true" placeholder="请输入账号" @focus="inputFocus(170)" @blur="is_focus = false" />
  12. <!-- 密码 -->
  13. <view class="lf-flex lf-m-b-10 lf-m-t-60">
  14. <u-icon name="lock-fill"></u-icon>
  15. <text class="lf-m-l-10 lf-font-28 lf-color-333">登录密码</text>
  16. </view>
  17. <input class="input" :adjust-position="false" :auto-blur="true" placeholder="请输入密码" :password="true" @focus="inputFocus(220)" @blur="is_focus = false" />
  18. </view>
  19. <view>
  20. <!-- 登录按钮 -->
  21. <button class="button" @click="login">登录</button>
  22. </view>
  23. </view>
  24. <view :style="is_focus ? 'height: 540rpx' : 'height: 40rpx'"></view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data(){
  30. return {
  31. is_focus: false
  32. }
  33. },
  34. onLoad(options){
  35. },
  36. methods: {
  37. inputFocus(scrollTop){
  38. this.is_focus = true;
  39. setTimeout(() => {
  40. uni.pageScrollTo({
  41. scrollTop: scrollTop,
  42. duration: 100
  43. })
  44. }, 200);
  45. },
  46. login(){
  47. this.$url('/pages/supply/index/index');
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped="scoped">
  53. .lf-m-t-60{
  54. margin-top: 60rpx;
  55. }
  56. .head{
  57. height: 604rpx;
  58. width: 750rpx;
  59. background-color: #1833F2;
  60. }
  61. .content{
  62. width: 686rpx;
  63. height: 622rpx;
  64. background: #FFFFFF;
  65. box-shadow: 0rpx 2rpx 10rpx 5rpx rgba(24, 51, 242, 0.1);
  66. border-radius: 20rpx;
  67. margin: 0 auto;
  68. margin-top: -100rpx;
  69. padding: 60rpx 30rpx;
  70. box-sizing: border-box;
  71. display: flex;
  72. flex-direction: column;
  73. justify-content: space-between;
  74. .input{
  75. // padding: 20rpx 0;
  76. border-bottom: 1rpx solid #e5e5e5;
  77. font-size: 60rpx;
  78. /* #ifdef MP */
  79. height: 90rpx;
  80. line-height: 90rpx;
  81. /* #endif */
  82. }
  83. .button{
  84. background-color: #1833F2;
  85. color: #FFFFFF;
  86. font-size: 32rpx;
  87. }
  88. }
  89. /deep/.input-placeholder{
  90. color: #999999;
  91. font-size: 28rpx;
  92. }
  93. /deep/.button-hover{
  94. opacity: .5;
  95. animation: all .3s;
  96. }
  97. </style>