-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex_vue.html
57 lines (53 loc) · 1.87 KB
/
index_vue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="Zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>豆瓣 XML 解析例子</title>
<link rel="stylesheet" href="./static/css/mdui.min.css">
</head>
<body>
<div class="mdui-container-fluid" id="app">
<div class="mdui-row">
<div v-for="item in info">
<div class="mdui-col-xs-6 mdui-col-sm-4 mdui-col-md-3 mdui-col-lg-3 mdui-m-b-1 mdui-m-t-1">
<a :href="item.Link" target="_blank">
<div class="mdui-card mdui-hoverable">
<div class="mdui-card-media">
<img :src="item.Img" style="height: 260px;" referrerpolicy="no-referrer" />
<div class="mdui-card-media-covered">
<div class="mdui-card-primary">
<div class="mdui-card-primary-subtitle">{{ item.Title }}</div>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<script src="./static/js/mdui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
<script>
new Vue({
el: '#app',
data() {
return {
info: null
}
},
mounted() {
axios
//.get('https://demo.debuginn.cn/doubanmovies')
.get('http://127.0.0.1:8080/doubanmovies')
.then(response => (this.info = response.data))
.catch(function (error) { // 请求失败处理
console.log(error);
});
}
})
</script>
</body>
</html>