update
This commit is contained in:
parent
f8f7249465
commit
ca62bed9a0
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="NavInfo" style="margin-top:35px;margin-left:50px;width:220px;">
|
<div id="网站信息" class="NavInfo" style="margin-top:35px;margin-left:50px;width:220px;">
|
||||||
<span style="font-size:30px;font-family: STHupo">{{ UrlObj.name }}</span><br/>
|
<span style="font-size:30px;font-family: STHupo">{{ UrlObj.name }}</span><br/>
|
||||||
<div class="NavInfo">
|
<div class="NavInfo">
|
||||||
<span style="width:200px">创建时间:{{ Cdate }}</span><br/>
|
<span style="width:200px">创建时间:{{ Cdate }}</span><br/>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 标签详情-->
|
<!-- 标签详情-->
|
||||||
<div class="JustBack" style="width:670px;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
<div id="网站介绍" class="JustBack" style="width:670px;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||||
<!--文章详情-->
|
<!--文章详情-->
|
||||||
<div style="width:670px;color: var(--theme-color)">
|
<div style="width:670px;color: var(--theme-color)">
|
||||||
<div class="HeadLine">
|
<div class="HeadLine">
|
||||||
@ -109,7 +109,7 @@
|
|||||||
<!--导航评论-->
|
<!--导航评论-->
|
||||||
</div>
|
</div>
|
||||||
<!--热度趋势-->
|
<!--热度趋势-->
|
||||||
<div class="JustBack" style="width:670px;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
<div id="热度趋势" class="JustBack" style="width:670px;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||||
<div style="width:670px;color: var(--theme-color)">
|
<div style="width:670px;color: var(--theme-color)">
|
||||||
<div class="HeadLine" style="margin-top:50px">
|
<div class="HeadLine" style="margin-top:50px">
|
||||||
<div class="HeadSquare"></div>
|
<div class="HeadSquare"></div>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--用户评论-->
|
<!--用户评论-->
|
||||||
<div class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
<div id="用户评论" class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||||
<div style="width:670px;color: var(--theme-color)">
|
<div style="width:670px;color: var(--theme-color)">
|
||||||
<div class="HeadLine" style="margin-top:30px">
|
<div class="HeadLine" style="margin-top:30px">
|
||||||
<div class="HeadSquare"></div>
|
<div class="HeadSquare"></div>
|
||||||
@ -163,7 +163,20 @@ export default {
|
|||||||
components: {LeftSide, HotRecomment, NewRecomment, RandomRecomment, UserComment},
|
components: {LeftSide, HotRecomment, NewRecomment, RandomRecomment, UserComment},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
category: [],
|
category: [{
|
||||||
|
name:'网站信息',
|
||||||
|
childUC:[]
|
||||||
|
},{
|
||||||
|
name:'网站介绍',
|
||||||
|
childUC:[]
|
||||||
|
},{
|
||||||
|
name:'热度趋势',
|
||||||
|
childUC:[]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:'用户评论',
|
||||||
|
childUC:[]
|
||||||
|
}],
|
||||||
visible: false,
|
visible: false,
|
||||||
//返回数据:时间列表
|
//返回数据:时间列表
|
||||||
TimeList: [],
|
TimeList: [],
|
||||||
@ -192,6 +205,9 @@ export default {
|
|||||||
rootId_AllComment:{1:[],2:[]},
|
rootId_AllComment:{1:[],2:[]},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$route': 'getPath'
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
// this.GetAllComment();
|
// this.GetAllComment();
|
||||||
@ -209,6 +225,15 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
getPath() {
|
||||||
|
if(this.$route.query.name){
|
||||||
|
document.querySelector(this.$route.query.name).scrollIntoView(true)
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 渲染iframe:
|
// 渲染iframe:
|
||||||
// funFrame(){
|
// funFrame(){
|
||||||
// var iframe = document.getElementById("myframe");
|
// var iframe = document.getElementById("myframe");
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
|||||||
}else if(this.$route.path==='/nav'){
|
}else if(this.$route.path==='/nav'){
|
||||||
if (node.name) {
|
if (node.name) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/home',
|
path: '/nav',
|
||||||
query: {
|
query: {
|
||||||
name: `#${node.name}`,
|
name: `#${node.name}`,
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-card" >
|
<div class="app-card" >
|
||||||
<div style="display: flex;flex-direction: row;align-items: center" @click="goToNavDetail">
|
<div style="display: flex;flex-direction: row;align-items: center" @click="goToNavDetail">
|
||||||
<el-image v-if="nav.icon" :src="nav.icon" style="width: 30px;height: 30px"></el-image>
|
<el-image v-if="nav.icon" :src="nav.icon" style="width: 30px;height: 30px">
|
||||||
|
<div slot="error" class="image-slot">
|
||||||
|
<img style="width: 30px" :src="require('@/assets/img/null.png')" alt="图标">
|
||||||
|
</div>
|
||||||
|
</el-image>
|
||||||
<div class="content-card">
|
<div class="content-card">
|
||||||
|
|
||||||
<el-tooltip v-if="nav.name" class="item" effect="dark" :content="nav.name" placement="top">
|
<el-tooltip v-if="nav.name" class="item" effect="dark" :content="nav.name" placement="top">
|
||||||
|
@ -15,14 +15,12 @@
|
|||||||
<span class="title">热搜榜</span>
|
<span class="title">热搜榜</span>
|
||||||
<!-- <span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
|
<!-- <span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="hotSearchKeyWords.length===0" v-show="isShowClearHistory">
|
<div v-if="hotSearchKeyWords.length!==0" v-show="isShowClearHistory">
|
||||||
<el-tag
|
<el-tag
|
||||||
:v-if="hotSearchKeyWords.length!==0"
|
:v-if="hotSearchKeyWords.length!==0"
|
||||||
v-for="(tag,index) in hotSearchKeyWords"
|
v-for="(tag,index) in hotSearchKeyWords"
|
||||||
:key="index"
|
:key="index"
|
||||||
size="small"
|
size="small"
|
||||||
closable
|
|
||||||
@close="handleClose(tag)"
|
|
||||||
style="margin-right: 10px; margin-top: 10px; cursor: pointer"
|
style="margin-right: 10px; margin-top: 10px; cursor: pointer"
|
||||||
@click="handleSearch(tag)"
|
@click="handleSearch(tag)"
|
||||||
>
|
>
|
||||||
@ -41,9 +39,9 @@
|
|||||||
<div class="search-his">
|
<div class="search-his">
|
||||||
<div>
|
<div>
|
||||||
<span class="title">搜索历史</span>
|
<span class="title">搜索历史</span>
|
||||||
<span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>
|
<!-- <span class="clear" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="historySearch.length===0" v-show="isShowClearHistory">
|
<div v-if="historySearch.length!==0" v-show="isShowClearHistory">
|
||||||
<el-tag
|
<el-tag
|
||||||
:v-if="historySearch.length!==0"
|
:v-if="historySearch.length!==0"
|
||||||
v-for="(tag,index) in historySearch"
|
v-for="(tag,index) in historySearch"
|
||||||
@ -138,40 +136,27 @@ export default {
|
|||||||
clearSearchResults(){
|
clearSearchResults(){
|
||||||
this.searchResults=[];
|
this.searchResults=[];
|
||||||
},
|
},
|
||||||
clearHistory() {
|
getHotSearchKeyWords() {
|
||||||
// var that=this;
|
var that=this;
|
||||||
// axios({
|
axios({
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// // 请求的地址
|
// 请求的地址
|
||||||
// url: 'http://localhost:8082/helloGithub_war_exploded/deleteAllLabel',
|
url: '/api/Search/getHotList',
|
||||||
// // URL 中的查询参数
|
// URL 中的查询参数
|
||||||
// params: {
|
params: {
|
||||||
// }
|
searchKey:this.search,
|
||||||
// }).then((res)=>{
|
}
|
||||||
// if (res.data.code === 200) {
|
}).then((res)=>{
|
||||||
// Vue.prototype.$notify({
|
if (res.data.code === 200) {
|
||||||
// title: '成功',
|
|
||||||
// message: ('i', {style: 'color: teal'}, res.data.msg),
|
that.hotSearchKeyWords=res.data.data;
|
||||||
// type: 'success',
|
|
||||||
// offset: 50
|
} else {
|
||||||
// });
|
return false;
|
||||||
// setTimeout(()=>{
|
}
|
||||||
// that.gethistorySearch();
|
}).catch((error)=>{
|
||||||
// })
|
|
||||||
// } else {
|
})
|
||||||
// Vue.prototype.$notify.error({
|
|
||||||
// title: '错误',
|
|
||||||
// message: res.data.msg,
|
|
||||||
// offset: 50
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }).catch((error)=>{
|
|
||||||
// Vue.prototype.$notify.error({
|
|
||||||
// title: '错误',
|
|
||||||
// message: error,
|
|
||||||
// offset: 50
|
|
||||||
// });
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
// searchRequest() {
|
// searchRequest() {
|
||||||
// const params = {
|
// const params = {
|
||||||
@ -182,60 +167,78 @@ export default {
|
|||||||
// window.open(url, '_blank');
|
// window.open(url, '_blank');
|
||||||
// },
|
// },
|
||||||
gethistorySearch(){
|
gethistorySearch(){
|
||||||
// var that=this;
|
var that=this;
|
||||||
// axios({
|
if(localStorage.getItem('userId')&& localStorage.getItem('Authorization') ){
|
||||||
// method: 'post',
|
axios({
|
||||||
// // 请求的地址
|
method: 'post',
|
||||||
// url: 'http://localhost:8082/helloGithub_war_exploded/selectUserLabel',
|
// 请求的地址
|
||||||
// // URL 中的查询参数
|
url: '/api/Search/getSearchHistoryByUserId',
|
||||||
// params: {
|
// URL 中的查询参数
|
||||||
// }
|
params: {
|
||||||
// }).then((res)=>{
|
userId:localStorage.getItem('userId')
|
||||||
// that.historySearch=res.data;
|
}
|
||||||
//
|
}).then((res)=>{
|
||||||
// }).catch((error)=>{
|
if(res.data.code===200){
|
||||||
// Vue.prototype.$notify.error({
|
that.historySearch=res.data.data;
|
||||||
// title: '错误',
|
}else{
|
||||||
// message: error,
|
return false;
|
||||||
// offset: 50
|
}
|
||||||
// });
|
|
||||||
// })
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
Vue.prototype.$notify.info({
|
||||||
|
title: '提示',
|
||||||
|
message: ('i', {style: 'color: teal'}, "登录状态失效,请重新登录!"),
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleClose(tag){
|
handleClose(tag){
|
||||||
// var that=this;
|
var that=this;
|
||||||
// axios({
|
if(localStorage.getItem('userId')&& localStorage.getItem('Authorization') ){
|
||||||
// method: 'post',
|
axios({
|
||||||
// // 请求的地址
|
method: 'post',
|
||||||
// url: 'http://localhost:8082/helloGithub_war_exploded/deletelabel',
|
// 请求的地址
|
||||||
// // URL 中的查询参数
|
url: '/api/Search/delSearchHistoryByUserId',
|
||||||
// params: {
|
// URL 中的查询参数
|
||||||
// tag:tag
|
params: {
|
||||||
// }
|
searchKey:tag,
|
||||||
// }).then((res)=>{
|
userId:localStorage.getItem('userId')
|
||||||
// if(res.data.code===200){
|
}
|
||||||
|
}).then((res)=>{
|
||||||
|
if(res.data.code===200){
|
||||||
// Vue.prototype.$notify({
|
// Vue.prototype.$notify({
|
||||||
// title: '成功',
|
// title: '成功',
|
||||||
// message: ('i', {style: 'color: teal'}, res.data.msg),
|
// message: ('i', {style: 'color: teal'}, "删除成功!"),
|
||||||
// type: 'success',
|
// type: 'success',
|
||||||
// offset: 50
|
// offset: 50
|
||||||
// });
|
// });
|
||||||
// setTimeout(()=>{
|
|
||||||
// that.gethistorySearch();
|
that.gethistorySearch();
|
||||||
// })
|
|
||||||
// }else{
|
}else{
|
||||||
// Vue.prototype.$notify.error({
|
Vue.prototype.$notify.error({
|
||||||
// title: '错误',
|
title: '错误',
|
||||||
// message: res.data.msg,
|
message: "删除失败!",
|
||||||
// offset: 50
|
offset: 50
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// }).catch((error)=>{
|
}).catch((error)=>{
|
||||||
// Vue.prototype.$notify.error({
|
|
||||||
// title: '错误',
|
})
|
||||||
// message: error,
|
}else{
|
||||||
// offset: 50
|
Vue.prototype.$notify.info({
|
||||||
// });
|
title: '提示',
|
||||||
// })
|
message: ('i', {style: 'color: teal'}, "登录状态失效,请重新登录!"),
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
searchByInput(){
|
searchByInput(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@ -265,6 +268,7 @@ export default {
|
|||||||
type:"success",
|
type:"success",
|
||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
|
that.getHotSearchKeyWords();
|
||||||
that.searchResults=res.data.data;
|
that.searchResults=res.data.data;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.visible = true;
|
that.visible = true;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-image style="width: 30px" :src="searchResults.icon">
|
<el-image style="width: 30px" :src="searchResults.icon">
|
||||||
<div slot="error" class="image-slot">
|
<div slot="error" class="image-slot">
|
||||||
<img style="width: 28px" src="@/assets/img/null.png">
|
<img style="width: 28px" :src="require('@/assets/img/null.png')" alt="图标">
|
||||||
</div>
|
</div>
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
@ -13,23 +13,35 @@
|
|||||||
{{ searchResults.name }}
|
{{ searchResults.name }}
|
||||||
</span>
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="详情" placement="right" @click="goToDetail(searchResults.id)">
|
|
||||||
<i style="margin-left: 10px" class="card-icon el-icon-d-arrow-right"></i>
|
<el-tooltip effect="dark" placement="bottom">
|
||||||
</el-tooltip>
|
<div slot="content">
|
||||||
<el-tooltip effect="dark" :content="'【'+searchResults.name+'】'+'手机二维码'" placement="bottom">
|
<span v-if="searchResults.name" style="font-size:12px !important;">【{{ searchResults.name }}】手机二维码</span><br/><br/>
|
||||||
|
<div style="width:100% ;text-align: center"><img v-if="searchResults.id" style="width:150px"
|
||||||
|
:src="getResultsQR(searchResults.id)"></div>
|
||||||
|
</div>
|
||||||
<i style="margin-left: 10px" class="qr el-icon-s-grid"></i>
|
<i style="margin-left: 10px" class="qr el-icon-s-grid"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
|
<el-tooltip effect="dark" content="详情" placement="right" >
|
||||||
|
<i style="margin-left: 10px" class="card-icon el-icon-d-arrow-right" @click="goToDetail(searchResults.id)"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SearchResults",
|
name: "SearchResults",
|
||||||
props: {
|
props: {
|
||||||
searchResults: Object,
|
searchResults: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
imageCode:'',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
@ -39,6 +51,31 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
getResultsQR(url_id) {
|
||||||
|
let _this = this;
|
||||||
|
if(url_id!==''){
|
||||||
|
axios({
|
||||||
|
method: 'post',
|
||||||
|
url: '/api/qrcode/qrc_return',
|
||||||
|
params: {
|
||||||
|
url_id: url_id,
|
||||||
|
}
|
||||||
|
}).then(function (res) {
|
||||||
|
if (res.data!==''){
|
||||||
|
_this.imageCode = "data:image/jpg;base64," + res.data;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
// Vue.prototype.$notify.error({
|
||||||
|
// title: '错误',
|
||||||
|
// message: error === null ? '' : error,
|
||||||
|
// offset: 0
|
||||||
|
// });
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return this.imageCode;
|
||||||
|
},
|
||||||
goToDetail(id){
|
goToDetail(id){
|
||||||
if(id){
|
if(id){
|
||||||
let pathInfo = this.$router.resolve({
|
let pathInfo = this.$router.resolve({
|
||||||
|
Loading…
Reference in New Issue
Block a user