Browse Source

fix: 广告位ID修正

zhangyuhan 4 năm trước cách đây
mục cha
commit
ce23e9235b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/components/common/ContentLayout.vue

+ 2 - 2
src/components/common/ContentLayout.vue

@@ -6,12 +6,12 @@
     <div class="content-right ad-container" :class="{ nothing: adShow }">
       <slot name="right">
         <slot name="right-top"></slot>
-        <div class="ad-list">
+        <div class="ad-list" :id="(adCodeMap[routerName] || routerName)">
           <div
             class="ad-item-container"
             v-for="(item, index) in adList"
             :key="index">
-            <a :href="item.s_link" target="_blank" :id="routerName + '-' + index">
+            <a :href="item.s_link" target="_blank" :id="(adCodeMap[routerName] || routerName) + '-' + index">
               <img :src="item.s_pic" />
             </a>
           </div>