poster.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view class="cu-modal" :class="{'show': visible}">
  3. <view class="mask" @click="close"></view>
  4. <view class="cu-dialog" style="background-color: transparent; width:100%">
  5. <view class="relative wrapper flex-align-center">
  6. <image :src="resource.center_poster" webp class="poster" mode="widthFix" @click="showNext"/>
  7. </view>
  8. <view class="paddingT30 flex-align-center">
  9. <image :src="resource.close" class="x" @click="close" />
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import resource from '@/utils/resource'
  16. export default {
  17. data() {
  18. return {
  19. resource,
  20. visible: false
  21. }
  22. },
  23. methods: {
  24. show() {
  25. this.visible = true
  26. },
  27. close() {
  28. this.visible = false
  29. },
  30. showNext() {
  31. if (this.$common.isLogin()) {
  32. this.close()
  33. this.$router.push('popularize')
  34. return
  35. }
  36. this.$router.login()
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .mask {
  43. position: absolute;
  44. left: 0;
  45. right: 0;
  46. top: 0;
  47. bottom: 0;
  48. }
  49. .wrapper {
  50. z-index: 2001;
  51. width: 100%;
  52. margin: 0 auto;
  53. position: relative;
  54. .poster {
  55. width: 92%;
  56. height: 0;
  57. }
  58. }
  59. .x {
  60. width: 60rpx;
  61. height: 60rpx;
  62. }
  63. </style>