Przeglądaj źródła

首页【友情链接】假数据完善、链接点击调转页面

liangyan0105 2 lat temu
rodzic
commit
9e2ee98ac5
2 zmienionych plików z 12 dodań i 5 usunięć
  1. 9 3
      src/views/dashboard/MyToDo.vue
  2. 3 2
      src/views/oa/myLinks.vue

+ 9 - 3
src/views/dashboard/MyToDo.vue

@@ -107,7 +107,7 @@
                 <template #extra><a href="javascript:void(0);" @click="openMyLinks">更多</a></template>
                 <div v-for="item in linksList.slice(0, 8)" :key="item.id" class="links">
                   <button class="itemLink">
-                    <a href="https://www.yonyou.com/" target="_blank">
+                    <a href="#" @click="openItemLink(item)">
                       <span width="2em"> {{ item.name }}</span>
                     </a>
                   </button>
@@ -344,10 +344,16 @@ export default {
     this.getAnnList()
   },
   methods: {
-    // 获取友情链接
+    // 友情链接跳转
+    openItemLink(e) {
+      console.log('e????', e)
+      window.open(e.link, '_blank') //新窗口打开
+      console.log('e.link', e.link)
+    },
+    // 查询友情链接
     async getMyLinks() {
       // params:{xx1:'',xx2:'',......}
-      await linksList({isRelease:'1'}).then(res => {
+      await linksList({ isRelease: '1' }).then(res => {
         console.log('友情链接后台返回结果', res)
         this.linksList = res.result.records
         console.log('this.linksList', this.linksList)

+ 3 - 2
src/views/oa/myLinks.vue

@@ -40,7 +40,7 @@
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
       </div>
 
-      <!-- 友情链接表 -->
+      <!-- 友情链接表    size="middle" -->
       <a-row>
         <a-table
           bordered
@@ -143,7 +143,8 @@ export default {
                 {
                     title: '简要介绍',
                     dataIndex: 'briefIntroduction',
-                    align: 'center'
+                    align: 'center',
+                    width: '30%'
                 },
                 {
                     title: '创建人',