diff --git a/src/assets/img/avater.png b/src/assets/img/avater.png new file mode 100644 index 0000000..8d87ad3 Binary files /dev/null and b/src/assets/img/avater.png differ diff --git a/src/components/detail/NavDetail.vue b/src/components/detail/NavDetail.vue index 8035b68..fd9a03b 100644 --- a/src/components/detail/NavDetail.vue +++ b/src/components/detail/NavDetail.vue @@ -176,7 +176,12 @@
- + +
+ 图标 +
+
+ @@ -207,7 +212,16 @@
- + + + + + + +
+ 图标 +
+
用户:{{item.user.userLogin}} @@ -233,7 +247,11 @@
- + +
+ 图标 +
+
@@ -329,6 +347,7 @@ export default { data() { return { userId:'', + userItem:{}, // 点赞数: LikeNum:{}, flag1:true, @@ -480,15 +499,20 @@ export default { this.rootid = rootid; }, getUser() { - let _this = this; + var _this = this; if(localStorage.getItem("Authorization") && localStorage.getItem("userId")){ _this.userId = localStorage.getItem("userId") - } else { - Vue.prototype.$notify.error({ - title: '错误', - message: "登录状态失效,请重新登录!", - offset: 0 - }); + axios({ + method: 'get', + // 请求的地址 + url: '/api/getUserDetailes', + // URL 中的查询参数 + params: { + id:_this.userId, + } + }).then((res)=> { + _this.userItem = res.data; + }) } }, // 提交回复(无评分,默认0) diff --git a/src/components/setting/banner/BannerManage.vue b/src/components/setting/banner/BannerManage.vue index 8d31692..5c59907 100644 --- a/src/components/setting/banner/BannerManage.vue +++ b/src/components/setting/banner/BannerManage.vue @@ -1,23 +1,456 @@ \ No newline at end of file diff --git a/src/components/setting/category/CategoryManage.vue b/src/components/setting/category/CategoryManage.vue index c8eadec..514686e 100644 --- a/src/components/setting/category/CategoryManage.vue +++ b/src/components/setting/category/CategoryManage.vue @@ -40,11 +40,10 @@ width="180"> + width="150"> - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - 有效 - 无效 - - - - - 公开 - 私有 - + + + + + + + + + + + + + +
- 确认 + 确认
@@ -165,13 +167,14 @@ export default { needLogin:'', status:'', userId:'', + id:'', }, // 校验规则 rules: { name: [{ required: 'true', message: '请输入分类名', trigger: 'blur' }], weigh: [{ required: 'true', message: '请输入权重', trigger: 'blur' }], - needLogin: [{ required: 'true', message: '请完善信息', trigger: 'blur' }], - status: [{ required: 'true', message: '请输入是否启用', trigger: 'blur' }], + // needLogin: [{ required: 'true', message: '请完善信息', trigger: 'blur' }], + // status: [{ required: 'true', message: '请输入是否启用', trigger: 'blur' }], userId: [{ required: 'true', message: '登录信息有误', trigger: 'blur' }], } } @@ -185,6 +188,7 @@ export default { }, computed: {}, methods: { + // 删除网址: handleDelete(index) { var that=this; @@ -239,10 +243,13 @@ export default { weigh:'', needLogin:'', status:'', + userId:'', + id:'', } // 后关闭 this.dialogVisible = false; this.openAddCategory=false; + that.getUserInfo(); }, // 新增按钮: openAddCategoryFun(){ @@ -260,48 +267,75 @@ export default { this.form = index; }, // 提交新增: - addCategory(rulelist){ + addCategory(rulelist,flag){ var _this = this; _this.$refs[rulelist].validate((valid)=>{ if(valid){ - axios({ - method: 'post', - // 请求的地址 - url: '/api/UrlAndCate/insertCateByUser', - // URL 中的查询参数 - params: { - name: this.form.name, - weigh: this.form.weigh, - status: this.form.status, - need_login: this.form.need_login, - userId: this.form.userId, - } - }).then(function (res) { - if (res.data.code === 500) { - Vue.prototype.$notify.error({ - title: '错误', - message: res.data.msg, - offset: 50 - }); + if(flag == "新增分类"){ + axios({ + method: 'post', + // 请求的地址 + url: '/api/UrlAndCate/insertCateByUser', + // URL 中的查询参数 + params: { + name: this.form.name, + weigh: this.form.weigh, + status: 0, + need_login: 0, + userId: this.form.userId, + } + }).then(function (res) { + if (res.data.code === 500) { + Vue.prototype.$notify.error({ + title: '错误', + message: res.data.msg, + offset: 50 + }); + + } else { + _this.closeDialog(); + Vue.prototype.$notify({ + title: '成功', + message: ('i', {style: 'color: teal'}, "更新成功!"), + type: 'success', + offset: 50 + }); + } + }).catch((error)=>{ + }) + }else if(flag == "编辑分类"){ + axios({ + method: 'post', + // 请求的地址 + url: '/api/UrlAndCate/updateUrlCate', + // URL 中的查询参数 + params: { + id: this.form.id, + weigh: this.form.weigh, + status: 0, + name: this.form.name, + } + }).then(function (res) { + if (res.data.code === 500) { + Vue.prototype.$notify.error({ + title: '错误', + message: res.data.msg, + offset: 50 + }); + + } else { + _this.closeDialog(); + Vue.prototype.$notify({ + title: '成功', + message: ('i', {style: 'color: teal'}, "更新成功!"), + type: 'success', + offset: 50 + }); + } + }).catch((error)=>{ + }) + } - } else { - _this.closeDialog(); - Vue.prototype.$notify({ - title: '成功', - message: ('i', {style: 'color: teal'}, "更新成功!"), - type: 'success', - offset: 50 - }); - } - }).catch((error)=>{ - // Vue.prototype.$notify.error({ - // title: '错误', - // message: error, - // offset: 50 - // }); - }) - }else{ - return; } }) @@ -418,6 +452,6 @@ export default { ::v-deep .el-dialog__body{ background-image: url("../../../assets/img/SkyPic.jpg"); margin-top:15px; - height:500px; + height:300px; } \ No newline at end of file diff --git a/src/components/setting/notice/NoticeManage.vue b/src/components/setting/notice/NoticeManage.vue index f081edc..c25e0df 100644 --- a/src/components/setting/notice/NoticeManage.vue +++ b/src/components/setting/notice/NoticeManage.vue @@ -1,23 +1,399 @@ \ No newline at end of file diff --git a/src/components/setting/website/websiteManage.vue b/src/components/setting/website/websiteManage.vue index 1e5ccc1..cdd1481 100644 --- a/src/components/setting/website/websiteManage.vue +++ b/src/components/setting/website/websiteManage.vue @@ -33,6 +33,33 @@ label="序号" width="50"> + + + + + + +