链接管理

This commit is contained in:
Way Downtown
2021-07-08 21:05:17 +08:00
parent eaab0d5016
commit 75e0704cbc
7 changed files with 479 additions and 28 deletions
+20 -5
View File
@@ -5,6 +5,9 @@
<li v-for="(link, index) in linkList" :key="index">
<a @click="openLinkUrl(link.newWebSite)" v-html="link.webName"></a>
</li>
<li>
<router-link to="/linkManage">更多链接></router-link>
</li>
</ul>
</div>
</template>
@@ -41,16 +44,18 @@ export default {
newWebSite: 'http://www.mee.gov.cn/',
webName: '中华人民共和国生态环境部'
},
{
newWebSite: '',
webName: '更多链接>'
}
// {
// newWebSite: '',
// webName: '更多链接>'
// }
]
}
},
computed: {},
watch: {},
mounted() {},
mounted() {
this.getLink();
},
methods: {
// 跳转链接
openLinkUrl (linkUri) {
@@ -62,7 +67,17 @@ export default {
window.open('https://' + linkUri)
}
},
getLink () {
this.$http.get('sarUrl/tsUrl', {}, {
_this: this,
loading: 'Loading'
}, res=> {
this.data = res.data
console.log(data);
})
}
},
}
</script>