This commit is contained in:
faiz 2024-06-28 17:06:01 +08:00
parent 633d7ec474
commit f3ca8f3812
5 changed files with 71 additions and 22 deletions

View File

@ -39,3 +39,10 @@ export default {
}
}
</script>
<style scoped>
@import "./assets/fonts/font.css";
body{
font-family: PingFang !important;
}
</style>

Binary file not shown.

View File

@ -0,0 +1,6 @@
@font-face {
font-family: 'PingFang';
src: url('./PingFang SC.ttf');
font-weight: normal;
font-style: normal;
}

View File

@ -19,14 +19,18 @@
<div @click="handleQacityl(item.city_id)" class="btn" v-for="item in getQaCityList">{{ item.city_name }}</div>
</div>
<div class="problem_right">
<ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
<ul class="infinite-list" v-infinite-scroll="load" :infinite-scroll-immediate="false" style="overflow:auto">
<li class="problem_right_container" v-for="item in getQaLists">
<div class="title">
<span v-html="item.title"></span>
<el-button @click="handleZip(item.img_zip)" type="primary">下载图片</el-button>
<el-button @click="handleZip(item.trip_zip)" type="primary">下载行程</el-button>
</div>
<div class="desc" v-html="item.content"></div>
<div class="desc_container" v-for="list in item.qaQuestions">
<div style="font-weight: 700;" class="desc" v-html="list.title"></div>
<div class="desc" v-html="handleprant(list.content)"></div>
</div>
</li>
</ul>
</div>
@ -72,6 +76,11 @@ export default {
load(){
console.log('load')
},
handleprant(val){
let replaceReg = new RegExp(7, "ig");
let replaceString = `<span style="color: #fca104">7</span>`;
return val.replace(replaceReg, replaceString);
},
onSubmit(){
getQaList(this.dataForm).then(res => {
this.getQaLists = res.data.data.map((item, index) => {
@ -84,13 +93,41 @@ export default {
return item
});
})
// this.getQaLists
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/fonts/font.css";
body{
font-family: PingFang !important;
}
.infinite-list{
list-style-type: none;
height: calc(100vh - 154px);
padding: 0;
margin: 0;
}
.desc_container{
& + .desc_container{
margin-top: 10px;
padding-top: 10px;
// border-top: 1px solid #333333;
}
.desc_title{
font-size: 18px;
font-weight: 500;
color: #333333;
line-height: 25px;
margin-bottom: 10px;
}
.desc_content{
font-size: 14px;
font-weight: 300;
}
}
.problem{
.problem_form{
margin-top: 10px;
@ -100,12 +137,13 @@ export default {
.problem_container{
display: flex;
.problem_left{
font-family: PingFang, sans-serif;
font-weight: 300;
width: 18%;
background: #fff;
padding: 10px 20px;
border-right: 1px solid #46a6ff;
padding: 0 20px;
border-right: 2px solid #46a6ff;
height: calc(100vh - 154px);
// border-left: 1px solid #46a6ff;
.btn{
padding: 10px 20px;
cursor: pointer;
@ -120,9 +158,8 @@ export default {
.problem_right{
width: 100%;
background: #fff;
padding: 20px;
padding: 0 20px;
.problem_right_container{
// border: 1px solid #ccc;
& + .problem_right_container{
margin-top: 20px;
}
@ -132,7 +169,7 @@ export default {
margin-bottom: 10px;
color: #46a6ff;
&>:nth-child(1){
margin-right: 20px;
margin-right: 40px;
}
}
.desc{

View File

@ -49,7 +49,7 @@
<el-input v-model="anchors.title" type="text" placeholder="请输入旅游路线" />
</el-form-item>
<el-form-item label="QA内容">
<div class="mistake-content" v-for="(item, index) in anchors.qa_question">
<div class="mistake-content" v-for="(item, index) in anchors.qaQuestions">
<div class="mistake-left">
<div>副标题</div>
<div class="qa-desc">
@ -122,7 +122,7 @@
<el-input v-model="anchors.content" :rows="6" style="height: 120px" type="textarea" placeholder="QA内容" />
</el-form-item> -->
<el-form-item label="QA内容">
<div class="mistake-content" v-for="(item,index) in anchors.qa_question">
<div class="mistake-content" v-for="(item,index) in anchors.qaQuestions">
<div class="mistake-left">
<div>副标题</div>
<div class="qa-desc">
@ -204,7 +204,7 @@ export default {
imageUrl:'',
imageUrls:'',
anchors: {
qa_question:[]
qaQuestions:[]
},
getQaCitys: {}
}
@ -217,21 +217,21 @@ export default {
},
methods: {
handleAdd(){
this.anchors.qa_question.push({
sort:this.anchors.qa_question.length,
this.anchors.qaQuestions.push({
sort:this.anchors.qaQuestions[this.anchors.qaQuestions.length-1].sort+1,
title: '',
content: ''
})
},
handleDel(id){
if(this.anchors.qa_question.length==1){
if(this.anchors.qaQuestions.length==1){
this.$message({
message: '至少保留一条',
type: 'warning'
});
return
}
this.anchors.qa_question = this.anchors.qa_question.filter((item,i)=>i!==id)
this.anchors.qaQuestions = this.anchors.qaQuestions.filter((item,i)=>i!==id)
},
getQa() {
this.listLoading = true
@ -254,8 +254,8 @@ export default {
},
onAdd() {
this.anchors = {
qa_question:[{
sort:0,
qaQuestions:[{
sort:1,
title: '',
content: ''
}]
@ -263,11 +263,11 @@ export default {
this.dialogCreate = true
},
onEdit(item) {
if(!item.qa_question){
if(!item.qaQuestions){
this.anchors = {
...item,
qa_question:[{
sort:0,
qaQuestions:[{
sort:1,
title: '',
content: ''
}]
@ -330,7 +330,6 @@ export default {
width: 90%;
}
.mistake-right{
width: 10%;
padding-left: 20px;
height: auto;
display: flex;