identity.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view>
  3. <view class="content">
  4. <!-- 学生选择按钮 -->
  5. <button class="student" @click="getStudentId">
  6. <view class="stu">
  7. 学生
  8. </view>
  9. <view class="stu_point">
  10. 学生用户选择此项
  11. </view>
  12. <view class="stu_img">
  13. <image src="../../static/stu_img.svg" mode=""></image>
  14. </view>
  15. </button>
  16. <!-- 维修人员选择按钮 -->
  17. <button class="worker" @click="getlogin">
  18. <view class="work">
  19. 维修人员
  20. </view>
  21. <view class="work_point">
  22. 维修人员选择此项
  23. </view>
  24. <view class="work_img">
  25. <image src="../../static/work_img.svg" mode=""></image>
  26. </view>
  27. </button>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. }
  36. },
  37. onLoad() {
  38. // let identity = uni.getStorageSync('identity');
  39. // console.log(identity)
  40. // if (identity){
  41. // identity == 0 ? uni.redirectTo({ url: "../loginFilter/LoginFilter" }) : uni.redirectTo({ url: "/pages/login/login" });
  42. // }
  43. },
  44. methods: {
  45. //维修工登录跳转页面
  46. getlogin(){
  47. uni.reLaunch({
  48. url:'../login/login',
  49. })
  50. },
  51. //学生登录跳转页面
  52. async getStudentId(){
  53. uni.reLaunch({
  54. url:'../loginFilter/LoginFilter'
  55. })
  56. },
  57. }
  58. }
  59. </script>
  60. <style>
  61. .content{
  62. flex-direction: column;
  63. display: flex;
  64. }
  65. .student{
  66. position: relative;
  67. width: 702rpx;
  68. height: 300rpx;
  69. margin-top: 148rpx;
  70. margin-left: 24rpx;
  71. border-radius: 32rpx;
  72. background-color: rgba(42, 69, 228, 0.89);
  73. }
  74. .student .stu{
  75. position: absolute;
  76. top: 34rpx;
  77. left: 50rpx;
  78. font-size: 56rpx;
  79. font-weight: 700;
  80. color: rgba(255, 255, 255, 1);
  81. }
  82. .student .stu_point{
  83. position: absolute;
  84. top: 140rpx;
  85. left: 160rpx;
  86. font: 32rpx;
  87. color: rgba(255, 255, 255, 1);
  88. }
  89. .student image{
  90. position: absolute;
  91. right: 40rpx;
  92. top: 72rpx;
  93. width: 152rpx;
  94. height: 152rpx;
  95. }
  96. .worker{
  97. position: relative;
  98. width: 702rpx;
  99. height: 300rpx;
  100. margin-top: 114rpx;
  101. margin-left: 24rpx;
  102. border-radius: 32rpx;
  103. background-color: rgba(42, 130, 228, 1);
  104. }
  105. .worker .work {
  106. position: absolute;
  107. top: 34rpx;
  108. left: 50rpx;
  109. font-size: 56rpx;
  110. font-weight: 700;
  111. color: rgba(255, 255, 255, 1);
  112. }
  113. .worker .work_point{
  114. position: absolute;
  115. top: 140rpx;
  116. left: 160rpx;
  117. font: 32rpx;
  118. color: rgba(255, 255, 255, 1);
  119. }
  120. .worker image{
  121. position: absolute;
  122. right: 40rpx;
  123. top: 72rpx;
  124. width: 152rpx;
  125. height: 152rpx;
  126. }
  127. </style>