Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-html
This commit is contained in:
@@ -167,7 +167,7 @@ import { data } from 'jquery';
|
||||
Files:[],
|
||||
page:1,
|
||||
pageSize:10,
|
||||
total:0,
|
||||
total:0, // 资源的总页数1
|
||||
status:3,
|
||||
shupingList:[],
|
||||
bfaid:null,
|
||||
@@ -202,14 +202,20 @@ import { data } from 'jquery';
|
||||
this.newList = []
|
||||
this.hotList = []
|
||||
this.bookList = []
|
||||
this.total = 0
|
||||
this.getBookList(this.commentsListTab, false)
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.newestpage + 1 <= this.total || this.hotestpage +1 <= this.total || this.booksetpage + 1 <= this.total){
|
||||
this.newestpage++
|
||||
this.hotestpage++
|
||||
this.booksetpage++
|
||||
this.getBookList(this.commentsListTab, false)
|
||||
this.booksetpage++
|
||||
this.getBookList(this.commentsListTab, false)
|
||||
}else{
|
||||
this.status = 1
|
||||
}
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
@@ -261,6 +267,7 @@ import { data } from 'jquery';
|
||||
this.newestpage = 1
|
||||
this.hotestpage = 1
|
||||
this.booksetpage = 1
|
||||
this.total = 0
|
||||
this.newList = []
|
||||
this.hotList = []
|
||||
this.bookList = []
|
||||
@@ -366,6 +373,7 @@ import { data } from 'jquery';
|
||||
}else{
|
||||
this.bookList = this.bookList.concat(res.page.records)
|
||||
}
|
||||
this.total = res.page.pages
|
||||
console.log(this.newList,'this.newList')
|
||||
// let list = res.page.records
|
||||
// console.log(list,'list')
|
||||
@@ -391,11 +399,11 @@ import { data } from 'jquery';
|
||||
// console.log(e,'e')
|
||||
// })
|
||||
// }
|
||||
if(res.page.records.length != 10){
|
||||
this.status = 1
|
||||
} else {
|
||||
// if(res.page.records.length != 10){
|
||||
// this.status = 1
|
||||
// } else {
|
||||
this.status = 0
|
||||
}
|
||||
// }
|
||||
// uni.hideLoading();
|
||||
}).catch((e)=>{
|
||||
console.log(e,'e')
|
||||
|
||||
@@ -838,7 +838,7 @@
|
||||
}
|
||||
.home_nar {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 10rpx;
|
||||
padding: 40rpx 10rpx;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
color: #333;
|
||||
|
||||
@@ -17,41 +17,33 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="yianList.length > 0">
|
||||
<view class="bookInfo3" v-for="(item,index) in yianList" :key="index">
|
||||
<view class="mainContent3">
|
||||
<view class="item">
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<view class="title">{{item.name}}</view>
|
||||
<!-- <view class="pianshuping">{{item.forumNum}}篇医案</view> -->
|
||||
</view>
|
||||
<!-- <image class="feng" v-if="item.images" :src="item.images" mode="aspectFill" @click.stop="toMore(item)"></image>
|
||||
<view class="shupingList">
|
||||
<view class="description" v-for="(item1,index1) in item.forums" :key="index1" @click.stop="toDetail1(item1)">{{item1.title}}</view>
|
||||
</view>
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<span class="left"></span>
|
||||
<span class="right flexbox opbtns" style="color:#3c9cff;">
|
||||
全部
|
||||
</span>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-if="status==1 && yianList.length == 0">
|
||||
暂无医案内容~
|
||||
</view>
|
||||
<view class="mainContainer">
|
||||
<view class="item" v-if="yianList.length > 0">
|
||||
<u-row gutter="16" justify="flex-start">
|
||||
<u-col span="4" v-for="(item,index) in yianList" :key="index">
|
||||
<view>
|
||||
<view class="videoBox demo-layout bg-purple" @click="toMore(item)">
|
||||
<image v-if="item.images != ''" :src="item.images" mode="scaleToFill"></image>
|
||||
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<text class="bookName">{{item.name}}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
<u-divider v-else text="暂无数据"></u-divider>
|
||||
<view style="width: 100%;">
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<view v-if="status==1">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<view v-if="status==1" style="padding-bottom: 20rpx;">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
@@ -113,48 +105,40 @@ import { data } from 'jquery';
|
||||
},
|
||||
// 查看本书更多书评
|
||||
toMore(val){
|
||||
// console.log(val,'val')
|
||||
// let data = {
|
||||
// 'userId': this.userInfo.id,
|
||||
// 'bookId': val.id
|
||||
// }
|
||||
// checkBookRight(data,res=>{
|
||||
// console.log(res)
|
||||
// if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianList?bookid='+val.id + '&bookname='+val.name,
|
||||
});
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title:'购买本书后方可查看此内容!',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
},
|
||||
// 医案详情
|
||||
toDetail1(val){
|
||||
// console.log(val,'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': val.bookid
|
||||
if (this.contentShow == 1) {
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianList?bookid='+val.id + '&bookname='+val.name,
|
||||
})
|
||||
}
|
||||
checkBookRight(data,res=>{
|
||||
console.log(res)
|
||||
if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'购买本书后方可查看此内容!',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (this.contentShow == 2) {
|
||||
uni.navigateTo({
|
||||
url: '../eBook/bookContent?Id=' + val.id
|
||||
});
|
||||
}
|
||||
// console.log(val,'val')
|
||||
},
|
||||
// // 医案详情
|
||||
// toDetail1(val){
|
||||
// // console.log(val,'val')
|
||||
// let data = {
|
||||
// 'userId': this.userInfo.id,
|
||||
// 'bookId': val.bookid
|
||||
// }
|
||||
// checkBookRight(data,res=>{
|
||||
// console.log(res)
|
||||
// if(res.success){
|
||||
// uni.navigateTo({
|
||||
// url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId
|
||||
// })
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title:'购买本书后方可查看此内容!',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
// },
|
||||
getYianList(tushuflag){
|
||||
|
||||
// uni.showLoading({
|
||||
@@ -206,261 +190,7 @@ import { data } from 'jquery';
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// @import '@/style/mixin.scss';
|
||||
.orderTabs {
|
||||
// margin: 70rpx 0 0 0;
|
||||
width: 100%;
|
||||
// padding: 0 3% 3% 3%;
|
||||
position: fixed;
|
||||
// top: 80rpx;
|
||||
background-color: #f7faf9;
|
||||
z-index: 100;
|
||||
|
||||
.orderdefine {
|
||||
display: inline-block;
|
||||
padding: 20rpx 0 20rpx 0;
|
||||
// margin: 40rpx 0 15rpx 0;
|
||||
width:230rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.ordStyle {
|
||||
// border-bottom: 4rpx solid #54a966;
|
||||
// color: #54a966;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flexbox{display: flex;}
|
||||
.container{padding: 0 10px;}
|
||||
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
||||
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
||||
.starLight{ background : url(../../static/icon/star_light.png) no-repeat; background-size: contain;}
|
||||
.cuIcon-emoji {
|
||||
background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; margin-right: 20rpx;
|
||||
width: 30px; }
|
||||
.cuIcon-keyboard{background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block;
|
||||
width: 30px; }
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dp_add {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
font-size: 22rpx;
|
||||
background-color: #fd6004;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
|
||||
.u-icon {
|
||||
display: inline-block;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}}
|
||||
|
||||
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.gengduoshuping{text-align: right; color: #0044ff; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.bookInfo{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// .imageradius{
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
// }
|
||||
|
||||
// .bookInfo-inner{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px);
|
||||
// .title{font-size: 32rpx; margin-top: 0rpx; margin-bottom: 20rpx;font-weight: 700; display: block;}
|
||||
// .author{font-size: 30rpx;margin-top: 0rpx;margin-bottom: 20rpx;font-weight: 500; display: block; }
|
||||
|
||||
// .description{
|
||||
// font-size: 28rpx;
|
||||
// line-height: 20px;
|
||||
// width: 100%;
|
||||
// color:#888;
|
||||
// padding-left: 0;
|
||||
// overflow:hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// -webkit-line-clamp: 9;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
// }
|
||||
// }
|
||||
// .bookinfoimage{width: 150px !important; }
|
||||
|
||||
}
|
||||
.mainContent{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 160rpx;
|
||||
width: 140rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 5;
|
||||
line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
height: 172rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mb30{margin-bottom: 30rpx; overflow: hidden;}
|
||||
|
||||
.bookInfo3{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.mainContent3{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 240rpx;
|
||||
width: 164rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
.pianshuping{
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
}
|
||||
.shupingList{
|
||||
min-height: 212rpx;
|
||||
}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mytabs {
|
||||
.mytabs {
|
||||
// background: url('@/static/icon/bgtushu.png') no-repeat left top;
|
||||
height: 80rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
@@ -485,4 +215,55 @@ import { data } from 'jquery';
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
text {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.bookName {
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 30rpx;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -150,8 +150,16 @@
|
||||
this.$http
|
||||
.post('book/bookMedicalRecords/getById?medicalRecordsId=' + this.medicalRecordsId )
|
||||
.then(res => {
|
||||
console.log(res,'res')
|
||||
// console.log(res,'res')
|
||||
this.productInfo = res.entity
|
||||
// console.log('cursor: nwse-resize', this.productInfo.content.includes('cursor: nwse-resize'))
|
||||
// if(this.productInfo.content.includes('cursor: nwse-resize')){
|
||||
// // this.productInfo.content = this.productInfo.content.replaceAll('cursor: nwse-resize;', 'cursor: nwse-resize;max-width:100%;')
|
||||
// }else{
|
||||
this.productInfo.content = this.productInfo.content.replaceAll('img src', 'img style="max-width:100%;" src')
|
||||
// }
|
||||
|
||||
// console.log(this.productInfo.content,'res')
|
||||
uni.hideLoading();
|
||||
}).catch((e)=>{
|
||||
console.log(e,'e')
|
||||
@@ -305,6 +313,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.ql-align-center{
|
||||
text-align: center;
|
||||
}
|
||||
.addPl{padding-top: 0rpx; margin-bottom: 0rpx;}
|
||||
.pinglunMain{
|
||||
.pl-item{
|
||||
|
||||
@@ -1,155 +1,177 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<!--父组件-->
|
||||
|
||||
<view class="container" style="padding-bottom: 10rpx;">
|
||||
<!-- <view class="mini"></view> -->
|
||||
<view>
|
||||
<z-nav-bar :title="'医案-'+bookname"></z-nav-bar>
|
||||
</view>
|
||||
<view class="ordersTabs" style="z-index:0;position:unset;height: 10px;">
|
||||
<view class="ordersdefine"> </view>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <view class="" style="padding:40rpx 20rpx;">
|
||||
<view class="mytabs flexbox">
|
||||
<view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)">
|
||||
已购图书
|
||||
<!-- 基本信息 -->
|
||||
<view class="book_neir">
|
||||
<view class="flexbox info">
|
||||
<view class="item">
|
||||
<image class="bn_img" v-if="bookInfo.images != ''" :src="bookInfo.images" mode="widthFix">
|
||||
</image>
|
||||
<image class="bn_img" style="border:1px solid #eee" v-else src="../../static/icon/wufeng.jpg"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
<view :class="['item','item2', contentShow == 2 ? 'active' :'']" @click="setData(2)">
|
||||
推荐图书
|
||||
<!-- <img :src="bookInfo.images" class="bn_img"> -->
|
||||
<view class="item">
|
||||
<!-- <b class="leiXing" v-if="bookInfo.isVip==1" style="background: #c79119;">VIP</b>
|
||||
<b class="leiXing" v-if="bookInfo.isVip==2" style="background: #c74119;">付费</b> -->
|
||||
<view class="bn_nes">
|
||||
<view style="font-weight: bold;margin-bottom: 30rpx;">
|
||||
{{bookInfo.name}}
|
||||
</view>
|
||||
<view v-if="bookInfo.author != null"
|
||||
style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
|
||||
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
|
||||
{{bookInfo.author.authorName}} [著] >
|
||||
</p>
|
||||
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookInfo.publisherNIList">
|
||||
{{item.title}} >
|
||||
</p>
|
||||
</view>
|
||||
<view class="tags">
|
||||
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评"
|
||||
type="success"></uni-tag>
|
||||
<!-- 1:打卡,2不打卡 -->
|
||||
<uni-tag @click="gotoclock()" v-if="bookInfo.clockIn == 1" class="tag" :inverted="true"
|
||||
text="签到" type="warning"></uni-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="yianList.length > 0">
|
||||
<view class="bookInfo3" v-for="(item,index) in yianList" :key="index">
|
||||
<view class="mainContent3">
|
||||
<view class="item">
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<!-- <view class="pianshuping">{{item.forumNum}}篇医案</view> -->
|
||||
</view>
|
||||
<!-- <image class="feng" v-if="item.images" :src="item.images" mode="aspectFill" @click.stop="toMore(item)"></image>
|
||||
<view class="shupingList">
|
||||
<view class="description" v-for="(item1,index1) in item.forums" :key="index1" @click.stop="toDetail1(item1)">{{item1.title}}</view>
|
||||
</view>
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<span class="left"></span>
|
||||
<span class="right flexbox opbtns" style="color:#3c9cff;">
|
||||
全部
|
||||
</span>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-if="status==1 && yianList.length == 0">
|
||||
暂无医案内容~
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
|
||||
</view>
|
||||
<!-- end -->
|
||||
<view class="playList" v-if="yianList.length > 0">
|
||||
<view class="item" v-for="(item,index) in yianList" :key="index">
|
||||
<view>
|
||||
<view @click="toDetail(item)" class="flexbox muluitem">
|
||||
<span>{{item.title}}</span>
|
||||
<!-- <view >
|
||||
<uni-tag v-if="item.voices != ''" class="tag" size="small" :inverted="true" text="音频"
|
||||
type="success" /></view> -->
|
||||
<view ><uni-tag v-if="item.content != ''" class="tag" size="small" :inverted="true" text="文字"
|
||||
type="primary" /></view>
|
||||
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;">
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<view v-if="status==1">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无讲书目录"></u-divider>
|
||||
<music-play :playData="playData"></music-play>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<!-- <z-navigation></z-navigation> -->
|
||||
</view>
|
||||
<view v-if="status==1" style="padding-bottom: 20rpx;">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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, mapMutations
|
||||
} from 'vuex';
|
||||
import {
|
||||
checkBookRight
|
||||
} from '@/config/utils';
|
||||
// import textScroll from '@/components/textScroll/index.vue'
|
||||
// import cxAdudioPlay from '@/components/cx-audio-play/cx-audio-play.vue'
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '../../config/requestConfig';
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
import {
|
||||
checkBookRight
|
||||
} from '@/config/utils';
|
||||
export default {
|
||||
components: {
|
||||
// cxAdudioPlay,
|
||||
// textScroll,
|
||||
musicPlay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
windowWidth:0,
|
||||
bookid:null,
|
||||
isBuy: false, // true 已购买,false 未购买
|
||||
playData: {},
|
||||
bookInfo: {
|
||||
author:{
|
||||
authorName:''
|
||||
}
|
||||
}, // 书籍详情
|
||||
bookid: null, // 书籍id
|
||||
status:3,
|
||||
freeChapterCount: 0, // 免费章节数
|
||||
yianList: [], // 书籍目录
|
||||
videoList: [], //音频文件
|
||||
page:1,
|
||||
pageSize:10,
|
||||
total:0,
|
||||
status:3,
|
||||
booksetpage: 1,
|
||||
yianList:[],
|
||||
contentShow: 1,
|
||||
|
||||
totalPage:0,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log('下拉刷新了')
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
this.booksetpage = 1
|
||||
this.yianList = []
|
||||
this.getYianList(false)
|
||||
|
||||
this.yianList = []
|
||||
this.page = 1
|
||||
this.totalPage = 0
|
||||
this.getyianList()
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.booksetpage++
|
||||
this.getYianList(false)
|
||||
console.log('到底了',this.page+1 , this.totalPage)
|
||||
|
||||
if(this.page+1 <= this.totalPage){
|
||||
this.page++
|
||||
this.status = 0
|
||||
this.getyianList()
|
||||
}else{
|
||||
this.status = 1
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
this.yianList = []
|
||||
this.page = 1
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
console.log(e,'onload')
|
||||
console.log('------------------')
|
||||
// 隐藏原生的tabbar
|
||||
console.log(e, 'e')
|
||||
uni.hideTabBar();
|
||||
this.bookid = e.bookid
|
||||
this.bookname = e.bookname
|
||||
this.getYianList(false)
|
||||
this.bookname = e.bookname
|
||||
},
|
||||
onShow() {
|
||||
// this.yianList = []
|
||||
// this.page = 1
|
||||
// this.totalPage = 0
|
||||
this.getyianList()
|
||||
this.getBookInfo()
|
||||
|
||||
},
|
||||
computed:{
|
||||
...mapState(['userInfo']),
|
||||
computed: {
|
||||
...mapState(['userInfo'])
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setLoadingShow']),
|
||||
setData(e) {
|
||||
this.contentShow = e
|
||||
this.getYianList(true)
|
||||
},
|
||||
...mapMutations(['setUserInfo']),
|
||||
|
||||
// 查看本书更多书评
|
||||
toMore(val){
|
||||
// console.log(val,'val')
|
||||
toMore(val) {
|
||||
// console.log(val, 'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': val.id
|
||||
}
|
||||
// checkBookRight(data,res=>{
|
||||
// console.log(res)
|
||||
// if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId,
|
||||
});
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title:'购买本书后方可查看此内容!',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
},
|
||||
// 医案详情
|
||||
toDetail1(val){
|
||||
// console.log(val,'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': val.bookid
|
||||
'bookId': this.bookid
|
||||
}
|
||||
checkBookRight(data,res=>{
|
||||
console.log(res)
|
||||
if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId
|
||||
})
|
||||
url: '../comments/comments?bookid=' + this.bookid,
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'购买本书后方可查看此内容!',
|
||||
@@ -159,323 +181,301 @@ import { data } from 'jquery';
|
||||
})
|
||||
|
||||
},
|
||||
getYianList(){
|
||||
|
||||
// uni.showLoading({
|
||||
// title: '加载中'
|
||||
// });
|
||||
|
||||
// 去打卡
|
||||
gotoclock() {
|
||||
uni.navigateTo({
|
||||
url: '../clock/clock?bookid=' + this.bookid,
|
||||
});
|
||||
},
|
||||
getBookInfo() {
|
||||
// 获取书本基本信息
|
||||
this.$http
|
||||
.post('book/book/getBookInfo', {
|
||||
'bookId': this.bookid,
|
||||
'userId': this.userInfo.id
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
console.log(res, 'res')
|
||||
this.bookInfo = res.book
|
||||
// this.isBuy = res.book.isBuy
|
||||
// this.freeChapterCount = res.book.freeChapterCount
|
||||
} else {
|
||||
console.log(res.msg)
|
||||
}
|
||||
console.log(res, 'res基本信息')
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
|
||||
// 详细
|
||||
toDetail(item) {
|
||||
console.log('点击了', item)
|
||||
// uni.navigateTo({
|
||||
// url: './talkBookDetail?teachId=' + item.teachId +"&bookId="+item.bookId
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+item.medicalRecordsId,
|
||||
});
|
||||
},
|
||||
|
||||
// 信息介绍跳转
|
||||
onAuCHJump(id, e) {
|
||||
uni.navigateTo({
|
||||
url: '../eBook/bookMessage?Id=' + id + '&typ=' + e
|
||||
});
|
||||
},
|
||||
// 获取章节列表
|
||||
getyianList() {
|
||||
$http.request({
|
||||
url: "book/bookMedicalRecords/listByBookId",
|
||||
method: "POST",
|
||||
data: {
|
||||
"page": this.booksetpage,
|
||||
"limit": 10,
|
||||
"page": this.page,
|
||||
"limit": 20,
|
||||
"bookId": this.bookid
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => {
|
||||
this.yianList = this.yianList.concat(res.page.records)
|
||||
console.log(this.yianList,'this.yianList')
|
||||
if(res.page.records.length != 10){
|
||||
this.status = 1
|
||||
} else {
|
||||
this.status = 0
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
|
||||
// this.$http
|
||||
// .post('book/teach/getBookTeachItems', {
|
||||
// 'bookId': this.bookid,
|
||||
// 'limit': 20,
|
||||
// 'page': this.page
|
||||
// // 'userid': this.userInfo.id,
|
||||
// // 'bookid':
|
||||
// // 'id': this.playid
|
||||
// })
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '章节目录')
|
||||
if (res.page.records.length > 0) {
|
||||
this.yianList = this.yianList.concat(res.page.records)
|
||||
this.status = 3
|
||||
this.totalPage = res.page.pages
|
||||
if(this.totalPage = res.page.current){
|
||||
this.status = 1
|
||||
}
|
||||
} else {
|
||||
this.yianList = []
|
||||
this.totalPage = 0
|
||||
}
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.log(e.msg)
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
components:{
|
||||
musicPlay,
|
||||
emotion
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// @import '@/style/mixin.scss';
|
||||
.orderTabs {
|
||||
// margin: 70rpx 0 0 0;
|
||||
width: 100%;
|
||||
// padding: 0 3% 3% 3%;
|
||||
position: fixed;
|
||||
// top: 80rpx;
|
||||
background-color: #f7faf9;
|
||||
z-index: 100;
|
||||
|
||||
.orderdefine {
|
||||
display: inline-block;
|
||||
padding: 20rpx 0 20rpx 0;
|
||||
// margin: 40rpx 0 15rpx 0;
|
||||
width:230rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.ordStyle {
|
||||
// border-bottom: 4rpx solid #54a966;
|
||||
// color: #54a966;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flexbox{display: flex;}
|
||||
.container{padding: 0 10px;}
|
||||
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
||||
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
||||
.starLight{ background : url(../../static/icon/star_light.png) no-repeat; background-size: contain;}
|
||||
.cuIcon-emoji {
|
||||
background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; margin-right: 20rpx;
|
||||
width: 30px; }
|
||||
.cuIcon-keyboard{background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block;
|
||||
width: 30px; }
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dp_add {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
font-size: 22rpx;
|
||||
background-color: #fd6004;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
|
||||
.u-icon {
|
||||
display: inline-block;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}}
|
||||
|
||||
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.gengduoshuping{text-align: right; color: #0044ff; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.bookInfo{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// .imageradius{
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
// }
|
||||
|
||||
// .bookInfo-inner{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px);
|
||||
// .title{font-size: 32rpx; margin-top: 0rpx; margin-bottom: 20rpx;font-weight: 700; display: block;}
|
||||
// .author{font-size: 30rpx;margin-top: 0rpx;margin-bottom: 20rpx;font-weight: 500; display: block; }
|
||||
|
||||
// .description{
|
||||
// font-size: 28rpx;
|
||||
// line-height: 20px;
|
||||
// width: 100%;
|
||||
// color:#888;
|
||||
// padding-left: 0;
|
||||
// overflow:hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// -webkit-line-clamp: 9;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
// }
|
||||
// }
|
||||
// .bookinfoimage{width: 150px !important; }
|
||||
|
||||
}
|
||||
.mainContent{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 160rpx;
|
||||
width: 140rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
<style lang="less">
|
||||
.muluitem{
|
||||
span{
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 5;
|
||||
line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
height: 172rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mb30{margin-bottom: 30rpx; overflow: hidden;}
|
||||
.playingFig {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.bookInfo3{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
.price {
|
||||
margin-top: 160rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.light {
|
||||
font-size: 50rpx;
|
||||
font-weight: bold;
|
||||
color: #f05654;
|
||||
}
|
||||
}
|
||||
|
||||
.tags {
|
||||
.tag {
|
||||
margin-left: 0;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.charType {
|
||||
display: inline;
|
||||
width: 20px !important;
|
||||
}
|
||||
|
||||
.graytitle {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.yigoumai {
|
||||
background-color: #ffc773;
|
||||
}
|
||||
|
||||
.shiting {
|
||||
background-color: #f47983;
|
||||
}
|
||||
|
||||
.playing {
|
||||
color: #1daa5c;
|
||||
}
|
||||
|
||||
.chaoshi {
|
||||
background-color: #1daa5c;
|
||||
}
|
||||
|
||||
.home_nar {
|
||||
margin: 30rpx 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.hn_cl_tit {
|
||||
width: 48%;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.mainContent3{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 240rpx;
|
||||
width: 164rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
.pianshuping{
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
}
|
||||
.shupingList{
|
||||
min-height: 212rpx;
|
||||
}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mytabs {
|
||||
// background: url('@/static/icon/bgtushu.png') no-repeat left top;
|
||||
height: 80rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
// line-height: 110upx;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
|
||||
width: 80upx;
|
||||
height: 80upx;
|
||||
display: inline-block;
|
||||
// margin: 0 auto;
|
||||
// margin: 0 20rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
height: 100upx;
|
||||
display: inline-block;
|
||||
line-height: 80upx;
|
||||
color: #fff;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.book_neir {
|
||||
margin-top: 80rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
.bn_img {
|
||||
width: 300rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.book_neir {
|
||||
margin: 20rpx 0 0 0;
|
||||
position: relative;
|
||||
|
||||
.item {
|
||||
border-radius: 10rpx;
|
||||
background-color: #c6ead0;
|
||||
width: 48%;
|
||||
// margin: 0 10rpx;
|
||||
text-align: center;
|
||||
color: #3c7f56;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bn_img {
|
||||
float: left;
|
||||
width: 250upx;
|
||||
height: 320upx;
|
||||
}
|
||||
|
||||
.bn_nes {
|
||||
float: left;
|
||||
font-size: 36rpx;
|
||||
line-height: 80rpx;
|
||||
margin-left: 40rpx;
|
||||
|
||||
view {
|
||||
margin: 20rpx 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item.active {
|
||||
background-color: #3c7f56;
|
||||
.leiXing {
|
||||
display: block;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item1 {
|
||||
margin-right: 20rpx;
|
||||
font-weight: normal;
|
||||
background: #27b386;
|
||||
position: absolute;
|
||||
left: -15upx;
|
||||
top: 10upx;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.container {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.playTitle {
|
||||
width: 80%;
|
||||
margin: 20rpx auto;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.libTitle {
|
||||
font-size: 40rpx;
|
||||
margin: 40rpx 0;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
}
|
||||
|
||||
.playList {
|
||||
padding: 20rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.playList .item {
|
||||
display: block;
|
||||
line-height: 80rpx;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
font-size: 36rpx;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tag {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.playNow {
|
||||
color: #27b386;
|
||||
}
|
||||
|
||||
.pageTabBox {
|
||||
width: 150px;
|
||||
margin: 20rpx auto;
|
||||
font-size: 60rpx;
|
||||
}
|
||||
|
||||
.cxAdudioPlay {
|
||||
position: fixed;
|
||||
bottom: 150rpx;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
481
pages/yian/yianList1.vue
Normal file
481
pages/yian/yianList1.vue
Normal file
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<z-nav-bar :title="'医案-'+bookname"></z-nav-bar>
|
||||
</view>
|
||||
<view class="ordersTabs" style="z-index:0;position:unset;height: 10px;">
|
||||
<view class="ordersdefine"> </view>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <view class="" style="padding:40rpx 20rpx;">
|
||||
<view class="mytabs flexbox">
|
||||
<view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)">
|
||||
已购图书
|
||||
</view>
|
||||
<view :class="['item','item2', contentShow == 2 ? 'active' :'']" @click="setData(2)">
|
||||
推荐图书
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="yianList.length > 0">
|
||||
<view class="bookInfo3" v-for="(item,index) in yianList" :key="index">
|
||||
<view class="mainContent3">
|
||||
<view class="item">
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<!-- <view class="pianshuping">{{item.forumNum}}篇医案</view> -->
|
||||
</view>
|
||||
<!-- <image class="feng" v-if="item.images" :src="item.images" mode="aspectFill" @click.stop="toMore(item)"></image>
|
||||
<view class="shupingList">
|
||||
<view class="description" v-for="(item1,index1) in item.forums" :key="index1" @click.stop="toDetail1(item1)">{{item1.title}}</view>
|
||||
</view>
|
||||
<view class="btns flexbox" @click.stop="toMore(item)">
|
||||
<span class="left"></span>
|
||||
<span class="right flexbox opbtns" style="color:#3c9cff;">
|
||||
全部
|
||||
</span>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-if="status==1 && yianList.length == 0">
|
||||
暂无医案内容~
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<view v-if="status==1" style="padding-bottom: 20rpx;">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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, mapMutations
|
||||
} from 'vuex';
|
||||
import {
|
||||
checkBookRight
|
||||
} from '@/config/utils';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
windowWidth:0,
|
||||
bookid:null,
|
||||
page:1,
|
||||
pageSize:10,
|
||||
total:0,
|
||||
status:3,
|
||||
booksetpage: 1,
|
||||
yianList:[],
|
||||
contentShow: 1,
|
||||
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log('下拉刷新了')
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
this.booksetpage = 1
|
||||
this.yianList = []
|
||||
this.getYianList(false)
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
this.booksetpage++
|
||||
this.getYianList(false)
|
||||
},
|
||||
onLoad(e) {
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
console.log(e,'onload')
|
||||
this.bookid = e.bookid
|
||||
this.bookname = e.bookname
|
||||
this.getYianList(false)
|
||||
},
|
||||
computed:{
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setLoadingShow']),
|
||||
setData(e) {
|
||||
this.contentShow = e
|
||||
this.getYianList(true)
|
||||
},
|
||||
// 查看本书更多书评
|
||||
toMore(val){
|
||||
// console.log(val,'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': val.id
|
||||
}
|
||||
// checkBookRight(data,res=>{
|
||||
// console.log(res)
|
||||
// if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId,
|
||||
});
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title:'购买本书后方可查看此内容!',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
},
|
||||
// 医案详情
|
||||
toDetail1(val){
|
||||
// console.log(val,'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': val.bookid
|
||||
}
|
||||
checkBookRight(data,res=>{
|
||||
console.log(res)
|
||||
if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../yian/yianDetail?medicalRecordsId='+val.medicalRecordsId
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'购买本书后方可查看此内容!',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
getYianList(){
|
||||
|
||||
// uni.showLoading({
|
||||
// title: '加载中'
|
||||
// });
|
||||
|
||||
$http.request({
|
||||
url: "book/bookMedicalRecords/listByBookId",
|
||||
method: "POST",
|
||||
data: {
|
||||
"page": this.booksetpage,
|
||||
"limit": 10,
|
||||
"bookId": this.bookid
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => {
|
||||
this.yianList = this.yianList.concat(res.page.records)
|
||||
console.log(this.yianList,'this.yianList')
|
||||
if(res.page.records.length != 10){
|
||||
this.status = 1
|
||||
} else {
|
||||
this.status = 0
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
components:{
|
||||
musicPlay,
|
||||
emotion
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// @import '@/style/mixin.scss';
|
||||
.orderTabs {
|
||||
// margin: 70rpx 0 0 0;
|
||||
width: 100%;
|
||||
// padding: 0 3% 3% 3%;
|
||||
position: fixed;
|
||||
// top: 80rpx;
|
||||
background-color: #f7faf9;
|
||||
z-index: 100;
|
||||
|
||||
.orderdefine {
|
||||
display: inline-block;
|
||||
padding: 20rpx 0 20rpx 0;
|
||||
// margin: 40rpx 0 15rpx 0;
|
||||
width:230rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.ordStyle {
|
||||
// border-bottom: 4rpx solid #54a966;
|
||||
// color: #54a966;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flexbox{display: flex;}
|
||||
.container{padding: 0 10px;}
|
||||
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
||||
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
||||
.starLight{ background : url(../../static/icon/star_light.png) no-repeat; background-size: contain;}
|
||||
.cuIcon-emoji {
|
||||
background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; margin-right: 20rpx;
|
||||
width: 30px; }
|
||||
.cuIcon-keyboard{background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block;
|
||||
width: 30px; }
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dp_add {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
font-size: 22rpx;
|
||||
background-color: #fd6004;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
|
||||
.u-icon {
|
||||
display: inline-block;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}}
|
||||
|
||||
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.gengduoshuping{text-align: right; color: #0044ff; padding-bottom: 20rpx; padding-top: 20rpx;}
|
||||
.bookInfo{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// .imageradius{
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
// }
|
||||
|
||||
// .bookInfo-inner{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px);
|
||||
// .title{font-size: 32rpx; margin-top: 0rpx; margin-bottom: 20rpx;font-weight: 700; display: block;}
|
||||
// .author{font-size: 30rpx;margin-top: 0rpx;margin-bottom: 20rpx;font-weight: 500; display: block; }
|
||||
|
||||
// .description{
|
||||
// font-size: 28rpx;
|
||||
// line-height: 20px;
|
||||
// width: 100%;
|
||||
// color:#888;
|
||||
// padding-left: 0;
|
||||
// overflow:hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// -webkit-line-clamp: 9;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
// }
|
||||
// }
|
||||
// .bookinfoimage{width: 150px !important; }
|
||||
|
||||
}
|
||||
.mainContent{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 160rpx;
|
||||
width: 140rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 5;
|
||||
line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
height: 172rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mb30{margin-bottom: 30rpx; overflow: hidden;}
|
||||
|
||||
.bookInfo3{
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
padding:20rpx;
|
||||
border: 1px splid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.mainContent3{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
// padding: 10px;
|
||||
// margin-bottom: 30rpx;
|
||||
// border: 1px solid #999;
|
||||
box-sizing: border-box;
|
||||
// padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
.feng{
|
||||
margin:10rpx 20rpx 0 0;
|
||||
height: 240rpx;
|
||||
width: 164rpx;
|
||||
float:left;
|
||||
border-radius: 20rpx;
|
||||
border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
|
||||
.pianshuping{
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
}
|
||||
.shupingList{
|
||||
min-height: 212rpx;
|
||||
}
|
||||
/deep/.description{
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top:10rpx;
|
||||
img{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
font-size: 22rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left{
|
||||
width: 300rpx;
|
||||
color: #a1a1a1;
|
||||
}
|
||||
.right{
|
||||
width: 300rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.gzicon{
|
||||
margin:0 0 0 20rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
// float:left;
|
||||
// border-radius: 20rpx;
|
||||
// border:1rpx solid #e9e9e9;
|
||||
}
|
||||
.opbtns{
|
||||
.pingjia{margin-left: 10px;}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mytabs {
|
||||
// background: url('@/static/icon/bgtushu.png') no-repeat left top;
|
||||
height: 80rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
|
||||
.item {
|
||||
border-radius: 10rpx;
|
||||
background-color: #c6ead0;
|
||||
width: 48%;
|
||||
// margin: 0 10rpx;
|
||||
text-align: center;
|
||||
color: #3c7f56;
|
||||
font-size: 36rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.item.active {
|
||||
background-color: #3c7f56;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item1 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user