提交 857f5913 authored 作者: 周文彬's avatar 周文彬

Merge branch 'zwb' into dev

......@@ -4,11 +4,14 @@
<view class='mr-3' @click='start'>
<image :src='startPic' class='icon' v-show='!status'></image>
<image :src='endPic' class='icon' v-show='status'></image>
</view>
<view class="bottom">
<view class='flex-1'>
<slider @change='changeAudio' :activeColor='activeColor' :min='0' :max='duration.toFixed(0)' :value='currentTime.toFixed(0)' :step='0.1' block-size="14"></slider>
</view>
<view class='ml-3'>{{getTime(Math.round(currentTime))}}</view>
</view>
<!-- <view class='flex-1'>
<slider @change='changeAudio' :activeColor='activeColor' :min='0' :max='duration.toFixed(0)' :value='currentTime.toFixed(0)' :step='0.1'></slider>
</view> -->
<!-- <view class='ml-3'>{{getTime(Math.round(currentTime))}}</view> -->
</view>
</template>
......@@ -97,12 +100,35 @@
.mr-3{
width: 100%;
position: relative;
}
.audio{
position: relative;
}
.flex-1{
width: 86%;
}
.bottom{
position: absolute;
background: rgba(0,0,0,0.3);
width: 100%;
top: 160rpx;
left: 0;
display: flex;
justify-content: space-around;
}
.ml-3{
padding: 0 30upx;
color: #FFFFFF;
}
/deep/uni-slider{
margin: 6rpx 30rpx;
}
.icon {
width: 96rpx;
height: 97rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
transform: translateX(-50%);
top: -30rpx;
}
</style>
// const ApiUrl='http://dzzz.zgzx.com.cn'
// const uploadUrl = `http://dzzz.zgzx.com.cn/file/`
const ApiUrl='http://192.168.2.249:8708'
const uploadUrl = `http://192.168.2.249:8708/file/`
// const ApiUrl='http://192.168.2.249:8708'
// const uploadUrl = `http://192.168.2.249:8708/file/`
const ApiUrl='http://test16.zhongdianyun.com:8708'
const uploadUrl = `http://test16.zhongdianyun.com:8708/file/`
export {
ApiUrl,
uploadUrl
......
......@@ -72,7 +72,7 @@
},
"h5" : {
"title" : "中国政协杂志社",
"domain" : "http://192.168.2.249",
"domain" : "http://test16.zhongdianyun.com",
"router" : {
"base" : "./",
"mode" : "hash"
......
......@@ -32,7 +32,7 @@
</view>
<view class="book_content">
<block v-for="(item,index) in chapterList" :key="index">
<view class="chapter_list" @tap="switchDirectory(item.markid,item.orderNum)">
<view class="chapter_list" :class="item.level == 1?'level':''" @tap="switchDirectory(item.markid,item.orderNum)">
<text :class="item.orderNum==listNum?'current':''">{{item.chapterName}}</text>
</view>
</block>
......@@ -47,7 +47,7 @@
<!-- 改变字体大小 -->
<view class="slider_view">
<text class="smaller">A-</text>
<slider class="slide" @change="sliderChange" min="12" max="28" step="4" activeColor="#BBBBBB" backgroundColor="#BBBBBB" :value="bookFontSize"/>
<slider class="slide" @change="sliderChange" min="12" max="27" step="3" activeColor="#BBBBBB" backgroundColor="#BBBBBB" :value="bookFontSize"/>
<text class="biger">A+</text>
</view>
<!-- 改变背景颜色 -->
......@@ -96,7 +96,7 @@
endPoint:0,
bookId:'',
bookContent:'', //图书内容
bookFontSize:16, //初始字体大小,滑块默认值
bookFontSize:18, //初始字体大小,滑块默认值
checkBgColor: 1, //设置背景颜色,1代表白色,2代表黑色
chapterList:[],
animationData:{},
......@@ -133,6 +133,7 @@
onLoad(options) {
this.bookId = options.bookid
this.markid = options.markid
this.errorMsg.periodical = options.bookname
this.orderNum = options.orderNum
this.windowHeight = uni.getSystemInfoSync().windowHeight,
this.getBookCatalog() //获取目录列表
......@@ -270,8 +271,8 @@
}catch(e){
//TODO handle the exception
}
var texts='';//待拼接的内容
while(details.indexOf('<img')!=-1){//寻找img 循环
var texts='';//待拼接的内容
while(details.indexOf('<img')!=-1){//寻找img 循环
texts+=details.substring('0',details.indexOf('<img')+4);//截取到<img前面的内容
details = details.substring(details.indexOf('<img')+4);//<img 后面的内容
if(details.indexOf('style=')!=-1 && details.indexOf('style=')<details.indexOf('>')){
......@@ -280,7 +281,7 @@
}else{
texts+=' style="max-width:100% !important;height:auto !important;margin:0 auto;" ';
}
}
}
texts+=details;//最后拼接的内容
let progress = parseInt(100*(res.data.data.orderNum+1)/this.chapterList.length)
this.bookName = res.data.data.bookName
......@@ -294,21 +295,21 @@
this.catalogScrollTop = res.data.data.orderNum*44<134?0:res.data.data.orderNum*44-134
this.errorMsg.title = res.data.data.name //纠错接口 标题
// debugger
console.log(this.catalogScrollTop,'adadad')
setTimeout(() => {
this.loadingFlag = false
},300)
//如果内容为空
if(res.data.data.text != null && res.data.data.text.length < 10){
if(res.data.data.text != null && res.data.data.text.length < 10 || res.data.data.text == null){
if(num == 1 && !this.firstChapter){
this.prevChapter()
return false
}else if(num == 2 && !this.lastChapter){
this.nextChapter()
return false
}else if(num == 3){
}else if(!this.lastChapter){
this.nextChapter()
return false
}
}
this.bookContent = texts
......@@ -375,11 +376,7 @@
this.bookFontSize = res.detail.value
let dom = document.getElementById("richtext");
dom.setAttribute("style", `font-size:${this.bookFontSize}px !important`);
uni.setStorage({
key: "bookFontSize",
data: res.detail.value
})
uni.setStorageSync('bookFontSize', res.detail.value);
}
}
......@@ -394,6 +391,12 @@
body,html,uni-page-body{
min-height: 100%;
}
/deep/h1{
font-size: 1.2em;
}
.book_content{
line-height: 1.8;
}
.showcatalog{
overflow-y: hidden;
height: 600upx !important;
......@@ -669,13 +672,18 @@
height: 80rpx;
line-height: 80rpx;
position: relative;
width: 98%;
width: 100%;
padding: 0 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chapter_list{
padding-left: 20rpx;
padding-left: 20rpx;
box-sizing: border-box;
}
.level{
padding-left: 30px;
}
.book_content .lock{
color: #999999;
......
......@@ -24,28 +24,20 @@
<!-- <view class="catalog" v-html="bookData.bookCatalog" v-if="tab=='目录'"></view> -->
<view class="catalog" v-if="tab=='目录'">
<block v-for="(item,index) in chapterList" :key="index">
<view class="chapter" @tap="goBookReading(item.markid,item.orderNum)">{{item.chapterName}}</view>
<view class="chapter" @tap="goBookReading(item.markid,item.orderNum)" :class="item.level == 1?'level':''">{{item.chapterName}}</view>
</block>
</view>
<view class="article" v-else-if="tab=='文章'">
<view class="aa" v-if="chapterList.length>0">
<block v-for="(item,index) in chapterList" :key="index">
<view class="chapter" @tap="goBookReading(item.markid,item.orderNum)">{{item.chapterName}}</view>
</block>
</view>
<block v-else>
<view class="olist" @click="toArticle(item.resourceId)" v-for="(item,index) in bookData.listArticle" :key="index">
<view class="img" v-if="item.cover">
<image :src=fileUrl(item.cover) mode=""></image>
</view>
<view class="word">
<view class="names">{{item.name}}</view>
<view class="desc">{{item.synopsis}}</view>
<view class="author">作者: {{item.author}}</view>
</view>
<view class="olist" @click="toArticle(item.resourceId)" v-for="(item,index) in bookData.listArticle" :key="index">
<view class="img" v-if="item.cover">
<image :src=fileUrl(item.cover) mode=""></image>
</view>
</block>
<view class="word">
<view class="names">{{item.name}}</view>
<view class="desc">{{item.synopsis}}</view>
<view class="author">作者: {{item.author}}</view>
</view>
</view>
</view>
<view class="details" v-else>
<view class="basic">
......@@ -121,7 +113,7 @@
},
goBookReading(markid,orderNum){
uni.navigateTo({
url: '../bookReading/index?bookid=' + this.id + '&markid=' + markid + '&orderNum=' + orderNum
url: '../bookReading/index?bookid=' + this.id + '&markid=' + markid + '&orderNum=' + orderNum + '&bookname=' + this.bookData.name
});
},
goBack() {
......@@ -211,8 +203,12 @@
.details_page {
.chapter{
border-bottom: 1px solid #EBEBEB;
padding: 10rpx 0;
padding: 12rpx 0;
font-size: 16px;
// box-sizing: border-box;
}
.level{
padding-left: 16px;
}
.banner {
height: 399upx;
......
<template>
<view class="content">
<view class="header">
<!-- <view class="header">
<image class="logo" src="../../static/logo.png" mode=""></image>
<image class="search" @click="toSearch()" src="../../static/search.png" mode=""></image>
</view>
</view> -->
<view class="uni-tab-bar11">
<scroll-view id="tab-bar" class="uni-swiper-tab" scroll-x :scroll-left="scrollLeft">
<view v-for="(tab,index) in subjectList" :key="index" :class="['swiper-tab-list',siteCode==index ? 'active' : '']"
......@@ -11,7 +11,8 @@
<view class="wordCont">{{tab.name}}</view>
<view :class="[siteCode==index ? 'borderBtm' : '']"></view>
</view>
</scroll-view>
</scroll-view>
<image class="search" @click="toSearch()" src="../../static/searchIdx.png" mode=""></image>
</view>
<view class="newArrival">
<view class="titBox">
......@@ -181,20 +182,26 @@
height: 52upx;
width: 160upx;
}
.search{
height: 38upx;
width: 38upx;
}
}
.search{
height: 38upx;
width: 38upx;
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
.uni-tab-bar11 {
height: 100upx;
height: 100upx;
position: relative;
overflow: hidden;
background: white;
border-bottom: 1px solid #eeeeee;
.uni-swiper-tab {
line-height: 100upx;
height: 100upx;
width: 88%;
.swiper-tab-list {
width: auto !important;
padding: 0 40upx;
......
......@@ -100,7 +100,8 @@
height: 310upx;
image {
width: 100%;
height: 100%;
height: 100%;
border-radius: 0;
}
}
......
......@@ -258,7 +258,7 @@
.newMagazineBox {
width: 100%;
background: #FFFFFF;
padding: 58upx 0 50upx 0;
padding: 58upx 0 0 0;
border-radius: 0px 0px 14px 14px;
}
......@@ -294,7 +294,8 @@
justify-content: space-between;
flex-wrap: wrap;
dl {
width: 190upx;
width: 190upx;
margin-bottom: 50upx;
dt {
width: 100%;
height: 266upx;
......
......@@ -140,6 +140,7 @@ export default {
})
},
searchFor(){
this.booklist = []
this.listQuery.pageNum = 1
this.getList()
},
......
......@@ -106,7 +106,8 @@
height: 310upx;
image {
width: 100%;
height: 100%;
height: 100%;
border-radius: 0;
}
}
}
......
......@@ -36,7 +36,7 @@
<view class="bottomLine" v-if="isLast && !isNull">—— 这是我的底线 ——</view>
<view class="nodata_view" v-if="isNull">
<image class="nodata_img" mode="aspectFit" src="../../static/nodata.png"></image>
<text class="nodata_text">抱歉,没有找到相关内容</text>
<text class="nodata_text">抱歉,暂无关联内容</text>
</view>
</view>
</template>
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>中国政协杂志社</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.cfb20cce.js></script><script src=./static/js/index.3e8b204d.js></script></body></html>
\ No newline at end of file
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.cfb20cce.js></script><script src=./static/js/index.8bc569ae.js></script></body></html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论