Compare commits

...

10 Commits

Author SHA1 Message Date
TS-QD1
24993aca54 1 2025-07-24 10:43:51 +08:00
TS-QD1
ff3e503955 new qr code 2024-06-05 17:00:16 +08:00
TS-QD1
a0e5db4f0d 处理问题 2023-09-20 16:56:13 +08:00
TS-QD1
3085c124e4 增加内容扫码查看 2023-07-27 16:53:21 +08:00
TS-QD1
1d8357d819 增加build脚本 2023-04-20 10:43:08 +08:00
TS-QD1
26d254537b 处理首页文化动态大图不能点击的问题 2023-04-07 17:20:08 +08:00
TS-QD1
62689ce74f 新闻二级页面选择地区改变类目 2023-03-24 14:35:21 +08:00
TS-QD1
44749a6eb9 修改首页模块接口 2023-03-16 15:45:17 +08:00
TS-QD1
dd24b576bc 修改发布地址 2023-03-15 15:33:58 +08:00
TS-QD1
85ad901a8c 增加logo 2023-03-15 09:37:58 +08:00
94 changed files with 404 additions and 501 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
out*

75
build.py Normal file
View File

@ -0,0 +1,75 @@
import os
import re
import time
import shutil
# 跳转文件夹
base_dir = "D:\\Workspace\\Vue\\Vue2\\xz_web"
os.chdir(base_dir)
# 创建打包的out文件夹
out_dir = "out"
# 重新创建out目录
shutil.rmtree(out_dir)
os.makedirs(out_dir)
out_sub_dir = "out\\sub"
os.makedirs(out_sub_dir)
area_array = [
{"area_name": "日喀则市", "area_id": "640675", "area_code": "540200000000", "folder_name": "rkz"},
{"area_name": "桑珠孜区", "area_id": "640676", "area_code": "540202000000", "folder_name": "szz"},
{"area_name": "南木林县", "area_id": "640865", "area_code": "540221000000", "folder_name": "nml"},
{"area_name": "江孜县", "area_id": "641029", "area_code": "540222000000", "folder_name": "jz"},
{"area_name": "定日县", "area_id": "641204", "area_code": "540223000000", "folder_name": "dr"},
{"area_name": "萨迦县", "area_id": "641393", "area_code": "540224000000", "folder_name": "sj"},
{"area_name": "拉孜县", "area_id": "641512", "area_code": "540225000000", "folder_name": "lz"},
{"area_name": "昂仁县", "area_id": "641622", "area_code": "540226000000", "folder_name": "ar"},
{"area_name": "谢通门县", "area_id": "641825", "area_code": "540227000000", "folder_name": "xtm"},
{"area_name": "白朗县", "area_id": "641940", "area_code": "540228000000", "folder_name": "bl"},
{"area_name": "仁布县", "area_id": "642063", "area_code": "540229000000", "folder_name": "rb"},
{"area_name": "康马县", "area_id": "642146", "area_code": "540230000000", "folder_name": "km"},
{"area_name": "定结县", "area_id": "642203", "area_code": "540231000000", "folder_name": "dj"},
{"area_name": "仲巴县", "area_id": "642284", "area_code": "540232000000", "folder_name": "zb"},
{"area_name": "亚东县", "area_id": "642356", "area_code": "540233000000", "folder_name": "yd"},
{"area_name": "吉隆县", "area_id": "642389", "area_code": "540234000000", "folder_name": "jl"},
{"area_name": "聂拉木县", "area_id": "642437", "area_code": "540235000000", "folder_name": "nlm"},
{"area_name": "萨嘎县", "area_id": "642489", "area_code": "540236000000", "folder_name": "sg"},
{"area_name": "岗巴县", "area_id": "642536", "area_code": "540237000000", "folder_name": "gb"},
]
# 打开文件并处理
common_js_file = f"{base_dir}\\src\\common\\components\\common.js"
# 编译
def build():
for area in area_array:
area_name = area["area_name"]
area_id = area["area_id"]
area_code = area["area_code"]
folder_name = area["folder_name"]
common_js_content = None
# 读取文件
with open(common_js_file, "r", encoding="UTF-8") as file:
common_js_content = file.read()
# 修改区域
common_js_content = re.sub(r"areaName:\s*'.*'", f"areaName: '{area_name}'", common_js_content)
common_js_content = re.sub(r"areaId:\s*'.*'", f"areaId: '{area_id}'", common_js_content)
common_js_content = re.sub(r"areaCode:\s*'.*'", f"areaCode: '{area_code}'", common_js_content)
print(common_js_content)
# 保存文件
with open(common_js_file, "w", encoding="UTF-8") as file:
file.write(common_js_content)
# 编译
os.system("npm run build")
# 修改文件夹名
os.rename("dist", folder_name)
# 移动到out文件夹
if folder_name == "rkz":
shutil.move(f"{folder_name}", f"{out_dir}")
else:
shutil.move(f"{folder_name}", f"{out_sub_dir}")
start_time = int(round(time.time() * 1000))
build()
end_time = int(round(time.time() * 1000))
print(f"end, use: {end_time - start_time}ms")

View File

@ -12,29 +12,30 @@
<div class="footer-link">
<h4>友情链接</h4>
<a href="https://www.culturedc.cn/" target="_blank" class="link-item">国家公共文化云</a>
<a href="http://xzzzqqyg.com/" target="_blank" class="link-item">西藏群众艺术馆</a>
<a href="https://xzzzqqyg.com/" target="_blank" class="link-item">西藏群众艺术馆</a>
<a href="http://www.xzszwhy.cn/" target="_blank" class="link-item" v-if="area.areaId != '640675'">日喀则文化云</a>
</div>
</div>
</div>
<div class="footer-right">
<ul>
<li>
<img src="@/assets/images/qr-code-xcx.jpg" alt="">
<img :src="`static/logo/qr-code-xcx-${area.areaId}.jpg`" alt="">
<h4>{{ area.areaName }}公共文化小程序</h4>
</li>
<li>
<img src="@/assets/images/qr-code-gzh.jpg" alt="">
<img :src="`static/logo/qr-code-gzh-${area.areaId}.jpg`" alt="">
<h4>{{ area.areaName }}公共文化公众号</h4>
</li>
<li>
<img src="@/assets/images/qr-code-app.jpg" alt="">
<img :src="`static/logo/qr-code-app-${area.areaId}.png`" alt="">
<h4>{{ area.areaName }}公共文化APP</h4>
</li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>版权所有{{ area.areaName }}群众艺术馆 Copyright© 2020 晋ICP备17001370号-2 技术支持山西腾狮科技</p>
<p>版权所有{{ area.areaName }}群众艺术馆 Copyright© 2020 藏公网安备 54020202000033 <a href="https://beian.miit.gov.cn/" target="_blank" style="color:#FFFFFF;">藏ICP备2020000308号-1</a> 技术支持山西腾狮科技</p>
</div>
</div>
</template>

View File

@ -2,7 +2,7 @@
<div>
<div class="top-line">
<div class="top-line-content">
<span>您好欢迎访问日喀则市公共文化云</span>
<span>欢迎访问{{ area.areaName }}公共文化云</span>
<div class="login-register-btn" v-if="isLogin">
<router-link to="/personCenter">
<img :src="url + 'route/file/download/false/' + userInfo.avatar" alt="" v-if="hasAvatar" class="user-avatar">
@ -20,7 +20,7 @@
<div class="header">
<div class="logo-search">
<router-link to="/" class="logo">
<img :src="'static/logo/logo-'+ area.areaId +'.png'" alt="" class="logo-img">
<img :src="'static/logo/logo-' + area.areaId + '.png'" alt="" class="logo-img">
</router-link>
<div class="search">
<input type="text" class="search-input" placeholder="查找你感兴趣的内容" @keyup.enter="doSearch" v-model="keywords">
@ -30,52 +30,53 @@
</div>
<div class="nav">
<ul class="nav-container">
<li :class="{active: this.$route.path == '/'}">
<li :class="{ active: this.$route.path == '/' }">
<router-link to="/">
首页
</router-link>
</li>
<li :class="{active: $route.query.navTitle === nav.navTitle}" v-for="(nav, index) in navs" :key="index">
<router-link :to="`/${nav.directoriesWebView}?navTitle=${nav.navTitle}&newsDirectoriesId=${nav.newsDirectoriesId}`">
<li :class="{ active: $route.query.navTitle === nav.navTitle }" v-for="(nav, index) in navs" :key="index">
<router-link
:to="`/${nav.directoriesWebView}?navTitle=${nav.navTitle}&newsDirectoriesId=${nav.newsDirectoriesId}`">
{{ nav.navTitle }}
</router-link>
</li>
<li :class="{active: this.$route.path == '/cultureActivity' || this.$route.path == '/cultureActivityDetail/' + this.$route.params.id}">
<li
:class="{ active: this.$route.path == '/cultureActivity' || this.$route.path == '/cultureActivityDetail/' + this.$route.params.id }">
<router-link to="/cultureActivity">
文化活动
</router-link>
</li>
<li :class="{active: this.$route.path == '/cultureVenue' || this.$route.path == '/cultureVenueDetail/' + this.$route.params.id}">
<li
:class="{ active: this.$route.path == '/cultureVenue' || this.$route.path == '/cultureVenueDetail/' + this.$route.params.id }">
<router-link to="/cultureVenue">
文化场馆
</router-link>
</li>
<li :class="{active: this.$route.path == '/broadcast' || this.$route.path == '/broadcastDetail/' + this.$route.params.id}">
<li
:class="{ active: this.$route.path == '/broadcast' || this.$route.path == '/broadcastDetail/' + this.$route.params.id }">
<router-link to="/broadcast">
共享直播
</router-link>
</li>
<li :class="{active: this.$route.path == '/volunteer' || this.$route.path == '/volunteerDetail/' + this.$route.params.id}">
<li
:class="{ active: this.$route.path == '/volunteer' || this.$route.path == '/volunteerDetail/' + this.$route.params.id }">
<router-link to="/volunteer">
志愿服务
</router-link>
</li>
<li :class="{active: this.$route.path == '/travel' || this.$route.path == '/travelDetail/' + this.$route.params.id}">
<router-link to="/travel">
文化旅游
</router-link>
</li>
<li :class="{active: this.$route.path == '/intangibleHeritage' || this.$route.path == '/intangibleHeritageDetail/' + this.$route.params.id}">
<li
:class="{ active: this.$route.path == '/intangibleHeritage' || this.$route.path == '/intangibleHeritageDetail/' + this.$route.params.id }">
<router-link to="/intangibleHeritage">
非遗清单
</router-link>
</li>
<li :class="{active: this.$route.path == '/cultureMap'}">
<li :class="{ active: this.$route.path == '/cultureMap' }">
<router-link to="/cultureMap">
文化地图
</router-link>
</li>
<li :class="{active: this.$route.path == '/cultureSupermarket'}">
<li :class="{ active: this.$route.path == '/cultureSupermarket' }">
<router-link to="/cultureSupermarket">
文化超市
</router-link>
@ -91,7 +92,7 @@ import common from '@/common/components/common.js'
export default {
name: 'Header',
data () {
data() {
return {
keywords: '',
url: common.url,
@ -107,7 +108,7 @@ export default {
}
},
methods: {
initNavs () {
initNavs() {
let vueSelf = this
axios.get(`${common.url}app/newsdirectories/list/areamenu/release/${common.area.areaCode}`, {})
.then((res) => {
@ -133,7 +134,7 @@ export default {
requestUrl: `网页QUERY${this.keywords}新闻`
}
});
const {href} = this.$router.resolve({
const { href } = this.$router.resolve({
path: '/searchResult',
query: {
keywords: this.keywords

View File

@ -1,5 +1,5 @@
const publishUrl = 'http://v3.xzszwhy.cn/'
// const publishUrl = 'http://192.168.0.120:80/'
const publishUrl = 'https://www.xzszwhy.cn/'
// const publishUrl = 'http://192.168.0.120:8081/'
const url = `${publishUrl}xzszwhy/`
const liveUrl = `${publishUrl}live/`
const shopUrl = `${publishUrl}xzshop/`
@ -23,12 +23,12 @@ const shopUrl = `${publishUrl}xzshop/`
* 15.吉隆县: 642389, 540234000000
* 16.聂拉木县: 642437, 540235000000
* 17.萨嘎县: 642489, 540236000000
* 18.岗巴县: 642536, 540232000000
* 18.岗巴县: 642536, 540237000000
*/
const area = {
areaName: '日喀则市',
areaId: '640675',
areaCode: '540200000000'
areaName: '岗巴县',
areaId: '642536',
areaCode: '540237000000'
}
const phoneSafe = (phone) => {

43
src/component/GzhQr.vue Normal file
View File

@ -0,0 +1,43 @@
<template>
<div class="mask">
<div class="qr-code">
<img :src="src" v-if="src"/>
</div>
</div>
</template>
<script>
export default {
name: 'GzhQr',
props: {
src: {
type: String,
required: false
}
},
data() {
return {
}
}
}
</script>
<style lang="stylus" scoped>
.mask
position fixed
top 0
left 0
width 100%
height 100%;
background-color rgba(0,0,0,0.3)
display flex
justify-content center
align-items center
.qr-code
width 200px
height 200px
img
width 100%
height 100%
</style>

View File

@ -53,7 +53,7 @@ export default {
methods: {
getNewsTypeList: function () {
var self = this
axios.get(`${common.url}app/newsdirectories/list/areaplate/release/${common.area.areaCode}`, {}).then(function (res) {
axios.get(`${common.url}app/newsdirectories/listsub/areaauth/release/0/${common.area.areaCode}`, {}).then(function (res) {
self.newsTypeList = res.data
})
},

View File

@ -6,7 +6,7 @@
</div>
<div class="dynamic-content">
<div class="dynamic-content-left">
<div class="dynamic-left-box" @click="goDetail(picNews.newsContentLink, picNews.templateRecordUrl)">
<div class="dynamic-left-box" @click="goDetail(picNews)">
<img :src="url + 'route/file/download/false/' + picNews.newsContentCoverList" alt="" class="dynamic-img">
</div>
<p class="dynamic-desc">{{ picNews.newsContentTitle }} </p>
@ -70,6 +70,9 @@ export default {
}
}).then(function (res) {
var picNews = res.data.rows.splice(0, 1)[0]
if(!picNews) {
return;
}
self.picNews = picNews
self.picNews.newsContentCoverList = picNews.newsContentCoverList[0].contentCoverId
for (var i = 0; i < res.data.rows.length; i++) {

View File

@ -140,7 +140,7 @@ export default {
this.page.page = 1
this.changePage = 1
this.area = code
this.getNews()
this.getTypeList()
},
doJumpPage: function () {
this.page.page = this.changePage

View File

@ -184,7 +184,7 @@ export default {
this.page.page = 1
this.changePage = 1
this.area = code
this.getList()
this.getType()
},
getAreaList: function () {
var self = this

View File

@ -1,38 +1,137 @@
import common from '@/common/components/common.js'
import axios from 'axios';
export const goDetail = (news, navTitle, navPath, router) => {
console.log(news)
// 只要有链接就跳转
if(news.newsContentLink) {
window.open(news.newsContentLink);
// 只要有链接就跳转
if (news.newsContentLink) {
window.open(news.newsContentLink);
return;
}
// 文章
if (news.newsContentType === '1') {
router.push(`/newsViewDetailText/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 图片
if (news.newsContentType === '2') {
router.push(`/newsViewDetailImage/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 音频
if (news.newsContentType === '3') {
router.push(`/newsViewDetailAudio/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 视频
if (news.newsContentType === '4') {
router.push(`/newsViewDetailVideo/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// PDF
if (news.newsContentType === '5') {
router.push(`/newsViewDetailPdf/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 链接
if (news.newsContentType === '6') {
return;
}
}
/**
* 内容认证必须登录或扫码关注公众号
* @param {*} vueSelf
* @param {*} data
* @param {*} callback
* @returns
*/
export const conetntAuth = (vueSelf, data, callback) => {
const getUserByToken = (token) => {
// 获取登录人信息
axios.get(`${common.url}app/user/get-app-user`, { headers: { 'token': token } }).then(res => {
vueSelf.userData = res.data; // 记录当前登录人信息
// 判断用户是否已关注公众号, 接口返回true或false
axios.get(`${common.url}app/wxopen/attentionrelease/${vueSelf.userData.userId}`, {}, {}).then(res => {
if(!res.data) {
// 如果没有关注公众号, 获取公众号二维码, 提示让用户扫描才能继续观看
axios.get(`${common.url}app/wxopen/qrcoderelease/${vueSelf.userData.userId}`, {}, {}).then(res => {
// 弹出遮罩, 显示公众号二维码, 接口返回的为base64图片
vueSelf.qrCodeImage = res.data
vueSelf.isQrCodeShow = true
// 打开公众号关注Sokect的监听
wxSocketInit(vueSelf.userData.userId);
}).catch(res => {
console.error(res)
}).finally(() => {
})
} else {
callback ? callback() : '';
}
}).catch(res => {
console.error(res)
}).finally(() => {
})
}).catch(res => {
console.error(res)
}).finally(() => {
})
}
const wxSocketInit = (userId) => {
var url = `${common.url}app/wxeventrelease/${vueSelf.userData.userId}`;
var socket = new WebSocket(url.replace('https', 'wss').replace('http', 'ws'));
//打开事件
socket.onopen = function () {
console.log("sokect连接成功");
};
//获得消息事件
socket.onmessage = function ({data}) {
data = JSON.parse(data)
console.log("sokect收到消息:", data);
// 扫码后或者取消关注后会收到消息
if (data.attention) {
vueSelf.isQrCodeShow = false;
callback ? callback() : '';
} else { // 取消关注
if (!window.sessionStorage.getItem('token')) {
//跳到登录页面上让用户登录
vueSelf.$router.push('/login');
} else {
vueSelf.isQrCodeShow = true
}
}
};
//关闭事件
socket.onclose = function () {
console.log("sokect连接关闭");
};
//发生了错误事件
socket.onerror = function () {
console.log("sokect连接错误");
}
}
// 判断逻辑
if (data.newsViewAuth.indexOf('1') != -1) {
if (!window.sessionStorage.getItem('token')) {
alert("必须登录才能查看");
vueSelf.$router.push('/login');
return;
}
// 文章
if(news.newsContentType === '1') {
router.push(`/newsViewDetailText/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 图片
if(news.newsContentType === '2') {
router.push(`/newsViewDetailImage/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 音频
if(news.newsContentType === '3') {
router.push(`/newsViewDetailAudio/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 视频
if(news.newsContentType === '4') {
router.push(`/newsViewDetailVideo/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// PDF
if(news.newsContentType === '5') {
router.push(`/newsViewDetailPdf/${news.newsContentId}?navTitle=${navTitle}&navPath=${encodeURIComponent(navPath)}`)
return;
}
// 链接
if(news.newsContentType === '6') {
return;
}
}
// 需要登录并且关注公众号才可以查看该新闻
if (data.newsViewAuth.indexOf('2') != -1) {
if (!window.sessionStorage.getItem('token')) {
alert("必须登录才能查看");
vueSelf.$router.push('/login');
return;
} else {
getUserByToken(window.sessionStorage.getItem('token'));
return;
}
}
callback ? callback() : '';
}

View File

@ -1,23 +1,27 @@
<template>
<div>
<Header/>
<Nav :navs="navs"/>
<Header />
<Nav :navs="navs" />
<div class="container">
<div class="title">{{ title }}</div>
<div class="player" v-show="playFileId">
<div class="video">
<video ref="videoPlayer" controls="controls" controlslist="nodownload" :src="getSrc" :poster="getPosterSrc"></video>
<video ref="videoPlayer" controls="controls" controlslist="nodownload" :src="getSrc"
:poster="getPosterSrc"></video>
</div>
<div class="list">
<div class="play-title">目录</div>
<div class="play-buttons">
<a href="javascript:void(0)" v-for="(file, index) in fileList" :class="{ 'active': file.contentFileFileId === playFileId }" :key="index" @click="onVideoPlayClick(file)">{{ index + 1 }}</a>
<a href="javascript:void(0)" v-for="(file, index) in fileList"
:class="{ 'active': file.contentFileFileId === playFileId }" :key="index"
@click="onVideoPlayClick(file)">{{ index + 1 }}</a>
</div>
</div>
</div>
</div>
<Footer/>
<loading v-show="isLoading"/>
<Footer />
<loading v-show="isLoading" />
<GzhQr :src="qrCodeImage" v-show="isQrCodeShow" />
</div>
</template>
@ -27,6 +31,8 @@ import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import Loading from '../../component/Loading'
import Nav from '../../component/Nav'
import GzhQr from '../../component/GzhQr'
import { conetntAuth } from '../NewsView/NewsViewUtil'
import axios from 'axios'
export default {
@ -35,15 +41,16 @@ export default {
Header,
Footer,
Loading,
Nav
Nav,
GzhQr
},
data () {
let navs = [{name: '详情'}];
if(this.$route.query.navTitle && this.$route.query.navTitle) {
navs.splice(0, 0, {
to: this.$route.query.navPath,
name: this.$route.query.navTitle
})
data() {
let navs = [{ name: '详情' }];
if (this.$route.query.navTitle && this.$route.query.navTitle) {
navs.splice(0, 0, {
to: this.$route.query.navPath,
name: this.$route.query.navTitle
})
}
return {
isLoading: false,
@ -51,25 +58,31 @@ export default {
title: '',
playFileId: '',
coverFileId: '',
fileList: []
fileList: [],
userData: null,
qrCodeImage: '',
isQrCodeShow: false
}
},
methods: {
onVideoPlayClick (file) {
onVideoPlayClick(file) {
this.playFileId = file.contentFileFileId
},
init () {
init() {
let vueSelf = this
vueSelf.isLoading = true
axios.get(`${common.url}app/newscontent/getnewscontentbyidrelease/${this.$route.params.newsContentId}`).then(resp => {
let data = resp.data
vueSelf.title = data.newsContentTitle
vueSelf.playFileId = data.fileList[0].contentFileFileId
if (data.newsContentCoverList.length > 0 &&
data.newsContentCoverList[0].contentCoverId) {
vueSelf.coverFileId = data.newsContentCoverList[0].contentCoverId
}
vueSelf.fileList = data.fileList
// conetntAuth(vueSelf.$router, data);
conetntAuth(vueSelf, data, function () {
vueSelf.title = data.newsContentTitle
vueSelf.playFileId = data.fileList[0].contentFileFileId
if (data.newsContentCoverList.length > 0 &&
data.newsContentCoverList[0].contentCoverId) {
vueSelf.coverFileId = data.newsContentCoverList[0].contentCoverId
}
vueSelf.fileList = data.fileList
})
}).catch(resp => {
console.error(resp)
}).finally(() => {
@ -78,14 +91,14 @@ export default {
}
},
computed: {
getSrc () {
getSrc() {
return `${common.url}route/file/download/true/${this.playFileId}`
},
getPosterSrc () {
getPosterSrc() {
return this.coverFileId ? `${common.url}route/file/download/true/${this.coverFileId}` : `static/poster-audio.jpeg`
}
},
mounted () {
mounted() {
this.init()
}
}

View File

@ -22,6 +22,7 @@
</div>
<Footer/>
<loading v-show="isLoading"/>
<GzhQr :src="qrCodeImage" v-show="isQrCodeShow" />
</div>
</template>
@ -31,6 +32,8 @@ import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import Loading from '../../component/Loading'
import Nav from '../../component/Nav'
import GzhQr from '../../component/GzhQr'
import {conetntAuth} from '../NewsView/NewsViewUtil'
import axios from 'axios'
export default {
@ -39,7 +42,8 @@ export default {
Header,
Footer,
Loading,
Nav
Nav,
GzhQr
},
data () {
let vueSelf = this
@ -87,7 +91,10 @@ export default {
}
},
},
fileList: []
fileList: [],
userData: null,
qrCodeImage: '',
isQrCodeShow: false
}
},
methods: {
@ -109,12 +116,14 @@ export default {
vueSelf.isLoading = true
axios.get(`${common.url}app/newscontent/getnewscontentbyidrelease/${this.$route.params.newsContentId}`).then(resp => {
let data = resp.data
vueSelf.title = data.newsContentTitle
vueSelf.fileList = data.fileList
setTimeout(() => {
vueSelf.swiperMain = vueSelf.$refs.swiperMain.swiper
vueSelf.swiperThumbs = vueSelf.$refs.swiperThumbs.swiper
}, 1000)
conetntAuth(vueSelf, data, function () {
vueSelf.title = data.newsContentTitle
vueSelf.fileList = data.fileList
setTimeout(() => {
vueSelf.swiperMain = vueSelf.$refs.swiperMain.swiper
vueSelf.swiperThumbs = vueSelf.$refs.swiperThumbs.swiper
}, 1000)
});
}).catch(resp => {
console.error(resp)
}).finally(() => {

View File

@ -19,6 +19,7 @@
</div>
<Footer/>
<loading v-show="isLoading"/>
<GzhQr :src="qrCodeImage" v-show="isQrCodeShow" />
</div>
</template>
@ -28,6 +29,8 @@ import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import Loading from '../../component/Loading'
import Nav from '../../component/Nav'
import GzhQr from '../../component/GzhQr'
import {conetntAuth} from '../NewsView/NewsViewUtil'
import axios from 'axios'
export default {
@ -36,7 +39,8 @@ export default {
Header,
Footer,
Loading,
Nav
Nav,
GzhQr
},
data () {
let vueSelf = this;
@ -54,7 +58,10 @@ export default {
author: '',
summary: '',
coverImage: '',
fileList: []
fileList: [],
userData: null,
qrCodeImage: '',
isQrCodeShow: false
}
},
methods: {
@ -66,13 +73,15 @@ export default {
vueSelf.isLoading = true
axios.get(`${common.url}app/newscontent/getnewscontentbyidrelease/${this.$route.params.newsContentId}`).then(resp => {
let data = resp.data
vueSelf.title = data.newsContentTitle
vueSelf.author = data.newsContentAuthor
vueSelf.summary = data.newsContentSummary
if(data.newsContentCoverList.length > 0) {
vueSelf.coverImage = `${common.url}route/file/download/true/${data.newsContentCoverList[0].contentCoverId}`
}
vueSelf.fileList = data.fileList
conetntAuth(vueSelf, data, function () {
vueSelf.title = data.newsContentTitle
vueSelf.author = data.newsContentAuthor
vueSelf.summary = data.newsContentSummary
if(data.newsContentCoverList.length > 0) {
vueSelf.coverImage = `${common.url}route/file/download/true/${data.newsContentCoverList[0].contentCoverId}`
}
vueSelf.fileList = data.fileList
});
}).catch(resp => {
console.error(resp)
}).finally(() => {

View File

@ -1,7 +1,7 @@
<template>
<div>
<Header />
<Nav :navs="navs"/>
<Nav :navs="navs" />
<div class="container">
<div class="title" v-show="title">{{ title }}</div>
<div class="sub-title" v-show="author || publishDate">
@ -17,7 +17,8 @@
<div class="content" v-html="content"></div>
</div>
<Footer />
<loading v-show="isLoading"/>
<loading v-show="isLoading" />
<GzhQr :src="qrCodeImage" v-show="isQrCodeShow" />
</div>
</template>
@ -27,19 +28,23 @@ import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import Loading from '../../component/Loading'
import Nav from '../../component/Nav'
import GzhQr from '../../component/GzhQr'
import { conetntAuth } from '../NewsView/NewsViewUtil'
import axios from 'axios'
export default {
name: 'NewsViewDetailText',
components: {
Header,
Footer,
Loading,
Nav
Nav,
GzhQr
},
data() {
let navs = [{name: '详情'}];
if(this.$route.query.navTitle && this.$route.query.navTitle) {
let navs = [{ name: '详情' }];
if (this.$route.query.navTitle && this.$route.query.navTitle) {
navs.splice(0, 0, {
to: this.$route.query.navPath,
name: this.$route.query.navTitle
@ -52,6 +57,9 @@ export default {
author: '',
publishDate: '',
content: '',
userData: null,
qrCodeImage: '',
isQrCodeShow: false
}
},
methods: {
@ -60,10 +68,12 @@ export default {
vueSelf.isLoading = true;
axios.get(`${common.url}app/newscontent/getnewscontentbyidrelease/${this.$route.params.newsContentId}`).then(resp => {
let data = resp.data;
vueSelf.title = data.newsContentTitle;
vueSelf.author = data.newsContentAuthor;
vueSelf.publishDate = data.newsContentPublishTime;
vueSelf.content = data.newsContentContent;
conetntAuth(vueSelf, data, function () {
vueSelf.title = data.newsContentTitle;
vueSelf.author = data.newsContentAuthor;
vueSelf.publishDate = data.newsContentPublishTime;
vueSelf.content = data.newsContentContent;
});
}).catch(resp => {
console.error(resp)
}).finally(() => {

View File

@ -18,6 +18,7 @@
</div>
<Footer/>
<loading v-show="isLoading"/>
<GzhQr :src="qrCodeImage" v-show="isQrCodeShow" />
</div>
</template>
@ -27,6 +28,8 @@ import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import Loading from '../../component/Loading'
import Nav from '../../component/Nav'
import GzhQr from '../../component/GzhQr'
import {conetntAuth} from '../NewsView/NewsViewUtil'
import axios from 'axios'
export default {
@ -35,7 +38,8 @@ export default {
Header,
Footer,
Loading,
Nav
Nav,
GzhQr
},
data () {
let navs = [{name: '详情'}];
@ -51,7 +55,10 @@ export default {
title: '',
playFileId: '',
coverFileId: '',
fileList: []
fileList: [],
userData: null,
qrCodeImage: '',
isQrCodeShow: false
}
},
methods: {
@ -63,13 +70,15 @@ export default {
vueSelf.isLoading = true
axios.get(`${common.url}app/newscontent/getnewscontentbyidrelease/${this.$route.params.newsContentId}`).then(resp => {
let data = resp.data
vueSelf.title = data.newsContentTitle
vueSelf.playFileId = data.fileList[0].contentFileFileId
if (data.newsContentCoverList.length > 0 &&
data.newsContentCoverList[0].contentCoverId) {
vueSelf.coverFileId = data.newsContentCoverList[0].contentCoverId
}
vueSelf.fileList = data.fileList
conetntAuth(vueSelf, data, function () {
vueSelf.title = data.newsContentTitle
vueSelf.playFileId = data.fileList[0].contentFileFileId
if (data.newsContentCoverList.length > 0 &&
data.newsContentCoverList[0].contentCoverId) {
vueSelf.coverFileId = data.newsContentCoverList[0].contentCoverId
}
vueSelf.fileList = data.fileList
})
}).catch(resp => {
console.error(resp)
}).finally(() => {

View File

@ -1,254 +0,0 @@
<template>
<div>
<Header></Header>
<div class="location">
<div class="location-content">
您的位置<router-link to="/">首页</router-link> >
</div>
</div>
<div class="travel">
<div class="travel-content" v-if="!isLoading">
<ul v-if="hasData">
<li v-for="list in travel" :key="list.id" @click="goDetail(list.newsContentLink, list.templateRecordUrl)" :title="list.newsContentTitle">
<div class="travel-img">
<img :src="url + 'route/file/download/false/' + list.newsContentCoverList" alt="">
<div class="travel-name">
{{list.newsContentTitle}}
</div>
</div>
</li>
</ul>
<div class="no-data" v-else>
<img src="@/assets/images/no-data.png" alt="">
</div>
</div>
</div>
<div class="pager" v-if="hasData">
<span @click="paging(1)">首页</span>
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
<li v-for="cpage in page.totalPage" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
{{cpage}}
</li>
</ul>
<ul v-if="page.totalPage > 5">
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
{{cpage}}
</li>
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
{{page.totalPage - 5 + cpage}}
</li>
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
{{page.page - (3 - cpage)}}
</li>
</ul>
<span @click="paging(page.page + 1)" v-if="page.page < page.totalPage">下一页</span>
<span @click="paging(page.totalPage)">尾页</span>
<input type="text" v-model="changePage" v-if="showJumpBtn">
<i v-if="showJumpBtn">/{{page.totalPage}}</i>
<button v-if="showJumpBtn" @click="doJumpPage">跳转</button>
</div>
<div class="loading" v-if="isLoading">
<img src="@/assets/images/loading.gif" alt="">
</div>
<Footer></Footer>
</div>
</template>
<script>
import Header from '@/common/components/Header'
import Footer from '@/common/components/Footer'
import common from '@/common/components/common.js'
import axios from 'axios'
export default {
name: 'Travel',
components: {
Header,
Footer
},
data () {
return {
changePage: 1,
travel: [],
page: {
page: 1,
rows: 8,
totalPage: 1,
newsDirectoriesId: '51ae7beb-f277-47a4-937a-088e6d47656d'
},
url: common.url,
publishUrl: common.publishUrl,
isLoading: false
}
},
computed: {
showJumpBtn () {
return this.page.totalPage > 1
},
hasData () {
return this.travel.length > 0
}
},
methods: {
doJumpPage: function () {
this.page.page = this.changePage
this.getTravelList()
},
paging: function (page) {
this.page.page = page
this.getTravelList()
},
getTravelList: function () {
var self = this
self.isLoading = true
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.area.areaCode, {
params: self.page
}).then(function (res) {
for (var i = 0; i < res.data.rows.length; i++) {
res.data.rows[i].newsContentCoverList = res.data.rows[i].newsContentCoverList[0].contentCoverId
}
self.isLoading = false
self.travel = res.data.rows
self.changePage = res.data.page
self.page.totalPage = Math.ceil(res.data.total / self.page.rows)
})
},
goDetail: function (link, url) {
if (link) {
window.open(link)
} else {
window.location.href = this.publishUrl + url
}
}
},
mounted () {
this.getTravelList()
}
}
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
@import "~styles/public.styl"
.loading
position fixed
top 50%
left 50%
transform translate(-50%, -50%)
background rgba(255,255,255,0.6)
padding 30px
border-radius 10px
box-shadow 0 0 17px #DEDEDE
.location
background #e5e5e5
line-height 30px
.location-content
width 1200px
margin 0 auto
font-size 14px
color #565656
.travel
background #f0f0f0
padding 20px 0
min-height 400px
.travel-content
margin 0 auto
width 1200px
ul
li
background #fff
padding 10px 20px
margin-bottom 20px
height 465px
cursor pointer
.travel-img
width 100%
height 100%
overflow hidden
position relative
img
width 100%
height 100%
transition all .5s
&:hover
transform scale(1.05)
.travel-name
font-family '宋体'
position absolute
bottom 0
left 0
background rgba(0,0,0,0.5)
width 100%
height 40px
line-height 40px
color #fff
font-size 16px
white-space nowrap
overflow hidden
text-overflow ellipsis
padding 0 10px
box-sizing border-box
.pager
width 1200px
margin 20px auto
text-align center
font-size 0
span
display inline-block
padding 0 15px
line-height 25px
color #676767
border 1px solid #d2d2d2
font-size 14px
margin 0 5px
vertical-align middle
cursor pointer
ul
display inline-block
overflow hidden
vertical-align middle
li
width 45px
line-height 25px
float left
margin-right 10px
border 1px solid #d2d2d2
cursor pointer
text-align center
font-size 14px
color #676767
&.active
background $main-color
color #fff
border 1px solid $main-color
&:last-child
margin 0
input
width 50px
height 25px
border 1px solid #d2d2d2
text-align center
vertical-align middle
i
font-style normal
color #676767
font-size 14px
line-height 25px
display inline-block
vertical-align middle
margin 0 5px
button
border none
outline none
background $main-color
cursor pointer
width 50px
height 25px
vertical-align middle
color #fff
font-size 14px
.no-data
padding 80px 0
text-align center
img
width 200px
</style>

View File

@ -1,96 +0,0 @@
<template>
<div>
<Header></Header>
<div class="location">
<div class="location-content">
您的位置<router-link to="/">首页</router-link> > <router-link to="/travel"></router-link> >
</div>
</div>
<div class="travel-name">
<h1>{{travelData.travelPlace}}</h1>
</div>
<div class="travel-img">
<div class="travel-img-content">
<div class="travel-swiper">
<swiper ref="mySwiper" :options="swiperOptions">
<swiper-slide v-for="(list,idx) in travelData.travelPhoto" :key="idx">
<img :src="list.photoPath" alt="" class="banner-img">
</swiper-slide>
<div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>
</swiper>
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>
<script>
import Header from '@/common/components/Header'
import Footer from '@/common/components/Footer'
import axios from 'axios'
export default {
name: 'TravelDetail',
components: {
Header,
Footer
},
data () {
return {
swiperOptions: {
loop: true,
autoplay: 3000,
prevButton: '.swiper-button-prev',
nextButton: '.swiper-button-next'
},
travelData: {}
}
},
methods: {
getTravelData () {
var self = this
axios.get('/api/travelDetail.json', {
params: {
id: this.$route.params.id
}
}).then(function (res) {
res = res.data
self.travelData = res.data
})
}
},
mounted () {
this.getTravelData()
}
}
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
@import "~styles/public.styl"
.location
background #e5e5e5
line-height 30px
.location-content
width 1200px
margin 0 auto
font-size 14px
color #565656
.travel-name
width 1200px
margin 0 auto
padding 5px 0
h1
font-size 24px
font-weight normal
color #565656
.travel-img
background #333
.travel-img-content
width 1040px
height 690px
margin 0 auto
.banner-img
width 1040px
height 690px
</style>

View File

@ -11,8 +11,6 @@ import Broadcast from '@/pages/Broadcast/Broadcast'
import BroadcastDetail from '@/pages/BroadcastDetail/BroadcastDetail'
import Volunteer from '@/pages/Volunteer/Volunteer'
import VolunteerDetail from '@/pages/VolunteerDetail/VolunteerDetail'
import Travel from '@/pages/Travel/Travel'
import TravelDetail from '@/pages/TravelDetail/TravelDetail'
import Login from '@/pages/Login/Login'
import Register from '@/pages/Register/Register'
import IntangibleHeritage from '@/pages/IntangibleHeritage/IntangibleHeritage'
@ -137,24 +135,6 @@ export default new Router({
keepAlive: false
}
},
{
path: '/travel',
name: 'Travel',
component: Travel,
meta: {
title: `${common.area.areaName}公共文化数字云平台`,
keepAlive: false
}
},
{
path: '/travelDetail/:id',
name: 'TravelDetail',
component: TravelDetail,
meta: {
title: `${common.area.areaName}公共文化数字云平台`,
keepAlive: false
}
},
{
path: '/login',
name: 'Login',

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB