Commit 199e7b1d authored by 刘殿昕's avatar 刘殿昕

先提一版测bug

parent 35df4076
...@@ -8,6 +8,7 @@ export const lang = { ...@@ -8,6 +8,7 @@ export const lang = {
profile: "个人档案", profile: "个人档案",
message_center: "消息中心", message_center: "消息中心",
my_questions_and_answers: "我的问答", my_questions_and_answers: "我的问答",
my_coin: "我的金币",
// unit of purchase duration // unit of purchase duration
by_year: "按年", by_year: "按年",
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: datas.month_sale,
}; };
this.detailData = [ this.detailData = [
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: datas.month_sale,
}; };
this.detailData = [ this.detailData = [
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
], ],
descript: datas.descript, descript: datas.descript,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: datas.month_sale,
serviceRequestSpcs: datas.serviceRequestSpcs, serviceRequestSpcs: datas.serviceRequestSpcs,
}; };
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: datas.month_sale,
}; };
this.detailData = [ this.detailData = [
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: datas.month_sale,
}; };
this.detailData = [ this.detailData = [
{ {
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
<div class="answer_list"> <div class="answer_list">
<div class="answer_box" v-for="(item,index) in answer" :key="'answer'+index+200"> <div class="answer_box" v-for="(item,index) in answer" :key="'answer'+index+200">
<div class="picture"> <div class="picture">
<img :src="item.user_picture_path" alt="" style="width:100%"> <img :src="item.user_picture_path || head_pic" alt="" style="width:100%">
</div> </div>
<div class="text" :style="index == answer.length-1||item.children?{border:'0'}:''"> <div class="text" :style="index == answer.length-1?{border:'0'}:''">
<p> <p>
<span class="left">{{item.username}}</span> <span class="left">{{item.username}}</span>
<span class="right"> <span class="right">
...@@ -55,25 +55,25 @@ ...@@ -55,25 +55,25 @@
:ref="'input'+index" :ref="'input'+index"
v-model="back_info"> v-model="back_info">
<div slot="prefix" style="height:48px;line-height:48px;"> <div slot="prefix" style="height:48px;line-height:48px;">
<img :src="user_info.picture_path" alt="" style="width:24px;margin:0 10px 0 10px;vertical-align:-6px;border-radius:50%;"></div> <img :src="user_info.picture_path || head_pic" alt="" style="width:24px;margin:0 10px 0 10px;vertical-align:-6px;border-radius:50%;"></div>
<div slot="suffix" class="back_solt" @click="answer_question(item.id,item.user_id)">回复</div> <div slot="suffix" class="back_solt" @click="answer_question(item.id,item.user_id)">回复</div>
</el-input> </el-input>
</div> </div>
<template v-for="(it,idx) in item.children"> <template v-for="(it,idx) in item.children">
<div class="back_fllow answer_box" :key="'ans_child'+idx+5000" v-if="idx<=4||answer_child_index===index"> <div class="back_fllow answer_box" :key="'ans_child'+idx+5000" v-if="idx<=4||answer_child_index===index">
<div :style="idx == item.children.length-1&&item.children.length<=5?{border:'0',overflow:'hidden',}:{borderBottom:'2px solid #f4f7fc',overflow:'hidden',}" > <div :style="idx == item.children.length-1&&item.children.length<=5?{border:'0',overflow:'hidden',}:{borderBottom:'2px solid #f4f7fc',overflow:'hidden',}" >
<div class="picture"> <div class="picture_fllow">
<img :src="it.user_picture_path" alt="" style="width:100%"> <img :src="it.user_picture_path || head_pic" alt="" style="width:100%">
</div> </div>
<div class="text" style="border:0;"> <div class="text_fllow" style="border:0;">
<p> <p>
<span class="left">{{it.username}} <span><span style="color:#bcc1d0;margin:0 9px;">回复</span>{{it.answered_user}}</span> </span> <span class="left">{{it.username}} <span><span style="color:#bcc1d0;margin:0 9px;">回复</span>{{it.answered_user}}</span> </span>
<span class="right"> <span class="right">
<span></span><span>{{deal_time(it.created)}}</span> <span></span><span>{{deal_time(it.created)}}</span>
</span> </span>
</p> </p>
<div v-html="it.content" class="hf_content"></div> <div v-html="it.content" class="hf_content_fllow"></div>
<div @click="showinput(index,idx)" class="back"><img src="../../../assets/imgs/jszc_btn_huifu.png" alt=""> 回复</div> <div @click="showinput(index,idx)" class="back_fllow_in">回复</div>
</div> </div>
<div class="back_input" style="padding:0;height:auto;margin-bottom:0;" v-if="answer_count[0]==index&&answer_count[1]==idx"> <div class="back_input" style="padding:0;height:auto;margin-bottom:0;" v-if="answer_count[0]==index&&answer_count[1]==idx">
<el-input <el-input
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
:ref="'input'+index+idx" :ref="'input'+index+idx"
v-model="back_info"> v-model="back_info">
<div slot="prefix" style="height:48px;line-height:48px;"> <div slot="prefix" style="height:48px;line-height:48px;">
<img :src="user_info.picture_path" alt="" style="width:24px;margin:0 10px 0 10px;vertical-align:-6px;border-radius:50%;"></div> <img :src="user_info.picture_path || head_pic" alt="" style="width:24px;margin:0 10px 0 10px;vertical-align:-6px;border-radius:50%;"></div>
<div slot="suffix" class="back_solt" @click="answer_question(item.id,it.user_id)">回复</div> <div slot="suffix" class="back_solt" @click="answer_question(item.id,it.user_id)">回复</div>
</el-input> </el-input>
</div> </div>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</div> </div>
<div class="ans_self"> <div class="ans_self">
<p><img :src="user_info.picture_path" alt=""> <span>{{user_info.user_name}}</span> </p> <p><img :src="user_info.picture_path || head_pic" alt=""> <span>{{user_info.user_name}}</span> </p>
<wang-e-bd class="editbox" v-model="editstr" :menu="menu" :full="false"></wang-e-bd> <wang-e-bd class="editbox" v-model="editstr" :menu="menu" :full="false"></wang-e-bd>
<div class="pubilc" @click="answer_question1"><img src="../../../assets/imgs/jszc_ic_fabu.png" alt="">发表</div> <div class="pubilc" @click="answer_question1"><img src="../../../assets/imgs/jszc_ic_fabu.png" alt="">发表</div>
</div> </div>
...@@ -137,6 +137,7 @@ export default { ...@@ -137,6 +137,7 @@ export default {
], ],
editstr:'', editstr:'',
answer: [], answer: [],
head_pic: require("@/assets/imgs/img_head.png"),
}; };
}, },
watch: {}, watch: {},
...@@ -380,15 +381,37 @@ export default { ...@@ -380,15 +381,37 @@ export default {
margin-left: 17px; margin-left: 17px;
} }
.hf_content{ .hf_content{
padding: 16px 0; width: 750px;
overflow: auto;
padding: 16px 0 0;
color: #242c43; color: #242c43;
margin-bottom: 16px;
}
.hf_content::-webkit-scrollbar {
width: 16px;
height: 16px;
}
.hf_content::-webkit-scrollbar-thumb {
border-radius: 8px;
box-shadow: 0 8px 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
/* background-color: #a5adb7; */
}
.hf_content::-webkit-scrollbar-track {
border-radius: 8px;
box-shadow: 0 8px 0 #f4f4f4 inset;
border: 4px solid rgba(0, 0, 0, 0);
/* background-color: #f4f4f4; */
} }
.text .back{ .text .back{
float: right; float: right;
color: #58617a; color: #0f2683;
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
margin-bottom: 16px; margin-bottom: 16px;
margin-right: 10px;
} }
.text .back img{ .text .back img{
vertical-align: -3px; vertical-align: -3px;
...@@ -397,7 +420,10 @@ export default { ...@@ -397,7 +420,10 @@ export default {
.back_fllow{ .back_fllow{
background-color: #fbfbfc; background-color: #fbfbfc;
width: 100%; width: 100%;
padding: 16px; padding: 16px 16px 0;
}
.back_fllow:nth-last-child(1) {
margin-bottom: 16px;
} }
.ans_self{ .ans_self{
width: 856px; width: 856px;
...@@ -473,6 +499,34 @@ export default { ...@@ -473,6 +499,34 @@ export default {
color: #515fe7; color: #515fe7;
cursor: pointer; cursor: pointer;
} }
.picture_fllow {
float: left;
width: 24px;
height: 24px;
border-radius: 50%;
overflow: hidden;
}
.text_fllow {
float: right;
width: calc(100% - 30px);
border-bottom: 2px solid #f4f7fc;
overflow: hidden;
}
.hf_content_fllow {
width: 690px;
overflow: auto;
padding: 10px 0 0;
color: #242c43;
margin-bottom: 14px;
}
.back_fllow_in {
float: right;
color: #0f2683;
font-size: 14px;
cursor: pointer;
margin-bottom: 14px;
margin-right: 10px;
}
</style> </style>
<style> <style>
.back_input .el-input__inner{ .back_input .el-input__inner{
......
...@@ -162,10 +162,10 @@ export default { ...@@ -162,10 +162,10 @@ export default {
return helper.dateStringTransform(time || ""); return helper.dateStringTransform(time || "");
}, },
getContentText(content) { getContentText(content) {
let text = content.replace(/<img[^>]+>/g, "【图片】"); let text = content.replace(/<img[^>]+>/g, "[图片]");
text = text.replace(/<iframe(([\s\S])*?)<\/iframe>/g, "[视频]");
text = text.replace(/<iframe(([\s\S])*?)<\/iframe>/g, "【视频】"); text = text.replace(/<video(([\s\S])*?)<\/video>/g, "[视频]");
text = text.replace(/<pre(([\s\S])*?)<\/pre>/g, "【代码】"); text = text.replace(/<pre(([\s\S])*?)<\/pre>/g, "[代码]");
text = text.replace(/<\/?.+?>/g, ""); text = text.replace(/<\/?.+?>/g, "");
return text; return text;
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
$t("lang.personal_center") $t("lang.personal_center")
}}</el-breadcrumb-item> }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ <el-breadcrumb-item>{{
$t("lang.my_questions_and_answers") $t("lang.my_coin")
}}</el-breadcrumb-item> }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<BlockRadius class="info_block user_qa"> <BlockRadius class="info_block user_qa">
<div class="left_user"> <div class="left_user">
<div class="img_head"> <div class="img_head">
<img :src="user_info.picture_path" class="img_head_in" /> <img :src="user_info.picture_path || head_pic" class="img_head_in" />
</div> </div>
<div class="left_word"> <div class="left_word">
<p class="left_name">{{ user_info.user_name }}</p> <p class="left_name">{{ user_info.user_name }}</p>
...@@ -112,6 +112,7 @@ export default { ...@@ -112,6 +112,7 @@ export default {
currentPage: 1, currentPage: 1,
currentlimit: 10, currentlimit: 10,
date: [], date: [],
head_pic: require("@/assets/imgs/img_head.png"),
}), }),
watch: {}, watch: {},
methods: { methods: {
...@@ -129,6 +130,9 @@ export default { ...@@ -129,6 +130,9 @@ export default {
this.$api.user.getUserCoins().then((response) => { this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.user_info = response.data.data; this.user_info = response.data.data;
if (!this.user_info.recharge_count) {
this.user_info.recharge_count = 0;
}
} }
}); });
}, },
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<BlockRadius class="info_block user_qa"> <BlockRadius class="info_block user_qa">
<div class="left_user"> <div class="left_user">
<div class="img_head"> <div class="img_head">
<img :src="user_info.picture_path" class="img_head_in" /> <img :src="user_info.picture_path || head_pic" class="img_head_in" />
</div> </div>
<div class="left_word"> <div class="left_word">
<p class="left_name">{{ user_info.user_name }}</p> <p class="left_name">{{ user_info.user_name }}</p>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<p <p
v-if="item.answer != ''" v-if="item.answer != ''"
class="cell_answer" class="cell_answer"
v-html="item.answer" v-text="getContentText(item.answer)"
></p> ></p>
<p <p
@click="gotodeta(item.question_id)" @click="gotodeta(item.question_id)"
...@@ -78,21 +78,25 @@ ...@@ -78,21 +78,25 @@
> >
{{ item.title }} {{ item.title }}
</p> </p>
<p class="cell_cont"> <p
{{ class="cell_cont"
item.question_content && item.question_content != "" v-if="item.question_content && item.question_content != ''"
? item.question_content.replace(/<[^<>]+>/g, "") v-text="getContentText(item.question_content)"
: item.content && item.content != "" ></p>
? item.content.replace(/<[^<>]+>/g, "") <p
: "" class="cell_cont"
}} v-else-if="item.content && item.content != ''"
</p> v-text="getContentText(item.content)"
></p>
<p class="cell_cont" v-else></p>
<p v-if="activeName == 2" class="cell_other"> <p v-if="activeName == 2" class="cell_other">
<span> <span>
删除时间:{{ helper.dateStringTransform(item.deleted_time) }} 删除时间:{{ helper.dateStringTransform(item.deleted_time) }}
</span> </span>
<span>删除人:{{ item.delete_user }}</span> <span>删除人:{{ item.delete_user }}</span>
<span>删除理由:{{ item.delete_reason }}</span> <span v-if="item.delete_reason"
>删除理由:{{ item.delete_reason }}</span
>
</p> </p>
<p v-else class="cell_other"> <p v-else class="cell_other">
<span>{{ helper.dateStringTransform(item.created) }}</span> <span>{{ helper.dateStringTransform(item.created) }}</span>
...@@ -211,6 +215,7 @@ export default { ...@@ -211,6 +215,7 @@ export default {
}, },
diaDelItem: false, diaDelItem: false,
delItem: {}, delItem: {},
head_pic: require("@/assets/imgs/img_head.png"),
}), }),
watch: { watch: {
activeName: { activeName: {
...@@ -352,6 +357,15 @@ export default { ...@@ -352,6 +357,15 @@ export default {
} }
}); });
}, },
getContentText(content) {
let text = content.replace(/<img[^>]+>/g, "[图片]");
text = text.replace(/<iframe(([\s\S])*?)<\/iframe>/g, "[视频]");
text = text.replace(/<video(([\s\S])*?)<\/video>/g, "[视频]");
text = text.replace(/<pre(([\s\S])*?)<\/pre>/g, "[代码]");
text = text.replace(/<\/?.+?>/g, "");
return text;
},
}, },
created() { created() {
if (this.$route.query.name !== undefined) { if (this.$route.query.name !== undefined) {
......
...@@ -882,7 +882,7 @@ export default { ...@@ -882,7 +882,7 @@ export default {
); );
this.$set(this.list_arr[4], "info", data.organization_name); this.$set(this.list_arr[4], "info", data.organization_name);
this.$set(this.list_arr[5], "info", data.openness_name); this.$set(this.list_arr[5], "info", data.openness_name);
this.$set(this.list_arr[6], "info", data.encode_method); this.$set(this.list_arr[6], "info", "自动生成");
this.$set( this.$set(
this.list_arr[7], this.list_arr[7],
"info", "info",
......
...@@ -1376,7 +1376,7 @@ export default { ...@@ -1376,7 +1376,7 @@ export default {
this.$set(this.list_arr[1], "info", data.sectors_name); this.$set(this.list_arr[1], "info", data.sectors_name);
this.$set(this.list_arr[2], "info", data.organization_name); this.$set(this.list_arr[2], "info", data.organization_name);
this.$set(this.list_arr[3], "info", data.openness_name); this.$set(this.list_arr[3], "info", data.openness_name);
this.$set(this.list_arr[4], "info", data.encode_method); this.$set(this.list_arr[4], "info", "自动生成");
this.$set( this.$set(
this.list_arr[5], this.list_arr[5],
"info", "info",
......
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