You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
18 KiB

1 year ago
  1. import{B as e,x as t,v as o,p as a,m as l,D as r,T as s,c as n,y as i,z as c,t as d,s as u,u as m,F as p,q as g,w as h,M as C,r as k,o as f}from"./vendor.269b2875.js";import{a as I}from"./tool.8db46c9c.js";import{_ as y}from"./taskCountDown.b49821a8.js";import{_ as v,a as x,b,c as T}from"./fenxiang@2x.2a338a1e.js";import{_ as B}from"./paixu@2x.fd1743af.js";const S={components:{taskCountDown:y},setup(){const{proxy:a}=e(),l=t({docId:"9f150331-5457-4b4f-990a-e75c75bd15a9",ResourceId:"8ab45244-df22-4c83-b750-f4bc910f9f44",Key:"",ListId:"",listNum:"",currentIndex:1,bookContent:"https://ebook.aiyxlib.com/Book_Pdf/f2c0781c2b964e11996e0e4bbb27dc8d/Page-240.jpg",screenWidth:"",navigation:"",biaoqianlist:"",topShow:!1,BookMarkList:[],recordReadTimeStatus:!0,startReadTime:0,readTime:0,chapterProgressVal:0,sliderBackground:"#f7f7f7",sliderBarBackground:"#e9eaee",changeColorList:{0:{bgColor:"#ffffff",sliderBarColor:"#e9eaee",sliderColor:"#f7f7f7",sliderButton:"#fff",arrowColor:"#aeaeae",readTimeTextColor:"#333333",settingFontSizeButtonColor:"#606060",settingFontSizeButtonBg:"#f3f3f3",menuSelectTextColor:"#666666",menuSelectIconColor:"#3796ff",directoryListTextColor:"#333333"},1:{bgColor:"#e3f1e0",sliderBarColor:"#c7d8c6",sliderColor:"#d4e7d4",sliderButton:"#fff",arrowColor:"#414141",readTimeTextColor:"#333333",settingFontSizeButtonColor:"#2f8556",settingFontSizeButtonBg:"#d4e7d4",menuSelectTextColor:"#2f8659",menuSelectIconColor:"#2f8659",directoryListTextColor:"#333333"},2:{bgColor:"#fef6f4",sliderBarColor:"#ede0d7",sliderColor:"#f7ebdf",sliderButton:"#fff",arrowColor:"#434142",readTimeTextColor:"#333333",settingFontSizeButtonColor:"#b2860d",settingFontSizeButtonBg:"#f7ebdf",menuSelectTextColor:"#b3870c",menuSelectIconColor:"#b3870c",directoryListTextColor:"#333333"},3:{bgColor:"#262626",sliderBarColor:"#2b2b2b",sliderColor:"#1d1d1d",sliderButton:"#555555",arrowColor:"#7c7c7e",readTimeTextColor:"#7c7c7e",settingFontSizeButtonColor:"#7c7c7e",settingFontSizeButtonBg:"#2c2c2c",menuSelectTextColor:"#7c7c7e",menuSelectIconColor:"#7c7c7e",directoryListTextColor:"#b2b2b2"}},ifshuqian:!0,isCollect:!1,ifmulu:!0,bookmarkid:"",ebookSetInfo:{},detailData:{},bookIndex:1,colorIndex:0,progressPopup:!0,themePopup:!1,popup:!1,configTaskTime:300,configTaskType:"daily_ebook",timer:null,isTryOutLogin:!0});o((()=>{l.isTryOutLogin=!localStorage.getItem("isTryout");let e=a.$route.query;l.docId=e.ebookId,l.ResourceId=e.ResourceId,e.currentIndex&&(l.currentIndex=e.currentIndex),a.GetBaseAndDetailsId(),a.GetBookMarkPages(),clearInterval(l.timer),a.$nextTick((()=>{l.timer=setInterval((()=>{let e=(new Date).getTime(),t=Math.round((e-l.startReadTime)/1e3);l.readTime=Math.floor(t/60)}),1e3)})),a.sliderCssStyle()}));return{data:l,sliderCssStyle:()=>{l.sliderBackground=l.changeColorList[l.colorIndex].sliderColor,l.sliderBarBackground=l.changeColorList[l.colorIndex].sliderBarColor,document.querySelector(".van-slider__button").style.background=l.changeColorList[l.colorIndex].sliderButton},countChapterProgressVal:()=>{let e=l,t=e.listNum;e.chapterProgressVal=Math.round(e.currentIndex/t*100)},chapterProgressChange:e=>{let t=l,o=t.listNum;t.currentIndex=Math.round(o*(e/100)),t.recordReadTimeStatus=!1,t.currentIndex>1||(s("当前为第一页"),t.currentIndex=1),a.booktype()},chapterProgressChangePrev:()=>{a.prevPage()},chapterProgressChangeNext:()=>{a.nextPage()},toBack:()=>{a.$router.go(-1),clearInterval(l.timer)},themeChange:e=>{l.colorIndex=e,a.sliderCssStyle()},toSetCollects:()=>{if(!JSON.parse(localStorage.getItem("userData")))return r.confirm({title:"该功能需要登录账号!",confirmButtonText:"去登录"}).then((()=>{a.$router.push("/Login")})).catch((()=>{})),!1;l.isCollect?a.SetCollects():r.confirm({title:"确定移除书架吗?"}).then((()=>{a.SetCollects()})).catch((()=>{}))},SetCollects:()=>{let e=l,t={ClassId:e.detailData.classId,CollectPath:"ebook",Title:e.detailData.title,TitlePy:e.detailData.titlePy,Subtitle:e.detailData.subtitle,IsMemo:"1",Creator:e.detailData.creator,BelongId:e.detailData.id,Description:e.detailData.description,Cover:e.detailDat