增加视频

This commit is contained in:
王创世 2025-04-14 15:20:31 +08:00
parent 926d14bf6e
commit ee0a4c3d50
10 changed files with 1005 additions and 291 deletions

60
.gitignore vendored Normal file
View File

@ -0,0 +1,60 @@
# Dependencies
/node_modules
/dist
# Local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Build output
/dist
/build
# Cache directories
.cache
.temp
# Coverage directory
/coverage
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*

109
.idea/workspace.xml generated
View File

@ -5,59 +5,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e11c9797-a6f9-465b-b13b-58e9e5eed50f" name="更改" comment="123">
<change afterPath="$PROJECT_DIR$/dist.zip" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/center.c81186bc.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/icon_top.5e55000a.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/index.67145470.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/index.d02c565a.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/index.f0b00bde.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/jquery.b9f510f5.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/knowledge.07c9cc68.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/knowledge.0a067a58.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/left3.4b015ba3.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/right1.f4990ed4.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/right5.3e6915ea.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/assets/vendor.59a0f5d3.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/favicon.ico" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/index.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/center.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/css/jquery-ui.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/css/reset.min.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/css/style.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/icon_default.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/icon_pdf.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/icon_plus.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/icon_sub.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/icon_top.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/Canvas_range.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/common.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/index.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/jquery-ui.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/jquery-ui.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/jquery.datepicker.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/jquery.min.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/js/jquery.rwdImageMaps.min.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/left1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/left2.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/left3.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/left4.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right2.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right3.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right4.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right5.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dist/public/static/right6.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-01.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-01.pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-02.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-02.pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-03.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-03.pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-04.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/2024-11-07/632-04.pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/data/2024-11.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/data/newTime.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/public/static/js/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/public/static/js/index.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/view/home/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/view/home/index.vue" afterDir="false" />
</list>
@ -101,7 +49,6 @@
&quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;last_opened_file_path&quot;: &quot;E:/小程序/电子报API&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
@ -133,7 +80,7 @@
<recent name="E:\小程序\电子报\public\static" />
</key>
</component>
<component name="RunManager" selected="npm.dev">
<component name="RunManager" selected="npm.build">
<configuration name="build" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
@ -188,7 +135,33 @@
<workItem from="1735260138672" duration="4652000" />
<workItem from="1735286305103" duration="348000" />
<workItem from="1735287696015" duration="2020000" />
<workItem from="1735291368045" duration="823000" />
<workItem from="1735291368045" duration="1110000" />
<workItem from="1735520313176" duration="250000" />
<workItem from="1735521015778" duration="1100000" />
<workItem from="1735537690634" duration="4528000" />
<workItem from="1735607064954" duration="2284000" />
<workItem from="1735978815167" duration="1927000" />
<workItem from="1736141788948" duration="1914000" />
<workItem from="1736155511203" duration="1939000" />
<workItem from="1736213208495" duration="1143000" />
<workItem from="1736241758321" duration="922000" />
<workItem from="1736243041059" duration="589000" />
<workItem from="1736243881273" duration="273000" />
<workItem from="1736484946736" duration="5927000" />
<workItem from="1736493694067" duration="625000" />
<workItem from="1736557470763" duration="43000" />
<workItem from="1736562606105" duration="1751000" />
<workItem from="1736574215323" duration="208000" />
<workItem from="1736575091090" duration="611000" />
<workItem from="1736733554813" duration="2595000" />
<workItem from="1736736935673" duration="1199000" />
<workItem from="1736758172572" duration="1367000" />
<workItem from="1737597129842" duration="1678000" />
<workItem from="1737679917343" duration="40000" />
<workItem from="1737680740000" duration="3261000" />
<workItem from="1738809156971" duration="125000" />
<workItem from="1739150346339" duration="1255000" />
<workItem from="1739176083940" duration="2576000" />
</task>
<task id="LOCAL-00001" summary="123">
<option name="closed" value="true" />
@ -246,7 +219,31 @@
<option name="project" value="LOCAL" />
<updated>1735260774543</updated>
</task>
<option name="localTasksCounter" value="8" />
<task id="LOCAL-00008" summary="123">
<option name="closed" value="true" />
<created>1735293440876</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1735293440876</updated>
</task>
<task id="LOCAL-00009" summary="123">
<option name="closed" value="true" />
<created>1737597799709</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1737597799709</updated>
</task>
<task id="LOCAL-00010" summary="123">
<option name="closed" value="true" />
<created>1738809270409</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1738809270409</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">

877
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,12 +15,12 @@
"vue-wechat-title": "^2.0.7"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.6.0",
"@vitejs/plugin-vue": "^1.10.2",
"@vue/compiler-sfc": "^3.2.6",
"naive-ui": "^2.40.3",
"sass": "^1.77.6",
"vfonts": "^0.0.3",
"vite": "^2.5.2",
"vite": "^2.9.18",
"vite-plugin-copy": "^0.1.6"
}
}

View File

@ -88,7 +88,7 @@ function getPaper(m) {
var data = {'day': [], 'url': [], 'date': []};
$.ajax({
data:{'date':m},
url: "https://jinrigushi.gushitv.com/api/dzb/date/index",
url: "http://democs.gushitv.com/api/dzb/date/dateList",
type: 'POST',
dataType: 'json',
async: false,
@ -134,7 +134,7 @@ Page.initJump2Date = function () {
}
if (url != "")
{
window.location.href = "https://jinrigushi.gushitv.com/#/?date="+year + '-' + fixNumer(month) + '-' + fixNumer(day);
window.location.href = "http://democs.gushitv.com/#/?date="+year + '-' + fixNumer(month) + '-' + fixNumer(day);
setTimeout(()=>{
window.location.reload();
},100)

View File

@ -246,7 +246,7 @@
//var dddd=sessionStorage.getItem("DateList");
options.onSelect && options.onSelect(year + '-' + fixNumer(month) + '-' + fixNumer(curDay), $this);
window.location.href = "https://jinrigushi.gushitv.com/#/?date="+year + '-' + fixNumer(month) + '-' + fixNumer(curDay);
window.location.href = "http://democs.gushitv.com/#/?date="+year + '-' + fixNumer(month) + '-' + fixNumer(curDay);
setTimeout(()=>{
window.location.reload();
},100)

View File

@ -1,7 +1,7 @@
import axios from 'axios';
// request.js
// 创建新的axios实例
const baseURL='https://hnyea.0rui.cn/';
const baseURL='/';
console.log(window.location.protocol);
const service = axios.create({
// 环境变量,需要在.env文件中配置

View File

@ -6,19 +6,20 @@
<div class="fl">
<div class="pic-box">
<img :src="data[dataIndex].bm_img" id="Bantu" width="408px" border="0" usemap="#newbook"
style="opacity: 0; position: absolute; left: 50%; transform: translateX(-50%); top: 16px; z-index: 9;">
style="opacity: 0; position: absolute; left: 50%; transform: translateX(-50%); top: 16px; z-index: 9;">
<canvas id="coorCanvas" width="408px" height="590px"
style="position: absolute;top: 15px;left:50%;transform: translateX(-50%); opacity: 1;"></canvas>
style="position: absolute;top: 15px;left:50%;transform: translateX(-50%); opacity: 1;"></canvas>
<map name="newbook">
<area v-for="area in data[dataIndex].news" :key="area.id" class="paperarea" @click="openNews(area)"
:coords="area.coordinate" shape="rect" :title="area.new_name">
:coords="area.coordinate" shape="rect" :title="area.new_name">
</map>
<div class="pic-info clearfix">
<span class="pic-info-summary fl">{{ data[dataIndex].bm_name }}</span>
<div class="pic-info-ctrls clearfix fr">
<a class="pic-info-ctrl pic-info-ctrl-prev" title="阅读上一版" @click.prevent="openNext('top')" href="#">上一版</a>
<a class="pic-info-ctrl pic-info-ctrl-prev" title="阅读上一版" @click.prevent="openNext('top')"
href="#">上一版</a>
<a class="pic-info-ctrl pic-info-ctrl-next" title="阅读下一版" @click.prevent="openNext('bottom')"
href="#">下一版</a>
href="#">下一版</a>
</div>
</div>
</div>
@ -27,7 +28,8 @@
<div class="main-news-main">
<ul class="news-list">
<li class="news-item" v-for="news in data[dataIndex].news" :key="news.new_name">
<a href="#" @click.prevent="openNews(news)" target="_blank" :alt="news.new_name" :title="news.new_name">{{
<a href="#" @click.prevent="openNews(news)" target="_blank" :alt="news.new_name"
:title="news.new_name">{{
news.new_name
}}</a>
</li>
@ -50,12 +52,12 @@
<span class="main-tools-date fl">{{ datetime }}</span>
<div class="main-tools-ctrls fr">
<a class="main-tools-ctrl main-tools-ctrl-index" @click.prevent="goHome()" title="回到数字报首页"
href="#">数字报首页</a>
href="#">数字报首页</a>
</div>
</div>
<div v-if="showInfo" class="swiper-box clearfix" style="position:relative;height: 35px;">
<div class="swiper-container">
<div v-for="(item,index) in data" class="swiper-slide">
<div v-for="(item, index) in data" class="swiper-slide">
<a href="#" @click.prevent="openBm(index)">{{ item.bm_name }}</a>
</div>
</div>
@ -89,7 +91,11 @@
<p class="datesource">{{ targetInfo.reporter }}</p>
<br>
<div class="info">
<div :class="'font'+fontSize" v-html="targetInfo.content"></div>
<div>
<video style="width: 100%;max-height: 300px;margin: 0 auto;" v-if="targetInfo.video != '' && targetInfo.video != null"
:src="targetInfo.video" controls></video>
</div>
<div :class="'font' + fontSize" v-html="targetInfo.content"></div>
</div>
</div>
@ -102,7 +108,7 @@
<li class="layout-catalogue-item" v-for="(item, index) in data" :key="item.bm_name">
<a href="#" :title="item.title" @click.prevent="openBm(index)">{{ item.bm_name }}</a>
<a class="pdf" target="_blank" :href="item.bm_pdf"
:style="{ width: '35px', height: '35px', position: 'absolute', right: '0px', background: `url(${iconPdf}) no-repeat center` }"></a>
:style="{ width: '35px', height: '35px', position: 'absolute', right: '0px', background: `url(${iconPdf}) no-repeat center` }"></a>
</li>
</ul>
</div>
@ -148,7 +154,8 @@
<div class="main-news-main">
<ul class="news-list">
<li class="news-item" v-for="news in data[dataIndex].news" :key="news.new_name">
<a href="#" @click.prevent="openNews(news)" target="_blank" :alt="news.new_name" :title="news.new_name">{{
<a href="#" @click.prevent="openNews(news)" target="_blank" :alt="news.new_name"
:title="news.new_name">{{
news.new_name
}}</a>
</li>
@ -184,19 +191,19 @@ export default {
this.dataIndex = index ? index : 0;
this.getCurrentDateMaxDay();
console.log(this.$route.query.id)
if(typeof (this.$route.query.id)!='undefined'){
if (typeof (this.$route.query.id) != 'undefined') {
this.getInfo(this.$route.query.id);
}
if (this.$route.query.date) {
//$('#activeDate').val(this.$route.query.date);
var time = new Date(this.$route.query.date);
var initYear = time.getFullYear();
var initMonth = String(time.getMonth() + 1).padStart(2, '0');
var initDay = String(time.getDate()).padStart(2, '0');
sessionStorage.setItem("year", initYear);
sessionStorage.setItem("month", initMonth);
sessionStorage.setItem("day", initDay);
}
if (this.$route.query.date) {
//$('#activeDate').val(this.$route.query.date);
var time = new Date(this.$route.query.date);
var initYear = time.getFullYear();
var initMonth = String(time.getMonth() + 1).padStart(2, '0');
var initDay = String(time.getDate()).padStart(2, '0');
sessionStorage.setItem("year", initYear);
sessionStorage.setItem("month", initMonth);
sessionStorage.setItem("day", initDay);
}
//document.title =this.data.list[this.dataIndex].editionName;
// var newInfo = sessionStorage.getItem("newInfo");
// if (newInfo) {
@ -276,36 +283,36 @@ export default {
}
},
getTypeList() {
axios.post("https://jinrigushi.gushitv.com/api/dzb/type/index")
.then(response => {
console.log(response);
this.typeList = response.data.data;
var typeId = sessionStorage.getItem("typeId");
if (typeId) {
this.typeId = typeId;
} else {
this.typeId = response.data.data[0].id;
}
this.getCurrentDateMaxDay();
})
.catch(error => console.error('Error loading the JSON file:', error))
axios.post("http://democs.gushitv.com/api/dzb/type/index")
.then(response => {
console.log(response);
this.typeList = response.data.data;
var typeId = sessionStorage.getItem("typeId");
if (typeId) {
this.typeId = typeId;
} else {
this.typeId = response.data.data[0].id;
}
this.getCurrentDateMaxDay();
})
.catch(error => console.error('Error loading the JSON file:', error))
},
getInfo(item) {
axios.post("https://jinrigushi.gushitv.com/api/h5/news/find", {id: item})
.then(response => {
// 使
//activeDate.value = response.data;
var info = response.data.data;
//info.content = info.content.replace(/href="\/dist\//g, 'href="/h5/');
//console.log(item.time);
//const targetData = response.data.list.find(data => data.numberDate == item.time);
//activeDate.value = info;
//console.log(activeDate.value)
this.targetInfo = info;
sessionStorage.setItem("newInfo", JSON.stringify(info));
this.showInfo = true;
})
.catch(error => console.error('Error loading the JSON file:', error))
axios.post("http://democs.gushitv.com/api/h5/news/find", { id: item })
.then(response => {
// 使
//activeDate.value = response.data;
var info = response.data.data;
//info.content = info.content.replace(/href="\/dist\//g, 'href="/h5/');
//console.log(item.time);
//const targetData = response.data.list.find(data => data.numberDate == item.time);
//activeDate.value = info;
//console.log(activeDate.value)
this.targetInfo = info;
sessionStorage.setItem("newInfo", JSON.stringify(info));
this.showInfo = true;
})
.catch(error => console.error('Error loading the JSON file:', error))
},
openBm(d) {
this.dataIndex = d;
@ -317,9 +324,9 @@ export default {
url = url.replace(/&id=\d+/, '');
url = url.replace(/\?id=\d+/, '');
window.location.href = url;
setTimeout(()=>{
setTimeout(() => {
window.location.reload();
},100)
}, 100)
//var img=this.data.list[d].imageSrc;
//$('#BantuTop').attr("src",img)
//BantuTop
@ -333,60 +340,81 @@ export default {
},
getCurrentDateMaxDay() {
var activeDate = $('input[name="activeDate"]').val();
var querySatus='';
var querySatus = '';
var storageTimeYear = sessionStorage.getItem("year");
var storageTimeMonth = sessionStorage.getItem("month");
var storageTimeDay = sessionStorage.getItem("day");
if (storageTimeYear && storageTimeMonth && storageTimeDay) {
activeDate = storageTimeYear + "-" + storageTimeMonth;
activeDate = storageTimeYear + "-" + this.getMd(storageTimeMonth);
}
console.log(this.$route.query.date);
if (typeof (this.$route.query.date) != 'undefined') {
activeDate = this.$route.query.date;
activeDate = activeDate.substring(0, 7); //
//activeDate = activeDate.substring(0, 7); //
}
if (typeof (this.$route.query.status) != 'undefined') {
querySatus=this.$route.query.status;
querySatus = this.$route.query.status;
}
console.log(activeDate);
axios.post("https://jinrigushi.gushitv.com/api/dzb/date/index", {date: activeDate,status:querySatus})
.then(response => {
console.log(response);
if (response.data.data.length == 0) {
alert('本月没有数据');
sessionStorage.removeItem("typeId");
sessionStorage.removeItem("DateIndex");
sessionStorage.removeItem("newInfo");
sessionStorage.removeItem("DateList");
window.location.href = "https://jinrigushi.gushitv.com/";
return;
}
// 使
var resIndex = response.data.data.length - 1;
console.log('********', resIndex);
sessionStorage.setItem('DateList', JSON.stringify(response.data.data));
axios.post("http://democs.gushitv.com/api/dzb/date/index", { date: activeDate, status: querySatus })
.then(response => {
console.log(response);
if (response.data.data.length == 0) {
alert('本月没有数据');
sessionStorage.removeItem("typeId");
sessionStorage.removeItem("DateIndex");
sessionStorage.removeItem("newInfo");
sessionStorage.removeItem("DateList");
window.location.href = "http://democs.gushitv.com/";
return;
}
// 使
var resIndex = response.data.data.length - 1;
console.log('********', resIndex);
sessionStorage.setItem('DateList', JSON.stringify(response.data.data));
sessionStorage.setItem('DateIndex', resIndex);
$('input[name="activeDate"]').val(response.data.data[resIndex].datetime);
sessionStorage.setItem('DateIndex', resIndex);
$('input[name="activeDate"]').val(response.data.data[resIndex].datetime);
//this.datetime = this.getCurrentDateFormatted(response.data.data[resIndex].datetime);
//document.title = '-' + this.datetime;
// if(storageTimeMonth == '' || typeof (storageTimeMonth)=='undefined'){
// this.datetime = this.getCurrentDateFormatted(response.data.data[resIndex].datetime);
// document.title = '-' + this.datetime;
// }else{
// document.title = '-' +storageTimeYear + "" + this.getMd(storageTimeMonth)+""+this.getMd(storageTimeDay)+"";
// }
if (typeof (this.$route.query.date) != 'undefined') {
var time = new Date(this.$route.query.date);
var initYear = time.getFullYear();
var initMonth = String(time.getMonth() + 1).padStart(2, '0');
var initDay = String(time.getDate()).padStart(2, '0');
document.title = '《今日固始》电子版-' + initYear + "年" + initMonth + "月" + initDay + "日";
} else {
this.datetime = this.getCurrentDateFormatted(response.data.data[resIndex].datetime);
document.title = '《今日固始》电子版-' + this.datetime;
this.getBm();
})
.catch(error => console.error('Error loading the JSON file:', error))
}
this.getBm();
})
.catch(error => console.error('Error loading the JSON file:', error))
},
getMd(num) {
return ('0' + num).slice(-2);
},
getBm() {
var seList=sessionStorage.getItem('DateList')
console.log('********',seList);
var seList = sessionStorage.getItem('DateList')
console.log('********', seList);
var list = JSON.parse(seList);
console.log('********',this.$route.query.date);
console.log('********', this.$route.query.date);
var storageTimeYear = sessionStorage.getItem("year");
var storageTimeMonth = sessionStorage.getItem("month");
var storageTimeDay = sessionStorage.getItem("day");
if (typeof (this.$route.query.date) != 'undefined') {
const targetData = list.find(item => item.datetime == this.$route.query.date);
console.log(targetData)
if(typeof (targetData)=='undefined'){
if (typeof (targetData) == 'undefined') {
alert('当日没有报纸!');
sessionStorage.removeItem("typeId");
sessionStorage.removeItem("DateIndex");
@ -395,11 +423,11 @@ export default {
sessionStorage.removeItem("year");
sessionStorage.removeItem("month");
sessionStorage.removeItem("day");
window.location.href = "https://jinrigushi.gushitv.com/";
window.location.href = "http://democs.gushitv.com/";
return;
}
var id = targetData.id;
}else{
} else {
if (storageTimeYear && storageTimeMonth && storageTimeDay) {
var activeDate = storageTimeYear + "-" + storageTimeMonth + '-' + storageTimeDay;
console.log(activeDate)
@ -411,22 +439,22 @@ export default {
var id = list[index].id;
}
}
axios.post("https://jinrigushi.gushitv.com/api/dzb/bm/index", {date_id: id})
.then(response => {
console.log(response);
this.data = response.data.data;
axios.post("http://democs.gushitv.com/api/dzb/bm/index", { date_id: id })
.then(response => {
console.log(response);
this.data = response.data.data;
this.loadScripts([
'/dist/public/static/js/jquery.min.js',
'/dist/public/static/js/jquery-ui.js',
'/dist/public/static/js/jquery.datepicker.js',
'/dist/public/static/js/jquery.rwdImageMaps.min.js',
'/dist/public/static/js/Canvas_range.js',
'/dist/public/static/js/common.js',
'/dist/public/static/js/index.js'
]);
})
.catch(error => console.error('Error loading the JSON file:', error))
this.loadScripts([
'/dist/public/static/js/jquery.min.js',
'/dist/public/static/js/jquery-ui.js',
'/dist/public/static/js/jquery.datepicker.js',
'/dist/public/static/js/jquery.rwdImageMaps.min.js',
'/dist/public/static/js/Canvas_range.js',
'/dist/public/static/js/common.js',
'/dist/public/static/js/index.js'
]);
})
.catch(error => console.error('Error loading the JSON file:', error))
},
loadScripts(urls) {
const loadScript = (url) => {
@ -470,9 +498,9 @@ export default {
}
window.location.href = url;
console.log(url)
setTimeout(()=>{
setTimeout(() => {
window.location.reload();
},100)
}, 100)
},
goHome() {
@ -486,9 +514,9 @@ export default {
url = url.replace(/&id=\d+/, '');
url = url.replace(/\?id=\d+/, '');
window.location.href = url;
setTimeout(()=>{
setTimeout(() => {
window.location.reload();
},100)
}, 100)
},
}
};

View File

@ -132,7 +132,7 @@ onMounted(() => {
});
const getInfo = () =>
{
axios.post("https://jinrigushi.gushitv.com/api/dzb/zsk/find", {id: infoId.value})
axios.post("http://democs.gushitv.com/api/dzb/zsk/find", {id: infoId.value})
.then(response => {
console.log(response)
aiInfo.value=response.data.data;

View File

@ -3,12 +3,10 @@ import {
} from 'vite'
import vue from '@vitejs/plugin-vue';
import path from "path"
// https://vitejs.dev/config/
export default defineConfig({
base: '/dist/', // 设置为您的二级目录名称
base: '/dist/',
plugins: [vue()],
resolve: {
// Vite路径别名配置
alias: {
'@': path.resolve('./src')
}