index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="identify">
  3. <view class="identify_card flex items-center justify-between mb100" @click="handleStudent">
  4. <view class="text flex column">
  5. <view class="f32 white bold">学生</view>
  6. <view class="ml20 f16 white">学生选择此项</view>
  7. </view>
  8. <image src="../../static/stu_img.svg"></image>
  9. </view>
  10. <view class="identify_card flex items-center justify-between blue-bg" @click="handleWorker">
  11. <view class="flex column">
  12. <view class="f32 white bold">维修人员</view>
  13. <view class="ml20 f16 white">维修人员选择此项</view>
  14. </view>
  15. <image src="../../static/work_img.svg"></image>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {}
  23. },
  24. methods: {
  25. //维修工登录跳转页面
  26. handleWorker() {
  27. uni.reLaunch({
  28. url: '../login/index',
  29. })
  30. },
  31. //用户登录跳转页面
  32. async handleStudent() {
  33. uni.setStorageSync(
  34. 'token',
  35. 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODM4OTQ1MzAsInVzZXJJZCI6IjIwMTkwMjEwMjMwMTMyIn0.m36xA71_0kEpvNIF1qETH0s9c1IwYLGi1LmWARUAP8M'
  36. )
  37. uni.reLaunch({
  38. // url: '../login-filter/index',
  39. url: '../home/home',
  40. })
  41. // window.location.href = 'http://192.168.161.95:8082/#/pages/home/home'
  42. },
  43. },
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .identify {
  48. display: -webkit-box;
  49. -webkit-box-orient: vertical;
  50. height: 100vh;
  51. padding: 100rpx 20rpx;
  52. &_card {
  53. padding: 40rpx;
  54. border-radius: 32rpx;
  55. background-color: rgba(42, 69, 228, 0.89);
  56. text {
  57. height: 300rpx;
  58. line-height: 0px !important;
  59. }
  60. image {
  61. max-width: 152rpx;
  62. max-height: 152rpx;
  63. }
  64. }
  65. }
  66. </style>