text: (window.webpackJsonp=window.webpackJsonp||[]).push([[28],{1103:function(t,e,n){"use strict";n(986)},1234:function(t,e,n){"use strict";n.r(e);var o=n(85),head=(n(13),n(716)),r=n.n(head),c=n(715),l=n.n(c),d={name:"Drafts",layout:"center_layout",mixins:[r.a,l.a],data:function(){return{title:this.$t("profile.mydrafts"),activeName:"all",draftsList:[],total:0,pageNum:1,pageSize:10,loading:!1,hasMore:!1}},computed:{userInfo:function(){return this.$store.state.user.info.attributes||{}},userId:function(){return this.$store.getters["session/get"]("userId")}},mounted:function(){this.getDraftsList()},methods:{getDraftsList:function(){var t=this;this.loading=!0;var e={include:"user,user.groups,firstPost,firstPost.images,firstPost.attachments,firstPost.postGoods,category,threadVideo,question,question.beUser,question.beUser.groups","page[number]":this.pageNum,"page[limit]":this.pageSize};this.$store.dispatch("jv/get",["thread/draft",{params:e}]).then((function(data){t.total=data._jv.json.meta.threadCount,t.hasMore=data.length===t.pageSize,1===t.pageNum?t.draftsList=data:t.draftsList=[].concat(Object(o.a)(t.draftsList),Object(o.a)(data)),t.pageNum+=1,data._jv&&(t.hasMore=t.draftsList.length<data._jv.json.meta.threadCount)}),(function(e){t.handleError(e)})).finally((function(){t.loading=!1}))},loadMore:function(){this.getDraftsList()},handleEditDrafts:function(t,e){var n={threadId:t._jv.id,operating:"draft"};t.category&&(n.categoryId=t.category._jv.id),t.question&&t.question.be_user_id&&(n.beaskId=t.question.be_user_id),this.$router.push({path:"/thread/postpay?type=".concat(t.type),query:n})},handleDeleteDrafts:function(t,e){var n=this;this.$confirm("是否确认删除此草稿?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n.$store.dispatch("jv/delete",["threads/".concat(t._jv.id),{}]).then((function(){n.$message.success("删除成功!"),n.pageNum=1,n.draftsList=[],n.getDraftsList()})).catch((function(t){n.handleError(t)}))})).catch((function(){n.$message({type:"info",message:"已取消删除"})}))}}},m=(n(1103),n(11)),component=Object(m.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mydrafts-container"},[n("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:t.$t("topic.allDrafts",{total:t.total}),name:"all"}})],1),t._v(" "),n("div",{staticClass:"post-list"},[t._l(t.draftsList,(function(e,o){return[n("post-item-pay",{key:o,attrs:{item:e,"show-like":!1,"show-comment":!1,"show-share":!1}},[n("template",{slot:"btn-edit"},[n("div",{staticClass:"btn edit",on:{click:function(n){return t.handleEditDrafts(e,o)}}},[n("svg-icon",{staticClass:"icon",attrs:{type:"pay_edit"}}),t._v("\n            "+t._s(t.$t("topic.edit"))+"\n          ")],1)]),t._v(" "),n("template",{slot:"btn-delete"},[n("div",{staticClass:"btn delete",on:{click:function(n){return t.handleDeleteDrafts(e,o)}}},[n("svg-icon",{staticClass:"icon",attrs:{type:"delete"}}),t._v("\n            "+t._s(t.$t("topic.delete"))+"\n          ")],1)])],2)]})),t._v(" "),n("list-load-more",{attrs:{loading:t.loading,"has-more":t.hasMore,"page-num":t.pageNum,length:t.draftsList.length},on:{loadMore:t.loadMore}})],2)],1)}),[],!1,null,"12a367e1",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,PostItem:n(758).default,PostItemPay:n(799).default,ListLoadMore:n(730).default})},716:function(t,e){t.exports={data:function(){return{title:"‎"}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}}},head:function(){return{title:"‎"!==this.title&&this.forums&&this.forums.set_site&&this.forums.set_site.site_name?"".concat(this.title," - ").concat(this.forums.set_site.site_name):this.title}}}},717:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return c}));n(52),n(159);var o=function(time){var t=((window.currentTime||new Date)-new Date(time))/1e3;return 0===parseInt(t)?"刚刚发布":parseInt(t)<60?"".concat(parseInt(t),"秒前"):parseInt(t/60)<60?"".concat(parseInt(t/60),"分钟前"):parseInt(t/60/60)<16?"".concat(parseInt(t/60/60),"小时前"):time.replace(/T/," ").replace(/Z/,"").substring(0,16)},r=function(t){var e=t-Math.round(new Date/1e3);return parseInt(e/86400,0)},c=function(t){var e=Math.round(new Date(t)/1e3),n=Math.round(new Date/1e3)-e,o=parseInt(n/86400,0);if(o>365){var r=parseInt(n/86400/365,0);return"".concat(r,"年")}return"".concat(o,"天")}},718:function(t,e,n){"use strict";n(159),n(794),n(36),n(13),n(32),n(24),n(35),n(34);var o=n(27),r=n(795),c=n(755);n(52);function l(){l=function(t,e){return new n(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function n(t,o,r){var l=new RegExp(t,o);return e.set(l,r||e.get(t)),Object(c.a)(l,n.prototype)}function d(t,n){var g=e.get(n);return Object.keys(g).reduce((function(e,n){return e[n]=t[g[n]],e}),Object.create(null))}return Object(r.a)(n,RegExp),n.prototype.exec=function(e){var n=t.exec.call(this,e);return n&&(n.groups=d(n,this)),n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var c=e.get(this);return t[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)>/g,(function(t,e){return"$"+c[e]})))}if("function"==typeof r){var l=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!==Object(o.a)(t[t.length-1])&&(t=[].slice.call(t)).push(d(t,l)),r.apply(this,t)}))}return t[Symbol.replace].call(this,n,r)},l.apply(this,arguments)}var d={topic:function(text){if(text){var t=l(/<[s\u017F]pan[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*id="topic"[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*value="([0-9A-Z_a-z\u017F\u212A]+)"[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*>((?:(?!<)[\s\S])+)<\/[s\u017F]pan>/gim,{value:1,string:2});return text.replace(t,(function(e){return e.replace(t,(function(content,t,text){var e="/topic/".concat(t);return'<a href="'.concat(e,'" class="content-topic a-blue">').concat(text,"</a> ")}))}))}},usermention:function(text){if(text){var t=l(/<[s\u017F]pan[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*id="member"[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*value="([0-9A-Z_a-z\u017F\u212A]+)"[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*>((?:(?!<)[\s\S])+)<\/[s\u017F]pan>/gim,{value:1,string:2});return text.replace(t,(function(e){return e.replace(t,(function(content,t,text){var e="/user/".concat(t);return'<a href="'.concat(e,'" class="content-member a-blue">').concat(text,"</a> ")}))}))}},parseHtml1:function(text){if(text){var t=/&lt;/gim;return text.replace(t,(function(e){return e.replace(t,(function(content,t,text){return"<"}))}))}},parseHtml2:function(text){if(text){var t=/&gt;/gim;return text.replace(t,(function(e){return e.replace(t,(function(content,t,text){return">"}))}))}}};e.a={parse:function(text){for(var t in d)text=d[t](text);return text}}},719:function(t,e,n){},720:function(t,e,n){},722:function(t,e,n){},723:function(t,e,n){},724:function(t,e,n){"use strict";n.r(e);n(253);var o=n(751),r={name:"SharePopover",props:{threadsId:{type:[String,Number],default:""},type:{type:String,default:""}},data:function(){return{qrcode:null,currentType:""}},methods:{copyLink:function(){var t=document.createElement("input");"topic"===this.type?t.value=window.location.href:t.value="".concat(window.location.protocol,"//").concat(window.location.host,"/thread/").concat(this.threadsId),t.id="copyInput",document.body.appendChild(t),t.select(),document.execCommand("Copy"),this.$message.success("链接复制成功"),setTimeout((function(){t.remove()}),100)},onShowPopover:function(){this.currentType=this.type;var path=window.location.href;path="topic"===this.type?window.location.href:"".concat(window.location.protocol,"//").concat(window.location.host,"/thread/").concat(this.threadsId),this.createQrcode(path)},createQrcode:function(link){var t=this;this.qrcode=null,this.$nextTick((function(){t.qrcode=new o(t.$refs.qrcode,{width:88,height:88,text:link})}))},closeCode:function(){this.$refs.qrcode.innerHTML=""}}},c=(n(744),n(745),n(11)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"share-container"},[n("el-popover",{attrs:{placement:"bottom",width:"120","min-width":"120",trigger:"click","popper-class":"custom-popover-width"},on:{show:t.onShowPopover,hide:t.closeCode}},[n("div",{staticClass:"share-cont"},[n("div",{staticClass:"copy",on:{click:t.copyLink}},[n("svg-icon",{staticClass:"copy-icon",attrs:{type:"copy-link"}}),t._v(" "),n("span",[t._v(t._s(t.$t("core.copyLink")))])],1),t._v(" "),n("div",{staticClass:"qrcode"},[n("div",{staticClass:"qrcode-text"},[n("svg-icon",{staticClass:"wechat-logo",attrs:{type:"wechat-logo"}}),t._v(" "),n("span",[t._v(t._s(t.$t("core.wxShare")))])],1),t._v(" "),n("div",{ref:"qrcode",staticClass:"qrcode-cont"})])]),t._v(" "),n("template",{slot:"reference"},[t._t("default")],2)],2)],1)}),[],!1,null,"010ad789",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},725:function(t,e,n){},726:function(t,e,n){},730:function(t,e,n){"use strict";n.r(e);n(253);var o={name:"ListLoadMore",mixins:[{data:function(){return{scrollTop:0}},mounted:function(){this.addEventListener(window,"scroll",this.handleScroll)},destroyed:function(){this.removeEventListener(window,"scroll",this.handleScroll)},methods:{handleScroll:function(){var t=document.documentElement.scrollTop||document.body.scrollTop,e=document.documentElement.clientHeight||document.body.clientHeight,n=document.documentElement.scrollHeight||document.body.scrollHeight;this.scrollData(),Math.ceil(n-e)>=20&&this.scrollPost(),Math.ceil(t+e+10)>=n&&this.scrollLoadMore(),this.scrollTop=t},addEventListener:function(t,e,n,o){t.addEventListener?t.addEventListener(e,n,o):t.attachEvent&&t.attachEvent("on".concat(e),n)},removeEventListener:function(t,e,n,o){t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent&&t.detachEvent("on".concat(e),n)}}}],props:{loading:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},pageNum:{type:[Number,String],default:1},length:{type:[Number,String],default:0},surplus:{type:[Number,String],default:0},loadMoreText:{type:String,default:function(){return this.$t("topic.showMore")}}},methods:{scrollLoadMore:function(){(this.pageNum-1)%5>0&&!this.loading&&this.hasMore&&this.loadMore()},scrollData:function(){this.$emit("scrollDdata")},scrollPost:function(){this.$emit("scrollPost")},loadMore:function(){this.$emit("loadMore")}}},r=(n(740),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"load-more-container"},[t.loading?n("loading"):[t.hasMore&&(t.pageNum-1)%5==0?n("div",{staticClass:"load-more",on:{click:t.loadMore}},[t._v("\n      "+t._s(t.surplus>0?t.$t("notice.checkMore",{surplus:t.surplus}):t.loadMoreText)+"\n    ")]):t.hasMore&&(t.pageNum-1)%5>0?n("loading"):n("div",{staticClass:"no-more"},[0===t.length?n("svg-icon",{staticClass:"empty-icon",attrs:{type:"empty"}}):t._e(),t._v("\n      "+t._s(t.length>0?t.$t("discuzq.list.noMoreData"):t.$t("discuzq.list.noData"))+"\n    ")],1)]],2)}),[],!1,null,"e9521ef0",null);e.default=component.exports;installComponents(component,{Loading:n(739).default,SvgIcon:n(62).default})},732:function(t,e,n){"use strict";n.r(e);var o={name:"ProductItem",props:{item:{type:Object,default:function(){}}},data:function(){return{}}},r=(n(749),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.item?n("a",{staticClass:"product-container",attrs:{href:t.item.detailContent,target:"_blank",el:"nofollow"}},[n("el-image",{staticClass:"image",attrs:{src:t.item.imagePath,alt:t.item.title,fit:"cover"}},[n("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[n("i",{staticClass:"el-icon-loading"})])]),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"info-header"},[n("div",{staticClass:"title"},[t._v(t._s(t.item.title))]),t._v(" "),t.item.price>0?n("div",{staticClass:"price"},[t._v(t._s(t.$t("post.yuanItem")+t.item.price+t.$t("post.yuan")))]):t._e()]),t._v(" "),n("div",{staticClass:"btn"},[n("svg-icon",{staticClass:"icon",attrs:{type:"product-icon"}}),t._v(t._s(t.$t("post.buyProudct")))],1)])],1):t._e()}),[],!1,null,"85619e88",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},733:function(t,e,n){"use strict";n.r(e);n(13),n(108);var o={name:"AudioPlayer",props:{file:{type:Object,default:function(){}},currentAudio:{type:Object,default:function(){}}},data:function(){return{onDragging:!1,delta:0}},computed:{currentFile:function(){return this.file&&this.file.id?this.currentAudio.id===this.file.id:this.currentAudio.id===this.file._jv.id},playing:function(){return this.currentAudio.currentTime&&this.currentAudio.duration}},methods:{formatDuration:function(t){var e=Math.floor(t/60),n=(t-60*e).toString().substr(0,2);return"."===n[1]&&(n="0".concat(n[0])),"".concat(e,":").concat(n)},formatCurrentTime:function(t){var e=parseInt(t/60)%60,n=(t%60).toFixed(),o=e<10?"0".concat(e):e,s=n<10?"0".concat(n):n;return"".concat(o,":").concat(s)},convertToPercentage:function(){return this.currentAudio.currentTime/this.currentAudio.duration*100},onmousedown:function(){window.document.addEventListener("mousemove",this.dragging),window.document.addEventListener("mouseup",this.onMouseUp)},dragging:function(t){this.delta=t.clientX-this.$refs.progress.getBoundingClientRect().x,this.delta<0&&(this.delta=0),this.delta>290&&(this.delta=290);var time=this.delta/290*this.currentAudio.duration;this.$emit("seeking",time)},onMouseUp:function(){var time=this.delta/290*this.currentAudio.duration;this.$emit("seek",time),window.document.removeEventListener("mousemove",this.dragging),window.document.removeEventListener("mouseup",this.onMouseUp)}}},r=(n(750),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"audio"},[t.currentFile&&t.currentAudio.isLoading?n("div",{staticClass:"control"},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"loading",rotate:""}})],1):t.currentFile&&t.currentAudio.isPlay?n("div",{staticClass:"control",on:{click:function(e){return t.$emit("pause")}}},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"audio-pause"}})],1):n("div",{staticClass:"control",on:{click:function(e){return t.$emit("play",t.file)}}},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"audio-play"}})],1),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"title"},[n("span",{staticClass:"title-audio"},[t._v(t._s(t.file.fileName||t.file.file_name))]),t._v(" "),t.currentFile&&t.playing?n("span",{staticClass:"duration-audio"},[t._v("\n        "+t._s(t.formatCurrentTime(t.currentAudio.currentTime))+" /\n        "+t._s(t.formatDuration(t.currentAudio.duration))+"\n      ")]):n("span",{staticClass:"duration-audio"},[t._v("--:--")])]),t._v(" "),t.currentFile&&t.playing?n("div",{ref:"progress",staticClass:"progress",attrs:{id:"progress"}},[n("div",{staticClass:"progress-item",style:{width:t.convertToPercentage()+"%"}}),t._v(" "),n("div",{staticClass:"control-ball",style:{left:t.convertToPercentage()+"%"},attrs:{id:"control-ball"},on:{mousedown:t.onmousedown}})]):t._e()])])}),[],!1,null,"7fe73b95",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},735:function(t,e,n){},739:function(t,e,n){"use strict";n.r(e);n(253);var o={name:"Loading",props:{loading:{type:Boolean,default:!1},fontSize:{type:Number,default:32}}},r=(n(741),n(11)),component=Object(r.a)(o,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"loading-container"},[this._v("\n  "+this._s(this.$t("discuzq.list.loading"))+"...\n")])}),[],!1,null,"00ec5480",null);e.default=component.exports},740:function(t,e,n){"use strict";n(719)},741:function(t,e,n){"use strict";n(720)},744:function(t,e,n){"use strict";n(722)},745:function(t,e,n){"use strict";n(723)},746:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAdCAMAAAApUkr4AAAAkFBMVEVHcEz3Vmf3V2j5Y3b2TVv2UF73V2f6do7yJyz0anb6bYP0Nz/1QUzzLzfzLTPzLzb6b4b6dI3zKzH7do/5a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Mb06ONHlPdTewteX+/pOf7tent+y3qKt+37x+VwEf8HVOyS3I7BqRwAAAAASUVORK5CYII="},748:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAdCAMAAAApUkr4AAAAflBMVEVHcEz721P80ET80ET800n8xDb80ET9uyv741v8zUL8z0T80ET800j9uyv9uyr741v8vjD////9wjT8xjn74Vn8yj/81k373VX731f8zkT80kj+78z82VD75Fz721L92I77uR//+ez+57H8zGX7sQ/935v91nb7xTL8w1j8434nLmyfAAAADnRSTlMA4kef4uIW4eLiK2rD8UNrkG4AAALGSURBVDjLdZUBc+IgEIV79apWPQJJiBpMAiSE5P//wdsFAqTnPevUcYbPt/uWzcdHruP19o36HfQr6XyGv3c67AAHjnqiWlCDer36vr/f74/HowYVoK6Dt/sHr+4zI3xWFa82hkO0DvHq7z8ZjhAYxx0BxHNG2wTG5iNAPMKbOSfCpXSE6v+lBB9F7Y933sQ1IcrSMTIfz+Sj3/Wj3vqAr0skHMrAQB/zj1oaswKhv68rMgrw0W2tqLMy6MaoRsXmSotNc9OOjIl17XrF9FZKaEWXIr3RyKBUMbWwqKJ9CvfBaP+FDu1ASor0SKkjIIROcH4IgsNtK5hiTIlAYGuMFiAx0isNjKoq+bgMi5SSECInzQSHo1CbHrUyA2Nzew/jgSZuWR10g1AofOSzE5dw1Eo9yMHMiglrla77h++pY8RIjyQhJPwSNd7yLKED3FpuOX6jjK3a3ZgWMdJPQihSoKV0MkzJgODgaIZ0mwGaobEhps5HvUujeSDBBi3JJJiG9zANTJGZseY542GmBs8VJo5pUaRIT2RjAALimBQbsZMEHFWuBO9KoZHVz7objxjphZDIkBS8w1sIxYwU0EIp1ExCxnIQ6ysrJUVKSIRIGIolDBa6MVbSMk6qGHmTbm0W6cmddwgCLWDYBvhJsxDA8Apj3lQ36drWdRZpMIF/2AJJl2WSkhJwAzeOAnVEaaZ226M+ZpFuDOoCITCaYEhDOxTnFTbVVQHDtdtAtzzSyJggEONmjEq8XAYQUsQ69G6LpVXxhyRJCi1zt5ZMRujBcg6RiMEVMpg132JpKC4kR0wTFuFcwEeKK8jXZS21PG1CWEBp717JjiFJuC3QGb+DrI3bMN+EqQwfadYOmq5cmRYy94uwiUs9e3wcyQ9RsmdUb5f67gFE/lFCVG8YCDkc86fg4fReX6evTd9f35vwQXu77gAffwHkwogbkx55XAAAAABJRU5ErkJggg=="},749:function(t,e,n){"use strict";n(725)},750:function(t,e,n){"use strict";n(726)},752:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAdCAMAAAApUkr4AAAAZlBMVEVHcEz/oEn/r1H/iDz/oEn/oEn/oEn/t1X/iTz/oEn/hTr/ulf/slP/////iTz/jT3/tlX/kkD/p03/rVD/lkX/oUn/uVb/m0b/eSf/wJX/59f/t4v/hTL/9/H/zKX/2MD/nGP/rXlLrqcVAAAACnRSTlMAasPJIkef4uLi2v9OvAAAAnNJREFUOMt9lY1yqyAQhZM0sS0VEAvyK+r7v2QXUFnsvd1MJJkJX87uWZbbDcfz/vhE8V5ef0fXADqppdZaKTWqscT3Hj3EMAzTNH1NX028EOElhUwEYCSKqoy+3wkZAtsw5YkIAgiyQJRqGd9XRon06R1lIcQ/Gd9XxoQYALlXBBcHQ2vdFAQVo7/qwHl0/MrY4vA7lb2kiFHT4LwwjlSkpzSetmz0DA8MlEy19O1ACMFn2oQdR23r16yj5vKqIhjfIUy2BOpHJSJ1NoWjrhT1TOYUcWeJITLCQFjq4DnTaIKAqgZHY9IXZrr0TUkfNQ/GDh2ckWA8ndeQHkJqNepQNUWsAlvKIDhnSQZnbS3AXLmitJoWm05LX4QUCKggpCG4hJDW2xJxaNqjtmaXCUkH5wH+0qzOgavORLoobWPezTMixrNPIZdq6QchJwRKQBew0kAvOCij5rscUdYZIZClANgRjME/O4BY6x2FqmxiN3nZC+LwcamWklMFI2ahPtZdioMaY0CWTyv4XFt9QpaSzEgUHuDXm6feAGrd6CwhMZfqs0GvCEjKHuMDGNVSUiLJIAR0r0tRkSoqwkJnqAkV++rRqcWWngxikiEz9RAWhERhXKliKCutY2x4IEtPBiHG5942ub9BPofE3DJTx8o616NfRdwIQQyzek8CCArGLssmuPRWGm83afNq6xSrTfFsEMEYkts0HbcARyYEnt4CGlcCUOUJ1CfGrbUUx97q0CNpVx1k0Opa1UmIJvdbo6JYy84JlLbLY5ju0zQT0PXx/K3hypDobjkYzQVE/s+4QOrd0j3xLdh9/Bmf5YXjcW8Atx8kQWg3EVPZPwAAAABJRU5ErkJggg=="},753:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAdCAMAAAApUkr4AAAAkFBMVEVHcEwwq/svuf8wqvs0mfgxsP8xpfk1jPQsxv8yp/wxp/swqfstwf80mfk0kfYtwf8sxP8sxf81jfX///80kfYtwf81i/MuvP81lfcvt/8znvo0mfgyp/wws/8wrP4yo/sxsP/J4/6PxP0ll/mIuPkih/Rwyf9jtPxhqfnx+P8si/UbevGc0v6r1f7i8P8nn/vkthLYAAAAEXRSTlMASOIu4uIN4uLiHGriw56fyad8N28AAAKRSURBVDjLbZXrdqowEIXrsaeteuzFpBEBwdwgIJf3f7szCSGZ2G5/yFouPvfMzkyenrD2h+PO66/TH69/Xm8/9ZEA3vO8BpWgqqput9v1egGdrb4Xff3QBhG2RZ47hiWUDrEyLOX7/DtjHwmbolgZdbDhGcjII+ETeciAgHx4yBUxfCkp5RAIL1lWIEYdarn+9JEwtgHx7hColGFoqtXHdRib86Xx+koYL7EMqxVS17kipAEnrh1VSYi4VB1x4omPGOmRZnRB5EUxEKS2apYH+BqEmMiY9DREuqfUMSwk0xwjqll4Fhjg8NOQ5BLqOFCrBUG1UmoinbISopRmhDpAntngbGOkx9PKyKggiaZZj6TjomxNa9UkiBDpywm0IGhaBpifc+AQERrE8RELkW48Ahi9LQOMcOULaeeR8M4hoBUdmQY0Lm/xUDAgLAyqtb5DosJYtYWcjfvvThIy2n40F3TUY6SvjLGTbwelPetCG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MMIyLVkxi6Vc6IIhlI8Vb452dOAthEstWKRQ6IEiZHD84rkRrg+5rKWugQ0JtWsdRSYBV3gYbxsjXGCWF6DcNyyDsGvIUNGfTeK2190a2Lf1GKEufikZxAtYMmpQXUSk4BkgNHBPVsMSjxEeHsgMQPdFQCJ7zb1wefwwclpjPPGg1AHHkYM6Em6KaNFuZ8oFuRTqqh6Vz18Jy3uc+jRP3J7aFj4hOzCJ94nbKMZYrQ09jKWp6TpCVnwjW5HyEkfXgqQeZ8IFml+UVQQejZ7l/PQUwoel+x+qzmyyhLpxEf2ool+MVJflvPS90M35tpp2G1QROg8srBAuZ5rrdEZ3TwO+pGhCTBifcJTqhQW4VKQsQhwk6Rag7dtonJrm94G8A/XxsRwWF7uRwBpAIUM1BTBwAiC5oQLOtLpsM0XkN/RnopIlVQz2cQR5D6BKhP8idV7BpwLainynlnZPdafeCgpWA7uQMukJ4iFoqLtJVQnMEuTaFQkBzYKPrhKYergIEYcklrgLo36PtK3qFIE5BLwDSLLaDIl4ALLMAXp1C9eEGgAmX23lPgFKXS3mXi5enIHygGwTcA6wa6BYBuAXIGugewd0EMIHuEv4DyXJgDPfCK6IAAAAASUVORK5CYII="},758:function(t,e,n){"use strict";n.r(e);n(13),n(25);var o=n(718),time=n(717),r=n(734),c=n(715),l=n.n(c),d=n(158),m=n.n(d),h=n(727),f={name:"PostItem",filters:{formatDate:function(t){return Object(time.b)(t)}},mixins:[l.a,m.a],props:{item:{type:Object,default:function(){}},showLike:{type:Boolean,default:!0},showComment:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0},lazy:{type:Boolean,default:!0},infoimage:{type:Boolean,default:!1},canDetail:{type:Boolean,default:!1},padding:{type:String,default:"20.5px 20px 30px"}},data:function(){return{loading:!1,showVideoPop:!1,isLiked:!1,currentAudio:{id:"",url:"",currentTime:"",duration:"",audio:"",seeking:!1,isPlay:!1,isLoading:!1}}},computed:{unpaid:function(){return!(this.item.paid||0===parseFloat(this.item.price))},forums:function(){return this.$store.state.site.info.attributes||{}}},watch:{item:{handler:function(t){this.isLiked=t.firstPost&&t.firstPost.isLiked,this.likeCount=t.firstPost&&t.firstPost.likeCount},immediate:!0}},mounted:function(){this.currentAudio.audio=document.getElementById("audio-player".concat(this.item&&this.item._jv&&this.item._jv.id))},methods:{handleLike:function(){var t=this;if(this.$store.getters["session/get"]("isLogin")){if(this.loading)return;if(!this.item.firstPost.canLike)return void this.$message.error(this.$t("topic.noThreadLikePermission"));this.loading=!0;var e=!this.isLiked,n={pid:parseInt(this.item.firstPost&&this.item.firstPost._jv&&this.item.firstPost._jv.id),data:{attributes:{isLiked:e}}};return h.a.updatePosts({data:n}).then((function(){t.$message.success(e?t.$t("discuzq.msgBox.likeSuccess"):t.$t("discuzq.msgBox.cancelLikeSuccess")),e?t.likeCount+=1:t.likeCount-=1,t.isLiked=e,t.$emit("change")}),(function(e){t.handleError(e)})).finally((function(){t.loading=!1}))}this.$message.warning("请登录"),window.setTimeout((function(){t.headerTologin()}),1e3)},toDetail:function(){this.item.isDraft||this.canViewPostsFn()&&this.routerLink()},onClickImage:function(){this.unpaid&&this.canViewPostsFn()&&this.routerLink()},openVideo:function(){this.canViewPostsFn()&&(this.unpaid?this.routerLink():"/"===this.$route.path||"/site/search"===this.$route.path||"category-id"===this.$route.name?this.$emit("showVideoFn",this.item.threadVideo):this.showVideoPop=!0)},routerLink:function(){window.open("/thread/".concat(this.item._jv&&this.item._jv.id),"_blank")},onClickContent:function(t){if(!this.item.isDraft){var e=t||window.event;"a"!==(e.target||e.srcElement).nodeName.toLocaleLowerCase()&&this.toDetail()}},canViewPostsFn:function(){var t=this;return this.item.canViewPosts?!this.canDetail||(this.$message.warning(this.$t("topic.joinAfterView")),!1):(this.$store.getters["session/get"]("isLogin")?this.$message.warning(this.$t("home.noPostingTopic")):(this.$message.warning(this.$t("core.not_authenticated")),window.setTimeout((function(){t.headerTologin()}),1e3)),!1)},formatTopicHTML:function(html){return o.a.parse(html)},extensionValidate:function(t){return r.extensionList.indexOf(t.toUpperCase())>0?t.toUpperCase():"UNKNOWN"},play:function(t){var e=this;this.unpaid?this.routerLink():this.canViewPostsFn()&&this.currentAudio.audio&&(this.currentAudio.id!==t._jv.id&&(this.resetAudio(this.currentAudio.audio),this.currentAudio.url=t.url||t.media_url,this.currentAudio.id=t._jv.id,this.currentAudio.audio.src=this.currentAudio.url,this.currentAudio.isLoading=!0,this.currentAudio.audio.load()),window.setTimeout((function(){e.currentAudio.audio.play(),e.currentAudio.isPlay=!0,e.currentAudio.audio.addEventListener("timeupdate",e.onProgressing),e.currentAudio.audio.addEventListener("ended",e.onEnded),e.$emit("audioPlay",e.currentAudio.id)}),0))},onProgressing:function(){this.currentAudio.seeking||(this.currentAudio.isLoading=!1,this.currentAudio.duration=this.currentAudio.audio.duration,this.currentAudio.currentTime=this.currentAudio.audio.currentTime)},onEnded:function(){this.resetAudio(this.currentAudio.audio)},resetAudio:function(audio){audio&&(audio.removeEventListener("timeupdate",this.onProgressing),audio.removeEventListener("ended",this.onEnded),this.currentAudio.isPlay=!1,this.currentAudio.duration="",this.currentAudio.currentTime="")},pause:function(){this.currentAudio.audio&&(this.currentAudio.isLoading=!1,this.currentAudio.isPlay=!1,this.currentAudio.audio.pause())},seek:function(time){this.currentAudio.audio&&(this.currentAudio.seeking=!1,this.currentAudio.currentTime=time,this.currentAudio.audio.currentTime=time)},seeking:function(time){this.currentAudio.seeking=!0,this.currentAudio.currentTime=time}}},v=(n(764),n(11)),component=Object(v.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"post-container",style:{padding:t.padding}},[t.item.isEssence?n("div",{staticClass:"essence"},[n("svg-icon",{attrs:{type:"index-essence"}})],1):t._e(),t._v(" "),5===t.item.type&&t.item.question&&1===t.item.question.is_answer&&t.item.question.beUser?n("avatar",{staticClass:"avatar",attrs:{user:{id:t.item.question.beUser.id,username:t.item.question.beUser.username,avatarUrl:t.item.question.beUser.avatarUrl,isReal:t.item.question.beUser.isReal},"prevent-jump":t.canDetail}}):t.item.user?n("avatar",{staticClass:"avatar",attrs:{user:{id:t.item.user.id,username:t.item.user.username,avatarUrl:t.item.user.avatarUrl,isReal:t.item.user.isReal},"prevent-jump":t.canDetail}}):t._e(),t._v(" "),n("div",{staticClass:"main-cont"},[n("div",{staticClass:"top-flex"},[n("div",{staticClass:"top-user-info"},[5===t.item.type&&t.item.question&&1===t.item.question.is_answer&&t.item.question.beUser?n("nuxt-link",{staticClass:"user-info",attrs:{to:t.item.user.id>0?"/user/"+t.item.question.beUser.id:""}},[n("span",{staticClass:"user-name"},[t._v(t._s(t.item.question.beUser.username))]),t._v(" "),t.item.question.beUser&&t.item.question.beUser.groups&&t.item.question.beUser.groups.length>0&&t.item.question.beUser.groups[0].isDisplay?n("span",{staticClass:"admin"},[t._v("\n            ("+t._s(t.item.question.beUser.groups[0].name)+")\n          ")]):t._e()]):t.item.user?n("nuxt-link",{staticClass:"user-info",attrs:{to:t.item.user.id>0?"/user/"+t.item.user.id:""}},[n("span",{staticClass:"user-name"},[t._v(t._s(t.item.user.username))]),t._v(" "),t.item.user.id>0&&t.item.user.groups&&t.item.user.groups.length>0&&t.item.user.groups[0].isDisplay?n("span",{staticClass:"admin"},[t._v("\n            "+t._s(t.item.user.groups[0].name)+"\n          ")]):t._e()]):t._e(),t._v(" "),5===t.item.type&&t.item.question&&1===t.item.question.is_answer?n("div",{staticClass:"answered"},[t._v("\n          "+t._s(t.$t("topic.answered"))+"\n        ")]):t._e()],1),t._v(" "),n("div",{staticClass:"time"},[t.item.createdAt?[t._v(t._s(t.$t("topic.publishAt"))+"\n          "+t._s(t._f("formatDate")(t.item.createdAt)))]:t._e()],2)]),t._v(" "),5===t.item.type?n("div",{staticClass:"question-user"},[t.item.question?t._e():n("div",[t._v("\n        "+t._s(t.$t("topic.questionsAndAnswers"))+"\n        "),n("div",{staticClass:"inline blue"},[t._v("\n          ￥"+t._s(t.item&&t.item.questionTypeAndMoney?t.item.questionTypeAndMoney.money:0)+"\n        ")])]),t._v(" "),t.item.question&&0===t.item.question.is_answer?n("div",{staticClass:"inline"},[n("div",{staticClass:"inline blue"},[t._v("\n          ￥"+t._s(t.item&&t.item.questionTypeAndMoney?t.item.questionTypeAndMoney.money:0)+"\n        ")]),t._v("\n        "+t._s(t.$t("topic.be"))+"\n        "),t.item.question&&t.item.question.beUser?n("nuxt-link",{staticClass:"grey",attrs:{to:t.item.question.beUser.id>0?"/user/"+t.item.question.beUser.id:""}},[t._v("@"+t._s(t.item.question.beUser.username))]):t._e(),t._v("\n        "+t._s(t.$t("topic.question"))+"\n      ")],1):t._e(),t._v(" "),t.item.question&&1===t.item.question.is_answer?[t._v("\n        "+t._s(t.$t("topic.answer"))+"\n        "),t.item.user?n("nuxt-link",{staticClass:"grey",attrs:{to:t.item.user.id>0?"/user/"+t.item.user.id:""}},[t._v("@"+t._s(t.item.user.username))]):t._e(),t._v("\n        "+t._s(t.$t("topic.of"))+t._s(t.$t("topic.question"))+"\n      ")]:t._e()],2):t._e(),t._v(" "),t.item.firstPost?[n("div",{staticClass:"first-post",on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},[n("a",{attrs:{href:"/thread/"+(t.item._jv&&t.item._jv.id)},on:{click:function(e){return e.preventDefault(),t.onClickContent.apply(null,arguments)}}},[1===t.item.type?n("div",{staticClass:"title"},[t._v("\n            "+t._s(t.$t("home.released"))+"\n            "),n("svg-icon",{directives:[{name:"show",rawName:"v-show",value:parseFloat(t.item.price)>0||parseFloat(t.item.attachmentPrice)>0,expression:"\n                parseFloat(item.price) > 0 ||\n                  parseFloat(item.attachmentPrice) > 0\n              "}],staticClass:"blue icon-pay-yuan-inline",attrs:{type:"pay-yuan"}}),t._v(" "),n("span",{staticClass:"blue"},[t._v(t._s(t.item.title))])],1):n("div",{staticClass:"content"},[5===t.item.type?n("svg-icon",{staticClass:"icon-pay-yuan blue",attrs:{type:"question-icon"}}):6===t.item.type?n("svg-icon",{staticClass:"icon-pay-yuan blue",attrs:{type:"product-icon"}}):parseFloat(t.item.price)>0||parseFloat(t.item.attachmentPrice)>0?n("svg-icon",{staticClass:"icon-pay-yuan grey",attrs:{type:"pay-yuan"}}):t._e(),t._v(" "),n("div",{class:{"content-block":5===t.item.type||6===t.item.type||parseFloat(t.item.price)>0,blue:5===t.item.type},domProps:{innerHTML:t._s(t.$xss(t.formatTopicHTML(t.item.firstPost.summary)))}})],1)]),t._v(" "),t.item.firstPost.images&&t.item.firstPost.images.length>0?n("div",{directives:[{name:"viewer",rawName:"v-viewer",value:{url:"data-source"},expression:"{ url: 'data-source' }"}],staticClass:"images",on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},t._l(t.item.firstPost.images.slice(0,3),(function(image,e){return n("el-image",{key:e,class:{image:!0,infoimage:t.infoimage},attrs:{src:image.thumbUrl,"data-source":t.unpaid?"":image.url,alt:image.filename,fit:"cover",lazy:t.lazy},on:{click:function(e){return e.target!==e.currentTarget?null:t.onClickImage.apply(null,arguments)}}},[n("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[n("i",{staticClass:"el-icon-loading"})])])})),1):t._e(),t._v(" "),t.item.firstPost.images&&t.item.firstPost.images.length>3?n("div",{staticClass:"image-count",on:{click:t.toDetail}},[t._v("\n          "+t._s(t.$t("home.total"))+" "+t._s(t.item.firstPost.images.length)+"\n          "+t._s(t.$t("home.seeAllImage"))+"\n        ")]):t._e(),t._v(" "),2===t.item.type&&t.item.threadVideo?n("div",{staticClass:"video-main",on:{click:function(e){return e.stopPropagation(),t.openVideo.apply(null,arguments)}}},[t.item.threadVideo.cover_url?n("el-image",{staticClass:"video-img-cover",attrs:{src:t.item.threadVideo.cover_url,alt:t.item.threadVideo.file_name,fit:"cover",lazy:t.lazy}}):n("div",{staticClass:"no-cover"},[t._v(t._s(t.$t("home.noPoster")))]),t._v(" "),n("svg-icon",{staticClass:"video-play",attrs:{type:"video-play"}})],1):t._e(),t._v(" "),t.item.firstPost.attachments&&t.item.firstPost.attachments.length>0?n("div",{staticClass:"attachment",on:{click:t.toDetail}},[n("svg-icon",{attrs:{type:t.extensionValidate(t.item.firstPost.attachments[0].extension)}}),t._v(" "),n("div",{staticClass:"name text-hidden"},[t._v("\n            "+t._s(t.item.firstPost.attachments[0].fileName)+"\n          ")]),t._v(" "),t.item.firstPost.attachments.length>1?n("div",{staticClass:"total"},[t._v("\n            "+t._s(t.$t("home.etc")+t.item.firstPost.attachments.length+t.$t("home.attachmentTotal"))+"\n          ")]):t._e()],1):t._e()]),t._v(" "),6===t.item.type?n("product-item",{attrs:{item:t.item&&t.item.firstPost&&t.item.firstPost.postGoods}}):t._e(),t._v(" "),4===t.item.type?n("div",{on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},[n("audio-player",{attrs:{file:t.item&&t.item.threadAudio,"current-audio":t.currentAudio},on:{play:t.play,pause:t.pause,seek:t.seek,seeking:t.seeking}}),t._v(" "),n("audio",{staticClass:"audio-player",staticStyle:{display:"none"},attrs:{id:"audio-player"+(t.item._jv&&t.item._jv.id),src:t.currentAudio.url}})],1):t._e(),t._v(" "),t.item.location?n("nuxt-link",{staticClass:"location",attrs:{to:"/topic/position?longitude="+t.item.longitude+"&latitude="+t.item.latitude}},[n("span",{staticClass:"flex"},[n("svg-icon",{staticClass:"icon",attrs:{type:"location"}}),t._v("\n          "+t._s(t.item.location)+"\n        ")],1)]):t._e(),t._v(" "),t.canDetail?t._e():n("div",{staticClass:"bottom-handle"},[n("div",{staticClass:"left"},[t.showLike?n("div",{staticClass:"btn like",class:{liked:t.isLiked},on:{click:t.handleLike}},[n("svg-icon",{staticClass:"icon",attrs:{type:"like"}}),t._v("\n            "+t._s(t.isLiked?t.$t("topic.liked"):t.$t("topic.like"))+"\n            "+t._s(t.likeCount>0?t.likeCount:"")+"\n          ")],1):t._e(),t._v(" "),t.showComment?n("div",{staticClass:"btn comment",on:{click:t.toDetail}},[n("svg-icon",{staticClass:"icon",attrs:{type:"post-comment"}}),t._v("\n            "+t._s(t.$t("topic.comment"))+"\n            "+t._s(t.item.postCount-1>0?t.item.postCount-1:"")+"\n          ")],1):t._e(),t._v(" "),t.item._jv&&t.item._jv.id&&t.showShare?n("share-popover",{attrs:{"threads-id":t.item._jv.id}},[n("div",{staticClass:"btn share"},[n("svg-icon",{staticClass:"icon",attrs:{type:"link"}}),t._v("\n              "+t._s(t.$t("topic.share"))+"\n            ")],1)]):t._e(),t._v(" "),t._t("btn-edit"),t._v(" "),t._t("btn-delete")],2),t._v(" "),t._t("bottom-right")],2)]:t._e()],2),t._v(" "),t.showVideoPop?n("video-pop",{attrs:{"cover-url":t.item.threadVideo.cover_url,url:t.item.threadVideo.media_url},on:{remove:function(e){t.showVideoPop=!1}}}):t._e()],1)}),[],!1,null,"74927ad6",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,Avatar:n(254).default,ProductItem:n(732).default,AudioPlayer:n(733).default,SharePopover:n(724).default,VideoPop:n(729).default})},764:function(t,e,n){"use strict";n(735)},765:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAALVBMVEX5rD75rD75rD75rD75rD75rD/5rD/5rD/5rD75rD/5rD75rD/5rD/5rD/5rD5fyIAMAAAADnRSTlMCkdkQMMNUIvFFg+WsZNscE4cAAADBSURBVBjTY2BgYGAReqfowAAGbF0ODCwrEsDsQOYcpWMGoiAm0wS5d+/ePeRUALIjrd+BwOapQNUC+ybse/fO8jVjAgMH47tmi3fPLd4JNDB42b17xP7Oed+7x0sYRPLevQsoYXr37pkjg8K5d+/eMMQBCSaGB3rvdO8y37307hEfiC1ezlBeA2ID1TwNNQ+NA6kB6l0AtJELpBdo5rt35kAMNBNoF4QNtAvohnfvPN+9A7kB2W0obkb2C4of4X4HAPLQaUz8SV+2AAAAAElFTkSuQmCC"},799:function(t,e,n){"use strict";n.r(e);n(13),n(25);var o=n(718),time=n(717),r=n(734),c=n(715),l=n.n(c),d=n(158),m=n.n(d),h=n(727),f={name:"PostItem",filters:{formatDate:function(t){return Object(time.b)(t)}},mixins:[l.a,m.a],props:{item:{type:Object,default:function(){}},showLike:{type:Boolean,default:!0},showComment:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0},lazy:{type:Boolean,default:!0},infoimage:{type:Boolean,default:!1},canDetail:{type:Boolean,default:!1},padding:{type:String,default:"20.5px 20px 30px"}},data:function(){return{loading:!1,showVideoPop:!1,isLiked:!1,currentAudio:{id:"",url:"",currentTime:"",duration:"",audio:"",seeking:!1,isPlay:!1,isLoading:!1}}},computed:{unpaid:function(){return!(this.item.paid||0===parseFloat(this.item.price))},forums:function(){return this.$store.state.site.info.attributes||{}}},watch:{item:{handler:function(t){this.isLiked=t.firstPost&&t.firstPost.isLiked,this.likeCount=t.firstPost&&t.firstPost.likeCount},immediate:!0}},mounted:function(){this.currentAudio.audio=document.getElementById("audio-player".concat(this.item&&this.item._jv&&this.item._jv.id))},methods:{handleLike:function(){var t=this;if(this.$store.getters["session/get"]("isLogin")){if(this.loading)return;if(!this.item.firstPost.canLike)return void this.$message.error(this.$t("topic.noThreadLikePermission"));this.loading=!0;var e=!this.isLiked,n={pid:parseInt(this.item.firstPost&&this.item.firstPost._jv&&this.item.firstPost._jv.id),data:{attributes:{isLiked:e}}};return h.a.updatePosts({data:n}).then((function(){t.$message.success(e?t.$t("discuzq.msgBox.likeSuccess"):t.$t("discuzq.msgBox.cancelLikeSuccess")),e?t.likeCount+=1:t.likeCount-=1,t.isLiked=e,t.$emit("change")}),(function(e){t.handleError(e)})).finally((function(){t.loading=!1}))}this.$message.warning("请登录"),window.setTimeout((function(){t.headerTologin()}),1e3)},toDetail:function(){this.item.isDraft||this.canViewPostsFn()&&this.routerLink()},onClickImage:function(){this.unpaid&&this.canViewPostsFn()&&this.routerLink()},openVideo:function(){this.canViewPostsFn()&&(this.unpaid?this.routerLink():"/"===this.$route.path||"/site/search"===this.$route.path||"category-id"===this.$route.name?this.$emit("showVideoFn",this.item.threadVideo):this.showVideoPop=!0)},routerLink:function(){window.open("/thread/".concat(this.item._jv&&this.item._jv.id),"_blank")},onClickContent:function(t){if(!this.item.isDraft){var e=t||window.event;"a"!==(e.target||e.srcElement).nodeName.toLocaleLowerCase()&&this.toDetail()}},canViewPostsFn:function(){var t=this;return this.item.canViewPosts?!this.canDetail||(this.$message.warning(this.$t("topic.joinAfterView")),!1):(this.$store.getters["session/get"]("isLogin")?this.$message.warning(this.$t("home.noPostingTopic")):(this.$message.warning(this.$t("core.not_authenticated")),window.setTimeout((function(){t.headerTologin()}),1e3)),!1)},formatTopicHTML:function(html){return o.a.parse(html)},extensionValidate:function(t){return r.extensionList.indexOf(t.toUpperCase())>0?t.toUpperCase():"UNKNOWN"},play:function(t){var e=this;this.unpaid?this.routerLink():this.canViewPostsFn()&&this.currentAudio.audio&&(this.currentAudio.id!==t._jv.id&&(this.resetAudio(this.currentAudio.audio),this.currentAudio.url=t.url||t.media_url,this.currentAudio.id=t._jv.id,this.currentAudio.audio.src=this.currentAudio.url,this.currentAudio.isLoading=!0,this.currentAudio.audio.load()),window.setTimeout((function(){e.currentAudio.audio.play(),e.currentAudio.isPlay=!0,e.currentAudio.audio.addEventListener("timeupdate",e.onProgressing),e.currentAudio.audio.addEventListener("ended",e.onEnded),e.$emit("audioPlay",e.currentAudio.id)}),0))},onProgressing:function(){this.currentAudio.seeking||(this.currentAudio.isLoading=!1,this.currentAudio.duration=this.currentAudio.audio.duration,this.currentAudio.currentTime=this.currentAudio.audio.currentTime)},onEnded:function(){this.resetAudio(this.currentAudio.audio)},resetAudio:function(audio){audio&&(audio.removeEventListener("timeupdate",this.onProgressing),audio.removeEventListener("ended",this.onEnded),this.currentAudio.isPlay=!1,this.currentAudio.duration="",this.currentAudio.currentTime="")},pause:function(){this.currentAudio.audio&&(this.currentAudio.isLoading=!1,this.currentAudio.isPlay=!1,this.currentAudio.audio.pause())},seek:function(time){this.currentAudio.audio&&(this.currentAudio.seeking=!1,this.currentAudio.currentTime=time,this.currentAudio.audio.currentTime=time)},seeking:function(time){this.currentAudio.seeking=!0,this.currentAudio.currentTime=time}}},v=(n(803),n(11)),component=Object(v.a)(f,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"add-padding-line"},[o("div",{staticClass:"post-container"},[t.item.isEssence?o("div",{staticClass:"essence"},[o("img",{attrs:{src:n(757),alt:""}})]):t._e(),t._v(" "),o("div",{staticClass:"post-header"},[5===t.item.type&&t.item.question&&1===t.item.question.is_answer&&t.item.question.beUser?o("avatar",{staticClass:"avatar",attrs:{user:{id:t.item.question.beUser.id,username:t.item.question.beUser.username,avatarUrl:t.item.question.beUser.avatarUrl,isReal:t.item.question.beUser.isReal},size:"40",round:!0,"prevent-jump":t.canDetail}}):t.item.user?o("avatar",{staticClass:"avatar",attrs:{user:{id:t.item.user.id,username:t.item.user.username,avatarUrl:t.item.user.avatarUrl,isReal:t.item.user.isReal},size:"40",round:!0,"prevent-jump":t.canDetail}}):t._e(),t._v(" "),5===t.item.type&&t.item.question&&1===t.item.question.is_answer&&t.item.question.beUser?o("nuxt-link",{staticClass:"user-info",attrs:{to:t.item.user.id>0?"/user/"+t.item.question.beUser.id:""}},[o("span",{staticClass:"user-name"},[t._v(t._s(t.item.question.beUser.username))]),t._v(" "),t.item.user.id>0&&t.item.question.beUser&&t.item.question.beUser.groups&&t.item.question.beUser.groups.length>0&&t.item.question.beUser.groups[0].isDisplay?o("span",{staticClass:"admin"},[t._v("\n          ("+t._s(t.item.question.beUser.groups[0].name)+")\n        ")]):t._e()]):t.item.user?o("nuxt-link",{staticClass:"user-info",attrs:{to:t.item.user.id>0?"/user/"+t.item.user.id:""}},[o("span",{staticClass:"user-name"},[t._v(t._s(t.item.user.username))]),t._v(" "),t.item.user&&t.item.user.groups&&t.item.user.groups.length>0&&t.item.user.groups[0].isDisplay?o("span",{staticClass:"admin"},[t._v("\n          "+t._s(t.item.user.groups[0].isDisplay?"("+t.item.user.groups[0].name+")":"")+"\n        ")]):t._e()]):t._e(),t._v(" "),5===t.item.type&&t.item.question&&1===t.item.question.is_answer?o("div",{staticClass:"answered"},[t._v(t._s(t.$t("topic.answered")))]):t._e()],1),t._v(" "),t.item.firstPost?o("div",{staticClass:"post-content"},[o("div",{staticClass:"first-post",on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},[o("div",{staticClass:"first-post-desc",on:{click:t.onClickContent}},[o("div",{staticClass:"first-post-desc__tips"},[0!==t.item.type&&1!==t.item.type||!t.item.isRedPacket?t._e():o("img",{staticClass:"first-post-img",attrs:{src:n(746)}}),t._v(" "),5===t.item.type&&t.item.questionTypeAndMoney&&0===t.item.questionTypeAndMoney.type?o("img",{staticClass:"first-post-img",attrs:{src:n(747)}}):5===t.item.type?o("img",{staticClass:"first-post-img",attrs:{src:n(748)}}):t._e(),t._v(" "),6===t.item.type?o("img",{staticClass:"first-post-img",attrs:{src:n(752)}}):t._e(),t._v(" "),7===t.item.type?o("img",{staticClass:"first-post-img",attrs:{src:n(753)}}):t._e(),t._v(" "),1===t.item.type?o("span",{staticClass:"first-post-tip"},[t._v(t._s(t.$t("home.releasedPost")))]):t._e(),t._v(" "),5===t.item.type&&t.item.questionTypeAndMoney&&0===t.item.questionTypeAndMoney.type?o("span",{staticClass:"first-post-tip"},[t._v("【￥"+t._s(t.item.questionTypeAndMoney.money)+"】")]):t._e(),t._v(" "),parseFloat(t.item.price)>0||parseFloat(t.item.attachmentPrice)>0?o("img",{staticClass:"first-post-coin",attrs:{src:n(765)}}):t._e()]),t._v(" "),1===t.item.type?o("p",{staticClass:"content"},[t._v(t._s(t.item.title))]):o("p",{staticClass:"content",domProps:{innerHTML:t._s(t.$xss(t.formatTopicHTML(t.item.firstPost.summary)))}}),t._v(" "),5===t.item.type?o("span",[t.item.question&&0===t.item.question.is_answer?[t.item.question&&t.item.question.beUser?o("nuxt-link",{staticClass:"questioner",attrs:{to:t.item.question.beUser.id>0?"/user/"+t.item.question.beUser.id:""}},[t._v("@"+t._s(t.item.question.beUser.username))]):t._e()]:t._e(),t._v(" "),t.item.question&&1===t.item.question.is_answer?[t.item.user?o("nuxt-link",{staticClass:"questioner",attrs:{to:t.item.user.id>0?"/user/"+t.item.user.id:""}},[t._v("@"+t._s(t.item.user.username))]):t._e()]:t._e()],2):t._e()]),t._v(" "),t.item.firstPost.images&&t.item.firstPost.images.length>0?o("div",{directives:[{name:"viewer",rawName:"v-viewer",value:{url:"data-source"},expression:"{ url: 'data-source' }"}],staticClass:"images",on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},t._l(t.item.firstPost.images.slice(0,3),(function(image,e){return o("el-image",{key:e,class:{image:!0,infoimage:t.infoimage},attrs:{src:image.thumbUrl,"data-source":t.unpaid?"":image.url,alt:image.filename,fit:"cover",lazy:t.lazy},on:{click:function(e){return e.target!==e.currentTarget?null:t.onClickImage.apply(null,arguments)}}},[o("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[o("i",{staticClass:"el-icon-loading"})])])})),1):t._e(),t._v(" "),t.item.firstPost.images&&t.item.firstPost.images.length>3?o("div",{staticClass:"image-count",on:{click:t.toDetail}},[t._v("\n          "+t._s(t.$t("home.total"))+" "+t._s(t.item.firstPost.images.length)+"\n          "+t._s(t.$t("home.seeAllImage"))+"\n        ")]):t._e(),t._v(" "),2===t.item.type&&t.item.threadVideo?o("div",{staticClass:"video-main",on:{click:function(e){return e.stopPropagation(),t.openVideo.apply(null,arguments)}}},[t.item.threadVideo.cover_url?o("el-image",{staticClass:"video-img-cover",attrs:{src:t.item.threadVideo.cover_url,alt:t.item.threadVideo.file_name,fit:"cover",lazy:t.lazy}}):o("div",{staticClass:"no-cover"},[t._v(t._s(t.$t("home.noPoster")))]),t._v(" "),o("svg-icon",{staticClass:"video-play",attrs:{type:"video-play"}})],1):t._e(),t._v(" "),t.item.firstPost.attachments&&t.item.firstPost.attachments.length>0?o("div",{staticClass:"attachment",on:{click:t.toDetail}},[o("svg-icon",{attrs:{type:t.extensionValidate(t.item.firstPost.attachments[0].extension)}}),t._v(" "),o("div",{staticClass:"name text-hidden"},[t._v("\n            "+t._s(t.item.firstPost.attachments[0].fileName)+"\n          ")]),t._v(" "),t.item.firstPost.attachments.length>1?o("div",{staticClass:"total"},[t._v("\n            "+t._s(t.$t("home.etc")+t.item.firstPost.attachments.length+t.$t("home.attachmentTotal"))+"\n          ")]):t._e()],1):t._e()]),t._v(" "),6===t.item.type?o("product-item",{attrs:{item:t.item&&t.item.firstPost&&t.item.firstPost.postGoods}}):t._e(),t._v(" "),4===t.item.type?o("div",{on:{click:function(e){return e.target!==e.currentTarget?null:t.toDetail.apply(null,arguments)}}},[o("audio-player",{attrs:{file:t.item&&t.item.threadAudio,"current-audio":t.currentAudio},on:{play:t.play,pause:t.pause,seek:t.seek,seeking:t.seeking}}),t._v(" "),o("audio",{staticClass:"audio-player",staticStyle:{display:"none"},attrs:{id:"audio-player"+(t.item._jv&&t.item._jv.id),src:t.currentAudio.url}})],1):t._e(),t._v(" "),t.item.location?o("nuxt-link",{staticClass:"location",attrs:{to:"/topic/position?longitude="+t.item.longitude+"&latitude="+t.item.latitude}},[o("span",{staticClass:"flex"},[o("svg-icon",{staticClass:"icon",attrs:{type:"location"}}),t._v("\n          "+t._s(t.item.location)+"\n        ")],1)]):t._e()],1):t._e(),t._v(" "),o("div",{staticClass:"post-footer"},[o("div",{staticClass:"time"},[t.item.createdAt?[t._v("\n          "+t._s(t.item.isDraft?t.$t("topic.saveAt"):t.$t("topic.publishAt"))+"\n          "+t._s(t._f("formatDate")(t.item.createdAt))+"\n        ")]:t._e()],2),t._v(" "),t.canDetail?t._e():o("div",{staticClass:"handle-btn"},[t.showLike?o("div",{staticClass:"btn like",class:{liked:t.isLiked},on:{click:t.handleLike}},[o("svg-icon",{staticClass:"icon",attrs:{type:"like"},on:{click:t.handleLike}}),t._v("\n          "+t._s(t.isLiked?t.$t("topic.liked"):t.$t("topic.like"))+"\n          "+t._s(t.likeCount>0?t.likeCount:"")+"\n        ")],1):t._e(),t._v(" "),t.showComment?o("div",{staticClass:"btn comment",on:{click:t.toDetail}},[o("svg-icon",{staticClass:"icon",attrs:{type:"post-comment"}}),t._v("\n          "+t._s(t.$t("topic.comment"))+"\n          "+t._s(t.item.postCount-1>0?t.item.postCount-1:"")+"\n        ")],1):t._e(),t._v(" "),t.item._jv&&t.item._jv.id&&t.showShare?o("share-popover",{attrs:{"threads-id":t.item._jv.id}},[o("div",{staticClass:"btn share"},[o("svg-icon",{staticClass:"icon",attrs:{type:"link"}}),t._v("\n            "+t._s(t.$t("topic.share"))+"\n          ")],1)]):t._e(),t._v(" "),t._t("bottom-right"),t._v(" "),t._t("btn-edit"),t._v(" "),t._t("btn-delete")],2)]),t._v(" "),t.showVideoPop?o("video-pop",{attrs:{"cover-url":t.item.threadVideo.cover_url,url:t.item.threadVideo.media_url},on:{remove:function(e){t.showVideoPop=!1}}}):t._e()],1)])}),[],!1,null,"20e7c222",null);e.default=component.exports;installComponents(component,{Avatar:n(254).default,SvgIcon:n(62).default,ProductItem:n(732).default,AudioPlayer:n(733).default,SharePopover:n(724).default,VideoPop:n(729).default})},803:function(t,e,n){"use strict";n(754)},986:function(t,e,n){}}]);