111
5
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
10
.idea/UniappTool.xml
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
|
||||
<option name="generalBasePath" value="$PROJECT_DIR$" />
|
||||
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
|
||||
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
|
||||
<option name="scanNum" value="1" />
|
||||
<option name="type" value="store" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/电子报H5_API.iml" filepath="$PROJECT_DIR$/.idea/电子报H5_API.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
12
.idea/电子报H5_API.iml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
81
index.html
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<title></title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="Keywords" content="固始日报·手机版">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0,maximum-scale=1.0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
/* 美化整个滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px; /* 设置滚动条的宽度 */
|
||||
background-color: #f9f9f9; /* 滚动条的背景颜色 */
|
||||
}
|
||||
|
||||
/* 美化滚动条轨道 */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #e1e1e1; /* 轨道的背景颜色 */
|
||||
border-radius: 10px; /* 轨道的圆角 */
|
||||
}
|
||||
|
||||
/* 美化滚动条的滑块 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #c1c1c1; /* 滑块的背景颜色 */
|
||||
border-radius: 10px; /* 滑块的圆角 */
|
||||
border: 2px solid #ffffff; /* 滑块边框 */
|
||||
}
|
||||
|
||||
/* 当滑块悬停或活动时的样式 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #a8a8a8; /* 悬停或活动状态下滑块的背景颜色 */
|
||||
}
|
||||
.gjz_css{
|
||||
font-weight: 600;
|
||||
color: #ff0000;
|
||||
text-decoration: underline;
|
||||
position: relative;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.gjz_css::after {
|
||||
content: '✚'; /* Font Awesome 的用户图标 Unicode */
|
||||
font-family: 'FontAwesome'; /* 确保使用正确的字体 */
|
||||
font-size: 12px; /* 图标大小 */
|
||||
color: #ff0000; /* 图标颜色 */
|
||||
position: absolute;
|
||||
top: -4px; /* 根据需要调整图标位置 */
|
||||
right: 3px; /* 根据需要调整图标位置 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin: 0;">
|
||||
|
||||
<div id="app"></div>
|
||||
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
<script>
|
||||
initPhonePage();
|
||||
function initPhonePage() {
|
||||
var userAgentInfo = navigator.userAgent;
|
||||
console.log(userAgentInfo);
|
||||
var Agents = new Array("Windows", "Win");
|
||||
var local_url = window.location.href;
|
||||
for (var v = 0; v < Agents.length; v++) {
|
||||
if (userAgentInfo.indexOf(Agents[v]) > 0) {
|
||||
var sURL2 = local_url.replace("/h5/", "/dist/");
|
||||
console.log(sURL2);
|
||||
window.location.href = sURL2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
2389
package-lock.json
generated
Normal file
26
package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "vue3_cli_default",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.6.7",
|
||||
"jquery": "^3.7.1",
|
||||
"path": "^0.12.7",
|
||||
"vue": "^3.2.8",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue-wechat-title": "^2.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^1.6.0",
|
||||
"@vue/compiler-sfc": "^3.2.6",
|
||||
"naive-ui": "^2.37.3",
|
||||
"sass": "^1.77.6",
|
||||
"vfonts": "^0.0.3",
|
||||
"vite": "^2.5.2",
|
||||
"vite-plugin-copy": "^0.1.6"
|
||||
}
|
||||
}
|
BIN
public/favicon.ico
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
public/static/2024-11-07/632-01.jpg
Normal file
After Width: | Height: | Size: 721 KiB |
BIN
public/static/2024-11-07/632-01.pdf
Normal file
BIN
public/static/2024-11-07/632-02.jpg
Normal file
After Width: | Height: | Size: 716 KiB |
BIN
public/static/2024-11-07/632-02.pdf
Normal file
BIN
public/static/2024-11-07/632-03.jpg
Normal file
After Width: | Height: | Size: 725 KiB |
BIN
public/static/2024-11-07/632-03.pdf
Normal file
BIN
public/static/2024-11-07/632-04.jpg
Normal file
After Width: | Height: | Size: 686 KiB |
BIN
public/static/2024-11-07/632-04.pdf
Normal file
BIN
public/static/banmian.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/static/bg.png
Normal file
After Width: | Height: | Size: 168 KiB |
BIN
public/static/boxbg.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
public/static/closeIcon1.png
Normal file
After Width: | Height: | Size: 660 B |
BIN
public/static/closeIcon2.png
Normal file
After Width: | Height: | Size: 461 B |
BIN
public/static/codebg.png
Normal file
After Width: | Height: | Size: 17 KiB |
9
public/static/css/bootstrap-datetimepicker.min.css
vendored
Normal file
9
public/static/css/bootstrap.min.css
vendored
Normal file
0
public/static/css/global.css
Normal file
867
public/static/css/index.css
Normal file
@ -0,0 +1,867 @@
|
||||
@import url("./posterShare.css");
|
||||
html,body{
|
||||
height: 100%;
|
||||
width:100%;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
body{
|
||||
opacity:0;
|
||||
}
|
||||
.swiper-wrapper{
|
||||
align-items: center;
|
||||
}
|
||||
.posterMask.gzrbBMshow{
|
||||
display: none;
|
||||
}
|
||||
div,p,h1,h2,span{
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
.contWrapper{
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
/* background-color: rgba(125,125,125,0.88); */
|
||||
background:url('/public/static/festival.png') no-repeat center / 100% 100%;
|
||||
padding:12px 18px 5px 18px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
/* display: grid; */
|
||||
padding-top:8%;
|
||||
}
|
||||
|
||||
.newpaper{
|
||||
width: 100%;
|
||||
/* height: calc(100% - 94px); 修改 */
|
||||
/*transform:translate3d(0,0,0);
|
||||
overflow:hidden;*/
|
||||
/* 修改 */
|
||||
/* margin-top:30px; */
|
||||
align-self: start;
|
||||
justify-self: center;
|
||||
}
|
||||
.newpaper .swiper-slide img{
|
||||
/* width:auto;
|
||||
max-width:100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
transform:translate3d(0,0,0);
|
||||
-webkit-transform: scale(1) rotate(0) translate3d(0,0,0);
|
||||
transform: scale(1) rotate(0) translate3d(0,0,0);*/
|
||||
opacity: 1;
|
||||
}
|
||||
/* .swiper-container {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
margin: 20px auto;
|
||||
margin-top:30px;
|
||||
} */
|
||||
.swiper-slide {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
background:transparent;
|
||||
/* height: auto !important; */
|
||||
/* Center slide text vertically */
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
/* transform:translate3d(0,0,0); */
|
||||
overflow:hidden;
|
||||
}
|
||||
.imgBoxCont{
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
position:relative;
|
||||
}
|
||||
/* .swiper-slide .swiper-zoom-container{display:block;} */
|
||||
.imgBoxCont .pichmask{
|
||||
width:auto;
|
||||
max-width:100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
z-index: 999;
|
||||
opacity: 1;
|
||||
/* position: absolute; */
|
||||
}
|
||||
.swiper-slide div.pinch-zoom{
|
||||
/* width: 100%; */
|
||||
/* height: 100% !important; */
|
||||
-webkit-user-drag: none;
|
||||
-moz-user-drag: none;
|
||||
-ms-user-drag: none;
|
||||
user-drag: none;
|
||||
}
|
||||
.swiper-slide div.pinch-zoom-container {
|
||||
width: 100%;
|
||||
height: 100% !important;
|
||||
position: relative;
|
||||
}
|
||||
.swiper-slide div.pinch-zoom .paperMap{
|
||||
opacity: 0;
|
||||
}
|
||||
.newsText1{
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
color:#eee;
|
||||
text-align: center;
|
||||
margin-top:17px;
|
||||
}
|
||||
.newsText1>img{
|
||||
width: 11px;
|
||||
/* height: 18px; */
|
||||
margin-left: 10px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.headBox {
|
||||
/* position: absolute;
|
||||
top: 38px; */ /* 修改 */
|
||||
width: 100%; /* 修改 calc(100% - 36px)*/
|
||||
/*height: 26px;*/
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
border-radius: 3px;
|
||||
background-color: #F0F0F0;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* 修改 */
|
||||
align-self: end;
|
||||
justify-self: center;
|
||||
margin-bottom: 4%;
|
||||
}
|
||||
.headBox .headTitle{
|
||||
background-color: #d00;
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
/*height: 20px;*/
|
||||
line-height: 16px;
|
||||
margin: 3px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 3px;
|
||||
text-align: justify;
|
||||
}
|
||||
.footerWrap{
|
||||
position: absolute;
|
||||
/* top: 10px; */
|
||||
left:18px; /* 修改 */
|
||||
bottom: 36px;
|
||||
width: calc(100% - 120px);
|
||||
height:36px;
|
||||
font-size: 0;
|
||||
line-height:36px;
|
||||
border-radius: 5px;
|
||||
background-color: #d00;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0px 10px 6px -8px rgba(243,92,85,0.3);
|
||||
}
|
||||
.footerWrap .item{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
line-height: 18px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-right: 1px solid #e1e1e1;
|
||||
}
|
||||
.footerWrap .item:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
.footerWrap .item>.text{
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.footerWrap .item>img{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.footerWrap .item>.text.active{
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
color:red;
|
||||
font-size: 18px;
|
||||
}
|
||||
.footerWrap .item>img.active{
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
}
|
||||
.footerWrap .item .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-top-color: transparent;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 20px;
|
||||
margin-left: -6px;
|
||||
display: none;
|
||||
}
|
||||
.footerWrap .item .articletipsDown{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #c8c4c4;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 24px;
|
||||
margin-left: -6px;
|
||||
display: block;
|
||||
}
|
||||
.footerWrap .item>.text.active+.articletips{
|
||||
display: block;
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
}
|
||||
.footerWrap .item>.text.active+.articletips+.articletipsDown{
|
||||
display: none;
|
||||
}
|
||||
.footerWrap.footerItem5 .item{
|
||||
width:20%;
|
||||
}
|
||||
.footerWrap .exareBox{
|
||||
position: absolute;
|
||||
width:100px;
|
||||
height:auto;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
bottom: 38px;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
display: none;
|
||||
}
|
||||
.footerWrap .exareBox.active{
|
||||
display: block;
|
||||
}
|
||||
.footerWrap .exareBox a{
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding:10px 10px;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
}
|
||||
.zonglan{
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
bottom: 78px;
|
||||
z-index: 99;
|
||||
}
|
||||
.zonglan img{
|
||||
width:68px;
|
||||
}
|
||||
.synthesis{
|
||||
position: absolute;
|
||||
bottom: 36px;
|
||||
right: 18px;
|
||||
width: 72px;
|
||||
height:36px;
|
||||
line-height:36px;
|
||||
border-radius: 5px;
|
||||
background-color: #d00;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
box-shadow: 0px 10px 6px -8px rgba(243,92,85,0.3);
|
||||
}
|
||||
.synthesis .item{
|
||||
display: flex;
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
line-height: 18px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.synthesis .item>.text{
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.synthesis .item>img{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* 版面列表1 */
|
||||
.layoutStyleOne{
|
||||
width: 50%;
|
||||
position: fixed;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: -50%;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
padding:0 18px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
transition: left 500ms;
|
||||
-webkit-transition: left 500ms; /* Safari */
|
||||
}
|
||||
.layoutStyleOne.active{
|
||||
left: 0;
|
||||
}
|
||||
.layoutStyleOne a{
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding:20px 0;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
}
|
||||
.layoutStyleOne a.active{
|
||||
color: #da3e4a;
|
||||
}
|
||||
/* 版面列表二 */
|
||||
.layoutStyleTwo{
|
||||
height:70%;
|
||||
position: absolute;
|
||||
bottom: 70px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px 10px 0 0;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.layoutStyleTwo h2{
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin: 15px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox{
|
||||
width: 100%;
|
||||
/*height: calc(100% - 22px);*/
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
padding:0 15px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox .action{
|
||||
border: 2px solid #FB565D;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox .listWrap{
|
||||
box-sizing: border-box;
|
||||
width: 27.33%;
|
||||
margin: 10px;
|
||||
}
|
||||
.layoutStyleTwo .listWrap img{
|
||||
width: 100%;
|
||||
}
|
||||
.layoutStyleTwo.active{
|
||||
display: block;
|
||||
}
|
||||
.layoutStyleTwo a{
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding-top:5px;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
text-align: center;
|
||||
}
|
||||
/* .layoutStyleTwo .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
bottom: -12px;
|
||||
left: 10%;
|
||||
} */
|
||||
/* 文章列表 */
|
||||
.articleList {
|
||||
position: absolute;
|
||||
bottom: 60px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-height: 70%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px 10px 0 0;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.articleList .listWrap {
|
||||
}
|
||||
|
||||
.articleList .listWrap .listTitle {
|
||||
width: 100%;
|
||||
max-height: 350px;
|
||||
/*display: flex;*/
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
padding: 0 15px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.articleList.active{
|
||||
display: block;
|
||||
}
|
||||
.articleList .listWrap .title{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding:0 20px;
|
||||
}
|
||||
.articleList .listWrap .title .tips{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
display: none;
|
||||
border-top:1px solid #d5d5d5;
|
||||
top:50%;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.articleList .item{
|
||||
padding:15px 20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.articleList .item.itemActive {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.articleList .item h1{
|
||||
font-size: 18px;
|
||||
color:#000;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
z-index: 10;
|
||||
padding: 0 10px;
|
||||
margin: 0 auto 10px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.articleList .item a{
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color:#333;
|
||||
line-height: 24px;
|
||||
padding:12px 0;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
border-top: 1px solid #EEE;
|
||||
}
|
||||
|
||||
.articleList .item a.active{
|
||||
color: #da3e4a;
|
||||
}
|
||||
/* .articleList .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
bottom: -12px;
|
||||
left: 61%;
|
||||
} */
|
||||
/* .articleList .item a{
|
||||
|
||||
} */
|
||||
.cancelBox{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99999;
|
||||
height: 70px;
|
||||
background-color: #FFF;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
display: none;
|
||||
}
|
||||
.cancelBox .cancelBtn{
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
background-color: #EEE;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}
|
||||
/* 日历 */
|
||||
.form_date {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
/* left: 12%; */
|
||||
width: 0;
|
||||
height: 70px;
|
||||
z-index: -20;
|
||||
border: 0px solid #FFF;
|
||||
background-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
.dropdown-menu{
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.datetimepicker{
|
||||
/* width:520px; */
|
||||
width:100%;
|
||||
left: 0 !important;
|
||||
/* bottom: 47px; */
|
||||
/* top: 40px !important; */
|
||||
}
|
||||
.datetimepicker-days .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-days .table-condensed tbody tr td.day.active{
|
||||
background-color: #da3e4a!important;
|
||||
border-radius: 24px;
|
||||
background-image: none;
|
||||
}
|
||||
.datetimepicker-days .table-condensed thead tr th.dow.active{
|
||||
color: #999999;
|
||||
}
|
||||
.datetimepicker-dropdown-top-left:after{
|
||||
left: 33%;
|
||||
right:initial !important;
|
||||
}
|
||||
.datetimepicker-months .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-months .table-condensed tbody tr .month.active{
|
||||
background-color: #da3e4a;
|
||||
border-radius: 10px;
|
||||
background-image: none;
|
||||
}
|
||||
.datetimepicker-years .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-years .table-condensed tbody tr .year.active{
|
||||
background-color: #da3e4a;
|
||||
border-radius: 10px;
|
||||
background-image: none;
|
||||
}
|
||||
/* 遮罩 */
|
||||
.mask{
|
||||
position: fixed;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 9;
|
||||
display: none;
|
||||
}
|
||||
.mask.active{
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 下载页面 */
|
||||
.synthPage{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999;
|
||||
padding: 13px 13px 5px 13px;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.synthPage.active{
|
||||
display: block;
|
||||
background: url('/public/static/bg.png') repeat center / auto auto;
|
||||
}
|
||||
.synthPage .closeBtn{
|
||||
text-align: right;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.synthPage .closeBtn i{
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background: url('/public/static/guanbi.png') no-repeat center / 15px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#synthImg {
|
||||
display: none;
|
||||
border:1px solid #d00;
|
||||
}
|
||||
#synthImg img{
|
||||
width:auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.saveTipsBtn{
|
||||
width: 80%;
|
||||
height: 30px;
|
||||
margin: 10px auto;
|
||||
background-color: #d00;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#synthWrap{
|
||||
width:100%;
|
||||
padding:10px;
|
||||
height: auto;
|
||||
max-height: calc(100% - 40px);
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
#synthWrap .synthHead{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #8F8F8F;
|
||||
height: 20px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
#synthWrap .synthHead img{
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
}
|
||||
#synthWrap img.synthPaper{
|
||||
width:100%;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height:calc(100% - 100px);
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
box-shadow: 0px 4px 21px 3px
|
||||
rgba(195, 187, 187, 0.4);
|
||||
border-radius: 4px;
|
||||
border:1px solid rgba(195, 187, 187, 0.3);
|
||||
}
|
||||
#synthWrap .imgBottom{
|
||||
width:85%;
|
||||
height: 10px;
|
||||
background-color: rgba(244,244,244,1);
|
||||
box-shadow: 0px 4px 21px 3px
|
||||
rgba(195, 187, 187, 0.4);
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
margin:0 auto;
|
||||
border:1px solid rgba(195, 187, 187, 0.2);
|
||||
border-top-color: transparent;
|
||||
|
||||
}
|
||||
#synthWrap .footer{
|
||||
width:100%;
|
||||
height: 60px;
|
||||
padding:10px 0;
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
color: #8F8F8F;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#synthWrap .footer .left{
|
||||
width:50%;
|
||||
text-align: center;
|
||||
}
|
||||
#synthWrap .footer .left img{
|
||||
width:auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height:50px;
|
||||
}
|
||||
#synthWrap .footer .center{
|
||||
font-size: 12px;
|
||||
line-height: 50px;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
width:calc(50% - 25px);
|
||||
}
|
||||
#synthWrap .footer .right{
|
||||
width:50%;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
#synthWrap .footer .right .text{
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
#synthWrap .footer .right .qr{
|
||||
width:55px;
|
||||
height: 55px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#synthWrap .footer .right img{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#synthWrap .footer .right#qrcode table{
|
||||
transform: scale(0.6, 0.6);
|
||||
-webkit-transform: scale(0.6, 0.6);
|
||||
-moz-transform: scale(0.6, 0.6);
|
||||
-o-transform: scale(0.6, 0.6);
|
||||
margin-top: -15px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
.tipsBtn{
|
||||
display: block;
|
||||
width:100px;
|
||||
height:40px;
|
||||
background: url('/public/static/saveBtn1.png') no-repeat center / 100px 40px;
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
transform: translate(-50%,-115%);
|
||||
}
|
||||
.synthmask{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top:0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.synthmask img{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
transform: translate(-50%,-115%);
|
||||
}
|
||||
|
||||
|
||||
/* 日历牌样式二 */
|
||||
#Datefour {
|
||||
position: fixed;
|
||||
bottom: -100%;
|
||||
left: 18px;
|
||||
width: calc(100% - 36px);
|
||||
/*height: 100%;*/
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
z-index:100;
|
||||
border-radius: 8px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
#Datefour>div{position: relative;}
|
||||
#Datefour>div a{
|
||||
position: absolute;
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
width: 16.6%;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
#Datefour>div a:last-child{right: 0;top:0;}
|
||||
#Datefour>div a span{margin-top: 11px;}
|
||||
#Datefour>div p{
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
margin-bottom: 0;
|
||||
font-size:16px;
|
||||
padding-bottom:15px;
|
||||
}
|
||||
#Datefour ul{
|
||||
width: 100%;
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
list-style: none;
|
||||
/* margin-bottom: 45px; */
|
||||
padding:5px;
|
||||
|
||||
}
|
||||
#Datefour li {
|
||||
width: 23%;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
line-height: 45px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
margin:1%;
|
||||
border:1px solid #dcdcdc;
|
||||
}
|
||||
#Datefour .clearfix a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
line-height: 30px;
|
||||
background-color: #FFF;
|
||||
/* border-bottom: 1px solid #CCC; */
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow:hidden;
|
||||
}
|
||||
#Datefour a.on{
|
||||
color: #FFF;
|
||||
background-color: #D9383D;
|
||||
}
|
||||
|
||||
.year{display:block; height:40px;}
|
||||
.curDate{padding-right:20px;}
|
867
public/static/css/index_list.css
Normal file
@ -0,0 +1,867 @@
|
||||
@import url("./posterShare.css");
|
||||
html,body{
|
||||
height: 100%;
|
||||
width:100%;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
body{
|
||||
opacity:0;
|
||||
}
|
||||
.swiper-wrapper{
|
||||
align-items: center;
|
||||
}
|
||||
.posterMask.gzrbBMshow{
|
||||
display: none;
|
||||
}
|
||||
div,p,h1,h2,span{
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
.contWrapper{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
/* background-color: rgba(125,125,125,0.88); */
|
||||
background:url('../image20/festival.png') no-repeat center / 100% 100%;
|
||||
padding:12px 18px 5px 18px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
/* display: grid; */
|
||||
padding-top:8%;
|
||||
}
|
||||
|
||||
.newpaper{
|
||||
width: 100%;
|
||||
/* height: calc(100% - 94px); 修改 */
|
||||
/*transform:translate3d(0,0,0);
|
||||
overflow:hidden;*/
|
||||
/* 修改 */
|
||||
/* margin-top:30px; */
|
||||
align-self: start;
|
||||
justify-self: center;
|
||||
}
|
||||
.newpaper .swiper-slide img{
|
||||
/* width:auto;
|
||||
max-width:100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
transform:translate3d(0,0,0);
|
||||
-webkit-transform: scale(1) rotate(0) translate3d(0,0,0);
|
||||
transform: scale(1) rotate(0) translate3d(0,0,0);*/
|
||||
opacity: 1;
|
||||
}
|
||||
/* .swiper-container {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
margin: 20px auto;
|
||||
margin-top:30px;
|
||||
} */
|
||||
.swiper-slide {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
background:transparent;
|
||||
/* height: auto !important; */
|
||||
/* Center slide text vertically */
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
/* transform:translate3d(0,0,0); */
|
||||
overflow:hidden;
|
||||
}
|
||||
.imgBoxCont{
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
position:relative;
|
||||
}
|
||||
/* .swiper-slide .swiper-zoom-container{display:block;} */
|
||||
.imgBoxCont .pichmask{
|
||||
width:auto;
|
||||
max-width:100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
z-index: 999;
|
||||
opacity: 1;
|
||||
/* position: absolute; */
|
||||
}
|
||||
.swiper-slide div.pinch-zoom{
|
||||
/* width: 100%; */
|
||||
/* height: 100% !important; */
|
||||
-webkit-user-drag: none;
|
||||
-moz-user-drag: none;
|
||||
-ms-user-drag: none;
|
||||
user-drag: none;
|
||||
}
|
||||
.swiper-slide div.pinch-zoom-container {
|
||||
width: 100%;
|
||||
height: 100% !important;
|
||||
position: relative;
|
||||
}
|
||||
.swiper-slide div.pinch-zoom .paperMap{
|
||||
opacity: 0;
|
||||
}
|
||||
.newsText1{
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
color:#eee;
|
||||
text-align: center;
|
||||
margin-top:17px;
|
||||
}
|
||||
.newsText1>img{
|
||||
width: 11px;
|
||||
/* height: 18px; */
|
||||
margin-left: 10px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.headBox {
|
||||
/* position: absolute;
|
||||
top: 38px; */ /* 修改 */
|
||||
width: 100%; /* 修改 calc(100% - 36px)*/
|
||||
/*height: 26px;*/
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
border-radius: 3px;
|
||||
background-color: #F0F0F0;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* 修改 */
|
||||
align-self: end;
|
||||
justify-self: center;
|
||||
margin-bottom: 4%;
|
||||
}
|
||||
.headBox .headTitle{
|
||||
background-color: #d00;
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
/*height: 20px;*/
|
||||
line-height: 16px;
|
||||
margin: 3px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 3px;
|
||||
text-align: justify;
|
||||
}
|
||||
.footerWrap{
|
||||
position: absolute;
|
||||
/* top: 10px; */
|
||||
left:18px; /* 修改 */
|
||||
bottom: 36px;
|
||||
width: calc(100% - 120px);
|
||||
height:36px;
|
||||
font-size: 0;
|
||||
line-height:36px;
|
||||
border-radius: 5px;
|
||||
background-color: #d00;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0px 10px 6px -8px rgba(243,92,85,0.3);
|
||||
}
|
||||
.footerWrap .item{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
line-height: 18px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-right: 1px solid #e1e1e1;
|
||||
}
|
||||
.footerWrap .item:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
.footerWrap .item>.text{
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.footerWrap .item>img{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.footerWrap .item>.text.active{
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
color:red;
|
||||
font-size: 18px;
|
||||
}
|
||||
.footerWrap .item>img.active{
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
}
|
||||
.footerWrap .item .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-top-color: transparent;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 20px;
|
||||
margin-left: -6px;
|
||||
display: none;
|
||||
}
|
||||
.footerWrap .item .articletipsDown{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #c8c4c4;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 24px;
|
||||
margin-left: -6px;
|
||||
display: block;
|
||||
}
|
||||
.footerWrap .item>.text.active+.articletips{
|
||||
display: block;
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
}
|
||||
.footerWrap .item>.text.active+.articletips+.articletipsDown{
|
||||
display: none;
|
||||
}
|
||||
.footerWrap.footerItem5 .item{
|
||||
width:20%;
|
||||
}
|
||||
.footerWrap .exareBox{
|
||||
position: absolute;
|
||||
width:100px;
|
||||
height:auto;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
bottom: 38px;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
display: none;
|
||||
}
|
||||
.footerWrap .exareBox.active{
|
||||
display: block;
|
||||
}
|
||||
.footerWrap .exareBox a{
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding:10px 10px;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
}
|
||||
.zonglan{
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
bottom: 78px;
|
||||
z-index: 99;
|
||||
}
|
||||
.zonglan img{
|
||||
width:68px;
|
||||
}
|
||||
.synthesis{
|
||||
position: absolute;
|
||||
bottom: 36px;
|
||||
right: 18px;
|
||||
width: 72px;
|
||||
height:36px;
|
||||
line-height:36px;
|
||||
border-radius: 5px;
|
||||
background-color: #d00;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
box-shadow: 0px 10px 6px -8px rgba(243,92,85,0.3);
|
||||
}
|
||||
.synthesis .item{
|
||||
display: flex;
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
line-height: 18px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.synthesis .item>.text{
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.synthesis .item>img{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* 版面列表1 */
|
||||
.layoutStyleOne{
|
||||
width: 50%;
|
||||
position: fixed;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: -50%;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
padding:0 18px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
transition: left 500ms;
|
||||
-webkit-transition: left 500ms; /* Safari */
|
||||
}
|
||||
.layoutStyleOne.active{
|
||||
left: 0;
|
||||
}
|
||||
.layoutStyleOne a{
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding:20px 0;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
}
|
||||
.layoutStyleOne a.active{
|
||||
color: #da3e4a;
|
||||
}
|
||||
/* 版面列表二 */
|
||||
.layoutStyleTwo{
|
||||
height:70%;
|
||||
position: absolute;
|
||||
bottom: 70px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px 10px 0 0;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.layoutStyleTwo h2{
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin: 15px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox{
|
||||
width: 100%;
|
||||
height: calc(100% - 22px);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
padding:0 15px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox .action{
|
||||
border: 2px solid #FB565D;
|
||||
}
|
||||
.layoutStyleTwo .listWrapBox .listWrap{
|
||||
box-sizing: border-box;
|
||||
width: 27.33%;
|
||||
margin: 10px;
|
||||
}
|
||||
.layoutStyleTwo .listWrap img{
|
||||
width: 100%;
|
||||
}
|
||||
.layoutStyleTwo.active{
|
||||
display: block;
|
||||
}
|
||||
.layoutStyleTwo a{
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding-top:5px;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
text-align: center;
|
||||
}
|
||||
/* .layoutStyleTwo .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
bottom: -12px;
|
||||
left: 10%;
|
||||
} */
|
||||
/* 文章列表 */
|
||||
.articleList {
|
||||
position: absolute;
|
||||
bottom: 60px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-height: 70%;
|
||||
background-color: #fff;
|
||||
border-radius: 10px 10px 0 0;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.articleList .listWrap {
|
||||
}
|
||||
|
||||
.articleList .listWrap .listTitle {
|
||||
width: 100%;
|
||||
max-height: 350px;
|
||||
/*display: flex;*/
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
padding: 0 15px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.articleList.active{
|
||||
display: block;
|
||||
}
|
||||
.articleList .listWrap .title{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding:0 20px;
|
||||
}
|
||||
.articleList .listWrap .title .tips{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
display: none;
|
||||
border-top:1px solid #d5d5d5;
|
||||
top:50%;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.articleList .item{
|
||||
padding:15px 20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.articleList .item.itemActive {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.articleList .item h1{
|
||||
font-size: 18px;
|
||||
color:#000;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
z-index: 10;
|
||||
padding: 0 10px;
|
||||
margin: 0 auto 10px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.articleList .item a{
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color:#333;
|
||||
line-height: 24px;
|
||||
padding:12px 0;
|
||||
display: block;
|
||||
text-decoration:none;
|
||||
border-top: 1px solid #EEE;
|
||||
}
|
||||
|
||||
.articleList .item a.active{
|
||||
color: #da3e4a;
|
||||
}
|
||||
/* .articleList .articletips{
|
||||
width:0px;
|
||||
height: 0px;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: #fff;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
bottom: -12px;
|
||||
left: 61%;
|
||||
} */
|
||||
/* .articleList .item a{
|
||||
|
||||
} */
|
||||
.cancelBox{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99999;
|
||||
height: 70px;
|
||||
background-color: #FFF;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
display: none;
|
||||
}
|
||||
.cancelBox .cancelBtn{
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
background-color: #EEE;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}
|
||||
/* 日历 */
|
||||
.form_date {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
/* left: 12%; */
|
||||
width: 0;
|
||||
height: 70px;
|
||||
z-index: -20;
|
||||
border: 0px solid #FFF;
|
||||
background-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
.dropdown-menu{
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.datetimepicker{
|
||||
/* width:520px; */
|
||||
width:100%;
|
||||
left: 0 !important;
|
||||
/* bottom: 47px; */
|
||||
/* top: 40px !important; */
|
||||
}
|
||||
.datetimepicker-days .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-days .table-condensed tbody tr td.day.active{
|
||||
background-color: #da3e4a!important;
|
||||
border-radius: 24px;
|
||||
background-image: none;
|
||||
}
|
||||
.datetimepicker-days .table-condensed thead tr th.dow.active{
|
||||
color: #999999;
|
||||
}
|
||||
.datetimepicker-dropdown-top-left:after{
|
||||
left: 33%;
|
||||
right:initial !important;
|
||||
}
|
||||
.datetimepicker-months .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-months .table-condensed tbody tr .month.active{
|
||||
background-color: #da3e4a;
|
||||
border-radius: 10px;
|
||||
background-image: none;
|
||||
}
|
||||
.datetimepicker-years .table-condensed{
|
||||
width:100%;
|
||||
}
|
||||
.datetimepicker-years .table-condensed tbody tr .year.active{
|
||||
background-color: #da3e4a;
|
||||
border-radius: 10px;
|
||||
background-image: none;
|
||||
}
|
||||
/* 遮罩 */
|
||||
.mask{
|
||||
position: fixed;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 9;
|
||||
display: none;
|
||||
}
|
||||
.mask.active{
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 下载页面 */
|
||||
.synthPage{
|
||||
width: 100%;
|
||||
height:100%;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999;
|
||||
padding: 13px 13px 5px 13px;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.synthPage.active{
|
||||
display: block;
|
||||
background: url('../image20/bg.png') repeat center / auto auto;
|
||||
}
|
||||
.synthPage .closeBtn{
|
||||
text-align: right;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.synthPage .closeBtn i{
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background: url('../image20/guanbi.png') no-repeat center / 15px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#synthImg {
|
||||
display: none;
|
||||
border:1px solid #d00;
|
||||
}
|
||||
#synthImg img{
|
||||
width:auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.saveTipsBtn{
|
||||
width: 80%;
|
||||
height: 30px;
|
||||
margin: 10px auto;
|
||||
background-color: #d00;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#synthWrap{
|
||||
width:100%;
|
||||
padding:10px;
|
||||
height: auto;
|
||||
max-height: calc(100% - 40px);
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
#synthWrap .synthHead{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #8F8F8F;
|
||||
height: 20px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
#synthWrap .synthHead img{
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
}
|
||||
#synthWrap img.synthPaper{
|
||||
width:100%;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height:calc(100% - 100px);
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
box-shadow: 0px 4px 21px 3px
|
||||
rgba(195, 187, 187, 0.4);
|
||||
border-radius: 4px;
|
||||
border:1px solid rgba(195, 187, 187, 0.3);
|
||||
}
|
||||
#synthWrap .imgBottom{
|
||||
width:85%;
|
||||
height: 10px;
|
||||
background-color: rgba(244,244,244,1);
|
||||
box-shadow: 0px 4px 21px 3px
|
||||
rgba(195, 187, 187, 0.4);
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
margin:0 auto;
|
||||
border:1px solid rgba(195, 187, 187, 0.2);
|
||||
border-top-color: transparent;
|
||||
|
||||
}
|
||||
#synthWrap .footer{
|
||||
width:100%;
|
||||
height: 60px;
|
||||
padding:10px 0;
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
color: #8F8F8F;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#synthWrap .footer .left{
|
||||
width:50%;
|
||||
text-align: center;
|
||||
}
|
||||
#synthWrap .footer .left img{
|
||||
width:auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height:50px;
|
||||
}
|
||||
#synthWrap .footer .center{
|
||||
font-size: 12px;
|
||||
line-height: 50px;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
width:calc(50% - 25px);
|
||||
}
|
||||
#synthWrap .footer .right{
|
||||
width:50%;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
#synthWrap .footer .right .text{
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
#synthWrap .footer .right .qr{
|
||||
width:55px;
|
||||
height: 55px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#synthWrap .footer .right img{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#synthWrap .footer .right#qrcode table{
|
||||
transform: scale(0.6, 0.6);
|
||||
-webkit-transform: scale(0.6, 0.6);
|
||||
-moz-transform: scale(0.6, 0.6);
|
||||
-o-transform: scale(0.6, 0.6);
|
||||
margin-top: -15px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
.tipsBtn{
|
||||
display: block;
|
||||
width:100px;
|
||||
height:40px;
|
||||
background: url('../image20/saveBtn1.png') no-repeat center / 100px 40px;
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
transform: translate(-50%,-115%);
|
||||
}
|
||||
.synthmask{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top:0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.synthmask img{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
transform: translate(-50%,-115%);
|
||||
}
|
||||
|
||||
|
||||
/* 日历牌样式二 */
|
||||
#Datefour {
|
||||
position: fixed;
|
||||
bottom: -100%;
|
||||
left: 18px;
|
||||
width: calc(100% - 36px);
|
||||
/*height: 100%;*/
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
z-index:100;
|
||||
border-radius: 8px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
#Datefour>div{position: relative;}
|
||||
#Datefour>div a{
|
||||
position: absolute;
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
width: 16.6%;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
#Datefour>div a:last-child{right: 0;top:0;}
|
||||
#Datefour>div a span{margin-top: 11px;}
|
||||
#Datefour>div p{
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
margin-bottom: 0;
|
||||
font-size:16px;
|
||||
padding-bottom:15px;
|
||||
}
|
||||
#Datefour ul{
|
||||
width: 100%;
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
list-style: none;
|
||||
/* margin-bottom: 45px; */
|
||||
padding:5px;
|
||||
|
||||
}
|
||||
#Datefour li {
|
||||
width: 23%;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
line-height: 45px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
margin:1%;
|
||||
border:1px solid #dcdcdc;
|
||||
}
|
||||
#Datefour .clearfix a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
line-height: 30px;
|
||||
background-color: #FFF;
|
||||
/* border-bottom: 1px solid #CCC; */
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow:hidden;
|
||||
}
|
||||
#Datefour a.on{
|
||||
color: #FFF;
|
||||
background-color: #D9383D;
|
||||
}
|
||||
|
||||
.year{display:block; height:40px;}
|
||||
.curDate{padding-right:20px;}
|
104
public/static/css/navi.css
Normal file
@ -0,0 +1,104 @@
|
||||
body,html,p{
|
||||
padding: 0;
|
||||
margin:0;
|
||||
}
|
||||
body{
|
||||
height: 100%;
|
||||
}
|
||||
.topBox{
|
||||
height: calc(100vh - 65px);
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
/* Chrome, Safari, Edge */
|
||||
.topBox::-webkit-scrollbar {
|
||||
width: 10px; /* 滚动条宽度 */
|
||||
}
|
||||
|
||||
.topBox::-webkit-scrollbar-track {
|
||||
background: #ffffff; /* 轨道背景颜色 */
|
||||
}
|
||||
|
||||
.topBox::-webkit-scrollbar-thumb {
|
||||
background: #888; /* 滚动条颜色 */
|
||||
border-radius: 5px; /* 滚动条圆角 */
|
||||
}
|
||||
|
||||
.topBox::-webkit-scrollbar-thumb:hover {
|
||||
background: #555; /* 滚动条悬停时的颜色 */
|
||||
}
|
||||
.xm_top{
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.xm_top .item img{
|
||||
width: 120px;
|
||||
}
|
||||
.xm_top .item p{
|
||||
height: 42px;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
line-height: 42px;
|
||||
margin: 8px 0 12px 0;
|
||||
}
|
||||
.divider{
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
margin: 0 15px 3px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.thumbnail-left-left{
|
||||
padding:15px;
|
||||
}
|
||||
.thumbnail-left-left ul{
|
||||
padding: 0;
|
||||
margin:0;
|
||||
list-style: none;
|
||||
}
|
||||
.shortjpg{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.shortjpg p{
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
.shortjpg p span{
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.shortjpg p .title{
|
||||
display: inline-block;
|
||||
background: #d00;
|
||||
border-radius: 2px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
padding: 2px 10px;
|
||||
flex-shrink: 1;
|
||||
text-align: justify;
|
||||
height: fit-content;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.shortjpg a{
|
||||
display: block;
|
||||
width: 100%;
|
||||
box-shadow: 0px 5px 3px #eee;
|
||||
}
|
||||
.shortjpg a img{
|
||||
width: 100%;
|
||||
}
|
||||
.wangqi{
|
||||
width: calc(50% - 40px);
|
||||
bottom:22px;
|
||||
}
|
||||
.share{
|
||||
width: calc(50% - 60px);
|
||||
justify-content:center;
|
||||
bottom:22px;
|
||||
}
|
471
public/static/css/posterShare.css
Normal file
@ -0,0 +1,471 @@
|
||||
.posterMask{
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
background-image: url(/public/static/loading.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 50px 50px;
|
||||
display: none;
|
||||
}
|
||||
.posterMask.active{
|
||||
display: block;
|
||||
}
|
||||
.posterSplicingWrap *{
|
||||
box-sizing: border-box;
|
||||
margin:0;
|
||||
padding: 0;
|
||||
}
|
||||
.posterSplicingWrap{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
font-size: 0;
|
||||
background:#72787c;
|
||||
}
|
||||
.closePoster {
|
||||
text-align: right;
|
||||
padding: 2rem 4rem 1rem;
|
||||
}
|
||||
.closePoster i{
|
||||
width: 4.2rem;
|
||||
height: 4.2rem;
|
||||
display: inline-block;
|
||||
background: url("/public/static/closeIcon1.png")no-repeat center / 3.2rem 3.2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.posterChoseWrap{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding:1rem 2rem 36.8rem 2rem;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
/* justify-content: space-between; */
|
||||
}
|
||||
.posterChoseWrap>.item{
|
||||
width: 21.6rem;
|
||||
height: 31.4rem;
|
||||
background: #FFFFFF;
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
padding: 1rem;
|
||||
border-radius: 0.2rem;
|
||||
margin:1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.posterChoseWrap>.item .itemPic{
|
||||
width: calc(100% - 2rem);
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
position: absolute;
|
||||
left: 1rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.posterChoseWrap>.item .itemMask{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
.posterChoseWrap>.item .itemMask .choseBtn{
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
background: url('/public/static/icon1.png')no-repeat center / 3rem 3rem;
|
||||
right: 1.6rem;
|
||||
top: 0.8rem;
|
||||
}
|
||||
.posterChoseWrap>.item.active .itemMask{
|
||||
background:rgba(0,0,0,0.4);
|
||||
}
|
||||
.posterChoseWrap>.item.active .itemMask .choseBtn{
|
||||
background: url('/public/static/icon1_active.png')no-repeat center / 3rem 3rem;
|
||||
}
|
||||
|
||||
.chosedBoxList{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
border-radius: 1.5rem 1.5rem 0px 0px;
|
||||
background: #FFFFFF;
|
||||
bottom: 0;
|
||||
}
|
||||
.chosedBoxList .chosedHead{
|
||||
padding: 4rem 3rem;
|
||||
display: -webkit-flex; /* Safari */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.chosedBoxList .chosedHead .tips{
|
||||
font-size: 2.8rem;
|
||||
font-family: PingFang-SC-Medium;
|
||||
line-height: 2.2rem;
|
||||
color: #333333;
|
||||
display: inline-block;
|
||||
}
|
||||
.chosedBoxList .chosedHead .allPageBtn{
|
||||
width: 15.2rem;
|
||||
height: 5.6rem;
|
||||
line-height: 5.6rem;
|
||||
text-align: center;
|
||||
background: #d00;
|
||||
border-radius: 3.6rem;
|
||||
display: inline-block;
|
||||
font-size: 2.4rem;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 800;
|
||||
color: #FFFFFF;
|
||||
background: #d00;
|
||||
}
|
||||
.chosedBoxList .chosedHead .chosedBtn{
|
||||
width: 15.2rem;
|
||||
height: 5.6rem;
|
||||
line-height: 5.6rem;
|
||||
text-align: center;
|
||||
background: #d00;
|
||||
border-radius: 3.6rem;
|
||||
display: inline-block;
|
||||
font-size: 2.4rem;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 800;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.chosedBoxList .chosedHead .chosedBtn.active{
|
||||
background: #d00;
|
||||
cursor: pointer;
|
||||
}
|
||||
.chosedBoxList .chosedPicList{
|
||||
width: 100%;
|
||||
padding:1rem 1.8rem 3.2rem 1.8rem;
|
||||
/* height: 24rem; */
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chosedBoxList .chosedPicList .item{
|
||||
width: 13.5rem;
|
||||
height: 19.0rem;
|
||||
background: rgba(255, 255, 255, 0.39);
|
||||
border: 0.1rem solid #C1C1C1;
|
||||
border-radius: .2rem;
|
||||
padding:1rem;
|
||||
margin:0 1.2rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.chosedBoxList .chosedPicList .item .itemPic{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.chosedBoxList .chosedPicList .choseBtn{
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
background: url('/public/static/closeIcon2.png')no-repeat center / 3rem 3rem;
|
||||
right: 0;
|
||||
top:0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wraringWrapper{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 2;
|
||||
}
|
||||
.wraningBox{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
min-width: 54rem;
|
||||
min-height: 28rem;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 1.5rem;
|
||||
z-index: 9;
|
||||
}
|
||||
.wraningBox.active{
|
||||
display: block;
|
||||
}
|
||||
.wraningBox .title{
|
||||
font-size: 3.4rem;
|
||||
color: #333333;
|
||||
line-height: 4.8rem;
|
||||
margin:4rem 2.4rem;
|
||||
}
|
||||
.wraningBox .tips{
|
||||
font-size: 2.8rem;
|
||||
color: #666666;
|
||||
line-height: 4rem;
|
||||
margin-bottom: 4.0rem;
|
||||
}
|
||||
.wraningBox .btn{
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
font-size: 3.2rem;
|
||||
line-height: 8.8rem;
|
||||
color: #DA3E4A;
|
||||
border-top: .1rem solid #E4E4E4;
|
||||
}
|
||||
|
||||
.posterWrapper{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: #7d7d7d;
|
||||
z-index: 99;
|
||||
padding:2.2rem 3.6rem;
|
||||
}
|
||||
.posterWrapper .closeBtn{
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
margin-bottom: 2.2rem;
|
||||
}
|
||||
.posterWrapper .closeBtn i{
|
||||
display: inline-block;
|
||||
width: 4.2rem;
|
||||
height: 4.2rem;
|
||||
background: url(/public/static/closeIcon1.png) no-repeat center / 3.2rem 3.2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.originalWrapper{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.originalWrapper .synthHead{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #8F8F8F;
|
||||
height: 20px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.originalWrapper .synthHead img{
|
||||
width: 33.33%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.defalutLayoutPoster{
|
||||
width: 100%;
|
||||
padding: 2.2rem 3rem;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.verticalPoster,
|
||||
.horizontalPoster{
|
||||
display: none;
|
||||
}
|
||||
.verticalPoster.active,
|
||||
.horizontalPoster.active{
|
||||
display: block;
|
||||
}
|
||||
.onePoster .defalutLayoutPoster .imageBox{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
/* background-color: #fff; */
|
||||
padding: 2.4rem 2.8rem 5rem 2.8rem;
|
||||
/* box-shadow: 0px .4rem 2.4rem rgba(195, 187, 187, 0.4); */
|
||||
border-radius: .8rem;
|
||||
margin-bottom: 1.5rem;
|
||||
background: url("/public/static/boxbg.png")no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
.horizontalPoster .defalutLayoutPoster .imageBox{
|
||||
width: calc(50% - 0.4rem);
|
||||
display: inline-block;
|
||||
margin: .4rem 0.2rem;
|
||||
padding: 1.4rem 1.8rem 2rem 1.8rem;
|
||||
height: auto;
|
||||
/* background-color: #fff;
|
||||
box-shadow: 0px .4rem 2.4rem rgba(195, 187, 187, 0.4); */
|
||||
border-radius: .8rem;
|
||||
background: url("/public/static/boxbg.png")no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
.fourPoster .defalutLayoutPoster .imageBox{
|
||||
width: calc(50% - 0.8rem);
|
||||
display: inline-block;
|
||||
margin: .4rem 0.4rem;
|
||||
padding: 1.4rem 1.8rem 2rem 1.8rem;
|
||||
height: auto;
|
||||
/* background-color: #fff;
|
||||
box-shadow: 0px .4rem 2.4rem rgba(195, 187, 187, 0.4); */
|
||||
border-radius: .8rem;
|
||||
background: url("/public/static/boxbg.png")no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
.eightPoster .defalutLayoutPoster{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.eightPoster .defalutLayoutPoster .imageBox{
|
||||
width: calc(33.33% - 0.8rem);
|
||||
display: inline-block;
|
||||
margin: .4rem 0.4rem;
|
||||
padding: 1rem;
|
||||
height: 30rem;
|
||||
/* background-color: #fff;
|
||||
box-shadow: 0px .4rem 2.4rem rgba(195, 187, 187, 0.4); */
|
||||
border-radius: .8rem;
|
||||
background: url("/public/static/boxbg.png")no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
.originalWrapper .defalutLayoutPoster .imageBox img.imgPic{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.originalWrapper .footer{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 2.4rem;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.originalWrapper .footer .logo img{
|
||||
max-height: 8rem;
|
||||
max-width: 22rem;
|
||||
}
|
||||
.originalWrapper .footer .code{
|
||||
text-align: center;
|
||||
margin-left: -150rem;
|
||||
}
|
||||
.originalWrapper .footer .time{
|
||||
text-align: right;
|
||||
}
|
||||
.originalWrapper .footer .code.active{
|
||||
background-color: #fff;
|
||||
width: 12rem;
|
||||
height: 12rem;
|
||||
padding: 0.6rem;
|
||||
border-radius: 0.8rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
.originalWrapper .footer .code.active img{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
.eightPoster .imageBox{
|
||||
padding: 3.2rem 1.5rem !important;
|
||||
}
|
||||
.eightPoster .imageBox .code{
|
||||
position: absolute;
|
||||
}
|
||||
.eightPoster .imageBox .code.active{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("/public/static/codebg.png")no-repeat center / 100% 100%;
|
||||
}
|
||||
.eightPoster .code.active img{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left: 50%;
|
||||
transform: translate(-50% ,-50%);
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
.eightPoster .footer{
|
||||
margin-top: 2.4rem;
|
||||
}
|
||||
.eightPoster.originalWrapper .footer .logo{
|
||||
width: 50%;
|
||||
}
|
||||
.eightPoster.originalWrapper .footer .logo img{
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.newPosterWrapper{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: relative;
|
||||
}
|
||||
.newPosterWrapper .tips{
|
||||
width: 20rem;
|
||||
height: 8rem;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 4rem;
|
||||
font-size: 2.4rem;
|
||||
line-height: 8rem;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
.newPosterWrapper .buttomtips{
|
||||
width: 80%;
|
||||
height: 30px;
|
||||
margin: 10px auto;
|
||||
background-color: #F05A59;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
.newPosterWrapper img{
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.choseDirectionBox{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 1.5rem 1.5rem 0px 0px;
|
||||
background: #fff;
|
||||
padding: 7rem 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.choseDirectionBox .left{
|
||||
width: 18rem ;
|
||||
height:14.4rem;
|
||||
content: url("/public/static/verticalDefault.png");
|
||||
}
|
||||
.choseDirectionBox .left.active{
|
||||
content: url("/public/static/verticalActive.png");
|
||||
}
|
||||
.choseDirectionBox .right{
|
||||
width: 18rem ;
|
||||
height:14.4rem;
|
||||
content: url("/public/static/transverseDefault.png");
|
||||
}
|
||||
.choseDirectionBox .right.active{
|
||||
content: url("/public/static/transverseActive.png");
|
||||
}
|
13
public/static/css/swiper.min.css
vendored
Normal file
406
public/static/data/2024-11.json
Normal file
14
public/static/data/gjz.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "马克思",
|
||||
"content": "卡尔·马克思(Karl Marx,1818年5月5日-1883年3月14日),是德国哲学家、经济学家、社会学家、政治理论家、革命家,同时也是马克思主义的创始人之一。他的思想对19世纪末至20世纪的全球政治和经济产生了深远的影响。\n\n马克思的主要贡献包括:\n\n1. **历史唯物主义**:马克思提出了历史唯物主义理论,认为物质生产力的发展是推动历史发展的根本动力,社会制度和意识形态是经济基础的反映。\n\n2. **阶级斗争理论**:他认为阶级斗争是社会发展的驱动力,不同社会形态的更替是通过阶级斗争实现的。\n\n3. **剩余价值理论**:在《资本论》中,马克思详细阐述了剩余价值理论,揭示了资本主义生产方式下资本家对工人的剥削。\n\n4. **无产阶级革命理论**:马克思和恩格斯共同撰写的《共产党宣言》中提出了无产阶级革命的理论,号召全世界无产者联合起来,推翻资产阶级统治,建立无产阶级专政。\n\n5. **科学社会主义**:马克思提出了科学社会主义理论,认为社会主义是资本主义发展的必然结果,是更高级的社会形态。\n\n马克思的著作包括《共产党宣言》、《资本论》、《哲学的贫困》、《政治经济学批判》等。他的思想和理论对后来的社会主义和共产主义运动产生了深远的影响,被广泛地应用于政治、经济、哲学和社会学等多个领域。马克思的学说被世界各地的许多政党和运动所采纳,并在20世纪形成了多个社会主义国家。"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "恩格斯",
|
||||
"content": "弗里德里希·恩格斯(Friedrich Engels),1820年11月28日出生于德意志莱茵省巴门市(今伍珀塔尔市),是德国思想家、哲学家、革命家、教育家、军事理论家,全世界无产阶级和劳动人民的伟大导师,坚定的革命民主主义者,马克思主义创始人之一。恩格斯与马克思共同撰写了《共产党宣言》和创立了科学共产主义理论。马克思逝世后,恩格斯整理出版了《资本论》。\n\n恩格斯的重要著作包括《反杜林论》、《社会主义从空想到科学的发展》以及《家庭、私有制和国家的起源》等。在《反杜林论》中,恩格斯系统阐述了马克思主义哲学、政治经济学和科学社会主义原理,被誉为马克思主义的百科全书。在《社会主义从空想到科学的发展》中,恩格斯指出唯物主义历史观和通过剩余价值揭开资本主义生产的秘密是社会主义变成科学的两个伟大发现。《家庭、私有制和国家的起源》中,恩格斯探讨了私有制、阶级和国家产生的途径与形式。\n\n恩格斯不仅在理论上作出了贡献,而且在实践中也是国际工人运动的领导者。他与马克思共同领导了第一国际,马克思去世后,恩格斯独立肩负起国际工人运动的领导工作,并在1889年直接领导下成立了第二国际。恩格斯的贡献不仅在于他的思想和理论,还在于他对国际工人运动的直接参与和领导。\n\n恩格斯的一生是为无产阶级解放事业不懈奋斗的一生。他的理论和实践活动对马克思主义的发展和国际工人运动产生了深远的影响。1895年8月5日,恩格斯在伦敦去世,根据他生前的意愿,他的骨灰被撒入大海。"
|
||||
}
|
||||
]
|
||||
}
|
3
public/static/data/newTime.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"time": "2024-11-07"
|
||||
}
|
BIN
public/static/fenxiang.png
Normal file
After Width: | Height: | Size: 756 B |
BIN
public/static/festival.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
public/static/font-larger.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/static/font-smaller.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/static/fonts/glyphicons-halflings-regular.ttf
Normal file
BIN
public/static/fonts/glyphicons-halflings-regular.woff
Normal file
BIN
public/static/goTop.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
public/static/guanbi.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
public/static/home.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/static/icon1.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
public/static/icon1_active.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/static/icon_top.png
Normal file
After Width: | Height: | Size: 24 KiB |
154
public/static/js/bigHaiBao.js
Normal file
@ -0,0 +1,154 @@
|
||||
//下载弹层
|
||||
function bigHaibao() {
|
||||
var imgUrl = $('.swiper-wrapper .swiper-slide-active img').attr('src') + '?=v1';
|
||||
var date =$("#publishDateTime").html();
|
||||
var week = getWeekBig($("#NewsArticleTime").html()); //星期
|
||||
console.log($("#publishDateTime").html());
|
||||
var html =
|
||||
'<div class="closeBtn"><i></i></div>' +
|
||||
'<div id="synthWrap" style="width:1500px; position:absolute; top:-100000px; max-height:max-content; padding:30px;">' +
|
||||
' <div class="synthHead" style="height:80px; margin-bottom:30px; font-size:48px;line-height:80px;">' +
|
||||
' <img src="/h5/public/static/logo.png" style="height: 50px;width: 50px" alt=""/>' +
|
||||
' <div>' + date +' ' + week +'</div>' +
|
||||
' </div>' +
|
||||
' <img src = ' + imgUrl +' class="synthPaper" alt=""/>' +
|
||||
' <div class="footer" style="height:180px; padding:30px 0;font-size:48px; margin-top:30px;">' +
|
||||
' <div class="left">' +
|
||||
' <img style="max-height:150px;max-width:150px;" src="/h5/public/static/logo.png" alt=""/>' +
|
||||
' </div>' +
|
||||
' <div class="right">' +
|
||||
' <div class="text">' +
|
||||
' <div>识别二维码</div>' +
|
||||
' <div>查看该版内容</div>' +
|
||||
' </div>' +
|
||||
' <div class="qr" style="width:180px; height:180px; margin-left:30px;">' +
|
||||
' <img src="" id="qcImg"/>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
'</div>' +
|
||||
'<div id="synthImg"><img src="" alt=""/></div>' +
|
||||
'<div class="saveTipsBtn" style="display:none;">点击图片,长按分享给好友</div>' +
|
||||
'<div class="synthmask"><img src="/h5/public/static/loading.gif" alt=""/></div>' +
|
||||
'<div id="qrcode" style="visibility:hidden;"></div>';
|
||||
|
||||
$('.synthPage').append(html);
|
||||
var url = window.location.href;
|
||||
var index = url.substring(0, url.lastIndexOf('/') + 1);
|
||||
console.log(index + '?' + getCaption())
|
||||
$('body').find('#qrcode').qrcode({
|
||||
render: 'canvas',
|
||||
width: 180,
|
||||
height: 180,
|
||||
// margin: '0 auto',
|
||||
text: index + '?' + getCaption()
|
||||
});
|
||||
document.getElementById('qcImg').src = document.querySelector('canvas').toDataURL("image/webp");
|
||||
synthesisImgLoadBig();
|
||||
|
||||
$('.tipsBtn').unbind("touchstart");
|
||||
$('.tipsBtn').unbind("touchend");
|
||||
$('.tipsBtn').bind("touchstart", function () {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('.tipsBtn').bind("touchend", function () {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
//判断图片是否加载完成
|
||||
function synthesisImgLoadBig() {
|
||||
var img = $('.synthPage .synthPaper');
|
||||
if (img && img.length != 0) {
|
||||
if (img[0].complete) {
|
||||
var synBoxH = $('#synthWrap').height();
|
||||
var imgH = $('#synthWrap').height() - 100;
|
||||
$('#synthWrap>img.synthPaper').css('max-height', imgH + 'px');
|
||||
$('#qrcode').hide()
|
||||
synthesisImgBig();
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoadBig() }, 300);
|
||||
}
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoadBig() }, 300);
|
||||
}
|
||||
}
|
||||
//生成图片
|
||||
function synthesisImgBig() {
|
||||
//clearInterval(synthesisImgLoadBig)
|
||||
var canvas = document.createElement('canvas'); // 创建一个canvas节点
|
||||
var shareContent = document.getElementById('synthWrap'); // 需要截图的包裹的(原生的)DOM 对象
|
||||
var width = shareContent.offsetWidth; // 获取dom 宽度
|
||||
var height = shareContent.offsetHeight; // 获取dom 高度
|
||||
var scale = 1.5; // 定义任意放大倍数 支持小数
|
||||
canvas.getContext('2d').scale(scale, scale); // 获取context,设置scale
|
||||
var rect = shareContent.getBoundingClientRect(); // 获取元素相对于视口的
|
||||
html2canvas(document.getElementById('synthWrap'), {
|
||||
x: rect.left, // 绘制的dom元素相对于视口的位置
|
||||
y: rect.top,
|
||||
width: width, // dom 原始宽度
|
||||
height: height,
|
||||
windowWidth: document.body.scrollWidth,
|
||||
windowHeight: document.body.scrollHeight,
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
useCORS: true, // 开启跨域
|
||||
dpi: window.devicePixelRatio * 2,
|
||||
scale: scale, // 添加的scale 参数
|
||||
}).then((canvas) => {
|
||||
var context = canvas.getContext('2d')
|
||||
//关闭抗锯齿
|
||||
context.mozImageSmoothingEnabled = false
|
||||
context.msImageSmoothingEnabled = false
|
||||
context.imageSmoothingEnabled = false
|
||||
$('#synthImg img').attr('src', canvas.toDataURL());
|
||||
$('#synthWrap').hide();
|
||||
$('#synthImg').show();
|
||||
$('.synthPage .synthmask').hide();
|
||||
$('.saveTipsBtn').show();
|
||||
})
|
||||
}
|
||||
|
||||
//星期日期计算
|
||||
function getWeekBig(timedat) { //timedat参数格式: "2018-09-11"
|
||||
let t = new Date(timedat);
|
||||
let week;
|
||||
if (t.getDay() === 0) week = "星期日";
|
||||
if (t.getDay() === 1) week = "星期一";
|
||||
if (t.getDay() === 2) week = "星期二";
|
||||
if (t.getDay() === 3) week = "星期三";
|
||||
if (t.getDay() === 4) week = "星期四";
|
||||
if (t.getDay() === 5) week = "星期五";
|
||||
if (t.getDay() === 6) week = "星期六";
|
||||
return week;
|
||||
};
|
||||
|
||||
//判断当前时间和报纸刊期之间的时间差。 如在MaxshowData天内,返回true,否则返回false
|
||||
// type=1,忽略dtStartStr,日期根据浏览器地址获取;type=2,根据前一个参数,格式(YYYY/MM/DD)
|
||||
function DateMaxDiffBig(type, dtStartStr) {
|
||||
if (!ifMaxShowDate) { return true; }
|
||||
var maxinterval = MaxshowData;//允许看的天数
|
||||
var re = /(\d{4})-(\d{2})\/(\d{2})/i;
|
||||
var sUrl = location.href;
|
||||
var r = sUrl.match(re);
|
||||
var dtEnd = new Date();
|
||||
var dtStart;
|
||||
if (type == 1) {
|
||||
if (r) {
|
||||
dtStart = new Date(r[1] + "/" + r[2] + "/" + r[3]);
|
||||
} else {
|
||||
dtStart = new Date();
|
||||
}
|
||||
} else if (type == 2) {
|
||||
dtStart = new Date(dtStartStr);
|
||||
if (isNaN(dtStart)) dtStart = new Date();
|
||||
}
|
||||
|
||||
var date3 = dtEnd.getTime() - dtStart.getTime(); //时间差的毫秒数
|
||||
var days = Math.floor(date3 / (24 * 3600 * 1000));//计算出相差天数
|
||||
if ((days) >= maxinterval) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
1
public/static/js/bootstrap-datetimepicker.min.js
vendored
Normal file
16
public/static/js/bootstrap-datetimepicker.zh-CN.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Simplified Chinese translation for bootstrap-datetimepicker
|
||||
* Yuan Cheung <advanimal@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['zh-CN'] = {
|
||||
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
|
||||
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
|
||||
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
today: "今天",
|
||||
suffix: [],
|
||||
meridiem: ["上午", "下午"]
|
||||
};
|
||||
}(jQuery));
|
6
public/static/js/bootstrap.min.js
vendored
Normal file
20
public/static/js/html2canvas.min.js
vendored
Normal file
909
public/static/js/index.js
Normal file
@ -0,0 +1,909 @@
|
||||
|
||||
document.write("<script src='../../../js20/qfstatH5.js'></script>");
|
||||
document.write("<script src='../../../js20/poster/posterShare.js'></script>");
|
||||
document.write("<script src='../../../js20/bigHaiBao.js?v=1'></script>");
|
||||
var swiper =null;
|
||||
// 以下参数根据需求进行配置
|
||||
var BMListModeType = 2; // 版面列表显示类型。1:左侧弹出 2:居中显示
|
||||
var calendarMode = 1; //1:传统日历 2:列表日历需要配合自定义json日历数据
|
||||
var ifMaxShowDate = false;//是否开启过滤日期(开启:true,关闭:false)
|
||||
var MaxshowData = 10; //最多能看7天
|
||||
var pageDirection = "horizontal"; // 版面图滑动 horizontal横向滚动,vertical竖向滚动
|
||||
var layoutStyle = "festival" //版面图样式 routine:常规, festival:节日,solemn:庄严
|
||||
var HaiBaoType = "single"; //single:单版模板 multi:多版模式,多版面时:需要加载:document.write("<script src='../../../js20/poster/posterShare.js'></script>"); @import url("../js20/poster/posterShare.css");
|
||||
|
||||
// 主程序
|
||||
|
||||
var month = getDate("month");//获取当前月份
|
||||
$('img[usemap]').rwdImageMaps();//设置图片热区
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
// var wrapWidth=document.body.clientWidth-36;
|
||||
// var imgWidth=$('.paperMap')[0].offsetWidth,imgHeight=$('.paperMap')[0].offsetHeight;
|
||||
// var wrapHeight=(wrapWidth*imgHeight)/imgWidth
|
||||
// console.log(wrapHeight)
|
||||
// $('.newpaper').css('height',wrapHeight)
|
||||
// return false
|
||||
//if (layoutStyle == "routine") {
|
||||
// $('.contWrapper').css("background", "#FFF");
|
||||
// $('.headBox').css("background", "#F0F0F0");
|
||||
//} else if (layoutStyle == "festival") {
|
||||
// $('.contWrapper').css("background", "url(../../../image20/festival.png) no-repeat")
|
||||
// $('.contWrapper').css("background-size", "100% 100%");
|
||||
// $('.headBox').css("background", "#F0F0F0");
|
||||
//} else if (layoutStyle == "solemn") {
|
||||
// $('body').css("filter", "grayscale(1)");
|
||||
// $('.headBox').css("background", "#F0F0F0");
|
||||
//}
|
||||
if (!DateMaxDiff(1)) {
|
||||
alert("对不起,只能查看最新七天数据!");
|
||||
//location.href = "../../../paperindex.htm";
|
||||
return;
|
||||
}
|
||||
|
||||
// 模式2初始化年份日历
|
||||
if (calendarMode == 2) {
|
||||
initYearList();
|
||||
}
|
||||
|
||||
//$($('.articleList .listWrap .item')[0]).toggleClass('itemActive');
|
||||
// Initialize Swiper
|
||||
swiper = new Swiper('.swiper-container', {
|
||||
//zoom: true,
|
||||
direction: pageDirection,//horizontal横向滚动,vertical竖向滚动
|
||||
initialSlide: getURLParams() ? getURLParams(): 0,//默认显示第几个
|
||||
//loop : true,//循环滚动
|
||||
on: {
|
||||
init: function (swiper) {
|
||||
console.log('init');
|
||||
// $('body').css('opacity',1)
|
||||
|
||||
pinchZoom();
|
||||
//autoChangeTitle(true);
|
||||
//alert($('img.pichmask').height())
|
||||
// $('img.pichmask').css("height", $(".swiper-wrapper").height());
|
||||
},
|
||||
slideChangeTransitionEnd: function (swiper) {
|
||||
//console.log(swiper);
|
||||
var index=swiper.activeIndex;
|
||||
//$("#dataIndex").val(index);
|
||||
window.dispatchEvent(new CustomEvent('dataIndexChanged', { detail: index }));
|
||||
//动态显示页面title信息
|
||||
//autoChangeTitle(false);
|
||||
new RTP.PinchZoom($('.swiper-slide.swiper-slide-active .pinch-zoom'), { maxZoom: 4 });
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
//$('.newpaper').ready(function(){
|
||||
// setTimeout(function(){
|
||||
// $(".posterMask").removeClass('active');
|
||||
// },10);
|
||||
//})
|
||||
$('.contWrapper').ready(function(){
|
||||
//setTimeout(function(){$(".posterMask").removeClass('active');},1000);
|
||||
setTimeout(function(){$('body').css('opacity',1);},500);
|
||||
//$('body').css('opacity',1);
|
||||
})
|
||||
//版面放大的区域与图片自适应显示区域一致
|
||||
// $('img.pichmask').load(function(){
|
||||
// alert($('img.pichmask').height())
|
||||
// })
|
||||
// $('img.pichmask').css("height", $(".swiper-wrapper").height());
|
||||
|
||||
//日历实例化
|
||||
$('.form_date').datetimepicker({
|
||||
pickerPosition: "top-right",
|
||||
bootcssVer: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
language: "zh-CN",
|
||||
weekStart: 1,
|
||||
autoclose: 1,
|
||||
startView: 2,
|
||||
minView: 2,
|
||||
forceParse: 0,
|
||||
viewSelect: "month",
|
||||
initialDate: getDate("day"),
|
||||
}).on("show", function (ev) {
|
||||
displayDate(month);
|
||||
//$(".datetimepicker-days th.switch").addClass("disabled");
|
||||
}).on('changeDate', function (ev) {
|
||||
var date = new Date(ev.date.valueOf());
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
month = month < 10 ? ("0" + month) : month;
|
||||
var day = date.getDate();
|
||||
day = day < 10 ? ("0" + day) : day;
|
||||
var url = "#";
|
||||
|
||||
//var curDate = year+""+appendZero(month)+""+appendZero(day);
|
||||
//if (curDate<=20191231){
|
||||
// location.href = "https://epaper.guanhai.com.cn/qdrb/"+curDate;
|
||||
//}
|
||||
|
||||
var isUseful = checkUrl(url);
|
||||
if (isUseful) {
|
||||
location.href = url;
|
||||
}
|
||||
hideAll();
|
||||
//$('.mask').removeClass('active');
|
||||
});
|
||||
//导航栏日期显示
|
||||
// $('body .datetimeBtn').text(getDate("day"));
|
||||
// 底部按钮切换
|
||||
$('.footerWrap').on('click', '.item', function () {
|
||||
//$(this).toggleClass('active');
|
||||
//$(this).parent('.item').siblings('.item').find('.text').removeClass('active');
|
||||
$('.mask').toggleClass('active');
|
||||
// 版面列表显示
|
||||
var btn=$(this).children()[1];
|
||||
|
||||
if (btn.classList.contains('layoutBtn')) {
|
||||
if (BMListModeType == 1) {
|
||||
$('.layoutStyleOne').toggleClass('active');
|
||||
} else if (BMListModeType == 2) {
|
||||
$('.layoutStyleTwo').toggleClass('active');
|
||||
$(".cancelBox").show()
|
||||
}
|
||||
}
|
||||
// 版面文章目录显示
|
||||
if (btn.classList.contains('articleBtn')) {
|
||||
$('.articleList').toggleClass('active');
|
||||
$(".cancelBox").show();
|
||||
}
|
||||
//日历显示
|
||||
if (btn.classList.contains('datetimeBtn')) {
|
||||
showDate();
|
||||
}
|
||||
// 跳转下载页面
|
||||
//if (btn.classList.contains('synthesis')) {
|
||||
// // window.location.href='synthesis.html';
|
||||
// // $('.mask').removeClass('active');
|
||||
// $('.synthPage').addClass('active');
|
||||
// synthBox();
|
||||
//}
|
||||
|
||||
//更多显示的弹层
|
||||
if (btn.classList.contains('more')) {
|
||||
$(this).siblings('.exareBox').toggleClass('active');
|
||||
}
|
||||
})
|
||||
|
||||
// 点击遮罩
|
||||
$('.contWrapper .mask').on('click', function () {
|
||||
hideAll();
|
||||
})
|
||||
|
||||
// 点击取消按钮
|
||||
$('.contWrapper .cancelBox').on('click', function () {
|
||||
hideAll();
|
||||
})
|
||||
|
||||
// 点击总览页面
|
||||
// $('.zonglan').on('click', function () {
|
||||
// var rqStr = window.location.href.match(/(\d{4}-\d{2})\/(\d{2})/i);
|
||||
// var zonglanUrl = "index_"+rqStr[1]+"-"+rqStr[2]+".htm";
|
||||
// window.location.href = zonglanUrl;
|
||||
// })
|
||||
|
||||
//文章目录显示样式
|
||||
// $('.articleList .item a').on('click', function () {
|
||||
// $(this).addClass('active').siblings().removeClass('active');
|
||||
// $(this).parents('.item').siblings('.item').find('a').removeClass('active')
|
||||
// })
|
||||
|
||||
//给版面目录页面加上高亮(样式一)
|
||||
// var curUrl = window.location.href;
|
||||
// $('.layoutList a').each(function (i, elem) {
|
||||
// if ($(elem).attr('href') == curUrl) {
|
||||
// $(elem).addClass('active').siblings().removeClass('active');
|
||||
// }
|
||||
// });
|
||||
//给版面目录页面加上高亮(样式二)
|
||||
// $('.layoutList .listWrapBox .listWrap').each(function (i, elem) {
|
||||
// if (curUrl.includes($(elem).children('a').attr('href'))) {
|
||||
// $(elem).addClass('action').siblings().removeClass('action');
|
||||
// }
|
||||
// });
|
||||
// 点击版面
|
||||
// $('.layoutList .listWrapBox .listWrap').on('click', function (e) {
|
||||
// location.href = $(this).children('a').attr('href')
|
||||
// })
|
||||
|
||||
//监听切换月份
|
||||
var i = 0;
|
||||
// 选择您想要监听子节点变动的元素
|
||||
var targetNode = document.querySelector('.datetimepicker-days tbody');
|
||||
// 创建一个观察者实例并传入回调函数
|
||||
var observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.type === 'childList') {
|
||||
if (i == 5) {
|
||||
var date = $(".datetimepicker-days thead th.switch").text().split(" ");
|
||||
switch (date[0]) {
|
||||
case "一月":
|
||||
month = date[1] + "-01";
|
||||
break;
|
||||
case "二月":
|
||||
month = date[1] + "-02";
|
||||
break;
|
||||
case "三月":
|
||||
month = date[1] + "-03";
|
||||
break;
|
||||
case "四月":
|
||||
month = date[1] + "-04";
|
||||
break;
|
||||
case "五月":
|
||||
month = date[1] + "-05";
|
||||
break;
|
||||
case "六月":
|
||||
month = date[1] + "-06";
|
||||
break;
|
||||
case "七月":
|
||||
month = date[1] + "-07";
|
||||
break;
|
||||
case "八月":
|
||||
month = date[1] + "-08";
|
||||
break;
|
||||
case "九月":
|
||||
month = date[1] + "-09";
|
||||
break;
|
||||
case "十月":
|
||||
month = date[1] + "-10";
|
||||
break;
|
||||
case "十一月":
|
||||
month = date[1] + "-11";
|
||||
break;
|
||||
case "十二月":
|
||||
month = date[1] + "-12";
|
||||
break;
|
||||
}
|
||||
displayDate(month);
|
||||
i = -1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 配置观察选项:
|
||||
// 子节点的添加或删除将触发观察者的回调
|
||||
var config = { attributes: false, childList: true, subtree: true };
|
||||
// 传入目标节点和观察选项
|
||||
observer.observe(targetNode, config);
|
||||
|
||||
|
||||
//点击分享按钮
|
||||
$('.synthesis').on('click', function () {
|
||||
if(HaiBaoType=="single"){//单版分享
|
||||
$('.mask').toggleClass('active');
|
||||
$('.synthPage').addClass('active');
|
||||
//synthBox();
|
||||
bigHaibao();
|
||||
}else if (HaiBaoType=="multi"){ //多版分享
|
||||
var poster = POSTER('paperMap').show('');
|
||||
}
|
||||
});
|
||||
|
||||
//关闭下载图片的弹层
|
||||
$('.synthPage').on('click', '.closeBtn', function () {
|
||||
$('.synthPage').html('');
|
||||
$('.synthPage,.mask,.synthesis').removeClass('active');
|
||||
|
||||
});
|
||||
|
||||
var currentSwiperZoom = [];
|
||||
var currentSwiperZoom2 = [];
|
||||
//存储页面所有图片原始的缩放比例
|
||||
window.onload = function () {
|
||||
$('.swiper-slide').find('.pinch-zoom').each(function () {
|
||||
currentSwiperZoom2.push({ zoomhtml: $(this)[0].outerHTML });
|
||||
});
|
||||
new RTP.PinchZoom($('.swiper-slide.swiper-slide-active .pinch-zoom'), { maxZoom: 4 });
|
||||
//$('.swiper-slide').find('.pinch-zoom').each(function(){
|
||||
//currentSwiperZoom.push({transform:$(this)[0].style.transform,transformOrigin:$(this)[0].style.transformOrigin});
|
||||
//})
|
||||
}
|
||||
//点击除了已有的元素之外的区域缩小放大
|
||||
$('body').click(function (e) {
|
||||
var target = $(e.target);
|
||||
if (!target.is('.imgBoxCont *') && !target.is('.footerWrap *') && !target.is('.newsText1 *') && !target.is('.synthesis') && !target.is('.layoutList *') && !target.is('.articleList *') && !target.is('.text') && !target.is('.synthPage *') && !target.is('.mask') && currentSwiperZoom2.length != 0) {
|
||||
//不是点击指定区域执行的操作
|
||||
var scaleIndex = getURLParams() ? getURLParams() : 0
|
||||
$('.swiper-slide.swiper-slide-active .pinch-zoom-container').remove();
|
||||
$('.swiper-slide.swiper-slide-active .imgBoxCont').append(currentSwiperZoom2[scaleIndex].zoomhtml)
|
||||
new RTP.PinchZoom($('.swiper-slide.swiper-slide-active .pinch-zoom'), { maxZoom: 4 });
|
||||
}
|
||||
});
|
||||
|
||||
//xml判断图片加载情况
|
||||
xmlhttpAction();
|
||||
|
||||
})
|
||||
|
||||
//图片放大初始化
|
||||
function pinchZoom() {
|
||||
window.z_drag = 0;
|
||||
$('div.pinch-zoom').each(function (v, i) {
|
||||
new RTP.PinchZoom($(this), { maxZoom: 4 });
|
||||
$(this).on('pz_zoomstart', function () {
|
||||
window.z_drag = 1
|
||||
});
|
||||
|
||||
$(this).on('pz_dragstart', function () {
|
||||
window.z_drag = 1
|
||||
});
|
||||
|
||||
$(this).on('pz_zoomend', function () {
|
||||
setTimeout(function () {
|
||||
window.z_drag = 0
|
||||
}, 500);
|
||||
});
|
||||
$(this).on('pz_dragend', function () {
|
||||
setTimeout(function () {
|
||||
window.z_drag = 0
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//xml判断图片加载情况
|
||||
function xmlhttpAction() {
|
||||
var xmlhttp;
|
||||
if (window.XMLHttpRequest) {
|
||||
// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
} else {
|
||||
// code for IE6, IE5
|
||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlhttp.abort();
|
||||
//停止继续加载页面,相当于点击stop按钮。
|
||||
if (!!(window.attachEvent && !window.opera)) {
|
||||
console.log('ie')
|
||||
//alert('ie')
|
||||
//document.execCommand("stop");// code for IE
|
||||
} else {
|
||||
console.log('chrome');
|
||||
//alert('chrome');
|
||||
$('.swiper-wrapper .swiper-slide').each(function (i, v) {
|
||||
//console.log($(v).children('.pinch-zoom'))
|
||||
if (!$(v).find('.paperMap')[0].complete) {
|
||||
if (i == 0) {
|
||||
//alert($(v).find('.pinch-zoom')[0].clientHeight,$(v).find('.paperMap')[0].clientHeight);
|
||||
console.log('[[[[[', $(v).find('.pinch-zoom')[0].clientHeight, $(v).find('.paperMap')[0].clientHeight)
|
||||
}
|
||||
$(v).find('.paperMap').attr('src', $(v).find('.paperMap')[0].src)
|
||||
}
|
||||
})
|
||||
/**
|
||||
* stops window loading
|
||||
* code for Firefox, Chrome, Opera, Safari
|
||||
*/
|
||||
//window.stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//判断图片是否加载完成
|
||||
function ImgLoad(imgsys, id) {
|
||||
console.log('加载:', imgsys, imgsys.attr('id'))
|
||||
let img = imgsys;
|
||||
let imgId = imgsys.attr('id');
|
||||
if (img && img.length != 0) {
|
||||
console.log('加载完成之后:', img, $("img#" + imgId).parent('.pinch-zoom'));
|
||||
|
||||
let transform2d = "scale(" + img[0].naturalWidth / img.context.clientWidth + ", " + img[0].naturalHeight / img.context.clientHeight + ") " + "translate(0px, 0px) !important";
|
||||
$("img#" + imgId).parent('.pinch-zoom').css({
|
||||
"-webkit-transform": transform2d,
|
||||
"-o-transform": transform2d,
|
||||
"-ms-transform": transform2d,
|
||||
"-moz-transform": transform2d,
|
||||
transform: transform2d
|
||||
});
|
||||
} else {
|
||||
setTimeout(function () { ImgLoad() }, 300);
|
||||
}
|
||||
}
|
||||
|
||||
//动态显示页面title信息,动态的改变地址栏当前版面地址
|
||||
function autoChangeTitle(isinit) {
|
||||
var pageId = $('.swiper-wrapper .swiper-slide-active img.paperMap').attr('usemap').replace("#PagetupMap", "");
|
||||
var PageName = $($(".listWrap a[href='node_" + pageId + ".htm']")[0]).html();
|
||||
$('.headNum').html(PageName.split(" ")[0] + ":");
|
||||
$('.headTitle').html(PageName.split(" ")[1]);
|
||||
if (PageName === undefined) {
|
||||
PageName = $('.swiper-wrapper .swiper-slide-active img.paperMap').attr("pagename");
|
||||
if (PageName === undefined || PageName === "") {
|
||||
var activeIndex = $('.swiper-wrapper .swiper-slide-active').index();
|
||||
var insertIndex = (getNodeIndex() + activeIndex) % ($('.layoutStyleTwo .listWrap a').length);
|
||||
PageName = $($(".listWrap a")[insertIndex]).html();
|
||||
//$($(".listWrap a")[insertIndex]).attr("href", "node_1.htm?curr=" + insertIndex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
PageNameTab = PageName.replace(" " + PageName.split(" ")[1], "");
|
||||
var pageTitle = PageNameTab + "版-" + $('title').html().split("-")[1];
|
||||
}
|
||||
|
||||
// $('.layoutBtn').html(PageName)
|
||||
$('.headNum').html(PageName.split(" ")[0] + ":");
|
||||
$('.headTitle').html(PageName.split(" ")[1]);
|
||||
//$('title').html(pageTitle);
|
||||
|
||||
//切换当前目录
|
||||
$('.articleList .listWrap .item').removeClass('itemActive');
|
||||
$($(".articleList .listWrap div[node='node_" + pageId + ".htm']")[0]).toggleClass("itemActive");
|
||||
|
||||
//动态的改变地址栏当前版面地址
|
||||
if (!isinit) {
|
||||
var url = window.location.href;
|
||||
var index = url.lastIndexOf('/');
|
||||
var key = $('.swiper-wrapper .swiper-slide-active').index();
|
||||
var re = new RegExp("([?&])curr=.*?(&|$)", "i");
|
||||
var reV = new RegExp("([?])curr=.*?(&|$)", "i");
|
||||
var separator = url.indexOf('?') !== -1 ? "&" : "?";
|
||||
if (url.match(re)) {
|
||||
let currUrl = url.match(reV) ? url.replace(re, "?curr=" + key) : url.replace(re, "&curr=" + key);
|
||||
history.replaceState(null, 'v', currUrl.substring(index + 1, currUrl.length));
|
||||
}
|
||||
else {
|
||||
let noCurr = url + separator + "curr=" + key;
|
||||
history.replaceState(null, 'v', noCurr.substring(index + 1, noCurr.length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 日历相关设置
|
||||
//显示日期
|
||||
function showDate() {
|
||||
if (calendarMode == 1) {
|
||||
$('.form_date').datetimepicker('update');
|
||||
$(".form_date").datetimepicker("show");
|
||||
$(".cancelBox").show()
|
||||
} else if (calendarMode == 2) {
|
||||
$("#Datefour").animate({ bottom: "48" }, "normal");
|
||||
}
|
||||
}
|
||||
//隐藏日期
|
||||
function hideDate() {
|
||||
if (calendarMode == 1) {
|
||||
$(".form_date").val(getDate("day"));
|
||||
$(".form_date").datetimepicker("hide");
|
||||
} else if (calendarMode == 2) {
|
||||
$("#Datefour").animate({ bottom: "-100%" }, "normal");
|
||||
}
|
||||
}
|
||||
|
||||
//获取当前页日期
|
||||
function getDate(str) {
|
||||
var activeDate = $('#activeDate').val();
|
||||
console.log('获取当前页日期',activeDate);
|
||||
activeDate = new Date(activeDate);
|
||||
var initYear = activeDate.getFullYear();
|
||||
var initMonth = activeDate.getMonth() + 1;
|
||||
var initDay = activeDate.getDate();
|
||||
// var url = location.href;
|
||||
// var re = /(\d{4})\-(\d{2})\/(\d{2})/;
|
||||
// var r = url.match(re);
|
||||
//精确到日
|
||||
if (str == "day") {
|
||||
var date = initYear + "-" + initMonth + "-" + initDay;
|
||||
//精确到月
|
||||
} else if (str == "month") {
|
||||
var date = initYear + "-" + initMonth;
|
||||
}
|
||||
return date
|
||||
}
|
||||
|
||||
//获取当前月份报纸xml数据
|
||||
function getPaper(date) {
|
||||
console.log(data);
|
||||
var myXmlUrl = `/h5/public/static/data/${date}.json`;
|
||||
//var myXmlUrl = "../../../html5/" + date + "/navi.xml?time=" + Date.parse(new Date());
|
||||
var data = { 'day': [], 'url': [] };
|
||||
$.ajax({
|
||||
url: myXmlUrl,
|
||||
type: 'GET',
|
||||
dataType: 'xml',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
error: function (xml) {
|
||||
},
|
||||
success: function (xml) {
|
||||
var date = new Array();
|
||||
var day = new Array();
|
||||
var url = new Array();
|
||||
$(xml).find("date").each(function () {
|
||||
date.push($(this).text());
|
||||
day.push(parseInt($(this).text().split("-")[2]))
|
||||
});
|
||||
$(xml).find("url").each(function () {
|
||||
url.push($(this).text());
|
||||
});
|
||||
data = { "day": day, "url": url }
|
||||
}
|
||||
});
|
||||
//console.log('获取当前月份报纸xml数据:',date)
|
||||
return data
|
||||
}
|
||||
|
||||
//需要黑色显示的日期数组
|
||||
function displayDate(date) {
|
||||
var data = getPaper(date);
|
||||
var day = 1, count = 0, count2 = 0;
|
||||
$(".datetimepicker-days .day").each(function (i) {
|
||||
if (parseInt($(this).text()) > day) {
|
||||
$(this).html("");
|
||||
count++
|
||||
} else {
|
||||
day = parseInt($(this).text()) + 1;
|
||||
if ((i > 20) && (parseInt($(this).text()) < 14)) {
|
||||
$(this).html("").removeClass("active");
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (count == 7) { $(".datetimepicker-days tr:eq(2)").hide(); }
|
||||
if (count2 >= 7) { $(".datetimepicker-days tr:eq(7)").hide(); }
|
||||
|
||||
$(".datetimepicker-days .day").each(function () {
|
||||
var index = data["day"].indexOf(parseInt($(this).text()))
|
||||
if (index == -1) {
|
||||
//var curDate = date.replace("-","")+appendZero(parseInt($(this).text()));
|
||||
//if (curDate<=20191231){
|
||||
// $(this).attr('url',"");
|
||||
//}else{
|
||||
$(this).addClass('old');
|
||||
$(this).addClass('disabled');
|
||||
//}
|
||||
} else {
|
||||
if (!ifMaxShowDate) {
|
||||
$(this).attr('url', data["url"][index]);
|
||||
} else {
|
||||
var temp = date.split("-");
|
||||
temp = temp[0] + "/" + temp[1] + "/" + parseInt($(this).text());
|
||||
if (DateMaxDiff(2, temp)) {
|
||||
$(this).attr('url', data["url"][index]);
|
||||
} else {
|
||||
$(this).addClass('old');
|
||||
$(this).addClass('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function appendZero(n) {
|
||||
return (("00" + n).substr(("00" + n).length - 2));
|
||||
}
|
||||
|
||||
// 隐藏首页所有的弹层
|
||||
function hideAll() {
|
||||
$('.layoutList').removeClass('active');
|
||||
$('.footerWrap .item .text').removeClass('active')
|
||||
$('.mask').removeClass('active');
|
||||
$('.articleList').removeClass('active');
|
||||
$('.exareBox').removeClass('active')
|
||||
hideDate();
|
||||
$(".cancelBox").hide()
|
||||
}
|
||||
|
||||
//检查链接是否有效
|
||||
function checkUrl(url) {
|
||||
isUseful = false;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
async: false,
|
||||
success: function (xml) {
|
||||
isUseful = true;
|
||||
}
|
||||
});
|
||||
return isUseful
|
||||
}
|
||||
|
||||
//取版面的ID
|
||||
function getCaption(obj) {
|
||||
var date=$("#activeDate").val();
|
||||
var index=$("#dataIndex").val();
|
||||
var yearMonth = date.slice(0, 7);
|
||||
//var index = obj.lastIndexOf("p");
|
||||
//obj = obj.substring(index + 1, obj.length);
|
||||
// console.log(obj);
|
||||
return `date=${date}&year_month=${yearMonth}&index=${index}`;
|
||||
}
|
||||
|
||||
//下载弹层
|
||||
function synthBox() {
|
||||
var imgUrl = $('.swiper-wrapper .swiper-slide-active img').attr('src') + '?=v1';
|
||||
var date = window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("-", "年").replace("/", "月") + '日'; //日期
|
||||
var week = getWeek(window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("/", "-")); //星期
|
||||
// var html = '<div class="closeBtn"><i></i></div>' +
|
||||
// '<div id="synthWrap">' +// <!-- 下载内容html -->
|
||||
// '<img src = ' + imgUrl + ' class="synthPaper" alt=""/>' +
|
||||
// '<div class="imgBottom"></div>' +
|
||||
// '<div class="footer">' +
|
||||
// '<div class="left"><img src="../../../image20/logo.png" alt=""/></div>' +
|
||||
// '<div class="center">' +
|
||||
// window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("-", ".").replace("/", ".") +
|
||||
// ' ' +
|
||||
// getWeek(window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("/", "-")) + '</div>' +
|
||||
// '<div class="right" id="qrcode"></div>' +
|
||||
// '</div>' +
|
||||
// '</div>' +
|
||||
// '<div class="tipsBtn"></div>' +//<!-- 保存提示按钮 -->
|
||||
// '<div id="synthImg"><img src="" alt=""/></div>' +//<!-- 合成的图片 -->
|
||||
// '<div class="synthmask"><img src="../../../image20/loading.gif" alt=""/></div>';//<!-- 加载中的蒙层 -->
|
||||
var html = `
|
||||
<div class="closeBtn"><i></i></div>
|
||||
<div id="synthWrap">
|
||||
<div class="synthHead">
|
||||
<img src="../../../image20/logoSmall.png" alt=""/>
|
||||
<div>${date} ${week}</div>
|
||||
</div>
|
||||
<img src = '${imgUrl}' class="synthPaper" alt=""/>
|
||||
<div class="footer">
|
||||
<div class="left">
|
||||
<img src="../../../image20/logoBig.png" alt=""/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="text">
|
||||
<div>识别二维码</div>
|
||||
<div>查看该版内容</div>
|
||||
</div>
|
||||
<div class="qr">
|
||||
<img src="" id="qcImg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="synthImg"><img src="" alt=""/></div>
|
||||
<div class="saveTipsBtn">点击图片,长按分享给好友</div>
|
||||
<div class="synthmask"><img src="/public/static/loading.gif" alt=""/></div>
|
||||
<div id="qrcode" style="visibility:hidden;"></div>
|
||||
`
|
||||
$('.synthPage').append(html);
|
||||
var url = window.location.href;
|
||||
var index = url.substring(0, url.lastIndexOf('/') + 1);
|
||||
console.log(index + '?' + getCaption())
|
||||
$('body').find('#qrcode').qrcode({
|
||||
render: 'canvas',
|
||||
width: 180,
|
||||
height: 180,
|
||||
// margin: '0 auto',
|
||||
text: index + '?' + getCaption()
|
||||
});
|
||||
document.getElementById('qcImg').src = document.querySelector('canvas').toDataURL("image/webp");
|
||||
synthesisImgLoad();
|
||||
|
||||
$('.tipsBtn').unbind("touchstart");
|
||||
$('.tipsBtn').unbind("touchend");
|
||||
$('.tipsBtn').bind("touchstart", function () {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('.tipsBtn').bind("touchend", function () {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
//判断图片是否加载完成
|
||||
function synthesisImgLoad() {
|
||||
var img = $('.synthPage .synthPaper');
|
||||
if (img && img.length != 0) {
|
||||
if (img[0].complete) {
|
||||
var synBoxH = $('#synthWrap').height();
|
||||
var imgH = $('#synthWrap').height() - 100;
|
||||
$('#synthWrap>img.synthPaper').css('max-height', imgH + 'px');
|
||||
$('#qrcode').hide()
|
||||
synthesisImg();
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoad() }, 300);
|
||||
}
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoad() }, 300);
|
||||
}
|
||||
}
|
||||
//生成图片
|
||||
function synthesisImg() {
|
||||
//clearInterval(synthesisImgLoad)
|
||||
var canvas = document.createElement('canvas') // 创建一个canvas节点
|
||||
var shareContent = document.getElementById('synthWrap') // 需要截图的包裹的(原生的)DOM 对象
|
||||
var width = shareContent.offsetWidth // 获取dom 宽度
|
||||
var height = shareContent.offsetHeight // 获取dom 高度
|
||||
var scale = 2 // 定义任意放大倍数 支持小数
|
||||
canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale
|
||||
var rect = shareContent.getBoundingClientRect() // 获取元素相对于视口的
|
||||
html2canvas(document.getElementById('synthWrap'), {
|
||||
x: rect.left, // 绘制的dom元素相对于视口的位置
|
||||
y: rect.top,
|
||||
width: width, // dom 原始宽度
|
||||
height: height,
|
||||
windowWidth: document.body.scrollWidth,
|
||||
windowHeight: document.body.scrollHeight,
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
useCORS: true, // 开启跨域
|
||||
dpi: window.devicePixelRatio * 2,
|
||||
scale: scale, // 添加的scale 参数
|
||||
}).then((canvas) => {
|
||||
var context = canvas.getContext('2d')
|
||||
//关闭抗锯齿
|
||||
context.mozImageSmoothingEnabled = false
|
||||
context.msImageSmoothingEnabled = false
|
||||
context.imageSmoothingEnabled = false
|
||||
$('#synthImg img').attr('src', canvas.toDataURL());
|
||||
$('#synthWrap').hide();
|
||||
$('#synthImg').show();
|
||||
$('.synthPage .synthmask').hide();
|
||||
})
|
||||
}
|
||||
|
||||
//星期日期计算
|
||||
function getWeek(timedat) { //timedat参数格式: "2018-09-11"
|
||||
let t = new Date(timedat);
|
||||
let week;
|
||||
if (t.getDay() === 0) week = "星期日";
|
||||
if (t.getDay() === 1) week = "星期一";
|
||||
if (t.getDay() === 2) week = "星期二";
|
||||
if (t.getDay() === 3) week = "星期三";
|
||||
if (t.getDay() === 4) week = "星期四";
|
||||
if (t.getDay() === 5) week = "星期五";
|
||||
if (t.getDay() === 6) week = "星期六";
|
||||
return week;
|
||||
};
|
||||
|
||||
//判断当前时间和报纸刊期之间的时间差。 如在MaxshowData天内,返回true,否则返回false
|
||||
// type=1,忽略dtStartStr,日期根据浏览器地址获取;type=2,根据前一个参数,格式(YYYY/MM/DD)
|
||||
function DateMaxDiff(type, dtStartStr) {
|
||||
if (!ifMaxShowDate) { return true; }
|
||||
var maxinterval = MaxshowData;//允许看的天数
|
||||
var re = /(\d{4})-(\d{2})\/(\d{2})/i;
|
||||
var sUrl = location.href;
|
||||
var r = sUrl.match(re);
|
||||
var dtEnd = new Date();
|
||||
var dtStart;
|
||||
if (type == 1) {
|
||||
if (r) {
|
||||
dtStart = new Date(r[1] + "/" + r[2] + "/" + r[3]);
|
||||
} else {
|
||||
dtStart = new Date();
|
||||
}
|
||||
} else if (type == 2) {
|
||||
dtStart = new Date(dtStartStr);
|
||||
if (isNaN(dtStart)) dtStart = new Date();
|
||||
}
|
||||
|
||||
var date3 = dtEnd.getTime() - dtStart.getTime(); //时间差的毫秒数
|
||||
var days = Math.floor(date3 / (24 * 3600 * 1000));//计算出相差天数
|
||||
if ((days) >= maxinterval) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//日历牌替换====================
|
||||
function initYearList() {//加载年份
|
||||
var html = "";
|
||||
html += " <div id='Datefour'>";
|
||||
html += " <div class='year'>";
|
||||
html += " <a href='#' class='prev'></a>";
|
||||
html += " <p id='paperYear'></p>";
|
||||
html += " <a href='#' class='next'></a>";
|
||||
html += " </div>";
|
||||
html += " <ul class='clearfix'>";
|
||||
html += " </ul>";
|
||||
html += " </div>";
|
||||
$("body").append(html);
|
||||
|
||||
var url = location.href;
|
||||
var re = /\/(\d{4})-(\d{2})\/(\d{2})\/node_(\d+).htm/im;
|
||||
var r = url.match(re);
|
||||
getYearList(r[1], r[1] + "-" + r[2] + "-" + r[3]);//按年份显示导航
|
||||
|
||||
}
|
||||
|
||||
//获取当前月份报纸xml数据
|
||||
function getYearList(year, curDate) {//按年份显示导航
|
||||
$("#Datefour p").html("<span onclick=\"showYearList(" + year + ",'" + curDate + "');\"><img src='../../../image20/calenderSmall.png' border=0 />" + year + "年</span>");//显示年份
|
||||
var myXmlUrl = "../../../paperXml/yearList.js?time=" + new Date().getTime();
|
||||
var curIndex = -1, css = "", len, perYear = 0, nextYear = 0;
|
||||
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
//解析列表
|
||||
$.each(json, function (i, item) {
|
||||
if (item.active == 1) {
|
||||
if (year == item.yearNo) { curIndex = i; }
|
||||
if (curIndex == -1) { perYear = item.yearNo; }
|
||||
if (curIndex + 1 == i) { nextYear = item.yearNo; }
|
||||
}
|
||||
});
|
||||
|
||||
len = json.length - 1;
|
||||
// 往左事件
|
||||
if (perYear > 0) {
|
||||
//$("#Datefour .prev span").css("color","#04C");//年份左导航箭头颜色
|
||||
$("#Datefour .prev").css("background-image", "url('../../../image20/left-1.png')");
|
||||
$("#Datefour .prev").attr("href", "javascript:getYearList(" + perYear + ",'" + curDate + "')");//年份左导航箭头颜
|
||||
} else {
|
||||
//$("#Datefour .prev span").css("color","#eee");//年份左导航箭头颜
|
||||
$("#Datefour .prev").css("background-image", "url('../../../image20/left-2.png')");
|
||||
$("#Datefour .prev").attr("href", "javascript:void();");//年份左导航箭头颜
|
||||
}
|
||||
// 往右事件
|
||||
if (len != curIndex) {
|
||||
$//("#Datefour .next span").css("color","#04C");//年份左导航箭头颜色
|
||||
$("#Datefour .next").css("background-image", "url('../../../image20/right-1.png')");
|
||||
$("#Datefour .next").attr("href", "javascript:getYearList(" + nextYear + ",'" + curDate + "')");//年份左导航箭头颜
|
||||
} else {
|
||||
//$("#Datefour .next span").css("color","#eee");//年份左导航箭头颜
|
||||
$("#Datefour .next").css("background-image", "url('../../../image20/right-2.png')");
|
||||
$("#Datefour .next").attr("href", "javascript:void();");//年份左导航箭头颜
|
||||
}
|
||||
});
|
||||
getDateList(year, curDate);//按当前页面年份加载对应期次数据
|
||||
}
|
||||
|
||||
|
||||
function showYearList(perYear, curDate) {//显示年份列表
|
||||
var myXmlUrl = "../../../paperXml/yearList.js?time=" + new Date().getTime();
|
||||
$('#Datefour ul').empty();
|
||||
$(".prev,.next").hide();
|
||||
|
||||
var liCss;
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
$.each(json, function (i, item) {
|
||||
if (item.active == 1) {
|
||||
liCss = " style='color:#000;'";
|
||||
$('#Datefour ul').append("<li style='width:25%'><a href=\"javascript:getYearList(" + item.yearNo + ",'" + curDate + "');\"" + liCss + " >" + item.yearNo + "年</a></li>");
|
||||
} else {
|
||||
liCss = " style='color:gray;'";
|
||||
$('#Datefour ul').append("<li style='width:25%'><a href='javascript:void(0);'" + liCss + " >" + item.yearNo + "年</a></li>");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getDateList(year, curDate) {//按当前页面年份加载对应期次数据
|
||||
var myXmlUrl = "../../../paperXml/" + year + "_paperList.js";
|
||||
var xmlDate, paperUrl, liCss;
|
||||
$('#Datefour ul').empty();
|
||||
$(".prev,.next").show();
|
||||
|
||||
var xmlDate, paperUrl, liCss;
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
$.each(json, function (i, item) {
|
||||
xmlDate = item.date;
|
||||
paperUrl = "../../" + xmlDate.split("-")[0] + "-" + xmlDate.split("-")[1] + "/" + xmlDate.split("-")[2] + "/node_1.htm";
|
||||
liCss = " style='" + (item.active == 1 ? "background-color:#eee;" : "") + (curDate == item.date ? "color:#F00;" : "") + "'";
|
||||
//console.log(liCss);
|
||||
$('#Datefour ul').append("<li><a href='" + paperUrl + "' " + liCss + " >" + item.name + "</a></li>");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//获取url中"?"符后的字串
|
||||
function getURLParams() {
|
||||
var index = sessionStorage.getItem("index");
|
||||
return index?index:0;
|
||||
// let url = decodeURI(window.location.href); //获取url中"?"符后的字串
|
||||
// let theRequest = {};
|
||||
// if (url.lastIndexOf("?") !== -1) {
|
||||
// let str = url.substr(url.lastIndexOf("?") + 1);
|
||||
// //let str = substr(url,instr(url,"?",-1)+1);
|
||||
// let strs = str.split("&");
|
||||
// for (var i = 0; i < strs.length; i++) {
|
||||
// theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
// }
|
||||
// }
|
||||
// return theRequest;
|
||||
};
|
4
public/static/js/jquery.min.js
vendored
Normal file
3
public/static/js/jquery.mobile.custom.min.js
vendored
Normal file
28
public/static/js/jquery.qrcode.min.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
|
||||
write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
|
||||
for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
|
||||
7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
|
||||
0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
|
||||
setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
|
||||
j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
|
||||
b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
|
||||
c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
|
||||
0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
|
||||
(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
|
||||
78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
|
||||
j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
|
||||
a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
|
||||
a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
|
||||
2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
|
||||
LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
|
||||
this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
|
||||
[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
|
||||
116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
|
||||
43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
|
||||
3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
|
||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{table:"canvas",width:256,height:256,typeNumber:-1,
|
||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery);
|
1
public/static/js/jquery.rwdImageMaps.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function($){$.fn.rwdImageMaps=function(){var $img=this;var rwdImageMap=function(){$img.each(function(){if(typeof($(this).attr("usemap"))=="undefined"){return}var that=this,$that=$(that);$("<img />").load(function(){var temp=new Image();temp.src=$that.attr("src");var w1=temp.width;var w2=$that.width();var map=$that.attr("usemap").replace("#",""),c="coords";$('map[name="'+map+'"]').find("area").each(function(){var $this=$(this);if(!$this.data(c)){$this.data(c,$this.attr(c))}var coords=$this.data(c).split(","),coordsPercent=new Array(coords.length);for(var i=0;i<coordsPercent.length;++i){coordsPercent[i]=parseInt((coords[i]/w1)*w2)}$this.attr(c,coordsPercent.toString())})}).attr("src",$that.attr("src"))})};$(window).resize(rwdImageMap).trigger("resize");return this}})(jQuery);
|
1
public/static/js/jweixin-1.4.0.js
Normal file
642
public/static/js/navi.js
Normal file
@ -0,0 +1,642 @@
|
||||
document.write("<script src='../../../js20/qfstatH5.js'></script>");
|
||||
document.write("<script src='../../../js20/poster/posterShare.js'></script>");
|
||||
|
||||
// 以下参数根据需求进行配置
|
||||
var BMListModeType = 2; // 版面列表显示类型。1:左侧弹出 2:居中显示
|
||||
var calendarMode = 1; //1:传统日历 2:列表日历需要配合自定义json日历数据
|
||||
var ifMaxShowDate = false;//是否开启过滤日期(开启:true,关闭:false)
|
||||
var MaxshowData = 10; //最多能看7天
|
||||
var pageDirection = "horizontal"; // 版面图滑动 horizontal横向滚动,vertical竖向滚动
|
||||
var layoutStyle = "festival" //版面图样式 routine:常规, festival:节日,solemn:庄严
|
||||
var HaiBaoType = "multi"; //single:单版模板 multi:多版模式,多版面时:需要加载:document.write("<script src='../../../js20/poster/posterShare.js'></script>"); @import url("../js20/poster/posterShare.css");
|
||||
|
||||
// 主程序
|
||||
|
||||
var month = getDate("month");//获取当前月份
|
||||
|
||||
$(function () {
|
||||
|
||||
$('body').css('opacity',1);
|
||||
|
||||
if (!DateMaxDiff(1)) {
|
||||
alert("对不起,只能查看最新七天数据!");
|
||||
location.href = "../../../paperindex.htm";
|
||||
return;
|
||||
}
|
||||
|
||||
// 模式2初始化年份日历
|
||||
if (calendarMode == 2) {
|
||||
initYearList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//日历实例化
|
||||
$('.form_date').datetimepicker({
|
||||
pickerPosition: "top-right",
|
||||
bootcssVer: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
language: "zh-CN",
|
||||
weekStart: 1,
|
||||
autoclose: 1,
|
||||
startView: 2,
|
||||
minView: 2,
|
||||
forceParse: 0,
|
||||
viewSelect: "month",
|
||||
initialDate: getDate("day"),
|
||||
}).on("show", function (ev) {
|
||||
console.log(month);
|
||||
displayDate(month);
|
||||
//$(".datetimepicker-days th.switch").addClass("disabled");
|
||||
}).on('changeDate', function (ev) {
|
||||
var date = new Date(ev.date.valueOf());
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
month = month < 10 ? ("0" + month) : month;
|
||||
var day = date.getDate();
|
||||
day = day < 10 ? ("0" + day) : day;
|
||||
var url = "#";
|
||||
|
||||
//var curDate = year+""+appendZero(month)+""+appendZero(day);
|
||||
//if (curDate<=20191231){
|
||||
// location.href = "https://epaper.guanhai.com.cn/qdrb/"+curDate;
|
||||
//}
|
||||
var isUseful = checkUrl(url);
|
||||
if (isUseful) {
|
||||
location.href = url;
|
||||
}
|
||||
hideAll();
|
||||
//$('.mask').removeClass('active');
|
||||
});
|
||||
//导航栏日期显示
|
||||
// $('body .datetimeBtn').text(getDate("day"));
|
||||
// 底部按钮切换
|
||||
$('.footerWrap').on('click', '.item', function () {
|
||||
//$(this).toggleClass('active');
|
||||
//$(this).parent('.item').siblings('.item').find('.text').removeClass('active');
|
||||
$('.mask').toggleClass('active');
|
||||
// 版面列表显示
|
||||
var btn=$(this).children()[1];
|
||||
|
||||
if (btn.classList.contains('layoutBtn')) {
|
||||
if (BMListModeType == 1) {
|
||||
$('.layoutStyleOne').toggleClass('active');
|
||||
} else if (BMListModeType == 2) {
|
||||
$('.layoutStyleTwo').toggleClass('active');
|
||||
$(".cancelBox").show()
|
||||
}
|
||||
}
|
||||
// 版面文章目录显示
|
||||
if (btn.classList.contains('articleBtn')) {
|
||||
$('.articleList').toggleClass('active');
|
||||
$(".cancelBox").show();
|
||||
}
|
||||
//日历显示
|
||||
if (btn.classList.contains('datetimeBtn')) {
|
||||
showDate();
|
||||
}
|
||||
// 跳转下载页面
|
||||
if (btn.classList.contains('synthesis')) {
|
||||
// window.location.href='synthesis.html';
|
||||
// $('.mask').removeClass('active');
|
||||
$('.synthPage').addClass('active');
|
||||
synthBox();
|
||||
}
|
||||
|
||||
//更多显示的弹层
|
||||
if (btn.classList.contains('more')) {
|
||||
$(this).siblings('.exareBox').toggleClass('active');
|
||||
}
|
||||
})
|
||||
|
||||
// 点击遮罩
|
||||
$('.mask').on('click', function () {
|
||||
hideAll();
|
||||
})
|
||||
|
||||
// 点击取消按钮
|
||||
$('.cancelBox').on('click', function () {
|
||||
hideAll();
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
//监听切换月份
|
||||
var i = 0;
|
||||
$(".datetimepicker-days tbody").bind("DOMNodeInserted", function () {
|
||||
if (i == 5) {
|
||||
var date = $(".datetimepicker-days thead th.switch").text().split(" ");
|
||||
console.log('2222222222222222',date)
|
||||
switch (date[0]) {
|
||||
case "一月":
|
||||
month = date[1] + "-01";
|
||||
break;
|
||||
case "二月":
|
||||
month = date[1] + "-02";
|
||||
break;
|
||||
case "三月":
|
||||
month = date[1] + "-03";
|
||||
break;
|
||||
case "四月":
|
||||
month = date[1] + "-04";
|
||||
break;
|
||||
case "五月":
|
||||
month = date[1] + "-05";
|
||||
break;
|
||||
case "六月":
|
||||
month = date[1] + "-06";
|
||||
break;
|
||||
case "七月":
|
||||
month = date[1] + "-07";
|
||||
break;
|
||||
case "八月":
|
||||
month = date[1] + "-08";
|
||||
break;
|
||||
case "九月":
|
||||
month = date[1] + "-09";
|
||||
break;
|
||||
case "十月":
|
||||
month = date[1] + "-10";
|
||||
break;
|
||||
case "十一月":
|
||||
month = date[1] + "-11";
|
||||
break;
|
||||
case "十二月":
|
||||
month = date[1] + "-12";
|
||||
break;
|
||||
}
|
||||
console.log('111111111111',month)
|
||||
displayDate(month);
|
||||
i = -1;
|
||||
}
|
||||
i++;
|
||||
});
|
||||
|
||||
//点击分享按钮
|
||||
$('.synthesis').on('click', function () {
|
||||
if(HaiBaoType=="single"){//单版分享
|
||||
$('.mask').toggleClass('active');
|
||||
$('.synthPage').addClass('active');
|
||||
synthBox();
|
||||
}else if (HaiBaoType=="multi"){ //多版分享
|
||||
var poster = POSTER('paperImg').show('');
|
||||
}
|
||||
});
|
||||
|
||||
//关闭下载图片的弹层
|
||||
$('.synthPage').on('click', '.closeBtn', function () {
|
||||
$('.synthPage').html('');
|
||||
$('.synthPage,.mask,.synthesis').removeClass('active');
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
// 日历相关设置
|
||||
//显示日期
|
||||
function showDate() {
|
||||
if (calendarMode == 1) {
|
||||
$('.form_date').datetimepicker('update');
|
||||
$(".form_date").datetimepicker("show");
|
||||
$(".cancelBox").show()
|
||||
} else if (calendarMode == 2) {
|
||||
$("#Datefour").animate({ bottom: "48" }, "normal");
|
||||
}
|
||||
}
|
||||
//隐藏日期
|
||||
function hideDate() {
|
||||
if (calendarMode == 1) {
|
||||
$(".form_date").val(getDate("day"));
|
||||
$(".form_date").datetimepicker("hide");
|
||||
} else if (calendarMode == 2) {
|
||||
$("#Datefour").animate({ bottom: "-100%" }, "normal");
|
||||
}
|
||||
}
|
||||
|
||||
//获取当前页日期
|
||||
function getDate(str) {
|
||||
var activeDate = $('#activeDate').val();
|
||||
console.log(activeDate);
|
||||
activeDate = new Date(activeDate);
|
||||
|
||||
var initYear = activeDate.getFullYear();
|
||||
var initMonth = activeDate.getMonth() + 1;
|
||||
var initDay = activeDate.getDate();
|
||||
|
||||
// var url = location.href;
|
||||
// var re = /(\d{4})\-(\d{2})\/(\d{2})/;
|
||||
// var r = url.match(re);
|
||||
//精确到日
|
||||
if (str == "day") {
|
||||
var date = initYear + "-" + initMonth + "-" + initDay;
|
||||
//精确到月
|
||||
} else if (str == "month") {
|
||||
var date = initYear + "-" + initMonth;
|
||||
}
|
||||
console.log(date);
|
||||
return date
|
||||
}
|
||||
|
||||
//获取当前月份报纸xml数据
|
||||
function getPaper(date) {
|
||||
var myXmlUrl = `/public/static/data/${date}.json`;
|
||||
var data = { 'day': [], 'url': [] };
|
||||
$.ajax({
|
||||
url: myXmlUrl,
|
||||
type: 'GET',
|
||||
dataType: 'xml',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
error: function (xml) {
|
||||
},
|
||||
success: function (xml) {
|
||||
var date = new Array();
|
||||
var day = new Array();
|
||||
var url = new Array();
|
||||
$(xml).find("date").each(function () {
|
||||
date.push($(this).text());
|
||||
day.push(parseInt($(this).text().split("-")[2]))
|
||||
});
|
||||
$(xml).find("url").each(function () {
|
||||
url.push($(this).text());
|
||||
});
|
||||
data = { "day": day, "url": url }
|
||||
}
|
||||
});
|
||||
//console.log('获取当前月份报纸xml数据:',date)
|
||||
return data
|
||||
}
|
||||
|
||||
//需要黑色显示的日期数组
|
||||
function displayDate(date) {
|
||||
console.log('需要黑色显示的日期数组:',date)
|
||||
var data = getPaper(date);
|
||||
var day = 1, count = 0, count2 = 0;
|
||||
$(".datetimepicker-days .day").each(function (i) {
|
||||
if (parseInt($(this).text()) > day) {
|
||||
$(this).html("");
|
||||
count++
|
||||
} else {
|
||||
day = parseInt($(this).text()) + 1;
|
||||
if ((i > 20) && (parseInt($(this).text()) < 14)) {
|
||||
$(this).html("").removeClass("active");
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (count == 7) { $(".datetimepicker-days tr:eq(2)").hide(); }
|
||||
if (count2 >= 7) { $(".datetimepicker-days tr:eq(7)").hide(); }
|
||||
|
||||
$(".datetimepicker-days .day").each(function () {
|
||||
var index = data["day"].indexOf(parseInt($(this).text()))
|
||||
if (index == -1) {
|
||||
//var curDate = date.replace("-","")+appendZero(parseInt($(this).text()));
|
||||
//if (curDate<=20191231){
|
||||
// $(this).attr('url',"");
|
||||
//}else{
|
||||
$(this).addClass('old');
|
||||
$(this).addClass('disabled');
|
||||
//}
|
||||
} else {
|
||||
if (!ifMaxShowDate) {
|
||||
$(this).attr('url', data["url"][index]);
|
||||
} else {
|
||||
var temp = date.split("-");
|
||||
temp = temp[0] + "/" + temp[1] + "/" + parseInt($(this).text());
|
||||
if (DateMaxDiff(2, temp)) {
|
||||
$(this).attr('url', data["url"][index]);
|
||||
} else {
|
||||
$(this).addClass('old');
|
||||
$(this).addClass('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function appendZero(n) {
|
||||
return (("00" + n).substr(("00" + n).length - 2));
|
||||
}
|
||||
|
||||
// 隐藏首页所有的弹层
|
||||
function hideAll() {
|
||||
$('.layoutList').removeClass('active');
|
||||
$('.footerWrap .item .text').removeClass('active')
|
||||
$('.mask').removeClass('active');
|
||||
$('.articleList').removeClass('active');
|
||||
$('.exareBox').removeClass('active')
|
||||
hideDate();
|
||||
$(".cancelBox").hide()
|
||||
}
|
||||
|
||||
//检查链接是否有效
|
||||
function checkUrl(url) {
|
||||
isUseful = false;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
async: false,
|
||||
success: function (xml) {
|
||||
isUseful = true;
|
||||
}
|
||||
});
|
||||
return isUseful
|
||||
}
|
||||
|
||||
//取版面的ID
|
||||
function getCaption(obj) {
|
||||
var index = obj.lastIndexOf("_");
|
||||
obj = obj.substring(index + 1, obj.length);
|
||||
obj=obj?obj.split('.')[0]:''
|
||||
// console.log(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
//下载弹层
|
||||
function synthBox() {
|
||||
var imgUrl = $('.thumbnail-left-left a img').attr('src') + '?=v1';
|
||||
var date = window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("-", "年").replace("/", "月") + '日'; //日期
|
||||
var week = getWeek(window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("/", "-")); //星期
|
||||
// var html = '<div class="closeBtn"><i></i></div>' +
|
||||
// '<div id="synthWrap">' +// <!-- 下载内容html -->
|
||||
// '<img src = ' + imgUrl + ' class="synthPaper" alt=""/>' +
|
||||
// '<div class="imgBottom"></div>' +
|
||||
// '<div class="footer">' +
|
||||
// '<div class="left"><img src="../../../image20/logo.png" alt=""/></div>' +
|
||||
// '<div class="center">' +
|
||||
// window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("-", ".").replace("/", ".") +
|
||||
// ' ' +
|
||||
// getWeek(window.location.href.match(/(\d{4})-(\d{2})\/(\d{2})/im)[0].replace("/", "-")) + '</div>' +
|
||||
// '<div class="right" id="qrcode"></div>' +
|
||||
// '</div>' +
|
||||
// '</div>' +
|
||||
// '<div class="tipsBtn"></div>' +//<!-- 保存提示按钮 -->
|
||||
// '<div id="synthImg"><img src="" alt=""/></div>' +//<!-- 合成的图片 -->
|
||||
// '<div class="synthmask"><img src="../../../image20/loading.gif" alt=""/></div>';//<!-- 加载中的蒙层 -->
|
||||
var html = `
|
||||
<div class="closeBtn"><i></i></div>
|
||||
<div id="synthWrap">
|
||||
<div class="synthHead">
|
||||
<img src="../../../image20/logoSmall.png" alt=""/>
|
||||
<div>${date} ${week}</div>
|
||||
</div>
|
||||
<img src = '${imgUrl}' class="synthPaper" alt=""/>
|
||||
<div class="footer">
|
||||
<div class="left">
|
||||
<img src="../../../image20/logoBig.png" alt=""/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="text">
|
||||
<div>识别二维码</div>
|
||||
<div>查看该版内容</div>
|
||||
</div>
|
||||
<div class="qr">
|
||||
<img src="" id="qcImg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="synthImg"><img src="" alt=""/></div>
|
||||
<div class="saveTipsBtn">点击图片,长按分享给好友</div>
|
||||
<div class="synthmask"><img src="../../../image20/loading.gif" alt=""/></div>
|
||||
<div id="qrcode" style="visibility:hidden;"></div>
|
||||
`
|
||||
$('.synthPage').append(html);
|
||||
var url = window.location.href;
|
||||
var index = url.substring(0, url.lastIndexOf('/') + 1);
|
||||
$('body').find('#qrcode').qrcode({
|
||||
render: 'canvas',
|
||||
width: 180,
|
||||
height: 180,
|
||||
// margin: '0 auto',
|
||||
text: url
|
||||
});
|
||||
document.getElementById('qcImg').src = document.querySelector('canvas').toDataURL("image/webp");
|
||||
synthesisImgLoad();
|
||||
|
||||
$('.tipsBtn').unbind("touchstart");
|
||||
$('.tipsBtn').unbind("touchend");
|
||||
$('.tipsBtn').bind("touchstart", function () {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('.tipsBtn').bind("touchend", function () {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
//判断图片是否加载完成
|
||||
function synthesisImgLoad() {
|
||||
var img = $('.synthPage .synthPaper');
|
||||
if (img && img.length != 0) {
|
||||
if (img[0].complete) {
|
||||
var synBoxH = $('#synthWrap').height();
|
||||
var imgH = $('#synthWrap').height() - 100;
|
||||
$('#synthWrap>img.synthPaper').css('max-height', imgH + 'px');
|
||||
$('#qrcode').hide()
|
||||
synthesisImg();
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoad() }, 300);
|
||||
}
|
||||
} else {
|
||||
setTimeout(function () { synthesisImgLoad() }, 300);
|
||||
}
|
||||
}
|
||||
//生成图片
|
||||
function synthesisImg() {
|
||||
//clearInterval(synthesisImgLoad)
|
||||
var canvas = document.createElement('canvas') // 创建一个canvas节点
|
||||
var shareContent = document.getElementById('synthWrap') // 需要截图的包裹的(原生的)DOM 对象
|
||||
var width = shareContent.offsetWidth // 获取dom 宽度
|
||||
var height = shareContent.offsetHeight // 获取dom 高度
|
||||
var scale = 2 // 定义任意放大倍数 支持小数
|
||||
canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale
|
||||
var rect = shareContent.getBoundingClientRect() // 获取元素相对于视口的
|
||||
html2canvas(document.getElementById('synthWrap'), {
|
||||
x: rect.left, // 绘制的dom元素相对于视口的位置
|
||||
y: rect.top,
|
||||
width: width, // dom 原始宽度
|
||||
height: height,
|
||||
windowWidth: document.body.scrollWidth,
|
||||
windowHeight: document.body.scrollHeight,
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
useCORS: true, // 开启跨域
|
||||
dpi: window.devicePixelRatio * 2,
|
||||
scale: scale, // 添加的scale 参数
|
||||
}).then((canvas) => {
|
||||
var context = canvas.getContext('2d')
|
||||
//关闭抗锯齿
|
||||
context.mozImageSmoothingEnabled = false
|
||||
context.msImageSmoothingEnabled = false
|
||||
context.imageSmoothingEnabled = false
|
||||
$('#synthImg img').attr('src', canvas.toDataURL());
|
||||
$('#synthWrap').hide();
|
||||
$('#synthImg').show();
|
||||
$('.synthPage .synthmask').hide();
|
||||
})
|
||||
}
|
||||
|
||||
//星期日期计算
|
||||
function getWeek(timedat) { //timedat参数格式: "2018-09-11"
|
||||
let t = new Date(timedat);
|
||||
let week;
|
||||
if (t.getDay() === 0) week = "星期日";
|
||||
if (t.getDay() === 1) week = "星期一";
|
||||
if (t.getDay() === 2) week = "星期二";
|
||||
if (t.getDay() === 3) week = "星期三";
|
||||
if (t.getDay() === 4) week = "星期四";
|
||||
if (t.getDay() === 5) week = "星期五";
|
||||
if (t.getDay() === 6) week = "星期六";
|
||||
return week;
|
||||
};
|
||||
|
||||
//判断当前时间和报纸刊期之间的时间差。 如在MaxshowData天内,返回true,否则返回false
|
||||
// type=1,忽略dtStartStr,日期根据浏览器地址获取;type=2,根据前一个参数,格式(YYYY/MM/DD)
|
||||
function DateMaxDiff(type, dtStartStr) {
|
||||
if (!ifMaxShowDate) { return true; }
|
||||
var maxinterval = MaxshowData;//允许看的天数
|
||||
var re = /(\d{4})-(\d{2})\/(\d{2})/i;
|
||||
var sUrl = location.href;
|
||||
var r = sUrl.match(re);
|
||||
var dtEnd = new Date();
|
||||
var dtStart;
|
||||
if (type == 1) {
|
||||
if (r) {
|
||||
dtStart = new Date(r[1] + "/" + r[2] + "/" + r[3]);
|
||||
} else {
|
||||
dtStart = new Date();
|
||||
}
|
||||
} else if (type == 2) {
|
||||
dtStart = new Date(dtStartStr);
|
||||
if (isNaN(dtStart)) dtStart = new Date();
|
||||
}
|
||||
|
||||
var date3 = dtEnd.getTime() - dtStart.getTime(); //时间差的毫秒数
|
||||
var days = Math.floor(date3 / (24 * 3600 * 1000));//计算出相差天数
|
||||
if ((days) >= maxinterval) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//日历牌替换====================
|
||||
function initYearList() {//加载年份
|
||||
var html = "";
|
||||
html += " <div id='Datefour'>";
|
||||
html += " <div class='year'>";
|
||||
html += " <a href='#' class='prev'></a>";
|
||||
html += " <p id='paperYear'></p>";
|
||||
html += " <a href='#' class='next'></a>";
|
||||
html += " </div>";
|
||||
html += " <ul class='clearfix'>";
|
||||
html += " </ul>";
|
||||
html += " </div>";
|
||||
$("body").append(html);
|
||||
|
||||
var url = location.href;
|
||||
var re = /\/(\d{4})-(\d{2})\/(\d{2})\/node_(\d+).htm/im;
|
||||
var r = url.match(re);
|
||||
getYearList(r[1], r[1] + "-" + r[2] + "-" + r[3]);//按年份显示导航
|
||||
|
||||
}
|
||||
|
||||
//获取当前月份报纸xml数据
|
||||
function getYearList(year, curDate) {//按年份显示导航
|
||||
$("#Datefour p").html("<span onclick=\"showYearList(" + year + ",'" + curDate + "');\"><img src='../../../image20/calenderSmall.png' border=0 />" + year + "年</span>");//显示年份
|
||||
var myXmlUrl = "../../../paperXml/yearList.js?time=" + new Date().getTime();
|
||||
var curIndex = -1, css = "", len, perYear = 0, nextYear = 0;
|
||||
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
//解析列表
|
||||
$.each(json, function (i, item) {
|
||||
if (item.active == 1) {
|
||||
if (year == item.yearNo) { curIndex = i; }
|
||||
if (curIndex == -1) { perYear = item.yearNo; }
|
||||
if (curIndex + 1 == i) { nextYear = item.yearNo; }
|
||||
}
|
||||
});
|
||||
|
||||
len = json.length - 1;
|
||||
// 往左事件
|
||||
if (perYear > 0) {
|
||||
//$("#Datefour .prev span").css("color","#04C");//年份左导航箭头颜色
|
||||
$("#Datefour .prev").css("background-image", "url('../../../image20/left-1.png')");
|
||||
$("#Datefour .prev").attr("href", "javascript:getYearList(" + perYear + ",'" + curDate + "')");//年份左导航箭头颜
|
||||
} else {
|
||||
//$("#Datefour .prev span").css("color","#eee");//年份左导航箭头颜
|
||||
$("#Datefour .prev").css("background-image", "url('../../../image20/left-2.png')");
|
||||
$("#Datefour .prev").attr("href", "javascript:void();");//年份左导航箭头颜
|
||||
}
|
||||
// 往右事件
|
||||
if (len != curIndex) {
|
||||
$//("#Datefour .next span").css("color","#04C");//年份左导航箭头颜色
|
||||
$("#Datefour .next").css("background-image", "url('../../../image20/right-1.png')");
|
||||
$("#Datefour .next").attr("href", "javascript:getYearList(" + nextYear + ",'" + curDate + "')");//年份左导航箭头颜
|
||||
} else {
|
||||
//$("#Datefour .next span").css("color","#eee");//年份左导航箭头颜
|
||||
$("#Datefour .next").css("background-image", "url('../../../image20/right-2.png')");
|
||||
$("#Datefour .next").attr("href", "javascript:void();");//年份左导航箭头颜
|
||||
}
|
||||
});
|
||||
getDateList(year, curDate);//按当前页面年份加载对应期次数据
|
||||
}
|
||||
|
||||
|
||||
function showYearList(perYear, curDate) {//显示年份列表
|
||||
var myXmlUrl = "../../../paperXml/yearList.js?time=" + new Date().getTime();
|
||||
$('#Datefour ul').empty();
|
||||
$(".prev,.next").hide();
|
||||
|
||||
var liCss;
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
$.each(json, function (i, item) {
|
||||
if (item.active == 1) {
|
||||
liCss = " style='color:#000;'";
|
||||
$('#Datefour ul').append("<li style='width:25%'><a href=\"javascript:getYearList(" + item.yearNo + ",'" + curDate + "');\"" + liCss + " >" + item.yearNo + "年</a></li>");
|
||||
} else {
|
||||
liCss = " style='color:gray;'";
|
||||
$('#Datefour ul').append("<li style='width:25%'><a href='javascript:void(0);'" + liCss + " >" + item.yearNo + "年</a></li>");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getDateList(year, curDate) {//按当前页面年份加载对应期次数据
|
||||
var myXmlUrl = "../../../paperXml/" + year + "_paperList.js";
|
||||
var xmlDate, paperUrl, liCss;
|
||||
$('#Datefour ul').empty();
|
||||
$(".prev,.next").show();
|
||||
|
||||
var xmlDate, paperUrl, liCss;
|
||||
$.getJSON(myXmlUrl, function (json) {
|
||||
$.each(json, function (i, item) {
|
||||
xmlDate = item.date;
|
||||
paperUrl = "../../" + xmlDate.split("-")[0] + "-" + xmlDate.split("-")[1] + "/" + xmlDate.split("-")[2] + "/node_1.htm";
|
||||
liCss = " style='" + (item.active == 1 ? "background-color:#eee;" : "") + (curDate == item.date ? "color:#F00;" : "") + "'";
|
||||
//console.log(liCss);
|
||||
$('#Datefour ul').append("<li><a href='" + paperUrl + "' " + liCss + " >" + item.name + "</a></li>");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//获取url中"?"符后的字串
|
||||
function getURLParams() {
|
||||
let url = decodeURI(window.location.href); //获取url中"?"符后的字串
|
||||
let theRequest = {};
|
||||
if (url.lastIndexOf("?") !== -1) {
|
||||
let str = url.substr(url.lastIndexOf("?") + 1);
|
||||
//let str = substr(url,instr(url,"?",-1)+1);
|
||||
let strs = str.split("&");
|
||||
for (var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
};
|
504
public/static/js/pinchzoom.min.js
vendored
Normal file
@ -0,0 +1,504 @@
|
||||
(function() {
|
||||
"use strict";
|
||||
var definePinchZoom = function($) {
|
||||
var PinchZoom = function(el, options) {
|
||||
this.el = $(el);
|
||||
this.zoomFactor = 1;
|
||||
this.lastScale = 1;
|
||||
this.offset = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
this.options = $.extend({}, this.defaults, options);
|
||||
this.setupMarkup();
|
||||
this.bindEvents();
|
||||
this.update();
|
||||
this.enable()
|
||||
},
|
||||
sum = function(a, b) {
|
||||
return a + b
|
||||
},
|
||||
isCloseTo = function(value, expected) {
|
||||
return value > expected - .01 && value < expected + .01
|
||||
};
|
||||
PinchZoom.prototype = {
|
||||
defaults: {
|
||||
tapZoomFactor: 2,
|
||||
zoomOutFactor: 1.3,
|
||||
animationDuration: 300,
|
||||
animationInterval: 5,
|
||||
maxZoom: 4,
|
||||
minZoom: .5,
|
||||
lockDragAxis: false,
|
||||
use2d: true,
|
||||
zoomStartEventName: "pz_zoomstart",
|
||||
zoomEndEventName: "pz_zoomend",
|
||||
dragStartEventName: "pz_dragstart",
|
||||
dragEndEventName: "pz_dragend",
|
||||
doubleTapEventName: "pz_doubletap"
|
||||
},
|
||||
handleDragStart: function(event) {
|
||||
this.el.trigger(this.options.dragStartEventName);
|
||||
this.stopAnimation();
|
||||
this.lastDragPosition = false;
|
||||
this.hasInteraction = true;
|
||||
this.handleDrag(event)
|
||||
},
|
||||
handleDrag: function(event) {
|
||||
if (this.zoomFactor > 1) {
|
||||
var touch = this.getTouches(event)[0];
|
||||
this.drag(touch, this.lastDragPosition);
|
||||
this.offset = this.sanitizeOffset(this.offset);
|
||||
this.lastDragPosition = touch
|
||||
}
|
||||
},
|
||||
handleDragEnd: function() {
|
||||
this.el.trigger(this.options.dragEndEventName);
|
||||
this.end()
|
||||
},
|
||||
handleZoomStart: function(event) {
|
||||
this.el.trigger(this.options.zoomStartEventName);
|
||||
this.stopAnimation();
|
||||
this.lastScale = 1;
|
||||
this.nthZoom = 0;
|
||||
this.lastZoomCenter = false;
|
||||
this.hasInteraction = true
|
||||
},
|
||||
handleZoom: function(event, newScale) {
|
||||
var touchCenter = this.getTouchCenter(this.getTouches(event)),
|
||||
scale = newScale / this.lastScale;
|
||||
this.lastScale = newScale;
|
||||
this.nthZoom += 1;
|
||||
if (this.nthZoom > 3) {
|
||||
this.scale(scale, touchCenter);
|
||||
this.drag(touchCenter, this.lastZoomCenter)
|
||||
}
|
||||
this.lastZoomCenter = touchCenter
|
||||
},
|
||||
handleZoomEnd: function() {
|
||||
this.el.trigger(this.options.zoomEndEventName);
|
||||
this.end()
|
||||
},
|
||||
handleDoubleTap: function(event) {
|
||||
var center = this.getTouches(event)[0],
|
||||
zoomFactor = this.zoomFactor > 1 ? 1 : this.options.tapZoomFactor,
|
||||
startZoomFactor = this.zoomFactor,
|
||||
updateProgress = function(progress) {
|
||||
this.scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center)
|
||||
}.bind(this);
|
||||
if (this.hasInteraction) {
|
||||
return
|
||||
}
|
||||
if (startZoomFactor > zoomFactor) {
|
||||
center = this.getCurrentZoomCenter()
|
||||
}
|
||||
this.animate(this.options.animationDuration, this.options.animationInterval, updateProgress, this.swing);
|
||||
this.el.trigger(this.options.doubleTapEventName)
|
||||
},
|
||||
sanitizeOffset: function(offset) {
|
||||
var maxX = (this.zoomFactor - 1) * this.getContainerX(),
|
||||
maxY = (this.zoomFactor - 1) * this.getContainerY(),
|
||||
maxOffsetX = Math.max(maxX, 0),
|
||||
maxOffsetY = Math.max(maxY, 0),
|
||||
minOffsetX = Math.min(maxX, 0),
|
||||
minOffsetY = Math.min(maxY, 0);
|
||||
return {
|
||||
x: Math.min(Math.max(offset.x, minOffsetX), maxOffsetX),
|
||||
y: Math.min(Math.max(offset.y, minOffsetY), maxOffsetY)
|
||||
}
|
||||
},
|
||||
scaleTo: function(zoomFactor, center) {
|
||||
this.scale(zoomFactor / this.zoomFactor, center)
|
||||
},
|
||||
scale: function(scale, center) {
|
||||
scale = this.scaleZoomFactor(scale);
|
||||
this.addOffset({
|
||||
x: (scale - 1) * (center.x + this.offset.x),
|
||||
y: (scale - 1) * (center.y + this.offset.y)
|
||||
})
|
||||
},
|
||||
scaleZoomFactor: function(scale) {
|
||||
var originalZoomFactor = this.zoomFactor;
|
||||
this.zoomFactor *= scale;
|
||||
this.zoomFactor = Math.min(this.options.maxZoom, Math.max(this.zoomFactor, this.options.minZoom));
|
||||
return this.zoomFactor / originalZoomFactor
|
||||
},
|
||||
drag: function(center, lastCenter) {
|
||||
if (lastCenter) {
|
||||
if (this.options.lockDragAxis) {
|
||||
if (Math.abs(center.x - lastCenter.x) > Math.abs(center.y - lastCenter.y)) {
|
||||
this.addOffset({
|
||||
x: -(center.x - lastCenter.x),
|
||||
y: 0
|
||||
})
|
||||
} else {
|
||||
this.addOffset({
|
||||
y: -(center.y - lastCenter.y),
|
||||
x: 0
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.addOffset({
|
||||
y: -(center.y - lastCenter.y),
|
||||
x: -(center.x - lastCenter.x)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
getTouchCenter: function(touches) {
|
||||
return this.getVectorAvg(touches)
|
||||
},
|
||||
getVectorAvg: function(vectors) {
|
||||
return {
|
||||
x: vectors.map(function(v) {
|
||||
return v.x
|
||||
}).reduce(sum) / vectors.length,
|
||||
y: vectors.map(function(v) {
|
||||
return v.y
|
||||
}).reduce(sum) / vectors.length
|
||||
}
|
||||
},
|
||||
addOffset: function(offset) {
|
||||
this.offset = {
|
||||
x: this.offset.x + offset.x,
|
||||
y: this.offset.y + offset.y
|
||||
}
|
||||
},
|
||||
sanitize: function() {
|
||||
if (this.zoomFactor < this.options.zoomOutFactor) {
|
||||
this.zoomOutAnimation()
|
||||
} else if (this.isInsaneOffset(this.offset)) {
|
||||
this.sanitizeOffsetAnimation()
|
||||
}
|
||||
},
|
||||
isInsaneOffset: function(offset) {
|
||||
var sanitizedOffset = this.sanitizeOffset(offset);
|
||||
return sanitizedOffset.x !== offset.x || sanitizedOffset.y !== offset.y
|
||||
},
|
||||
sanitizeOffsetAnimation: function() {
|
||||
var targetOffset = this.sanitizeOffset(this.offset),
|
||||
startOffset = {
|
||||
x: this.offset.x,
|
||||
y: this.offset.y
|
||||
},
|
||||
updateProgress = function(progress) {
|
||||
this.offset.x = startOffset.x + progress * (targetOffset.x - startOffset.x);
|
||||
this.offset.y = startOffset.y + progress * (targetOffset.y - startOffset.y);
|
||||
this.update()
|
||||
}.bind(this);
|
||||
this.animate(this.options.animationDuration, this.options.animationInterval, updateProgress, this.swing)
|
||||
},
|
||||
zoomOutAnimation: function() {
|
||||
var startZoomFactor = this.zoomFactor,
|
||||
zoomFactor = 1,
|
||||
center = this.getCurrentZoomCenter(),
|
||||
updateProgress = function(progress) {
|
||||
this.scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center)
|
||||
}.bind(this);
|
||||
this.animate(this.options.animationDuration, this.options.animationInterval, updateProgress, this.swing)
|
||||
},
|
||||
updateAspectRatio: function() {
|
||||
this.setContainerY(this.getContainerX() / this.getAspectRatio())
|
||||
},
|
||||
getInitialZoomFactor: function() {
|
||||
return this.container[0].offsetWidth / this.el[0].offsetWidth
|
||||
},
|
||||
getAspectRatio: function() {
|
||||
return this.el[0].offsetWidth / this.el[0].offsetHeight
|
||||
},
|
||||
getCurrentZoomCenter: function() {
|
||||
var length = this.container[0].offsetWidth * this.zoomFactor,
|
||||
offsetLeft = this.offset.x,
|
||||
offsetRight = length - offsetLeft - this.container[0].offsetWidth,
|
||||
widthOffsetRatio = offsetLeft / offsetRight,
|
||||
centerX = widthOffsetRatio * this.container[0].offsetWidth / (widthOffsetRatio + 1),
|
||||
height = this.container[0].offsetHeight * this.zoomFactor,
|
||||
offsetTop = this.offset.y,
|
||||
offsetBottom = height - offsetTop - this.container[0].offsetHeight,
|
||||
heightOffsetRatio = offsetTop / offsetBottom,
|
||||
centerY = heightOffsetRatio * this.container[0].offsetHeight / (heightOffsetRatio + 1);
|
||||
if (offsetRight === 0) {
|
||||
centerX = this.container[0].offsetWidth
|
||||
}
|
||||
if (offsetBottom === 0) {
|
||||
centerY = this.container[0].offsetHeight
|
||||
}
|
||||
return {
|
||||
x: centerX,
|
||||
y: centerY
|
||||
}
|
||||
},
|
||||
canDrag: function() {
|
||||
return !isCloseTo(this.zoomFactor, 1)
|
||||
},
|
||||
getTouches: function(event) {
|
||||
var position = this.container.offset();
|
||||
return Array.prototype.slice.call(event.touches).map(function(touch) {
|
||||
return {
|
||||
x: touch.pageX - position.left,
|
||||
y: touch.pageY - position.top
|
||||
}
|
||||
})
|
||||
},
|
||||
animate: function(duration, interval, framefn, timefn, callback) {
|
||||
var startTime = (new Date).getTime(),
|
||||
renderFrame = function() {
|
||||
if (!this.inAnimation) {
|
||||
return
|
||||
}
|
||||
var frameTime = (new Date).getTime() - startTime,
|
||||
progress = frameTime / duration;
|
||||
if (frameTime >= duration) {
|
||||
framefn(1);
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
this.update();
|
||||
this.stopAnimation();
|
||||
this.update()
|
||||
} else {
|
||||
if (timefn) {
|
||||
progress = timefn(progress)
|
||||
}
|
||||
framefn(progress);
|
||||
this.update();
|
||||
setTimeout(renderFrame, interval)
|
||||
}
|
||||
}.bind(this);
|
||||
this.inAnimation = true;
|
||||
renderFrame()
|
||||
},
|
||||
stopAnimation: function() {
|
||||
this.inAnimation = false
|
||||
},
|
||||
swing: function(p) {
|
||||
return -Math.cos(p * Math.PI) / 2 + .5
|
||||
},
|
||||
getContainerX: function() {
|
||||
return this.container[0].offsetWidth
|
||||
},
|
||||
getContainerY: function() {
|
||||
return this.container[0].offsetHeight
|
||||
},
|
||||
setContainerY: function(y) {
|
||||
return this.container.height(y)
|
||||
},
|
||||
setupMarkup: function() {
|
||||
this.container = $('<div class="pinch-zoom-container"></div>');
|
||||
this.el.before(this.container);
|
||||
this.container.append(this.el);
|
||||
this.container.css({
|
||||
overflow: "hidden",
|
||||
//position: "relative"
|
||||
position:"absolute",
|
||||
top:"0",
|
||||
});
|
||||
this.el.css({
|
||||
"-webkit-transform-origin": "0% 0%",
|
||||
"-moz-transform-origin": "0% 0%",
|
||||
"-ms-transform-origin": "0% 0%",
|
||||
"-o-transform-origin": "0% 0%",
|
||||
"transform-origin": "0% 0%",
|
||||
position: "absolute"
|
||||
})
|
||||
},
|
||||
end: function() {
|
||||
this.hasInteraction = false;
|
||||
this.sanitize();
|
||||
this.update()
|
||||
},
|
||||
bindEvents: function() {
|
||||
detectGestures(this.container.get(0), this);
|
||||
$(window).on("resize", this.update.bind(this));
|
||||
$(this.el).find("img").on("load", this.update.bind(this))
|
||||
},
|
||||
update: function() {
|
||||
if (this.updatePlaned) {
|
||||
return
|
||||
}
|
||||
this.updatePlaned = true;
|
||||
setTimeout(function() {
|
||||
this.updatePlaned = false;
|
||||
this.updateAspectRatio();
|
||||
let Scwidth = this.el[0].clientWidth/this.el.find('img')[0].naturalWidth;
|
||||
let ScHeight = this.el[0].clientHeight / this.el.find('img')[0].naturalHeight;
|
||||
var zoomFactor = this.getInitialZoomFactor() * this.zoomFactor,
|
||||
offsetX = -this.offset.x / zoomFactor,
|
||||
offsetY = -this.offset.y / zoomFactor,
|
||||
transform3d = "scale3d(" + zoomFactor + ", " + zoomFactor + ",1) " + "translate3d(" + offsetX + "px," + offsetY + "px,0px)",
|
||||
transform2d = "scale(" + zoomFactor + ", " + zoomFactor + ") " + "translate(" + offsetX + "px," + offsetY + "px)",
|
||||
removeClone = function() {
|
||||
if (this.clone) {
|
||||
this.clone.remove();
|
||||
delete this.clone
|
||||
}
|
||||
}.bind(this);
|
||||
if (!this.options.use2d || this.hasInteraction || this.inAnimation) {
|
||||
this.is3d = true;
|
||||
removeClone();
|
||||
this.el.css({
|
||||
"-webkit-transform": transform3d,
|
||||
"-o-transform": transform2d,
|
||||
"-ms-transform": transform2d,
|
||||
"-moz-transform": transform2d,
|
||||
transform: transform3d
|
||||
})
|
||||
} else {
|
||||
if (this.is3d) {
|
||||
this.clone = this.el.clone();
|
||||
this.clone.css("pointer-events", "none");
|
||||
this.clone.appendTo(this.container);
|
||||
setTimeout(removeClone, 200)
|
||||
}
|
||||
this.el.css({
|
||||
"-webkit-transform": transform2d,
|
||||
"-o-transform": transform2d,
|
||||
"-ms-transform": transform2d,
|
||||
"-moz-transform": transform2d,
|
||||
transform: transform2d
|
||||
});
|
||||
this.is3d = false
|
||||
}
|
||||
this.el.find('.paperMap').css('opacity','1');
|
||||
this.el.parents('.imgBoxCont').find('.pichmask').css('opacity','0');
|
||||
}.bind(this), 0)
|
||||
},
|
||||
enable: function() {
|
||||
this.enabled = true
|
||||
},
|
||||
disable: function() {
|
||||
this.enabled = false
|
||||
}
|
||||
};
|
||||
var detectGestures = function(el, target) {
|
||||
var interaction = null,
|
||||
fingers = 0,
|
||||
lastTouchStart = null,
|
||||
startTouches = null,
|
||||
setInteraction = function(newInteraction, event) {
|
||||
if (interaction !== newInteraction) {
|
||||
if (interaction && !newInteraction) {
|
||||
switch (interaction) {
|
||||
case "zoom":
|
||||
target.handleZoomEnd(event);
|
||||
break;
|
||||
case "drag":
|
||||
target.handleDragEnd(event);
|
||||
break
|
||||
}
|
||||
}
|
||||
switch (newInteraction) {
|
||||
case "zoom":
|
||||
target.handleZoomStart(event);
|
||||
break;
|
||||
case "drag":
|
||||
target.handleDragStart(event);
|
||||
break
|
||||
}
|
||||
}
|
||||
interaction = newInteraction
|
||||
},
|
||||
updateInteraction = function(event) {
|
||||
if (fingers === 2) {
|
||||
setInteraction("zoom")
|
||||
} else if (fingers === 1 && target.canDrag()) {
|
||||
setInteraction("drag", event)
|
||||
} else {
|
||||
setInteraction(null, event)
|
||||
}
|
||||
},
|
||||
targetTouches = function(touches) {
|
||||
return Array.prototype.slice.call(touches).map(function(touch) {
|
||||
return {
|
||||
x: touch.pageX,
|
||||
y: touch.pageY
|
||||
}
|
||||
})
|
||||
},
|
||||
getDistance = function(a, b) {
|
||||
var x, y;
|
||||
x = a.x - b.x;
|
||||
y = a.y - b.y;
|
||||
return Math.sqrt(x * x + y * y)
|
||||
},
|
||||
calculateScale = function(startTouches, endTouches) {
|
||||
var startDistance = getDistance(startTouches[0], startTouches[1]),
|
||||
endDistance = getDistance(endTouches[0], endTouches[1]);
|
||||
return endDistance / startDistance
|
||||
},
|
||||
cancelEvent = function(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault()
|
||||
},
|
||||
detectDoubleTap = function(event) {
|
||||
var time = (new Date).getTime();
|
||||
if (fingers > 1) {
|
||||
lastTouchStart = null
|
||||
}
|
||||
if (time - lastTouchStart < 300) {
|
||||
cancelEvent(event);
|
||||
target.handleDoubleTap(event);
|
||||
switch (interaction) {
|
||||
case "zoom":
|
||||
target.handleZoomEnd(event);
|
||||
break;
|
||||
case "drag":
|
||||
target.handleDragEnd(event);
|
||||
break
|
||||
}
|
||||
}
|
||||
if (fingers === 1) {
|
||||
lastTouchStart = time
|
||||
}
|
||||
},
|
||||
firstMove = true;
|
||||
el.addEventListener("touchstart", function(event) {
|
||||
if (target.enabled) {
|
||||
firstMove = true;
|
||||
fingers = event.touches.length;
|
||||
detectDoubleTap(event)
|
||||
}
|
||||
});
|
||||
el.addEventListener("touchmove", function(event) {
|
||||
if (target.enabled) {
|
||||
if (firstMove) {
|
||||
updateInteraction(event);
|
||||
if (interaction) {
|
||||
cancelEvent(event)
|
||||
}
|
||||
startTouches = targetTouches(event.touches)
|
||||
} else {
|
||||
switch (interaction) {
|
||||
case "zoom":
|
||||
target.handleZoom(event, calculateScale(startTouches, targetTouches(event.touches)));
|
||||
break;
|
||||
case "drag":
|
||||
target.handleDrag(event);
|
||||
break
|
||||
}
|
||||
if (interaction) {
|
||||
cancelEvent(event);
|
||||
target.update()
|
||||
}
|
||||
}
|
||||
firstMove = false
|
||||
}
|
||||
});
|
||||
el.addEventListener("touchend", function(event) {
|
||||
if (target.enabled) {
|
||||
fingers = event.touches.length;
|
||||
updateInteraction(event)
|
||||
}
|
||||
})
|
||||
};
|
||||
return PinchZoom
|
||||
};
|
||||
if (typeof define !== "undefined" && define.amd) {
|
||||
define(["jquery"], function($) {
|
||||
return definePinchZoom($)
|
||||
})
|
||||
} else {
|
||||
window.RTP = window.RTP || {};
|
||||
window.RTP.PinchZoom = definePinchZoom(window.$)
|
||||
}
|
||||
}).call(this);
|
471
public/static/js/posterShare.js
Normal file
@ -0,0 +1,471 @@
|
||||
var tipPosition = "bottom"; //分享提示信息位置,middle,bottom
|
||||
var tipText="长按保存图片";
|
||||
var tipStyle="";
|
||||
var topInto="";
|
||||
|
||||
(function(window){
|
||||
if (tipPosition =="middle"){ //中间样式
|
||||
tipText = "长按保存图片";
|
||||
tipStyle = "tipsBtn";
|
||||
}else if (tipPosition =="bottom"){ //底部样式
|
||||
tipText = "点击图片,长按分享给好友";
|
||||
tipStyle ="buttomtips";
|
||||
}
|
||||
if (tipPosition =="bottom"){ //页面顶部信息
|
||||
topInto ='<div class="synthHead">'+
|
||||
' <img src="/h5/public/static/logo.png" style="width: 30px;height: 30px;" alt=""/>'+
|
||||
' <div>'+ $("#publishDateTime").text() +'</div>'+
|
||||
'</div>';
|
||||
}
|
||||
|
||||
var designWidth = 750,
|
||||
maxWidth = 750,
|
||||
doc = document,
|
||||
win = window,
|
||||
docEl = doc.documentElement,
|
||||
remStyle = document.createElement("style"),
|
||||
tid;
|
||||
|
||||
function refreshRem() {
|
||||
var width = docEl.getBoundingClientRect().width;
|
||||
maxWidth = maxWidth || 540;
|
||||
width > maxWidth && (width = maxWidth);
|
||||
var rem = width * 100 / designWidth;
|
||||
var remnew = width / designWidth;
|
||||
// remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
|
||||
remStyle.innerHTML = 'html{font-size:' +62.5*remnew+'% !important;}';
|
||||
}
|
||||
|
||||
if (docEl.firstElementChild) {
|
||||
docEl.firstElementChild.appendChild(remStyle);
|
||||
} else {
|
||||
var wrap = doc.createElement("div");
|
||||
wrap.appendChild(remStyle);
|
||||
doc.write(wrap.innerHTML);
|
||||
wrap = null;
|
||||
}
|
||||
|
||||
//要等 wiewport 设置好后才能执行 refreshRem,不然 refreshRem 会执行2次;
|
||||
|
||||
win.addEventListener("resize", function () {
|
||||
clearTimeout(tid); //防止执行两次
|
||||
tid = setTimeout(refreshRem, 300);
|
||||
}, false);
|
||||
|
||||
win.addEventListener("pageshow", function (e) {
|
||||
if (e.persisted) { // 浏览器后退的时候重新计算
|
||||
clearTimeout(tid);
|
||||
tid = setTimeout(refreshRem, 300);
|
||||
}
|
||||
}, false);
|
||||
|
||||
if (doc.readyState === "complete") {
|
||||
doc.body.style.fontSize = "16px";
|
||||
} else {
|
||||
doc.addEventListener("DOMContentLoaded", function (e) {
|
||||
doc.body.style.fontSize = "16px";
|
||||
}, false);
|
||||
}
|
||||
|
||||
var PosterSplicing=function(selector){
|
||||
return new PosterSplicing.fn.init(selector)
|
||||
}
|
||||
var imagesNum = [1,2,4,8],//海报需要的图片数量
|
||||
logoSrc = "/h5/public/static/logo.png",//logo的图片
|
||||
posterTime= $("#publishDateTime").text(),//版面的日期
|
||||
haibaoImg = $.Deferred();//海报canvas生成的图片
|
||||
twoHorHaibaoImg = $.Deferred();//两张横向海报canvas生成的图片
|
||||
qrcodeImg = $.Deferred();//二维码canvas生成的图片
|
||||
imgUrlHeight = $.Deferred();//报纸的高度;
|
||||
|
||||
PosterSplicing.fn={
|
||||
show:function(value){//显示图片列表
|
||||
refreshRem();
|
||||
console.log('show');
|
||||
$("body").append('<div class="posterMask active"></div>')
|
||||
var posterHtml = '<div class="posterSplicingWrap">'+
|
||||
'<div class="closePoster"><i></i></div>'+
|
||||
'<div class="posterChoseWrap">';
|
||||
$(this).map((i,v)=>{
|
||||
if($(v)[0].currentSrc!=''){
|
||||
posterHtml += '<div class="item" id="images'+i+'">'+
|
||||
'<img class="itemPic" src="'+$(v)[0].currentSrc+'" alt=""/>'+
|
||||
'<div class="itemMask">'+
|
||||
'<i class="choseBtn"></i>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
}
|
||||
});
|
||||
posterHtml += '</div>'+
|
||||
'<div class="chosedBoxList">'+
|
||||
'<div class="chosedHead">'+
|
||||
'<p class="allPageBtn">一键拼图</p>'+
|
||||
// '<p class="tips">请选择1、2、4、8张图片</p>'+
|
||||
'<p class="tips">请选择版面,拼图分享</p>'+
|
||||
'<p class="chosedBtn">开始拼图</p>'+
|
||||
'</div>'+
|
||||
'<div class="chosedPicList">'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'
|
||||
$('body').append(posterHtml);
|
||||
this.loading(false);
|
||||
$("body .posterSplicingWrap").on("click",".closePoster",function(){
|
||||
$('.posterSplicingWrap,.posterMask').remove();
|
||||
remStyle.innerHTML = 'html{font-size:initial}';
|
||||
})
|
||||
},
|
||||
jigsawPuzzleBeginBtn:function(value){//开始拼图按钮数值变化
|
||||
if($("body .chosedBoxList .chosedPicList>.item").length>0){
|
||||
$("body .chosedBoxList .chosedBtn").addClass("active").html('开始拼图('+$("body .chosedBoxList .chosedPicList>.item").length+')');
|
||||
}else
|
||||
$("body .chosedBoxList .chosedBtn").removeClass("active").html('开始拼图');
|
||||
},
|
||||
choseImage:function(value){//选择海报需要图片
|
||||
if($('body .chosedBoxList .chosedPicList .item[chose-id="'+$(this).attr("id")+'"]').length>0){
|
||||
$('body .chosedBoxList .chosedPicList .item[chose-id="'+$(this).attr("id")+'"]').remove();
|
||||
$("body .posterChoseWrap").children("#"+$(this).attr("id")).removeClass("active");
|
||||
PosterSplicing.fn.jigsawPuzzleBeginBtn();
|
||||
}else{
|
||||
$("body .chosedBoxList .chosedPicList").append('<div class="item" chose-id="'+$(this).attr("id")+'">'+
|
||||
'<img class="itemPic" src="'+$(this).children(".itemPic").attr("src")+'" alt=""/>'+
|
||||
'<i class="choseBtn" chose-id="'+$(this).attr("id")+'"></i>'+
|
||||
'</div>');
|
||||
$("body .posterChoseWrap").children("#"+$(this).attr("id")).addClass("active");
|
||||
PosterSplicing.fn.jigsawPuzzleBeginBtn();
|
||||
}
|
||||
},
|
||||
cancelImage:function(value){//取消选择的图片
|
||||
$("body .posterChoseWrap").children("#"+$(this).attr("chose-id")).removeClass("active");
|
||||
$(this).parents('.item').remove();
|
||||
PosterSplicing.fn.jigsawPuzzleBeginBtn();
|
||||
},
|
||||
choseWraringTips:function(value,text){//显示提示弹层
|
||||
var tipsHtml = '<div class="wraringWrapper"><div class="wraningBox">'+
|
||||
'<div class="title">提示</div>'+
|
||||
'<div class="tips">'+text+'</div>'+
|
||||
'<div class="btn">确定</div>'
|
||||
'</div></div>';
|
||||
$(".posterSplicingWrap").append(tipsHtml);
|
||||
},
|
||||
hideWraringTips:function(){//隐藏提示弹层
|
||||
$(".posterSplicingWrap .wraringWrapper").remove();
|
||||
},
|
||||
piecingTogether:function(){//点击拼图按钮
|
||||
var itemLength = $("body .chosedBoxList .chosedPicList>.item").length;
|
||||
if(itemLength==0){
|
||||
this.choseWraringTips(this,'请至少选择一张图片!');
|
||||
return ;
|
||||
}
|
||||
//if(!imagesNum.includes(itemLength)){
|
||||
// this.choseWraringTips(this,'请选择1张、2张、4张或者8张图片!');
|
||||
// return ;
|
||||
//}
|
||||
var iamgesArry = [];
|
||||
$("body .chosedBoxList .chosedPicList>.item").map((i,v)=>{
|
||||
iamgesArry.push($(v).children('img').attr("src"))
|
||||
});
|
||||
this.loading(true);
|
||||
switch(itemLength){
|
||||
case 1:
|
||||
this.onePoster(iamgesArry)
|
||||
break;
|
||||
case 2:
|
||||
this.twoPoster(iamgesArry)
|
||||
break;
|
||||
case 4:
|
||||
this.fourPoster(iamgesArry)
|
||||
break;
|
||||
case 8:
|
||||
this.eightPoster(iamgesArry)
|
||||
break;
|
||||
default:
|
||||
this.twoPoster(iamgesArry)
|
||||
}
|
||||
},
|
||||
piecingTogetherAll:function(){//点击一键拼图按钮,全部拼图
|
||||
this.loading(true);
|
||||
var iamgesArry = [];
|
||||
$("body .posterChoseWrap>.item").map((i,v)=>{
|
||||
iamgesArry.push($(v).children('img').attr("src"))
|
||||
});
|
||||
this.twoPoster(iamgesArry);
|
||||
},
|
||||
onePoster:function(value){//一张拼图
|
||||
var onePosterHtml='<div class="posterWrapper">'+
|
||||
'<div class="closeBtn"><i></i></div>'+
|
||||
'<div class="originalWrapper onePoster" id="originalWrapper">'+
|
||||
'<div class="defalutLayoutPoster">'+topInto+
|
||||
'<div class="imageBox">'+
|
||||
'<img class="imgPic" src="'+value[0]+'" alt=""/>'+
|
||||
'</div>'+
|
||||
'<div class="footer">'+
|
||||
'<div class="logo"><img src="'+logoSrc+'" alt="logo"/></div>'+
|
||||
'<div class="time">'+(tipPosition =="middle"?posterTime:'识别二维码<br>查看该版内容')+'</div>'+
|
||||
'<div class="code" id="qrcode"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="newPosterWrapper" class="newPosterWrapper">'+
|
||||
'<img src="" alt=""/>'+
|
||||
'<div class="'+ tipStyle +'">'+tipText+'</div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
$(".posterSplicingWrap").append(onePosterHtml);
|
||||
setTimeout(function(){
|
||||
codeImg("originalWrapper","newPosterWrapper");
|
||||
},1000)
|
||||
|
||||
},
|
||||
twoPoster:function(value){//两张拼图
|
||||
var fourImages = '';
|
||||
value.map((v,i)=>{
|
||||
fourImages += '<div class="imageBox">'+
|
||||
'<img class="imgPic" src="'+v+'" alt=""/>'+
|
||||
'</div>'
|
||||
});
|
||||
var twoPosterHtml='<div class="posterWrapper" style="padding-bottom:26rem">'+
|
||||
'<div class="closeBtn"><i></i></div>'+
|
||||
'<div class="verticalPoster active">'+
|
||||
'<div class="originalWrapper onePoster" id="originalWrapper">'+
|
||||
'<div class="defalutLayoutPoster">'+topInto+
|
||||
fourImages +
|
||||
'<div class="footer">'+
|
||||
'<div class="logo"><img src="'+logoSrc+'" alt="logo"/></div>'+
|
||||
'<div class="time">'+(tipPosition =="middle"?posterTime:'识别二维码<br>查看该版内容')+'</div>'+
|
||||
'<div class="code" id="qrcode"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="newPosterWrapper" class="newPosterWrapper">'+
|
||||
'<img src="" alt=""/>'+
|
||||
'<div class="'+ tipStyle +'">'+tipText+'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="horizontalPoster">'+
|
||||
'<div class="originalWrapper " id="horOriginalWrapper">'+
|
||||
'<div class="defalutLayoutPoster">'+topInto+
|
||||
fourImages +
|
||||
'<div class="footer">'+
|
||||
'<div class="logo"><img src="'+logoSrc+'" alt="logo"/></div>'+
|
||||
'<div class="time">'+(tipPosition =="middle"?posterTime:'识别二维码<br>查看该版内容')+'</div>'+
|
||||
'<div class="code" id="qrcodeHor"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="newHorPosterWrapper" class="newPosterWrapper">'+
|
||||
'<img src="" alt=""/>'+
|
||||
'<div class="'+ tipStyle +'">'+tipText+'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="choseDirectionBox">'+
|
||||
'<div class="left active" type="verticalPoster"></div>'+
|
||||
'<div class="right" type="horizontalPoster"></div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
$(".posterSplicingWrap").append(twoPosterHtml);
|
||||
$("body .choseDirectionBox>item");
|
||||
setTimeout(function(){
|
||||
codeImg("originalWrapper","newPosterWrapper");
|
||||
},1000)
|
||||
|
||||
$("body .choseDirectionBox").on("click",".left",function(){
|
||||
$(this).addClass("active").siblings().removeClass("active");
|
||||
$("body .verticalPoster").addClass("active").siblings(".horizontalPoster").removeClass("active");
|
||||
});
|
||||
$("body .choseDirectionBox").on("click",".right",function(){
|
||||
$(this).addClass("active").siblings().removeClass("active");
|
||||
$("body .horizontalPoster").addClass("active").siblings(".verticalPoster").removeClass("active");
|
||||
if($("#newHorPosterWrapper img").attr("src")==""){
|
||||
setTimeout(function(){
|
||||
codeImg("horOriginalWrapper","newHorPosterWrapper");
|
||||
},1000)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
fourPoster:function(value){//四张拼图
|
||||
var fourImages = '';
|
||||
value.map((v,i)=>{
|
||||
fourImages += '<div class="imageBox">'+
|
||||
'<img class="imgPic" src="'+v+'" alt=""/>'+
|
||||
'</div>'
|
||||
});
|
||||
var fourPosterHtml='<div class="posterWrapper">'+
|
||||
'<div class="closeBtn"><i></i></div>'+
|
||||
'<div class="originalWrapper fourPoster" id="originalWrapper">'+
|
||||
'<div class="defalutLayoutPoster">'+topInto+
|
||||
fourImages +
|
||||
'<div class="footer">'+
|
||||
'<div class="logo"><img src="'+logoSrc+'" alt="logo"/></div>'+
|
||||
'<div class="time">'+(tipPosition =="middle"?posterTime:'识别二维码<br>查看该版内容')+'</div>'+
|
||||
'<div class="code" id="qrcode"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="newPosterWrapper" class="newPosterWrapper">'+
|
||||
'<img src="" alt=""/>'+
|
||||
'<div class="'+ tipStyle +'">'+tipText+'</div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
$(".posterSplicingWrap").append(fourPosterHtml);
|
||||
setTimeout(function(){
|
||||
codeImg('originalWrapper',"newPosterWrapper");
|
||||
},1000)
|
||||
|
||||
},
|
||||
eightPoster:function(value){//八张拼图
|
||||
var eightImages = '';
|
||||
value.map((v,i)=>{
|
||||
if(i==4){
|
||||
eightImages += '<div class="imageBox">'+
|
||||
'<div class="code" id="qrcode"></div>'+
|
||||
'</div>'+
|
||||
'<div class="imageBox">'+
|
||||
'<img class="imgPic" src="'+v+'" alt=""/>'+
|
||||
'</div>'
|
||||
}else
|
||||
eightImages += '<div class="imageBox">'+
|
||||
'<img class="imgPic" src="'+v+'" alt=""/>'+
|
||||
'</div>'
|
||||
});
|
||||
var eightPoster='<div class="posterWrapper">'+
|
||||
'<div class="closeBtn"><i></i></div>'+
|
||||
'<div class="originalWrapper eightPoster" id="originalWrapper">'+
|
||||
'<div class="defalutLayoutPoster">'+topInto+
|
||||
eightImages +
|
||||
'<div class="footer">'+
|
||||
'<div class="logo"><img src="'+logoSrc+'" alt="logo"/></div>'+
|
||||
'<div class="time">'+(tipPosition =="middle"?posterTime:'识别二维码<br>查看该版内容')+'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="newPosterWrapper" class="newPosterWrapper">'+
|
||||
'<img src="" alt=""/>'+
|
||||
'<div class="'+ tipStyle +'">'+tipText+'</div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
$(".posterSplicingWrap").append(eightPoster);
|
||||
setTimeout(function(){
|
||||
codeImg('originalWrapper',"newPosterWrapper");
|
||||
},1000)
|
||||
|
||||
},
|
||||
closePosterGenerate:function(){//关闭生成的海报层
|
||||
$(".posterSplicingWrap .posterWrapper").remove();
|
||||
haibaoImg = $.Deferred();
|
||||
twoHorHaibaoImg = $.Deferred();
|
||||
},
|
||||
loading:function(value){//loading显示隐藏
|
||||
if(value){
|
||||
$(".posterMask").addClass('active');
|
||||
}else{
|
||||
$(".posterMask").removeClass('active');
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
var init = PosterSplicing.fn.init = function(selector){
|
||||
var slice = Array.prototype.slice
|
||||
var dom = slice.call($('.'+selector))
|
||||
console.log('进入',dom)
|
||||
var i, len = dom ? dom.length : 0
|
||||
for (i = 0; i < len; i++) {
|
||||
this[i] = dom[i]
|
||||
}
|
||||
this.length = len
|
||||
this.selector = selector || ''
|
||||
}
|
||||
init.prototype = PosterSplicing.fn;
|
||||
|
||||
window.POSTER = PosterSplicing
|
||||
|
||||
//点击事件
|
||||
//选择图片
|
||||
$('body').on('click','.posterChoseWrap .item',function(){
|
||||
PosterSplicing.fn.choseImage.apply(this)
|
||||
});
|
||||
//取消选择的图片
|
||||
$('body').on('click','.chosedPicList .item .choseBtn',function(){
|
||||
PosterSplicing.fn.cancelImage.apply(this)
|
||||
});
|
||||
$('body').on('click','.chosedBoxList .chosedBtn',function(){
|
||||
PosterSplicing.fn.piecingTogether(this)
|
||||
});
|
||||
$('body').on('click','.chosedBoxList .allPageBtn',function(){
|
||||
PosterSplicing.fn.piecingTogetherAll(this)
|
||||
});
|
||||
//提示
|
||||
$('body').on('click','.wraningBox .btn',function(){
|
||||
PosterSplicing.fn.hideWraringTips(this)
|
||||
});
|
||||
//关闭生成的海报
|
||||
$('body').on('click','.posterWrapper .closeBtn i',function(){
|
||||
PosterSplicing.fn.closePosterGenerate(this)
|
||||
});
|
||||
|
||||
//二维码生成图片
|
||||
function codeImg(psterBox,newPosterBox){
|
||||
var url = window.location.href;
|
||||
url = url.indexOf("?")<0?url+"?v=10000":url;
|
||||
$('body').find('#qrcode').qrcode({ width: 150,height:150,correctLevel:0,render:"table",margin:'0 auto', text:url});
|
||||
synthesisImg('qrcode',qrcodeImg);//生成二维码
|
||||
$.when(qrcodeImg).done(function ( v1 ) {
|
||||
$('body').find('#qrcode').addClass('active').html('<img src="'+v1+'" alt="" />');
|
||||
if($("body").find("#qrcodeHor")){
|
||||
$('body').find('#qrcodeHor').addClass('active').html('<img src="'+v1+'" alt="" />');
|
||||
}
|
||||
//loadImage();//报纸图片加载
|
||||
synthesisImgLoad(psterBox,newPosterBox);
|
||||
});
|
||||
}
|
||||
//图片加载完成后生成海报
|
||||
function synthesisImgLoad(psterBox,newPosterBox){
|
||||
if(newPosterBox=='newHorPosterWrapper'){
|
||||
synthesisImg(psterBox,twoHorHaibaoImg);//生成海报
|
||||
$.when(twoHorHaibaoImg).done(function ( v1) {
|
||||
$('#'+newPosterBox+' img').attr('src',v1);
|
||||
$('#'+psterBox).hide();
|
||||
PosterSplicing.fn.loading(false)
|
||||
});
|
||||
}else{
|
||||
synthesisImg(psterBox,haibaoImg);//生成海报
|
||||
$.when(haibaoImg).done(function ( v1) {
|
||||
$('#'+newPosterBox+' img').attr('src',v1);
|
||||
$('#'+psterBox).hide();
|
||||
PosterSplicing.fn.loading(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
//生成图片
|
||||
function synthesisImg(sourceHtml,canvasImg) {
|
||||
//clearInterval(synthesisImgLoad)
|
||||
var canvas = document.createElement('canvas') // 创建一个canvas节点
|
||||
var shareContent = document.getElementById(sourceHtml) // 需要截图的包裹的(原生的)DOM 对象
|
||||
var width = shareContent.offsetWidth // 获取dom 宽度
|
||||
var height = shareContent.offsetHeight // 获取dom 高度
|
||||
var scale = 2 // 定义任意放大倍数 支持小数
|
||||
canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale
|
||||
var rect = shareContent.getBoundingClientRect() // 获取元素相对于视口的
|
||||
html2canvas(document.getElementById(sourceHtml),{
|
||||
x: rect.left, // 绘制的dom元素相对于视口的位置
|
||||
y: rect.top,
|
||||
width: width, // dom 原始宽度
|
||||
height: height,
|
||||
windowWidth: document.body.scrollWidth,
|
||||
windowHeight: document.body.scrollHeight,
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
useCORS: true, // 开启跨域
|
||||
dpi: window.devicePixelRatio * 2,
|
||||
scale: scale, // 添加的scale 参数
|
||||
}).then((canvas)=>{
|
||||
var context = canvas.getContext('2d')
|
||||
//关闭抗锯齿
|
||||
context.mozImageSmoothingEnabled = false
|
||||
context.msImageSmoothingEnabled = false
|
||||
context.imageSmoothingEnabled = false
|
||||
canvasImg.resolve(canvas.toDataURL());
|
||||
})
|
||||
}
|
||||
})(window)
|
54
public/static/js/qfstatH5.js
Normal file
@ -0,0 +1,54 @@
|
||||
|
||||
//前方统计-手机端
|
||||
var _maq = _maq || [];
|
||||
function loadQFStat(){
|
||||
|
||||
var rqStr = window.location.href.match(/(\d{4}-\d{2})\/(\d{2})/i);
|
||||
var _paper_date = rqStr[1]+"-"+rqStr[2];
|
||||
|
||||
_maq.push(['_paper_date', _paper_date ]);//报纸日期
|
||||
_maq.push(['_set_account', '数字报']);
|
||||
_maq.push(['_page_url_type', window.location.href.indexOf("node")>=0?0:1]);//访问页面类型(0版面、1文章)
|
||||
_maq.push(['_paper_name', '河南日报']);//报纸名称
|
||||
_maq.push(['_paper_type', '1']);//报纸类型(0:Pc、1:Wap)
|
||||
_maq.push(['_paper_id', '1252']);//报纸ID
|
||||
_maq.push(['_node_url', (window.location.href).split('?')[0] ]);//版面地址
|
||||
_maq.push(['_page_title', $("title").html()]); //页面Title
|
||||
_maq.push(['_editor', '']);//文章编辑
|
||||
|
||||
if (window.location.href.indexOf("node")>=0){//访问版面页面
|
||||
_maq.push(['_node_num', $("#NewsEditionNumber").html()]);//版次
|
||||
_maq.push(['_node_name', $("#NewsEditionName").html()]);//版面名称
|
||||
_maq.push(['_article_title', '']);//文章标题
|
||||
_maq.push(['_author', '']);//文章作者
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("content")>=0){//访问文章页面
|
||||
_maq.push(['_node_num', $("#NewsEditionNumber").html()]);//版次
|
||||
_maq.push(['_node_name', $("#NewsEditionName").html()]);//版面名称
|
||||
_maq.push(['_article_title', $("#NewsArticleTitle").html()]);//文章标题
|
||||
_maq.push(['_author', $("#NewsArticleAuthor").html()]);//文章标题
|
||||
//_maq.push(['_author', ($("founder-author").html().split('npm:article-author')[1]).replace(/[-><!/]?/g,'') ]);//文章作者
|
||||
}
|
||||
|
||||
(function () {
|
||||
var ma = document.createElement('script'); ma.type = 'text/javascript'; ma.async = true;
|
||||
//ma.src = ('https:' == document.location.protocol ? 'https://www' : 'http://wwww') + '.soubao.net/ma.js';
|
||||
ma.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'statlog.cnepaper.com/js/ma.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ma, s);
|
||||
})();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
//loadQFStat(); //前方统计
|
||||
//loadCnzz();// cnzz统计
|
||||
});
|
||||
|
||||
function loadCnzz(){
|
||||
var la = document.createElement('script');
|
||||
la.type = 'text/javascript';
|
||||
la.async = true;
|
||||
la.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 's4.cnzz.com/z_stat.php?id=1260208327&web_id=1260208327';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(la, s);
|
||||
}
|
14
public/static/js/swiper.min.js
vendored
Normal file
34
public/static/js/weixin.js
Normal file
@ -0,0 +1,34 @@
|
||||
document.write("<script src='https://res.wx.qq.com/open/js/jweixin-1.4.0.js'></script>");
|
||||
document.write("<script src='https://uploads.dahe.cn/lxx/2020/hnrbwap/wxshare.js'></script>");
|
||||
|
||||
|
||||
$(function(){
|
||||
var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
|
||||
if (ua.match(/micromessenger/i) != "micromessenger") {return;}// 非微信不执行以下脚本
|
||||
|
||||
var shortImg,shareTitle,shareDesc,shareLink;
|
||||
shortImg = "https://uploads.dahe.cn/lxx/2020/hnrbwap/logo.png";
|
||||
|
||||
//版面页面
|
||||
if (location.href.indexOf("node")>=0){
|
||||
shareTitle = "河南日报电子版";
|
||||
shareDesc = $("title").html();
|
||||
shareLink = window.location.href.split("node_")[0]+"node_"+$('.swiper-wrapper .swiper-slide-active img.paperMap').attr('usemap').replace("#PagetupMap","")+".htm";
|
||||
}
|
||||
|
||||
//文章页面
|
||||
if (location.href.indexOf("content")>=0){
|
||||
shareTitle = $("#articleTitle").html().replace(/<\s*br\s*[/]*>/g," ").replace(/<\s*br\s*[/]*>/g," ");
|
||||
shareDesc = $("#content").html().replace(/\s+|<.*?>| /ig, '').substring(0, 50);
|
||||
shareDesc = shareDesc==""?"": shareDesc + "......";
|
||||
shareLink = window.location.href;
|
||||
}
|
||||
|
||||
//今日版面总览
|
||||
if (location.href.indexOf("index")>=0){
|
||||
shareTitle = "河南日报数字报";
|
||||
shareDesc = "今日版面总览";
|
||||
shareLink = window.location.href;
|
||||
}
|
||||
wxshare(shareTitle,shareDesc,shortImg)
|
||||
});
|
72
public/static/js/wxshare.js
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Created by lxx on 2019/07/18.
|
||||
*/
|
||||
function wxshare(t, d, i) {
|
||||
// 定义分享内容,title:标题 des:描述 icon:分享logo
|
||||
var localhref = window.location.href;
|
||||
|
||||
var sharetitle = t.replace(/[\r\n]/g,"");
|
||||
var sharelink = localhref;
|
||||
var shareimgUrl = i;
|
||||
var sharedes = d;
|
||||
|
||||
if (shareimgUrl === undefined) {
|
||||
shareimgUrl = 'https://uploads.dahe.cn/lxx/2020/hnrbwap/logo.png';
|
||||
}
|
||||
|
||||
var result = fetch("https://share.dahe.cn/share/hnrbapp?url=" + encodeURIComponent(localhref));
|
||||
result.then(function(response) {
|
||||
return response.json()
|
||||
}).then(function(data) {
|
||||
var text = data.object;
|
||||
|
||||
/* 微信 */
|
||||
wx.config({
|
||||
debug: false, // 开启调试模式。
|
||||
appId: text.appId, // 必填,公众号的唯一标识
|
||||
timestamp: text.timestamp, // 必填,生成签名的时间戳
|
||||
nonceStr: text.nonceStr, // 必填,生成签名的随机串
|
||||
signature: text.signature, // 必填,签名
|
||||
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表
|
||||
});
|
||||
|
||||
wx.checkJsApi({
|
||||
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
|
||||
success: function(res) {
|
||||
// console.log(res)
|
||||
}
|
||||
});
|
||||
|
||||
//需在用户可能点击分享按钮前就先调用
|
||||
wx.ready(function() {
|
||||
|
||||
// 自定义“分享给朋友”及“分享到QQ”按钮的分享内容
|
||||
wx.updateAppMessageShareData({
|
||||
title: sharetitle, // 分享标题
|
||||
link: sharelink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: shareimgUrl, // 分享图标
|
||||
desc: sharedes, // 分享描述
|
||||
success: function() {
|
||||
// 设置成功
|
||||
}
|
||||
})
|
||||
|
||||
// 自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容
|
||||
wx.updateTimelineShareData({
|
||||
title: sharetitle, // 分享标题
|
||||
link: sharelink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: shareimgUrl, // 分享图标
|
||||
success: function() {
|
||||
// 设置成功
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
wx.error(function(res) {
|
||||
console.log("err: " + res)
|
||||
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
||||
});
|
||||
}).catch(function(ex) {
|
||||
console.log('failed', ex)
|
||||
})
|
||||
}
|
BIN
public/static/left1.png
Normal file
After Width: | Height: | Size: 1006 B |
BIN
public/static/loading.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/static/logo.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
public/static/mulu.png
Normal file
After Width: | Height: | Size: 446 B |
BIN
public/static/qzone.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/static/right6.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
public/static/saveBtn1.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
public/static/share.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
public/static/sina.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/static/top1.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
public/static/transverseActive.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
public/static/transverseDefault.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
public/static/verticalActive.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
public/static/verticalDefault.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
public/static/voice_pause.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/static/voice_play.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/static/wangqi.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/static/weixin.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
public/static/wxfriend.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
public/static/zonglan1.png
Normal file
After Width: | Height: | Size: 17 KiB |
15
src/App.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
NConfigProvider,
|
||||
GlobalThemeOverrides
|
||||
} from 'naive-ui'
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<n-message-provider>
|
||||
<div v-wechat-title="$route.meta.title">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</n-message-provider>
|
||||
|
||||
</template>
|
123
src/api/index.js
Normal file
@ -0,0 +1,123 @@
|
||||
import http from './request';
|
||||
//首页最新的新闻
|
||||
export function getHomeNews(params) {
|
||||
return http('/api/move/news/index', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//首页最新的新闻
|
||||
export function getHomeNewNews(params) {
|
||||
return http('/api/pc/pc_news/wxindex', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//首页置顶的活动
|
||||
export function getHomeActivity(params) {
|
||||
return http('/api/move/news/activitylist', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//活动列表
|
||||
export function getIndexActivity(params) {
|
||||
return http('/api/move/news/activityindex', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//活动列表
|
||||
export function getIndexActivityInfo(params) {
|
||||
return http('/api/move/news/activityfind', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//协会简介
|
||||
export function getAssociationInfo(params) {
|
||||
return http('/api/move/association/find', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//pc端留言
|
||||
export function setMessage(params) {
|
||||
return http('/api/pc/pc_leave_message/add', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//新闻详情
|
||||
export function getNewsInfo(params) {
|
||||
return http('/api/move/news/find', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//协会班子
|
||||
export function getBzInfo(params) {
|
||||
return http('/api/pc/address/index', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
//党群工作,会员动态,通知公告
|
||||
export function getPcNews(params) {
|
||||
return http('/api/pc/pc_news/article', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//PC新闻详情
|
||||
export function getNewsPcInfo(params) {
|
||||
return http('/api/pc/pc_news/articlefind', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//协会信息个数
|
||||
export function getBzCount(params) {
|
||||
return http('/api/pc/statistics/data', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//协会信息个数
|
||||
export function getDataone(params) {
|
||||
return http('/api/pc/pc_data/dataone', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
export function getDatatwo(params) {
|
||||
return http('/api/pc/pc_data/datatwo', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
export function getDatathree(params) {
|
||||
return http('/api/pc/pc_data/datathree', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
export function getDatafour(params) {
|
||||
return http('/api/pc/pc_data/datafour', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
export function getDataditu(params) {
|
||||
return http('/api/pc/pc_data/dataditu', {
|
||||
method: 'POST',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
107
src/api/request.js
Normal file
@ -0,0 +1,107 @@
|
||||
import axios from 'axios';
|
||||
// request.js
|
||||
// 创建新的axios实例
|
||||
const baseURL='https://hnyea.0rui.cn/';
|
||||
console.log(window.location.protocol);
|
||||
const service = axios.create({
|
||||
// 环境变量,需要在.env文件中配置
|
||||
baseURL: baseURL,
|
||||
//baseURL:'/api',
|
||||
// 超时时间暂定5s
|
||||
timeout: 10000,
|
||||
|
||||
});
|
||||
const Request = (url, options = {}) => {
|
||||
let method = options.method || 'get';
|
||||
let params = options.params || {};
|
||||
|
||||
if (method === 'get' || method === 'GET') {
|
||||
return new Promise((resolve, reject) => {
|
||||
service
|
||||
.get(url, {
|
||||
params: params,
|
||||
})
|
||||
.then(res => {
|
||||
if (res && res.data) {
|
||||
resolve(res.data);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
} else if (method === 'post' || method === 'POST'){
|
||||
return new Promise((resolve, reject) => {
|
||||
service
|
||||
.post(url, params)
|
||||
.then(res => {
|
||||
if (res && res.data) {
|
||||
resolve(res.data);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}else{
|
||||
console.log(params);
|
||||
return new Promise((resolve, reject) => {
|
||||
service
|
||||
.delete(url, {data: params})
|
||||
.then(res => {
|
||||
if (res && res.data) {
|
||||
resolve(res.data);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
//axios请求拦截器
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
// 此处添加Loading
|
||||
// var item = sessionStorage.getItem('user');
|
||||
// var admin = sessionStorage.getItem('admin');
|
||||
// var jsonArray = JSON.parse(item);
|
||||
// if (item) {
|
||||
// config.headers['token'] =jsonArray['token']
|
||||
// }
|
||||
// if (admin) {
|
||||
// config.headers['Authorization'] = `Bearer ${admin}`;
|
||||
// }
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
//axios响应拦截器
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
return response;
|
||||
},
|
||||
error => {
|
||||
// 处理异常情况,根据项目实际情况处理或不处理
|
||||
if (error && error.response) {
|
||||
// 根据约定的响应码处理
|
||||
switch (error.response.status) {
|
||||
case 403:
|
||||
error.message = '拒绝访问';
|
||||
break;
|
||||
case 502:
|
||||
error.message = '服务器端出错';
|
||||
break;
|
||||
default:
|
||||
error.message = `连接错误${error.response.status}`;
|
||||
}
|
||||
} else {
|
||||
// 超时处理
|
||||
error.message = '服务器响应超时,请刷新当前页';
|
||||
}
|
||||
return Promise.resolve(error.response);
|
||||
}
|
||||
);
|
||||
export default Request;
|
12
src/components/Footer.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
13
src/components/Head.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
99
src/components/Writer.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div :style="{ visibility: visibility }">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Writer",
|
||||
props: {
|
||||
// 间隔时间
|
||||
interval: { type: Number, default: 75 },
|
||||
// 光标 建议有表格的时候不要使用光标 会导致渲染异常
|
||||
cursorStr: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visibility: "hidden", //
|
||||
timer: 0, // 定时器
|
||||
initialDom: null, // 记录初始dom
|
||||
progress: 0, // 当前文本书写进度
|
||||
// writeStatus: "NotStart",// 当前书写状态=> NotStart: 未开始;Processing:书写中;Completed 书写完毕
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 拷贝初始所有dom 便于重新开始
|
||||
this.initialDom = JSON.parse(JSON.stringify(this.$el.innerHTML));
|
||||
this.start();
|
||||
},
|
||||
methods: {
|
||||
// 开始 / 重新开始
|
||||
start() {
|
||||
this.visibility = "visible";
|
||||
this.progress = 0;
|
||||
this.$el.innerHTML = "";
|
||||
clearInterval(this.timer);
|
||||
this.write();
|
||||
this.$emit("writeStart");
|
||||
},
|
||||
// 暂停
|
||||
pause() {
|
||||
clearInterval(this.timer);
|
||||
this.$emit("writePause");
|
||||
},
|
||||
// 继续
|
||||
continueWrite() {
|
||||
if(!this.progress || this.progress >= this.initialDom.length){
|
||||
return
|
||||
}
|
||||
clearInterval(this.timer);
|
||||
this.write();
|
||||
this.$emit("writeContinue");
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.visibility = "hidden";
|
||||
this.progress = 0;
|
||||
this.$el.innerHTML = "";
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
// 书写
|
||||
write() {
|
||||
this.timer = setInterval(() => {
|
||||
var current = this.initialDom.substr(this.progress, 1);
|
||||
// console.log(current);
|
||||
// 跳过 标签渲染
|
||||
if (current === "<") {
|
||||
this.progress = this.initialDom.indexOf(">", this.progress) + 1;
|
||||
} else {
|
||||
this.progress++;
|
||||
}
|
||||
// console.log(this.progress & 1, "this.progress");
|
||||
// 如果有光标配置 拼接到最新渲染的地方
|
||||
if (this.cursorStr) {
|
||||
this.$el.innerHTML =
|
||||
this.initialDom.substring(0, this.progress) +
|
||||
(this.progress < this.initialDom.length && this.progress & 1
|
||||
? this.cursorStr
|
||||
: "");
|
||||
} else {
|
||||
this.$el.innerHTML = this.initialDom.substring(0, this.progress);
|
||||
}
|
||||
// 文本书写进度 大于需要书写的总长度 判断为渲染完成
|
||||
if (this.progress >= this.initialDom.length) {
|
||||
clearInterval(this.timer);
|
||||
this.$emit("writeEnd"); // 打字完成后的回调方法
|
||||
}
|
||||
this.$emit("writeIsWrite");
|
||||
}, this.interval);
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
};
|
||||
</script>
|
14
src/main.js
Normal file
@ -0,0 +1,14 @@
|
||||
import {
|
||||
createApp
|
||||
} from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
import router from './router/routes'
|
||||
import VueWechatTitle from 'vue-wechat-title'; //引入VueWechatTitle
|
||||
import naive from 'naive-ui';
|
||||
|
||||
const app = createApp(App);
|
||||
app.use(naive);
|
||||
app.use(VueWechatTitle);
|
||||
app.use(router);
|
||||
app.mount('#app')
|
37
src/router/routes.js
Normal file
@ -0,0 +1,37 @@
|
||||
import {
|
||||
createRouter,
|
||||
createWebHashHistory
|
||||
} from "vue-router";
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [{
|
||||
path: "/",
|
||||
meta: {
|
||||
title: '首页' //title配置
|
||||
},
|
||||
component: () => import("../view/home/index.vue")
|
||||
},{
|
||||
path: "/info",
|
||||
meta: {
|
||||
title: '详情' //title配置
|
||||
},
|
||||
component: () => import("../view/home/info.vue")
|
||||
},{
|
||||
path: "/list",
|
||||
meta: {
|
||||
title: '今日总览' //title配置
|
||||
},
|
||||
component: () => import("../view/home/list.vue")
|
||||
},{
|
||||
path: "/knowledge",
|
||||
meta: {
|
||||
title: '知识库' //title配置
|
||||
},
|
||||
component: () => import("../view/home/knowledge.vue")
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
export default router
|
420
src/view/home/index.vue
Normal file
@ -0,0 +1,420 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="lo"
|
||||
style="position:fixed;right: 0;left:0;width: 100%;z-index: 1500;margin: 0 auto;text-align: center;top: 40%">
|
||||
<n-spin size="small" stroke="#999999"></n-spin>
|
||||
</div>
|
||||
<input type="hidden" id="activeDate" value=""/>
|
||||
<input type="hidden" id="dataIndex" :value="dataIndex"/>
|
||||
<div class="contWrapper" v-if="data!=''">
|
||||
<div class="headBox">
|
||||
<div class="curDate">{{ data.currentDate }}</div>
|
||||
<div class="headTitle">{{ data.list[dataIndex].editionName }}</div>
|
||||
</div>
|
||||
<!-- Swiper 报纸轮播区域 -->
|
||||
<div
|
||||
class="swiper-container newpaper swiper-container-initialized swiper-container-horizontal swiper-container-ios">
|
||||
|
||||
<div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px);">
|
||||
<!-- 遍历版面列表 开始 -->
|
||||
<div v-for="(item,index) in data.list" class="swiper-slide" style="width: 1884px;">
|
||||
<div class="imgBoxCont">
|
||||
<img class="pichmask" :src="'/h5'+item.imageSrc"
|
||||
style="z-index: 999; opacity: 0;">
|
||||
<div class="pinch-zoom-container"
|
||||
style="overflow: hidden; position: absolute; top: 0px; height: 2724.26px;">
|
||||
<div class="pinch-zoom"
|
||||
style="transform-origin: 0% 0%; position: absolute; transform: scale(0.628, 0.628) translate(0px, 0px);">
|
||||
<img class="paperMap" :src="'/h5'+item.imageSrc"
|
||||
usemap="#PagetupMap10" style="z-index: 999; opacity: 1;">
|
||||
<map name="PagetupMap10" style="z-index:999;">
|
||||
<area v-for="(area,idx) in data.list[dataIndex].areas" :key="area.id" class="paperarea"
|
||||
@click="openNews(idx)"
|
||||
:coords="area.coords" shape="rect" :title="area.title">
|
||||
</map>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 遍历版面列表 结束 -->
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="footerWrap">
|
||||
<div class="item">
|
||||
<img src="/public/static/banmian.png" alt="">
|
||||
<div class="text layoutBtn">版面</div>
|
||||
<!-- 三角形 -->
|
||||
<!-- <div class="articletips"></div> -->
|
||||
<!-- <div class="articletipsDown"></div> -->
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="/public/static/mulu.png" alt="">
|
||||
<div class="text articleBtn">目录</div>
|
||||
<!-- 三角形 -->
|
||||
<!-- <div class="articletips"></div> -->
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="/public/static/wangqi.png" alt="">
|
||||
<div class="text datetimeBtn">往期</div>
|
||||
<!-- 三角形 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- //分享按钮 -->
|
||||
<div class="synthesis">
|
||||
<div class="item">
|
||||
<img src="/public/static/fenxiang.png" alt="">
|
||||
<div class="text">分享</div>
|
||||
</div>
|
||||
<!--<div class="dropup">
|
||||
<button class="btn btn-default dropdown-toggle shareBtn" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img src="../../../image20/fenxiang.png" alt="">分享
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul id="synthesisOpt" class="dropdown-menu shareBtnDropdown" aria-labelledby="dropdownMenu2">
|
||||
<li><a href="#">单版分享</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">多版分享</a></li>
|
||||
</ul>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="zonglan" @click="openZongLan">
|
||||
<img src="/public/static/zonglan1.png" alt="">
|
||||
</div>
|
||||
<!-- 版面列表2 -->
|
||||
<div class="layoutList layoutStyleTwo">
|
||||
<h2>版面导航</h2>
|
||||
<div class="listWrapBox">
|
||||
<div v-for="(item,index) in data.list" :class="['listWrap',index==dataIndex?'action':'']"
|
||||
@click.prevent="openBm(index)">
|
||||
<img :src="'/h5'+item.imageSrc" alt="">
|
||||
<a class="" href="#">{{ item.editionName }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="articletips"></div>
|
||||
|
||||
<div class="articleList">
|
||||
<div class="listWrap">
|
||||
<!-- 文章目录 -->
|
||||
|
||||
<div class="item itemActive">
|
||||
<div class="title">
|
||||
<h1>{{ data.list[dataIndex].editionName }}</h1>
|
||||
<span class="tips"></span>
|
||||
</div>
|
||||
<div class="listTitle">
|
||||
<a v-for="(item,index) in data.list[dataIndex].newsList" @click.prevent="openNews(index)"
|
||||
class="articleItem"
|
||||
href="#">{{ item.title }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 下面的三角形 -->
|
||||
<div class="articletips"></div>
|
||||
</div>
|
||||
<!-- 日历层 -->
|
||||
<input type="text" class="form_date">
|
||||
<!-- 取消按钮 -->
|
||||
<div class="cancelBox">
|
||||
<button class="cancelBtn">取消</button>
|
||||
</div>
|
||||
<!-- 下载层 -->
|
||||
<div class="synthPage"></div>
|
||||
<!-- 遮罩 -->
|
||||
<div class="mask"></div>
|
||||
</div>
|
||||
<div style="display:none;" id="publishVersion">3</div>
|
||||
<div style="display:none;" id="publishDateTime">{{ data.currentDate }}</div>
|
||||
<table style="display: none;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span id="NewsPaperName">固始日报</span> <span id="NewsEditionName">头版</span>
|
||||
<span id="NewsEditionNumber">01</span> <span id="NewsArticleTitle"></span>
|
||||
<span id="NewsArticleAuthor"></span><span id="NewsArticleTime">{{ data.numberDate }}</span>
|
||||
<span id="Class">1</span> <span id="jbdata">{{ data.currentDate }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="datetimepicker datetimepicker-dropdown-top-right dropdown-menu">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
import newTime from "/public/static/data/newTime.json"
|
||||
import router from "@/router/routes";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data: '',
|
||||
dataIndex: 0,
|
||||
lo: true,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dataIndex(newVal, oldVal) {
|
||||
this.dataIndex = newVal;
|
||||
console.log('dataIndex changed from', oldVal, 'to', newVal);
|
||||
// 在这里添加你需要执行的逻辑
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 添加 popstate 事件监听器
|
||||
window.addEventListener('popstate', this.handlePopState);
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁时移除事件监听器
|
||||
window.removeEventListener('popstate', this.handlePopState);
|
||||
},
|
||||
mounted() {
|
||||
this.loadScripts([
|
||||
'/h5/public/static/js/jquery.min.js',
|
||||
'/h5/public/static/js/jquery.mobile.custom.min.js',
|
||||
'/h5/public/static/js/swiper.min.js',
|
||||
'/h5/public/static/js/jquery.rwdImageMaps.min.js',
|
||||
'/h5/public/static/js/bootstrap.min.js',
|
||||
'/h5/public/static/js/bootstrap-datetimepicker.min.js',
|
||||
'/h5/public/static/js/bootstrap-datetimepicker.zh-CN.js',
|
||||
'/h5/public/static/js/jquery.qrcode.min.js',
|
||||
'/h5/public/static/js/pinchzoom.min.js',
|
||||
'/h5/public/static/js/html2canvas.min.js',
|
||||
'/h5/public/static/js/index.js',
|
||||
'/h5/public/static/js/qfstatH5.js',
|
||||
'/h5/public/static/js/posterShare.js',
|
||||
'/h5/public/static/js/bigHaiBao.js'
|
||||
]).then(() => {
|
||||
if(window.swiper){
|
||||
window.swiper.slideTo(this.dataIndex);
|
||||
}else{
|
||||
setTimeout(() => {
|
||||
window.swiper.slideTo(this.dataIndex);
|
||||
}, 500);
|
||||
}
|
||||
document.title = '今日固始-' + this.data.list[this.dataIndex].editionName;
|
||||
});
|
||||
if (!this.$route.query) {
|
||||
if (this.$route.query.date) {
|
||||
$('#activeDate').val(this.$route.query.date);
|
||||
}
|
||||
if (this.$route.query.index) {
|
||||
this.dataIndex = this.$route.query.index;
|
||||
}
|
||||
} else {
|
||||
$('#activeDate').val(newTime.time);
|
||||
}
|
||||
this.getCurrentDateMaxDay();
|
||||
//获取当前日期
|
||||
window.addEventListener('dataIndexChanged', (event) => {
|
||||
this.dataIndex = event.detail; // 更新 dataIndex
|
||||
document.title = '今日固始-' + this.data.list[event.detail].editionName;
|
||||
});
|
||||
this.hideAll();
|
||||
setTimeout(() => {
|
||||
this.lo = false;
|
||||
}, 1500);
|
||||
},
|
||||
methods: {
|
||||
handlePopState(event) {
|
||||
// 处理浏览器返回事件
|
||||
console.log('返回事件被触发', event);
|
||||
// 进行路由跳转或者状态更新
|
||||
// this.$router.go(-1);
|
||||
window.location.reload();
|
||||
},
|
||||
hideAll() {
|
||||
$('.layoutList').removeClass('active');
|
||||
$('.footerWrap .item .text').removeClass('active')
|
||||
$('.mask').removeClass('active');
|
||||
$('.articleList').removeClass('active');
|
||||
$('.exareBox').removeClass('active')
|
||||
$(".cancelBox").hide()
|
||||
},
|
||||
openBm(d) {
|
||||
this.dataIndex = d;
|
||||
sessionStorage.setItem("index", d);
|
||||
//sessionStorage.removeItem("newInfo");
|
||||
//this.showInfo = false;
|
||||
//console.log();
|
||||
document.title = '今日固始-' + this.data.list[d].editionName;
|
||||
// window.location.reload();
|
||||
window.swiper.slideTo(d)
|
||||
//var img=this.data.list[d].imageSrc;
|
||||
//$('#BantuTop').attr("src",img)
|
||||
//BantuTop
|
||||
|
||||
this.hideAll();
|
||||
},
|
||||
openNews(index) {
|
||||
console.log(index);
|
||||
sessionStorage.setItem("index", this.dataIndex);
|
||||
sessionStorage.setItem("newInfo", JSON.stringify(this.data.list[this.dataIndex].newsList[index]));
|
||||
|
||||
var activeDate = $('#activeDate').val();
|
||||
var storageTimeYear = sessionStorage.getItem("year");
|
||||
var storageTimeMonth = sessionStorage.getItem("month");
|
||||
var storageTimeDay = sessionStorage.getItem("day");
|
||||
if (storageTimeYear && storageTimeMonth && storageTimeDay) {
|
||||
activeDate = storageTimeYear + "-" + storageTimeMonth + "-" + storageTimeDay;
|
||||
} else {
|
||||
var time = activeDate ? new Date(activeDate) : new Date();
|
||||
var initYear = time.getFullYear();
|
||||
var initMonth = time.getMonth() + 1;
|
||||
var initDay = String(time.getDate()).padStart(2, '0');
|
||||
activeDate = initYear + "-" + initMonth + "-" + initDay;
|
||||
}
|
||||
router.push('/info?index=' + this.dataIndex + '&id=' + index + '&time=' + activeDate)
|
||||
},
|
||||
openZongLan() {
|
||||
var activeDate = $('#activeDate').val();
|
||||
var storageTimeYear = sessionStorage.getItem("year");
|
||||
var storageTimeMonth = sessionStorage.getItem("month");
|
||||
var storageTimeDay = sessionStorage.getItem("day");
|
||||
if (storageTimeYear && storageTimeMonth && storageTimeDay) {
|
||||
activeDate = storageTimeYear + "-" + storageTimeMonth;
|
||||
} else {
|
||||
var time = activeDate ? new Date(activeDate) : new Date();
|
||||
var initYear = time.getFullYear();
|
||||
var initMonth = time.getMonth() + 1;
|
||||
var initDay = time.getDate();
|
||||
|
||||
activeDate = initYear + "-" + initMonth;
|
||||
}
|
||||
router.push('/list?time=' + activeDate).then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
},
|
||||
getCurrentDateMaxDay() {
|
||||
var activeDate = $('#activeDate').val();
|
||||
var storageTimeYear = sessionStorage.getItem("year");
|
||||
var storageTimeMonth = sessionStorage.getItem("month");
|
||||
var storageTimeDay = sessionStorage.getItem("day");
|
||||
if (storageTimeYear && storageTimeMonth && storageTimeDay) {
|
||||
activeDate = storageTimeYear + "-" + storageTimeMonth;
|
||||
} else {
|
||||
var time = activeDate ? new Date(activeDate) : new Date();
|
||||
var initYear = time.getFullYear();
|
||||
var initMonth = time.getMonth() + 1;
|
||||
activeDate = initYear + "-" + initMonth;
|
||||
}
|
||||
console.log(activeDate);
|
||||
axios.get(`/h5/public/static/data/${activeDate}.json`)
|
||||
.then(response => {
|
||||
// 使用导入的数据
|
||||
var resIndex = response.data.list.length - 1;
|
||||
console.log('********', resIndex);
|
||||
this.data = response.data.list[resIndex];
|
||||
document.title = '今日固始-' + this.data.list[resIndex].editionName;
|
||||
console.log(this.data);
|
||||
})
|
||||
.catch(error => console.error('Error loading the JSON file:', error))
|
||||
},
|
||||
loadScripts(urls) {
|
||||
const loadScript = (url) => {
|
||||
return new Promise((resolve) => {
|
||||
const script = document.createElement('script');
|
||||
script.src = url;
|
||||
script.type = 'text/javascript';
|
||||
script.onload = resolve; // 确保脚本加载完成后再继续
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
};
|
||||
|
||||
// 依次加载所有脚本
|
||||
// 依次加载所有脚本并返回一个 Promise
|
||||
return urls.reduce((promise, url) => {
|
||||
return promise.then(() => loadScript(url));
|
||||
}, Promise.resolve());
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style src="/public/static/css/swiper.min.css"></style>
|
||||
<style src="/public/static/css/bootstrap.min.css"></style>
|
||||
<style src="/public/static/css/bootstrap-datetimepicker.min.css"></style>
|
||||
<style src="/public/static/css/global.css"></style>
|
||||
<style>
|
||||
@import url(/public/static/css/index.css);
|
||||
|
||||
#_copy {
|
||||
align-items: center;
|
||||
background: #4494d5;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
height: 30px;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
z-index: 1000
|
||||
}
|
||||
|
||||
#select-tooltip, #sfModal, .modal-backdrop, div[id^=reader-helper] {
|
||||
display: none !important
|
||||
}
|
||||
|
||||
.modal-open {
|
||||
overflow: auto !important
|
||||
}
|
||||
|
||||
._sf_adjust_body {
|
||||
padding-right: 0 !important
|
||||
}
|
||||
|
||||
.super_copy_btns_div {
|
||||
position: fixed;
|
||||
width: 154px;
|
||||
left: 10px;
|
||||
top: 45%;
|
||||
background: #e7f1ff;
|
||||
border: 2px solid #4595d5;
|
||||
font-weight: 600;
|
||||
border-radius: 2px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
||||
z-index: 5000
|
||||
}
|
||||
|
||||
.super_copy_btns_logo {
|
||||
width: 100%;
|
||||
background: #4595d5;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #e7f1ff;
|
||||
line-height: 30px;
|
||||
height: 30px
|
||||
}
|
||||
|
||||
.super_copy_btns_btn {
|
||||
display: block;
|
||||
width: 128px;
|
||||
height: 28px;
|
||||
background: #7f5711;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
margin: 8px auto;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
opacity: .9
|
||||
}
|
||||
|
||||
.super_copy_btns_btn:hover {
|
||||
opacity: .8
|
||||
}
|
||||
|
||||
.super_copy_btns_btn:active {
|
||||
opacity: 1
|
||||
}
|
||||
</style>
|
198
src/view/home/info.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="content" v-if="activeDate">
|
||||
<div style="font-size: 20px;color: #333333;font-weight: 600">{{ activeDate.title }}</div>
|
||||
<div class="em">{{ activeDate.reporter }}</div>
|
||||
<div :class="'font' + fontSize" style="line-height: 30px;" v-html="activeDate.content"></div>
|
||||
<div id="PageBtn">
|
||||
<div class="MenuBox">
|
||||
<a id="Haibao_share" @click="copy()" href="javascript:(-1);"
|
||||
style="background-image: url(/h5/public/static/share.png);background-position: center;background-repeat: repeat;"></a>
|
||||
<a @click.prevent="openUrl()" href="javascript:(-1);"><img src="/public/static/home.png" alt=""
|
||||
id="Menu_home"></a>
|
||||
<a @click.prevent="addFontSize('da')" id="Menu_larger" href="javascript:(-1);"
|
||||
style="background-image: url(/h5/public/static/font-larger.png);background-position: center;background-repeat: repeat;"></a>
|
||||
<a @click="addFontSize('xiao')" id="Menu_smaller" href="javascript:(-1);"
|
||||
style="background-image: url(/h5/public/static/font-smaller.png);background-position: center;background-repeat: repeat;"></a>
|
||||
<a id="read-btn" @click="readMp3()" href="javascript:(-1);">
|
||||
<img v-if="!isPlay" src="/public/static/voice_pause.png" alt="">
|
||||
<img v-if="isPlay" src="/public/static/voice_play.png" alt="">
|
||||
</a>
|
||||
<a @click.prevent="openTop()"><img src="/public/static/goTop.png" alt="" id="Menu_Top"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shareList">
|
||||
<audio ref="audioPlayer" @ended="readEnd" controls
|
||||
:src='activeDate.mp3Url'
|
||||
@canplaythrough="onAudioLoaded"
|
||||
style='width:100%;display:none;'></audio>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, onMounted, nextTick} from 'vue';
|
||||
import {useRoute} from 'vue-router';
|
||||
import router from "@/router/routes";
|
||||
import axios from "axios";
|
||||
import $ from 'jquery';
|
||||
|
||||
const route = useRoute();
|
||||
const info = ref({});
|
||||
const fontSize = ref(14);
|
||||
const activeDate = ref();
|
||||
onMounted(() => {
|
||||
console.log(route.query);
|
||||
getList(route.query);
|
||||
})
|
||||
const copy = () => {
|
||||
let url = window.location.href; // 当前页面链接
|
||||
fallbackCopyTextToClipboard(url);
|
||||
alert('链接已复制到剪贴板');
|
||||
}
|
||||
const audioPlayer = ref(null);
|
||||
const isPlay = ref(false);
|
||||
const readMp3 = () => {
|
||||
if (isPlay.value) {
|
||||
audioPlayer.value.pause();
|
||||
} else {
|
||||
audioPlayer.value.play();
|
||||
}
|
||||
isPlay.value = !isPlay.value;
|
||||
}
|
||||
const onAudioLoaded = () => {
|
||||
console.log('Audio has been loaded and is ready to play.');
|
||||
}
|
||||
const readEnd = () => {
|
||||
isPlay.value = false;
|
||||
}
|
||||
const fallbackCopyTextToClipboard = (text) => {
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
|
||||
// Avoid scrolling to bottom
|
||||
textArea.style.top = '0';
|
||||
textArea.style.left = '0';
|
||||
textArea.style.position = 'fixed';
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
const successful = document.execCommand('copy');
|
||||
const msg = successful ? 'successful' : 'unsuccessful';
|
||||
console.log('Fallback: Copying text command was ' + msg);
|
||||
} catch (err) {
|
||||
console.error('Fallback: Oops, unable to copy', err);
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
const getList = (item) => {
|
||||
const date = new Date(item.time);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要加1,并且补零
|
||||
axios.get(`/h5/public/static/data/${year}-${month}.json`)
|
||||
.then(response => {
|
||||
// 使用导入的数据
|
||||
//activeDate.value = response.data;
|
||||
console.log(response.data.list);
|
||||
console.log(item.time);
|
||||
const targetData = response.data.list.find(data => data.numberDate == item.time);
|
||||
activeDate.value = targetData.list[item.index].newsList[item.id];
|
||||
console.log(activeDate.value)
|
||||
})
|
||||
.catch(error => console.error('Error loading the JSON file:', error))
|
||||
}
|
||||
const openUrl = () => {
|
||||
router.push('/').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
const addFontSize = (type) => {
|
||||
if (type == 'da') {
|
||||
if (fontSize.value == 29) {
|
||||
return;
|
||||
}
|
||||
fontSize.value += 3;
|
||||
} else if (type == 'xiao') {
|
||||
if (fontSize.value == 14) {
|
||||
return;
|
||||
}
|
||||
fontSize.value -= 3;
|
||||
} else {
|
||||
fontSize.value = 14;
|
||||
}
|
||||
}
|
||||
const openTop = () => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth' // 平滑滚动
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.content {
|
||||
height: 100%;
|
||||
padding: 10px 20px;
|
||||
overflow-y: auto;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.content .em {
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.MenuBox {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 20px;
|
||||
z-index: 99;
|
||||
/*图片轮播新增样式*/
|
||||
}
|
||||
|
||||
.MenuBox img {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.MenuBox a {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.font14 {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.font17 {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
|
||||
.font20 {
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
.font23 {
|
||||
font-size: 23px !important;
|
||||
}
|
||||
|
||||
.font26 {
|
||||
font-size: 26px !important;
|
||||
}
|
||||
|
||||
.font29 {
|
||||
font-size: 29px !important;
|
||||
}
|
||||
</style>
|
90
src/view/home/knowledge.vue
Normal file
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<div style="background: #ECECEC;height: 100vh;position: fixed;" v-if="aiInfo">
|
||||
<img src="/public/static/left1.png" style="height: 100%;position: absolute;top: 65px">
|
||||
<img src="/public/static/right6.png" style="height: 100px;position: absolute;bottom: 0px;right: 0px">
|
||||
<div style="padding:10px 15px;background-color: white" @click="openUrl()">
|
||||
<n-flex align="end" :size="[5,0]">
|
||||
<div>
|
||||
<img src="/public/static/icon_top.png" style="width: 130px;">
|
||||
</div>
|
||||
<div style="height: 40px;width: 2px;background: #D9D9D9;"></div>
|
||||
<div>
|
||||
<span style="font-size: 22px;font-weight: 600">AI</span>
|
||||
<span style="font-weight: 600;font-size: 14px;margin-left: 10px">知识库</span>
|
||||
</div>
|
||||
</n-flex>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<img src="/public/static/top1.png" style="width: 100%">
|
||||
</div>
|
||||
<div style="padding: 20px">
|
||||
<n-flex :size="[0,0]" align="center" justify="space-between">
|
||||
<div style="height: 40px;width: 1px;background-color: #000000;"></div>
|
||||
<div style="background: rgba(0,0,0,0.1);width: 90%;padding:10px 15px;font-size: 20px;font-weight: 600">
|
||||
{{ aiInfo.name }}
|
||||
</div>
|
||||
<div style="height: 40px;width: 1px;background-color: #000000;"></div>
|
||||
</n-flex>
|
||||
<VueTypewriter
|
||||
class="tl"
|
||||
ref="typewriter"
|
||||
:interval="30"
|
||||
cursorStr=""
|
||||
@writeIsWrite="handleWriteStart"
|
||||
>
|
||||
<div id="gdt" class="gdt"
|
||||
style="overflow-y: scroll;height:60vh;border: 1px solid #000000;background-color: white;padding: 13px;line-height: 32px;margin-top: 20px">
|
||||
<div v-html="aiInfo.content"></div>
|
||||
</div>
|
||||
</VueTypewriter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import VueTypewriter from "@/components/Writer.vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
import {useRoute} from 'vue-router';
|
||||
import zsk from "/public/static/data/gjz.json"
|
||||
import router from "@/router/routes";
|
||||
const route = useRoute();
|
||||
const position = ref(0);
|
||||
const aiInfo = ref();
|
||||
const typewriter = ref(null);
|
||||
onMounted(() => {
|
||||
console.log(route.query.id)
|
||||
var info = zsk.list.find(item => item.id == route.query.id);
|
||||
//console.log(info)
|
||||
aiInfo.value = info;
|
||||
});
|
||||
const handleWriteStart = () => {
|
||||
const ele = document.getElementsByClassName("gdt")[0];
|
||||
//console.log(ele)
|
||||
ele.scrollTop = ele.scrollHeight;
|
||||
}
|
||||
const openUrl = () => {
|
||||
router.push('/').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.gdt::-webkit-scrollbar {
|
||||
width: 5px; /* 滚动条宽度 */
|
||||
}
|
||||
|
||||
.gdt::-webkit-scrollbar-track {
|
||||
background: #f1f1f1; /* 滚动条轨道背景色 */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gdt::-webkit-scrollbar-thumb {
|
||||
background: #888; /* 滚动条滑块背景色 */
|
||||
border-radius: 5px; /* 滑块圆角 */
|
||||
}
|
||||
|
||||
.gdt::-webkit-scrollbar-thumb:hover {
|
||||
background: #555; /* 滑块悬停时的背景色 */
|
||||
}
|
||||
</style>
|
149
src/view/home/list.vue
Normal file
@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div>
|
||||
<input type="hidden" id="activeDate" value=""/>
|
||||
<div class="topBox" v-if="data !== ''">
|
||||
<div class="cp">{{ data.currentDate }}-版面总览</div>
|
||||
<div class="divider"></div>
|
||||
<div class="divider"></div>
|
||||
<div class="thumbnail-left-left clearfix">
|
||||
<ul>
|
||||
<li v-for="(item, index) in data.list" class="shortjpg">
|
||||
<p><span class="title">{{ item.editionName }}</span></p>
|
||||
<a href="#" @click.prevent="openBm(index)">
|
||||
<img class="paperImg" :src="'/h5'+item.imageSrc" border="0" style="width: 100%;">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="footerBox">
|
||||
<div class="footerWrap wangqi">
|
||||
|
||||
<div class="item">
|
||||
<img src="/public/static/wangqi.png" alt="">
|
||||
<div class="text datetimeBtn">往期</div>
|
||||
<!-- 三角形 -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- //分享按钮 -->
|
||||
<div class="synthesis share">
|
||||
<div class="item">
|
||||
<img src="/public/static/fenxiang.png" alt="">
|
||||
<div class="text">分享</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 日历层 -->
|
||||
<input type="text" class="form_date">
|
||||
<!-- 取消按钮 -->
|
||||
<div class="cancelBox" style="display: none;">
|
||||
<button class="cancelBtn">取消</button>
|
||||
</div>
|
||||
<!-- 下载层 -->
|
||||
<div class="synthPage"></div>
|
||||
<!-- 遮罩 -->
|
||||
|
||||
</div>
|
||||
<div class="mask"></div>
|
||||
<div style="display:none;" id="publishDateTime">{{ data.currentDate }}</div>
|
||||
<table style="display: none;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span id="NewsPaperName">河南日报</span> <span id="NewsEditionName">#current-ed-name#</span>
|
||||
<span id="NewsEditionNumber">#current-ed-no#</span> <span id="NewsArticleTitle"></span>
|
||||
<span id="NewsArticleAuthor"></span><span id="NewsArticleTime">2024-12-17</span><span id="Class">1</span>
|
||||
<span id="jbdata">2024年12月17日 星期二</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import newTime from "/public/static/data/newTime.json";
|
||||
import $ from 'jquery';
|
||||
import router from "@/router/routes";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
time: '',
|
||||
data: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
$('#activeDate').val(newTime.time);
|
||||
this.loadScripts([
|
||||
'/h5/public/static/js/jquery.min.js',
|
||||
'/h5/public/static/js/jquery.mobile.custom.min.js',
|
||||
'/h5/public/static/js/bootstrap.min.js',
|
||||
'/h5/public/static/js/bootstrap-datetimepicker.min.js',
|
||||
'/h5/public/static/js/bootstrap-datetimepicker.zh-CN.js',
|
||||
'/h5/public/static/js/jquery.qrcode.min.js',
|
||||
'/h5/public/static/js/pinchzoom.min.js',
|
||||
'/h5/public/static/js/html2canvas.min.js',
|
||||
'/h5/public/static/js/navi.js',
|
||||
'/h5/public/static/js/qfstatH5.js',
|
||||
'/h5/public/static/js/posterShare.js',
|
||||
'/h5/public/static/js/bigHaiBao.js'
|
||||
]);
|
||||
this.time = this.$route.query.time;
|
||||
this.getJson();
|
||||
},
|
||||
methods: {
|
||||
openBm(index){
|
||||
sessionStorage.setItem("index", index);
|
||||
router.push('/').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
},
|
||||
getJson() {
|
||||
axios.get(`/h5/public/static/data/${this.time}.json`)
|
||||
.then(response => {
|
||||
var resIndex = response.data.list.length - 1;
|
||||
this.data = response.data.list[resIndex];
|
||||
console.log(this.data);
|
||||
})
|
||||
.catch(error => console.error('Error loading the JSON file:', error));
|
||||
},
|
||||
loadScripts(urls) {
|
||||
const loadScript = (url) => {
|
||||
return new Promise((resolve) => {
|
||||
const script = document.createElement('script');
|
||||
script.src = url;
|
||||
script.type = 'text/javascript';
|
||||
script.onload = resolve; // 确保脚本加载完成后再继续
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
};
|
||||
// 依次加载所有脚本
|
||||
urls.reduce((promise, url) => {
|
||||
return promise.then(() => loadScript(url));
|
||||
}, Promise.resolve());
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style src="/public/static/css/swiper.min.css"></style>
|
||||
<style src="/public/static/css/bootstrap.min.css"></style>
|
||||
<style src="/public/static/css/bootstrap-datetimepicker.min.css"></style>
|
||||
<style src="/public/static/css/index_list.css"></style>
|
||||
<style src="/public/static/css/global.css"></style>
|
||||
<style src="/public/static/css/navi.css"></style>
|
||||
<style>
|
||||
.cp {
|
||||
height: 42px;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
line-height: 42px;
|
||||
margin: 8px 0 12px 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
16
vite.config.js
Normal file
@ -0,0 +1,16 @@
|
||||
import {
|
||||
defineConfig
|
||||
} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import path from "path"
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: '/h5/', // 设置为您的二级目录名称
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
// Vite路径别名配置
|
||||
alias: {
|
||||
'@': path.resolve('./src')
|
||||
}
|
||||
},
|
||||
})
|