Commit adc8c9f9 authored by 刘殿昕's avatar 刘殿昕

问答管理。and so on

parent 90bb7ec1
......@@ -32,7 +32,7 @@
></span>
<a
v-else
class="btn"
class="del_btn_a"
:class="v.class || ''"
:key="'btn_' + index + '_' + i"
@click.stop="v.callback && v.callback(scope.row)"
......@@ -55,7 +55,7 @@
</div>
<div v-else-if="item.type === 'button'" class="row_action">
<a
class="btn warn"
class="btn"
v-text="scope.row[item.prop]"
@click.stop="item.callback && item.callback(scope.row)"
></a>
......@@ -529,4 +529,9 @@ export default {
border-radius: 10px;
background-color: #fff;
}
.del_btn_a {
font-weight: bold;
color: #830f53;
cursor: pointer;
}
</style>
......@@ -19,6 +19,8 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
></el-date-picker>
<el-select
v-if="item.type == 'select'"
......@@ -101,3 +103,24 @@ export default {
width: calc(100% - 220px);
}
</style>
<style>
.from_content1 .el-input__inner {
background-color: #f7f8f9;
}
.el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
width: 80px;
}
.el-date-editor.el-range-editor .el-range-separator {
width: 40px;
position: relative;
top: 2px;
}
.el-date-editor.el-range-editor {
width: 260px;
padding: 3px 10px 3px 15px;
}
.el-date-editor .el-range__icon {
margin-right: 8px;
}
</style>
\ No newline at end of file
......@@ -85,11 +85,3 @@ export default {
bottom: -20px;
}
</style>
<style>
.from_content1 .el-input__inner {
background-color: #f7f8f9;
}
.el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
}
</style>
\ No newline at end of file
<template>
<div class="community">
<el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/user' }">{{
$t("lang.personal_center")
}}</el-breadcrumb-item>
<el-breadcrumb-item>{{
$t("lang.my_questions_and_answers")
}}</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/user' }">
{{ $t("lang.personal_center") }}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{ $t("lang.my_questions_and_answers") }}
</el-breadcrumb-item>
</el-breadcrumb>
<div class="from_content1 form_input_block">
<inline-form
......@@ -42,6 +42,29 @@
@current-change="handleCurrentChange"
></list-pagination>
</div>
<el-dialog
title="提示"
:visible.sync="diaDel"
width="440px"
:modal-append-to-body="false"
>
<div class="dia_reason">
<el-form ref="form1" :model="reason_form" :rules="reason_rules">
<el-form-item class="dia_item">
<p>删除理由:</p>
<el-input
type="textarea"
v-model="reason_form.reason"
placeholder="请输入至少五个字符,至多20字符"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="dia_btn_footer">
<el-button class="previous" @click="cancelDiaDel">取消</el-button>
<el-button class="registe" @click="submitDel">确定</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -51,6 +74,7 @@ import tableBtn from "@/components/new-com/tableBtn";
import apassTable from "@/components/new-com/apassTable";
import ListPagination from "@/components/comments-pagination";
import apassDialog from "@/components/apass-dialog";
import helper from "@/services/helper.js";
export default {
components: {
inlineForm,
......@@ -61,22 +85,10 @@ export default {
},
data() {
return {
search_text: "",
tableData: [
{
user_id: "100021李想李想李想李想李想李想李想李想李想李想",
user_name: "李想李想李想李想李想李想李想李想李想李想",
user_type: 1,
oid: "f49afc8a-e4a5-4f70-8192-bbe2bb36945f",
org_name: "山西省应急管理厅-应急物资处",
gender: 2,
shared_state: 2,
state: 2,
operate_user_name: "",
operate_time: "2020-08-27 14:46:40",
sort: 1,
},
],
search_ask: "",
search_user: "",
search_date: [],
tableData: [],
table_header: [],
total_list: 0,
currentPage: 1,
......@@ -86,19 +98,19 @@ export default {
label: "问题搜索",
type: "input",
placeholder: "请输入问题标题或内容关键词",
key: "name",
key: "ask",
},
{
label: "发布人搜索",
type: "input",
placeholder: "请输入发布人名称",
key: "name",
key: "user",
},
{
label: "发布时间",
type: "daterange",
placeholder: "请选择",
key: "name",
key: "date",
},
],
btn_data: [
......@@ -112,25 +124,40 @@ export default {
num: 0,
selected_date: [],
role_type: "",
now_state: "",
diaDel: false,
reason_form: {
reason: "",
},
reason_rules: {
reason: [
{
required: true,
max: 20,
min: 5,
message: "请填写活动形式",
trigger: "blur",
},
],
},
};
},
watch: {
$route(to, from) {
this.changeState(to.path);
this.now_state = to.path;
this.changeState(this.now_state);
},
},
created() {
this.getlist();
},
created() {},
methods: {
getRouter() {
let this_route = this.$route.path;
this.changeState(this_route);
this.now_state = this_route;
this.changeState(this.now_state);
},
edit_data(val) {},
deleteData() {
if (this.selected_date.length) {
this.$refs.deletelog.show();
this.diaDel = true;
} else {
this.$message.error("请先选择要删除的数据");
}
......@@ -139,25 +166,25 @@ export default {
console.log(val);
this.currentlimit = val;
this.currentPage = 1;
this.getlist();
this.changeState(this.now_state);
},
handleCurrentChange(val) {
console.log(val);
this.currentPage = val;
this.getlist();
this.changeState(this.now_state);
},
//获取列表数据
getlist() {},
get_search_list(val) {
console.log(val);
if (val) {
this.search_text = val.name;
this.role_type = val.type;
this.search_ask = val.ask;
this.search_user = val.user;
this.search_date = val.date;
} else {
this.search_text = "";
this.search_ask = "";
this.search_user = "";
this.search_date = [];
}
this.currentPage = 1;
this.getlist();
this.changeState(this.now_state);
},
clean() {
this.$refs.outtreetable.cleanSel();
......@@ -166,47 +193,147 @@ export default {
this.num = select.length;
this.selected_date = select;
},
cancelDiaDel() {
this.diaDel = false;
},
submitDel() {
this.$refs.form1.validate((valid) => {
if (valid) {
this.diaDel = false;
if (this.now_state == "/qa/questions") {
this.delQ();
} else if (this.now_state == "/qa/answers") {
this.delA();
}
} else {
}
});
},
del_q(val) {
this.selected_date = [{ id: val.id }];
this.diaDel = true;
},
del_a(val) {
this.selected_date = [{ id: val.id }];
this.diaDel = true;
},
getQList() {
let query = {
search: this.search_ask,
style: 3,
create_user: this.search_user,
start: this.search_date.length != 0 ? this.search_date[0] : "",
end: this.search_date.length != 0 ? this.search_date[1] : "",
limit: this.currentlimit,
page: this.currentPage,
order: "created",
};
this.$api.user.getQuestionList(query).then((response) => {
if (response.data.success == 1) {
this.tableData = response.data.data;
this.total_list = response.data.total;
}
});
},
getAList() {
let query = {
search: this.search_ask,
style: 3,
create_user: this.search_user,
start: this.search_date.length != 0 ? this.search_date[0] : "",
end: this.search_date.length != 0 ? this.search_date[1] : "",
limit: this.currentlimit,
page: this.currentPage,
};
this.$api.user.getAnswerList(query).then((response) => {
if (response.data.success == 1) {
this.tableData = response.data.data;
this.total_list = response.data.total;
}
});
},
delQ() {
let query = {
items: [],
};
this.selected_date.forEach((item) => {
query.items.push({ id: item.id, reason: this.reason_form.reason });
});
this.$api.user.delQuestions(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
}
});
},
delA() {
let query = {
items: [],
};
this.selected_date.forEach((item) => {
query.items.push({ id: item.id, reason: this.reason_form.reason });
});
this.$api.user.delAnswers(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
}
});
},
changeState(val) {
if (val == "/user/questions") {
this.table_header = [];
if (val == "/qa/questions") {
this.form_data[1].label = "发布人搜索";
this.form_data[2].label = "发布时间";
this.table_header = [
{
prop: "user_id",
prop: "title",
label: "问题标题",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">${str.title}</span>`;
},
},
{
prop: "user_id",
prop: "content",
label: "问题内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.content.replace(
/<[^<>]+>/g,
""
)}">${str.content.replace(/<[^<>]+>/g, "")}</span>`;
},
},
{
prop: "operate_time",
prop: "answer_num",
label: "回复数",
align: "center",
},
{
prop: "operate_time",
prop: "view",
label: "浏览数",
align: "center",
},
{
prop: "operate_time",
prop: "user_name",
label: "发布人",
align: "center",
},
{
prop: "operate_time",
prop: "created",
label: "发布时间",
align: "center",
width: 200,
type: "html",
getHtml: (str) => {
return `<span>${helper.dateStringTransform(str.created)}</span>`;
},
},
{
label: "操作",
......@@ -215,61 +342,70 @@ export default {
align: "center",
actionList: [
{
label: "修改",
callback: this.edit_data,
label: "删除",
callback: this.del_q,
},
],
},
];
} else {
this.getQList();
} else if (val == "/qa/answers") {
this.form_data[1].label = "回复人搜索";
this.form_data[2].label = "回复时间";
this.table_header = [
{
prop: "user_id",
prop: "content",
label: "回答内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.content}">${str.content}</span>`;
},
},
{
prop: "user_id",
prop: "title",
label: "问题标题",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">${str.title}</span>`;
},
},
{
prop: "user_id",
prop: "content",
label: "问题内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.content.replace(
/<[^<>]+>/g,
""
)}">${str.content.replace(/<[^<>]+>/g, "")}</span>`;
},
},
{
prop: "operate_time",
prop: "answer_num",
label: "回复数",
align: "center",
},
{
prop: "operate_time",
prop: "view",
label: "浏览数",
align: "center",
},
{
prop: "operate_time",
prop: "user_name",
label: "回复人",
align: "center",
},
{
prop: "operate_time",
prop: "created",
label: "回复时间",
align: "center",
width: 200,
type: "html",
getHtml: (str) => {
return `<span>${helper.dateStringTransform(str.created)}</span>`;
},
},
{
label: "操作",
......@@ -278,12 +414,13 @@ export default {
align: "center",
actionList: [
{
label: "修改",
callback: this.edit_data,
label: "删除",
callback: this.del_a,
},
],
},
];
this.getAList();
}
},
},
......@@ -301,4 +438,36 @@ export default {
.form_list_block {
height: calc(100% - 180px);
}
.dia_item {
width: 100%;
margin-bottom: 12px;
}
.dia_item p {
padding-left: 15px;
color: #58617a;
}
.dia_btn_footer {
display: flex;
justify-content: flex-end;
margin: 30px 0 0;
}
.previous {
width: 100px;
background-color: #c3caf8;
color: #0f2683;
}
.registe {
width: 100px;
background-color: #0f2683;
color: #f8f9fd;
}
.dia_reason {
text-align: left;
}
</style>
<style>
.dia_reason .el-textarea__inner {
border-radius: 8px;
background-color: #f7f8f9;
}
</style>
......@@ -11,11 +11,11 @@
<BlockRadius class="info_block user_qa">
<div class="left_user">
<div class="img_head">
<img src="@/assets/imgs/shop_img_banner_test.png" />
<img :src="user_info.picture_path" class="img_head_in" />
</div>
<div class="left_word">
<p class="left_name">设计师设计啥都往</p>
<p class="left_role">普通用户开发者</p>
<p class="left_name">{{ user_info.user_name }}</p>
<p class="left_role">{{ user_info.role }}</p>
</div>
</div>
<div class="right_list">
......@@ -24,7 +24,10 @@
<div class="card_word">
<p class="card_name">我的提问</p>
<p>
{{ helper.numberFormat(870000) }}<span class="card_wan"></span>
{{ helper.numberFormat(user_info.question_num)
}}<span v-if="user_info.question_num > 10000" class="card_wan"
></span
>
</p>
</div>
</div>
......@@ -33,7 +36,10 @@
<div class="card_word">
<p class="card_name">我的提问</p>
<p>
{{ helper.numberFormat(870000) }}<span class="card_wan"></span>
{{ helper.numberFormat(user_info.answer_num)
}}<span v-if="user_info.answer_num > 10000" class="card_wan"
></span
>
</p>
</div>
</div>
......@@ -42,7 +48,10 @@
<div class="card_word">
<p class="card_name">我的提问</p>
<p>
{{ helper.numberFormat(870000) }}<span class="card_wan"></span>
{{ helper.numberFormat(user_info.view_num)
}}<span v-if="user_info.view_num > 10000" class="card_wan"
></span
>
</p>
</div>
</div>
......@@ -58,27 +67,34 @@
<div v-for="(item, index) in data_list" :key="index" class="qa_cell">
<div class="qa_cell_in">
<div :class="activeName == 2 ? 'qa_is_del' : 'qa_init'">
<p v-if="activeName == 1" class="cell_answer">为什么感知服务提示我无法注册?</p>
<p :class="activeName == 0 ? 'cell_title' : 'cell_ans_title'">为什么感知服务提示我无法注册?</p>
<p v-if="activeName == 1" class="cell_answer">
{{ item.answer }}
</p>
<p :class="activeName == 0 ? 'cell_title' : 'cell_ans_title'">
{{ item.title }}
</p>
<p class="cell_cont">
为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?为什么感知服务提示我无法注册?
{{ item.content.replace(/<[^<>]+>/g, "") }}
</p>
<p v-if="activeName == 2" class="cell_other">
<span>删除时间:2020-10-01 18:00:00</span>
<span>删除人:管理员</span>
<span>删除理由:帖子内容含违规广告信息</span>
<span
>删除时间:{{
helper.dateStringTransform(item.deleted_time)
}}</span
>
<span>删除人:{{ item.delete_user }}</span>
<span>删除理由:{{ item.reason }}</span>
</p>
<p v-else class="cell_other">
<span>2020-10-01 18:00:00</span>
<span>评论 12</span>
<span>阅读 1,024</span>
<span>{{ helper.dateStringTransform(item.created) }}</span>
<span>评论 {{ item.answer_num }}</span>
<span>阅读 {{ item.view }}</span>
</p>
</div>
<div class="qa_del">
<div v-if="activeName == 0 || activeName == 1" class="qa_del">
<img
src="@/assets/imgs/msg_icon_shanchu.png"
@click="delectItem(index)"
@click="delectItem(item)"
/>
</div>
</div>
......@@ -86,7 +102,7 @@
</div>
<!-- 分页 -->
<section class="com-pagination">
<div class="com_page_total">3个条目</div>
<div class="com_page_total"> {{ total }} 个条目</div>
<div class="com_page_item">
<div class="com_page_num">
<div>每页条数:</div>
......@@ -131,6 +147,18 @@
</div>
</section>
</BlockRadius>
<el-dialog
title="确认删除?"
:visible.sync="diaDelItem"
:modal-append-to-body="false"
width="440px"
>
<div class="change_psw">您确认删除?</div>
<div class="dia_btn_footer">
<el-button class="previous" @click="cancelDel">取消</el-button>
<el-button class="registe" @click="submitDel">确认</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -148,7 +176,7 @@ export default {
rowsPerPage: 10,
page: 1,
},
total: 123,
total: 0,
pageOptions: [
{
value: "10",
......@@ -163,9 +191,45 @@ export default {
label: "50",
},
],
data_list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
data_list: [
{
id: 1,
title: "平台的流程引擎怎么样", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"/apaas/static/docs/image/image/blob_18f512d3-ee8f-4112-89a9-b2e7bfdfdec1.blob", // 头像
},
],
user_info: {
user_name: "",
role: "",
question_num: 0,
answer_num: 0,
view_num: 0,
picture_path: "",
},
diaDelItem: false,
delItem: {},
}),
watch: {},
watch: {
activeName: {
handler(val) {
if (val == "0") {
this.getQList();
} else if (val == "1") {
this.getAList();
} else if (val == "2") {
this.getDeleteList();
}
},
},
},
methods: {
clickTab() {},
handleSizeChange(val) {
......@@ -183,17 +247,106 @@ export default {
let listWidth = this.$refs.commodityCardIn.clientWidth;
let rowCardNum = Math.floor(listWidth / 310);
let cardArr = this.$refs.commodityCardIn.children;
// console.log(rowCardNum, listWidth / rowCardNum);
for (let i = 0; i < cardArr.length; i++) {
cardArr[i].style.width = listWidth / rowCardNum - 1 + "px";
}
// console.log(this.$refs.commodityCardIn);
},
delectItem(index) {
console.log(index);
delectItem(item) {
this.delItem = item;
console.log(this.delItem);
this.diaDelItem = true;
},
getUserQA() {
this.$api.user.getUserQA().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
getQList() {
let query = {
search: "",
style: 2,
create_user: "",
start: "",
end: "",
limit: this.pagination.rowsPerPage,
page: this.pagination.page,
order: "created",
};
this.$api.user.getQuestionList(query).then((response) => {
if (response.data.success == 1) {
this.data_list = response.data.data;
this.total = response.data.total;
}
});
},
getAList() {
let query = {
search: "",
style: 2,
create_user: "",
start: "",
end: "",
limit: this.pagination.rowsPerPage,
page: this.pagination.page,
};
this.$api.user.getAnswerList(query).then((response) => {
if (response.data.success == 1) {
this.data_list = response.data.data;
this.total = response.data.total;
}
});
},
getDeleteList() {
this.$api.user.getDeleteList().then((response) => {
if (response.data.success == 1) {
this.data_list = response.data.data;
this.total = response.data.total;
}
});
},
cancelDel() {
this.diaDelItem = false;
},
submitDel() {
if (this.activeName == 0) {
this.delQ();
} else if (this.activeName == 1) {
this.delA();
}
},
delQ() {
let query = {
items: [{ id: this.delItem.id }],
};
this.$api.user.delQuestions(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
}
});
},
delA() {
let query = {
items: [{ id: this.delItem.id }],
};
this.$api.user.delAnswers(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "删除成功",
type: "success",
});
}
});
},
},
mounted() {
this.getUserQA();
// this.getQList();
},
mounted() {},
};
</script>
......@@ -228,6 +381,10 @@ export default {
overflow: hidden;
border: solid 2px #e3e5ef;
}
.img_head_in {
width: 100%;
height: 100%;
}
.left_word {
width: 200px;
padding-top: 5px;
......@@ -461,6 +618,32 @@ export default {
.commodity_card_item_in {
margin: 0 auto;
}
.change_psw {
text-align: left;
}
.dia_item {
width: 100%;
margin-bottom: 12px;
}
.dia_item p {
padding-left: 15px;
color: #242c43;
}
.dia_btn_footer {
display: flex;
justify-content: flex-end;
margin: 20px 0 0;
}
.previous {
width: 100px;
background-color: #c3caf8;
color: #0f2683;
}
.registe {
width: 100px;
background-color: #0f2683;
color: #f8f9fd;
}
</style>
<style>
.com_page_control .el-button {
......
<template>
<div class="fwgl_container">
<side-nav-bar
v-if="showNavbar"
title="问答中心管理"
:title-icon="require('@/assets/imgs/tool_ic_wenda.png')"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
></side-nav-bar>
<div class="main_container">
<router-view :key="'type_' + $route.params.type"></router-view>
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar,
},
data: () => ({
userNav: [
{
name: "提问列表",
path: `/qa/questions`,
},
{
name: "回答列表",
path: `/qa/answers`,
},
],
navList: [],
showNavbar: false,
}),
watch: {
"$route.fullPath"(path) {
this.initNavList();
},
},
methods: {
initNavList() {
this.navList = this.userNav;
},
},
mounted() {
this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
const userLevel = this.$store.getters.level;
if (userLevel == 0) {
this.$message({
message: `您没有问答中心管理模块的权限.`,
type: "warning",
});
this.$router.push(`/index`);
} else {
this.showNavbar = true;
this.initNavList();
}
}
});
},
};
</script>
<style scoped>
.fwgl_container {
height: calc(100vh - 58px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
......@@ -48,6 +48,26 @@ const user = {
editUserPassword(params) {
return axios.post(`/apaas/backmgt/user/password/${params.id}`, qs.stringify(params.form));
},
// QA
getQuestionList(params) {
return axios.get(`/apaas/support/qa/question/list?search=${params.search}&style=${params.style}&create_user=${params.create_user}&start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}&order=${params.order}`);
},
getAnswerList(params) {
return axios.get(`/apaas/support/qa/answer/list?search=${params.search}&style=${params.style}&create_user=${params.create_user}&start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}`);
},
getDeleteList() {
return axios.get(`/apaas/support/qa/deleted`);
},
delQuestions(params) {
return axios.delete(`/apaas/support/qa/question/delete`, params);
},
delAnswers(params) {
return axios.delete(`/apaas/support/qa/answer/delete`, params);
},
getUserQA() {
return axios.get(`/apaas/support/qa/info`)
}
}
export default user;
export default user;
\ No newline at end of file
......@@ -420,22 +420,30 @@ export default new Router({
component: () => import("@/pages/user/order/order_detail"),
},
{
path: "/user/my_qa", // 我的问答
path: "/qa/my_qa", // 我的问答
name: "myQA",
component: () => import("@/pages/user/questions-answers/my-qa"),
},
],
}, // 个人中心
{
path: "/qa_management", // 问答中心管理
name: "qaManagement",
redirect: "/qa/questions",
component: () => import("@/pages/user/questions-answers/qa"),
children: [
{
path: "/user/questions", // 提问列表
path: "/qa/questions", // 提问列表
name: "questions",
component: () => import("@/pages/user/questions-answers/community"),
},
{
path: "/user/answers", // 回答列表
path: "/qa/answers", // 回答列表
name: "answers",
component: () => import("@/pages/user/questions-answers/community"),
},
],
}, // 个人中心
]
},
{
path: "/authority", // 权限管理
name: "authority",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment