|
@@ -93,18 +93,19 @@ function ReaderBaseFrame(container) { //UI渲染层
|
|
|
let fontSizeAdd6 = (size + 6) / 16;
|
|
let fontSizeAdd6 = (size + 6) / 16;
|
|
|
let fontSizeAdd2 = (size + 2) / 16;
|
|
let fontSizeAdd2 = (size + 2) / 16;
|
|
|
let html = "";
|
|
let html = "";
|
|
|
- if (!!jsonObj.introduction && jsonObj.introduction.length > 0) {
|
|
|
|
|
- html += "<br/><br/><br/>";
|
|
|
|
|
- for (let i = 0; i < jsonObj.introduction.length; i++) {
|
|
|
|
|
- html +=
|
|
|
|
|
- `<p class="colorStyle" style="font-size:${fontSize}rem;color:${fontColor}">${jsonObj.introduction[i]}</p>`;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
// 封面-0,扉页-1 不需要展示章节名称
|
|
// 封面-0,扉页-1 不需要展示章节名称
|
|
|
if (!['0', '1'].includes(Chapter_id + '')) {
|
|
if (!['0', '1'].includes(Chapter_id + '')) {
|
|
|
- html += `<br/><br/><br/>`;
|
|
|
|
|
|
|
+ html += `<br/><br/>`;
|
|
|
if (jsonObj.pt && jsonObj.pt !== jsonObj.t) {
|
|
if (jsonObj.pt && jsonObj.pt !== jsonObj.t) {
|
|
|
- html += `<h3 style=font-size:${fontSizeAdd6};color:${fontColor}">${jsonObj.pt}</h3><br/>`;
|
|
|
|
|
|
|
+ html += `<h3 style=font-size:${fontSizeAdd6};color:${fontColor}">${jsonObj.pt}</h3>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!!jsonObj.introduction && jsonObj.introduction.length > 0) {
|
|
|
|
|
+ for (let i = 0; i < jsonObj.introduction.length; i++) {
|
|
|
|
|
+ html +=
|
|
|
|
|
+ `<p class="colorStyle" style="font-size:${fontSize}rem;color:${fontColor};text-align:${jsonObj.p[i].substr(0, 6) === 'pStart' ? 'start' : 'justify'}">${jsonObj.introduction[i].replace("pStart", '')}</p>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ html += `<br/>`;
|
|
|
}
|
|
}
|
|
|
html += `<h4 style=font-size:${fontSizeAdd6};color:${fontColor}">${jsonObj.t}</h4>`;
|
|
html += `<h4 style=font-size:${fontSizeAdd6};color:${fontColor}">${jsonObj.t}</h4>`;
|
|
|
}
|
|
}
|