<template>
  <view class="identify">
    <view class="identify_card flex items-center justify-between mb100" @click="handleStudent">
      <view class="text flex column">
        <view class="f32 white bold">学生</view>
        <view class="ml20 f16 white">学生选择此项</view>
      </view>
      <image src="../../static/stu_img.svg"></image>
    </view>
    <view class="identify_card flex items-center justify-between blue-bg" @click="handleWorker">
      <view class="flex column">
        <view class="f32 white bold">维修人员</view>
        <view class="ml20 f16 white">维修人员选择此项</view>
      </view>
      <image src="../../static/work_img.svg"></image>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    //维修工登录跳转页面
    handleWorker() {
      uni.reLaunch({
        url: '../login/index',
      })
    },
    //用户登录跳转页面
    async handleStudent() {
      uni.setStorageSync(
        'token',
        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODM4OTQ1MzAsInVzZXJJZCI6IjIwMTkwMjEwMjMwMTMyIn0.m36xA71_0kEpvNIF1qETH0s9c1IwYLGi1LmWARUAP8M'
      )
      uni.reLaunch({
        // url: '../login-filter/index',
        url: '../home/home',
      })
      // window.location.href = 'http://192.168.161.95:8082/#/pages/home/home'
    },
  },
}
</script>

<style lang="scss" scoped>
.identify {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  height: 100vh;
  padding: 100rpx 20rpx;
  &_card {
    padding: 40rpx;
    border-radius: 32rpx;
    background-color: rgba(42, 69, 228, 0.89);
    text {
      height: 300rpx;
      line-height: 0px !important;
    }
    image {
      max-width: 152rpx;
      max-height: 152rpx;
    }
  }
}
</style>
