code-elf-guide.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="content">
  3. <swiper class="swiper"
  4. :autoplay="autoplay"
  5. :duration="duration">
  6. <swiper-item>
  7. <view class="swiper-item">
  8. <!-- <view class="swiper-item-img"><image src="../../static/guide/title_01.png" mode="aspectFit"></image></view> -->
  9. <view class="swiper-item-img"><image src="../../static/images/material/sp1.png" mode="scaleToFill"></image></view>
  10. </view>
  11. <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
  12. </swiper-item>
  13. <swiper-item>
  14. <view class="swiper-item">
  15. <view class="swiper-item-img"><image src="../../static/images/material/sp2.png" mode="scaleToFill"></image></view>
  16. <!-- <view class="swiper-item-img"><image src="../../static/guide/icon_02.png" mode="aspectFit"></image></view> -->
  17. </view>
  18. <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
  19. </swiper-item>
  20. <!-- <swiper-item>
  21. <view class="swiper-item">
  22. <view class="swiper-item-img"><image src="../../static/guide/title_03.png" mode="aspectFit"></image></view>
  23. <view class="swiper-item-img"><image src="../../static/guide/icon_03.png" mode="aspectFit"></image></view>
  24. </view>
  25. <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
  26. </swiper-item> -->
  27. <swiper-item>
  28. <view class="swiper-item">
  29. <view class="swiper-item-img"><image src="../../static/images/material/sp3.png" mode="scaleToFill"></image></view>
  30. <!-- <view class="swiper-item-img"><image src="../../static/guide/icon_04.png" mode="aspectFit"></image></view> -->
  31. </view>
  32. <view class="experience" @tap="launchFlag()">{{experience}}</view>
  33. </swiper-item>
  34. </swiper>
  35. <!-- <view class="uniapp-img"><image src="../../static/guide/uniapp4@2x.png" mode="aspectFit"></image></view> -->
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. background: ['color1', 'color2', 'color3'],
  43. autoplay: false,
  44. duration: 500,
  45. jumpover: '跳过',
  46. experience: '立即体验'
  47. }
  48. },
  49. methods: {
  50. launchFlag: function(){
  51. /**
  52. * 向本地存储中设置launchFlag的值,即启动标识;
  53. */
  54. uni.setStorage({
  55. key: 'launchFlag',
  56. data: true,
  57. });
  58. uni.switchTab({
  59. url: '/pages/home/home'
  60. });
  61. }
  62. }
  63. }
  64. </script>
  65. <style>
  66. page,
  67. .content{
  68. width: 100%;
  69. height: 100%;
  70. background-size: 100% auto ;
  71. padding: 0;
  72. }
  73. .swiper{
  74. width: 100%;
  75. height: 100%;
  76. background: #FFFFFF;
  77. }
  78. .swiper-item {
  79. width: 100%;
  80. height: 100%;
  81. text-align: center;
  82. position: relative;
  83. display: flex;
  84. /* justify-content: center; */
  85. align-items:flex-end;
  86. flex-direction:column-reverse
  87. }
  88. .swiper-item-img{
  89. width: 100%;
  90. height: 100vh;
  91. margin: 0 auto;
  92. }
  93. .swiper-item-img image{
  94. width: 750upx;
  95. height: 100vh;
  96. }
  97. .uniapp-img{
  98. height: 20%;
  99. background: #FFFFFF;
  100. display: flex;
  101. justify-content: center;
  102. align-items:center;
  103. overflow: hidden;
  104. }
  105. .uniapp-img image{
  106. width: 40%;
  107. }
  108. .jump-over,.experience{
  109. position: absolute;
  110. height: 60upx;
  111. line-height: 60upx;
  112. padding: 0 40upx;
  113. border-radius: 30upx;
  114. font-size: 32upx;
  115. color: #454343;
  116. border: 1px solid #454343;
  117. z-index: 999;
  118. }
  119. .jump-over{
  120. right: 45upx;
  121. top: 65upx;
  122. }
  123. .experience{
  124. right: 50%;
  125. margin-right: -105upx;
  126. bottom: 80upx;
  127. }
  128. </style>