guide.vue 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="hc-guide-swiper-page">
  3. <swiper class="hc-guide-swiper" @change="swiperChange">
  4. <swiper-item>
  5. <view class="hc-guide-item" :class="cur === 0 ? 'animation' : ''" :cur="cur">
  6. <view class="title-box">
  7. <view class="title">实时填报</view>
  8. <view class="text">现场检测、测量、日志快速完成</view>
  9. </view>
  10. <view class="img-box">
  11. <HcImg class="img-bg" src="/static/guide/g-1-2.png" width="321" height="180"/>
  12. <HcImg class="img-1" src="/static/guide/g-1-1.png" width="184" height="218"/>
  13. </view>
  14. </view>
  15. </swiper-item>
  16. <swiper-item>
  17. <view class="hc-guide-item" :class="cur === 1 ? 'animation' : ''" :cur="cur">
  18. <view class="title-box">
  19. <view class="title">实时预警</view>
  20. <view class="text">消息任务实时待办提醒</view>
  21. </view>
  22. <view class="img-box">
  23. <HcImg class="img-bg" src="/static/guide/g-2-2.png" width="291" height="290"/>
  24. <HcImg class="img-2" src="/static/guide/g-2-1.png" width="130" height="239"/>
  25. </view>
  26. </view>
  27. </swiper-item>
  28. <swiper-item>
  29. <view class="hc-guide-item" :class="cur === 2 ? 'animation' : ''" :cur="cur">
  30. <view class="title-box">
  31. <view class="title">移动审批</view>
  32. <view class="text">随时随地签批报表资料</view>
  33. </view>
  34. <view class="img-box">
  35. <HcImg class="img-bg" src="/static/guide/g-3-2.png" width="263" height="223"/>
  36. <HcImg class="img-3" src="/static/guide/g-3-1.png" width="155" height="234"/>
  37. </view>
  38. <view class="hc-btn-box">
  39. <button class="hc-btn" type="primary" @click="toLoginLink">开启工程事业</button>
  40. </view>
  41. </view>
  42. </swiper-item>
  43. </swiper>
  44. <view class="hc-swiper-dot" v-show="cur >= 0">
  45. <view class="dots" :class="cur === 0 ? 'cur' : ''"/>
  46. <view class="dots" :class="cur === 1 ? 'cur' : ''"/>
  47. <view class="dots" :class="cur === 2 ? 'cur' : ''"/>
  48. </view>
  49. </view>
  50. </template>
  51. <script setup>
  52. import {ref} from "vue";
  53. import {onLoad} from '@dcloudio/uni-app'
  54. const cur = ref(-1);
  55. onLoad(() => {
  56. uni.setNavigationBarTitle({
  57. title: '引导页'
  58. })
  59. cur.value = 0;
  60. })
  61. // 滑动切换
  62. const swiperChange = ({detail}) => {
  63. cur.value = detail.current;
  64. }
  65. //跳转到登录页
  66. const toLoginLink = () => {
  67. uni.redirectTo({
  68. url: '/pages/login/login'
  69. });
  70. }
  71. </script>
  72. <style lang="scss">
  73. @import "@/style/guide/guide.scss";
  74. </style>