金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.4 KiB

  1. <template>
  2. <view class="content" v-if="value">
  3. <view class="box">
  4. <swiper class="swiper" :circular="true"
  5. indicator-active-color="#0091ff"
  6. :current="current"
  7. :indicator-dots="list.length > 1">
  8. <swiper-item v-for="(item, index) in list" :key="index">
  9. <image class="img" :src="item" mode="aspectFill" @click="clickAd"></image>
  10. </swiper-item>
  11. </swiper>
  12. <view class="close" @click="close">
  13. <text class="lf-iconfont icon-shanchu"></text>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props: {
  21. value: {
  22. type: Boolean,
  23. default: true
  24. }
  25. },
  26. data(){
  27. return {
  28. list: ['https://picsum.photos/200', 'https://picsum.photos/200']
  29. }
  30. },
  31. created(){
  32. },
  33. methods: {
  34. clickAd(){
  35. this.$msg('您点击了广告图')
  36. },
  37. close(){
  38. this.$emit('update:value', false);
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped="scoped">
  44. .content{
  45. width: 100vw;
  46. height: 100vh;
  47. display: flex;
  48. justify-content: center;
  49. align-items: center;
  50. position: fixed;
  51. left: 0;
  52. top: 0;
  53. z-index: 99;
  54. .box{
  55. width: 600rpx;
  56. height: max-content;
  57. .swiper{
  58. width: 600rpx;
  59. height: 840rpx;
  60. .img{
  61. width: 100%;
  62. height: 100%;
  63. }
  64. }
  65. .close{
  66. width: 70rpx;
  67. height: 70rpx;
  68. margin: 34rpx auto 0;
  69. border-radius: 50%;
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. text{
  74. font-size: 80rpx;
  75. }
  76. }
  77. }
  78. }
  79. </style>