index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="page">
  3. <view class="uni-padding-wrap">
  4. <view class="page-section swiper">
  5. <view class="page-section-spacing">
  6. <!-- page1 -->
  7. <swiper class="swiper" vertical="true">
  8. <swiper-item>
  9. <view class="scoped-options" @click="linkDtl('32')">
  10. <image src="/static/images/index/ggn.jpg" class="bg" mode="widthFix"></image>
  11. </view>
  12. <image src="/static/images/index/xiala.gif" class="xiala_img"></image>
  13. </swiper-item>
  14. <!-- page2 -->
  15. <swiper-item>
  16. <view class="scoped-options b2" @click="$utils.navigateTo('goods/view',{ id: 34 })">
  17. <image src="/static/images/index/sj.jpg" class="bg" mode="widthFix"></image>
  18. </view>
  19. <image src="/static/images/index/xiala.gif" class="xiala_img"></image>
  20. </swiper-item>
  21. <!-- page3 -->
  22. <swiper-item>
  23. <view class="scoped-options b3" @click="$utils.navigateTo('goods/view',{ id: 36 })">
  24. <image src="/static/images/index/nh.jpg" class="bg" mode="widthFix"></image>
  25. </view>
  26. <!-- <image src="/static/images/index/xiala.gif" class="xiala_img"></image> -->
  27. </swiper-item>
  28. </swiper>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. }
  39. },
  40. onLoad() {
  41. },
  42. onShow () {
  43. uni.hideTabBar()
  44. },
  45. onHide () {
  46. uni.showTabBar()
  47. },
  48. methods: {
  49. linkDtl (id) {
  50. uni.navigateTo({
  51. url: `/pages/goods/view?id=${id}`
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .page {
  59. width: 100%;
  60. height: 100vh;
  61. }
  62. .uni-padding-wrap {
  63. width: 100%;
  64. height: 100%;
  65. padding: 0;
  66. }
  67. .swiper {
  68. width: 100%;
  69. height: 100vh;
  70. }
  71. .xiala_img {
  72. height: 56upx;
  73. width: 56upx;
  74. position: absolute;
  75. bottom: 10upx;
  76. left: 338upx;
  77. }
  78. .noMorePages {
  79. width: 100%;
  80. text-align: center;
  81. height: 56upx;
  82. line-height: 56upx;
  83. position: absolute;
  84. bottom: 10upx;
  85. color: #333;
  86. }
  87. .scoped-options {
  88. background: #305826;
  89. &.b2 {
  90. background: #447b41;
  91. }
  92. &.b3 {
  93. background: #3e7139;
  94. }
  95. height: 100%;
  96. .bg {
  97. width: 100%;
  98. }
  99. }
  100. </style>