li.shaoyi před 3 roky
rodič
revize
4b74b2e566

+ 4 - 0
src/services/request/serviceURL.ts

@@ -80,6 +80,10 @@ export const getUplodaUrl = (): string => {
     return serviceURL.uploadUrl
 }
 
+export const getOpenApiUrl = (): string => {
+    return serviceURL.openApiUrl
+}
+
 // 是否有开户地址
 export const isOpenUrl = ref<boolean>(false)
 

+ 7 - 7
src/views/market/spot_trade/spot_trade_advertisement/index.less

@@ -1,12 +1,12 @@
-.ad{
-    display: flex;
+.ad {
+    display       : flex;
     flex-direction: column;
-    overflow-y: auto;
-    align-items: center;
-    padding: 2px;
+    overflow-y    : auto;
+    align-items   : center;
+    padding       : 2px;
 
-    &-img{
-        width: fit-content;
+    &-img {
+        width    : 80%;
         max-width: 100%;
     }
 }

+ 4 - 2
src/views/market/spot_trade/spot_trade_advertisement/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="ad">
-    <template v-for="(item,index) in adList" :key="index">
-      <img class="ad-img" :src="item.imagepath" v-if="item.imagepath" />
+    <template v-for="(item, index) in adList" :key="index">
+      <img class="ad-img" :src="getOpenApiUrl() + item.urlcontent.replace('./', '/')" v-if="item.urlcontent" />
     </template>
   </div>
 </template>
@@ -11,6 +11,7 @@ import { defineComponent, ref } from 'vue';
 import { queryWrClientAdSpaceConfig } from '@/services/go/wrtrade';
 import { QueryWrClientAdSpaceConfigRsp } from "@/services/go/wrtrade/interface";
 import { initData } from '@/common/methods';
+import { getOpenApiUrl } from '@/services/request/serviceURL';
 
 export default defineComponent({
   setup() {
@@ -23,6 +24,7 @@ export default defineComponent({
     })
 
     return {
+      getOpenApiUrl,
       adList
     }
   }