text: (window.webpackJsonp=window.webpackJsonp||[]).push([[36,7],{1016:function(t,e,n){},1148:function(t,e,n){"use strict";n(1016)},1209:function(t,e,n){"use strict";n.r(e);var r=n(717),o=n(734),c=n.n(o),l=n(739),d=n.n(l),h=n(904),m={name:"ReplyList",mixins:[c.a],props:{replyList:{type:Array,default:function(){return[]}}},methods:{formatHtml:function(html){return html?r.a.parse(Object(h.a)(html)):""},formatDate:function(t){return d()(t).format("YYYY-MM-DD HH:mm")},toShield:function(t){this.isShield=!0,this.commentId=t},beforeHandleCommand:function(t,data,e){return{sign:t,data:data,key:e}},commentManagement:function(t){"delete"===t.sign?this.$emit("delete",{id:t.data,type:t.key}):this.$emit("editComment",t.data,t.key)}}},f=(n(1148),n(11)),component=Object(f.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._l(t.replyList,(function(e,r){return n("div",{key:r,staticClass:"reply-list"},[n("div",{staticClass:"title"},[n("div",{staticClass:"title-info"},[n("avatar-component",{attrs:{author:e.user,size:30,"group-show":!(null===e.commentPostId||!e.commentUser)}}),t._v(" "),n("div",{staticClass:"content-reply"},[null!==e.commentPostId&&e.commentUser?n("span",{staticClass:"toReply"},[t._v("\n            "+t._s(t.$t("topic.reply"))+"\n          ")]):t._e(),t._v(" "),null!==e.commentPostId&&e.commentUser?n("span",{staticClass:"replyUser"},[t._v("\n            "+t._s(""+(e.commentUser.username||e.commentUser.userName))+"\n          ")]):t._e()]),t._v(" "),n("div",{staticClass:"time"},[t._v(t._s(t.formatDate(e.updatedAt)))])],1),t._v(" "),n("div",{staticClass:"management"},[0===e.isApproved?n("div",{staticClass:"checking"},[t._v("\n          "+t._s(t.$t("topic.inReview"))+"\n        ")]):t._e(),t._v(" "),e.canEdit||e.canHide?n("el-dropdown",{staticClass:"filter-dropdown",attrs:{size:"medium"},on:{command:t.commentManagement}},[n("span",{staticClass:"el-dropdown-link"},[t._v("\n            "+t._s(t.$t("topic.management"))+"\n          ")]),t._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.canEdit?n("el-dropdown-item",{attrs:{command:t.beforeHandleCommand("editComment",e,r)}},[t._v("\n              "+t._s(t.$t("topic.edit"))+"\n            ")]):t._e(),t._v(" "),e.canHide?n("el-dropdown-item",{attrs:{divided:!0,command:t.beforeHandleCommand("delete",e._jv&&e._jv.id||e.id,"reply")}},[t._v("\n              "+t._s(t.$t("topic.delete"))+"\n            ")]):t._e()],1)],1):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1===e.isApproved,expression:"reply.isApproved === 1"}],staticClass:"actions"},[e.canLike?n("span",{staticClass:"like",on:{click:function(n){return t.$emit("onLike",{reply:e,index:r})}}},[n("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:e.isLiked?"liked":"like"}}),t._v(" "),n("span",{staticClass:"text"},[t._v("\n              "+t._s(t.$t("topic.like"))+"\n              "+t._s(e.likeCount>0?e.likeCount:""))])],1):t._e(),t._v(" "),n("span",{on:{click:function(n){return t.$emit("reply",e)}}},[n("span",{staticClass:"text"},[t._v(t._s(t.$t("topic.replyTa")))])])])],1)]),t._v(" "),n("div",{staticClass:"container-detail"},[n("div",{staticClass:"content-html",domProps:{innerHTML:t._s(t.$xss(t.formatHtml(e.contentHtml)))}}),t._v(" "),e.images&&e.images.length>0?n("div",{directives:[{name:"viewer",rawName:"v-viewer",value:{url:"data-source"},expression:"{ url: 'data-source' }"}],staticClass:"images"},t._l(e.images,(function(image,t){return n("el-image",{key:t,staticStyle:{width:"100px",height:"100px","border-radius":"5px","margin-right":"10px"},attrs:{src:image.thumbUrl,alt:image.filename,"data-source":image.url,fit:"cover"}})})),1):t._e()])])})),0)}),[],!1,null,"3744f9f4",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,SvgIcon:n(62).default})},715: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}}}},718:function(t,e,n){},719:function(t,e,n){"use strict";n.r(e);var r={name:"MessageBox",props:{width:{type:String,default:"820px"},title:{type:String,default:""},overflow:{type:String,default:"auto"}}},o=(n(792),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Cover"),t._v(" "),n("div",{staticClass:"message-box",style:{overflow:t.overflow,width:t.width}},[n("div",{staticClass:"container-title"},[n("div",{staticClass:"title"},[t._v(t._s(t.title))]),t._v(" "),n("svg-icon",{staticStyle:{"font-size":"14px",cursor:"pointer",fill:"#6d6d6d"},attrs:{type:"close"},on:{click:function(e){return t.$emit("close")}}})],1),t._v(" "),t._t("default")],2)],1)}),[],!1,null,"05e0d157",null);e.default=component.exports;installComponents(component,{Cover:n(754).default,SvgIcon:n(62).default})},723:function(t,e,n){},724:function(t,e,n){},725:function(t,e,n){"use strict";n(254);var r=n(0),o=(n(34),n(24),n(39),n(53),n(54),n(8)),c=n(111),l=n(112),d=n(43);function h(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function m(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?h(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):h(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var f=n.n(d).a;f.defaults=m(m(m({},f.defaults),{url:"",method:"GET",dataType:"json",timeout:3e4,isValidate:!1,validateRules:null}),{},{validateRules:null});var v=f;n(13),n(108);function y(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function _(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?y(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):y(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var w=null,C="undefined"!=typeof window;function k(){var t="__dzqtest_ls__";try{return!!w&&(w.setItem(t,t),w.getItem(t),!0)}catch(t){return!1}}w=C?window.localStorage:{};var x=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,t);var n="__dzqls-",r=0;this.options=_({prefix:n,expires:r},e),this.expiresPrefix="expires".concat(this.options.prefix)}return Object(l.a)(t,[{key:"getKey",value:function(t){var e=this.options.prefix;return"".concat(e).concat(t)}},{key:"getExpiresKey",value:function(t){return"".concat(this.expiresPrefix).concat(t)}},{key:"getCurrentTime",value:function(){return Math.floor((new Date).getTime()/1e3)}},{key:"getExpiresValue",value:function(t){return(this.getCurrentTime()+t).toString(10)}},{key:"shiftItem",value:function(t){if(!k())return!1;var e=w.removeItem;e(this.getKey(t)),e(this.getExpiresKey(t))}},{key:"isExpired",value:function(t){if(k()){var e=w.getItem(this.getExpiresKey(t));if(e){var n=parseInt(e,10);if(this.getCurrentTime()>n)return this.shiftItem(t),!0}}}},{key:"set",value:function(t,e,n){var r=this.getKey(t),o=e;if(!k())return!1;try{o=JSON.stringify(e)}catch(t){return!1}var c=w,l=c.setItem,d=c.removeItem;try{l(r,o);var h=this.getExpiresKey(t);n?l(h,this.getExpiresValue(n)):d(h)}catch(t){return!1}return!0}},{key:"get",value:function(t){if(!k())return null;if(this.isExpired(t))return null;var e=w.getItem(this.getKey(t));try{return JSON.parse(e)}catch(t){return e}}},{key:"remove",value:function(t){k()&&this.shiftItem(t)}},{key:"clear",value:function(){k()&&w.clear()}}]),t}(),P=n(9),O=(n(31),n(884)),j=n(163),$=n.n(j);function L(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function T(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?L(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):L(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){new O.a(e).validate(t,{firstFields:!0},(function(t,e){var o=t?"fail":"success",c=t?t[0].message:"";"success"===o?n({status:o,message:c,fieldsData:e}):r($()("Parameter Validator Error",{status:o,message:c,fieldsData:e,errors:t},null))}))}))}var S=function(){var t=Object(P.a)(regeneratorRuntime.mark((function t(e){var n,r,o,data,c,l,source;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=e.isValidate,l=e.validateRules,!c||!l){t.next=5;break}return source=T(T({},r),data),t.next=5,A(source,l,e);case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=n(164),E=n.n(I);function U(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}var R=new x({prefix:""}),D=function(t){var e=R.get("access_token");return e&&(t.headers.authorization="Bearer ".concat(e)),t},N=function(t){return{data:t.data,status:t.status}},F=function(){function t(e){Object(c.a)(this,t),this.axiosConfig=e,this.createHttp()}return Object(l.a)(t,[{key:"createHttp",value:function(){this.http=v.create(function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?U(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):U(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({isValidate:!1,withCredentials:!0,paramsSerializer:function(t){return E.a.stringify(t,{arrayFormat:"indices",encode:!1})}},this.axiosConfig)),this.setHttpRequestInterceptors(),this.setHttpResponseInterceptors()}},{key:"setHttpRequestInterceptors",value:function(){this.http.interceptors.request.use(D),this.http.interceptors.request.use(S,null,{synchronous:!0})}},{key:"setHttpResponseInterceptors",value:function(){this.http.interceptors.response.use(N)}}]),t}(),V=0,z=n(86),M=["params","data"];function B(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function Q(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?B(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):B(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var H={page:{type:"number"},perPage:{type:"number"},filter:{type:"object",required:!0,fields:{sticky:{type:"number",required:!0},essence:{type:"number",required:!0},types:{type:"array"},categoryids:{type:"array"},sort:{type:"number"},attention:{type:"number"}}}};function W(){return Y.apply(this,arguments)}function Y(){return(Y=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,M),l=Q(Q({url:"/api/threads.v2",method:"GET",params:r,data:data},c),{},{validateRules:H}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var Z=["params","data"];function G(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function K(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?G(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):G(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var X={pid:{type:"number",required:!0},stopViewCount:{type:"boolean"}};function J(){return tt.apply(this,arguments)}function tt(){return(tt=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,Z),l=K(K({url:"/api/threads.detail.v2",method:"GET",params:r,data:data},c),{},{validateRules:X}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var et=["params","data"];function it(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function nt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?it(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):it(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var st={};function at(){return ot.apply(this,arguments)}function ot(){return(ot=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,et),l=nt(nt({url:"/api/categories.v2",method:"GET",params:r,data:data},c),{},{validateRules:st}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var ct=["params","data"];function lt(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function ut(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?lt(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):lt(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var pt={page:{type:"number"},perPage:{type:"number"}};function ht(){return mt.apply(this,arguments)}function mt(){return(mt=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,ct),l=ut(ut({url:"/api/posts.v2",method:"GET",params:r,data:data},c),{},{validateRules:pt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var ft=["params","data"];function vt(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function gt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?vt(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):vt(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var yt={categoryId:{type:"array"}};function _t(){return bt.apply(this,arguments)}function bt(){return(bt=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,ft),l=gt(gt({url:"/api/sticks.v2",method:"GET",params:r,data:data},c),{},{validateRules:yt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var wt=["params","data"];function Ct(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function kt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Ct(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):Ct(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var xt={categoriesId:{type:"number",required:!0},content:{type:"string",required:!0},type:{type:"number",required:!0},isAnonymous:{type:"number"},price:{type:"number"},attachmentPrice:{type:"number"},freeWords:{type:"number"},location:{type:"string"},longitude:{type:"number"},latitude:{type:"number"},address:{type:"string"},id:{type:"string"},isDraft:{type:"number"},isRedPacket:{type:"number"},isOldDraft:{type:"number"},title:{type:"string"},postGoodsId:{type:"number"},redPacket:{type:"object",fields:{condition:{type:"number"},likenum:{type:"number"},money:{type:"number"},number:{type:"number"},rule:{type:"number"},orderId:{type:"string"},orderPrice:{type:"number"}}},attachments:{type:"array",defaultField:{type:"object",fields:{id:{type:"number"},type:{type:"string"}}}},question:{type:"object",fields:{type:{type:"number"},price:{type:"number"},orderId:{type:"string"},isOnlooker:{type:"boolean"},beUserId:{type:"number"},expiredAt:{type:"date"}}}};function Pt(){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,wt),l=kt(kt({url:"/api/thread.v2",method:"POST",params:r,data:data},c),{},{validateRules:xt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:t.prev=10,t.t0=t.catch(1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var jt=["params","data"];function $t(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function Lt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?$t(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):$t(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var Tt={id:{type:"number",required:!0}};function At(){return St.apply(this,arguments)}function St(){return(St=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,jt),l=Lt(Lt({url:"/api/threads/update.v2",method:"POST",params:r,data:data},c),{},{validateRules:Tt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:t.prev=10,t.t0=t.catch(1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var It=["params","data"];function Et(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function Ut(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Et(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):Et(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var Rt={data:{type:"object",required:!0,fields:{attributes:{type:"object",required:!0,fields:{}}}}};function Dt(){return Nt.apply(this,arguments)}function Nt(){return(Nt=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,It),l=Ut(Ut({url:"/api/posts.update.v2",method:"POST",params:r,data:data},c),{},{validateRules:Rt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:t.prev=10,t.t0=t.catch(1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}var Ft=["params","data"];function qt(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function Vt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?qt(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):qt(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var zt={data:{type:"object",fields:{relationships:{type:"object",fields:{thread:{type:"object",fields:{data:{type:"object",required:!0,fields:{id:{type:"number",required:!0}}}}}}},attributes:{type:"object",fields:{replyId:{type:"number"},content:{type:"string",required:!0},commentPostId:{type:"number"},commentUserId:{type:"number"}}}}}};function Mt(){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(P.a)(regeneratorRuntime.mark((function t(){var e,n,r,o,data,c,l,d,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:{},t.prev=1,n=e.params,r=void 0===n?{}:n,o=e.data,data=void 0===o?{}:o,c=Object(z.a)(e,Ft),l=Vt(Vt({url:"/api/posts.v2",method:"POST",params:r,data:data},c),{},{validateRules:zt}),t.next=6,this.http(l);case 6:return d=t.sent,t.abrupt("return",d);case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",handleError(t.t0));case 13:case"end":return t.stop()}}),t,this,[[1,10]])})))).apply(this,arguments)}n(258);var Qt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new F(t);return e.readThreadList=W,e.readThreadDetail=J,e.readCategories=at,e.readCommentList=ht,e.readStickList=_t,e.createThread=Pt,e.updateThreads=At,e.updatePosts=Dt,e.createPosts=Mt,e}({baseURL:""}),Ht=Qt.http,Wt=r.default.prototype;Ht.interceptors.response.use((function(t){var data=t.data,e=data||{},n=e.Code,r=e.Message;switch(Number(n)){case V:break;default:Wt.$message.warning(r)}return data}));e.a=Qt},728:function(t,e,n){"use strict";n.r(e);n(254);var r={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,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on".concat(e),n)},removeEventListener:function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r):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")}}},o=n(11),component=Object(o.a)(r,(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,null,null);e.default=component.exports;installComponents(component,{Loading:n(737).default,SvgIcon:n(62).default})},730:function(t,e,n){"use strict";n.r(e);var r={name:"ProductItem",props:{item:{type:Object,default:function(){}}},data:function(){return{}}},o=(n(743),n(11)),component=Object(o.a)(r,(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})},731:function(t,e,n){"use strict";n.r(e);n(13),n(108);var r={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(),r=e<10?"0".concat(e):e,s=n<10?"0".concat(n):n;return"".concat(r,":").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)}}},o=(n(744),n(11)),component=Object(o.a)(r,(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})},734:function(t,e,n){t.exports={data:function(){return{diffModulus:[[1e3,60,this.$t("discuzq.date.sec")],[6e4,60,this.$t("discuzq.date.min")],[36e5,24,this.$t("discuzq.date.hour")],[864e5,30,this.$t("discuzq.date.day")],[2592e6,12,this.$t("discuzq.date.mon")],[31104e6,1e6,this.$t("discuzq.date.year")]]}},methods:{timerDiff:function(t,e){t instanceof Date||(t=new Date(t)),e instanceof Date||(e=window.currentTime||new Date),e||(e=window.currentTime||new Date);for(var n,r=e-t,i=0;i<this.diffModulus.length;i++){var o=this.diffModulus[i];if(r/o[0]<o[1]){n="".concat(Math.ceil(r/o[0])," ").concat(o[2]);break}}return n||""}}}},735:function(t,e,n){},736:function(t,e,n){},737:function(t,e,n){"use strict";n.r(e);n(254);var r={name:"Loading",props:{loading:{type:Boolean,default:!1},fontSize:{type:Number,default:32}}},o=(n(738),n(11)),component=Object(o.a)(r,(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,"a5011398",null);e.default=component.exports},738:function(t,e,n){"use strict";n(718)},740:function(t,e,n){},743:function(t,e,n){"use strict";n(723)},744:function(t,e,n){"use strict";n(724)},753:function(t,e,n){"use strict";n.r(e);n(254);var r={name:"AvatarComponent",props:{author:{type:Object,default:function(){}},size:{type:Number,default:50},round:{type:Boolean,default:!1},groupShow:{type:Boolean,default:!1}},computed:{isAnonymous:function(){return!this.author.id||parseInt(this.author.id)<0}}},o=(n(812),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"global"},[n("Avatar",{attrs:{user:t.author,size:t.size,round:t.round}}),t._v(" "),n("div",{staticClass:"title-info"},[n("div",{staticClass:"author-name"},[n("a",{staticClass:"username",attrs:{href:t.isAnonymous?"javascript:void(0)":"/user/"+t.author.id}},[t._v(t._s(t.author.userName||t.author.username))]),t._v(" "),t.author.groups&&t.author.groups[0]&&t.author.groups[0].isDisplay&&!t.groupShow?n("span",{staticClass:"group"},[t._v(t._s(t.author.groups[0].isDisplay?"（"+(t.author.groups[0].name||t.author.groups[0].groupName)+"）":""))]):t._e()]),t._v(" "),n("div",{staticClass:"timer"},[t._t("default")],2)])],1)}),[],!1,null,"4fb965b2",null);e.default=component.exports;installComponents(component,{Avatar:n(255).default})},755:function(t,e,n){"use strict";n.r(e);var r=n(745),o={name:"Advertising",data:function(){return{qrcode:null,siteName:""}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}}},watch:{forums:{handler:function(t){t&&t.set_site&&(this.siteName=t.set_site.site_name?t.set_site.site_name:"Discuz! Q")},deep:!0}},mounted:function(){this.siteName=this.forums&&this.forums.set_site&&this.forums.set_site.site_name?this.forums.set_site.site_name:"Discuz! Q",this.createQrcode(window.location.href)},destroyed:function(){this.qrcode=null},methods:{createQrcode:function(link){var t=this;this.qrcode=null,this.$nextTick((function(){t.qrcode=new r(t.$refs.qrcode,{width:70,height:70,text:link})}))}}},c=(n(781),n(11)),component=Object(c.a)(o,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"adv-container"},[e("div",{ref:"qrcode",staticClass:"qrcode"}),this._v(" "),e("div",{staticClass:"adv-info"},[e("div",{staticClass:"adv-title"},[this._v("扫一扫，访问移动端")]),this._v("\n    \n    "+this._s(this.siteName)+"\n    \n    \n  ")])])}),[],!1,null,"9f251c1a",null);e.default=component.exports},756:function(t,e,n){"use strict";n.r(e);n(52);var r={name:"Copyright",data:function(){return{year:"2019"}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}},code:function(){return this.$store.state.site.info.attributes.set_site.site_record_code.replace(/[^0-9]+/g,"")||""}},mounted:function(){var t=window.currentTime||new Date;this.year=t.getFullYear()}},o=(n(782),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"copyright"},[n("div",{staticClass:"info"},[n("span",[t._v("Powered By")]),t._v(" "),n("a",{staticClass:"site",attrs:{href:"https://discuz.com",target:"_blank"}},[t._v("Discuz! Q")]),t._v(" "),n("span",{staticClass:"block"},[t._v("© "+t._s(t.year))])]),t._v(" "),t.forums&&t.forums.set_site&&(t.forums.set_site.site_record||t.forums.set_site.site_record_code)?n("div",{staticClass:"id"},[n("div",{staticClass:"site-record-code"},[n("a",{attrs:{href:"https://beian.miit.gov.cn/",target:"_blank"}},[t._v(t._s(t.forums.set_site?t.forums.set_site.site_record:""))])]),t._v(" "),t.forums&&t.forums.set_site&&t.forums.set_site.site_record_code?n("div",{staticClass:"site-record-code"},[n("a",{attrs:{href:"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode="+t.code,target:"_blank"}},[t._v(t._s(t.forums&&t.forums.set_site&&t.forums.set_site.site_record_code))])]):t._e()]):t._e()])}),[],!1,null,"66f34dac",null);e.default=component.exports},762:function(t,e,n){},763:function(t,e,n){},764:function(t,e,n){},765:function(t,e,n){},766:function(t,e,n){},767:function(t,e,n){},768:function(t,e,n){},769:function(t,e,n){},770:function(t,e,n){},771:function(t,e,n){},772:function(t,e,n){},773:function(t,e,n){},774:function(t,e,n){},775:function(t,e,n){},780:function(t,e,n){},781:function(t,e,n){"use strict";n(735)},782:function(t,e,n){"use strict";n(736)},786:function(t,e,n){"use strict";n.r(e);var r=n(85),o=(n(39),n(45),n(714)),c={name:"Caller",mixins:[n.n(o).a],data:function(){return{friends:[],friendsLoading:!0,selectedFriends:[],searchList:[],searchValue:"",searchTotal:10,loading:!1,setTimeoutId:null,pageLimit:10,pageNumber:1}},computed:{noMore:function(){return!(!this.searchValue||this.loading)&&this.searchList.length>=this.searchTotal},disabled:function(){return this.loading||this.noMore}},mounted:function(){this.getFriends()},methods:{getFriends:function(){var t=this,e={"filter[type]":2,include:"fromUser,toUser.groups"};return this.$store.dispatch("jv/get",["follow",{params:e}]).then((function(data){t.friendsLoading=!1,t.friends=data.filter((function(t){return 1===t.is_mutual})),t.friends=t.friends.map((function(t){return t.fromUser}))}),(function(e){return t.handleError(e)}))},searchUser:function(t){var e=this;this.searchValue=t.target.value,this.pageNumber=1,this.searchList=[],this.setTimeoutId&&window.clearTimeout(this.setTimeoutId),this.searchValue&&(this.setTimeoutId=setTimeout((function(){e.loading=!0,e.getSearchList(),e.setTimeoutId=null}),300))},getSearchList:function(){var t=this,e={"filter[username]":"*".concat(this.searchValue,"*"),"filter[status]":"normal","page[limit]":this.pageLimit,"page[number]":this.pageNumber};this.$store.dispatch("jv/get",["users",{params:e}]).then((function(data){var e,meta=data._jv.json.meta;t.loading=!1,t.searchTotal=meta.total,data.length>0&&(e=t.searchList).push.apply(e,Object(r.a)(data))}),(function(e){return t.handleError(e)}))},load:function(){this.searchValue&&this.searchList.length>0&&(this.loading=!0,this.pageNumber+=1,this.getSearchList())},formatValue:function(){var t=Object(r.a)(this.selectedFriends);return t=t.map((function(t){return"".concat(t," ")}))," @".concat(t.join("@"))},selectFriendFromUl:function(t){this.selectedFriends.indexOf(t.username)<0&&this.selectedFriends.push(t.username),this.clear()},clear:function(){this.$refs.inputCaller.value="",this.searchValue="",this.searchList=[]}}},l=(n(823),n(11)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{attrs:{title:t.$t("post.callFriends"),overflow:"visible"},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"top"},[n("div",{staticClass:"container-selectedCaller"},t._l(t.selectedFriends,(function(e,r){return n("div",{key:r,staticClass:"selectedCaller"},[n("span",[t._v("@ "+t._s(e))]),t._v(" "),n("svg-icon",{staticStyle:{"font-size":"13px",cursor:"pointer",fill:"#6d6d6d","margin-left":"5px"},attrs:{type:"close"},on:{click:function(n){t.selectedFriends.splice(t.selectedFriends.indexOf(e),1)}}})],1)})),0),t._v(" "),n("div",{staticClass:"tip"},[t._v(t._s(t.$t("post.searchFriends")))]),t._v(" "),n("div",{staticClass:"container-search-list"},[n("label",[n("input",{ref:"inputCaller",staticClass:"input-caller",attrs:{placeholder:t.$t("post.pleaseInput"),type:"text"},on:{input:t.searchUser}})]),t._v(" "),n("div",{staticClass:"infinite-list-wrapper",staticStyle:{overflow:"auto"}},[n("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],attrs:{"infinite-scroll-disabled":"disabled"}},t._l(t.searchList,(function(e,r){return n("li",{key:r,class:{"infinite-list-item":!0,selected:t.selectedFriends.indexOf(e.username)>=0},on:{click:function(n){return t.selectFriendFromUl(e)}}},[t._v("\n            "+t._s(e.username)+"\n          ")])})),0),t._v(" "),t.loading?n("p",{staticClass:"loading-tip"},[t._v(t._s(t.$t("core.loading")))]):t._e(),t._v(" "),t.noMore?n("p",{staticClass:"loading-tip"},[t._v(t._s(t.$t("core.noMoreData")))]):t._e()])]),t._v(" "),n("div",{staticClass:"friends"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.myFriends")))]),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.friendsLoading,expression:"friendsLoading"}],staticClass:"container-caller"},t._l(t.friends,(function(e,r){return n("div",{key:r,class:{caller:!0,selected:t.selectedFriends.indexOf(e.username)>=0},on:{click:function(n){t.selectedFriends.indexOf(e.username)>=0?t.selectedFriends.splice(t.selectedFriends.indexOf(e.username),1):t.selectedFriends.push(e.username)}}},[n("avatar",{attrs:{user:e,size:"30",round:"","prevent-jump":""}}),t._v(" "),n("span",[t._v(t._s(e.username))])],1)})),0)])]),t._v(" "),n("div",{staticClass:"bottom"},[n("div",{staticClass:"container"},[n("span",{staticClass:"text"},[t._v(t._s(t.$t("post.chosen")+" "+t.selectedFriends.length+" "+t.$t("topic.personUnit")))]),t._v(" "),n("el-button",{attrs:{disabled:0===t.selectedFriends.length,size:"medium",type:"primary"},on:{click:function(e){t.$emit("selectedCaller",t.formatValue())}}},[t._v(t._s(t.$t("post.confirmChoice")))])],1)])])}),[],!1,null,"ff04057e",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,Avatar:n(255).default,MessageBox:n(719).default})},787:function(t,e,n){"use strict";n.r(e);var r=n(85),o=n(714),c={name:"TopicList",mixins:[n.n(o).a],data:function(){return{searchValue:"",searchList:[],searchTotal:0,pageNumber:1,pageLimit:5,setTimeoutId:null,loading:!1}},computed:{noMore:function(){return!this.loading&&this.searchList.length>=this.searchTotal},disabled:function(){return this.loading||this.noMore}},mounted:function(){this.getTopics()},methods:{searchTopics:function(t){var e=this;this.setTimeoutId&&window.clearTimeout(this.setTimeoutId),this.searchValue=t.target.value,this.pageNumber=1,this.searchList=[],this.setTimeoutId=setTimeout((function(){e.loading=!0,e.getTopics(),e.setTimeoutId=null}),300)},getTopics:function(){var t=this,e={"page[limit]":this.pageLimit,"page[number]":this.pageNumber,sort:"recommended"};return this.searchValue&&(e["filter[content]"]=this.searchValue),this.searchValue||(e["filter[recommended]"]=1),this.$store.dispatch("jv/get",["topics",{params:e}]).then((function(data){var e,meta=data._jv.json.meta;t.loading=!1,t.searchTotal=meta.total,data.length>0&&(e=t.searchList).push.apply(e,Object(r.a)(data))}),(function(e){return t.handleError(e)}))},load:function(){this.searchList.length>0&&(this.loading=!0,this.pageNumber+=1,this.getTopics())},emitValue:function(t){this.$emit("selectedTopic"," #".concat(t,"# ")),this.searchValue="",this.searchList=[],this.getTopics()}}},l=(n(821),n(11)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container-search-list",on:{click:function(t){return t.stopPropagation(),function(){}.apply(null,arguments)}}},[n("label",{on:{click:function(t){return t.target!==t.currentTarget?null:function(){}.apply(null,arguments)}}},[n("input",{staticClass:"input-topic",attrs:{type:"text",placeholder:t.$t("post.topicInputTip")},domProps:{value:t.searchValue},on:{input:t.searchTopics,click:function(t){return t.target!==t.currentTarget?null:function(){}.apply(null,arguments)}}})]),t._v(" "),n("div",{staticClass:"infinite-list-wrapper",staticStyle:{overflow:"auto"}},[n("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],attrs:{"infinite-scroll-disabled":"disabled"}},[t.searchValue&&t.searchList.map((function(t){return t.content})).indexOf(t.searchValue)<0&&!t.loading?n("li",{on:{click:function(e){return t.emitValue(t.searchValue)}}},[n("span",[t._v("#"+t._s(t.searchValue)+"#")]),t._v(" "),n("span",[t._v(t._s(t.$t("topic.newTopic")))])]):t._e(),t._v(" "),t._l(t.searchList,(function(e,r){return n("li",{key:r,staticClass:"infinite-list-item",on:{click:function(n){return t.emitValue(e.content)}}},[n("span",[t._v("#"+t._s(e.content)+"#")]),t._v(" "),n("svg-icon",{directives:[{name:"show",rawName:"v-show",value:1===e.recommended,expression:"topic.recommended === 1"}],staticStyle:{"font-size":"16px"},attrs:{type:"recommend"}}),t._v(" "),n("span",[t._v(t._s(e.view_count+t.$t("topic.hot")))])],1)}))],2),t._v(" "),t.loading?n("p",{staticClass:"loading-tip"},[t._v(t._s(t.$t("core.loading")))]):t._e()])])}),[],!1,null,"3b40be94",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},788:function(t,e,n){"use strict";n.r(e);var r={name:"EmojiList",data:function(){return{emojiList:[]}},mounted:function(){this.getEmojiList()},methods:{getEmojiList:function(){var t=this;this.$store.dispatch("jv/get",["emoji",{}]).then((function(data){t.emojiList=data}))}}},o=(n(822),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"emoji-list"},t._l(t.emojiList,(function(e,r){return n("span",{key:r,on:{click:function(n){return t.$emit("selectEmoji",e.code)}}},[n("img",{attrs:{src:e.url,alt:e.code}})])})),0)}),[],!1,null,"22862d46",null);e.default=component.exports},792:function(t,e,n){"use strict";n(740)},796:function(t,e,n){"use strict";n.r(e);n(254),n(45),n(63),n(256),n(35);var r=n(714),o={name:"Editor",mixins:[n.n(r).a],props:{type:{type:String,default:""},post:{type:Object,default:function(){}},redpacket:{type:Object,default:function(){}},onSave:{type:Boolean,default:!1},payment:{type:Object,default:function(){}},question:{type:Object,default:function(){}},product:{type:Object,default:function(){}},typeInformation:{type:Object,default:function(){}},editResourceShow:{type:Object,default:function(){}},isEdit:{type:Boolean,default:!1},isDraft:{type:Boolean,default:!1},onPublish:{type:Boolean,default:!1},editorStyle:{type:String,default:"post"},selector:{type:String,default:"editor"},limitImgNumber:{type:Number,default:9}},data:function(){return{input:{},vditor:{},selectionStart:0,selectionEnd:0,showEmoji:!1,showCaller:!1,showTopic:!1,showUploadImg:!1,showUploadVideo:!1,showUploadAttached:!1,onUploadImage:!1,onUploadVideo:!1,onUploadAttached:!1,listenerList:["emoji-list","topic-list"],actions:[{icon:"emoji",toggle:"showEmoji",show:!1},{icon:"call",toggle:"showCaller",show:!1},{icon:"topic",toggle:"showTopic",show:!1}],resources:[{icon:"picture",toggle:"showUploadImg",show:!1},{icon:"video",toggle:"showUploadVideo",show:!1}]}},computed:{userId:function(){return this.$store.state.session.userId},url:function(){return"/api"},header:function(){var t=window.localStorage.getItem("access_token");return{authorization:"Bearer ".concat(t)}},textarea:function(){return document.querySelector(".".concat(this.selector," #textarea"))},forums:function(){return this.$store.state.site.info.attributes||{}},canCreateThreadPaid:function(){return!(!this.forums||!this.forums.other)&&this.forums.other.can_create_thread_paid},canUploadAttachments:function(){return!(!this.forums||!this.forums.other)&&this.forums.other.can_upload_attachments},canCreateThreadRedPacket:function(){return!(!this.forums||!this.forums.other)&&this.forums.other.can_create_thread_red_packet},canCreateThreadLongRedPacket:function(){return!(!this.forums||!this.forums.other)&&this.forums.other.can_create_thread_long_red_packet},showRedPackage:function(){return"0"===this.type&&this.canCreateThreadRedPacket||"1"===this.type&&this.canCreateThreadLongRedPacket},canPublishAnonymous:function(){var t=!1;if(this.forums&&this.forums.other)switch(this.type){case"0":t=this.forums.other.can_create_thread_anonymous;break;case"1":t=this.forums.other.can_create_thread_long_anonymous;break;case"2":t=this.forums.other.can_create_thread_video_anonymous;break;case"3":t=this.forums.other.can_create_thread_image_anonymous;break;case"4":t=this.forums.other.can_create_thread_audio_anonymous;break;case"5":t=this.forums.other.can_create_thread_question_anonymous;break;case"6":t=this.forums.other.can_create_thread_goods_anonymous}return t},attachedSizeLimit:function(){return this.forums.set_attach?1024*this.forums.set_attach.support_max_size*1024:10485760},imageTypeLimit:function(){return this.forums.set_attach?this.forums.set_attach.support_img_ext.split(",").map((function(t){return".".concat(t)})).join(","):""},attachedTypeLimit:function(){return this.forums.set_attach?this.forums.set_attach.support_file_ext.split(",").map((function(t){return".".concat(t)})).join(","):""},isPost:function(){return this.typeInformation&&1===this.typeInformation.type||!1},textLength:function(){if(this.post&&this.post.text){var t=this.post.text;return t.endsWith("\n")?t.length-1:t.length}return 0},attachmentsType:function(){return"chat"===this.editorStyle?4:this.typeInformation.type&&15===this.typeInformation.type?5:1}},watch:{editResourceShow:{handler:function(t){if(t)for(var e in t)this[e]=t[e]},deep:!0,immediate:!0},typeInformation:{handler:function(t){t&&(this.actions[0].show=t.showEmoji,this.actions[1].show=t.showCaller,this.actions[2].show=t.showTopic,this.resources[0].show=t.showImage,this.resources[1].show=t.showVideo)},deep:!0,immediate:!0},post:{handler:function(t){"chat"!==this.editorStyle||this.onUploadImage||0!==t.imageList.length||(this.showUploadImg=!1)},deep:!0,immediate:!0}},mounted:function(){this.textarea&&this.autoHeight(),this.emojiListener()},methods:{onRedPacketChange:function(t,e){var n=Object.assign({},this.redpacket);n[t]=+e,this.$emit("update:redpacket",n)},onPostContentChange:function(t,e){var n=Object.assign({},this.post);n[t]=e,this.$emit("update:post",n)},onPaymentChange:function(t,e){var n=Object.assign({},this.payment);n[t]=e,this.$emit("update:payment",n)},onQuestionChange:function(t,e){var n=Object.assign({},this.question);n[t]=e,this.$emit("update:question",n)},onProductChange:function(t){var e=Object.assign({},t);this.$emit("update:product",e)},autoHeight:function(){"chat"!==this.editorStyle&&(this.post.text.length>310&&(this.textarea.style.height="180px"),this.textarea.onkeyup=function(){var t=document.scrollingElement.scrollTop;this.style.height="auto",this.style.height="".concat(this.scrollHeight,"px"),document.scrollingElement.scrollTop=t})},getSelection:function(){this.selectionStart=this.textarea.selectionStart,this.selectionEnd=this.textarea.selectionEnd},emojiListener:function(){var t=this;document.addEventListener("click",(function(e){var n=!0;(e.path||e.composedPath&&e.composedPath()).forEach((function(t){t.classList&&(t.classList.contains("emoji-list")||t.classList.contains("topic-list")||t.classList.contains("editor-bar"))&&(n=!1)})),n&&(t.showTopic=!1,t.showEmoji=!1)}))},onActions:function(t){var e=this;this.hideActions(),setTimeout((function(){e[t]=!e[t]}))},addResource:function(t){if("chat"===this.editorStyle){if(this.onUploadImage||this.onUploadVideo)return this.$message.warning("请等待资源上传");this[t]=!this[t]}else this[t]=!0},selectActions:function(code){this.getSelection();var t=this.post.text.slice(0,this.selectionStart)+code+this.post.text.slice(this.selectionStart,this.post.text.length);this.onPostContentChange("text",t),this.hideActions()},hideActions:function(){this.showEmoji=!1,this.showTopic=!1,this.showCaller=!1},savePublish:function(){return this.onUploadAttached?this.$message.warning(this.$t("post.pleaseWaitForTheAttachedUploadToComplete")):this.onUploadImage?this.$message.warning(this.$t("post.pleaseWaitForTheImageUploadToComplete")):this.onUploadVideo?this.$message.warning(this.$t("post.pleaseWaitForTheVideoUploadToComplete")):void this.$emit("savePublish")},publish:function(){return this.onUploadAttached?this.$message.warning(this.$t("post.pleaseWaitForTheAttachedUploadToComplete")):this.onUploadImage?this.$message.warning(this.$t("post.pleaseWaitForTheImageUploadToComplete")):this.onUploadVideo?this.$message.warning(this.$t("post.pleaseWaitForTheVideoUploadToComplete")):(this.$emit("update:onPublish",!0),void this.$emit("publish"))}}},c=(n(808),n(11)),component=Object(c.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"editor"},[t.userId&&0===t.userId?n("div",{staticClass:"not-logged"},[n("span",[t._v(t._s(t.$t("post.publishAfterLogin")))])]):t._e(),t._v(" "),t.typeInformation&&t.typeInformation.showTitle?n("label",[n("input",{staticClass:"input-title",attrs:{placeholder:t.$t("post.pleaseInputPostTitle"),type:"text"},domProps:{value:t.post&&t.post.title},on:{input:function(e){return t.onPostContentChange("title",e.target.value)}}})]):t._e(),t._v(" "),t.typeInformation&&t.typeInformation.showPayment&&t.canCreateThreadPaid?n("editor-payment",{attrs:{payment:t.payment||{},type:t.typeInformation&&t.typeInformation.type,"can-upload-attachments":t.canUploadAttachments},on:{paymentChange:function(e){return t.onPaymentChange(e.key,e.value)}}}):t._e(),t._v(" "),t.typeInformation&&t.canPublishAnonymous&&5!==t.typeInformation.type?n("div",{staticClass:"post-anonymous"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.anonymous"))+"：")]),t._v(" "),n("el-switch",{attrs:{value:t.post.isAnonymous,"active-color":"#1878F3"},on:{input:function(e){return t.onPostContentChange("isAnonymous",e)}}})],1):t._e(),t._v(" "),t.showRedPackage?n("word-red-packet",{attrs:{redpacket:t.redpacket,"is-edit":t.isEdit},on:{changeRedType:function(e){return t.onRedPacketChange("is_red_packet",e)},changeRedRule:function(e){return t.onRedPacketChange("rule",e)},changeRedMoney:function(e){return t.onRedPacketChange("money",e)},changeRedNumber:function(e){return t.onRedPacketChange("number",e)},changeRedCondition:function(e){return t.onRedPacketChange("condition",e)},changeRedlikenum:function(e){return t.onRedPacketChange("likenum",e)}}}):t._e(),t._v(" "),t.typeInformation&&5===t.typeInformation.type?n("editor-qa",{attrs:{post:t.post,question:t.question,"can-publish-anonymous":t.canPublishAnonymous},on:{isAnonymousChange:function(e){return t.onPostContentChange("isAnonymous",e)},questionTypeChange:function(e){return t.onQuestionChange("questionType",e)},paymentTypeChange:function(e){return t.onQuestionChange("paymentType",e)},isOnlookerChange:function(e){return t.onQuestionChange("isOnlooker",e)},beUserChange:function(e){return t.onQuestionChange("beUser",e)},rewardPriceChange:function(e){return t.onQuestionChange("price",e)},rewardTimeChange:function(e){return t.onQuestionChange("expired_at",e)}}}):t._e(),t._v(" "),t.typeInformation&&6===t.typeInformation.type?n("editor-product",{attrs:{product:t.product},on:{productChange:t.onProductChange}}):t._e(),t._v(" "),t.isPost&&t.canUploadAttachments?n("attachment-upload",{attrs:{"file-list":t.post&&t.post.attachedList,"on-upload":t.onUploadAttached,action:"/attachments",accept:t.attachedTypeLimit,limit:99999,type:0,"size-limit":t.attachedSizeLimit},on:{"update:onUpload":function(e){t.onUploadAttached=e},"update:on-upload":function(e){t.onUploadAttached=e},success:function(e){return t.onPostContentChange("attachedList",e)},remove:function(e){return t.onPostContentChange("attachedList",e)}}}):t._e(),t._v(" "),t.isPost?n("Vditor",{attrs:{"text-limit":t.typeInformation&&t.typeInformation.textLimit,"text-length":t.textLength,placeholder:t.typeInformation&&t.typeInformation.placeholder,"image-accept":t.imageTypeLimit,text:t.post&&t.post.text,"show-caller":t.showCaller,"show-topic":t.showTopic,"show-emoji":t.showEmoji,"is-edit":t.isEdit,"is-draft":t.isDraft,"on-publish":t.onPublish,"attachment-size-limit":t.attachedSizeLimit,"on-upload-image":t.onUploadImage},on:{"update:onUploadImage":function(e){t.onUploadImage=e},"update:on-upload-image":function(e){t.onUploadImage=e},textChange:function(e){return t.onPostContentChange("text",e)},close:function(e){t.showCaller=!1},hideActions:t.hideActions,onActions:t.onActions,publish:t.publish,savePublish:t.savePublish}}):t._e(),t._v(" "),t.isPost?t._e():n("div",{class:["container-textarea",t.editorStyle]},["post"===t.editorStyle?n("editor-tool-bar",{attrs:{"text-limit":t.typeInformation&&t.typeInformation.textLimit,"text-length":t.post&&t.post.text&&t.post.text.length,actions:t.actions,"show-emoji":t.showEmoji,"show-topic":t.showTopic,"show-caller":t.showCaller,resources:t.resources,"on-publish":t.onPublish,"editor-style":t.editorStyle,"is-edit":t.isEdit,"on-save":t.onSave},on:{publish:t.publish,savePublish:t.savePublish,selectActions:t.selectActions,addResource:t.addResource,hidePop:t.hideActions,onActions:t.onActions}}):t._e(),t._v(" "),n("label",[n("textarea",{class:["input-text",t.editorStyle],attrs:{id:"textarea",placeholder:t.typeInformation?t.typeInformation.placeholder:"",maxlength:t.post&&t.post.textLimit},domProps:{value:t.post&&t.post.text},on:{input:function(e){return t.onPostContentChange("text",e.target.value)}}})]),t._v(" "),n("div",[t.showUploadImg||t.showUploadVideo?n("div",{staticClass:"resources-list"},[t.showUploadImg?n("image-upload",{attrs:{type:t.attachmentsType,"file-list":t.post&&t.post.imageList,"on-upload":t.onUploadImage,action:"/attachments",accept:t.imageTypeLimit,limit:t.limitImgNumber,"size-limit":t.attachedSizeLimit},on:{"update:onUpload":function(e){t.onUploadImage=e},"update:on-upload":function(e){t.onUploadImage=e},success:function(e){return t.onPostContentChange("imageList",e)},remove:function(e){return t.onPostContentChange("imageList",e)}}}):t._e(),t._v(" "),t.showUploadVideo?n("video-upload",{attrs:{"on-upload-video":t.onUploadVideo,"video-list":t.post&&t.post.videoList},on:{"update:onUploadVideo":function(e){t.onUploadVideo=e},"update:on-upload-video":function(e){t.onUploadVideo=e},videoChange:function(e){return t.onPostContentChange(e.key,e.value)}}}):t._e()],1):t._e(),t._v(" "),"post"!==t.editorStyle?n("editor-tool-bar",{attrs:{"text-limit":t.typeInformation&&t.typeInformation.textLimit||450,"text-length":t.post&&t.post.text&&t.post.text.length||0,actions:t.actions,"show-emoji":t.showEmoji,"show-topic":t.showTopic,"show-caller":t.showCaller,resources:t.resources,"on-publish":t.onPublish,"editor-style":t.editorStyle,"is-edit":t.isEdit,"on-save":t.onSave},on:{publish:t.publish,savePublish:t.savePublish,selectActions:t.selectActions,addResource:t.addResource,hidePop:t.hideActions,onActions:t.onActions}}):t._e()],1)],1),t._v(" "),t.showCaller&&!t.isPost?n("caller",{on:{close:function(e){t.showCaller=!1},selectedCaller:t.selectActions}}):t._e()],1)}),[],!1,null,"4fb537a7",null);e.default=component.exports;installComponents(component,{EditorPayment:n(854).default,WordRedPacket:n(855).default,EditorQa:n(856).default,EditorProduct:n(857).default,AttachmentUpload:n(865).default,Vditor:n(852).default,EditorToolBar:n(858).default,ImageUpload:n(866).default,VideoUpload:n(859).default,Caller:n(786).default})},800:function(t,e){t.exports={name:"isLogin",methods:{isLogin:function(){if(!this.$store.state.user.info.id){this.$message.error(this.$t("user.pleaseLogin"));var t=this.$route.fullPath;return this.forums&&this.forums.set_reg&&0===this.forums.set_reg.register_type?this.$router.push("/user/login?preurl=".concat(t)):this.forums&&this.forums.set_reg&&1===this.forums.set_reg.register_type?this.$router.push("/user/phone-login-register?preurl=".concat(t)):this.forums&&this.forums.set_reg&&2===this.forums.set_reg.register_type?this.forums&&this.forums.passport&&this.forums.passport.oplatform_close&&this.forums.passport.offiaccount_close?this.$router.push("/user/wechat?preurl=".concat(t)):this.forums&&this.forums.qcloud&&this.forums.qcloud.qcloud_sms?this.$router.push("/user/phone-login-register?preurl=".concat(t)):this.$router.push("/user/login?preurl=".concat(t)):this.$router.push("/user/login?preurl=".concat(t)),!1}return!0}}}},807:function(t,e,n){},808:function(t,e,n){"use strict";n(762)},809:function(t,e,n){"use strict";n(763)},810:function(t,e,n){"use strict";n(764)},811:function(t,e,n){"use strict";n(765)},812:function(t,e,n){"use strict";n(766)},813:function(t,e,n){"use strict";n(767)},814:function(t,e,n){"use strict";n(768)},815:function(t,e,n){"use strict";n(769)},816:function(t,e,n){t.exports={methods:{handleAttachmentError:function(t){if(t&&t.message){var e=t.message.errors,n=e[0].detail?e[0].detail[0]:e[0].code,r=e[0].detail?e[0].detail[0]:this.$t("core.".concat(n));this.$message.error(r)}else this.$message.error(this.$t("post.imageUploadFail"))}}}},817:function(t,e,n){var r=n(794);n(45),n(25),n(13),n(108),n(36),n(32),t.exports={watch:{fileList:{handler:function(){var t;this.fileList.length>this.previewFiles.length&&0===this.previewFiles.length&&((t=this.previewFiles).push.apply(t,r(this.fileList)),this.previewFiles.map((function(t){t.progress=100})))},deep:!0,immediate:!0}},methods:{uploaderFile:function(t){t.dispatchEvent(new MouseEvent("click"))},onInput:function(t){var e=this,n=t.target.files,r=[];if(this.onUpload)return this.$message.warning(0===this.type?"请等待上传中的文件完成上传":"请等待上传中的图片完成上传");if(this.checkSizeLimit(n)&&this.checkLengthLimit(n)){for(var i=0;i<n.length;i++){var o=this.getObjectURL(n[i]);this.previewFiles.push({name:n[i].name,url:o,progress:0,deleted:!1,size:n[i].size}),r.push(n[i])}var c=r.reduce((function(t,n,r,o){return t.push(e.uploadFile(n,r,o.length)),t}),[]);this.uploadFiles(c)}},uploadFile:function(t,e,n){var r=this,o={onUploadProgress:function(t){t.lengthComputable?r.previewFiles[r.previewFiles.length-n+e].progress=.9*parseInt(Math.round(t.loaded/t.total*100).toString()):r.previewFiles[r.previewFiles.length-n+e].progress=100}},c=new FormData;return c.append("type",this.type),c.append("file",t),this.service.post(this.action,c,o)},uploadFiles:function(t){var e=this;this.$emit("update:onUpload",!0),Promise.all(t).then((function(t){e.previewFiles.map((function(t){t.progress=100}));var n=t.map((function(t){return t.data.data})),o=r(e.fileList);n.forEach((function(t){return o.push({id:t.id,name:t.attributes.fileName,url:t.attributes.url})})),e.currentInput.value="",e.$emit("success",o),e.$emit("update:onUpload",!1)}),(function(n){e.currentInput.value="";var r=t.length;e.$emit("update:onUpload",!1),e.previewFiles.splice(e.previewFiles.length-r,r),401===n.response.status?e.$message.error("暂无权限，请联系管理员"):e.$message.error("您的腾讯云对象存储服务当前不可用，请检查相关配置")}))},removeItem:function(t){var e=this;this.$confirm(this.$t("topic.confirmDelete"),this.$t("discuzq.msgBox.title"),{confirmButtonText:this.$t("discuzq.msgBox.confirm"),cancelButtonText:this.$t("discuzq.msgBox.cancel"),type:"warning"}).then((function(){e.previewFiles[t].deleted=!0;var n=r(e.fileList);n.splice(t,1),e.$emit("remove",n,t),setTimeout((function(){e.previewFiles.splice(t,1),e.$message.success("删除成功")}),900)}),(function(){}))},checkSizeLimit:function(t){for(var e=!0,i=0;i<t.length;i++)t[i].size>this.sizeLimit&&(e=!1);return e||this.$message.error(0===this.type?"文件大小不可超过 ".concat(this.sizeLimit/1024/1024," MB"):"图片大小不可超过 ".concat(this.sizeLimit/1024/1024," MB")),e},checkLengthLimit:function(t){return!(this.previewFiles.length+t.length>this.limit)||(this.$message.warning(0===this.type?"文件最多上传".concat(this.limit,"张"):"图片最多上传".concat(this.limit,"张")),this.$emit("exceed",t),!1)},getObjectURL:function(t){var e=null;return window.createObjectURL?e=window.createObjectURL(t):window.URL?e=window.URL.createObjectURL(t):window.webkitURL&&(e=window.webkitURL.createObjectURL(t)),e}}}},818:function(t,e,n){},820:function(t,e,n){"use strict";n(770)},821:function(t,e,n){"use strict";n(771)},822:function(t,e,n){"use strict";n(772)},823:function(t,e,n){"use strict";n(773)},824:function(t,e,n){"use strict";n(774)},825:function(t,e,n){"use strict";n(775)},826:function(t,e,n){},848:function(t,e,n){"use strict";n(780)},852:function(t,e,n){"use strict";n.r(e);n(254),n(13),n(36),n(32),n(45);var r=n(33),o=n(714),c=n.n(o),l=n(819),d={name:"Vditor",mixins:[c.a],props:{showCaller:{type:Boolean,default:!1},showTopic:{type:Boolean,default:!1},showEmoji:{type:Boolean,default:!1},text:{type:String,default:""},textLimit:{type:[Number,String],default:49999},textLength:{type:[Number,String],default:0},isEdit:{type:Boolean,default:!1},isDraft:{type:Boolean,default:!1},attachmentSizeLimit:{type:Number,default:1e21},imageAccept:{type:String,default:""},onUploadImage:{type:Boolean,default:!1},placeholder:{type:String,default:""},onPublish:{type:Boolean,default:!1}},data:function(){return{vditor:{},input:{},range:[],afterVditorInit:!1}},watch:{isDraft:{handler:function(t){t&&this.text&&this.setDefaultValue()},immediate:!0},isEdit:{handler:function(t){t&&this.text&&this.setDefaultValue()},immediate:!0}},mounted:function(){l&&this.initVditor()},methods:{initVditor:function(){var t=this;this.vditor=new l("vditor",{minHeight:450,placeholder:this.placeholder,mode:"wysiwyg",tab:"    ",input:function(e){t.$emit("textChange",e)},toolbar:[{hotkey:"",name:"@",tipPosition:"ne",tip:"@ 好友",className:"right",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="19.816" height="19.816" viewBox="0 0 19.816 19.816">\n   <path id="路径_965" data-name="路径 965" d="M67.565,65.963c0,6.137,4.261,9.862,10.128,9.862a14.524,14.524,0,0,0,4.032-.512c.66-.2.87-.54.87-.884a.611.611,0,0,0-.64-.606,1.994,1.994,0,0,0-.449.065A13.894,13.894,0,0,1,78,74.353c-5.236,0-8.79-3.073-8.79-8.334,0-5.038,3.363-8.549,8.427-8.549,4.481,0,8.227,2.691,8.227,7.525,0,2.821-.984,4.721-2.551,4.721a1.489,1.489,0,0,1-1.653-1.611V61.792a.727.727,0,0,0-.764-.811.741.741,0,0,0-.784.811v1.061h-.086a3.258,3.258,0,0,0-3.1-1.871c-2.474,0-4.214,2.058-4.214,5.009,0,2.98,1.729,5.057,4.252,5.057a3.3,3.3,0,0,0,3.172-2.1h.086a2.6,2.6,0,0,0,2.838,2.114c2.666,0,4.319-2.551,4.319-6.127,0-5.411-4.09-8.921-9.727-8.921-5.933,0-10.089,3.957-10.089,9.955Zm9.66,3.613c-1.72,0-2.8-1.387-2.8-3.595,0-2.169,1.089-3.557,2.809-3.557,1.748,0,2.857,1.36,2.857,3.52,0,2.207-1.128,3.632-2.866,3.632Z" transform="translate(-67.565 -56.008)" fill="#777"/>\n</svg>',click:function(){t.range=getSelection().getRangeAt(0),t.$emit("onActions","showCaller")}},{hotkey:"",name:"#",tipPosition:"ne",tip:"新增话题",className:"right",icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1598001954510" class="icon" viewBox="0 0 1040 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5506" xmlns:xlink="http://www.w3.org/1999/xlink" width="203.125" height="200"><defs><style type="text/css"></style></defs><path d="M947.393251 679.125345 674.853042 679.125345l143.716192-556.918026c3.51915-13.677511-4.727675-27.656897-18.411325-31.184233-13.644765-3.545756-27.646664 4.678556-31.214932 18.386766L721.04713 295.052946 364.271424 295.052946l44.60694-172.84051c3.527336-13.675464-4.727675-27.646664-18.402115-31.174-13.661138-3.553942-27.65485 4.678556-31.208792 18.378579l-47.900963 185.645141L76.8022 295.062156c-14.114462 0-25.594935 11.480472-25.594935 25.603121 0 14.155395 11.488659 25.596981 25.594935 25.596981L298.143331 346.262258l-85.904509 332.872297L25.611308 679.134555c-14.130835 0-25.611308 11.480472-25.611308 25.603121 0 14.155395 11.488659 25.596981 25.611308 25.596981l173.439144 0-44.60694 172.830277c-3.527336 13.691837 4.694929 27.65485 18.394952 31.214932 2.156106 0.551562 4.304026 0.791016 6.402827 0.791016 11.408841 0 21.828145-7.656377 24.805966-19.199271l147.026588-569.732889 356.768543 0L621.937878 679.117159 384.087749 679.117159c-14.155395 0-25.596981 11.480472-25.596981 25.594935 0 14.163581 11.441587 25.605168 25.596981 25.605168l224.645386 0-44.604894 172.830277c-3.521197 13.691837 4.733814 27.65485 18.409279 31.216979 2.156106 0.541329 4.312212 0.788969 6.427386 0.788969 11.376095 0 21.779026-7.656377 24.781406-19.199271l47.900963-185.645141 285.769512 0c14.155395 0 25.594935-11.449773 25.594935-25.596981 0-14.130835-11.455913-25.611308-25.611308-25.611308L947.393251 679.125345zM998.617913 295.052946 896.193149 295.052946c-14.155395 0-25.594935 11.480472-25.594935 25.594935 0 14.155395 11.43954 25.596981 25.594935 25.596981l102.424764 0c14.153348 0 25.594935-11.441587 25.594935-25.596981C1024.212848 306.517045 1012.771261 295.052946 998.617913 295.052946L998.617913 295.052946zM998.617913 295.052946" p-id="5507" fill="#333" ></path></svg>',click:function(){t.range=getSelection().getRangeAt(0),t.$emit("onActions","showTopic")}},{hotkey:"",name:"my-emoji",tipPosition:"ne",tip:"插入表情",className:"right",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="19.819" height="19.816" viewBox="0 0 19.819 19.816">\n  <path id="路径_964" data-name="路径 964" d="M9.909,19.816A9.908,9.908,0,0,1,2.9,2.9,9.91,9.91,0,0,1,16.92,16.914a9.855,9.855,0,0,1-7.011,2.9Zm0-18.525A8.618,8.618,0,0,0,3.815,16,8.62,8.62,0,0,0,16.007,3.814a8.566,8.566,0,0,0-6.1-2.523ZM6.389,12.612a4.334,4.334,0,0,0,3.52,1.856,5.563,5.563,0,0,0,3.906-1.856.873.873,0,0,1,.876.928,5.954,5.954,0,0,1-4.782,2.165A4.649,4.649,0,0,1,5.586,13.54s-.032-.928.8-.928Zm.64-5.89A1.213,1.213,0,1,0,8.243,7.936,1.215,1.215,0,0,0,7.029,6.722Zm6.219,0a1.213,1.213,0,1,0,1.214,1.214,1.214,1.214,0,0,0-1.214-1.214Z" transform="translate(0)" fill="#777"/>\n</svg>',click:function(){t.range=getSelection().getRangeAt(0),t.$emit("onActions","showEmoji")}},"headings","bold","italic","strike","link","list","ordered-list","check","outdent","indent","quote",{hotkey:"",name:"picture",tipPosition:"ne",tip:"插入图片",className:"right",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="19.816" height="19.816" viewBox="0 0 19.816 19.816">\n  <path id="路径_1180" data-name="路径 1180" d="M120.154,104.877a2.477,2.477,0,1,0,2.477,2.477,2.484,2.484,0,0,0-2.477-2.477Zm0,3.716a1.239,1.239,0,1,1,1.239-1.239A1.242,1.242,0,0,1,120.154,108.593Zm12.385-6.193H117.677a2.484,2.484,0,0,0-2.477,2.477v14.862a2.484,2.484,0,0,0,2.477,2.477h14.862a2.484,2.484,0,0,0,2.477-2.477V104.877A2.484,2.484,0,0,0,132.539,102.4Zm-14.862,18.578a1.242,1.242,0,0,1-1.238-1.238v-.557l4.892-4.4,6.254,6.193Zm16.1-1.238a1.242,1.242,0,0,1-1.239,1.238h-3.22l-4.521-4.644,5.264-5.264,3.716,3.716Zm0-6.75-3.716-3.777-6.131,6.254-2.539-2.539-4.954,4.521V104.877a1.242,1.242,0,0,1,1.238-1.238h14.862a1.242,1.242,0,0,1,1.239,1.238Z" transform="translate(-115.2 -102.4)" fill="#777"/>\n</svg>\n',click:function(){t.uploader()}},"line","code","inline-code","table","both","br","undo","redo"],toolbarConfig:{pin:!0},cache:{enable:!1},after:function(){t.afterVditorInit=!0}})},uploader:function(){var t=this;if(this.onUploadImage)return this.$message.warning("请等待上传中的图片完成上传");this.input=document.createElement("input"),this.input.type="file",this.input.multiple=!0,this.input.accept=this.imageAccept,this.input.dispatchEvent(new MouseEvent("click")),this.input.oninput=function(e){var n=e.target.files,r=[];if(t.checkSizeLimit(n)){for(var i=0;i<n.length;i++)r.push(n[i]);var o=r.reduce((function(e,n){return e.push(t.uploadFile(n)),e}),[]);t.uploadFiles(o)}}},uploadFile:function(t){var e=new FormData;return e.append("type",1),e.append("file",t),r.a.post("/attachments",e)},uploadFiles:function(t){var e=this;this.$emit("update:onUploadImage",!0),Promise.all(t).then((function(t){t.map((function(t){return t.data.data})).forEach((function(t){var n=encodeURIComponent(t.attributes.fileName),html='<img src="'.concat(t.attributes.url,'" alt="').concat(n,'" title="').concat(t.id,'">'),r=e.vditor.html2md(html);e.vditor.insertValue(r.substr(0,r.length-1))})),e.input.value=""}),(function(t){e.input.value="",e.handleError(t).then((function(){}))})).finally((function(){e.$emit("update:onUploadImage",!1)}))},selectActions:function(code){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.range),this.vditor.insertValue(code),this.$emit("hideActions")},checkSizeLimit:function(t){for(var e=!0,i=0;i<t.length;i++)t[i].size>this.attachmentSizeLimit&&(e=!1);return e||this.$message.error("图片大小不可超过 ".concat(this.attachmentSizeLimit/1024/1024," MB")),e},publish:function(){var t=this.vditor.getValue();this.$emit("textChange",t),this.$emit("publish")},savePublish:function(){this.$emit("savePublish")},setDefaultValue:function(){this.afterVditorInit?this.vditor.setValue(this.text,!1):setTimeout(this.setDefaultValue,100)}}},h=(n(820),n(11)),component=Object(h.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.onUploadImage,expression:"onUploadImage"}],staticClass:"vditor-container",attrs:{"element-loading-background":"hsla(0,0%,100%,0.6)"}},[n("div",{staticClass:"sticky-box"},[n("topic-list",{directives:[{name:"show",rawName:"v-show",value:t.showTopic,expression:"showTopic"}],staticClass:"action-vditor",on:{selectedTopic:t.selectActions}}),t._v(" "),n("emoji-list",{directives:[{name:"show",rawName:"v-show",value:t.showEmoji,expression:"showEmoji"}],staticClass:"action-vditor",on:{selectEmoji:t.selectActions}})],1),t._v(" "),n("div",{attrs:{id:"vditor"}}),t._v(" "),t.textLimit?n("span",{staticClass:"tip"},[t._v(t._s(t.textLimit>=t.textLength?t.$t("post.note",{num:t.textLimit-t.textLength}):t.$t("post.exceed",{num:t.textLength-t.textLimit})))]):t._e(),t._v(" "),t.showCaller?n("caller",{on:{close:function(e){return t.$emit("close")},selectedCaller:t.selectActions}}):t._e(),t._v(" "),n("div",{staticClass:"publish-container"},[n("el-button",{staticClass:"btn",attrs:{loading:t.onPublish,type:"primary",size:"small"},on:{click:t.publish}},[t._v(t._s(t.$t("post.post")))]),t._v(" "),n("el-button",{staticClass:"btn",attrs:{disabled:t.isEdit,type:"primary",size:"small"},on:{click:t.savePublish}},[t._v("保存至草稿箱")])],1)],1)}),[],!1,null,"1c328912",null);e.default=component.exports;installComponents(component,{TopicList:n(787).default,EmojiList:n(788).default,Caller:n(786).default})},854:function(t,e,n){"use strict";n.r(e);n(254);var r=n(789),o={name:"EditorPayment",props:{payment:{type:Object,default:function(){}},type:{type:Number,default:0},canUploadAttachments:{type:Boolean,default:!1}},data:function(){return{freeWords:0,price:0,attachmentPrice:0,options:[{value:"free",label:this.$t("post.freeWatch")},{value:"paid",label:this.$t("post.paidWatch")}],freeWordsOptions:[{value:0,label:"0%"},{value:.1,label:"10%"},{value:.3,label:"30%"},{value:.5,label:"50%"},{value:.7,label:"70%"},{value:1,label:"100%"}]}},watch:{payment:{handler:function(t){this.freeWords=t.freeWords||0,this.price=t.price||0,this.attachmentPrice=t.attachmentPrice||0},immediate:!0,deep:!0},type:{handler:function(t){1===t&&this.canUploadAttachments&&this.options.push({value:"attachmentPaid",label:this.$t("post.postFreeAttachmentPaid")})},immediate:!0}},methods:{onPriceInput:function(t){this.price=Object(r.a)(t)},onAttachmentPriceInput:function(t){this.attachmentPrice=Object(r.a)(t)}}},c=(n(809),n(11)),component=Object(c.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"global"},[n("div",{staticClass:"block"},[n("div",{staticClass:"text"},[t._v(t._s(t.$t("post.isPay"))+":")]),t._v(" "),n("el-select",{attrs:{size:"medium",value:t.payment.paidType,placeholder:"请选择","popper-append-to-body":!1,"popper-class":"selectinfo"},on:{change:function(e){return t.$emit("paymentChange",{key:"paidType",value:e})}}},t._l(t.options,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),n("div",{staticClass:"block"},[n("div",{directives:[{name:"show",rawName:"v-show",value:"paid"===t.payment.paidType,expression:"payment.paidType === 'paid'"}]},[n("div",{staticClass:"text"},[t._v(t._s(t.$t("post.paymentAmount"))+":")]),t._v(" "),n("el-input",{attrs:{size:"medium",placeholder:"0",maxlength:"7"},on:{change:function(e){t.$emit("paymentChange",{key:"price",value:parseFloat(t.price)})},input:t.onPriceInput},model:{value:t.price,callback:function(e){t.price=e},expression:"price"}},[n("span",{staticClass:"prefix",attrs:{slot:"prefix"},slot:"prefix"},[t._v("￥")])])],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"attachmentPaid"===t.payment.paidType&&1===t.type,expression:"payment.paidType === 'attachmentPaid' && type === 1"}]},[n("div",{staticClass:"text"},[t._v(t._s(t.$t("post.paymentAmount"))+":")]),t._v(" "),n("el-input",{attrs:{size:"medium",placeholder:"0",maxlength:"7"},on:{change:function(e){t.$emit("paymentChange",{key:"attachmentPrice",value:parseFloat(t.attachmentPrice)})},input:t.onAttachmentPriceInput},model:{value:t.attachmentPrice,callback:function(e){t.attachmentPrice=e},expression:"attachmentPrice"}},[n("span",{staticClass:"prefix",attrs:{slot:"prefix"},slot:"prefix"},[t._v("￥")])])],1)]),t._v(" "),n("div",{staticClass:"block"},[n("div",{directives:[{name:"show",rawName:"v-show",value:"paid"===t.payment.paidType&&1===t.type,expression:"payment.paidType === 'paid' && type === 1"}]},[n("div",{staticClass:"text"},[t._v(t._s(t.$t("post.freeWord"))+":")]),t._v(" "),n("el-select",{attrs:{size:"medium",value:t.freeWords,"popper-append-to-body":!1,"popper-class":"selectinfo"},on:{change:function(e){return t.$emit("paymentChange",{key:"freeWords",value:e})}}},t._l(t.freeWordsOptions,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)])])}),[],!1,null,"6ae884ec",null);e.default=component.exports},855:function(t,e,n){"use strict";n.r(e);var r={name:"WordRedPacket",props:{redpacket:{type:Object,default:function(){}},isEdit:{type:Boolean,default:!1}},data:function(){return{showRedPacketBox:!1}},methods:{handleRedMoney:function(t){if(/^(([1-9][0-9]*)|[0])(\.\d{1,2})?$/.test(t)&&t>=.01&&t<=200)return this.$emit("changeRedMoney",t);this.$emit("changeRedMoney",0)},handleRedNumber:function(t){if(/^([1-9][0-9]*)$/.test(t)&&t<=100)return this.$emit("changeRedNumber",t);this.$emit("changeRedNumber",0)},handleRedlikenum:function(t){if(/^([1-9][0-9]*)$/.test(t)&&t<=250)return this.$emit("changeRedlikenum",t);this.$emit("changeRedlikenum",0)},openRedPacket:function(){this.showRedPacketBox=!0},closeRedPacket:function(){this.showRedPacketBox=!1},selectRedPacket:function(){return this.$emit("changeRedType",1),0==+this.redpacket.money?(this.$message.warning("请确认红包金额，0.01 ~ 200 元！"),this.$emit("changeRedType",0)):0==+this.redpacket.number?(this.$message.warning("请确认红包个数，1 ~ 100 个！"),this.$emit("changeRedType",0)):1===this.redpacket.condition&&0==+this.redpacket.likenum?(this.$message.warning("请确认集赞数，1 ~ 250 个！"),this.$emit("changeRedType",0)):1===this.redpacket.rule&&this.redpacket.money<.01*this.redpacket.number?(this.$message.warning("请匹配合理的红包金额与个数！"),this.$emit("changeRedType",0)):void(this.showRedPacketBox=!1)},cancelRedPacket:function(){this.$emit("changeRedType",0),this.showRedPacketBox=!1}}},o=(n(810),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"word-pay"},[t.isEdit?t._e():n("div",{staticClass:"open-box-btn"},[n("div",{staticClass:"open-title"},[t._v("发布红包：")]),t._v(" "),n("div",{staticClass:"open-btn",on:{click:t.openRedPacket}},[t._v("\n      "+t._s(0===t.redpacket.is_red_packet?"+ 添加红包":" 修改红包")+"\n    ")])]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1===t.redpacket.is_red_packet,expression:"redpacket.is_red_packet === 1"}],staticClass:"red-desc"},[n("span",{staticClass:"desc-title"},[t._v("发放规则：")]),t._v(" "),n("span",{staticClass:"desc-value"},[t._v("\n      "+t._s(0===t.redpacket.rule?"定额":"随机")+"\n    ")]),t._v(" "),n("span",{staticClass:"desc-title"},[t._v("红包总金额：")]),t._v(" "),0===t.redpacket.rule?n("span",{staticClass:"desc-value"},[t._v("\n      "+t._s((t.redpacket.money*t.redpacket.number).toFixed(2))+"元\n    ")]):n("span",{staticClass:"desc-value"},[t._v("\n      "+t._s(t.redpacket.money)+"元\n    ")]),t._v(" "),n("span",{staticClass:"desc-title"},[t._v("红包个数：")]),t._v(" "),n("span",{staticClass:"desc-value"},[t._v("\n      "+t._s(t.redpacket.number)+"个\n    ")]),t._v(" "),n("span",{staticClass:"desc-title"},[t._v("获得条件：")]),t._v(" "),n("span",{staticClass:"desc-value"},[t._v("\n      "+t._s(0===t.redpacket.condition?"回复领取":"集赞"+t.redpacket.likenum+"个领取")+"\n    ")])]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showRedPacketBox&&!t.isEdit,expression:"showRedPacketBox && !isEdit"}],staticClass:"redpacket-box"},[n("div",{staticClass:"redpacket-content"},[n("div",{staticClass:"redpacket-head"},[t._v("\n        "+t._s(0===t.redpacket.is_red_packet?"添加红包":" 修改红包")+"\n        "),n("svg-icon",{attrs:{type:"close"},on:{click:t.closeRedPacket}})],1),t._v(" "),n("div",{staticClass:"word-pay-item"},[n("div",{staticClass:"word-pay-title"},[t._v("发放模式：")]),t._v(" "),n("el-radio",{attrs:{label:1},on:{change:function(e){return t.$emit("changeRedRule",e)}},model:{value:t.redpacket.rule,callback:function(e){t.$set(t.redpacket,"rule",e)},expression:"redpacket.rule"}},[t._v("随机")]),t._v(" "),n("el-radio",{attrs:{label:0},on:{change:function(e){return t.$emit("changeRedRule",e)}},model:{value:t.redpacket.rule,callback:function(e){t.$set(t.redpacket,"rule",e)},expression:"redpacket.rule"}},[t._v("定额")])],1),t._v(" "),n("div",{staticClass:"word-pay-item"},[n("div",{staticClass:"word-pay-title"},[t._v("\n          "+t._s(1===t.redpacket.rule?"红包总金额：":"单个红包金额：")+"\n        ")]),t._v(" "),n("el-input",{attrs:{type:"number",placeholder:"请输入红包金额"},on:{change:t.handleRedMoney},model:{value:t.redpacket.money,callback:function(e){t.$set(t.redpacket,"money",e)},expression:"redpacket.money"}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===t.redpacket.money,expression:"redpacket.money === 0"}],staticClass:"tip"},[t._v("\n          可输入红包金额范围 0.01 ~ 200 元\n        ")])],1),t._v(" "),n("div",{staticClass:"word-pay-item"},[n("div",{staticClass:"word-pay-title"},[t._v("红包个数：")]),t._v(" "),n("el-input",{attrs:{type:"number",placeholder:"请输入红包个数"},on:{change:t.handleRedNumber},model:{value:t.redpacket.number,callback:function(e){t.$set(t.redpacket,"number",e)},expression:"redpacket.number"}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===t.redpacket.number,expression:"redpacket.number === 0"}],staticClass:"tip"},[t._v("\n          可输入红包个数 1 ~ 100 个\n        ")])],1),t._v(" "),n("div",{staticClass:"word-pay-item"},[n("div",{staticClass:"word-pay-title"},[t._v("获得条件：")]),t._v(" "),n("el-radio",{attrs:{label:0},on:{change:function(e){return t.$emit("changeRedCondition",e)}},model:{value:t.redpacket.condition,callback:function(e){t.$set(t.redpacket,"condition",e)},expression:"redpacket.condition"}},[t._v("回复帖子")]),t._v(" "),n("el-radio",{attrs:{label:1},on:{change:function(e){return t.$emit("changeRedCondition",e)}},model:{value:t.redpacket.condition,callback:function(e){t.$set(t.redpacket,"condition",e)},expression:"redpacket.condition"}},[t._v("点赞数")]),t._v(" "),n("el-input",{directives:[{name:"show",rawName:"v-show",value:1===t.redpacket.condition,expression:"redpacket.condition === 1"}],staticClass:"input_likenum",attrs:{type:"number",placeholder:"集赞数"},on:{change:t.handleRedlikenum},model:{value:t.redpacket.likenum,callback:function(e){t.$set(t.redpacket,"likenum",e)},expression:"redpacket.likenum"}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:1===t.redpacket.condition,expression:"redpacket.condition === 1"}]},[t._v("个")]),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:1===t.redpacket.condition&&0===t.redpacket.likenum,expression:"redpacket.condition === 1 && redpacket.likenum === 0"}],staticClass:"tip"},[t._v("\n          可输入集赞数 1 ~ 250 个\n        ")])],1),t._v(" "),n("div",{staticClass:"btn-container"},[n("el-button",{staticClass:"btn-confirm",on:{click:t.selectRedPacket}},[t._v("确定")]),t._v(" "),n("el-button",{staticClass:"btn-cancle",on:{click:t.cancelRedPacket}},[t._v("取消")])],1)])])])}),[],!1,null,"25ccfe5c",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},856:function(t,e,n){"use strict";n.r(e);var r=n(734),o=n.n(r),c=n(739),l=n.n(c),d={name:"EditorQa",mixins:[o.a],props:{question:{type:Object,default:function(){}},post:{type:Object,default:function(){}},canPublishAnonymous:{type:Boolean,default:!1}},data:function(){return{beAskedUser:{},showQACaller:!1,pickerOptionsBind:{disabledDate:function(time){return time.getTime()<Date.now()}}}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}},canSetOnlooker:function(){return!!(this.forums&&this.forums.other&&this.forums.other.can_be_onlooker)&&this.forums.other.can_be_onlooker},siteOnlookerPrice:function(){return this.forums&&this.forums.set_site?this.forums.set_site.site_onlooker_price:""},siteMasterScale:function(){return this.forums&&this.forums.set_site?this.forums.set_site.site_master_scale/10:""},siteUserScale:function(){return""===this.siteMasterScale?0:1-this.siteMasterScale}},watch:{question:{handler:function(t){t.beUser&&(this.beAskedUser=t.beUser)},deep:!0,immediate:!0}},mounted:function(){this.question.beUser&&(this.beAskedUser=this.question.beUser)},methods:{checkTime:function(t){return l()(t).isAfter(l()().add(1,"day"))?t:(this.$message.warning("悬赏结束时间不能少于一天！"),"")},handleRewardPrice:function(t){return/^(([1-9][0-9]*)|(([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2})))$/.test(t)?t:(t.length&&this.$message.warning("悬赏金额格式错误"),"")},selectedQaCaller:function(t){this.beAskedUser=t,this.showQACaller=!1,this.$emit("beUserChange",t)}}},h=(n(811),n(11)),component=Object(h.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"qa"},[n("div",{staticClass:"block"},[n("div",{staticClass:"title"},[t._v("问答类型:")]),t._v(" "),n("el-radio",{attrs:{value:t.question.questionType,label:"offerReward"},on:{input:function(e){return t.$emit("questionTypeChange",e)}}},[t._v("悬赏提问")]),t._v(" "),n("el-radio",{attrs:{value:t.question.questionType,label:"assigner"},on:{input:function(e){return t.$emit("questionTypeChange",e)}}},[t._v("指定人问答")])],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"offerReward"===t.question.questionType,expression:"question.questionType === 'offerReward'"}],staticClass:"reward-box block"},[n("div",{staticClass:"title"},[t._v("悬赏金额：")]),t._v(" "),n("el-input",{attrs:{type:"number",placeholder:"请输入悬赏金额"},on:{change:function(e){return t.$emit("rewardPriceChange",t.handleRewardPrice(e))}},model:{value:t.question.price,callback:function(e){t.$set(t.question,"price",e)},expression:"question.price"}}),t._v(" "),n("div",{staticClass:"title"},[t._v("悬赏结束时间：")]),t._v(" "),n("el-date-picker",{attrs:{type:"datetime",clearable:!1,"picker-options":t.pickerOptionsBind,placeholder:"选择日期时间",format:"yyyy-MM-dd HH:mm:ss"},on:{change:function(e){return t.$emit("rewardTimeChange",t.checkTime(e))}},model:{value:t.question.expired_at,callback:function(e){t.$set(t.question,"expired_at",e)},expression:"question.expired_at"}})],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"assigner"===t.question.questionType,expression:"question.questionType === 'assigner'"}],staticClass:"qa-payment block"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.questionMode"))+":")]),t._v(" "),n("el-radio",{attrs:{value:t.question.paymentType,label:"free"},on:{input:function(e){return t.$emit("paymentTypeChange",e)}}},[t._v(t._s(t.$t("post.freeWatch")))]),t._v(" "),n("el-radio",{attrs:{value:t.question.paymentType,label:"paid"},on:{input:function(e){return t.$emit("paymentTypeChange",e)}}},[t._v(t._s(t.$t("post.paidWatch")))])],1),t._v(" "),t.canPublishAnonymous?n("div",{staticClass:"qa-anonymous block"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.anonymous"))+"：")]),t._v(" "),n("el-switch",{attrs:{value:t.post.isAnonymous,"active-color":"#1878F3"},on:{input:function(e){return t.$emit("isAnonymousChange",e)}}})],1):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"assigner"===t.question.questionType&&t.canSetOnlooker,expression:"question.questionType === 'assigner' && canSetOnlooker"}],staticClass:"qa-onlooker block"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.onLooker"))+":")]),t._v(" "),n("el-switch",{attrs:{value:t.question.isOnlooker,"active-color":"#1878F3"},on:{input:function(e){return t.$emit("isOnlookerChange",e)}}}),t._v(" "),n("span",{staticClass:"tip"},[n("span",[t._v(t._s("他人围观需付费 "+t.siteOnlookerPrice+" 元。"))]),t._v("(\n      "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.siteUserScale,expression:"siteUserScale"}],staticClass:"tip-con"},[t._v("\n        "+t._s("你得 "+(t.siteOnlookerPrice*t.siteUserScale/2).toFixed(2)+" 元\n        ，回答者得 "+(t.siteOnlookerPrice*t.siteUserScale/2).toFixed(2)+" 元。")+"\n      ")]),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.siteMasterScale,expression:"siteMasterScale"}],staticClass:"tip-con"},[t._v("\n        "+t._s("平台得 "+(t.siteOnlookerPrice*t.siteMasterScale).toFixed(2)+" 元")+"\n      ")]),t._v(")\n    ")])],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"assigner"===t.question.questionType,expression:"question.questionType === 'assigner'"}],staticClass:"qa-answerer block"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("post.questionHim"))+":")]),t._v(" "),n("span",{staticClass:"select-answerer",on:{click:function(e){t.showQACaller=!0}}},[t._v("\n        "+t._s(Object.keys(t.beAskedUser).length>0?t.$t("post.changeBeAskedUser"):t.$t("post.addBeAskedUser"))+"\n      ")])]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:Object.keys(t.beAskedUser).length>0,expression:"Object.keys(beAskedUser).length > 0"}],staticClass:"be-asked-user"},[n("avatar-component",{attrs:{author:t.beAskedUser,size:50,round:""}},[t._v("\n        "+t._s(t.$t("topic.activeAt"))+" "+t._s(t.timerDiff(t.beAskedUser.updatedAt))+t._s(t.$t("topic.before"))+"\n      ")])],1)]),t._v(" "),t.showQACaller?n("qa-caller",{on:{close:function(e){t.showQACaller=!1},selectedQaCaller:t.selectedQaCaller}}):t._e()],1)}),[],!1,null,"0f7741a2",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,QaCaller:n(860).default})},857:function(t,e,n){"use strict";n.r(e);n(34),n(24),n(39),n(53),n(54);var r=n(8),o=n(734);function c(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}var l={name:"EditorProduct",mixins:[n.n(o).a],props:{product:{type:Object,default:function(){}}},data:function(){return{addedProduct:{},showProductDialog:!1,typeList:{1:"product-tmall",2:"product-jd",3:"product-pinduoduo",5:"product-taobao",7:"product-youzan"}}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}}},watch:{product:{handler:function(t){this.addedProduct=t},deep:!0}},mounted:function(){this.addedProduct=function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({},this.product)},methods:{inputedLink:function(t){this.addedProduct=t,this.showProductDialog=!1,this.$emit("productChange",t)},remove:function(){this.addedProduct={},this.$emit("productChange",this.addedProduct)}}},d=(n(814),n(11)),component=Object(d.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"product-container"},[n("div",{staticClass:"block"},[n("div",{staticClass:"title"},[n("span",[t._v(t._s(t.$t("permission.createThreadGoods"))+":")]),t._v(" "),0===Object.keys(t.addedProduct).length?n("span",{staticClass:"select-product",on:{click:function(e){t.showProductDialog=!0}}},[t._v("\n        "+t._s(Object.keys(t.addedProduct).length>0?"":"+"+t.$t("post.addProduct"))+"\n      ")]):t._e()]),t._v(" "),Object.keys(t.addedProduct).length>0?n("div",{staticClass:"product-info"},[n("el-image",{staticClass:"image",attrs:{src:t.addedProduct.imagePath}}),t._v(" "),n("div",{staticClass:"right"},[n("div",{staticClass:"title"},[t.typeList[t.addedProduct.type]&&t.addedProduct.title?n("svg-icon",{staticClass:"icon",attrs:{type:t.typeList[t.addedProduct.type]}}):t._e(),t._v("\n          "+t._s(t.addedProduct.title)+"\n        ")],1),t._v(" "),n("div",{staticClass:"bottom"},[n("span",{staticClass:"price"},[t._v(t._s(t.addedProduct.price>0?t.$t("post.yuanItem")+t.addedProduct.price+t.$t("post.yuan"):""))]),t._v(" "),n("svg-icon",{staticClass:"icon",attrs:{type:"delete"},on:{click:t.remove}})],1)])],1):t._e()]),t._v(" "),t.showProductDialog?n("product-dialog",{on:{close:function(e){t.showProductDialog=!1},inputedLink:t.inputedLink}}):t._e()],1)}),[],!1,null,"c0081814",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,ProductDialog:n(861).default})},858:function(t,e,n){"use strict";n.r(e);n(254);var r={name:"EditorToolBar",props:{actions:{type:Array,default:function(){return[]}},showEmoji:{type:Boolean,default:!1},showTopic:{type:Boolean,default:!1},resources:{type:Array,default:function(){return[]}},textLimit:{type:[Number,String],default:450},textLength:{type:[Number,String],default:0},onPublish:{type:Boolean,default:!1},editorStyle:{type:String,default:"post"},isEdit:{type:Boolean,default:!1},onSave:{type:Boolean,default:!1}}},o=(n(824),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["editor-bar",t.editorStyle]},[n("div",{staticClass:"block"},[t._l(t.actions,(function(e,r){return[e.show&&"emoji"===e.icon?n("popover",{key:r,staticClass:"svg",attrs:{visible:t.showEmoji},on:{hidePop:function(e){return t.$emit("hidePop",e)}},scopedSlots:t._u([{key:"pop",fn:function(){return[n("emoji-list",{on:{selectEmoji:function(e){return t.$emit("selectActions",e)}}})]},proxy:!0},{key:"activeNode",fn:function(){return[n("svg-icon",{staticStyle:{"font-size":"20px"},attrs:{type:e.icon},on:{click:function(n){return t.$emit("onActions",e.toggle)}}})]},proxy:!0}],null,!0)}):t._e(),t._v(" "),e.show&&"topic"===e.icon?n("popover",{key:r,staticClass:"svg",attrs:{visible:t.showTopic},on:{hidePop:function(e){return t.$emit("hidePop",e)}},scopedSlots:t._u([{key:"pop",fn:function(){return[n("topic-list",{on:{selectedTopic:function(e){return t.$emit("selectActions",e)}}})]},proxy:!0},{key:"activeNode",fn:function(){return[n("svg-icon",{staticStyle:{"font-size":"20px"},attrs:{type:e.icon},on:{click:function(n){return t.$emit("onActions",e.toggle)}}})]},proxy:!0}],null,!0)}):e.show&&"call"===e.icon?n("svg-icon",{key:r,staticClass:"svg",staticStyle:{"font-size":"20px"},attrs:{type:e.icon},on:{click:function(n){return t.$emit("onActions",e.toggle)}}}):t._e()]}))],2),t._v(" "),n("div",{staticClass:"block"},[t._l(t.resources,(function(e,r){return[e.show?n("svg-icon",{key:r,staticClass:"svg",staticStyle:{"font-size":"20px"},attrs:{type:e.icon},on:{click:function(n){return t.$emit("addResource",e.toggle)}}}):t._e()]}))],2),t._v(" "),n("div",{staticClass:"publish-container"},[t.textLimit?n("span",{staticClass:"tip"},[t._v(t._s(t.textLimit>=t.textLength?t.$t("post.note",{num:t.textLimit-t.textLength}):t.$t("post.exceed",{num:t.textLength-t.textLimit})))]):t._e(),t._v(" "),n("el-button",{staticClass:"button-publish",attrs:{loading:t.onPublish,type:"primary",size:"small"},on:{click:function(e){return t.$emit("publish")}}},[t._v(t._s(t.$t("post.post")))]),t._v(" "),"post"===t.editorStyle?n("el-button",{staticClass:"button-publish",attrs:{disabled:t.isEdit,loading:t.onSave,type:"primary",size:"small"},on:{click:function(e){return t.$emit("savePublish")}}},[t._v("保存至草稿箱")]):t._e()],1)])}),[],!1,null,"77436e5e",null);e.default=component.exports;installComponents(component,{EmojiList:n(788).default,SvgIcon:n(62).default,Popover:n(862).default,TopicList:n(787).default})},859:function(t,e,n){"use strict";n.r(e);var r=n(85),o=(n(45),n(63),n(25),n(13),n(827)),c={name:"VideoUpload",props:{videoList:{type:Array,default:function(){return[]}},onUploadVideo:{type:Boolean,default:!1}},data:function(){return{showVideoPop:!1}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}},sizeLimit:function(){return this.forums&&this.forums.qcloud?this.forums.qcloud.qcloud_vod_size:""},typesLimit:function(){return this.forums&&this.forums.qcloud?this.forums.qcloud.qcloud_vod_ext.split(",").map((function(t){return".".concat(t)})).join(","):""}},methods:{handleVideoRemove:function(){var t=this;return this.$confirm(this.$t("topic.confirmDelete"),this.$t("discuzq.msgBox.title"),{confirmButtonText:this.$t("discuzq.msgBox.confirm"),type:this.$t("discuzq.msgBox.cancel"),typeInformation:"warning"}).then((function(){t.$refs.upload.clearFiles(),setTimeout((function(){t.$emit("videoChange",{key:"videoList",value:[]})}),1e3)}),(function(){}))},addVideo:function(t){var e=this;if(!this.onUploadVideo){if(this.sizeLimit&&t.raw.size>1024*this.sizeLimit*1024)return this.$message.error("".concat(this.$t("profile.filesizecannotexceed")+this.sizeLimit,"MB")),void this.$refs.upload.clearFiles();if(!this.videoTypeCheck(t))return this.$message.error("暂不支持此类型的视频"),void this.$refs.upload.clearFiles();this.$emit("update:onUploadVideo",!0);var n=Object(r.a)(this.videoList);n.push({name:t.name,url:t.url,videoPercent:0}),this.$emit("videoChange",{key:"videoList",value:n}),this.getSignature((function(r){new o.default({getSignature:r}).upload({mediaFile:t.raw}).on("media_progress",(function(t){n[0].videoPercent=t.percent,e.$emit("videoChange",{key:"videoList",value:n})})).done().then((function(t){e.postVideo(t.fileId)}))}))}},videoTypeCheck:function(t){var e=t.name.split(".")[t.name.split(".").length-1].toLowerCase();return!("m3u8"===e||this.typesLimit.indexOf(e.toLowerCase())<0)},getSignature:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.$store.dispatch("jv/get",["signature",{}]).then((function(e){t((function(){return e.signature}))}))},postVideo:function(t){var e=this,n={_jv:{type:"thread/video"},file_id:t};this.$store.dispatch("jv/post",n).then((function(data){var t=Object(r.a)(e.videoList);t[0].id=data.file_id,e.$emit("videoChange",{key:"videoList",value:t})}),(function(t){return e.handleError(t)})).finally((function(){e.$emit("update:onUploadVideo",!1)}))},handleError:function(){this.$emit("update:onUploadVideo",!1),this.$message.error(this.$t("post.videoUploadFail"))}}},l=(n(848),n(11)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.videoList[0]?n("div",{staticClass:"video-upload"},[n("video",{ref:"video",staticClass:"video",attrs:{src:t.videoList[0].url,controls:!1}}),t._v(" "),t.showVideoPop?n("video-pop",{attrs:{url:t.videoList[0].url},on:{remove:function(e){t.showVideoPop=!1}}}):t._e(),t._v(" "),n("svg-icon",{staticClass:"icon-play",staticStyle:{"font-size":"30px"},attrs:{type:"video-play"},on:{click:function(e){t.showVideoPop=!0}}}),t._v(" "),n("svg-icon",{staticClass:"icon-delete",staticStyle:{"font-size":"22px"},attrs:{type:"delete-red"},on:{click:t.handleVideoRemove}}),t._v(" "),n("el-progress",{directives:[{name:"show",rawName:"v-show",value:t.videoList[0].videoPercent<1,expression:"videoList[0].videoPercent < 1"}],staticClass:"progress",attrs:{percentage:100*t.videoList[0].videoPercent,color:"#25A9F6","show-text":!1}})],1):t._e(),t._v(" "),n("el-upload",{directives:[{name:"show",rawName:"v-show",value:!t.videoList[0],expression:"!videoList[0]"}],ref:"upload",staticClass:"image-upload",attrs:{"list-type":"picture-card",accept:t.typesLimit,action:"","auto-upload":!1,limit:1,disabled:t.videoList.length>0,"on-change":t.addVideo,"on-error":t.handleError}},[n("i",{staticClass:"el-icon-plus"})])],1)}),[],!1,null,"7ceac8bb",null);e.default=component.exports;installComponents(component,{VideoPop:n(727).default,SvgIcon:n(62).default})},860:function(t,e,n){"use strict";n.r(e);var r=n(85),o=n(714),c={name:"QaCaller",mixins:[n.n(o).a],data:function(){return{preQaUsers:{loading:!0,list:[]},currentQaUsers:{loading:!0,list:[]},nextQaUsers:{loading:!0,list:[]},preTimerId:null,nextTimerId:null,qaFriendsLoading:!1,selectedFriend:{},searchList:[],searchValue:"",searchTotal:10,loading:!1,setTimeoutId:null,pageLimit:10,pageNumber:1,pageLimitPagination:10,pageNumberPagination:1,totalPage:""}},computed:{noMore:function(){return!(!this.searchValue||this.loading)&&this.searchList.length>=this.searchTotal},disabled:function(){return this.loading||this.noMore}},mounted:function(){this.initUserList()},methods:{initUserList:function(){1===this.pageNumberPagination?(this.getUserList(this.pageNumberPagination,this.currentQaUsers),this.getUserList(this.pageNumberPagination+1,this.nextQaUsers)):this.pageNumberPagination===(this.totalPage||10)?(this.getUserList(this.pageNumberPagination-1,this.preQaUsers),this.getUserList(this.pageNumberPagination,this.currentQaUsers)):(this.getUserList(this.pageNumberPagination-1,this.preQaUsers),this.getUserList(this.pageNumberPagination,this.currentQaUsers),this.getUserList(this.pageNumberPagination+1,this.nextQaUsers))},getUserList:function(t,e){var n=this;if(!(e.list.length>0)){e.loading=!0;var o={"filter[canBeAsked]":"yes","page[limit]":this.pageLimitPagination,"page[number]":t};return this.$store.dispatch("jv/get",["/users",{params:o}]).then((function(data){var meta=data._jv.json.meta;n.totalPage=meta.pageCount,e.loading=!1,e.list=Object(r.a)(data)}),(function(t){return n.handleError(t)}))}},prePage:function(){var t=this;this.pageNumberPagination<=1||(this.$refs.currentQaUser.classList.add("transfer-right"),this.$refs.preQaUser.classList.add("transfer-right"),setTimeout((function(){t.$refs.currentQaUser.classList.remove("transfer-right"),t.$refs.preQaUser.classList.remove("transfer-right"),t.nextQaUsers=t.currentQaUsers,t.currentQaUsers=t.preQaUsers,t.preQaUsers={loading:!0,list:[]}}),300),this.pageNumberPagination-=1,this.preTimerId&&window.clearTimeout(this.preTimerId),this.preTimerId=setTimeout((function(){t.preTimerId=null,t.initUserList()}),310))},nextPage:function(){var t=this;this.pageNumberPagination>=this.totalPage||(this.$refs.currentQaUser.classList.add("transfer-left"),this.$refs.nextQaUser.classList.add("transfer-left"),setTimeout((function(){t.$refs.currentQaUser.classList.remove("transfer-left"),t.$refs.nextQaUser.classList.remove("transfer-left"),t.preQaUsers=t.currentQaUsers,t.currentQaUsers=t.nextQaUsers,t.nextQaUsers={loading:!0,list:[]}}),300),this.pageNumberPagination+=1,this.nextTimerId&&window.clearTimeout(this.nextTimerId),this.nextTimerId=setTimeout((function(){t.initUserList(),t.nextTimerId=null}),310))},searchUser:function(t){var e=this;this.searchValue=t.target.value,this.pageNumber=1,this.searchList=[],this.setTimeoutId&&window.clearTimeout(this.setTimeoutId),this.searchValue&&(this.setTimeoutId=setTimeout((function(){e.loading=!0,e.getSearchList(),e.setTimeoutId=null}),300))},getSearchList:function(){var t=this,e={"filter[username]":"*".concat(this.searchValue,"*"),"filter[status]":"normal","page[limit]":this.pageLimit,"page[number]":this.pageNumber,"filter[canBeAsked]":"yes"};this.$store.dispatch("jv/get",["users",{params:e}]).then((function(data){var e,meta=data._jv.json.meta;t.loading=!1,t.searchTotal=meta.total,data.length>0&&(e=t.searchList).push.apply(e,Object(r.a)(data))}),(function(e){return t.handleError(e)}))},load:function(){this.searchValue&&this.searchList.length>0&&(this.loading=!0,this.pageNumber+=1,this.getSearchList())},selectFriendFromUl:function(t){this.selectedFriend=t,this.clear()},clear:function(){this.$refs.inputCaller.value="",this.searchValue="",this.searchList=[]}}},l=(n(813),n(11)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{attrs:{title:t.$t("post.callAnswer"),overflow:"visible"},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"top"},[n("div",{staticClass:"container-selectedCaller"},[n("div",{directives:[{name:"show",rawName:"v-show",value:Object.keys(t.selectedFriend).length>0,expression:"Object.keys(selectedFriend).length > 0"}],staticClass:"selectedCaller"},[n("span",[t._v("@ "+t._s(t.selectedFriend.username))]),t._v(" "),n("svg-icon",{staticStyle:{"font-size":"13px",cursor:"pointer",fill:"#6d6d6d","margin-left":"5px"},attrs:{type:"close"},on:{click:function(e){t.selectedFriend={}}}})],1)]),t._v(" "),n("div",{staticClass:"tip"},[t._v(t._s(t.$t("post.searchFriendsCanBeAsd")))]),t._v(" "),n("div",{staticClass:"container-search-list"},[n("label",[n("input",{ref:"inputCaller",staticClass:"input-caller",attrs:{placeholder:t.$t("post.pleaseInput"),type:"text"},on:{input:t.searchUser}})]),t._v(" "),n("div",{staticClass:"infinite-list-wrapper",staticStyle:{overflow:"auto"}},[n("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],attrs:{"infinite-scroll-disabled":"disabled"}},t._l(t.searchList,(function(e,r){return n("li",{key:r,class:{"infinite-list-item":!0,selected:t.selectedFriend.username===e.username},on:{click:function(n){return t.selectFriendFromUl(e)}}},[t._v("\n            "+t._s(e.username)+"\n          ")])})),0),t._v(" "),t.loading?n("p",{staticClass:"loading-tip"},[t._v(t._s(t.$t("core.loading")))]):t._e(),t._v(" "),t.noMore?n("p",{staticClass:"loading-tip"},[t._v(t._s(t.$t("core.noMoreData")))]):t._e()])]),t._v(" "),n("div",{staticClass:"friends"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("post.recommendAnswer")))]),t._v(" "),n("div",{staticClass:"container-user-list"},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.preQaUsers.loading,expression:"preQaUsers.loading"}],ref:"preQaUser",staticClass:"container-caller prePage"},t._l(t.preQaUsers.list,(function(e,r){return n("div",{key:r,class:{caller:!0,selected:t.selectedFriend.username===e.username},on:{click:function(n){t.selectedFriend=e}}},[n("avatar",{attrs:{user:e,size:"30",round:"","prevent-jump":""}}),t._v(" "),n("span",[t._v(t._s(e.username))])],1)})),0),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.currentQaUsers.loading,expression:"currentQaUsers.loading"}],ref:"currentQaUser",staticClass:"container-caller currentPage"},t._l(t.currentQaUsers.list,(function(e,r){return n("div",{key:r,class:{caller:!0,selected:t.selectedFriend.username===e.username},on:{click:function(n){t.selectedFriend=e}}},[n("avatar",{attrs:{user:e,size:"30",round:"","prevent-jump":""}}),t._v(" "),n("span",[t._v(t._s(e.username))])],1)})),0),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.nextQaUsers.loading,expression:"nextQaUsers.loading"}],ref:"nextQaUser",staticClass:"container-caller nextPage"},t._l(t.nextQaUsers.list,(function(e,r){return n("div",{key:r,class:{caller:!0,selected:t.selectedFriend.username===e.username},on:{click:function(n){t.selectedFriend=e}}},[n("avatar",{attrs:{user:e,size:"30",round:"","prevent-jump":""}}),t._v(" "),n("span",[t._v(t._s(e.username))])],1)})),0)]),t._v(" "),t.totalPage?n("div",{staticClass:"container-pagination"},[n("div",{staticClass:"pagination"},[n("svg-icon",{class:{"page-button":!0,"pre-button":!0,disabled:t.pageNumberPagination<=1},attrs:{type:"drop-down"},on:{click:t.prePage}}),t._v(" "),n("span",[t._v(t._s(t.pageNumberPagination))]),t._v(" "),n("svg-icon",{class:{"page-button":!0,"next-button":!0,disabled:t.pageNumberPagination>=t.totalPage},attrs:{type:"drop-down"},on:{click:t.nextPage}})],1)]):t._e()])]),t._v(" "),n("div",{staticClass:"bottom"},[n("div",{staticClass:"container"},[n("el-button",{attrs:{disabled:0===Object.keys(t.selectedFriend).length,size:"medium",type:"primary"},on:{click:function(e){return t.$emit("selectedQaCaller",t.selectedFriend)}}},[t._v(t._s(t.$t("post.confirmChoice")))])],1)])])}),[],!1,null,"8ebbd4c8",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,Avatar:n(255).default,MessageBox:n(719).default})},861:function(t,e,n){"use strict";n.r(e);n(878),n(13);var r=n(714),o={name:"ProductDialog",mixins:[n.n(r).a],data:function(){return{supportedType:[{icon:"product-jd",text:this.$t("post.jd")},{icon:"product-taobao",text:this.$t("post.taobao")},{icon:"product-tmall",text:this.$t("post.tmall")},{icon:"product-pinduoduo",text:this.$t("post.pinduoduo")},{icon:"product-youzan",text:this.$t("post.youzan")}],link:"",loading:!1}},computed:{},mounted:function(){},methods:{handleLink:function(){var t=this;if(this.link){this.loading=!0;var e={_jv:{type:"goods/analysis"},type:"analysis",address:this.link};this.$store.dispatch("jv/post",e).then((function(e){e&&e._jv&&(t.link="",t.$emit("inputedLink",e))}),(function(e){return t.handleError(e)})).finally((function(){t.loading=!1}))}else this.$message.error(this.$t("post.goodsLinkEmpty"))}}},c=(n(815),n(11)),component=Object(c.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"message-box-product",attrs:{title:t.$t("post.addProduct"),overflow:"visible",width:"620px"},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"top"},[n("div",{staticClass:"tips"},[t._v(t._s(t.$t("post.supportedLink")))]),t._v(" "),n("div",{staticClass:"supported-type"},t._l(t.supportedType,(function(e,r){return n("div",{key:r,staticClass:"item"},[n("svg-icon",{staticClass:"icon",attrs:{type:e.icon}}),t._v(t._s(e.text)+"\n      ")],1)})),0),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.link,expression:"link"}],staticClass:"input-link",attrs:{placeholder:t.$t("post.goodsLink")},domProps:{value:t.link},on:{input:function(e){e.target.composing||(t.link=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"bottom"},[n("div",{staticClass:"container"},[n("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.handleLink}},[t._v(t._s(t.$t("discuzq.ok")))]),t._v(" "),n("el-button",{attrs:{size:"medium"},on:{click:function(e){return t.$emit("close")}}},[t._v(t._s(t.$t("post.cancel")))])],1)])])}),[],!1,null,"1173780e",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,MessageBox:n(719).default})},862:function(t,e,n){"use strict";n.r(e);var r={name:"Popover",props:{visible:{type:Boolean,default:!1}}},o=(n(825),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-popover",{attrs:{placement:"bottom","min-width":"150",value:t.visible,trigger:"manual","popper-class":"popover"},on:{hide:function(e){return t.$emit("hide-pop")}}},[t._t("pop"),t._v(" "),n("template",{slot:"reference"},[t._t("activeNode")],2)],2)],1)}),[],!1,null,null,null);e.default=component.exports},864:function(t,e,n){var r=n(794);n(45),n(25),n(39);var o=n(739);t.exports={methods:{createAttachmentsData:function(t){return t.map((function(t){var e={};return e.id=parseInt(t.id),e.type="attachments",e}))},publishPostResource:function(t,e){var n,o,c=this.createAttachmentsData(e.imageList),l=this.createAttachmentsData(e.attachedList);(c.length>0||l.length>0)&&(t._jv.relationships.attachments={},t._jv.relationships.attachments.data=[],(n=t._jv.relationships.attachments.data).push.apply(n,r(c)),(o=t._jv.relationships.attachments.data).push.apply(o,r(l)));return t},newPublishPostResource:function(t,e){var n,o,c=this.createAttachmentsData(e.imageList),l=this.createAttachmentsData(e.attachedList);(c.length>0||l.length>0)&&(t.attachments=[],(n=t.attachments).push.apply(n,r(c)),(o=t.attachments).push.apply(o,r(l)));return t},editPublishPostResource:function(t,e){var n,o,c=this.createAttachmentsData(e.imageList),l=this.createAttachmentsData(e.attachedList);(c.length>0||l.length>0)&&(t.data.relationships.attachments={},t.data.relationships.attachments.data=[],(n=t.data.relationships.attachments.data).push.apply(n,r(c)),(o=t.data.relationships.attachments.data).push.apply(o,r(l)));return t},publishAnswerResource:function(t,e){var n,o,c=this.createAttachmentsData(e.imageList),l=this.createAttachmentsData(e.attachedList);(c.length>0||l.length>0)&&(t.relationships.attachments={},t.relationships.attachments.data=[],(n=t.relationships.attachments.data).push.apply(n,r(c)),(o=t.relationships.attachments.data).push.apply(o,r(l)));return t},publishThreadResource:function(t,e){return e.videoList.length>0&&(t.file_id=this.post.videoList[0].id,t.file_name=this.post.videoList[0].name),t},publishPayment:function(t,e){return t.price=0,t.free_words=0,t.attachment_price=0,"attachmentPaid"===e.paidType?t.attachment_price=e.attachmentPrice:"paid"===e.paidType&&(t.price=e.price,t.free_words=e.freeWords),t},publishLocation:function(t,e){return t.location=e.location?e.location:"",t.latitude=e.latitude?e.latitude:"",t.longitude=e.longitude?e.longitude:"",t},publishQuestion:function(t,e){t._jv.relationships.question={},t._jv.relationships.question.data={};var data=t._jv.relationships.question.data;return data.type="assigner"===e.questionType?1:0,data.price=e.price||0,data.order_id=e.orderId||"",1===data.type?(data.is_onlooker=e.isOnlooker,data.be_user_id=this.question.beUser?this.question.beUser._jv.id:0):""!==e.expired_at&&(data.expired_at=o(e.expired_at).format("YYYY-MM-DD HH:mm:ss")),t},publishProduct:function(t,e){return t.post_goods_id=e&&e._jv&&e._jv.id||"",t},publishRedPacket:function(t,e){if(t.is_red_packet=e.is_red_packet,0===e.is_red_packet)return t;var n={};if(n.rule=e.rule,n.money=0===e.rule?(e.money*e.number).toFixed(2):e.money,n.number=e.number,n.condition=e.condition,n.likenum=e.likenum,t.redPacket=n,e.isPaid){t._jv.relationships.redpacket={},t._jv.relationships.redpacket.data={};var data=t._jv.relationships.redpacket.data;data.order_id=e.orderId,data.price=e.money}return t},deleteAttachmentsAfterEdit:function(t,e){var n=this,r=e.map((function(t){return t.id}));t.map((function(t){return t._jv&&t._jv.id||t.id})).filter((function(t){return r.indexOf(t)<0})).forEach((function(t){n.$store.dispatch("jv/delete",["/attachments/".concat(t),{}]).catch((function(){return""}))}))}}}},865:function(t,e,n){"use strict";n.r(e);n(254),n(63);var r=n(714),o=n.n(r),c=n(816),l=n.n(c),d=n(732),h=n(817),m=n.n(h),f=n(33),v={name:"AttachmentUpload",mixins:[o.a,l.a,m.a],props:{action:{type:String,default:"",required:!0},fileList:{type:Array,default:function(){return[]},required:!0},accept:{type:String,default:""},limit:{type:Number,default:9999},sizeLimit:{type:Number,default:1e17},onUpload:{type:Boolean,default:!1},addTips:{type:String,default:""},type:{type:Number,default:0}},data:function(){return{previewFiles:[],currentInput:""}},computed:{input:function(){return document.getElementById("upload")},service:function(){return f.a}},methods:{onClick:function(){var t=this.$refs.uploadFile;this.currentInput=t,this.uploaderFile(t)},extensionValidate:function(t){var e=t.split(".")[t.split(".").length-1];return d.extensionList.indexOf(e.toUpperCase())>0?e.toUpperCase():"UNKNOWN"}}},y=(n(887),n(11)),component=Object(y.a)(v,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"container-upload"},[n("div",{staticClass:"upload"},[n("span",{staticClass:"attachment-list"},[t._v(t._s(t.$t("post.attachmentList")))]),t._v(" "),n("span",{staticClass:"add-attachment",on:{click:t.onClick}},[t._v(t._s(t.addTips||t.$t("post.addAttachment")))]),t._v(" "),n("input",{ref:"uploadFile",attrs:{id:"upload",accept:t.accept,type:"file",multiple:""},on:{input:t.onInput}})]),t._v(" "),t._l(t.previewFiles,(function(e,r){return n("div",{key:r,class:{"preview-item":!0,deleted:e.deleted}},[n("div",{staticClass:"container-item"},[n("div",{staticClass:"info"},[n("svg-icon",{staticStyle:{"font-size":"18px","vertical-align":"middle"},attrs:{type:t.extensionValidate(e.name)}}),t._v(" "),n("span",{class:{"file-name":!0,uploading:e.progress<100}},[t._v(t._s(e.name))])],1),t._v(" "),n("span",{staticClass:"size"},[t._v(t._s(parseInt((e.size/1024).toString()).toLocaleString())+"\n        KB")]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.progress<100,expression:"file.progress < 100"}],staticClass:"progress",style:{width:e.progress+"%"}})]),t._v(" "),n("div",{staticClass:"remove"},[n("svg-icon",{directives:[{name:"show",rawName:"v-show",value:e.progress&&100===e.progress,expression:"file.progress && file.progress === 100"}],staticClass:"remove-icon",attrs:{type:"delete"},on:{click:function(e){return t.removeItem(r)}}})],1)])}))],2)}),[],!1,null,"4e4dc3b6",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},866:function(t,e,n){"use strict";n.r(e);n(254);var r=n(714),o=n.n(r),c=n(816),l=n.n(c),d=n(817),h=n.n(d),m=n(33),f={name:"ImageUpload",mixins:[o.a,l.a,h.a],props:{action:{type:String,default:"",required:!0},fileList:{type:Array,default:function(){return[]},required:!0},accept:{type:String,default:""},limit:{type:Number,default:9999},sizeLimit:{type:Number,default:1e17},onUpload:{type:Boolean,default:!1},type:{type:Number,default:0}},data:function(){return{previewFiles:[],currentInput:""}},computed:{input:function(){return document.getElementById("upload")},service:function(){return m.a}},methods:{onClick:function(){var t=this.$refs.uploadImage;this.currentInput=t,this.uploaderFile(t)}}},v=(n(888),n(11)),component=Object(v.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"container-upload"},[t._l(t.previewFiles,(function(image,e){return n("div",{key:e,class:{"preview-item":!0,deleted:image.deleted}},[n("img",{attrs:{src:image.url,alt:""}}),t._v(" "),n("el-progress",{directives:[{name:"show",rawName:"v-show",value:image.progress<100,expression:"image.progress < 100"}],staticClass:"progress",attrs:{percentage:image.progress,color:"#25A9F6","show-text":!1}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:image.progress<100,expression:"image.progress < 100"}],staticClass:"cover"},[t._v("图片上传中...")]),t._v(" "),n("div",{class:{"upload-delete":!0,"show-delete":100===image.progress},on:{click:function(n){return t.removeItem(e)}}},[n("svg-icon",{staticStyle:{"font-size":"14px",fill:"white"},attrs:{type:"delete"}})],1)],1)})),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.previewFiles.length<t.limit,expression:"previewFiles.length < limit"}],staticClass:"upload",on:{click:function(e){return t.onClick(e)}}},[n("input",{ref:"uploadImage",attrs:{id:"upload",accept:t.accept,type:"file",multiple:""},on:{input:t.onInput}}),t._v(" "),n("svg-icon",{staticClass:"upload-icon",attrs:{type:"add"}})],1)],2)}),[],!1,null,"42e9b14c",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},886:function(t,e,n){"use strict";n(807)},887:function(t,e,n){"use strict";n(818)},888:function(t,e,n){"use strict";n(826)},891:function(t,e){t.exports={methods:{postLegalityCheck:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.$t("topic.publishExamineTip");0===t.isApproved?this.$message.warning(n):this.$message.success(e)},newPostLegalityCheck:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.$t("topic.publishExamineTip");0===t.Data.isApproved?this.$message.warning(n):this.$message.success(e)}}}},896:function(t,e,n){"use strict";n.r(e);var r=n(85),o=(n(25),n(45),n(739)),c=n.n(o),l=n(714),d=n.n(l),h=n(33),m={name:"ChatBox",mixins:[d.a],props:{dialog:{type:Object,default:function(){}}},data:function(){return{recordList:[],recordTotal:0,pageLimit:10,pollId:"",loading:!1,onChatPublish:!1,chatContent:{text:"",imageList:[],attachedList:[]},chatType:{type:10,textLimit:450,showPayment:!1,showTitle:!1,showImage:!0,showVideo:!1,showAttached:!1,showEmoji:!0,showTopic:!1,showCaller:!1,placeholder:"请输入 ..."},loadMoreMessage:!1}},computed:{userId:function(){return this.$store.getters["session/get"]("userId")},noMore:function(){return this.recordList.length===this.recordTotal}},watch:{dialog:{handler:function(t){var e=this;this.loading=!0,t.id&&t.name?this.getChatRecord(t.id).then((function(){e.loading=!1,e.$nextTick((function(){e.$refs.chatContent.scrollTop=e.$refs.chatContent.scrollHeight}))})):this.loading=!1},deep:!0,immediate:!0}},mounted:function(){this.activePolling(),this.scrollListener()},beforeDestroy:function(){window.clearInterval(this.pollId)},methods:{scrollListener:function(){var t=this;this.$refs.chatContent.addEventListener("scroll",(function(e){if(0===e.target.scrollTop){if(t.loadMoreMessage)return;t.loadMoreMessage=!0,t.pageLimit+=10,t.getChatRecord(t.dialog.id)}}))},activePolling:function(){var t=this;this.pollId=window.setInterval((function(){t.dialog.id&&t.getChatRecord(t.dialog.id)}),1500)},getChatRecord:function(t){var e=this,n={"filter[dialog_id]":t,include:"user,user.groups","page[number]":1,"page[limit]":this.pageLimit,sort:"-createdAt"};return h.a.get("dialog/message",{params:n}).then((function(t){if(t.data){var n=t.data.meta.total,o=t.data.data.map((function(t){return Object.assign({id:t.id},t.attributes)}));0!==e.recordList.length&&e.recordList[e.recordList.length-1].id===o[0].id&&e.recordList.length===o.length||(e.recordList=Object(r.a)(o).reverse()),e.recordTotal===n||e.loadMoreMessage||e.$nextTick((function(){e.$refs.chatContent.scrollTop=e.$refs.chatContent.scrollHeight})),e.onChatPublish=!1,e.loadMoreMessage=!1,e.recordTotal=n}else e.onChatPublish=!1}),(function(t){e.handleError(t),e.onChatPublish=!1}))},formatDate:function(t){return c()(new Date(t)).format("YYYY-MM-DD HH:mm")},postMessage:function(){var t=this,e={_jv:{type:"dialog/message"},dialog_id:this.dialog.id,message_text:""===this.chatContent.text?"发送图片":this.chatContent.text};this.chatContent.imageList.length>0&&(e.image_url=this.chatContent.imageList[0].url,e.attachment_id=this.chatContent.imageList[0].id),this.$store.dispatch("jv/post",e).then((function(){t.getChatRecord(t.dialog.id),t.chatContent.text="",t.chatContent.imageList=[]}),(function(e){t.onChatPublish=!1,t.handleError(e)}))},createDialogAndPost:function(){var t=this,e={_jv:{type:"dialog"},recipient_username:this.dialog.name,message_text:""===this.chatContent.text?"发送图片":this.chatContent.text};this.chatContent.imageList.length>0&&(e.image_url=this.chatContent.imageList[0].url),this.$store.dispatch("jv/post",e).then((function(e){t.getChatRecord(e._jv.id),t.chatContent.text="",t.chatContent.imageList=[]}),(function(e){t.onChatPublish=!1,t.handleError(e)}))},chatPublish:function(){return this.chatContent.text||this.chatContent.imageList.length?this.chatContent.text.length>450?this.$message.warning(this.$t("chat.messageLengthCannotOver")):void(this.onChatPublish||(this.onChatPublish=!0,this.dialog.id?this.postMessage():this.createDialogAndPost())):this.$message.warning(this.$t("chat.messageCannotBeBlack"))}}},f=(n(886),n(11)),component=Object(f.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chat-box"},[n("div",{staticClass:"header"},[n("span",{staticClass:"name"},[t._v(t._s(t.dialog.name))]),t._v(" "),n("span",[t._v(t._s(t.$t("chat.chatWithYou")))]),t._v(" "),n("svg-icon",{staticClass:"icon-close",staticStyle:{"font-size":"16px",fill:"#6d6d6d"},attrs:{type:"close"},on:{click:function(e){return t.$emit("close")}}})],1),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"chatContent",staticClass:"chat-content",attrs:{"element-loading-background":"rgba(0, 0, 0, 0)"}},[t.loadMoreMessage?n("div",{staticClass:"load-tip"},[t._v("\n      "+t._s(t.noMore?t.$t("chat.noMore"):t.$t("chat.loadRecord"))+"\n    ")]):t._e(),t._v(" "),t._l(t.recordList,(function(e,r){return n("div",{key:r,staticClass:"record"},[e.user_id===parseInt(t.userId)?n("div",{staticClass:"record-item mine"},[n("div",{staticClass:"message"},[n("div",{staticClass:"message-box"},[n("p",{domProps:{innerHTML:t._s(t.$xss(e.message_text_html))}}),t._v(" "),e.image_url?n("a",{attrs:{href:e.image_url,target:"_blank"}},[n("el-image",{staticStyle:{height:"120px"},attrs:{src:e.image_url}})],1):t._e()]),t._v(" "),n("div",{staticClass:"created-at"},[t._v(t._s(t.formatDate(e.updated_at)))])]),t._v(" "),n("Avatar",{attrs:{user:e.user,size:50}})],1):n("div",{staticClass:"record-item his"},[n("Avatar",{attrs:{user:e.user,size:50}}),t._v(" "),n("div",{staticClass:"message"},[n("div",{staticClass:"message-box"},[n("p",{domProps:{innerHTML:t._s(t.$xss(e.message_text_html))}}),t._v(" "),e.image_url?n("a",{attrs:{href:e.image_url,target:"_blank"}},[n("el-image",{staticStyle:{height:"120px"},attrs:{src:e.image_url}})],1):t._e()]),t._v(" "),n("div",{staticClass:"created-at"},[t._v(t._s(t.formatDate(e.updated_at)))])])],1)])}))],2),t._v(" "),n("editor",{staticClass:"chat-editor",attrs:{"editor-style":"chat",selector:"chat-editor","limit-img-number":1,"type-information":t.chatType,post:t.chatContent,"on-publish":t.onChatPublish},on:{"update:post":function(e){t.chatContent=e},publish:t.chatPublish}}),t._v(" "),n("Cover")],1)}),[],!1,null,"2478ba6a",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,Avatar:n(255).default,Editor:n(796).default,Cover:n(754).default})},916:function(t,e,n){},917:function(t,e,n){},918:function(t,e,n){},919:function(t,e,n){},920:function(t,e,n){},936:function(t,e,n){"use strict";n(916)},937:function(t,e,n){"use strict";n(917)},938:function(t,e,n){"use strict";n(918)},939:function(t,e,n){"use strict";n(919)},940:function(t,e,n){"use strict";n(920)},951:function(t,e,n){"use strict";n.r(e);var r=n(9),o=n(85),c=(n(31),n(254),n(39),n(63),n(717)),l=n(800),d=n.n(l),component=(n(261),n(962)),h=n(904),m={name:"TopicContent",components:{Viewer:component.a},mixins:[d.a],props:{article:{type:Object,default:function(){}},title:{type:String,default:function(){return""}},video:{type:Object,default:function(){}},audio:{type:Object,default:function(){}},paidInformation:{type:Object,default:function(){}},threadType:{type:Number,default:0},category:{type:Object,default:function(){}},location:{type:Object,default:function(){}},topicType:{type:String,default:function(){return""}},thread:{type:Object,default:function(){}}},data:function(){var t=this;return{search_ids:"",showVideoPop:!1,options:{filter:function(image){return Object(o.a)(image.classList).indexOf("qq-emotion")<0},url:function(e){var image=t.article.imageSource.filter((function(t){return decodeURI(t.fileName)===decodeURI(e.alt)}));return image.length>0?image[0].url:e.src}},currentAudio:{id:"",url:"",currentTime:"",duration:"",audio:"",seeking:!1,isPlay:!1,isLoading:!1}}},computed:{unpaid:function(){return this.paidInformation.paid&&this.removeTextHideCover(),!(this.paidInformation.paid||0===parseFloat(this.paidInformation.price))}},watch:{article:{handler:function(){this.addTextHideCover()},deep:!0}},mounted:function(){this.currentAudio.audio=document.getElementById("audio-player")},methods:{toCategoryPage:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getSearchIds();case 2:""===t.search_ids&&(t.search_ids=t.category.id),n=t.search_ids.split(","),r=[],n.length>0&&(n.forEach((function(t){r.push("search_ids=".concat(t))})),t.$router.push("/category/".concat(t.category.id,"?").concat(r.join("&")))),t.$router.push({path:"/category/".concat(t.category.id),query:{search_ids:t.search_ids}});case 7:case"end":return e.stop()}}),e)})))()},getSearchIds:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("jv/get",["categories",{}]).then((function(e){var n=Object(o.a)(e)||[];t.handleData(n)}),(function(e){t.handleError(e)}));case 2:case"end":return e.stop()}}),e)})))()},handleData:function(data){var t=this;data.forEach((function(e){t.category.id===e.id&&(t.search_ids=e.search_ids)}))},formatTopicHTML:function(html){var t=Object(h.a)(html);return c.a.parse(t)},addTextHideCover:function(){1===this.threadType&&this.unpaid&&this.$nextTick((function(){var t=document.querySelector(".content-html");parseInt(t.offsetHeight)>100&&t.classList.add("hide-cover")}))},removeTextHideCover:function(){var t=document.querySelector(".content-html");t&&t.classList.remove("hide-cover")},openVideo:function(){if(this.isLogin())return this.unpaid?this.$emit("payForThread"):void(this.showVideoPop=!0)},play:function(t){var e=this;if(this.isLogin()){if(this.unpaid)return this.$emit("payForThread");this.currentAudio.id!==t.id&&(this.resetAudio(this.currentAudio.audio),this.currentAudio.url=t.mediaUrl,this.currentAudio.id=t.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)}),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.removeEventListener("timeupdate",this.onProgressing),audio.removeEventListener("ended",this.onEnded),this.currentAudio.isPlay=!1,this.currentAudio.duration="",this.currentAudio.currentTime=""},pause:function(){this.currentAudio.isLoading=!1,this.currentAudio.isPlay=!1,this.currentAudio.audio.pause()},seek:function(time){this.currentAudio.seeking=!1,this.currentAudio.currentTime=time,this.currentAudio.audio.currentTime=time},seeking:function(time){this.currentAudio.seeking=!0,this.currentAudio.currentTime=time}}},f=(n(936),n(11)),v=Object(f.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("article",{staticClass:"global"},[n("div",{staticClass:"title"},[t._v(t._s(t.title))]),t._v(" "),n("viewer",{attrs:{trigger:t.$xss(t.formatTopicHTML(t.article.contentHtml||"")),options:t.options}},[n("div",{directives:[{name:"highlight",rawName:"v-highlight"}],staticClass:"content-html",domProps:{innerHTML:t._s(t.$xss(t.formatTopicHTML(t.article.contentHtml||"")))}})]),t._v(" "),t.video.coverUrl?n("div",{staticClass:"container-video-img-cover"},[n("div",{staticClass:"warp-video-img-cover"},[n("img",{staticClass:"video-img-cover",attrs:{src:t.video.coverUrl,alt:t.video.fileName},on:{click:function(e){return e.stopPropagation(),t.openVideo.apply(null,arguments)}}}),t._v(" "),n("svg-icon",{staticClass:"icon-play",staticStyle:{"font-size":"50px"},attrs:{type:"video-play"},on:{click:t.openVideo}})],1)]):t._e(),t._v(" "),t.thread&&t.thread.images&&t.thread.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){t.unpaid&&t.openVideo()}}},t._l(t.thread.images,(function(image,e){return n("el-image",{key:e,staticClass:"image",attrs:{"data-source":t.unpaid?"":image.url,src:image.thumbUrl,alt:image.fileName,fit:"cover"}},[n("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[n("i",{staticClass:"el-icon-loading"})])])})),1):t._e(),t._v(" "),t.article.images&&t.article.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){t.unpaid&&t.openVideo()}}},t._l(t.article.images,(function(image,e){return n("el-image",{key:e,staticClass:"image",attrs:{"data-source":t.unpaid?"":image.url,src:image.thumbUrl,alt:image.filename,fit:"cover"}},[n("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[n("i",{staticClass:"el-icon-loading"})])])})),1):t._e(),t._v(" "),(t.thread&&t.thread.attachments||[]).length>0?n("div",{staticClass:"container-attachment"},[n("h3",{staticClass:"name"},[t._v(t._s(t.$t("topic.attachment")))]),t._v(" "),n("div",[t._l(t.thread.attachments,(function(e,r){return[n("attachment-list",{key:r,attrs:{file:e,price:t.paidInformation.price,"is-paid":t.paidInformation.paid,"is-paid-attachment":t.paidInformation.isPaidAttachment,"attachment-price":t.paidInformation.attachmentPrice}})]}))],2)]):t._e(),t._v(" "),(t.article.attachments||[]).length>0?n("div",{staticClass:"container-attachment"},[n("h3",{staticClass:"name"},[t._v(t._s(t.$t("topic.attachment")))]),t._v(" "),n("div",[t._l(t.article.attachments,(function(e,r){return[n("attachment-list",{key:r,attrs:{file:e,price:t.paidInformation.price,"is-paid":t.paidInformation.paid,"is-paid-attachment":t.paidInformation.isPaidAttachment,"attachment-price":t.paidInformation.attachmentPrice}})]}))],2)]):t._e(),t._v(" "),t.unpaid&&1===t.threadType?n("div",{staticClass:"hide-content-tip"},[t._v("\n    "+t._s(t.$t("pay.contentHide",{percent:100*(1-t.paidInformation.freeWords).toFixed(2)}))+"\n  ")]):t._e(),t._v(" "),t.category.name?n("div",{staticClass:"tag",on:{click:t.toCategoryPage}},[t._v(t._s(t.category.name))]):t._e(),t._v(" "),t.location&&t.location.location?n("div",[n("nuxt-link",{staticClass:"location",attrs:{to:"/topic/position?longitude="+t.location.longitude+"&latitude="+t.location.latitude}},[n("span",{staticClass:"flex"},[n("svg-icon",{staticClass:"icon",attrs:{type:"location"}}),t._v(" "),n("span",[t._v(" "+t._s(t.location.location)+" ")])],1)])],1):t._e(),t._v(" "),6===t.threadType?n("div",{staticClass:"product"},[n("product-item",{attrs:{item:t.thread&&t.thread.postGoods}})],1):t._e(),t._v(" "),4===t.threadType?n("div",{staticClass:"audio"},[t._l([].concat(t.audio),(function(e,r){return[n("audio-player",{key:r,attrs:{file:e,"current-audio":t.currentAudio},on:{play:t.play,pause:t.pause,seek:t.seek,seeking:t.seeking}})]}))],2):t._e(),t._v(" "),t.showVideoPop?n("video-pop",{attrs:{"cover-url":t.video.coverUrl,url:t.video.mediaUrl},on:{remove:function(e){t.showVideoPop=!1}}}):t._e(),t._v(" "),n("audio",{staticStyle:{display:"none"},attrs:{id:"audio-player",src:t.currentAudio.url}})],1)}),[],!1,null,"1e430491",null);e.default=v.exports;installComponents(v,{SvgIcon:n(62).default,AttachmentList:n(959).default,ProductItem:n(730).default,AudioPlayer:n(731).default,VideoPop:n(727).default})},952:function(t,e,n){"use strict";n.r(e);n(254);var r={name:"CommentHeader",props:{commentCount:{type:Number,default:0},isPositiveSort:{type:Boolean,default:!1}}},o=(n(938),n(11)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"comment-header"},[n("div",{staticClass:"count"},[t._v(t._s(t.commentCount+" "+t.$t("topic.item")+t.$t("topic.comment")))]),t._v(" "),n("div",{staticClass:"sort",on:{click:function(e){return t.$emit("changeSort",!t.isPositiveSort)}}},[n("svg-icon",{staticStyle:{"font-size":"14px"},attrs:{type:"sort"}}),t._v(" "),n("span",[t._v(t._s(t.isPositiveSort?t.$t("topic.switchToNegativeSort"):t.$t("topic.switchToPositiveSort")))])],1)])}),[],!1,null,"c4cb1cd2",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},953:function(t,e,n){"use strict";n.r(e);var r=n(85),o=(n(13),n(108),n(34),n(714)),c={name:"TopicAside",mixins:[n.n(o).a],props:{author:{type:Object,default:function(){}}},data:function(){return{threeEssenceThread:[],EssenceThread:[],followStatus:0,followLoading:!1,loading:!0,billboard:[{key:"threadCount",count:"",text:this.$t("home.thread")},{key:"questionCount",count:"",text:this.$t("profile.question")},{key:"likedCount",count:"",text:this.$t("topic.getLike")},{key:"followCount",count:"",text:this.$t("home.followed")},{key:"fansCount",count:"",text:this.$t("profile.followers")}]}},computed:{canOpera:function(){var t=this.$store.getters["session/get"]("userId");return!!(this.author.id&&this.author.id>0)&&(parseInt(t)>0&&t!==this.author.id.toString())}},watch:{author:{handler:function(t){0!==Object.keys(t).length&&(this.followStatus=t.follow,t.threadCount?this.billboard.forEach((function(e){e.count=t[e.key]})):this.getAuthorInfo())},deep:!0,immediate:!0}},mounted:function(){this.getEssenceThread()},methods:{getAuthorInfo:function(){var t=this;if(this.author.id&&(!this.author.id||-1!==this.author.id))return this.$store.dispatch("jv/get",["users/".concat(this.author.id),{params:{include:"groups,dialog"}}]).then((function(e){t.billboard.forEach((function(t){t.count=e[t.key]}))}),(function(e){return t.handleError(e)}))},getEssenceThread:function(){var t=this;return this.loading=!0,this.$store.dispatch("jv/get",["threads",{params:{"filter[isApproved]":1,"filter[isEssence]":"yes","filter[isDeleted]":"no"}}]).then((function(data){if(t.EssenceThread=Object(r.a)(data),0!==t.EssenceThread.length)for(var e=t.EssenceThread.length>3?3:t.EssenceThread.length;t.threeEssenceThread.length<e;){var n=t.getRandom(t.EssenceThread.length);t.threeEssenceThread.push(t.EssenceThread[n]),t.EssenceThread.splice(n,1)}}),(function(e){return t.handleError(e)})).finally((function(){t.loading=!1}))},getRandom:function(t){return Math.floor(Math.random()*t)},follow:function(){var t=this;if(!this.followLoading){this.followLoading=!0;var e={_jv:{type:"follow"},to_user_id:this.author.id.toString()};return this.$store.dispatch("jv/post",e).then((function(e){t.followLoading=!1,t.followStatus=0===e.is_mutual?1:2}),(function(e){return t.handleError(e)}))}},unFollow:function(){var t=this;this.followLoading||(this.followLoading=!0,this.$store.dispatch("jv/delete","follow/".concat(this.author.id,"/1")).then((function(){t.followLoading=!1,t.followStatus=0})))},goToPage:function(t){window.open("/thread/".concat(t._jv.id))}}},l=(n(939),n(11)),component=Object(l.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"global"},[n("aside-header",{attrs:{author:t.author,billboard:t.billboard,"follow-status":t.followStatus,"follow-loading":t.followLoading,"can-opera":t.canOpera},on:{follow:t.follow,unFollow:t.unFollow}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.threeEssenceThread.length>0,expression:"threeEssenceThread.length > 0"},{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"recommend block"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("topic.recommend")))]),t._v(" "),t._l(t.threeEssenceThread,(function(e,r){return n("div",{key:r,staticClass:"container-post"},[e.title&&e.firstPost.summaryText?n("div",{staticClass:"content-html",on:{click:function(n){return t.goToPage(e)}}},[t._v("\n        "+t._s(e.title||e.firstPost.summaryText)+"\n      ")]):n("div",{staticClass:"content-html",domProps:{innerHTML:t._s(t.$xss(e.firstPost.summary))},on:{click:function(n){return t.goToPage(e)}}}),t._v(" "),n("span",{staticClass:"view-count"},[t._v("\n        "+t._s(e.viewCount)+" "+t._s(t.$t("topic.readAlready"))+"\n      ")])])}))],2),t._v(" "),n("advertising",{staticStyle:{"margin-top":"15px","margin-bottom":"3px"}}),t._v(" "),n("copyright")],1)}),[],!1,null,"65969d69",null);e.default=component.exports;installComponents(component,{AsideHeader:n(960).default,Advertising:n(755).default,Copyright:n(756).default})},959:function(t,e,n){"use strict";n.r(e);n(254);var r=n(33),o=n(714),c=n.n(o),l=n(732),d=["DOC","DOCX","PDF","PPT","TXT","XLS","XLSX"],h={name:"AttachmentList",mixins:[c.a],props:{file:{type:Object,default:function(){}},isPaid:{type:Boolean,default:!1},price:{type:[Number,String],default:0},isPaidAttachment:{type:Boolean,default:!1},attachmentPrice:{type:[Number,String],default:0}},data:function(){return{dialogVisible:!1,previewData:{},previewUrl:"",previewPage:1,previewTotal:1,loading:!1}},computed:{forums:function(){return this.$store.state.site.info.attributes||{}},unpaid:function(){return parseFloat(this.price)>0&&!this.isPaid||parseFloat(this.attachmentPrice)>0&&!this.isPaidAttachment},canReview:function(){return this.forums&&this.forums.qcloud&&this.forums.qcloud.qcloud_cos&&this.forums.qcloud.qcloud_cos_doc_preview&&this.isPreviewType(this.file.extension)&&(0===parseFloat(this.price)&&parseFloat(this.attachmentPrice)>0&&this.isPaidAttachment||parseFloat(this.price)>0&&this.isPaid)&&this.file.isRemote}},methods:{downloadAttachment:function(t){this.unpaid||window.open(t,"_self")},extensionValidate:function(t){return l.extensionList.indexOf(t.toUpperCase())>0?t.toUpperCase():"UNKNOWN"},isPreviewType:function(t){return-1!==d.indexOf(this.extensionValidate(t))},preview:function(t){this.previewUrl=t,this.getPreviewData()},getPreviewData:function(){var t=this;this.dialogVisible=!0,this.loading=!0,Object(r.a)({url:"".concat(this.previewUrl,"&page=").concat(this.previewPage),method:"get"}).then((function(e){t.loading=!1,200===e.status&&e.data&&e.data.data&&+e.data.data["X-Total-Page"]>0?(t.previewData=e.data.data,t.previewTotal=e.data.data["X-Total-Page"]):t.dialogVisible=!1}),(function(e){t.dialogVisible=!1,t.loading=!1,t.handleError(e)}))},prev:function(){this.previewPage-=1,this.getPreviewData()},next:function(){this.previewPage+=1,this.getPreviewData()}}},m=(n(937),n(11)),component=Object(m.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"attachment-item",on:{click:function(e){return e.target!==e.currentTarget?null:t.downloadAttachment(t.file.url,t.file.fileName)}}},[n("div",{staticClass:"info"},[n("div",[n("svg-icon",{staticStyle:{"font-size":"18px","vertical-align":"middle"},attrs:{type:t.extensionValidate(t.file.extension)}}),t._v(" "),n("span",{staticClass:"file-name"},[t._v(t._s(t.file.fileName))])],1),t._v(" "),n("span",{staticClass:"size"},[t._v(t._s(parseInt((t.file.fileSize/1024).toString()).toLocaleString())+"\n      KB")])]),t._v(" "),n("div",{staticClass:"action"},[t.unpaid?n("span",[t._v(t._s(t.$t("post.paidAfterDownload")))]):n("div",[t.canReview?n("span",{staticClass:"download",on:{click:function(e){return e.target!==e.currentTarget?null:t.preview(t.file.url)}}},[t._v(t._s(t.$t("post.preview")))]):t._e(),t._v(" "),n("span",{staticClass:"download",on:{click:function(e){return e.target!==e.currentTarget?null:t.downloadAttachment(t.file.url,t.file.fileName)}}},[t._v(t._s(t.$t("post.download")))])])]),t._v(" "),n("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{visible:t.dialogVisible,"show-close":!1,top:"5vh",width:"800px","element-loading-background":"transparent"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticClass:"dialog-cont"},[n("img",{staticClass:"img",attrs:{src:t.previewData.image,alt:""}})]),t._v(" "),n("div",{staticClass:"pagination",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{class:{hidden:1===t.previewPage},attrs:{type:"primary",size:"medium"},on:{click:t.prev}},[t._v(t._s(t.$t("post.prev")))]),t._v(" "),n("div",{staticClass:"pages"},[t._v(t._s(t.previewPage)+" / "+t._s(t.previewTotal))]),t._v(" "),n("el-button",{class:{hidden:parseInt(t.previewPage)>=parseInt(t.previewTotal)},attrs:{size:"medium",type:"primary"},on:{click:t.next}},[t._v(t._s(t.$t("post.next")))])],1)])],1)}),[],!1,null,"75b90464",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},960:function(t,e,n){"use strict";n.r(e);n(254),n(25);var r=n(734),o=n.n(r),c=n(714),l={name:"AsideHeader",mixins:[n.n(c).a,o.a],props:{author:{type:Object,default:function(){}},billboard:{type:Array,default:function(){return[]}},followStatus:{type:Number,default:0},canOpera:{type:Boolean,default:!1},followLoading:{type:Boolean,default:!1}},data:function(){return{dialog:{id:"",name:""},chatting:!1}},watch:{author:{handler:function(){this.getAuthorInfo()}},deep:!0},mounted:function(){this.getAuthorInfo()},methods:{getAuthorInfo:function(){var t=this;if(this.author.id&&(!this.author.id||-1!==this.author.id))return this.$store.dispatch("jv/get",["users/".concat(this.author.id),{params:{include:"groups,dialog"}}]).then((function(e){e.dialog&&(t.dialog.id=e.dialog._jv.id),t.dialog.name=t.author.username}),(function(e){return t.handleError(e)}))},openChatBox:function(){this.getAuthorInfo(),this.chatting=!0},toprofile:function(t){!this.author.id||parseInt(this.author.id)<0||this.$router.push("/user/".concat(this.author.id,"?current=").concat(t+1))}}},d=(n(940),n(11)),component=Object(d.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"author"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("topic.aboutAuthor")))]),t._v(" "),n("avatar-component",{staticClass:"author-info",attrs:{author:t.author}},[t._v("\n  \n  \n    "+t._s(t.$t("topic.activeAt"))+" "+t._s(t.timerDiff(t.author.updatedAt))+t._s(t.$t("topic.before"))+"\n  ")]),t._v(" "),n("div",{staticClass:"signature"},[t._v(t._s(t.author.signature))]),t._v(" "),n("div",{staticClass:"container-billBoard"},t._l(t.billboard,(function(e,r){return n("div",{key:r,staticClass:"billBoard-item",on:{click:function(e){return t.toprofile(r)}}},[n("div",{staticClass:"text"},[t._v(t._s(e.text))]),t._v(" "),n("div",{staticClass:"count"},[t._v(t._s(e.count))])])})),0),t._v(" "),t.canOpera?n("div",{staticClass:"buttons"},[n("el-button",{attrs:{type:"primary",loading:t.followLoading},on:{click:function(e){0===t.followStatus?t.$emit("follow"):t.$emit("unFollow")}}},[t._v("\n      "+t._s(0===t.followStatus?"+ "+t.$t("profile.following"):1===t.followStatus?t.$t("profile.followed"):t.$t("profile.mutualfollow"))+"\n    ")]),t._v(" "),n("el-button",{on:{click:t.openChatBox}},[t._v(t._s(t.$t("topic.sendMessage")))])],1):t._e(),t._v(" "),t.chatting?n("chat-box",{attrs:{dialog:t.dialog||{}},on:{close:function(e){t.chatting=!1}}}):t._e()],1)}),[],!1,null,"1289b88a",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,ChatBox:n(896).default})}}]);