index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="launch-v">
  3. <view class="launch-box">
  4. <view class="title">全新模式 为你而来</view>
  5. <view class="version">VERSION5.2</view>
  6. <view class="launch-img">
  7. <image :src="startup" mode="widthFix"></image>
  8. </view>
  9. <view class="copyright">Copyright © 2024 引迈信息技术有限公司出品</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import resources from '@/libs/resources.js'
  15. export default {
  16. data() {
  17. return {
  18. startup: resources.startup.main
  19. }
  20. },
  21. onLoad() {
  22. if (uni.getStorageSync('isUpdate')) return
  23. const launchFlag = uni.getStorageSync('launchFlag');
  24. const token = uni.getStorageSync("token") || '';
  25. if (launchFlag) {
  26. if (token) {
  27. uni.switchTab({
  28. url: '/pages/index/index'
  29. })
  30. } else {
  31. uni.redirectTo({
  32. url: '/pages/login/index'
  33. })
  34. }
  35. } else {
  36. // #ifdef APP
  37. uni.redirectTo({
  38. url: '/pages/launch/policy'
  39. })
  40. // #endif
  41. // #ifndef APP
  42. if (token) {
  43. uni.switchTab({
  44. url: '/pages/index/index'
  45. })
  46. } else {
  47. uni.redirectTo({
  48. url: '/pages/login/index'
  49. })
  50. }
  51. // #endif
  52. }
  53. },
  54. }
  55. </script>
  56. <style lang="scss">
  57. .launch-v {
  58. .launch-box {
  59. padding-top: 170rpx;
  60. .title {
  61. font-size: 50rpx;
  62. line-height: 70rpx;
  63. color: #5098FA;
  64. text-align: center;
  65. margin-bottom: 10rpx;
  66. }
  67. .version {
  68. width: 250rpx;
  69. margin: 0 auto;
  70. text-align: center;
  71. height: 50rpx;
  72. border: 1px solid #5098FA;
  73. border-radius: 25rpx;
  74. line-height: 48rpx;
  75. color: #5098FA;
  76. letter-spacing: 2rpx;
  77. }
  78. .launch-img {
  79. margin: 0 auto;
  80. width: 680rpx;
  81. image {
  82. width: 100%;
  83. }
  84. }
  85. .copyright {
  86. position: fixed;
  87. bottom: 120rpx;
  88. right: 0;
  89. left: 0;
  90. text-align: center;
  91. color: #999999;
  92. font-size: 24rpx;
  93. }
  94. }
  95. }
  96. </style>