Model15.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="model-15">
  3. <view class="cube-wrapper" :class="'style-'+editablePageConfig.editable_page_config_content.show_format" :style="{backgroundColor:editablePageConfig.editable_page_config_content.back_color}">
  4. <view class="item">
  5. <image mode="aspectFit" class="img" :src="editablePageConfig.editable_page_config_content['adv'][0]['image']" @click="goAdUrl (editablePageConfig.editable_page_config_content['adv'][0]['link'])" />
  6. </view>
  7. <view class="line">
  8. <view class="item">
  9. <image mode="aspectFit" class="img" :src="editablePageConfig.editable_page_config_content['adv'][1]['image']" @click="goAdUrl (editablePageConfig.editable_page_config_content['adv'][1]['link'])" />
  10. </view>
  11. <view class="item" v-if="editablePageConfig.editable_page_config_content.show_format!=1">
  12. <image mode="aspectFit" class="img" :src="editablePageConfig.editable_page_config_content['adv'][2]['image']" @click="goAdUrl (editablePageConfig.editable_page_config_content['adv'][2]['link'])" />
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'Model15',
  21. data () {
  22. return {
  23. }
  24. },
  25. props: ['editablePageConfig','editablePage'],
  26. methods: {
  27. goAdUrl (url) {
  28. uni.navigateTo({url: url })
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .model-15 .cube-wrapper{
  35. display: flex;
  36. font-size: 0;
  37. border-radius: 5px;
  38. overflow: hidden;
  39. }
  40. .model-15 .cube-wrapper .item{
  41. flex:1;
  42. }
  43. .model-15 .cube-wrapper .item .img{
  44. width:100%
  45. }
  46. .model-15 .cube-wrapper .line{
  47. flex:1;
  48. display: flex;
  49. }
  50. .model-15 .cube-wrapper.style-2 .line{
  51. flex-direction: column;
  52. }
  53. .model-15 .cube-wrapper.style-3{
  54. flex-direction: column;
  55. }
  56. </style>