艺易修小程序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.

147 lines
2.7 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
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">维修员登录</h3>
  5. <h3>欢迎使用艺易修</h3>
  6. </view>
  7. <view class="inputBox">
  8. <view class="ipt">
  9. <h4>手机号</h4>
  10. <input v-model="form.account" type="text" value="" placeholder="请输入手机号" />
  11. </view>
  12. <view class="ipt">
  13. <h4>密码</h4>
  14. <input v-model="form.password" type="password" value="" placeholder="请输入密码" />
  15. </view>
  16. <view @click="login" class="loginBtn">登录</view>
  17. <view @click="toStudentLogin" class="loginBtn b2">学生登录</view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. form: {
  26. account: '',
  27. password: ''
  28. }
  29. }
  30. },
  31. methods: {
  32. //登录
  33. login() {
  34. if(this.form.account.trim() == ''){
  35. return uni.showToast({ icon: 'none' , title: '请填写手机号' })
  36. }
  37. if(this.form.password.trim() == ''){
  38. return uni.showToast({ icon: 'none' , title: '请填写密码' })
  39. }
  40. this.$store.commit('login' , this.form )
  41. },
  42. //跳转到学生登录页面
  43. toStudentLogin(){
  44. uni.navigateTo({
  45. url: '/pages/login/studentLogin'
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped>
  52. .content {
  53. height: 100vh;
  54. /* 微信小程序不允许使用本地图片 */
  55. /* background: url("@/static/login/bj.jpg") no-repeat center; */
  56. /* 所以这里我把背景图片上传在阿里云oss.下面这个地址是阿里云oss图片地址 */
  57. background: url("https://tennis-oss.xzaiyp.top/2024-09-02/0030f0ef-4270-47dc-a870-b24bffb6ce28.jpg") no-repeat center;
  58. background-size: cover;
  59. }
  60. .topBox {
  61. font-size: 34rpx;
  62. color: #fff;
  63. padding: 80rpx 50rpx;
  64. }
  65. .topBox .title {
  66. font-size: 45rpx;
  67. }
  68. h3 {
  69. margin-bottom: 10rpx;
  70. }
  71. .inputBox {
  72. position: fixed;
  73. bottom: 0;
  74. left: 0;
  75. width: 750rpx;
  76. height: 85vh;
  77. background-color: #fff;
  78. border-top-left-radius: 40rpx;
  79. border-top-right-radius: 40rpx;
  80. padding: 60rpx;
  81. box-sizing: border-box;
  82. }
  83. .ipt {
  84. margin-bottom: 50rpx;
  85. }
  86. .ipt h4 {
  87. margin-bottom: 20rpx;
  88. font-size: 36rpx;
  89. color: #333;
  90. }
  91. .ipt input {
  92. border-bottom: 1px solid #dedede;
  93. padding-bottom: 20rpx;
  94. font-size: 28rpx;
  95. }
  96. .loginBtn {
  97. width: 100%;
  98. height: 100rpx;
  99. background-color: #00aaff;
  100. color: #fff;
  101. display: flex;
  102. justify-content: center;
  103. align-items: center;
  104. margin: 20rpx 0;
  105. border-radius: 20rpx;
  106. }
  107. .b2{
  108. background-color: #87D0F6;
  109. color: #fff;
  110. }
  111. .tipbox {
  112. position: fixed;
  113. bottom: 120rpx;
  114. left: 50%;
  115. transform: translate(-50%, -120px);
  116. }
  117. .otherUser {
  118. margin-top: 30rpx;
  119. display: flex;
  120. justify-content: center;
  121. }
  122. .txt {
  123. font-size: 28rpx;
  124. color: #969696;
  125. }
  126. .otherUser .uni-icons {
  127. margin-left: 20rpx;
  128. }
  129. </style>