接口改动
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
{{bookMessage.name}}
|
||||
</view>
|
||||
<view style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
|
||||
<p @click="onAuCHJump(bookMessage.authorId,1)" style="margin-bottom: 20rpx;">
|
||||
{{bookMessage.authorName}} [著] >
|
||||
<p @click="onAuCHJump(bookMessage.author.id,1)" style="margin-bottom: 20rpx;">
|
||||
{{bookMessage.author.authorName}} [著] >
|
||||
</p>
|
||||
<!-- <p @click="onAuCHJump(item.id,2)" v-for="item in this.bookMessage.publisherNIList">
|
||||
{{item.title}} >
|
||||
@@ -52,14 +52,17 @@
|
||||
<view class="item" v-for="(item,index) in libLIst" :key="index" >
|
||||
<view >
|
||||
<view v-if="3 > index"
|
||||
:class="[freeChapterCount < index ? 'graytitle' : '',
|
||||
userInfo.playingInfo.bookid==item.bookid && userInfo.playingInfo.chapterId == item.chapterId ? 'playing' : '']" @click="listenOne(item, index)">
|
||||
<span :class="[freeChapterCount-1 < index ? 'graytitle' : '']">{{item.chapterName}}</span>
|
||||
<uni-tag v-if="freeChapterCount-1 >= index" class="tag" size="small" :inverted="true" text="试听" type="success" />
|
||||
:class="[
|
||||
userInfo.playingInfo.bookId==item.bookId && userInfo.playingInfo.id == item.id ? 'playing' : '']" @click="listenOne(item, index)">
|
||||
<span :class="['graytitle']">{{item.chapter}}</span>
|
||||
<uni-tag v-if="item.isFree == 1" class="tag" size="small" :inverted="true" text="试听" type="success" />
|
||||
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="text-align: center;" @click="gotoListen">
|
||||
<text style="font-size: 28rpx; color:#27b386">查看完整目录</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无试听数据"></u-divider>
|
||||
|
||||
@@ -124,7 +127,9 @@
|
||||
tab_muJian: 0,
|
||||
bookId: '',
|
||||
bookMessage: {
|
||||
flag: false
|
||||
flag: false,
|
||||
author:{authorName:''}
|
||||
|
||||
},
|
||||
bookCatalogue: [],
|
||||
bgiStyle: {
|
||||
@@ -171,7 +176,11 @@
|
||||
getData() {
|
||||
// 获取电子书详情
|
||||
this.$http
|
||||
.post('book/book/appinfo/' + this.bookId + '/' + this.userInfo.id)
|
||||
// .post('book/book/appinfo/' + this.bookId + '/' + this.userInfo.id)
|
||||
.post('book/book/getBookInfo', {
|
||||
'bookId': this.bookId,
|
||||
'userId': this.userInfo.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log('书详细',res.book)
|
||||
this.bookMessage = res.book
|
||||
@@ -180,7 +189,6 @@
|
||||
this.bokMesDet.images = res.book.images
|
||||
this.isBuy = res.book.isBuy
|
||||
this.freeChapterCount = res.book.freeChapterCount
|
||||
|
||||
this.bokMesDet.userId = this.userInfo.id
|
||||
|
||||
if (this.bookMessage.publisherName.indexOf(',') > 0) {
|
||||
@@ -230,7 +238,7 @@
|
||||
// 去购买
|
||||
goBuy(){
|
||||
uni.navigateTo({
|
||||
url: '../bookShop/settlementBook?type=2&list=' + this.bookId
|
||||
url: '../bookShop/commodityDetail?id=' + this.bookMessage.productId
|
||||
});
|
||||
},
|
||||
// 获取书评
|
||||
@@ -280,8 +288,8 @@
|
||||
getLibList(){
|
||||
this.$http
|
||||
.post('book/book/getBookCatalogue', {
|
||||
'userid': this.userInfo.id,
|
||||
'bookid': this.bookId,
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': this.bookId,
|
||||
// 'id': this.playid
|
||||
})
|
||||
.then(res => {
|
||||
@@ -330,6 +338,7 @@
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
.playing{color: #1daa5c;}
|
||||
.graytitle{color: #666;}
|
||||
.flexbox{display: flex;}
|
||||
.tags{
|
||||
.tag{
|
||||
|
||||
Reference in New Issue
Block a user