Skip to content

Commit

Permalink
[modify]{book.music,movie}: 修改书籍、音乐、热映电影模块传参
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Nov 24, 2019
1 parent 5c5adcc commit 423233f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/views/DouBan/book.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
id="movie"
class=" widget-box">
<h2>图书查询</h2>
<h2 style="margin-bottom:10px">图书查询</h2>
<el-input
v-model="criteria"
placeholder="请输入图书名"
Expand Down Expand Up @@ -120,7 +120,7 @@ export default {
// 从服务器读取数据
loadData(criteria) {
axios
.get(`${this.url}?q=${criteria}&count=20`)
.get(`${this.url}?q=${criteria}&count=20&&apikey=0df993c66c0c636e29ecbb5344252a4a`)
.then(
(response) => {
console.log(response.data)
Expand All @@ -136,7 +136,7 @@ export default {
getImage(url) {
if (url !== undefined) {
// eslint-disable-next-line no-useless-escape
return url.replace('http:\/\/', 'https://images.weserv.nl/?url=')
return url.replace('https:\/\/', 'https://images.weserv.nl/?url=')
}
},
search() {
Expand Down
17 changes: 6 additions & 11 deletions src/views/DouBan/movie.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@
id="name"
:href="scope.row.alt"
target="_blank">{{ scope.row.title }}</a>
</template>
</el-table-column>
<el-table-column
label="类型"
align="center">
<template slot-scope="scope">
<div>
<el-tag
v-for="(item,index) in scope.row.genres"
:key="index"
type="primary"
style="margin-right:5px;margin-top:5px">{{ item }}</el-tag>

</div>

</template>
</el-table-column>

Expand All @@ -56,13 +53,11 @@
<el-table-column
label="豆瓣评分"
align="center">

<template slot-scope="scope">

<el-rate
v-model="scope.row.rating.average"
disabled
show-score
:max="10"
text-color="#ff9900"
score-template="{value}" />
</template>
Expand Down Expand Up @@ -93,7 +88,7 @@ export default {
// 表格当前页数据
tableData: null,
// 请求的URL
url: '/douban/movie/in_theaters?city=南京&count=100',
url: '/douban/movie/in_theaters?city=南京&count=100&&apikey=0df993c66c0c636e29ecbb5344252a4a',
// 下拉菜单选项
select: '',
// 默认每页数据量
Expand Down Expand Up @@ -129,7 +124,7 @@ export default {
getImage(url) {
if (url !== undefined) {
// eslint-disable-next-line no-useless-escape
return url.replace('http:\/\/', 'https://images.weserv.nl/?url=');
return url.replace('https:\/\/', 'https://images.weserv.nl/?url=');
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/DouBan/music.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
// 表格当前页数据
tableData: null,
// 请求的URL
url: '/music/weapi/v3/playlist/detail',
url: '/music',
// 下拉菜单选项
select: '',
// 默认每页数据量
Expand Down

0 comments on commit 423233f

Please sign in to comment.