t-i-banner-2.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view>
  3. <view class="banner">
  4. <swiper class="box" autoplay circular>
  5. <swiper-item v-for="(item,index) in banner" :key="item.id" @click="go_link(item.jumpURL)">
  6. <view class="item">
  7. <view class="img">
  8. <image :src="item.imgURL"></image>
  9. </view>
  10. <view class="title">
  11. <view>{{item.title}}</view>
  12. <view class="num">
  13. — <text> {{index+1}} </text> —
  14. </view>
  15. </view>
  16. </view>
  17. </swiper-item>
  18. </swiper>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import {goToLink} from "@/common/common.js"
  24. export default {
  25. name:"t-i-banner-2",
  26. props: [
  27. "banner",
  28. "mine_code"
  29. ],
  30. data() {
  31. return {
  32. }
  33. },
  34. methods:{
  35. go_link(link){
  36. console.log(link)
  37. let item = {
  38. link:link
  39. }
  40. goToLink(item,this.mine_code)
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. .banner{
  47. margin-top: -60rpx;
  48. .box{
  49. width: 750rpx;
  50. height: 620rpx;
  51. .item{
  52. width: 750rpx;
  53. .img{
  54. text-align: center;
  55. image{
  56. width: 750rpx;
  57. height: 485rpx;
  58. }
  59. }
  60. .title{
  61. box-sizing: border-box;
  62. padding: 0 25rpx;
  63. width: 750rpx;
  64. height: 130rpx;
  65. line-height: 1.5;
  66. font-size: 32rpx;
  67. position: relative;
  68. .num{
  69. position: absolute;
  70. bottom: 35rpx;
  71. right: 25rpx;
  72. color: #ACB0AC;
  73. text{
  74. color: #23A2EE;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. </style>