Header.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div class="header-banner">
  3. <div class="header-banner_desktop">
  4. <div id="adfox_167229156853456985"></div><!--New Adfox Dashboard-->
  5. <div id="adfox_167229138467569665"></div>
  6. </div>
  7. <div class="header-banner_mobile">
  8. <div id="adfox_167048924706448374"></div><!--New Adfox Dashboard-->
  9. <div id="adfox_163238723987728973"></div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. watch: {
  16. $route (to, from) {
  17. // eslint-disable-next-line no-undef
  18. if (this.$nuxt.$device.isDesktop) { Ya.adfoxCode.reload('adfox_167229156853456985') }
  19. // eslint-disable-next-line no-undef
  20. if (this.$nuxt.$device.isMobile) { Ya.adfoxCode.reload('adfox_167229138467569665') }
  21. // eslint-disable-next-line no-undef
  22. if (this.$nuxt.$device.isDesktop) { Ya.adfoxCode.reload('adfox_163238655688285853') }
  23. // eslint-disable-next-line no-undef
  24. if (this.$nuxt.$device.isMobile) { Ya.adfoxCode.reload('adfox_163238723987728973') }
  25. }
  26. },
  27. mounted () {
  28. if (this.$nuxt.$device.isDesktop) {
  29. window.yaContextCb.push(() => {
  30. // eslint-disable-next-line no-undef
  31. Ya.adfoxCode.create({
  32. ownerId: 279920,
  33. containerId: 'adfox_167229138467569665',
  34. params: {
  35. pp: 'g',
  36. ps: 'dbpj',
  37. p2: 'hiyx'
  38. }
  39. })
  40. })
  41. window.yaContextCb.push(() => {
  42. // eslint-disable-next-line no-undef
  43. Ya.adfoxCode.create({
  44. ownerId: 720777,
  45. containerId: 'adfox_167229156853456985',
  46. params: {
  47. p1: 'cwohj',
  48. p2: 'hyrh'
  49. }
  50. })
  51. })
  52. } else {
  53. window.yaContextCb.push(() => {
  54. // eslint-disable-next-line no-undef
  55. Ya.adfoxCode.create({
  56. ownerId: 279920,
  57. containerId: 'adfox_163238723987728973',
  58. params: {
  59. pp: 'g',
  60. ps: 'dbpj',
  61. p2: 'hizb'
  62. }
  63. })
  64. // eslint-disable-next-line no-undef
  65. Ya.adfoxCode.create({
  66. ownerId: 720777,
  67. containerId: 'adfox_167048924706448374',
  68. params: {
  69. p1: 'cwoig',
  70. p2: 'hyrh'
  71. }
  72. })
  73. })
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="less">
  79. .header-banner {
  80. overflow: hidden;
  81. width:100%;
  82. }
  83. .header-banner_desktop {
  84. position: static;
  85. /*display: block;*/
  86. height: 200px;
  87. }
  88. .header-banner_mobile {
  89. display: none;
  90. }
  91. @media all and (max-width: 576px) {
  92. .header-banner_desktop {
  93. display: none;
  94. }
  95. .header-banner_mobile {
  96. position: static;
  97. text-align: center;
  98. display: block;
  99. height: 250px;
  100. }
  101. }
  102. </style>