bug修复

This commit is contained in:
@fawn-nine
2023-11-20 17:31:10 +08:00
parent 79fb0c430f
commit 31b73967a3
4 changed files with 151 additions and 119 deletions

View File

@@ -6,8 +6,8 @@ if (process.env.NODE_ENV === 'development') {
// socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "http://59.110.212.44:9200/pb/";
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/";
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1

View File

@@ -224,7 +224,7 @@
// 去讲书
goJiangShu(){
uni.navigateTo({
url: '../talkBook/talkBookDetail?bookId='+ this.bookId
url: '../talkBook/talkBookML?bookid='+ this.bookId
});
},
// 去听书

View File

@@ -19,7 +19,7 @@
</view> -->
<view class="mainContainer">
<view class="item" v-if="bookList.length > 0">
<u-row gutter="16" justify="flex-start" >
<u-row gutter="16" justify="flex-start">
<u-col span="4" v-for="(item,index) in bookList" :key="index">
<view>
<view class="videoBox demo-layout bg-purple" @click="toDetail(item)">
@@ -52,27 +52,29 @@
<script>
import $http from '@/config/requestConfig.js';
// import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue';
import musicPlay from '@/components/music.vue'
import { data } from 'jquery';
import {
mapState
} from 'vuex';
import musicPlay from '@/components/music.vue'
import {
data
} from 'jquery';
import {
mapState
} from 'vuex';
export default {
data() {
return {
loadingNow : false,
playData:{},
windowWidth:0,
bookid:null,
productInfo:{},
page:1,
bookList:[],
pageSize:9,
total:0,
totalPage:0,
status:3,
shupingList:[],
bfaid:null,
loadingNow: false,
playData: {},
windowWidth: 0,
bookid: null,
productInfo: {},
page: 1,
bookList: [],
pageSize: 9,
total: 0,
totalPage: 0,
status: 3,
shupingList: [],
bfaid: null,
contentShow: 1,
}
},
@@ -96,12 +98,12 @@ import { data } from 'jquery';
},
onLoad(e) {
this.windowWidth = uni.getSystemInfoSync().windowWidth;
console.log(e,'onload')
console.log(e, 'onload')
this.bookid = e.bookid
// this.getProDetail(e)
// this.getProDetail(e)
this.getBooks()
},
computed:{
computed: {
...mapState(['userInfo']),
},
methods: {
@@ -109,84 +111,92 @@ import { data } from 'jquery';
this.contentShow = e
this.getBooks()
},
getBooks(){
if(this.contentShow == 1){
getBooks() {
if (this.contentShow == 1) {
$http.request({
url: "book/teach/getUserTeachBooks",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: this.userInfo.id,
'limit': 100,
'page': this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
console.log(res,'讲书列表')
if(res.code == 0 && res.page.records.length > 0){
this.bookList = res.page.records
this.totalPage = res.page.pages
this.status = 3
console.log(this.bookList,'this.bookList')
}else{
this.bookList = []
this.totalPage = 0
}
url: "book/teach/getUserTeachBooks",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: this.userInfo.id,
'limit': 100,
'page': this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
console.log(res, '讲书列表')
if (res.code == 0 && res.page.records.length > 0) {
this.bookList = res.page.records
this.totalPage = res.page.pages
this.status = 3
console.log(this.bookList, 'this.bookList')
} else {
this.bookList = []
this.totalPage = 0
}
}).catch(e => {
console.log(e,'e')
});
}else{
}).catch(e => {
console.log(e, 'e')
});
} else {
$http.request({
url: "book/teach/getUserBestTeachBooks",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: this.userInfo.id,
'limit': 100,
'page': this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
// this.$http
// .post('book/teach/getUserBestTeachBooks',{
// id: this.userInfo.id,
// 'limit': 100,
// 'page': this.page
// })
.then(res => {
console.log(res,'讲书列表')
if(res.code == 0 && res.page.records.length > 0){
this.bookList = res.page.records
this.totalPage = res.page.pages
this.status = 3
console.log(this.bookList,'this.bookList')
}else{
this.bookList = []
this.totalPage = 0
}
url: "book/teach/getUserBestTeachBooks",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: this.userInfo.id,
'limit': 100,
'page': this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
// this.$http
// .post('book/teach/getUserBestTeachBooks',{
// id: this.userInfo.id,
// 'limit': 100,
// 'page': this.page
// })
.then(res => {
console.log(res, '讲书列表')
if (res.code == 0 && res.page.records.length > 0) {
this.bookList = res.page.records
this.totalPage = res.page.pages
this.status = 3
console.log(this.bookList, 'this.bookList')
} else {
this.bookList = []
this.totalPage = 0
}
}).catch(e => {
console.log(e,'e')
});
}).catch(e => {
console.log(e, 'e')
});
}
},
// 书评详情
toDetail(val){
console.log(val,'val')
uni.navigateTo({
url:'./talkBookML?bookid='+val.id
})
toDetail(val) {
// console.log(val,'val')
if (this.contentShow == 1) {
uni.navigateTo({
url: './talkBookML?bookid=' + val.id
})
}
if (this.contentShow == 2) {
uni.navigateTo({
url: '../eBook/bookContent?Id=' + val.id
});
}
},
},
components:{
},
components: {
musicPlay
}
@@ -219,13 +229,25 @@ import { data } from 'jquery';
margin-right: 20rpx;
}
}
.tip{
padding: 20rpx; background-color: #fff;
text{ font-size: 36rpx;}
.tip {
padding: 20rpx;
background-color: #fff;
text {
font-size: 36rpx;
}
}
.flexbox{display: flex;}
.container{padding: 10px;}
.bookName {
.flexbox {
display: flex;
}
.container {
padding: 10px;
}
.bookName {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
@@ -233,21 +255,29 @@ import { data } from 'jquery';
color: #333;
padding: 10rpx 0;
}
uni-image {
width: auto !important;
height: 350rpx;
}
.listenList {
padding: 10rpx;
box-sizing: border-box;
width: calc(100% - 10rpx);
}
.u-row {
flex-wrap: wrap;
}
.u-col {
overflow: hidden;
margin-bottom: 20rpx;
}
.mb30{margin-bottom: 30rpx; overflow: hidden;}
.mb30 {
margin-bottom: 30rpx;
overflow: hidden;
}
</style>

View File

@@ -209,7 +209,7 @@
this.$http
.post('book/teach/getBookTeachItems', {
'bookId': this.bookid,
'limit': 10,
'limit': 20,
'page': this.page
// 'userid': this.userInfo.id,
// 'bookid':
@@ -222,7 +222,9 @@
this.libLIst = this.libLIst.concat(res.page.records)
this.status = 3
this.totalPage = res.page.pages
if(this.totalPage = res.page.current){
this.status = 1
}
} else {
this.libLIst = []
this.totalPage = 0