This commit is contained in:
landaiqing 2023-12-29 10:09:35 +08:00
parent 4fc4858efc
commit a2648c6c16
8 changed files with 112 additions and 47 deletions

View File

@ -1,4 +1,4 @@
<template>
<template xmlns="http://www.w3.org/1999/html">
<div class="wrapper" :key="UrlId">
<LeftSide :category="category"></LeftSide>
<div class="DefinedPage">
@ -9,7 +9,7 @@
<div class="card" style="width: 130px;height:130px;margin-top:50px;background-color: var( --theme-bg-color)"
@click="ToURL()">
<div style="width:100%;height:100%">
<el-image v-if="UrlObj.icon !== null " :src="UrlObj.icon" style="width:100%;height:100%">
<el-image v-if="UrlObj.icon" :src="UrlObj.icon" style="width:100%;height:100%">
<div slot="error" class="image-slot">
<img style="width: 28px;" :src="require('@/assets/img/null.png')" alt="图标">
</div>
@ -29,22 +29,25 @@
<div style="width:100% ;text-align: center">{{ UrlObj.url }}</div>
</div>
<i class="el-icon-link" id="little-Circle-content"
style="font-weight:550;padding:5px;font-size:15px!important;margin-top:5px">完整URL</i>
style="cursor: pointer;font-weight:550;padding:5px;font-size:15px!important;margin-top:5px">完整URL</i>
</el-tooltip>
</div>
<div class="little-Triangle" style=" margin-left:15px;">
<el-tooltip placement="bottom" width="150"
trigger="hover"
effect="dark" close-delay="2000">
<div class="MyPopover" slot="content">
<span v-if="UrlObj.name" style="font-size:12px !important;">{{ UrlObj.name }}手机二维码</span><br/><br/>
<div style="width:100% ;text-align: center"><img style="width:150px"
:src="getNavQR(this.$route.query.uid)"></div>
<el-popover
placement="bottom"
width="200"
trigger="click"
:title="'【'+UrlObj.name+'】'+'手机二维码'"
>
<div class="MyPopover" >
<div style="width:100% ;text-align: center"><img style="width:150px"
:src="imageCode"></div>
</div>
<i class="el-icon-picture" id="little-Circle-content"
style="font-weight:550; padding:5px;font-size:15px!important;margin-top:5px">手机查看</i>
</el-tooltip>
<i slot="reference" class="el-icon-picture" id="little-Circle-content"
style="cursor: pointer;font-weight:550; padding:5px;font-size:15px!important;margin-top:5px" @click="getNavQR">手机查看</i>
</el-popover>
</div>
</div>
</div>
<div id="网站信息" class="NavInfo" style="margin-top:35px;margin-left:50px;width:220px;">
@ -93,16 +96,25 @@
<i class="el-icon-star-on" id="little-Circle-content" style=" padding:5.5px; "></i>
</el-tooltip>
</div>
<!-- <div class="little-Circle" id="Rank" style="margin-left:15px;" @click="WarnToAdmin()">-->
<!-- <el-tooltip placement="top" width="150"-->
<!-- trigger="hover"-->
<!-- effect="dark" close-delay="2000">-->
<!-- <div class="MyPopover" slot="content">-->
<!-- <span style="font-size:12px !important;">向管理员反馈问题</span><br/><br/>-->
<!-- </div>-->
<!-- <i class="el-icon-warning" id="little-Circle-content" style=" padding:5px; "></i>-->
<!-- </el-tooltip>-->
<!-- </div>-->
<div class="little-Circle" id="Rank" style="margin-left:15px;" @click="checkUrl(UrlObj.url)">
<el-popover
placement="bottom"
width="200"
trigger="click"
:title="'【'+UrlObj.url+'】'+'状态检测'"
>
<div class="MyPopover"
v-loading="loading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="var(--theme-bg-color)">
<span> {{msg}}</span> <br>
<span>返回数据{{code}}</span><br>
<span> {{speed}}</span><br>
</div>
<i slot="reference" class="el-icon-star-on" id="little-Circle-content" style=" padding:5.5px; "></i>
</el-popover>
</div>
</div>
</div>
</div>
@ -141,7 +153,7 @@
</div>
</div>
</div>
<div id="热度趋势" 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 class="HeadLine" style="margin-top:50px">
<div class="HeadSquare"></div>
@ -346,6 +358,10 @@ export default {
components: {LeftSide, HotRecomment, NewRecomment, RandomRecomment, UserComment},
data() {
return {
loading:true,
msg:null,
code:null,
speed:null,
CateNum:'',
userId:'',
userItem:{},
@ -363,6 +379,11 @@ export default {
name:'热度趋势',
childUC:[]
},
{
name:'特别声明',
childUC:[]
}
,
{
name:'用户评论',
childUC:[]
@ -414,6 +435,7 @@ export default {
content: [{ required: 'true', message: '请输入评价!', trigger: 'blur' }],
},
copyright_info:null,
urlStatus:null,
}
},
watch: {
@ -734,7 +756,7 @@ export default {
}
}).then(function (res) {
Object.keys(res.data.data).forEach(key => {
if(res.data.data[key].id == _this.UrlObj.cateId){
if(res.data.data[key].id === _this.UrlObj.cateId){
_this.BelongTo = res.data.data[key].name;
}
})
@ -790,6 +812,24 @@ export default {
}
})
},
checkUrl(url) {
let _this = this;
axios({
method: 'get',
url: '/api/urlcheck',
params: {
url: url,
}
}).then(function (res) {
_this.msg=res.data.msg;
_this.code=res.data.code;
_this.speed=res.data.speed;
_this.loading=false;
})
},
//
getNavQR(url_id) {
let _this = this;
@ -797,16 +837,14 @@ export default {
method: 'post',
url: '/api/qrcode/qrc_return',
params: {
url_id: url_id,
url_id: this.$route.query.uid,
}
}).then(function (res) {
if (res.data) {
_this.imageCode = "data:image/jpg;base64," + res.data;
}
return false;
})
return this.imageCode
},
//
ToURL() {

View File

@ -55,7 +55,11 @@
<el-dropdown @command="handleCommand">
<div class="avatar-div"
style="border-radius: 50px;width: 44px;height: 44px;margin-left: 20px;cursor: pointer" v-show="!isLogin">
<el-avatar> user</el-avatar>
<el-avatar :src="avatar" >
<div slot="error" class="image-slot" style="display: flex;align-items: center;justify-content: center">
<img style="border-radius: 50px;width: 90%;margin-top: 5px" :src="require('@/assets/img/avater.png')" alt="图标">
</div>
</el-avatar>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="setting">书签设置</el-dropdown-item>
@ -287,6 +291,7 @@ export default {
components: {SearchInput},
data() {
return {
visible: false,
TabsValue: '1',
tabList: [
@ -348,7 +353,7 @@ export default {
searchDialog:false,
otherNav:[],
imageUrl:null,
avatar:null,
}
},
mounted() {
@ -357,14 +362,14 @@ export default {
// this.reacherBarFun();
this.changeImg();
this.getOtherNav();
this.avatar=localStorage.getItem('avatar')
},
created() {
this.getImageByConfig('logo');
},
computed: {},
methods: {
...mapMutations(['changeLogin', 'setUserId', 'setUserRole']),
...mapMutations(['changeLogin', 'setUserId', 'setUserRole','setAvatar']),
getImageByConfig(name){
let _this=this;
@ -474,6 +479,7 @@ export default {
localStorage.removeItem("Authorization")
localStorage.removeItem("userId")
localStorage.removeItem("userRole")
localStorage.removeItem("avatar")
this.$router.push({
path:'/home',
})
@ -562,6 +568,7 @@ export default {
// _this.userToken = 'Bearer ' + res.data.token;
_this.changeLogin({Authorization: res.data.token});
_this.setAvatar({avatar: res.data.avatar});
_this.setUserId({userId: res.data.Id});
_this.setUserRole({userRole: res.data.roleId});
_this.closeLoginDialog();

View File

@ -15,11 +15,10 @@
<span class="title">热搜榜</span>
<!-- <span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
</div>
<div v-if="hotSearchKeyWords" v-show="isShowClearHistory">
<div v-if="hotSearchKeyWords" v-for="(tag,index) in hotSearchKeyWords"
:key="index" v-show="isShowClearHistory">
<el-tag
:v-if="hotSearchKeyWords"
v-for="(tag,index) in hotSearchKeyWords"
:key="index"
size="small"
style="margin-right: 10px; margin-top: 10px; cursor: pointer"
@click="handleSearch(tag)"
@ -148,7 +147,6 @@ export default {
}
}).then((res)=>{
if (res.data.code === 200) {
that.hotSearchKeyWords=res.data.data;
} else {

View File

@ -4,8 +4,8 @@
<img style="width: 70px;height: 70px;margin-left: 10px" :src="icon">
</div>
<div class="content">
<span class="content-info">{{info}} /</span>
<span class="content-tag">{{name}}</span>
<span v-if="info" class="content-info">{{info}} /</span>
<span v-if="name" class="content-tag">{{name}}</span>
</div>
</div>
</template>

View File

@ -4,10 +4,10 @@
<div class="card-cover"
style="background-image: url('https://pic.imgdb.cn/item/658af285c458853aef9177aa.jpg')"></div>
<!-- <img class="card-avatar" src="https://pic.imgdb.cn/item/658af285c458853aef9177aa.jpg" alt="avatar">-->
<el-image v-if="user.avatar" class="card-avatar" :src="user.avatar" alt="avatar">
<div slot="error" class="image-slot">
<img style="width: 100%;margin-top: 5px" :src="require('@/assets/img/NAV.png')" alt="图标">
</div>
<el-image class="card-avatar" :src="user.avatar" alt="avatar">
<div slot="error" class="image-slot" style="display: flex;align-items: center;justify-content: center">
<img style="border-radius: 50px;width: 90%;margin-top: 5px" :src="require('@/assets/img/avater.png')" alt="图标">
</div>
</el-image>
<h1 v-if="user.nickname===null" class="card-fullname">{{user.userLogin}}</h1>
<h1 v-if="user.nickname!==null" class="card-fullname">{{user.nickname}}</h1>
@ -129,6 +129,7 @@
<script>
import axios from "axios";
import Vue from "vue";
import {mapMutations} from "vuex";
export default {
name: "PersonalInfoCard",
@ -189,6 +190,7 @@ export default {
},
computed: {},
methods: {
...mapMutations(['setAvatar']),
//
resetForm(formName) {
this.$refs[formName].resetFields();
@ -222,6 +224,9 @@ export default {
});
_this.resetForm('updateForm');
_this.getUserAllInfo();
setTimeout(()=>{
window.location.reload();
},1000)
}
}).catch((error) => {
// Vue.prototype.$notify.error({
@ -260,6 +265,7 @@ export default {
_this.user.userLogin=res.data.userLogin;
_this.user.userRegistered=res.data.userRegistered;
_this.user.roleId=res.data.roleId;
_this.setAvatar({avatar:_this.user.avatar});
}
}).catch((error) => {
// Vue.prototype.$notify.error({

View File

@ -26,7 +26,11 @@
<el-dropdown @command="handleCommand">
<div class="avatar-div"
style="border-radius: 50px;width: 44px;height: 44px;margin-left: 20px;cursor: pointer">
<el-avatar> user</el-avatar>
<el-avatar :src="avatar" >
<div slot="error" class="image-slot" style="display: flex;align-items: center;justify-content: center">
<img style="border-radius: 50px;width: 90%;margin-top: 5px" :src="require('@/assets/img/avater.png')" alt="图标">
</div>
</el-avatar>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="home">返回首页</el-dropdown-item>
@ -49,10 +53,12 @@ export default {
return {
loginDialogVisible:false,
imageUrl:null,
avatar:null,
}},
mounted() {
this.toggleActive();
// this.reacherBarFun();
this.avatar=localStorage.getItem('avatar')
},
created() {
this.getImageByConfig('logo');

View File

@ -366,10 +366,15 @@ export default {
url:url
}
}).then(function(res){
that.form.icon = res.data.data.iconUrl;
that.form.name = res.data.data.title;
that.form.desc = res.data.data.description;
that.form.tags = res.data.data.keywords;
if(res.data.data){
that.form.icon = res.data.data.iconUrl;
that.form.name = res.data.data.title;
that.form.desc = res.data.data.description;
that.form.tags = res.data.data.keywords;
}else {
return false;
}
});
},
//

View File

@ -5,6 +5,7 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
avatar:localStorage.getItem('avatar') ? localStorage.getItem('avatar') : '',
title: localStorage.getItem('title') ? localStorage.getItem('title') : '',
keywords: localStorage.getItem('keywords') ? localStorage.getItem('keywords') : '',
description: localStorage.getItem('description') ? localStorage.getItem('description') : '',
@ -16,6 +17,10 @@ export default new Vuex.Store({
},
getters: {},
mutations: {
setAvatar(state, data){
state.avatar = data.avatar;
localStorage.setItem('avatar', data.avatar);
},
setTitle(state, data){
state.title = data.title;
localStorage.setItem('title', data.title);