1 line
4.0 KiB
JavaScript
1 line
4.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-374d4636"],{"53c3":function(t,e,n){},bf4b:function(t,e,n){"use strict";n("53c3")},e132:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"problem"},[n("el-row",[n("el-col",{attrs:{span:24}},[n("div",{staticClass:"problem_form"},[n("el-form",{ref:"form",attrs:{inline:!0,model:t.dataForm,"label-width":"60px"}},[n("el-form-item",{attrs:{label:"关键字:"}},[n("el-input",{staticClass:"filter-item",staticStyle:{width:"400px"},attrs:{placeholder:"请输入搜索关键字"},model:{value:t.dataForm.keyword,callback:function(e){t.$set(t.dataForm,"keyword",e)},expression:"dataForm.keyword"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"success"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)])],1),n("div",{staticClass:"problem_container"},[n("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],staticClass:"problem_left",staticStyle:{overflow:"auto",padding:"10px"},attrs:{"infinite-scroll-immediate":!1}},t._l(t.getQaCityList,(function(e){return n("div",{staticClass:"btn",on:{click:function(n){return t.handleQacityl(e.city_id)}}},[t._v(t._s(e.city_name))])})),0),n("div",{staticClass:"problem_right"},[n("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],staticClass:"infinite-list",staticStyle:{overflow:"auto"},attrs:{"infinite-scroll-immediate":!1}},t._l(t.getQaLists,(function(e){return n("li",{staticClass:"problem_right_container"},[n("div",{staticClass:"title"},[n("span",{domProps:{innerHTML:t._s(t.handleprant(e.title))}}),n("el-button",{attrs:{type:"primary"},on:{click:function(n){return t.handleZip(e.img_zip)}}},[t._v("下载图片")]),n("el-button",{attrs:{type:"primary"},on:{click:function(n){return t.handleZip(e.trip_zip)}}},[t._v("下载行程")])],1),t._l(e.qaQuestions,(function(e){return n("div",{staticClass:"desc_container"},[n("span",{staticClass:"desc",staticStyle:{"font-weight":"700",color:"#46a6ff"},domProps:{innerHTML:t._s(t.handleprant(e.title))}}),n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"mini"},on:{click:function(n){return t.copyToClipboard(e.content)}}},[t._v("复制")]),n("div",{staticClass:"desc",domProps:{innerHTML:t._s(t.handleprantHtml(e.content))}})],1)}))],2)})),0)])])],1)},a=[],o=(n("4d63"),n("ac1f"),n("2c3e"),n("25f0"),n("5319"),n("85a8")),r={data:function(){return{getQaCityList:[],getQaLists:[],dataForm:{keyword:"",city_id:""}}},created:function(){var t=this;Object(o["a"])().then((function(e){t.getQaCityList=e.data}))},watch:{"dataForm.keyword":function(t){t&&this.onSubmit()}},methods:{handleQacityl:function(t){var e=this;Object(o["b"])({city_id:t}).then((function(t){e.getQaLists=t.data.data}))},handleZip:function(t){t?window.open(t):this.$message({showClose:!0,message:"暂无下载链接"})},load:function(){console.log("load")},handleprant:function(t){if(!t)return"";var e=new RegExp(this.dataForm.keyword,"ig"),n='<span style="color: #fff;background-color: #FC0421FF;">'.concat(this.dataForm.keyword,"</span>");return t.replace(e,n)},handleprantHtml:function(t){if(!t)return"";var e=this.dataForm.keyword,n=new RegExp(e,"g"),i=t.replace(/(?<=>)[^>]+(?=<[/]?\w+.*>)/g,(function(t){return t.replace(n,"<span style='color: #fff;background-color: #FC0421FF;'>".concat(e,"</span>"))}));return i===t?this.handleprant(t):i},onSubmit:function(){var t=this;Object(o["b"])(this.dataForm).then((function(e){t.getQaLists=e.data.data}))},copyToClipboard:function(t){var e=this.stripHtml(t),n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this.$message({showClose:!0,message:"内容已复制"})},stripHtml:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}}},s=r,l=(n("bf4b"),n("2877")),c=Object(l["a"])(s,i,a,!1,null,"82d6d658",null);e["default"]=c.exports}}]); |