update
This commit is contained in:
parent
78eb84b2b8
commit
a877721a8b
@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
:root {
|
||||
--theme-color-trans: rgba(206, 206, 206, 0.66);
|
||||
--table-bg-color: rgba(16, 18, 27, 0.39);
|
||||
--table-bg-color-hover: rgb(16, 18, 27);
|
||||
--table-border : #f6f6f6;
|
||||
@ -32,6 +33,7 @@
|
||||
}
|
||||
|
||||
.light-mode {
|
||||
--theme-color-trans: rgba(60, 58, 58, 0.55);
|
||||
--table-border : #b9b9b9;
|
||||
--font-bg-theme-reverse:rgba(16 18 27 / 40%);
|
||||
--font-border: rgb(108, 155, 255);
|
||||
@ -1072,6 +1074,7 @@ body.light-mode .video-bg:before {
|
||||
flex-wrap:nowrap;
|
||||
flex-direction:row;
|
||||
justify-content:space-around;
|
||||
|
||||
}
|
||||
|
||||
.MyButton{
|
||||
|
@ -105,7 +105,7 @@
|
||||
<div class="ArticleContent">
|
||||
<div v-if="UrlObj.desc == null" style="background-color: var(--theme-bg-color);
|
||||
border-radius:5px;height:250px;margin-top:50px;text-align: center">
|
||||
<el-empty description="描述文字" style="width:80%;height:250px;margin-left:50px;"></el-empty>
|
||||
<el-empty description="暂无描述,敬请期待" style="width:80%;height:250px;margin-left:50px;"></el-empty>
|
||||
</div>
|
||||
{{ UrlObj.desc }}
|
||||
</div>
|
||||
@ -120,12 +120,17 @@
|
||||
<div class="TitleFont"><i class="el-icon-s-marketing"></i>热度趋势</div>
|
||||
</div>
|
||||
<div class="ArticleContent">
|
||||
<div id="ManuEchart" style="width:550px;height:300px;"></div>
|
||||
<div v-if="!xTime[0]" style="background-color: var(--theme-bg-color);
|
||||
border-radius:5px;height:250px;margin-top:50px;text-align: center">
|
||||
<el-empty description="暂无记录,敬请期待" style="width:80%;height:250px;margin-left:50px;"></el-empty>
|
||||
</div>
|
||||
<div v-if="YView" id="ManuEchart" style="width:550px;height:300px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--用户评论-->
|
||||
<div id="用户评论" class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||
<div v-show="update" id="用户评论" class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||
<div class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
|
||||
<div style="width:670px;color: var(--theme-color)">
|
||||
<div class="HeadLine" style="margin-top:30px">
|
||||
<div class="HeadSquare"></div>
|
||||
@ -133,11 +138,112 @@
|
||||
</div>
|
||||
<div class="ArticleContent" style="margin-left:6px !important;width:580px !important;">
|
||||
<el-card style="background-color: var(--theme-comment-color)">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||
<!-- 发布评论 -->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important">
|
||||
<el-form style="width:560px;" ref="form" :rules="rules" :model="form">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||
<el-form-item prop="rating">
|
||||
<span style="font-family: STHupo;color:var(--theme-color)">请输入评分</span>
|
||||
<el-rate style="margin-top:5px" v-model="form.rating" show-text ></el-rate>
|
||||
</el-form-item>
|
||||
<div style="display: flex;flex-direction: row;margin-top:5px">
|
||||
<img class="little-Circle" style="width:60px !important;height: 60px !important;" src="../../assets/img/beauty.jpg"/>
|
||||
<el-form-item prop="content">
|
||||
<el-input v-model="form.content" style="width:350px;margin-top:12px;margin-left:10px;" type="textarea" placeholder="请输入一条友善的评论~"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId" style="display: none">
|
||||
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="urlid" prop="urlId" style="display: none">
|
||||
<el-input v-model="form.urlId" placeholder='用户id' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="rootCommentId" prop="rootCommentId" style="display: none">
|
||||
<el-input v-model="form.rootCommentId" placeholder='rootCommentId' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" plain style="height:40px;width:70px;margin-left:10px;margin-top:12px" @click="submitComment('form')">
|
||||
<span style="font-family: STHupo;font-size:20px;margin-left:-5px;">提交</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!--评论-->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important;margin-top:10px">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap">
|
||||
<span style="font-family: STHupo;font-size:25px;margin-left:-10px;color:var(--theme-color)">评论广场</span>
|
||||
<!--单条评论-->
|
||||
<div v-for="(item,index) in allcomment" :key="index" class="circleRoll" style="margin-top:50px">
|
||||
<div style="width:100%;height:2px;background-color: var(--theme-color-trans)"></div>
|
||||
<div style="display:flex;flex-direction: row;flex-wrap: nowrap;margin-top:40px">
|
||||
<img class="little-Circle" style="width:50px !important;height:50px !important;margin-top:20px;" src="../../assets/img/beauty.jpg"/>
|
||||
<div style="display: flex;flex-direction: column">
|
||||
<div style="display: flex;flex-direction: row;color:var(--theme-color);margin-left:5px;">
|
||||
<span style="font-family: STHupo;width:50px">用户:</span><span style="font-size:13px;margin-left:5px;width:100px">{{item.user.userLogin}}</span>
|
||||
<span style="font-family: STHupo;margin-left:15px;width:100px">评论时间:</span><span style="font-size:13px;margin-left:0px;width:150px">{{dateFormat('YYYY-mm-dd',item.commentTime)}}</span>
|
||||
</div>
|
||||
<div class='arrow-box popper border arrow-left'
|
||||
style="background-color: var(--theme-comment-color);margin-left:10px;margin-top:7px;width:430px;border: 5px solid var(--border-color)">
|
||||
<div style="min-height:60px;margin-left:15px;margin-top:15px;color:var(--theme-color);font-size:15px">
|
||||
{{item.content}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row-reverse;width:100%;height:42px">
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:5px;margin-left:10px;">{{item.likeCount}}</span>
|
||||
<el-button type="danger" class="el-icon-thumb" size="medium"
|
||||
plain circle style="margin-top:6px;margin-left:20px;" @click="LikeMe(item.id)">
|
||||
</el-button>
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:10px" >回复</span>
|
||||
<el-button type="success" class="el-icon-chat-dot-square" size="medium" plain circle
|
||||
style="margin-top:6px;margin-left:70px" @click="addReply(item.id)">
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
<!--子评论-->
|
||||
<div v-for="(item2,index2) in rootId_AllComment[item.id]" :key="index2" >
|
||||
<img class="little-Circle" style="width:50px !important;height:50px !important;margin-top:40px;" src="../../assets/img/beauty.jpg"/>
|
||||
<el-card style="border:var(--border-color) 5px solid;min-height:60px;
|
||||
background-color: var(--theme-comment-color) !important;
|
||||
margin-top:-70px;margin-left:70px;">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap;font-size:17px">
|
||||
<div style="display: flex;flex-direction: row;color:var(--theme-color);margin-left:-15px;">
|
||||
<span style="width:auto;font-weight:650;margin-top:10px;margin-left:10px">{{item2.user.userLogin}}</span>
|
||||
<span style="font-family: STHupo;width:50px;margin-top:11px;margin-left:10px;color: rgba(255,78,78,0.5)!important;">回复 </span>
|
||||
<span style="width:70px;font-weight:650;margin-top:10px;margin-left:7px">{{item2.RootUser}} </span>
|
||||
</div>
|
||||
</div>
|
||||
<el-card style="font-size:15px;border:var(--border-color) 5px solid;margin-top:10px;
|
||||
display: flex;flex-direction: column;flex-wrap: wrap;
|
||||
background-color: var(--theme-comment-color) !important;color:var(--theme-color)">
|
||||
{{item2.content}}
|
||||
</el-card >
|
||||
<div style="color:var(--theme-color);margin-top:10px;font-size:16px;margin-left:130px">
|
||||
<span style="font-family: STHupo;margin-left:12px;width:100px">评论时间: </span>
|
||||
{{dateFormat('YYYY-mm-dd',item2.commentTime)}}
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row-reverse;width:100%;height:42px;margin-top:6px">
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:5px;margin-left:10px;">{{item.likeCount}}</span>
|
||||
<el-button type="danger" class="el-icon-thumb" size="medium" plain circle style="margin-top:6px;margin-left:20px;" >
|
||||
</el-button>
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:10px">回复</span>
|
||||
<el-button type="success" class="el-icon-chat-dot-square" size="medium"
|
||||
plain circle style="margin-top:6px;margin-left:70px" @click="addReply(item2.id)">
|
||||
<i class="myIcon2"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<UserComment></UserComment>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -149,6 +255,33 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="回复" :visible.sync="openAddCategory" width="30%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" class="login_container" :model="form"
|
||||
style="margin-top:-10px" status-icon label-width="100px" >
|
||||
<el-form-item label="回复内容" prop="content">
|
||||
<el-input v-model="form.content" placeholder='回复内容' clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId" style="display: none">
|
||||
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="urlid" prop="urlId" style="display: none">
|
||||
<el-input v-model="form.urlId" placeholder='用户id' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="rootCommentId" prop="rootCommentId" style="display: none">
|
||||
<el-input v-model="form.rootCommentId" placeholder='rootCommentId' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;flex-wrap: nowrap;justify-content: space-between">
|
||||
<el-button @click="submitApply('form')" type="primary" style=";margin-top:10px">确认</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import HotRecomment from "@/components/detail/HotRecomment.vue";
|
||||
@ -167,6 +300,11 @@ export default {
|
||||
components: {LeftSide, HotRecomment, NewRecomment, RandomRecomment, UserComment},
|
||||
data() {
|
||||
return {
|
||||
userId:'',
|
||||
// 点赞数:
|
||||
LikeNum:{},
|
||||
flag1:true,
|
||||
flag2:true,
|
||||
category: [{
|
||||
name:'网站信息',
|
||||
childUC:[]
|
||||
@ -203,21 +341,34 @@ export default {
|
||||
imageCode: null,
|
||||
// 所有评论:
|
||||
allcomment:[],
|
||||
// 根评论:
|
||||
rootcomment:[],
|
||||
// 根评论id :根评论下所有评论对象
|
||||
rootId_AllComment:{1:[],2:[]},
|
||||
rootId_AllComment:{},
|
||||
// 更新:
|
||||
update:true,
|
||||
// 弹出页:
|
||||
openAddCategory:false,
|
||||
// 回复谁?
|
||||
rootid:'',
|
||||
// 表单:
|
||||
form:{
|
||||
urlId:'',
|
||||
userId:'',
|
||||
content:'',
|
||||
rootCommentId:'',
|
||||
rating:'',
|
||||
},
|
||||
rules: {
|
||||
rating: [{ required: 'true', message: '请输入评分!', trigger: 'blur' }],
|
||||
content: [{ required: 'true', message: '请输入评价!', trigger: 'blur' }],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': 'getPath'
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// this.GetAllComment();
|
||||
|
||||
|
||||
|
||||
this.GetAllComment();
|
||||
},
|
||||
created() {
|
||||
this.UrlId = this.$route.query.uid;
|
||||
@ -225,10 +376,213 @@ export default {
|
||||
if(this.UrlId){
|
||||
this.ViewByTime(this.UrlId)
|
||||
}
|
||||
this.getUser();
|
||||
// this.funFrame();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
var that = this;
|
||||
// 先重置
|
||||
this.GetAllComment();
|
||||
this.reload();
|
||||
//表单重置
|
||||
that.form = {
|
||||
urlId:'',
|
||||
userId:'',
|
||||
content:'',
|
||||
rootCommentId:'',
|
||||
rating:'',
|
||||
}
|
||||
// 后关闭
|
||||
this.openAddCategory=false;
|
||||
},
|
||||
// 添加回复:
|
||||
addReply(rootid){
|
||||
this.openAddCategory=true;
|
||||
this.rootid = rootid;
|
||||
},
|
||||
getUser() {
|
||||
let _this = this;
|
||||
if(localStorage.getItem("Authorization") && localStorage.getItem("userId")){
|
||||
_this.userId = localStorage.getItem("userId")
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: "登录状态失效,请重新登录!",
|
||||
offset: 0
|
||||
});
|
||||
}
|
||||
},
|
||||
// 提交回复(无评分,默认0)
|
||||
submitApply(rulelist){
|
||||
var _this = this;
|
||||
_this.form.rating = 0;
|
||||
_this.form.rootCommentId = _this.rootid;
|
||||
console.log(this.form);
|
||||
if(localStorage.getItem("Authorization") && localStorage.getItem("userId")){
|
||||
_this.$refs[rulelist].validate((valid)=>{
|
||||
if(valid){
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: '/api/comment/comment',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
urlId:this.form.urlId,
|
||||
userId:this.form.userId,
|
||||
content:this.form.content,
|
||||
rootCommentId:this.form.rootCommentId,
|
||||
rating:this.form.rating,
|
||||
}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 500) {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, "更新成功!"),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
this.closeDialog();
|
||||
this.form = {
|
||||
urlId:'',
|
||||
userId:'',
|
||||
content:'',
|
||||
rootCommentId:'',
|
||||
rating:'',
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '请先登录!',
|
||||
message: '',
|
||||
offset: 50
|
||||
})
|
||||
}
|
||||
},
|
||||
//提交评论:
|
||||
submitComment(rulelist){
|
||||
var _this = this;
|
||||
console.log(this.form);
|
||||
if(localStorage.getItem("Authorization") && localStorage.getItem("userId")){
|
||||
_this.$refs[rulelist].validate((valid)=>{
|
||||
if(valid){
|
||||
console.log(this.form);
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: '/api/comment/comment',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
urlId:this.form.urlId,
|
||||
userId:this.form.userId,
|
||||
content:this.form.content,
|
||||
rootCommentId:this.form.rootCommentId,
|
||||
rating:this.form.rating,
|
||||
}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 500) {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, "更新成功!"),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
this.reload();
|
||||
this.form = {
|
||||
urlId:'',
|
||||
userId:'',
|
||||
content:'',
|
||||
rootCommentId:'',
|
||||
rating:'',
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '请先登录!',
|
||||
message: '',
|
||||
offset: 50
|
||||
})
|
||||
}
|
||||
},
|
||||
reload() {
|
||||
// 移除组件
|
||||
this.update = false
|
||||
// 在组件移除后,重新渲染组件
|
||||
// this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
|
||||
this.$nextTick(() => {
|
||||
this.update = true
|
||||
})
|
||||
},
|
||||
// 点赞:
|
||||
LikeMe(id){
|
||||
var that = this;
|
||||
axios({
|
||||
method: 'get',
|
||||
url: '/api/comment/addLikeCount',
|
||||
params: {
|
||||
id:id
|
||||
}
|
||||
})
|
||||
that.GetAllComment();
|
||||
this.reload();
|
||||
},
|
||||
|
||||
// 获取当前时间:
|
||||
getCurrentDate(){
|
||||
let now = new Date();
|
||||
let year = now.getFullYear();
|
||||
let month = now.getMonth() + 1;
|
||||
let day = now.getDate();
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
|
||||
|
||||
dateFormat(fmt, date) {
|
||||
let ret="";
|
||||
date=new Date(date);
|
||||
const opt = {
|
||||
'Y+': date.getFullYear().toString(), // 年
|
||||
'm+': (date.getMonth() + 1).toString(), // 月
|
||||
'd+': date.getDate().toString(), // 日
|
||||
'H+': date.getHours().toString(), // 时
|
||||
'M+': date.getMinutes().toString(), // 分
|
||||
'S+': date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
}
|
||||
for (let k in opt) {
|
||||
ret = new RegExp('(' + k + ')').exec(fmt)
|
||||
if (ret) {
|
||||
fmt = fmt.replace(
|
||||
ret[1],
|
||||
ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
|
||||
)
|
||||
}
|
||||
}
|
||||
return fmt
|
||||
},
|
||||
|
||||
getPath() {
|
||||
if(this.$route.query.name){
|
||||
@ -238,38 +592,41 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 渲染iframe:
|
||||
// funFrame(){
|
||||
// var iframe = document.getElementById("myframe");
|
||||
// var url = this.UrlObj.url;
|
||||
// iframe.src = url;
|
||||
// },
|
||||
|
||||
// 递归获取指定根目录下的所有评论:
|
||||
func0(commentId){
|
||||
func0(comment,rootId){
|
||||
var that = this;
|
||||
that.allcomment.forEach(function(value){
|
||||
if(value.root_comment_id == commentId){
|
||||
that.rootId_AllComment[commentId].push(value);
|
||||
this.func0(value.id);
|
||||
}
|
||||
})}
|
||||
if(comment.nextNodes.length != 0){
|
||||
var rootUser = comment.user.userLogin;
|
||||
console.log(comment.user.userLogin);
|
||||
that.rootId_AllComment[String(rootId)] = that.rootId_AllComment[String(rootId)].concat(comment.nextNodes);
|
||||
Object.keys(comment.nextNodes).forEach(key => {
|
||||
that.$set(comment.nextNodes[key],'RootUser',rootUser);
|
||||
this.func0(comment.nextNodes[key],rootId);
|
||||
})
|
||||
}
|
||||
}
|
||||
,
|
||||
// 所有评论
|
||||
GetAllComment(){
|
||||
let _this = this;
|
||||
axios.get('/api/comment/view_comment', {
|
||||
axios.get('/api/comment/UrlId', {
|
||||
params: {
|
||||
UrlId:_this.UrlId
|
||||
}
|
||||
}).then(function (res) {
|
||||
_this.allcomment = res.data;
|
||||
}).catch((error) => {
|
||||
// Vue.prototype.$notify.error({
|
||||
// title: '错误',
|
||||
// message: error,
|
||||
// offset: 0
|
||||
// });
|
||||
_this.allcomment = res.data;
|
||||
_this.form.userId = _this.userId;
|
||||
_this.form.urlId = _this.UrlId;
|
||||
_this.form.rootCommentId = 0;
|
||||
// 算点赞数:
|
||||
// 获取根评论
|
||||
Object.keys(res.data).forEach(key => {
|
||||
_this.rootId_AllComment[res.data[key].id] = [];
|
||||
_this.func0(res.data[key],res.data[key].id);
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
// 日访问:
|
||||
ViewByTime(id) {
|
||||
@ -284,14 +641,10 @@ export default {
|
||||
_this.xTime.push(res.data[key].time);
|
||||
_this.YView.push(res.data[key].views);
|
||||
})
|
||||
_this.initEchart(_this.xTime,_this.YView);
|
||||
if(_this.xTime[0] != undefined){
|
||||
_this.initEchart(_this.xTime,_this.YView);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
// Vue.prototype.$notify.error({
|
||||
// title: '错误',
|
||||
// message: error,
|
||||
// offset: 0
|
||||
// });
|
||||
})
|
||||
},
|
||||
// 获取二维码:
|
||||
@ -309,12 +662,6 @@ export default {
|
||||
}
|
||||
|
||||
return false;
|
||||
}).catch((error) => {
|
||||
// Vue.prototype.$notify.error({
|
||||
// title: '错误',
|
||||
// message: error === null ? '' : error,
|
||||
// offset: 0
|
||||
// });
|
||||
})
|
||||
return this.imageCode
|
||||
},
|
||||
@ -323,21 +670,6 @@ export default {
|
||||
var that = this;
|
||||
window.open(that.UrlObj.url, '_blank')
|
||||
},
|
||||
// 时间转换:
|
||||
getFormatDate() {
|
||||
var that = this;
|
||||
console.log(this.UnDate + "传入时间戳");
|
||||
var date = new Date(this.UnDate);// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||
var Y = date.getFullYear() + '年';
|
||||
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
|
||||
var D = date.getDate() + '日 ';
|
||||
// var h = date.getHours() + ':';
|
||||
// var m = date.getMinutes() + ':';
|
||||
// var s = date.getSeconds();
|
||||
that.Cdate = "" + Y + M + D;
|
||||
},
|
||||
|
||||
|
||||
// 初始化Echart图
|
||||
initEchart(xline,yline) {
|
||||
// var that = this;
|
||||
@ -429,21 +761,24 @@ export default {
|
||||
}).then((res) => {
|
||||
that.UrlObj = res.data.data;
|
||||
that.UnDate = that.UrlObj.createtime;
|
||||
}).catch((error) => {
|
||||
// Vue.prototype.$notify.error({
|
||||
// title: '错误',
|
||||
// message: error === null ? '' : error,
|
||||
// offset: 0
|
||||
// });
|
||||
});
|
||||
this.getFormatDate();
|
||||
var date = new Date(this.UnDate);// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||
var Y = date.getFullYear() + '年';
|
||||
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
|
||||
var D = date.getDate() + '日 ';
|
||||
// var h = date.getHours() + ':';
|
||||
// var m = date.getMinutes() + ':';
|
||||
// var s = date.getSeconds();
|
||||
that.Cdate = "" + Y + M + D;
|
||||
if(that.UrlObj.desc == null){
|
||||
that.flag1 = false;
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
// 向管理员反馈
|
||||
WarnToAdmin() {
|
||||
// this.GetAllComment();
|
||||
// console.log(this.allcomment);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="css">
|
||||
@ -457,6 +792,8 @@ export default {
|
||||
|
||||
|
||||
<style scoped>
|
||||
/**按钮样式:**/
|
||||
|
||||
/**标签详情**/
|
||||
.ArticleContent {
|
||||
width: 80%;
|
||||
@ -580,4 +917,25 @@ a {
|
||||
font-weight: bold;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.login_container {
|
||||
width: 400px;
|
||||
border: 1px solid #eaeaea;
|
||||
margin: 100px auto;
|
||||
padding: 35px 35px 15px 35px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 15px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
.login_title{
|
||||
color: #505458;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;}
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__body{
|
||||
background-image: url("../../assets/img/SkyPic.jpg");
|
||||
margin-top:15px;
|
||||
height:300px;
|
||||
}
|
||||
</style>
|
@ -1,69 +1,22 @@
|
||||
<template>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||
<!-- 发布评论 -->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important">
|
||||
<form style="width:560px;">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||
<span style="font-family: STHupo;color:var(--theme-color)">请输入评分</span>
|
||||
<el-rate style="margin-top:5px" ></el-rate>
|
||||
<div style="display: flex;flex-direction: row;margin-top:5px">
|
||||
<img class="little-Circle" style="width:60px !important;height: 60px !important;" src="../../assets/img/beauty.jpg"/>
|
||||
<el-input style="width:350px;margin-top:12px;margin-left:10px;" type="textarea" placeholder="请输入一条友善的评论~"></el-input>
|
||||
<el-button type="success" plain style="height:40px;width:70px;margin-left:10px;margin-top:12px">
|
||||
<span style="font-family: STHupo;font-size:20px;margin-left:-5px;">提交</span>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</el-card>
|
||||
<!--评论-->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important;margin-top:10px">
|
||||
<div>
|
||||
<!--子评论-->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important;margin-top:50px;margin-left:70px">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap">
|
||||
<span style="font-family: STHupo;font-size:25px;margin-left:-10px;color:var(--theme-color)">评论广场</span>
|
||||
<!--单条评论-->
|
||||
<el-divider></el-divider>
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-top:40px">
|
||||
<img class="little-Circle" style="width:50px !important;height:50px !important;margin-top:20px;" src="../../assets/img/beauty.jpg"/>
|
||||
<div style="display: flex;flex-direction: column">
|
||||
<div style="display: flex;flex-direction: row;color:var(--theme-color);margin-left:5px;">
|
||||
<span style="font-family: STHupo;width:50px">用户:</span><span style="font-size:13px;margin-left:5px;width:100px">JK少女</span>
|
||||
<span style="font-family: STHupo;margin-left:15px;width:100px">评论时间:</span><span style="font-size:13px;margin-left:0px;width:150px">2023年12月22日</span>
|
||||
</div>
|
||||
<div class='arrow-box popper border arrow-left'
|
||||
style="background-color: var(--theme-comment-color);margin-left:10px;margin-top:7px;width:430px;border: 3px solid var(--border-color)">
|
||||
<div style="margin-left:10px;margin-top:5px;color:var(--theme-color);font-size:15px">
|
||||
8~18 位包含大小写字母、数字、特殊字符的密码8~18 位包含大小写字母、数字、特殊字符的密码8~18 位包含大小写字母、数字、特殊字符的密码
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row-reverse;width:100%;height:42px">
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:5px;margin-left:10px;">112</span>
|
||||
<el-button type="danger" icon="myIcon" size="medium" plain circle style="margin-top:6px;margin-left:20px;" ></el-button>
|
||||
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:10px">评论</span>
|
||||
<el-button type="success" icon="myIcon2" size="medium" plain circle style="margin-top:6px;margin-left:70px" ></el-button>
|
||||
</div>
|
||||
<!--子评论-->
|
||||
<el-card style="background-color: var(--theme-comment-color) !important;margin-top:50px;margin-left:70px">
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap">
|
||||
<div style="display: flex;flex-direction: row;color:var(--theme-color);margin-left:5px;">
|
||||
<img class="little-Circle" style="width:50px !important;height:50px !important;margin-top:10px;" src="../../assets/img/beauty.jpg"/>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:10px">JK少男</span>
|
||||
<span style="font-family: STHupo;width:50px;margin-top:25px;color: rgba(255,78,78,0.5)!important;">回复 </span>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:7px">JK少女</span>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:7px">:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap">
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;color:var(--theme-color);margin-left:5px;">
|
||||
<img class="little-Circle" style="width:50px !important;height:50px !important;margin-top:10px;" src="../../assets/img/beauty.jpg"/>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:10px">JK少男</span>
|
||||
<span style="font-family: STHupo;width:50px;margin-top:25px;color: rgba(255,78,78,0.5)!important;">回复 </span>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:7px">JK少女</span>
|
||||
<span style="font-family: STHupo;width:70px;margin-top:25px;margin-left:7px">:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: wrap">
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
内容丰富多元,节目持续更新,内容播放清晰流畅,操作界面简单友好,真正为用户带来“悦享品质”的观映体验。
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
@ -71,6 +24,9 @@
|
||||
<script>
|
||||
export default {
|
||||
name:"UserComment",
|
||||
props: {
|
||||
Singlecomment: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@ -155,13 +111,10 @@ $popper-background-color: #000;
|
||||
|
||||
&::before {
|
||||
z-index: 3;
|
||||
|
||||
left: -1px;
|
||||
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent $popper-border-color $popper-border-color;
|
||||
|
||||
box-shadow: 3px 3px 3px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@
|
||||
<el-input v-model="form.weigh" placeholder='分类权重' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId" style="display: none">
|
||||
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
|
||||
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="form.status" >
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="base-style" style="margin-top:20px;font-family: SimHei;font-size:18px;font-weight:600;margin-left:20px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-button @click="openAddCategoryFun()" type="primary" plain size="medium" round >创建标签</el-button>
|
||||
<el-button @click="openAddCategoryFun()" type="primary" plain size="medium" round >新增网址</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top:20px">
|
||||
<el-input
|
||||
@ -22,7 +22,9 @@
|
||||
<el-table class="MyTable"
|
||||
:data="List"
|
||||
header-row-class-name="table_header_class"
|
||||
border>
|
||||
border
|
||||
max-height="400"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
type="index"
|
||||
@ -31,15 +33,20 @@
|
||||
label="序号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
||||
align="center"
|
||||
prop="name"
|
||||
label="网站名"
|
||||
width="180">
|
||||
<el-table-column align="center" key="name" prop="name" label="网站名" width="190">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip placement="top" width="150"
|
||||
trigger="hover"
|
||||
effect="dark" close-delay="2000">
|
||||
<div class="MyPopover" slot="content">{{scope.row.name}}</div>
|
||||
<div>
|
||||
<span>{{ scope.row.name.substr(0,12)}}</span>
|
||||
<span v-if="(scope.row.name).length > 12">...</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
||||
align="center"
|
||||
prop="root"
|
||||
label="所属分类"
|
||||
@ -51,11 +58,18 @@
|
||||
label="创建时间"
|
||||
width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="desc"
|
||||
label="描述"
|
||||
width="100">
|
||||
<el-table-column align="center" key="desc" prop="desc" label="描述" width="100">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tooltip placement="top" width="150"-->
|
||||
<!-- trigger="hover"-->
|
||||
<!-- effect="dark" close-delay="2000">-->
|
||||
<!-- <div class="MyPopover" slot="content">{{scope.row.desc}}</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>{{ scope.row.desc.substr(0,12)}}</span>-->
|
||||
<!-- <span v-if="(scope.row.desc).length > 12">...</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
@ -89,15 +103,28 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" key="isNeedAgent" prop="isNeedAgent" label="是否需要代理" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isNeedAgent"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
disabled
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="weigh"
|
||||
label="权重"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" label="操作" width="160">
|
||||
<el-table-column prop="date" label="操作" width="160" >
|
||||
<template slot-scope="scope">
|
||||
<div class="ButtonBlock">
|
||||
<div class="ButtonBlock" >
|
||||
<img class="MyButton" @click="handleEdit(scope.row)"
|
||||
src="../../../assets/img/EditButton.svg" style="width:60px">
|
||||
<img class="MyButton" @click="handleDelete(scope.row)"
|
||||
@ -106,37 +133,80 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog title="新增分类" :visible.sync="openAddCategory" width="30%"
|
||||
<div style="width:100%;height:100px"></div>
|
||||
<el-dialog title="新增分类" :visible.sync="openAddCategory" width="45%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form ref="form" :rules="rules" class="login_container" :model="form"
|
||||
style="margin-top:-10px" status-icon label-width="100px" >
|
||||
<el-form-item label="分类名" prop="name">
|
||||
<el-input v-model="form.name" placeholder='分类名称' clearable></el-input>
|
||||
<el-form-item label="网站URL" prop="name">
|
||||
<el-input v-model="form.url" placeholder='网站URL' clearable></el-input>
|
||||
<el-button @click="Analysis(form.url)" type="primary" plain size="medium" round >解析URL</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类权重" prop="weigh" >
|
||||
<el-input v-model="form.weigh" placeholder='分类权重' clearable ></el-input>
|
||||
<el-form-item label="网站名" prop="name">
|
||||
<el-input v-model="form.name" placeholder='网站名' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId" style="display: none">
|
||||
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
|
||||
<el-form-item label="网站图标" prop="icon">
|
||||
<el-input v-model="form.icon" placeholder='网站图标' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="form.status" >
|
||||
<el-radio :label="0">有效</el-radio>
|
||||
<el-radio :label="1">无效</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否公开" prop="needLogin">
|
||||
<el-radio-group v-model="form.needLogin" >
|
||||
<el-radio :label="1">公开</el-radio>
|
||||
<el-radio :label="0">私有</el-radio>
|
||||
</el-radio-group>
|
||||
<el-form-item label="网站Tag" prop="tags">
|
||||
<el-input v-model="form.tags" placeholder='网站Tag' clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="网站归类" prop="cate_id">
|
||||
<el-select v-model="form.cate_id" prop="cate_id"
|
||||
value-key="deviceType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in Cate"
|
||||
:key="item.id"
|
||||
:label="item.rootName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分类权重" prop="weigh" >
|
||||
<el-input v-model="form.weigh" placeholder='分类权重' clearable ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="form.status" >
|
||||
<el-radio :label="0">启用</el-radio>
|
||||
<el-radio :label="1">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否公开" prop="needLogin">
|
||||
<el-radio-group v-model="form.needLogin" >
|
||||
<el-radio :label="1">公开</el-radio>
|
||||
<el-radio :label="0">私有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需要代理" prop="is_need_agent">
|
||||
<el-radio-group v-model="form.is_need_agent" >
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;flex-wrap: nowrap;justify-content: space-between">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;flex-wrap: nowrap;justify-content: space-between;width:60%">
|
||||
<el-button @click="addCategory('form')" type="primary" style=";margin-top:10px">确认</el-button>
|
||||
<el-button @click="reset('form')" type="success" style=";margin-top:10px">重置</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -156,6 +226,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 分类列表:
|
||||
Cate:[],
|
||||
// 表头名字:
|
||||
titlename:null,
|
||||
// 新增目录页面:
|
||||
@ -170,22 +242,30 @@ export default {
|
||||
form:{
|
||||
name:'',
|
||||
weigh:'',
|
||||
needLogin:'',
|
||||
status:'',
|
||||
userId:'',
|
||||
icon:'',
|
||||
cate_id:'',
|
||||
url:'',
|
||||
tags:'',
|
||||
desc:'',
|
||||
is_need_agent:'',
|
||||
},
|
||||
// 校验规则
|
||||
rules: {
|
||||
name: [{ required: 'true', message: '请输入分类名', trigger: 'blur' }],
|
||||
name: [{ required: 'true', message: '请输入网站名', trigger: 'blur' }],
|
||||
weigh: [{ required: 'true', message: '请输入权重', trigger: 'blur' }],
|
||||
needLogin: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
status: [{ required: 'true', message: '请输入是否启用', trigger: 'blur' }],
|
||||
userId: [{ required: 'true', message: '登录信息有误', trigger: 'blur' }],
|
||||
icon: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
cate_id: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
url: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
tags: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
is_need_agent: [{ required: 'true', message: '请完善信息', trigger: 'blur' }],
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getFormatDate();
|
||||
this.GetData();
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo();
|
||||
@ -193,6 +273,36 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 重置表单:
|
||||
reset(){
|
||||
this.form = {
|
||||
name:'',
|
||||
weigh:'',
|
||||
status:'',
|
||||
icon:'',
|
||||
cate_id:'',
|
||||
url:'',
|
||||
tags:'',
|
||||
desc:'',
|
||||
is_need_agent:'',
|
||||
}
|
||||
},
|
||||
// 解析网址:
|
||||
Analysis(url){
|
||||
let that = this;
|
||||
axios({
|
||||
method:'post',
|
||||
url:'/api/UrlAndCate/disposeUrl',
|
||||
params:{
|
||||
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;
|
||||
});
|
||||
},
|
||||
// 删除网址:
|
||||
handleDelete(index) {
|
||||
var that=this;
|
||||
@ -204,11 +314,10 @@ export default {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: '/api/UrlAndCate/deleteCateByCateId',
|
||||
url: '/api/admin/weblist/deleteUrl',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
Id: index.id,
|
||||
userId:this.userId,
|
||||
urlId:index.urlId,
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 500) {
|
||||
@ -240,13 +349,17 @@ export default {
|
||||
closeDialog() {
|
||||
var that = this;
|
||||
// 先重置
|
||||
this.GetData();
|
||||
//表单重置
|
||||
that.form = {
|
||||
name:'',
|
||||
weigh:'',
|
||||
needLogin:'',
|
||||
status:'',
|
||||
icon:'',
|
||||
cate_id:'',
|
||||
url:'',
|
||||
tags:'',
|
||||
desc:'',
|
||||
is_need_agent:'',
|
||||
}
|
||||
// 后关闭
|
||||
this.dialogVisible = false;
|
||||
@ -255,8 +368,8 @@ export default {
|
||||
// 新增按钮:
|
||||
openAddCategoryFun(){
|
||||
var _this = this;
|
||||
console.log(_this.List);
|
||||
_this.titlename="新增分类";
|
||||
_this.titlename="新增网址";
|
||||
console.log(this.List);
|
||||
_this.openAddCategory=true;
|
||||
},
|
||||
// 编辑按钮:
|
||||
@ -275,14 +388,18 @@ export default {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: '/api/UrlAndCate/insertCateByUser',
|
||||
url: '/api/admin/weblist/insertUrlByUser',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
name: this.form.name,
|
||||
weigh: this.form.weigh,
|
||||
icon:this.form.icon,
|
||||
cate_id:this.form.cate_id,
|
||||
status: this.form.status,
|
||||
need_login: this.form.need_login,
|
||||
is_need_agent:this.form.is_need_agent,
|
||||
userId: this.form.userId,
|
||||
desc: this.form.desc,
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 500) {
|
||||
@ -338,7 +455,6 @@ export default {
|
||||
let _this = this;
|
||||
if(localStorage.getItem("Authorization") && localStorage.getItem("userId")){
|
||||
_this.userId = localStorage.getItem("userId")
|
||||
_this.GetData();
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
@ -350,6 +466,7 @@ export default {
|
||||
GetData(){
|
||||
// 获取数据
|
||||
var that = this;
|
||||
|
||||
axios({
|
||||
method:'post',
|
||||
url:'/api/UrlAndCate/disposeBookmarkToJson',
|
||||
@ -361,6 +478,11 @@ export default {
|
||||
var tmp2 = [];
|
||||
for(let i=0;i< tmp.length;i++){
|
||||
var rootName = tmp[i].name;
|
||||
var catenum = tmp[i].cateId;
|
||||
var CateItem = {};
|
||||
CateItem['id'] = catenum;
|
||||
CateItem['rootName'] = rootName;
|
||||
that.Cate.push(CateItem);
|
||||
tmp[i].childUC = tmp[i].childUC.map(item=>{
|
||||
return{
|
||||
...item,
|
||||
@ -377,8 +499,9 @@ export default {
|
||||
var D = date.getDate() + '日 ';
|
||||
that.List[i].createtime = "" + Y + M + D;
|
||||
}
|
||||
})
|
||||
});
|
||||
that.form.userId = that.userId;
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
@ -397,8 +520,10 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
.MyTable{
|
||||
overflow:auto;
|
||||
margin-top:10px;
|
||||
width: 100%;
|
||||
height:600px;
|
||||
width: 95%;
|
||||
background-color:var(--table-bg-color);
|
||||
color:var(--theme-color);
|
||||
border-radius: 5px;
|
||||
@ -418,7 +543,7 @@ export default {
|
||||
border: var(--table-border) solid 3px;
|
||||
}
|
||||
.login_container {
|
||||
width: 400px;
|
||||
width: 550px;
|
||||
border: 1px solid #eaeaea;
|
||||
margin: 100px auto;
|
||||
padding: 35px 35px 15px 35px;
|
||||
@ -435,6 +560,6 @@ export default {
|
||||
::v-deep .el-dialog__body{
|
||||
background-image: url("../../../assets/img/SkyPic.jpg");
|
||||
margin-top:15px;
|
||||
height:500px;
|
||||
height:700px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user