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.

72 lines
1.4 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <view class="background">
  3. <image
  4. class="logo"
  5. src="../../../static/icons/start-logo.png"
  6. mode="scaleToFill"
  7. />
  8. <view class="logo-text"> DeepChart </view>
  9. </view>
  10. </template>
  11. <script setup>
  12. import { onShow } from "@dcloudio/uni-app";
  13. import { useUserStore } from "../../../stores/modules/userInfo";
  14. import { useDeviceStore } from "../../../stores/modules/deviceInfo";
  15. onShow(() => {
  16. const deviceInfo = useDeviceStore();
  17. // 获取设备ID
  18. uni.getSystemInfo({
  19. success: (res) => {
  20. deviceInfo.setDeviceInfo(res)
  21. },
  22. });
  23. setTimeout(() => {
  24. const userStore = useUserStore();
  25. if (!userStore.userInfo)
  26. uni.redirectTo({
  27. url: "/pages/start/select/select",
  28. animationType: "slide-in-right",
  29. animationDuration: 1000,
  30. });
  31. else {
  32. uni.redirectTo({
  33. url: "/pages/home/home",
  34. animationType: "slide-in-right",
  35. animationDuration: 1000,
  36. });
  37. }
  38. }, 1500);
  39. });
  40. </script>
  41. <style>
  42. .background {
  43. background: linear-gradient(180deg, #fb6967, #fb6967);
  44. width: 100vw;
  45. height: 100vh;
  46. }
  47. .logo-text {
  48. display: flex;
  49. justify-content: center;
  50. align-items: center;
  51. color: white;
  52. font-weight: bold;
  53. font-size: 24px;
  54. position: absolute;
  55. bottom: 5%;
  56. left: 50%;
  57. transform: translateX(-50%);
  58. }
  59. .logo {
  60. width: 320rpx;
  61. height: 200rpx;
  62. position: absolute;
  63. top: 30%;
  64. left: 50%;
  65. transform: translate(-50%, -50%);
  66. }
  67. </style>