Jelajahi Sumber

智能客服外链url接入

刘洋 1 tahun lalu
induk
melakukan
323b451ee8
1 mengubah file dengan 6 tambahan dan 3 penghapusan
  1. 6 3
      src/views/intelligence/customer-service/index.vue

+ 6 - 3
src/views/intelligence/customer-service/index.vue

@@ -1,15 +1,18 @@
 <template>
   <div class="customer-service h-full">
-    <iframe class="iframe" src="https://www.baidu.com" frameborder="0"></iframe>
+    <iframe class="iframe" :src="url" frameborder="0"></iframe>
   </div>
 </template>
 
 <script setup name="CustomerService">
-import { onMounted } from 'vue';
+import { onMounted, ref } from 'vue';
 import { intelligenceLink } from '@/api/common';
+const url = ref('');
 onMounted(() => {
   intelligenceLink().then((res) => {
-    console.log('rrr', res);
+    if (typeof res === 'string') {
+      url.value = res;
+    }
   });
 });
 </script>