|
@@ -0,0 +1,41 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <title>热榜</title>
|
|
|
+ <meta name="referrer" content="https://open.tophub.today/hot"/>
|
|
|
+ <script src="js/vue.min.js"></script>
|
|
|
+ <script src="js/axios.min.js"></script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div id="app">
|
|
|
+ <p>热榜</p>
|
|
|
+ <ol>
|
|
|
+ <li v-for="(v,i) in hotList">
|
|
|
+ <a target="_blank" :href="v.url">{{v.sitename}}:{{v.title}}</a>
|
|
|
+ </li>
|
|
|
+ </ol>
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+ let url = "https://web_history.tianyunperfect.cn/api3/hot";
|
|
|
+ new Vue({
|
|
|
+ el: "#app",
|
|
|
+ data: {
|
|
|
+ hotList: []
|
|
|
+ }, methods: {
|
|
|
+ getHotList: function () {
|
|
|
+ axios.get(url).then(res1 => {
|
|
|
+ let res = res1.data;
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.hotList = res.data.items;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ this.getHotList();
|
|
|
+ },
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|