text: (window.webpackJsonp=window.webpackJsonp||[]).push([[34,7,9],{1038:function(t,e,n){},1039:function(t,e,n){},1040:function(t,e,n){},1041:function(t,e,n){},1042:function(t,e,n){},1043:function(t,e,n){},1044:function(t,e,n){},1045:function(t,e,n){},1046:function(t,e,n){},1047:function(t,e,n){},1059:function(t,e,n){"use strict";n.r(e);n(254),n(25);var o=n(714),r={name:"TopicReport",mixins:[n.n(o).a],props:{threadId:{type:String,default:""},type:{type:Number,default:0},commentId:{type:String,default:""}},data:function(){return{radio:"",inputInfo:"",otherReasonValue:"",currentReport:"",reportData:[{value:"advertisingRubbish",name:"广告垃圾"},{value:"illegalContent",name:"违规内容"},{value:"maliciousIrrigation",name:"恶意灌水"},{value:"repeatPost",name:"重复发帖"},{value:"other",name:"其他"}]}},computed:{currentLoginId:function(){var t=this.$store.getters["session/get"]("userId");return parseInt(t,10)}},mounted:function(){this.otherReasonValue=""},methods:{select:function(t){this.currentReport=t},reportConfirmClick:function(t){var e=this;if(this.currentReport){var n="";if("other"===this.currentReport){if(!this.otherReasonValue)return void this.$message.error(this.$t("report.enterOtherReason"));n=this.otherReasonValue}else this.reportData.forEach((function(t){t.value===e.currentReport&&(n=t.name)}));var o={_jv:{type:"reports"},user_id:this.currentLoginId,thread_id:Number(this.threadId),type:t,reason:"".concat(n)};2===t&&(o.post_id=parseInt(this.commentId)),this.$store.dispatch("jv/post",o).then((function(t){t._jv&&(e.$emit("close"),e.$message.success(e.$t("report.reportSucceed")))}),(function(t){return e.handleError(t)}))}else this.$message.error(this.$t("report.pleaseClickReasons"))},reportCancelClick:function(){this.otherReasonValue="",this.currentReport="",this.$emit("close")}}},c=(n(1174),n(11)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message",{attrs:{title:t.$t("report.reportTitle")},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"reportcontainer"},[n("div",{staticClass:"reportselect"},[n("el-radio-group",{on:{change:t.select},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[n("el-radio",{attrs:{label:"advertisingRubbish"}},[t._v(t._s(this.$t("report.advertisingRubbish")))]),t._v(" "),n("el-radio",{attrs:{label:"illegalContent"}},[t._v(t._s(this.$t("report.illegalContent")))]),t._v(" "),n("el-radio",{attrs:{label:"maliciousIrrigation"}},[t._v(t._s(this.$t("report.maliciousIrrigation")))]),t._v(" "),n("el-radio",{attrs:{label:"repeatPost"}},[t._v(t._s(this.$t("report.repeatPost")))]),t._v(" "),n("el-radio",{staticClass:"otherr",attrs:{label:"other"}},[t._v(t._s(this.$t("report.otherreason")))])],1)],1),t._v(" "),n("div",{staticClass:"other"},[n("el-input",{attrs:{type:"textarea",rows:5,placeholder:t.$t("report.enterOtherReason")},model:{value:t.otherReasonValue,callback:function(e){t.otherReasonValue=e},expression:"otherReasonValue"}})],1)]),t._v(" "),n("div",{staticClass:"confirmbtn"},[n("div",{staticClass:"allbtn"},[n("el-button",{staticClass:"comfirm",attrs:{type:"small"},on:{click:function(e){return t.reportConfirmClick(t.type)}}},[t._v(t._s(this.$t("report.confirm")))]),t._v(" "),n("el-button",{staticClass:"cancel",attrs:{type:"small"},on:{click:t.reportCancelClick}},[t._v(t._s(this.$t("report.cancel")))])],1)])])}),[],!1,null,"f48f247e",null);e.default=component.exports;installComponents(component,{Message:n(785).default})},1172:function(t,e,n){"use strict";n(1038)},1173:function(t,e,n){"use strict";n(1039)},1174:function(t,e,n){"use strict";n(1040)},1175:function(t,e,n){"use strict";n(1041)},1176:function(t,e,n){"use strict";n(1042)},1177:function(t,e,n){"use strict";n(1043)},1178:function(t,e,n){"use strict";n(1044)},1179:function(t,e,n){"use strict";n(1045)},1180:function(t,e,n){"use strict";n(1046)},1181:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdBAMAAACkvXo8AAAAMFBMVEX0Nz9HcEz0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz/0Nz+8Gen2AAAAD3RSTlMhAPHhCaE+0RdgkL2ugm+A/zHcAAAAy0lEQVQY02MQCVKCA+UrAgxi9v8R4KcAg4dnPZz7lVGAgWmF2H4oV7cxtYGB/3+A2Hkw184x+z8DkP//mMAiILdSZPp/CP//NolL/7eJPP4P4wPlJkiA1MD4/y0d4v8j8//r/0fl/0fhF/3//8keic+m/98gH4lfkvSZA1n+u1sBM7L+0IeCc9cj+N8FgaAJSV5JVRjFPiVVaWN9BP+zI1B9P5J81ErZVeeR3fsHVT8G/zca/389Lv/6o/AdGESRuV8FGESCENxPIQIAaU83v1QfDM0AAAAASUVORK5CYII="},1182:function(t,e,n){t.exports=n.p+"img/offer_reward.f77bad5.png"},1183:function(t,e,n){"use strict";n(1047)},1211:function(t,e,n){"use strict";n.r(e);var o=n(734),r=n.n(o),c=n(739),l=n.n(c),d={name:"TopicHeader",mixins:[r.a],props:{author:{type:Object,default:function(){}},thread:{type:Object,default:function(){}},managementList:{type:Array,default:function(){return[]}},beAskedUser:{type:Object,default:function(){}}},data:function(){return{isManagementDrop:!1,isReport:!1}},methods:{handleCommand:function(t){var e=t.command,n=t.item;return"toEdit"===e?this.$router.push("/thread/postpay?type=".concat(this.thread.thread.type)+"&operating=edit"+"&threadId=".concat(this.thread.thread.id)+"&categoryId=".concat(this.thread.category.id)):"isDeleted"===e?this.deleteConfirm(n):void this.$emit("managementSelected",n)},deleteConfirm: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(){return e.$emit("managementSelected",t)}))},publishTime:function(t){return l()(t).format("YYYY-MM-DD HH:mm:ss")},reportClick:function(){this.isReport=!0}}},h=(n(1172),n(1173),n(11)),component=Object(h.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"title"},[t.thread.thread&&5!==t.thread.thread.type?n("avatar-component",{attrs:{author:t.author}},[t._v("\n    "+t._s(t.$t("topic.publishAt"))+"\n    "+t._s(t.timerDiff(t.thread.thread?t.thread.thread.createdAt:"")+t.$t("topic.before"))+" .. （"+t._s(t.$t("topic.editAt"))+"\n    "+t._s(t.timerDiff(t.thread.firstPost?t.thread.firstPost.updatedAt:"")+t.$t("topic.before"))+"）\n  ")]):n("avatar-component",{attrs:{author:t.author}},[t.thread.question&&0===t.thread.question.type?n("span",[t._v("\n      悬赏发布于"+t._s(t.publishTime(t.thread.thread?t.thread.thread.createdAt:""))+"\n    ")]):n("span",[t._v("\n      "+t._s(t.timerDiff(t.thread.thread?t.thread.thread.createdAt:"")+t.$t("topic.before")+"..."+t.$t("topic.to"))+"\n      "),n("nuxt-link",{staticClass:"be-ask-user",attrs:{to:"/user/"+t.beAskedUser.id}},[t._v(t._s(" @"+t.beAskedUser.username))]),t._v("\n      "+t._s(" "+t.$t("topic.ask"))+"\n    ")],1)]),t._v(" "),n("div",{staticClass:"container-management"},[t.thread.thread&&0===t.thread.thread.isApproved?n("div",{staticClass:"checking"},[t._v("审核中")]):t._e(),t._v(" "),n("el-dropdown",{directives:[{name:"show",rawName:"v-show",value:t.managementList.length>0&&t.managementList.some((function(t){return t.canOpera})),expression:"\n        managementList.length > 0 &&\n          managementList.some(item => item.canOpera)\n      "}],staticClass:"dropdown",attrs:{placement:"bottom",trigger:"click"},on:{command:t.handleCommand,"visible-change":function(e){return t.isManagementDrop=e}}},[n("div",{class:{management:!0,"on-drop":t.isManagementDrop}},[n("svg-icon",{staticClass:"icon-setting",staticStyle:{"font-size":"16px"},attrs:{type:"setting"}}),t._v(" "),n("span",[t._v(" "+t._s(t.$t("topic.management"))+" ")])],1),t._v(" "),n("el-dropdown-menu",{staticStyle:{padding:"10px"},attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.managementList,(function(e,o){return n("el-dropdown-item",{key:o,staticClass:"dropdown-item",attrs:{command:{command:e.command,item:e}}},[t._v("\n          "+t._s(e.text)+"\n        ")])})),1)],1),t._v(" "),n("div",{staticClass:"report",on:{click:t.reportClick}},[n("svg-icon",{staticClass:"icon-setting",staticStyle:{"font-size":"16px"},attrs:{type:"report"}}),t._v(" "),n("span",[t._v(t._s(t.$t("report.reportTitle")))])],1),t._v(" "),t.isReport?n("topic-report",{attrs:{"thread-id":t.thread.id,type:1},on:{close:function(e){t.isReport=!1}}}):t._e(),t._v(" "),t.thread.isEssence?n("div",{staticClass:"essence"},[n("svg-icon",{staticStyle:{"font-size":"25px"},attrs:{type:"essence"}})],1):t._e()],1)],1)}),[],!1,null,"760f97ec",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,SvgIcon:n(62).default,TopicReport:n(1059).default})},1212:function(t,e,n){"use strict";n.r(e);n(254),n(13);var o=n(734),r=n.n(o),c=n(864),l=n.n(c),d=n(891),h=n.n(d),m=n(714),f=n.n(m),v=n(800),y=n.n(v),_={name:"QaActions",mixins:[r.a,l.a,h.a,f.a,y.a],props:{question:{type:Object,default:function(){}},questionUserId:{type:[String,Number],default:""},currentUserId:{type:[String,Number],default:""}},data:function(){return{answerType:{type:15,textLimit:5e3,showPayment:!1,showTitle:!1,showImage:!0,showVideo:!1,showAttached:!1,showEmoji:!0,showTopic:!1,showCaller:!0,placeholder:"写下我的评论 ..."},editResourceShow:{showUploadImg:!1,showUploadVideo:!1,showUploadAttached:!1},answer:{text:"",imageList:[],attachedList:[]},onAnswerPublish:!1,showAnswerEditor:!1}},computed:{isQuestionUser:function(){return parseInt(this.questionUserId)===parseInt(this.currentUserId)},isBeAskedUser:function(){return parseInt(this.question.beUserId)===parseInt(this.currentUserId)},showAnswer:function(){return 0!==this.question.isAnswer&&!(!this.isBeAskedUser&&!this.isQuestionUser&&"0"===this.question.onlookerState&&this.question.onlookerPrice>0)},showAnswerButton:function(){return this.isBeAskedUser&&0===this.question.isAnswer},showOnLookerButton:function(){return!this.isBeAskedUser&&!this.isQuestionUser&&this.question.onlookerUnitPrice>0&&!this.question.onlookerState&&1===this.question.isAnswer},forums:function(){return this.$store.state.site.info.attributes||{}},siteMasterScale:function(){return this.forums&&this.forums.set_site?this.forums.set_site.site_master_scale/10:""},siteUserScale:function(){return 1-this.siteMasterScale}},methods:{closeEditor:function(){this.answer.text="",this.answer.imageList=[],this.showAnswerEditor=!1},answerPublish:function(){var t=this;if(this.isLogin()&&!this.onAnswerPublish){if(!this.answer.text)return this.$message.warning(this.$t("post.theContentCanNotBeBlank"));if(this.answer.text.length>this.answerType.textLimit)return this.$message.warning(this.$t("post.messageLengthCannotOver"));this.onAnswerPublish=!0;var e=this.question.id,n={_jv:{type:"answer",links:{self:"questions/".concat(e,"/answer")},relationships:{attachments:{data:[]}}},content:this.answer.text,type:5};return this.publishPostResource(n,this.answer),this.$store.dispatch("jv/post",[n,{url:"/questions/".concat(e,"/answer")}]).then((function(e){t.postLegalityCheck(e,t.$t("topic.answerPublishSuccess")),t.$emit("answerPublished"),t.closeEditor()}),(function(e){return t.handleError(e)})).finally((function(){t.onAnswerPublish=!1}))}}}},w=(n(1175),n(1176),n(11)),component=Object(w.a)(_,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"qa"},[t.showAnswer?n("div",{staticClass:"block answer"},[n("div",{staticClass:"header"},[n("avatar-component",{attrs:{size:40,round:"",author:t.question.beUser||{}}},[t._v("\n        "+t._s(t.timerDiff(t.question.answeredAt)+t.$t("topic.before"))+".. 回答\n      ")]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.question.onlookerNumber,expression:"question.onlookerNumber"}],staticClass:"counter"},[n("span",[t._v(t._s(t.question.onlookerNumber+"人阅读"))]),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.question.onlookerNumber>0,expression:"question.onlookerNumber > 0"}]},[t._v(", "+t._s(t.question.onlookerNumber+"人已支付"))])])],1),t._v(" "),n("div",{staticClass:"answer-text content-html",domProps:{innerHTML:t._s(t.$xss(t.question.contentHtml))}}),t._v(" "),t.question.images&&t.question.images.length>0?n("div",{directives:[{name:"viewer",rawName:"v-viewer",value:{url:"data-source"},expression:"{ url: 'data-source' }"}],staticClass:"images"},t._l(t.question.images,(function(image,t){return n("el-image",{key:t,staticClass:"image",attrs:{"data-source":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._e(),t._v(" "),t.showAnswerButton?n("div",{staticClass:"block answer-btn"},[n("button",{on:{click:function(e){t.showAnswerEditor=!0}}},[n("svg-icon",{staticStyle:{"font-size":"15px"},attrs:{type:"question"}}),t._v(" "),n("span",[t._v(t._s(t.$t("topic.answerQuestion")))])],1),t._v(" "),n("div",{staticClass:"tip"},[n("span",{directives:[{name:"show",rawName:"v-show",value:parseFloat(t.question.price)>0,expression:"parseFloat(question.price) > 0"}]},[n("span",[t._v(t._s(t.$t("topic.answerCanGet")))]),t._v(" "),n("span",{staticClass:"amount"},[t._v("\n          ￥"+t._s(t.question.price)+"\n        ")]),t._v(" "),n("span",[t._v(t._s(t.$t("post.yuan"))+"。")])]),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.question.isOnlooker&&t.siteUserScale>0,expression:"question.isOnlooker && siteUserScale > 0"}]},[n("span",[t._v(t._s(t.$t("topic.answerTip")))]),t._v(" "),n("span",{staticClass:"amount"},[t._v("￥\n          "+t._s((parseFloat(t.question.onlookerUnitPrice)*t.siteUserScale/2).toFixed(2))+"\n        ")]),t._v(" "),n("span",[t._v(t._s(t.$t("post.yuan"))+"。")])])])]):t._e(),t._v(" "),t.showOnLookerButton?n("div",{staticClass:"block looker-btn"},[n("button",{on:{click:function(e){return t.$emit("payForAnswer")}}},[n("svg-icon",{staticStyle:{"font-size":"15px"},attrs:{type:"yuan"}}),t._v(" "),n("span",[t._v(t._s(t.$t("topic.payAmountCanWatch",{amount:t.question.onlookerUnitPrice})))])],1)]):t._e(),t._v(" "),n("el-dialog",{attrs:{title:t.$t("topic.answerQuestion"),visible:t.showAnswerEditor,"destroy-on-close":"",width:"820px"},on:{"update:visible":function(e){t.showAnswerEditor=e}}},[n("editor",{staticClass:"edit-answer-editor",attrs:{"editor-style":"comment",selector:"edit-answer-editor","edit-resource-show":t.editResourceShow,"on-publish":t.onAnswerPublish,"type-information":t.answerType,post:t.answer},on:{"update:post":function(e){t.answer=e},publish:t.answerPublish}})],1)],1)}),[],!1,null,"163652b9",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,SvgIcon:n(62).default,Editor:n(796).default})},1213:function(t,e,n){"use strict";n.r(e);n(254);var o=n(800),r={name:"TopicRewardList",mixins:[n.n(o).a],props:{paidCount:{type:Number,default:0},rewardedCount:{type:Number,default:0},author:{type:Object,default:function(){}},userLists:{type:Array,default:function(){return[]}},paidInformation:{type:Object,default:function(){}},threadType:{type:Number,default:0},canReward:{type:Boolean,default:!1},canPaid:{type:Boolean,default:!1}},data:function(){return{payButtonText:["",this.$t("topic.paymentViewRemainingContent"),this.$t("topic.paymentViewVideo"),this.$t("topic.paymentViewPicture"),this.$t("topic.paymentViewAudio")],command:[{value:24,title:"pay",buttonText:this.$t("topic.pay"),showButton:!1,icon:"pay"},{value:24,title:"reward",buttonText:this.$t("topic.reward"),showButton:!1,icon:"heart"},{value:24,title:"like"},{value:24,title:"pay",buttonText:this.$t("topic.pay"),showButton:!1,icon:"pay"}]}},watch:{paidInformation:{handler:function(t){this.command[0].showButton=parseFloat(t.price)>0&&!t.paid&&this.canPaid,this.command[3].showButton=parseFloat(t.attachmentPrice)>0&&!t.isPaidAttachment&&this.canPaid,this.command[1].showButton=0===parseFloat(t.price)&&0===parseFloat(t.attachmentPrice)&&this.canReward,this.command[3].buttonText=this.$t("topic.pay")+this.paidInformation.attachmentPrice+this.$t("topic.paymentViewAttachment")},deep:!0},threadType:function(t){this.command[0].buttonText=this.$t("topic.pay")+this.paidInformation.price+this.payButtonText[t]}},methods:{showMore:function(t,e){t.value<e?t.value+=24:t.value=24},onClick:function(t,e){if(this.isLogin()){var n=this.$store.state.user.info.id;return parseInt(n)===parseInt(this.author.id)?this.$message.error(this.$t("topic.iCantRewardMyself")):this.$emit("payOrReward",t[e].title)}}}},c=(n(1177),n(11)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"global"},t._l(t.userLists,(function(e,o){return n("div",{key:o,staticClass:"group"},[0===o&&t.paidCount>0?n("div",{staticClass:"title"},[t._v("\n      "+t._s(t.paidCount+t.$t("topic.personUnit")+t.$t("topic."+t.command[o].title))+"\n    ")]):1===o&&t.rewardedCount>0&&t.canReward?n("div",{staticClass:"title"},[t._v("\n      "+t._s(t.rewardedCount+t.$t("topic.personUnit")+t.$t("topic."+t.command[o].title))+"\n    ")]):o>1&&e.length>0?n("div",{staticClass:"title"},[t._v("\n      "+t._s(e.length+t.$t("topic.personUnit")+t.$t("topic."+t.command[o].title))+"\n    ")]):t._e(),t._v(" "),e.length>0?n("div",{staticClass:"person-list"},[n("div",{staticClass:"first-show"},[t._l(e.slice(0,t.command[o].value),(function(t,e){return[n("Avatar",{key:e,staticClass:"container-avatar",attrs:{size:"30",round:"",user:t}})]}))],2)]):t._e(),t._v(" "),e.length>24?n("div",{class:{rotate:t.command[o].value>e.length},on:{click:function(n){return t.showMore(t.command[o],e.length)}}},[n("svg-icon",{staticStyle:{"font-size":"20px","margin-top":"10px",fill:"#8590A6"},attrs:{type:"drop-down"}})],1):t._e(),t._v(" "),t.command[o].showButton&&t.command[o].buttonText&&5!==t.threadType&&6!==t.threadType?n("button",{on:{click:function(e){return t.onClick(t.command,o)}}},[n("svg-icon",{staticStyle:{"font-size":"16px",fill:"white","margin-right":"10px"},attrs:{type:t.command[o].icon}}),t._v(" "),n("span",[t._v(t._s(t.command[o].buttonText))])],1):t._e()])})),0)}),[],!1,null,"6500f19f",null);e.default=component.exports;installComponents(component,{Avatar:n(255).default,SvgIcon:n(62).default})},1214:function(t,e,n){"use strict";n.r(e);var o={name:"TopicActions",props:{actions:{type:Array,default:function(){return[]}},threadId:{type:String,default:""}},methods:{onClick:function(t){t.command&&this.$emit("clickAction",t)},copyLink:function(){var t=document.createElement("input");t.value=window.location.href,t.id="copyInput",document.body.appendChild(t),t.select(),document.execCommand("Copy"),this.$message.success("链接复制成功"),setTimeout((function(){t.remove()}),100)}}},r=(n(1178),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"actions"},[t._l(t.actions.slice(0,3),(function(e,o){return n("button",{key:o,class:{action:!0,disabled:!e.canOpera},attrs:{disabled:!e.canOpera},on:{click:function(n){return t.onClick(e)}}},[n("svg-icon",{staticClass:"action-icon",attrs:{type:e.icon}}),t._v(" "),n("span",{staticClass:"content"},[n("span",[t._v(t._s(e.text))]),t._v(" "),e.count?n("span",[t._v(" ("+t._s(e.count)+")")]):t._e()])],1)})),t._v(" "),n("div",{staticClass:"action"},[n("share-popover",{attrs:{"threads-id":t.threadId}},[n("div",{staticClass:"btn share"},[n("button",{class:{action:!0,disabled:!t.actions[3].canOpera},attrs:{slot:"reference",disabled:!t.actions[3].canOpera},slot:"reference"},[n("svg-icon",{staticClass:"action-icon",attrs:{type:t.actions[3].icon}}),t._v(" "),n("span",{staticClass:"content"},[n("span",[t._v(t._s(t.actions[3].text))]),t._v(" "),t.actions[3].count?n("span",[t._v(" ("+t._s(t.actions[3].count)+")")]):t._e()])],1)])])],1)],2)}),[],!1,null,"3d197d04",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,SharePopover:n(722).default})},1215:function(t,e,n){"use strict";n.r(e);var o=n(85),r=n(9),c=n(8),l=(n(31),n(13),n(35),n(39),n(864)),d=n.n(l),h=n(891),m=n.n(h),f=n(714),v=n.n(f),y=n(734),_=n.n(y),w=n(800),C=n.n(w),P=n(725),x={name:"Comment",mixins:[v.a,d.a,m.a,m.a,C.a,_.a],props:{threadId:{type:String,default:"0"},author:{type:Object,default:function(){}},currentUser:{type:Object,default:function(){}},rewardQuestion:{type:Object,default:function(){}}},data:function(){return{forumsInfo:{},userInfo:{},commentList:[],postCount:0,pageLimit:5,pageNumber:1,isPositiveSort:!0,onCommentPublish:!1,onEditCommentPublish:!1,comment:{text:"",imageList:[],attachedList:[]},editResourceShow:{showUploadImg:!1,showUploadVideo:!1,showUploadAttached:!1},editCommentPost:{text:"",imageList:[],attachedList:[]},editComment:{},editCommentID:"",commentType:{type:10,textLimit:5e3,showPayment:!1,showTitle:!1,showImage:!0,showVideo:!1,showAttached:!1,showEmoji:!0,showTopic:!1,showCaller:!0,placeholder:"写下我的评论 ..."},commitLoading:!1,scrollLoading:!1,afterPushComment:!0,threadPostCount:0}},created:function(){this.getComment("scroll"),this.preThreadsPostsData=null,this.preThreadsPostsLoading=!1},mounted:function(){this.getUserInfo(),this.getForumsInfo()},methods:{getUserInfo:function(){var t=this,e=this.$store.getters["session/get"]("userId");this.$store.dispatch("jv/get",["users/".concat(e),{params:{include:""}}]).then((function(e){e&&e._jv&&e._jv.id&&(t.userInfo=e)}))},getForumsInfo:function(){var t=this;this.$store.dispatch("jv/get",["forum",{params:{include:""}}]).then((function(e){e&&e._jv&&e._jv.id&&(t.forumsInfo=e)}))},preLoadThreads:function(){var t=this;if(!this.preThreadsPostsData&&!this.preThreadsPostsLoading){this.preThreadsPostsLoading=!0;var e={page:this.pageNumber,perPage:this.pageLimit,"filter[thread]":this.threadId,sort:this.isPositiveSort?"createdAt":"-createdAt"};return P.a.readCommentList({params:e}).then((function(n){t.preThreadsPostsData=Object(c.a)({},e.page,n)})).catch((function(){t.preThreadsPostsData=null})).finally((function(){t.preThreadsPostsLoading=!1,t.commitLoading=!1,t.scrollLoading=!1}))}},scrollPost: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:if(!t.preThreadsPostsLoading){e.next=2;break}return e.abrupt("return");case 2:if(!(t.postCount>t.commentList.length)){e.next=8;break}return e.next=5,t.preLoadThreads();case 5:t.getComment("scroll"),e.next=10;break;case 8:t.scrollLoading=!1,t.preThreadsPostsLoading=!0;case 10:case"end":return e.stop()}}),e)})))()},loadMore:function(){this.getComment("scroll")},getComment:function(t){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,c,data,l;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.commitLoading){n.next=2;break}return n.abrupt("return");case 2:if("commit"===t?e.commitLoading=!0:e.scrollLoading=!0,r={page:e.pageNumber,perPage:e.pageLimit,"filter[thread]":e.threadId,sort:e.isPositiveSort?"createdAt":"-createdAt"},n.prev=4,!e.preThreadsPostsData||!e.preThreadsPostsData[e.pageNumber]){n.next=10;break}c=e.preThreadsPostsData[e.pageNumber],e.preThreadsPostsData=null,n.next=14;break;case 10:return e.preThreadsPostsData=null,n.next=13,P.a.readCommentList({params:r});case 13:c=n.sent;case 14:data=c.Data.pageData,e.pageNumber+=1,e.postCount=data.length>0?c.Data.totalCount:0,c.Data.currentPage<=c.Data.totalPage&&(l=e.commentList).push.apply(l,Object(o.a)(data)),e.commentList.forEach((function(t){t.isShowReport=!1})),e.commitLoading=!1,e.scrollLoading=!1,n.next=26;break;case 23:n.prev=23,n.t0=n.catch(4),e.handleError(n.t0);case 26:case"end":return n.stop()}}),n,null,[[4,23]])})))()},updateSingleComment:function(t){var e=this;if(!0!==this.commitLoading)return this.commitLoading=!0,this.$store.dispatch("jv/get",["posts/".concat(t),{params:{include:"user,likedUsers,commentPosts,commentPosts.user,commentPosts.user.groups,commentPosts.replyUser,commentPosts.replyUser.groups,commentPosts.mentionUsers,commentPosts.images,images,attachments,commentPosts.commentUser"}}]).then((function(n){n.lastThreeComments=n.commentPosts.reverse().filter((function(t){return!t.isDeleted})).slice(0,3),e.$set(e.commentList,e.getCommentIndexFromId(t),n),e.commitLoading=!1,e.postCount>e.commentList.length?e.scrollLoading=!0:e.scrollLoading=!1}),(function(t){return e.handleError(t)})).finally((function(){e.commitLoading=!1}))},changeSort:function(t){this.scrollLoading=!0,this.pageNumber=1,this.preThreadsPostsData=null,this.commentList=[],this.isPositiveSort=t,this.getComment("commit")},onLike:function(t,e,n,o){var r=this,c={pid:t.id,data:{attributes:{isLiked:!t.isLiked}}};return P.a.updatePosts({data:c}).then((function(data){if("comment"===n){if(data&&r.commentList[e]){var t=data.Data,c=t.likeCount,l=t.isLiked,d=t.redPacketAmount;r.commentList[e].likeCount=c,r.commentList[e].isLiked=l,r.commentList[e].redPacketAmount=d}}else r.commentList[o].lastThreeComments[e].likeCount=data.Data.likeCount,r.commentList[o].lastThreeComments[e].isLiked=data.Data.isLiked}),(function(t){return r.handleError(t)}))},onAdoption:function(t){var e=this,n=t.commentId,o=t.rewards,r={_jv:{type:"posts/reward"},thread_id:+this.threadId,rewards:+o,post_id:+n};return this.$store.dispatch("jv/post",r).then((function(data){e.pageNumber=1,e.preThreadsPostsData=null,e.commentList=[],e.postCount=0,e.getComment()}),(function(t){return e.handleError(t)}))},deleteComment:function(t){var e=this,n={_jv:{type:"posts",id:t},isDeleted:!0};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(){return e.$store.dispatch("jv/patch",n).then((function(){e.postCount-=1,e.commentList.splice(e.getCommentIndexFromId(t),1),e.$message.success(e.$t("topic.deleteSuccess"))}),(function(t){return e.handleError(t)}))}),(function(){}))},deleteReply:function(t){var e=this,n=t.replyId,o=t.commentId,r={_jv:{type:"posts",id:n},isDeleted:!0};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(){return e.$store.dispatch("jv/patch",r).then((function(){e.updateSingleComment(o),e.$message.success(e.$t("topic.deleteSuccess"))}),(function(t){return e.handleError(t)}))}),(function(){}))},onEditComment:function(t,data){data&&(this.editCommentID=data),this.editComment=t,this.editCommentPost.text=t.content,this.$nextTick((function(){var textarea=document.querySelector(".edit-comment-editor #textarea");textarea.style.height="".concat(textarea.scrollHeight,"px")})),t.images.length>0&&(this.initThreadResource(this.editCommentPost.imageList,t.images),this.editResourceShow.showUploadImg=!0)},postEditCommentPublish:function(){var t=this;if(this.isLogin()&&!this.onEditCommentPublish){if(!this.editCommentPost.text)return this.$message.warning(this.$t("post.theContentCanNotBeBlank"));if(this.editCommentPost.text.length>this.commentType.textLimit)return this.$message.warning(this.$t("post.messageLengthCannotOver"));this.onEditCommentPublish=!0;var e={pid:this.editComment.id,data:{attributes:{content:this.editCommentPost.text},relationships:{}}};this.threadId&&(e.data.id=parseInt(this.threadId)),e=this.editPublishPostResource(e,this.editCommentPost),this.deleteAttachmentsAfterEdit(this.editComment.images,this.editCommentPost.imageList),P.a.updatePosts({data:e}).then((function(e){t.editCommentID?t.updateSingleComment(t.editCommentID):t.updateSingleComment(t.editComment.id),t.newPostLegalityCheck(e,t.$t("topic.commentPublishSuccess")),t.closeEditPop()}),(function(e){return t.handleError(e)})).finally((function(){t.onEditCommentPublish=!1}))}},closeEditPop:function(){this.editComment={},this.editCommentPost.text="",this.editCommentPost.imageList=[],this.editResourceShow.showUploadImg=!1},initThreadResource:function(t,e){e.forEach((function(e){var n={name:e.fileName,url:e.thumbUrl,id:e.id,deleted:!1};t.push(n)}))},isPublishNeedRealName:function(){if(!this.forumsInfo.other.publish_need_real_name)return!0;if(this.forumsInfo.other.publish_need_real_name){if(!this.userInfo.isReal)return this.$message.warning(this.$t("请先实名认证")),!1;if(this.userInfo.isReal)return!0}},isPublishNeedBindPhone:function(){if(!this.forumsInfo.other.publish_need_bind_phone)return!0;if(this.forumsInfo.other.publish_need_bind_phone){if(""===this.userInfo.mobile)return this.$message.warning(this.$t("请先绑定手机")),!1;if(""!==this.userInfo.mobile)return!0}},postCommentPublish:function(){var t=this;if(this.isLogin()&&!this.onCommentPublish&&this.isPublishNeedRealName()&&this.isPublishNeedBindPhone()){if(!this.comment.text)return this.$message.warning(this.$t("post.theContentCanNotBeBlank"));if(this.comment.text.length>this.commentType.textLimit)return this.$message.warning(this.$t("post.messageLengthCannotOver"));this.onCommentPublish=!0;var e={id:this.threadId,content:this.comment.text};return this.newPublishPostResource(e,this.comment),P.a.createPosts({data:e}).then((function(e){"操作太频繁了，请稍后再试"!==e.Message&&(t.comment.text="",t.comment.imageList=[],t.afterPushComment=!1,t.$nextTick((function(){t.afterPushComment=!0})),t.newPostLegalityCheck(e,t.$t("topic.commentPublishSuccess")),t.isPositiveSort?t.commentList.length===t.postCount&&t.commentList.push(e.Data):t.commentList.unshift(e.Data),t.postCount+=1)}),(function(e){return t.handleError(e)})).finally((function(){t.onCommentPublish=!1}))}},getCommentIndexFromId:function(t){var e=this.commentList.filter((function(e){return e.id===t}))[0];return this.commentList.indexOf(e)},reportShow:function(t,e){this.commentList[t].isShowReport=0===e,this.commentList=Object.assign([],this.commentList)}}},k=(n(1179),n(1180),n(11)),component=Object(k.a)(x,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.postCount>0?n("comment-header",{attrs:{"comment-count":t.postCount,"is-positive-sort":t.isPositiveSort},on:{changeSort:t.changeSort}}):n("div",{staticClass:"without-comment"},[t._v(t._s(t.$t("topic.noComment")))]),t._v(" "),t.afterPushComment?n("editor",{staticClass:"comment-editor",attrs:{"editor-style":"comment",selector:"comment-editor","type-information":t.commentType,post:t.comment,"on-publish":t.onCommentPublish},on:{"update:post":function(e){t.comment=e},publish:t.postCommentPublish}}):t._e(),t._v(" "),t.postCount>0?[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.commitLoading,expression:"commitLoading"}],staticStyle:{"min-height":"100px"}},[n("comment-list",{attrs:{author:t.author,"current-user":t.currentUser,"reward-question":t.rewardQuestion,"thread-id":t.threadId,"comment-list":t.commentList,"is-publish-need-bind-phone":t.isPublishNeedBindPhone,"is-publish-need-real-name":t.isPublishNeedRealName},on:{replyPublish:t.updateSingleComment,deleteComment:t.deleteComment,deleteReply:t.deleteReply,editComment:t.onEditComment,like:t.onLike,adoption:t.onAdoption,reportShow:t.reportShow}})],1),t._v(" "),n("list-load-more",{attrs:{loading:t.scrollLoading,length:t.commentList.length,"has-more":t.postCount>t.commentList.length,"page-num":t.pageNumber},on:{loadMore:t.loadMore,scrollPost:t.scrollPost}})]:t._e(),t._v(" "),n("el-dialog",{attrs:{title:t.$t("topic.editComment"),visible:Object.keys(t.editComment).length>0,width:"820px","destroy-on-close":""},on:{close:t.closeEditPop}},[n("avatar-component",{attrs:{author:t.editComment.user||{},size:50}},[t._v("\n      "+t._s(t.$t("topic.publishAt")+" "+t.timerDiff(t.editComment.updatedAt)+t.$t("topic.before"))+"..\n    ")]),t._v(" "),n("editor",{staticClass:"edit-comment-editor",staticStyle:{"margin-top":"20px"},attrs:{"editor-style":"comment",selector:"edit-comment-editor","edit-resource-show":t.editResourceShow,"on-publish":t.onEditCommentPublish,"type-information":t.commentType,post:t.editCommentPost,"is-edit":!0},on:{"update:post":function(e){t.editCommentPost=e},publish:t.postEditCommentPublish}})],1)],2)}),[],!1,null,"643b2655",null);e.default=component.exports;installComponents(component,{CommentHeader:n(952).default,Editor:n(796).default,CommentList:n(1221).default,ListLoadMore:n(728).default,AvatarComponent:n(753).default})},1221:function(t,e,n){"use strict";n.r(e);n(254),n(45),n(13);var o=n(714),r=n.n(o),c=n(800),l=n.n(c),d=n(864),h=n.n(d),m=n(891),f=n.n(m),v=n(734),y=n.n(v),_=n(717),w=n(739),C=n.n(w),P=n(904),x=n(725),k={name:"CommentList",mixins:[r.a,y.a,h.a,f.a,l.a],props:{author:{type:Object,default:function(){}},currentUser:{type:Object,default:function(){}},rewardQuestion:{type:Object,default:function(){}},commentList:{type:Array,default:function(){return[]}},threadId:{type:String,default:""},isPublishNeedRealName:{type:Function,default:function(){}},isPublishNeedBindPhone:{type:Function,default:function(){}}},data:function(){return{replyList:[],onReplyPublish:!1,twoShowReplyEditorForIndex:-1,threeShowReplyEditorForIndex:-1,replyPost:{text:"",imageList:[],attachedList:[]},replyType:{type:10,textLimit:5e3,showPayment:!1,showTitle:!1,showImage:!0,showVideo:!1,showAttached:!1,showEmoji:!0,showTopic:!1,showCaller:!0,placeholder:"写下我的评论 ..."},showAllReply:!1,replyLoading:!1,isShield:!1,commentId:"",showAdoptionBox:!1,percentVal:0,currentCommentId:0,commentPostId:"",commentUserId:""}},computed:{canAdoption:function(){return this.author.id===this.currentUser.id},adoptionMoney:function(){return Number((this.percentVal*+this.rewardQuestion.money/100).toFixed(2))}},watch:{commentList:{handler:function(t){this.showAllReply||(this.replyList=t.map((function(t){return t.lastThreeComments})))},deep:!0,immediate:!0}},methods:{openAdoption:function(t){if(t.user.id===this.author.id)return this.$message.warning("自己不能采纳自己");this.currentCommentId=t.id,this.showAdoptionBox=!this.showAdoptionBox},closeAdoption:function(){this.showAdoptionBox=!1},confirmAdoption:function(t){return this.percentVal?this.percentVal<=0||this.percentVal>100?this.$message.warning("采纳百分比取值为0 ~ 100 (不包含0)"):Number(this.rewardQuestion.remain_money)<this.adoptionMoney?this.$message.warning("悬赏金额不足！"):(this.$emit("adoption",{commentId:this.currentCommentId,rewards:this.adoptionMoney}),this.showAdoptionBox=!1,void(this.percentVal=0)):this.$message.warning("请输入采纳百分比！")},cancel:function(){this.showAdoptionBox=!1,this.percentVal=0},formatDate:function(t){return C()(t).format("YYYY-MM-DD HH:mm")},formatSummary:function(t){var html;return html=t.content!==t.summaryText?"".concat(Object(P.a)(t.summary),'<button class="showAllComment">').concat(this.$t("topic.all"),"</button>"):Object(P.a)(t.contentHtml),_.a.parse(html)},formatReplySummary:function(html){var t=Object(P.a)(html);return _.a.parse(t)},showAll:function(t,e){t.target.matches(".showAllComment")&&this.$router.push("/thread/comment?threadId=".concat(this.threadId,"&commentId=").concat(e.id))},replyPublish:function(t,e){var n=this;if(this.isLogin()){if(!this.replyPost.text)return this.$message.warning(this.$t("post.theContentCanNotBeBlank"));if(this.replyPost.text.length>this.replyType.textLimit)return this.$message.warning(this.$t("post.messageLengthCannotOver"));this.onReplyPublish=!0;var o={id:parseInt(this.threadId),content:this.replyPost.text,replyId:t,isComment:!0};return e&&(o.commentPostId=this.commentPostId,o.commentUserId=this.commentUserId),this.newPublishPostResource(o,this.replyPost),x.a.createPosts({data:o}).then((function(o){"操作太频繁了，请稍后再试"!==o.Message&&(n.replyPost.text="",n.replyPost.imageList=[],n.twoShowReplyEditorForIndex=-1,n.threeShowReplyEditorForIndex=-1,n.newPostLegalityCheck(o,n.$t("topic.replyPublishSuccess")),e?n.$emit("replyPublish",e):n.$emit("replyPublish",t))}),(function(t){return n.handleError(t)})).finally((function(){n.onReplyPublish=!1}))}},toShield:function(t){this.isShield=!0,this.commentId=t},toReply:function(t,e,n){this.isPublishNeedRealName()&&this.isPublishNeedBindPhone()&&(this.replyType.placeholder="回复 ".concat(t.username||t.userName),n?(this.commentPostId!==n.id&&(this.threeShowReplyEditorForIndex=-1),this.threeShowReplyEditorForIndex=this.threeShowReplyEditorForIndex===e?-1:e,this.twoShowReplyEditorForIndex=-1,this.commentPostId=n.id,this.commentUserId=t.id):(this.twoShowReplyEditorForIndex=this.twoShowReplyEditorForIndex===e?-1:e,this.threeShowReplyEditorForIndex=-1,this.commentPostId="",this.commentUserId=""))},beforeHandleCommand:function(t,data){return{command:t,data:data}},commentManagement:function(t){"editComment"===t.command?this.$emit("editComment",t.data):this.$emit("deleteComment",t.data)},beforeHandleReply:function(t,e,n){return{sign:t,reply:e,commentId:n}},replyManagement:function(t){"deleteReply"===t.sign?this.$emit("deleteReply",{replyId:t.reply,commentId:t.commentId}):this.$emit("editComment",t.reply,t.commentId)}}},$=(n(1183),n(11)),component=Object($.a)(k,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t._l(t.commentList,(function(e,r){return o("div",{key:r,staticClass:"comment",on:{mouseenter:function(e){return t.$emit("reportShow",r,0)},mouseleave:function(e){return t.$emit("reportShow",r,1)}}},[o("div",{staticClass:"title"},[o("div",{staticClass:"title-info"},[o("avatar-component",{attrs:{author:e.user,size:30}}),t._v(" "),o("div",{staticClass:"time"},[t._v(t._s(t.formatDate(e.updatedAt)))])],1),t._v(" "),o("div",{staticClass:"management",on:{click:function(t){return t.stopPropagation(),function(){}.apply(null,arguments)}}},[e.isShowReport?o("div",{staticClass:"report",on:{click:function(n){return t.toShield(e.id)}}},[t._v("\n          "+t._s(t.$t("report.reportTitle"))+"\n        ")]):t._e(),t._v(" "),0===e.isApproved?o("div",{staticClass:"checking"},[t._v("\n          "+t._s(t.$t("topic.inReview"))+"\n        ")]):t._e(),t._v(" "),e.canEdit||e.canHide?o("el-dropdown",{staticClass:"filter-dropdown",attrs:{size:"medium"},on:{command:t.commentManagement}},[o("span",{staticClass:"el-dropdown-link"},[t._v("\n            "+t._s(t.$t("topic.management"))+"\n          ")]),t._v(" "),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.canEdit?o("el-dropdown-item",{attrs:{command:t.beforeHandleCommand("editComment",e)}},[t._v("\n              "+t._s(t.$t("topic.edit"))+"\n            ")]):t._e(),t._v(" "),e.canHide?o("el-dropdown-item",{attrs:{divided:!0,command:t.beforeHandleCommand("deleteComment",e.id)}},[t._v("\n              "+t._s(t.$t("topic.delete"))+"\n            ")]):t._e()],1)],1):t._e(),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:1===e.isApproved,expression:"comment.isApproved === 1"}],staticClass:"actions"},[o("span",{directives:[{name:"show",rawName:"v-show",value:e.canLike,expression:"comment.canLike"}],staticClass:"like",on:{click:function(n){return t.$emit("like",e,r,"comment")}}},[o("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:e.isLiked?"liked":"like"}}),t._v(" "),o("span",{staticClass:"text"},[t._v("\n              "+t._s(t.$t("topic.like"))+" "+t._s(e.likeCount>0?e.likeCount:""))])],1),t._v(" "),o("span",{directives:[{name:"show",rawName:"v-show",value:t.rewardQuestion&&0===t.rewardQuestion.type&&t.canAdoption,expression:"rewardQuestion && rewardQuestion.type === 0 && canAdoption"}],staticClass:"adoption",on:{click:function(n){return t.openAdoption(e)}}},[o("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:"pay_adoption"}}),t._v(" "),o("span",{staticClass:"text"},[t._v("采纳")])],1),t._v(" "),o("span",{on:{click:function(n){return t.toReply(e.user,r)}}},[o("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:"comment"}}),t._v(" "),o("span",{staticClass:"text"},[t._v(t._s(t.$t("topic.replyTa")))])],1)])],1)]),t._v(" "),e&&e.redPacketAmount?o("div",{staticClass:"tip"},[o("img",{staticClass:"tip-logo",attrs:{src:n(1181),alt:"红包"}}),t._v("\n      获得"),o("span",{staticClass:"tip-money"},[t._v(t._s(e.redPacketAmount)+"元")]),t._v("红包\n    ")]):t._e(),t._v(" "),e&&e.rewards>0?o("div",{staticClass:"tip"},[o("img",{staticClass:"tip-logo",attrs:{src:n(1182),alt:"悬赏"}}),t._v("\n      获得"),o("span",{staticClass:"tip-money"},[t._v(t._s(e.rewards)+"元")]),t._v("悬赏金\n    ")]):t._e(),t._v(" "),o("div",{staticClass:"container-detail"},[o("div",{staticClass:"content-html",domProps:{innerHTML:t._s(t.$xss(t.formatSummary(e)))},on:{click:function(n){return t.showAll(n,e)}}}),t._v(" "),e.images&&e.images.length>0?o("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 o("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()]),t._v(" "),t.twoShowReplyEditorForIndex===r?o("editor",{staticClass:"reply-editor",staticStyle:{"margin-top":"0","margin-bottom":"20px"},attrs:{"editor-style":"reply",selector:"reply-editor","type-information":t.replyType,post:t.replyPost,"on-publish":t.onReplyPublish},on:{"update:post":function(e){t.replyPost=e},publish:function(n){return t.replyPublish(e.id)}}}):t._e(),t._v(" "),t.replyList[r]&&t.replyList[r].length?o("div",{staticClass:"reply-list",on:{click:function(n){return t.$router.push("/thread/comment?threadId="+t.threadId+"&commentId="+e.id+"#reply")}}},[t._l(t.replyList[r],(function(n,c){return o("div",{key:c,staticClass:"reply"},[o("div",{staticClass:"title"},[o("Avatar",{attrs:{user:n.user||{},size:"30"}}),t._v(" "),o("div",{staticClass:"title-info"},[o("span",{staticClass:"author-name"},[t._v(t._s(n.user?n.user.username:""))]),t._v(" "),o("span",{staticClass:"content-reply"},[null!==n.commentPostId&&n.commentUser?o("span",{staticClass:"toReply"},[t._v("\n                "+t._s(t.$t("topic.reply"))+"\n              ")]):t._e(),t._v(" "),null!==n.commentPostId&&n.commentUser?o("span",{staticClass:"replyUser"},[t._v("\n                "+t._s(""+n.commentUser.username)+"\n              ")]):t._e()]),t._v(" "),o("span",{staticClass:"timer"},[t._v(t._s(t.formatDate(n.updatedAt)))]),t._v(" "),o("div",{staticClass:"management",on:{click:function(t){return t.stopPropagation(),function(){}.apply(null,arguments)}}},[0===n.isApproved?o("div",{staticClass:"checking"},[t._v("\n                "+t._s(t.$t("topic.inReview"))+"\n              ")]):t._e(),t._v(" "),n.canEdit||n.canHide?o("el-dropdown",{staticClass:"filter-dropdown",attrs:{size:"medium"},on:{command:t.replyManagement}},[o("span",{staticClass:"el-dropdown-link"},[t._v("\n                  "+t._s(t.$t("topic.management"))+"\n                ")]),t._v(" "),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n.canEdit?o("el-dropdown-item",{attrs:{command:t.beforeHandleReply("editComment",n,e.id)}},[t._v("\n                    "+t._s(t.$t("topic.edit"))+"\n                  ")]):t._e(),t._v(" "),n.canHide?o("el-dropdown-item",{attrs:{divided:!0,command:t.beforeHandleReply("deleteReply",n.id,e.id)}},[t._v("\n                    "+t._s(t.$t("topic.delete"))+"\n                  ")]):t._e()],1)],1):t._e(),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:1===n.isApproved,expression:"reply.isApproved === 1"}],staticClass:"actions"},[o("span",{directives:[{name:"show",rawName:"v-show",value:n.canLike,expression:"reply.canLike"}],staticClass:"like",on:{click:function(e){return t.$emit("like",n,c,"reply",r)}}},[o("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:n.isLiked?"liked":"like"}}),t._v(" "),o("span",{staticClass:"text"},[t._v("\n                    "+t._s(t.$t("topic.like"))+" "+t._s(n.likeCount>0?n.likeCount:""))])],1),t._v(" "),o("span",{on:{click:function(e){return t.toReply(n.user,c,n)}}},[o("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:"comment"}}),t._v(" "),o("span",{staticClass:"text"},[t._v(t._s(t.$t("topic.replyTa")))])],1)])],1)])],1),t._v(" "),o("div",{staticClass:"content-html",domProps:{innerHTML:t._s(t.$xss(t.formatReplySummary(n.summary)))},on:{click:function(e){return t.showAll(e,c,t.replyList)}}}),t._v(" "),n.images&&n.images.length>0?o("div",{directives:[{name:"viewer",rawName:"v-viewer",value:{url:"data-source"},expression:"{ url: 'data-source' }"}],staticClass:"images",on:{click:function(t){return t.stopPropagation(),function(){}.apply(null,arguments)}}},t._l(n.images,(function(image,t){return o("el-image",{key:t,staticStyle:{width:"100px",height:"100px","border-radius":"5px","margin-right":"10px","margin-bottom":"10px"},attrs:{src:image.thumbUrl,alt:image.filename,"data-source":image.url,fit:"cover"}})})),1):t._e(),t._v(" "),o("div",{on:{click:function(t){return t.stopPropagation(),function(){}.apply(null,arguments)}}},[t.threeShowReplyEditorForIndex===c&&t.commentPostId===n.id?o("editor",{staticClass:"reply-editor",staticStyle:{"margin-top":"0","margin-bottom":"20px"},attrs:{"editor-style":"reply",selector:"reply-editor","type-information":t.replyType,post:t.replyPost,"on-publish":t.onReplyPublish},on:{"update:post":function(e){t.replyPost=e},publish:function(o){return t.replyPublish(n.id,e.id)}}}):t._e()],1),t._v(" "),o("div",{staticClass:"line"})])})),t._v(" "),e.replyCount>3?o("div",[e.replyCount!==(t.replyList[r]||[]).length?o("div",{staticClass:"show-all-reply"},[t._v("\n          "+t._s(t.$t("topic.showOther"))+" "+t._s(e.replyCount-3)+"\n          "+t._s(t.$t("topic.item")+t.$t("topic.reply"))+"\n        ")]):t._e()]):t._e()],2):t._e()],1)})),t._v(" "),t.isShield?o("topic-report",{attrs:{"thread-id":t.threadId,type:2,"comment-id":t.commentId},on:{close:function(e){t.isShield=!1}}}):t._e(),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.showAdoptionBox,expression:"showAdoptionBox"}],staticClass:"adoption-box"},[o("div",{staticClass:"adoption-content"},[o("div",{staticClass:"adoption-head"},[t._v("\n        采纳回复悬赏\n        "),o("svg-icon",{attrs:{type:"close"},on:{click:t.closeAdoption}})],1),t._v(" "),o("div",{staticClass:"percent"},[o("div",{staticClass:"text"},[t._v("悬赏百分比：")]),t._v(" "),o("el-input",{staticClass:"reward-percent",attrs:{type:"number"},model:{value:t.percentVal,callback:function(e){t.percentVal=e},expression:"percentVal"}}),t._v(" %\n      ")],1),t._v(" "),o("div",{staticClass:"money"},[o("div",{staticClass:"text"},[t._v("悬赏金额：")]),t._v(" "),o("div",{staticClass:"reward-money"},[t._v(t._s(t.adoptionMoney))])]),t._v(" "),o("div",{staticClass:"btn"},[o("el-button",{staticClass:"btn-confirm",on:{click:t.confirmAdoption}},[t._v("确定")]),t._v(" "),o("el-button",{staticClass:"btn-cancle",on:{click:t.cancel}},[t._v("取消")])],1)])])],2)}),[],!1,null,"4dfa9b14",null);e.default=component.exports;installComponents(component,{AvatarComponent:n(753).default,SvgIcon:n(62).default,Editor:n(796).default,Avatar:n(255).default,TopicReport:n(1059).default})},718:function(t,e,n){},719:function(t,e,n){"use strict";n.r(e);var o={name:"MessageBox",props:{width:{type:String,default:"820px"},title:{type:String,default:""},overflow:{type:String,default:"auto"}}},r=(n(792),n(11)),component=Object(r.a)(o,(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})},720:function(t,e,n){},721:function(t,e,n){},722:function(t,e,n){"use strict";n.r(e);n(254);var o=n(745),r={name:"SharePopover",props:{threadsId:{type:[String,Number],default:""},type:{type:String,default:""}},data:function(){return{qrcode:null,currentType:""}},methods:{copyLink:function(){var t=document.createElement("input");"topic"===this.type?t.value=window.location.href:t.value="".concat(window.location.protocol,"//").concat(window.location.host,"/thread/").concat(this.threadsId),t.id="copyInput",document.body.appendChild(t),t.select(),document.execCommand("Copy"),this.$message.success("链接复制成功"),setTimeout((function(){t.remove()}),100)},onShowPopover:function(){this.currentType=this.type;var path=window.location.href;path="topic"===this.type?window.location.href:"".concat(window.location.protocol,"//").concat(window.location.host,"/thread/").concat(this.threadsId),this.createQrcode(path)},createQrcode:function(link){var t=this;this.qrcode=null,this.$nextTick((function(){t.qrcode=new o(t.$refs.qrcode,{width:88,height:88,text:link})}))},closeCode:function(){this.$refs.qrcode.innerHTML=""}}},c=(n(741),n(742),n(11)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"share-container"},[n("el-popover",{attrs:{placement:"bottom",width:"120","min-width":"120",trigger:"click","popper-class":"custom-popover-width"},on:{show:t.onShowPopover,hide:t.closeCode}},[n("div",{staticClass:"share-cont"},[n("div",{staticClass:"copy",on:{click:t.copyLink}},[n("svg-icon",{staticClass:"copy-icon",attrs:{type:"copy-link"}}),t._v(" "),n("span",[t._v(t._s(t.$t("core.copyLink")))])],1),t._v(" "),n("div",{staticClass:"qrcode"},[n("div",{staticClass:"qrcode-text"},[n("svg-icon",{staticClass:"wechat-logo",attrs:{type:"wechat-logo"}}),t._v(" "),n("span",[t._v(t._s(t.$t("core.wxShare")))])],1),t._v(" "),n("div",{ref:"qrcode",staticClass:"qrcode-cont"})])]),t._v(" "),n("template",{slot:"reference"},[t._t("default")],2)],2)],1)}),[],!1,null,"c72b1b96",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},723:function(t,e,n){},724:function(t,e,n){},725:function(t,e,n){"use strict";n(254);var o=n(0),r=(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(r.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(r.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 P(){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-",o=0;this.options=_({prefix:n,expires:o},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(!P())return!1;var e=w.removeItem;e(this.getKey(t)),e(this.getExpiresKey(t))}},{key:"isExpired",value:function(t){if(P()){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 o=this.getKey(t),r=e;if(!P())return!1;try{r=JSON.stringify(e)}catch(t){return!1}var c=w,l=c.setItem,d=c.removeItem;try{l(o,r);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(!P())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){P()&&this.shiftItem(t)}},{key:"clear",value:function(){P()&&w.clear()}}]),t}(),k=n(9),$=(n(31),n(884)),O=n(163),j=n.n(O);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 A(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(r.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 T(){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,o){new $.a(e).validate(t,{firstFields:!0},(function(t,e){var r=t?"fail":"success",c=t?t[0].message:"";"success"===r?n({status:r,message:c,fieldsData:e}):o(j()("Parameter Validator Error",{status:r,message:c,fieldsData:e,errors:t},null))}))}))}var I=function(){var t=Object(k.a)(regeneratorRuntime.mark((function t(e){var n,o,r,data,c,l,source;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.params,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=e.isValidate,l=e.validateRules,!c||!l){t.next=5;break}return source=A(A({},o),data),t.next=5,T(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)}}(),S=n(164),E=n.n(S);function R(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 U=new x({prefix:""}),N=function(t){var e=U.get("access_token");return e&&(t.headers.authorization="Bearer ".concat(e)),t},D=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?R(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):R(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(N),this.http.interceptors.request.use(I,null,{synchronous:!0})}},{key:"setHttpResponseInterceptors",value:function(){this.http.interceptors.response.use(D)}}]),t}(),B=0,z=n(86),V=["params","data"];function M(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?M(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):M(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(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,V),l=Q(Q({url:"/api/threads.v2",method:"GET",params:o,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 G=["params","data"];function Z(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?Z(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):Z(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(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,G),l=K(K({url:"/api/threads.detail.v2",method:"GET",params:o,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 st(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(r.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 nt={};function at(){return ot.apply(this,arguments)}function ot(){return(ot=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,et),l=st(st({url:"/api/categories.v2",method:"GET",params:o,data:data},c),{},{validateRules:nt}),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(r.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(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,ct),l=ut(ut({url:"/api/posts.v2",method:"GET",params:o,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(r.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 wt.apply(this,arguments)}function wt(){return(wt=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,ft),l=gt(gt({url:"/api/sticks.v2",method:"GET",params:o,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 bt=["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 Pt(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(r.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 kt(){return $t.apply(this,arguments)}function $t(){return($t=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,bt),l=Pt(Pt({url:"/api/thread.v2",method:"POST",params:o,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 Ot=["params","data"];function jt(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?jt(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):jt(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var At={id:{type:"number",required:!0}};function Tt(){return It.apply(this,arguments)}function It(){return(It=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,Ot),l=Lt(Lt({url:"/api/threads/update.v2",method:"POST",params:o,data:data},c),{},{validateRules:At}),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 St=["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 Rt(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(r.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 Ut={data:{type:"object",required:!0,fields:{attributes:{type:"object",required:!0,fields:{}}}}};function Nt(){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,St),l=Rt(Rt({url:"/api/posts.update.v2",method:"POST",params:o,data:data},c),{},{validateRules:Ut}),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 qt=["params","data"];function Ft(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 Bt(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?Ft(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):Ft(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 Vt(){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(k.a)(regeneratorRuntime.mark((function t(){var e,n,o,r,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,o=void 0===n?{}:n,r=e.data,data=void 0===r?{}:r,c=Object(z.a)(e,qt),l=Bt(Bt({url:"/api/posts.v2",method:"POST",params:o,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=kt,e.updateThreads=Tt,e.updatePosts=Nt,e.createPosts=Vt,e}({baseURL:""}),Ht=Qt.http,Wt=o.default.prototype;Ht.interceptors.response.use((function(t){var data=t.data,e=data||{},n=e.Code,o=e.Message;switch(Number(n)){case B:break;default:Wt.$message.warning(o)}return data}));e.a=Qt},728:function(t,e,n){"use strict";n.r(e);n(254);var o={name:"ListLoadMore",mixins:[{data:function(){return{scrollTop:0}},mounted:function(){this.addEventListener(window,"scroll",this.handleScroll)},destroyed:function(){this.removeEventListener(window,"scroll",this.handleScroll)},methods:{handleScroll:function(){var t=document.documentElement.scrollTop||document.body.scrollTop,e=document.documentElement.clientHeight||document.body.clientHeight,n=document.documentElement.scrollHeight||document.body.scrollHeight;this.scrollData(),Math.ceil(n-e)>=20&&this.scrollPost(),Math.ceil(t+e+10)>=n&&this.scrollLoadMore(),this.scrollTop=t},addEventListener:function(t,e,n,o){t.addEventListener?t.addEventListener(e,n,o):t.attachEvent&&t.attachEvent("on".concat(e),n)},removeEventListener:function(t,e,n,o){t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent&&t.detachEvent("on".concat(e),n)}}}],props:{loading:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},pageNum:{type:[Number,String],default:1},length:{type:[Number,String],default:0},surplus:{type:[Number,String],default:0},loadMoreText:{type:String,default:function(){return this.$t("topic.showMore")}}},methods:{scrollLoadMore:function(){(this.pageNum-1)%5>0&&!this.loading&&this.hasMore&&this.loadMore()},scrollData:function(){this.$emit("scrollDdata")},scrollPost:function(){this.$emit("scrollPost")},loadMore:function(){this.$emit("loadMore")}}},r=n(11),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"load-more-container"},[t.loading?n("loading"):[t.hasMore&&(t.pageNum-1)%5==0?n("div",{staticClass:"load-more",on:{click:t.loadMore}},[t._v("\n      "+t._s(t.surplus>0?t.$t("notice.checkMore",{surplus:t.surplus}):t.loadMoreText)+"\n    ")]):t.hasMore&&(t.pageNum-1)%5>0?n("loading"):n("div",{staticClass:"no-more"},[0===t.length?n("svg-icon",{staticClass:"empty-icon",attrs:{type:"empty"}}):t._e(),t._v("\n      "+t._s(t.length>0?t.$t("discuzq.list.noMoreData"):t.$t("discuzq.list.noData"))+"\n    ")],1)]],2)}),[],!1,null,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 o={name:"ProductItem",props:{item:{type:Object,default:function(){}}},data:function(){return{}}},r=(n(743),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.item?n("a",{staticClass:"product-container",attrs:{href:t.item.detailContent,target:"_blank",el:"nofollow"}},[n("el-image",{staticClass:"image",attrs:{src:t.item.imagePath,alt:t.item.title,fit:"cover"}},[n("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[n("i",{staticClass:"el-icon-loading"})])]),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"info-header"},[n("div",{staticClass:"title"},[t._v(t._s(t.item.title))]),t._v(" "),t.item.price>0?n("div",{staticClass:"price"},[t._v(t._s(t.$t("post.yuanItem")+t.item.price+t.$t("post.yuan")))]):t._e()]),t._v(" "),n("div",{staticClass:"btn"},[n("svg-icon",{staticClass:"icon",attrs:{type:"product-icon"}}),t._v(t._s(t.$t("post.buyProudct")))],1)])],1):t._e()}),[],!1,null,"85619e88",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},731:function(t,e,n){"use strict";n.r(e);n(13),n(108);var o={name:"AudioPlayer",props:{file:{type:Object,default:function(){}},currentAudio:{type:Object,default:function(){}}},data:function(){return{onDragging:!1,delta:0}},computed:{currentFile:function(){return this.file&&this.file.id?this.currentAudio.id===this.file.id:this.currentAudio.id===this.file._jv.id},playing:function(){return this.currentAudio.currentTime&&this.currentAudio.duration}},methods:{formatDuration:function(t){var e=Math.floor(t/60),n=(t-60*e).toString().substr(0,2);return"."===n[1]&&(n="0".concat(n[0])),"".concat(e,":").concat(n)},formatCurrentTime:function(t){var e=parseInt(t/60)%60,n=(t%60).toFixed(),o=e<10?"0".concat(e):e,s=n<10?"0".concat(n):n;return"".concat(o,":").concat(s)},convertToPercentage:function(){return this.currentAudio.currentTime/this.currentAudio.duration*100},onmousedown:function(){window.document.addEventListener("mousemove",this.dragging),window.document.addEventListener("mouseup",this.onMouseUp)},dragging:function(t){this.delta=t.clientX-this.$refs.progress.getBoundingClientRect().x,this.delta<0&&(this.delta=0),this.delta>290&&(this.delta=290);var time=this.delta/290*this.currentAudio.duration;this.$emit("seeking",time)},onMouseUp:function(){var time=this.delta/290*this.currentAudio.duration;this.$emit("seek",time),window.document.removeEventListener("mousemove",this.dragging),window.document.removeEventListener("mouseup",this.onMouseUp)}}},r=(n(744),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"audio"},[t.currentFile&&t.currentAudio.isLoading?n("div",{staticClass:"control"},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"loading",rotate:""}})],1):t.currentFile&&t.currentAudio.isPlay?n("div",{staticClass:"control",on:{click:function(e){return t.$emit("pause")}}},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"audio-pause"}})],1):n("div",{staticClass:"control",on:{click:function(e){return t.$emit("play",t.file)}}},[n("svg-icon",{staticStyle:{"font-size":"32px"},attrs:{type:"audio-play"}})],1),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"title"},[n("span",{staticClass:"title-audio"},[t._v(t._s(t.file.fileName||t.file.file_name))]),t._v(" "),t.currentFile&&t.playing?n("span",{staticClass:"duration-audio"},[t._v("\n        "+t._s(t.formatCurrentTime(t.currentAudio.currentTime))+" /\n        "+t._s(t.formatDuration(t.currentAudio.duration))+"\n      ")]):n("span",{staticClass:"duration-audio"},[t._v("--:--")])]),t._v(" "),t.currentFile&&t.playing?n("div",{ref:"progress",staticClass:"progress",attrs:{id:"progress"}},[n("div",{staticClass:"progress-item",style:{width:t.convertToPercentage()+"%"}}),t._v(" "),n("div",{staticClass:"control-ball",style:{left:t.convertToPercentage()+"%"},attrs:{id:"control-ball"},on:{mousedown:t.onmousedown}})]):t._e()])])}),[],!1,null,"7fe73b95",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default})},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,o=e-t,i=0;i<this.diffModulus.length;i++){var r=this.diffModulus[i];if(o/r[0]<r[1]){n="".concat(Math.ceil(o/r[0])," ").concat(r[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 o={name:"Loading",props:{loading:{type:Boolean,default:!1},fontSize:{type:Number,default:32}}},r=(n(738),n(11)),component=Object(r.a)(o,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"loading-container"},[this._v("\n  "+this._s(this.$t("discuzq.list.loading"))+"...\n")])}),[],!1,null,"a5011398",null);e.default=component.exports},738:function(t,e,n){"use strict";n(718)},740:function(t,e,n){},741:function(t,e,n){"use strict";n(720)},742:function(t,e,n){"use strict";n(721)},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 o={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}}},r=(n(812),n(11)),component=Object(r.a)(o,(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 o=n(745),r={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 o(t.$refs.qrcode,{width:70,height:70,text:link})}))}}},c=(n(781),n(11)),component=Object(c.a)(r,(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 o={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()}},r=(n(782),n(11)),component=Object(r.a)(o,(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)},785:function(t,e,n){"use strict";n.r(e);var o={name:"Message",props:{title:{type:String,default:""}}},r=(n(883),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Cover"),t._v(" "),n("div",{staticClass:"checkout-counter"},[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,"2f83799e",null);e.default=component.exports;installComponents(component,{Cover:n(754).default,SvgIcon:n(62).default})},786:function(t,e,n){"use strict";n.r(e);var o=n(85),r=(n(39),n(45),n(714)),c={name:"Caller",mixins:[n.n(r).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(o.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(o.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,o){return n("div",{key:o,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,o){return n("li",{key:o,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,o){return n("div",{key:o,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 o=n(85),r=n(714),c={name:"TopicList",mixins:[n.n(r).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(o.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,o){return n("li",{key:o,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 o={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}))}}},r=(n(822),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"emoji-list"},t._l(t.emojiList,(function(e,o){return n("span",{key:o,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)},793:function(t,e,n){n(13),t.exports={computed:{forums:function(){return this.$store.state.site.info.attributes||{}}},methods:{checkCaptcha:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n,o){if(t.forums&&t.forums.qcloud&&t.forums.qcloud.qcloud_captcha)return new TencentCaptcha(t.forums.qcloud.qcloud_captcha_app_id,(function(t){0===t.ret&&(e.captcha_rand_str=t.randstr,e.captcha_ticket=t.ticket,n(e))})).show();n(e)}))}}}},796:function(t,e,n){"use strict";n.r(e);n(254),n(45),n(63),n(256),n(35);var o=n(714),r={name:"Editor",mixins:[n.n(o).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)(r,(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})},797:function(t,e,n){},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}}}},803:function(t,e,n){},804:function(t,e,n){},805:function(t,e,n){},806:function(t,e,n){},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,o=e[0].detail?e[0].detail[0]:this.$t("core.".concat(n));this.$message.error(o)}else this.$message.error(this.$t("post.imageUploadFail"))}}}},817:function(t,e,n){var o=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,o(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,o=[];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 r=this.getObjectURL(n[i]);this.previewFiles.push({name:n[i].name,url:r,progress:0,deleted:!1,size:n[i].size}),o.push(n[i])}var c=o.reduce((function(t,n,o,r){return t.push(e.uploadFile(n,o,r.length)),t}),[]);this.uploadFiles(c)}},uploadFile:function(t,e,n){var o=this,r={onUploadProgress:function(t){t.lengthComputable?o.previewFiles[o.previewFiles.length-n+e].progress=.9*parseInt(Math.round(t.loaded/t.total*100).toString()):o.previewFiles[o.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,r)},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})),r=o(e.fileList);n.forEach((function(t){return r.push({id:t.id,name:t.attributes.fileName,url:t.attributes.url})})),e.currentInput.value="",e.$emit("success",r),e.$emit("update:onUpload",!1)}),(function(n){e.currentInput.value="";var o=t.length;e.$emit("update:onUpload",!1),e.previewFiles.splice(e.previewFiles.length-o,o),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=o(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 o=n(33),r=n(714),c=n.n(r),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,o=[];if(t.checkSizeLimit(n)){for(var i=0;i<n.length;i++)o.push(n[i]);var r=o.reduce((function(e,n){return e.push(t.uploadFile(n)),e}),[]);t.uploadFiles(r)}}},uploadFile:function(t){var e=new FormData;return e.append("type",1),e.append("file",t),o.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,'">'),o=e.vditor.html2md(html);e.vditor.insertValue(o.substr(0,o.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 o=n(789),r={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(o.a)(t)},onAttachmentPriceInput:function(t){this.attachmentPrice=Object(o.a)(t)}}},c=(n(809),n(11)),component=Object(c.a)(r,(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 o={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}}},r=(n(810),n(11)),component=Object(r.a)(o,(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 o=n(734),r=n.n(o),c=n(739),l=n.n(c),d={name:"EditorQa",mixins:[r.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 o=n(8),r=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(r).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(o.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 o={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}}},r=(n(824),n(11)),component=Object(r.a)(o,(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,o){return[e.show&&"emoji"===e.icon?n("popover",{key:o,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:o,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:o,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,o){return[e.show?n("svg-icon",{key:o,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 o=n(85),r=(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(o.a)(this.videoList);n.push({name:t.name,url:t.url,videoPercent:0}),this.$emit("videoChange",{key:"videoList",value:n}),this.getSignature((function(o){new r.default({getSignature:o}).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(o.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 o=n(85),r=n(714),c={name:"QaCaller",mixins:[n.n(r).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 r={"filter[canBeAsked]":"yes","page[limit]":this.pageLimitPagination,"page[number]":t};return this.$store.dispatch("jv/get",["/users",{params:r}]).then((function(data){var meta=data._jv.json.meta;n.totalPage=meta.pageCount,e.loading=!1,e.list=Object(o.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(o.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,o){return n("li",{key:o,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,o){return n("div",{key:o,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,o){return n("div",{key:o,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,o){return n("div",{key:o,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 o=n(714),r={name:"ProductDialog",mixins:[n.n(o).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)(r,(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,o){return n("div",{key:o,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 o={name:"Popover",props:{visible:{type:Boolean,default:!1}}},r=(n(825),n(11)),component=Object(r.a)(o,(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 o=n(794);n(45),n(25),n(39);var r=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,r,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,o(c)),(r=t._jv.relationships.attachments.data).push.apply(r,o(l)));return t},newPublishPostResource:function(t,e){var n,r,c=this.createAttachmentsData(e.imageList),l=this.createAttachmentsData(e.attachedList);(c.length>0||l.length>0)&&(t.attachments=[],(n=t.attachments).push.apply(n,o(c)),(r=t.attachments).push.apply(r,o(l)));return t},editPublishPostResource:function(t,e){var n,r,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,o(c)),(r=t.data.relationships.attachments.data).push.apply(r,o(l)));return t},publishAnswerResource:function(t,e){var n,r,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,o(c)),(r=t.relationships.attachments.data).push.apply(r,o(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=r(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,o=e.map((function(t){return t.id}));t.map((function(t){return t._jv&&t._jv.id||t.id})).filter((function(t){return o.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 o=n(714),r=n.n(o),c=n(816),l=n.n(c),d=n(732),h=n(817),m=n.n(h),f=n(33),v={name:"AttachmentUpload",mixins:[r.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,o){return n("div",{key:o,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(o)}}})],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 o=n(714),r=n.n(o),c=n(816),l=n.n(c),d=n(817),h=n.n(d),m=n(33),f={name:"ImageUpload",mixins:[r.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})},867:function(t,e,n){"use strict";n(797)},875:function(t,e,n){"use strict";n.r(e);var o={name:"TopicWxPay",props:{qrCode:{type:String,default:""}}},r=(n(867),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{attrs:{title:t.$t("pay.pay")},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"container"},[n("div",{staticClass:"title"},[n("svg-icon",{staticStyle:{fill:"#09BB07","font-size":"30px"},attrs:{type:"wechat"}}),t._v(" "),n("span",[t._v(t._s(t.$t("pay.wxPay")))])],1),t._v(" "),n("div",{staticClass:"tip"},[t._v(t._s(t.$t("pay.wechatTimeLimit")))]),t._v(" "),n("div",{staticClass:"container-qr-code"},[n("img",{staticStyle:{width:"138px",height:"138px"},attrs:{src:t.qrCode,alt:"qr-code"}})]),t._v(" "),n("div",{staticClass:"scan-tip"},[n("svg-icon",{staticStyle:{display:"block","font-size":"32px"},attrs:{type:"wx-scan"}}),t._v(" "),n("div",{staticClass:"tip"},[n("span",[t._v(t._s(t.$t("pay.wechatScan")))]),t._v(" "),n("span",[t._v(t._s(t.$t("pay.wechatScanPay")))])])],1)])])}),[],!1,null,"028323c1",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,MessageBox:n(719).default})},876:function(t,e,n){},877:function(t,e,n){},879:function(t,e,n){n(13),t.exports={data:function(){return{orderNo:"",paymentType:0,paymentStatus:0}},methods:{createOrder:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(!this.defaultLoading){this.defaultLoading=!0;var l={_jv:{type:"/orders"},is_anonymous:t,type:o,amount:n};return l.payee_id=c,this.threadId&&(l.thread_id=this.threadId),this.$store.dispatch("jv/post",l).then((function(data){e.orderNo=data.order_sn,e.paymentType=r}),(function(t){return e.handleError(t)}))}},payOrder:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n={_jv:{type:"/trade/pay/order/".concat(this.orderNo)},order_sn:this.orderNo,payment_type:this.paymentType,pay_password:e};return this.$store.dispatch("jv/post",n).then((function(data){return 10===t.paymentType?data.wechat_qrcode:(t.$message.success(t.$t("pay.paySuccess")),t.passwordError=!1,t.showPasswordInput=!1,t.orderNo)}),(function(e){var n=e.response.data.errors;return"pay_password_failures_times_toplimit"===n[0].code?(t.passwordError=!0,t.passwordErrorTip=t.$t("core.pay_password_failures_times_toplimit"),Promise.reject()):"validation_error"===n[0].code?(t.passwordError=!0,t.passwordErrorTip=n[0].detail[0],Promise.reject()):void t.handleError(e)}))},wxPayActive:function(){var t=this;return this.showWxPay=!0,new Promise((function(e,n){var o=setInterval((function(){1===t.paymentStatus&&(clearInterval(o),t.showWxPay=!1,t.$message.success(t.$t("pay.paySuccess")),e(t.orderNo)),t.showWxPay||(clearInterval(o),n()),t.getOrderStatus()}),1e3)}))},getOrderStatus:function(){var t=this,e={_jv:{type:"/orders/".concat(this.orderNo)},orderNo:this.orderNo};return this.$store.dispatch("jv/get",e).then((function(data){t.paymentStatus=data.status}),(function(e){return t.handleError(e)}))},onFindPassword:function(){this.showPasswordInput=this.passwordError=!1,this.passwordErrorTip="",this.findPassword=!0}}}},880:function(t,e,n){"use strict";n(803)},881:function(t,e,n){"use strict";n(804)},882:function(t,e,n){"use strict";n(805)},883:function(t,e,n){"use strict";n(806)},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)}}}},892:function(t,e,n){"use strict";n.r(e);n(254);var o=n(789),r={name:"TopicCheckoutCounter",props:{redpacket:{type:Object,default:function(){}},offerMoney:{type:[String,Number],default:0},threadType:{type:Number,default:0},user:{type:Object,default:function(){}},amount:{type:[String,Number],default:""},content:{type:String,default:""},rewardOrPay:{type:String,default:""},beAskedUser:{type:Object,default:function(){}},showAnonymous:{type:Boolean,default:!0},askOrWatchAnswer:{type:String,default:"ask"},showWechatPay:{type:Boolean,default:!0},lowestPrice:{type:[String,Number],default:""}},data:function(){return{hideAvatar:!1,text:["getRemainingContent","getRemainingContent","getVideo","getPicture","getAudio","getRemainingContent"],payWay:"wxPay",rewardAmount:"",defaultAmounts:["1","2","5","10","20","50","88","128"],loading:!1}},computed:{showAmount:function(){return"redpacket"===this.rewardOrPay?1===this.redpacket.rule?this.formatToFixed(this.redpacket.money):this.formatToFixed(this.redpacket.money*this.redpacket.number):"offerReward"===this.rewardOrPay?this.formatToFixed(this.offerMoney):"reward"===this.rewardOrPay?this.formatToFixed(this.rewardAmount):"renewal"===this.rewardOrPay?this.formatToFixed(this.lowestPrice):this.amount},userWallet:function(){var t=this.$store.state.user.info.attributes;return{walletBalance:t.walletBalance,canWalletPay:t.canWalletPay}},enoughBalance:function(){return"reward"===this.rewardOrPay?parseFloat(this.rewardAmount||"0")<=parseFloat(this.userWallet.walletBalance):"redpacket"===this.rewardOrPay||"offerReward"===this.rewardOrPay?this.showAmount<=parseFloat(this.userWallet.walletBalance):parseFloat(this.amount)<=parseFloat(this.userWallet.walletBalance)}},watch:{showWechatPay:{handler:function(t){this.payWay=t?"wxPay":"walletPay"},immediate:!0}},created:function(){var t=this;this.loading=!0;var e=this.$store.state.user.info.id;e?this.$store.dispatch("user/getUserInfo",e).then((function(){t.$store.commit("session/SET_USER_ID",e),t.loading=!1}),(function(e){return t.$store.commit("user/SET_USER_INFO",{})})):this.loading=!1},methods:{handlePay:function(){if("renewal"===this.rewardOrPay&&(this.rewardAmount=this.lowestPrice),"redpacket"===this.rewardOrPay||"offerReward"===this.rewardOrPay?this.rewardAmount=+this.showAmount:this.rewardAmount=+this.formatToFixed(this.rewardAmount),"walletPay"===this.payWay&&+this.userWallet.walletBalance<this.rewardAmount)return this.$message.warning("钱包余额不足");this.$emit("paying",{payWay:this.payWay,hideAvatar:this.hideAvatar,rewardAmount:this.rewardAmount})},formatAmount:function(t){t.target.value=Object(o.a)(t.target.value),this.rewardAmount=t.target.value},formatToFixed:function(t){return(parseFloat(t||"0")+1e-6).toFixed(2)}}},c=(n(880),n(11)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{attrs:{title:t.$t("pay.checkoutCounter")},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"top"},[n("div",{staticClass:"row"},[n("div",{staticClass:"head"},[t._v(t._s(t.$t("pay.payProduct")))]),t._v(" "),"redpacket"===t.rewardOrPay?n("div",{staticClass:"body product-information"},[n("span",{staticClass:"title"},[t._v("支付红包")]),t._v(" "),n("span",[t._v("支付人："+t._s(t.user.username||""))])]):5===t.threadType&&"offerReward"===t.rewardOrPay?n("div",{staticClass:"body product-information"},[n("span",{staticClass:"title"},[t._v("支付悬赏")]),t._v(" "),n("span",[t._v("支付人："+t._s(t.user.username||""))])]):5===t.threadType&&"reward"===t.rewardOrPay?n("div",{staticClass:"body product-information"},[n("span",{staticClass:"title"},[t._v("\n          "+t._s("ask"===t.askOrWatchAnswer?t.$t("post.askHim"):t.$t("topic.watchAnswer"))+"\n        ")]),t._v(" "),n("span",[t._v(t._s(t.$t("post.answerer")+t.beAskedUser.username))])]):10===t.threadType&&"renewal"===t.rewardOrPay?n("div",{staticClass:"body product-information"},[n("span",{staticClass:"title"},[t._v("站点续费")])]):n("div",{staticClass:"body product-information"},["reward"===t.rewardOrPay?n("span",{staticClass:"title"},[t._v("\n          "+t._s(t.$t("pay.supportAuthor")+t.$t("pay.keepWriting"))+"\n        ")]):n("span",{staticClass:"title"},[t._v("\n          "+t._s(t.$t("pay.supportAuthor")+t.$t("pay."+t.text[t.threadType])+t.$t("pay.getRight"))+"\n        ")]),t._v(" "),n("span",[t._v(t._s(t.$t("topic.author")+": "+(t.user.username||"")))]),t._v(" "),n("span",{staticClass:"thread-content",domProps:{innerHTML:t._s(t.$xss(t.$t("topic.content")+": "+t.content))}})]),t._v(" "),"pay"===t.rewardOrPay?n("div",{staticClass:"amount"},[t._v("￥"+t._s(t.showAmount))]):t._e()]),t._v(" "),"renewal"===t.rewardOrPay?n("div",{staticClass:"row"},[n("div",{staticClass:"head reward"},[t._v("\n        "+t._s(t.$t("site.pay")+t.$t("pay.sumOfMoney"))+"\n      ")]),t._v(" "),n("div",{staticClass:"body reward"},[n("label",[n("span",[t._v("￥")]),t._v(" "),n("input",{attrs:{disabled:0!==t.lowestPrice,maxlength:"7",type:"text"},domProps:{value:t.lowestPrice}})])])]):t._e(),t._v(" "),"reward"===t.rewardOrPay?n("div",{staticClass:"row"},[n("div",{staticClass:"head reward"},[t._v("\n        "+t._s(t.$t("topic.reward")+t.$t("pay.sumOfMoney"))+"\n      ")]),t._v(" "),n("div",{staticClass:"body reward"},[n("label",[n("span",[t._v("￥")]),t._v(" "),n("input",{attrs:{placeholder:t.$t("pay.inputRewardAmount"),maxlength:"7",type:"text"},domProps:{value:t.rewardAmount},on:{input:t.formatAmount}})]),t._v(" "),n("div",{staticClass:"default-amounts"},t._l(t.defaultAmounts,(function(e,o){return n("button",{key:o,class:{selected:e===t.rewardAmount},on:{click:function(n){t.rewardAmount=e}}},[t._v("\n            ￥"+t._s(e)+"\n          ")])})),0)])]):t._e(),t._v(" "),t.showAnonymous?n("div",{staticClass:"row"},[n("div",{staticClass:"head"},[t._v(t._s(t.$t("pay.hideAvatar")))]),t._v(" "),n("div",{staticClass:"body hide-avatar",on:{click:function(e){t.hideAvatar=!t.hideAvatar}}},[t.hideAvatar?n("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:"checked"}}):n("svg-icon",{staticStyle:{"font-size":"18px"},attrs:{type:"unchecked"}}),t._v(" "),n("span",[t._v(t._s(t.$t("pay.hideMyAvatar")))])],1)]):t._e(),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"head"},[t._v(t._s(t.$t("pay.payType")))]),t._v(" "),t.showWechatPay?n("div",{staticClass:"body pay-way"},[n("div",{staticClass:"pay-card",class:{"pay-card":!0,selected:"wxPay"===t.payWay},on:{click:function(e){t.payWay="wxPay"}}},[n("div",{staticClass:"detail"},[n("div",{staticClass:"pay-title"},[n("svg-icon",{staticClass:"active-svg-wx",staticStyle:{fill:"#8590A6","font-size":"20px"},attrs:{type:"wechat"}}),t._v(" "),n("span",[t._v(t._s(t.$t("pay.wxPay")))]),t._v(" "),n("div",{staticClass:"pay-tip"},[n("div",[n("span",[t._v(t._s(t.$t("pay.wxPayTipUse")))]),t._v(" "),n("span",{staticClass:"active-tip",staticStyle:{"font-weight":"bold"}},[t._v("\n                    "+t._s(t.$t("pay.wxPayTipScan"))+"\n                  ")])]),t._v(" "),n("span",[t._v(t._s(t.$t("pay.wxPayTipPay")))])])],1),t._v(" "),n("div",{staticClass:"pay-amount"},[t._v("￥"+t._s(t.showAmount))])])])]):t._e(),t._v(" "),n("div",{staticClass:"body pay-way"},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"pay-card",class:{"pay-card":!0,selected:"walletPay"===t.payWay},on:{click:function(e){t.payWay="walletPay"}}},[n("div",{staticClass:"detail"},[n("div",{staticClass:"pay-title"},[n("svg-icon",{staticClass:"active-svg-wallet",staticStyle:{fill:"#8590a6","font-size":"20px"},attrs:{type:"wallet"}}),t._v(" "),n("span",[t._v(t._s(t.$t("pay.walletPay")))]),t._v(" "),n("div",{staticClass:"pay-tip"},[t.enoughBalance?n("div",[t.userWallet.canWalletPay?t._e():n("nuxt-link",{staticClass:"not-enough-balance",attrs:{to:"/my/wallet"}},[t._v("\n                    "+t._s(t.$t("pay.needToResetPassword"))+"\n                  ")]),t._v(" "),n("div",[t._v(t._s(t.$t("pay.walletBalance")))])],1):n("div",[t.userWallet.canWalletPay?n("span",{staticClass:"not-enough-balance"},[t._v(t._s(t.$t("pay.walletBalanceNo")))]):n("nuxt-link",{staticClass:"not-enough-balance",attrs:{to:"/my/wallet"}},[t._v("\n                    "+t._s(t.$t("pay.needToResetPassword"))+"\n                  ")])],1),t._v(" "),n("div",[n("span",[t._v("￥ "+t._s(t.userWallet.walletBalance))])])])],1),t._v(" "),n("div",{staticClass:"pay-amount"},[t._v("￥"+t._s(t.showAmount))])])])])])]),t._v(" "),n("div",{staticClass:"bottom"},["redpacket"!==t.rewardOrPay&&"offerReward"!==t.rewardOrPay&&"renewal"!==t.rewardOrPay?n("span",[t._v("￥\n      "+t._s(t.showAmount+t.$t("pay.rmb")+t.$t("pay.payTo")+"，"+(t.beAskedUser.username||t.user.username))+"\n      "+t._s("wxPay"===t.payWay?t.$t("pay.ofAccount"):t.$t("pay.ofWalletAccount"))+"\n    ")]):t._e(),t._v(" "),n("el-button",{directives:[{name:"show",rawName:"v-show",value:"wxPay"===t.payWay,expression:"payWay === 'wxPay'"}],staticClass:"checkout-button",attrs:{type:"primary"},on:{click:t.handlePay}},[t._v("\n      "+t._s(t.$t("pay.scanPay"))+"\n    ")]),t._v(" "),n("el-button",{directives:[{name:"show",rawName:"v-show",value:"walletPay"===t.payWay,expression:"payWay === 'walletPay'"}],staticClass:"checkout-button",staticStyle:{margin:"0"},attrs:{disabled:!t.enoughBalance||!t.userWallet.canWalletPay,type:"primary"},on:{click:t.handlePay}},[t._v("\n      "+t._s(t.$t("pay.surePay"))+"\n    ")])],1)])}),[],!1,null,"d7abc150",null);e.default=component.exports;installComponents(component,{SvgIcon:n(62).default,MessageBox:n(719).default})},893:function(t,e,n){"use strict";n.r(e);n(254);var o={name:"TopicPassword",props:{price:{type:[Number,String],default:""},passwordError:{type:Boolean,default:!1},passwordErrorTip:{type:String,default:""}}},r=(n(881),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message-box",{attrs:{title:t.$t("pay.checkoutCounter")},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"container"},[n("div",{staticClass:"block show-amount"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("pay.pay")+t.$t("pay.sumOfMoney")))]),t._v(" "),n("div",{staticClass:"amount"},[n("span",{staticClass:"icon"},[t._v("￥")]),t._v(" "),n("span",[t._v(t._s(t.price))])])]),t._v(" "),n("div",{staticClass:"block input-password"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("pay.payPassword")))]),t._v(" "),n("password-input",{attrs:{error:t.passwordError},on:{password:function(e){return t.$emit("password",e)},type:function(e){return t.$emit("update:passwordError",!1)}}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.passwordError,expression:"passwordError"}],staticClass:"error-tip"},[t._v("\n        "+t._s(t.passwordErrorTip?t.passwordErrorTip:t.$t("pay.passwordError"))+"\n      ")])],1),t._v(" "),n("span",{staticClass:"forget-password",on:{click:function(e){return t.$emit("findPassword")}}},[t._v(t._s(t.$t("topic.forgetPasswordFindIt")))])])])}),[],!1,null,"0b2b60f4",null);e.default=component.exports;installComponents(component,{PasswordInput:n(899).default,MessageBox:n(719).default})},894:function(t,e,n){"use strict";n.r(e);var o=n(9),r=(n(31),n(52),n(5)),c=n(714),l=n.n(c),d=n(793),h={name:"FindPaypwd",mixins:[n.n(d).a,l.a],props:{mobile:{type:String,default:""},phonenum:{type:String,default:""}},data:function(){return{phoneNumber:"",isVerifyDisabled:!0,canCountDown:!1,countDownSecond:60,loading:!1,verifyCode:"",newPassword:"",newPasswordRepeat:"",username:"",realphoneNumber:"",userId:this.$store.getters["session/get"]("userId")}},mounted:function(){this.phoneNumber=this.mobile,this.realphoneNumber=this.phonenum},methods:{onInput:function(t){this.phoneNumber=t.target.value.replace(/[^\d]/g,""),this.isVerifyDisabled=11!==this.phoneNumber.length},countDown:function(t){var e=this;this.canCountDown=!0,this.countDownSecond=t;var n=setInterval((function(){e.countDownSecond-=1,0===e.countDownSecond&&(e.canCountDown=!1,clearInterval(n))}),1e3)},sendVerifyCode:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={_jv:{type:"sms/send"},mobile:t.realphoneNumber,type:"reset_pay_pwd"},e.next=3,t.checkCaptcha(n);case 3:n=e.sent,r.status.run((function(){return t.$store.dispatch("jv/post",n)})).then((function(e){e.interval&&t.countDown(e.interval)}),(function(e){var n=e.response.data.errors;if(n[0])return t.$message.error(n[0].detail[0])}));case 5:case"end":return e.stop()}}),e)})))()},submit:function(){var t=this;if(""===this.verifyCode)this.$message.error("验证码不能为空");else if(""===this.newPassword)this.$message.error("新密码不能为空");else if(""===this.newPasswordRepeat)this.$message.error("重复密码不能为空");else if(this.newPassword!==this.newPasswordRepeat)this.$message.error("二次密码输入不一致");else{var e={_jv:{type:"sms/verify"},mobile:this.realphoneNumber,code:this.verifyCode,pay_password:this.newPassword,pay_password_confirmation:this.newPasswordRepeat,type:"reset_pay_pwd"};r.status.run((function(){return t.$store.dispatch("jv/post",e)})).then((function(){t.$message.success(t.$t("modify.paymentsucceed")),t.$emit("close")}),(function(e){return t.handleError(e)}))}}}},m=(n(906),n(11)),component=Object(m.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message",{attrs:{title:t.$t("modify.forgetPassword")+"/"+t.$t("modify.retrievePassword")+" "},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"container"},[n("div",{staticClass:"retrieve-inputs"},[n("label",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.phoneNumber,expression:"phoneNumber"}],attrs:{maxlength:"11",type:"text",placeholder:t.$t("modify.placeEnterRegisteredPhone")},domProps:{value:t.phoneNumber},on:{input:function(e){e.target.composing||(t.phoneNumber=e.target.value)}}}),t._v(" "),t.canCountDown?n("button",{class:{disabled:t.canCountDown},attrs:{disabled:t.canCountDown}},[t._v(t._s(t.countDownSecond+t.$t("modify.retransmission")))]):n("button",{staticClass:"sendbtn",on:{click:t.sendVerifyCode}},[t._v("\n          "+t._s(t.$t("modify.sendVerifyCode"))+"\n        ")])]),t._v(" "),n("el-input",{attrs:{maxlength:"6",placeholder:t.$t("modify.placeEnterCode")},model:{value:t.verifyCode,callback:function(e){t.verifyCode=e},expression:"verifyCode"}}),t._v(" "),n("el-input",{attrs:{placeholder:"请输入新支付密码","show-password":""},model:{value:t.newPassword,callback:function(e){t.newPassword=e},expression:"newPassword"}}),t._v(" "),n("el-input",{attrs:{placeholder:"请重新输入新支付密码","show-password":""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit.apply(null,arguments)}},model:{value:t.newPasswordRepeat,callback:function(e){t.newPasswordRepeat=e},expression:"newPasswordRepeat"}})],1),t._v(" "),n("button",{staticClass:"submit",on:{click:t.submit}},[t._v(t._s(t.$t("modify.newPayPwdTitle")))])])])}),[],!1,null,"04a56ea6",null);e.default=component.exports;installComponents(component,{Message:n(785).default})},895:function(t,e,n){"use strict";n.r(e);var o={name:"WalletPassword",data:function(){return{}},methods:{tobind:function(){this.$router.push("/my/profile?phonebind=true")}}},r=(n(907),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("message",{attrs:{title:t.$t("modify.forgetPassword")+"/"+t.$t("modify.retrievePassword")+" "},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"container"},[n("div",{staticClass:"block show-amount"},[n("div",{staticClass:"title"},[t._v(t._s(t.$t("modify.nohasphon")))]),t._v(" "),n("div",{staticClass:"amount"},[n("span",[t._v(t._s(t.$t("modify.forgetPassword")+"/"+t.$t("modify.retrievePassword")+",需要您先绑定常用手机号码"))])]),t._v(" "),n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.tobind}},[t._v("前去绑定")])],1)])])}),[],!1,null,"406cf642",null);e.default=component.exports;installComponents(component,{Message:n(785).default})},896:function(t,e,n){"use strict";n.r(e);var o=n(85),r=(n(25),n(45),n(739)),c=n.n(r),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,r=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===r[0].id&&e.recordList.length===r.length||(e.recordList=Object(o.a)(r).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,o){return n("div",{key:o,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})},899:function(t,e,n){"use strict";n.r(e);var o={name:"PasswordInput",props:{error:{type:Boolean,default:!1}},data:function(){return{password:""}},watch:{error:function(t){t&&(this.password="")}},mounted:function(){document.addEventListener("keyup",this.onInput)},methods:{onInput:function(t){if(["0","1","2","3","4","5","6","7","8","9"].indexOf(t.key)>=0&&(this.password+=t.key,this.$emit("type")),6===this.password.length)return this.$emit("password",this.password);this.password.length>6&&(this.password=this.password.substring(0,6)),"Backspace"===t.key&&(this.password=this.password.substr(0,this.password.length-1))}}},r=(n(882),n(11)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"code"},t._l(6,(function(e,o){return n("span",{key:o,class:{"code-item":!0,filled:t.password[o],error:t.error}},[t._v(t._s(t.password[o]?"*":" "))])})),0)}),[],!1,null,"49461560",null);e.default=component.exports},906:function(t,e,n){"use strict";n(876)},907:function(t,e,n){"use strict";n(877)},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 o=n(9),r=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(r.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(o.a)(regeneratorRuntime.mark((function e(){var n,o;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(","),o=[],n.length>0&&(n.forEach((function(t){o.push("search_ids=".concat(t))})),t.$router.push("/category/".concat(t.category.id,"?").concat(o.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(o.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(r.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,o){return[n("attachment-list",{key:o,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,o){return[n("attachment-list",{key:o,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,o){return[n("audio-player",{key:o,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 o={name:"CommentHeader",props:{commentCount:{type:Number,default:0},isPositiveSort:{type:Boolean,default:!1}}},r=(n(938),n(11)),component=Object(r.a)(o,(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 o=n(85),r=(n(13),n(108),n(34),n(714)),c={name:"TopicAside",mixins:[n.n(r).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(o.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,o){return n("div",{key:o,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 o=n(33),r=n(714),c=n.n(r),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(o.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 o=n(734),r=n.n(o),c=n(714),l={name:"AsideHeader",mixins:[n.n(c).a,r.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,o){return n("div",{key:o,staticClass:"billBoard-item",on:{click:function(e){return t.toprofile(o)}}},[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})}}]);