GterForumWeB/dist/js/429.47e41ec8.js
2023-11-10 12:10:14 +08:00

1 line
25 KiB
JavaScript

"use strict";(self["webpackChunkninepage"]=self["webpackChunkninepage"]||[]).push([[429],{3429:function(t,e,s){s.r(e),s.d(e,{default:function(){return b}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("div",{staticClass:"detail-head flexacenter"},[e("div",{staticClass:"detail-section",on:{click:function(e){return t.toAllSection()}}},[t._v(" 版块:"),e("span",{staticClass:"section-name"},[t._v(t._s(t.info.forum))])]),e("div",{staticClass:"detail-data flexacenter"},[e("div",{staticClass:"detail-data-item flexacenter"},[e("img",{staticClass:"detail-data-eye",attrs:{src:s(153)}}),t._v(t._s(t.info.views))]),e("div",{staticClass:"detail-data-item flexacenter"},[e("img",{staticClass:"detail-data-comment",attrs:{src:s(4455)}}),t._v(t._s(t.info.replies))])])]),e("div"),e("div",{staticClass:"detail-title-box"},[t.info.digest>0?e("div",{staticClass:"detail-title-item detail-title-jinghua flexcenter"},[t._v("精华")]):t._e(),t.info.typename?e("div",{staticClass:"detail-title-item detail-title-label flexcenter"},[t._v(t._s(t.info.typename))]):t._e(),t._v(" "+t._s(t.info.subject)+" ")]),e("div",{staticClass:"card flexcenter"},[e("div",{staticClass:"card-item shadow"},[e("div",{staticClass:"card-head flexacenter"},[e("img",{staticClass:"card-head-icon",attrs:{src:t.info.avatar}}),e("div",{staticClass:"card-head-content flex1 flexflex"},[e("div",{staticClass:"card-head-name flexflex"},[t._v(t._s(t.info.author||"匿名用户"))]),e("div",{staticClass:"card-head-time"},[t._v(t._s(t.$formattedDate(t.info.dateline||"")))])]),e("div",{staticClass:"card-head-fool"},[t._v("楼主")]),1==t.info.isauthor?e("a",{staticClass:"edit-box flexcenter",attrs:{href:`https://www.gter.net/bbs/post/edit.html?tid=${t.tid}&pid=${t.info.pid}`}},[e("img",{staticClass:"edit-icom",attrs:{src:s(627)}})]):t._e()]),5==t.type?[e("div",{staticClass:"summary-content"},[t._l(t.collegelist,(function(s,i){return e("div",{key:i,staticClass:"summary-content-item"},[e("div",{staticClass:"summary-offer-head flexacenter"},[e("span",{staticClass:"summary-offer-head-title"},[t._v("Offer "+t._s(i+1))]),e("a",{staticClass:"flexacenter",attrs:{href:s.url}},[t._v("详情"),e("svg-icon",{attrs:{"icon-class":"arrowsBlackLeft","class-name":"summary-offer-head-icon"}})],1)]),e("div",{staticClass:"summary-offer-box"},[t._l(t.offerinfoKey,(function(i,a){return[s[i.key]?e("div",{key:a,staticClass:"summary-offer-item flexacenter"},[e("div",{staticClass:"summary-offer-key flexacenter"},[t._v(t._s(i.name))]),e("div",{staticClass:"summary-offer-value flexacenter"},[t._v(t._s(s[i.key]))])]):t._e()]}))],2)])})),e("div",{staticClass:"summary-content-item"},[e("div",{staticClass:"summary-offer-head flexacenter"},[e("span",{staticClass:"summary-offer-head-title"},[t._v("总结")]),e("a",{staticClass:"flexacenter",attrs:{href:t.info.url}},[t._v("详情"),e("svg-icon",{attrs:{"icon-class":"arrowsBlackLeft","class-name":"summary-offer-head-icon"}})],1)]),e("div",{staticClass:"summary-wenzi",domProps:{innerHTML:t._s(t.info.message)}})]),e("a",{staticClass:"examine-btn flexcenter",attrs:{href:t.info.url}},[t._v(" 查看当前总结详情 "),e("div",{staticClass:"examine-btn-outside flexcenter"},[e("svg-icon",{attrs:{"icon-class":"arrowsRoundBlackLeft","class-name":"examine-btn-icon"}})],1)])],2)]:6==t.type?[e("div",{staticClass:"offer-content"},[e("div",{staticClass:"offer-content-box"},[t._l(t.offerinfoKey,(function(s,i){return[t.offerinfo[s.key]?e("div",{key:i,staticClass:"offer-content-item flexacenter"},[t.offerinfo[s.key]?e("div",{staticClass:"offer-content-key"},[t._v(t._s(s.name))]):t._e(),e("div",{staticClass:"offer-content-value"},[t._v(t._s(t.offerinfo[s.key]))])]):t._e()]}))],2),e("a",{staticClass:"examine-btn flexcenter",attrs:{href:t.offerinfo.url}},[t._v(" 查看当前捷报详情 "),e("div",{staticClass:"examine-btn-outside flexcenter"},[e("svg-icon",{attrs:{"icon-class":"arrowsRoundBlackLeft","class-name":"examine-btn-icon"}})],1)])])]:2==t.type?[e("div",{staticClass:"offer-content"},[e("div",{staticClass:"offer-content-box"},[t._l(t.interviewKey,(function(s,i){return[t.info[s.key]?e("div",{key:i,staticClass:"offer-content-item flexacenter"},[t.info[s.key]?e("div",{staticClass:"offer-content-key"},[t._v(t._s(s.name))]):t._e(),e("div",{staticClass:"offer-content-value",class:{isvisiblereply:1==t.info["isvisiblereply"]&&!t.info["isreply"]},domProps:{innerHTML:t._s(t.info[s.key])}})]):t._e(),"message"!=s.key||1!=t.info["isvisiblereply"]||t.info["isreply"]?t._e():[e("div",{key:s.key,staticClass:"flexcenter content-unlock content-unlock-no",class:{replyVisible:t.islogin,registerVisible:!t.islogin},on:{click:function(e){t.islogin?t.popState="discussionSingle":t.isloginBtnState=!0}}},[e("img",{staticClass:"unlock-icom",attrs:{src:`${t.$baseURL}/img/unlock.png`}}),t._v(" 详细内容回复可见 ")])]]}))],2)])]:3==t.type?[e("div",{staticClass:"offer-content"},[e("div",{staticClass:"offer-content-box"},[t._l(t.tenementKey,(function(s,i){return[t.info[s.key]?e("div",{key:i,staticClass:"offer-content-item flexacenter"},[t.info[s.key]?e("div",{staticClass:"offer-content-key"},[t._v(t._s(s.name))]):t._e(),"school"!=s.key?e("div",{staticClass:"offer-content-value",domProps:{innerHTML:t._s(t.info[s.key])}}):e("div",{staticClass:"offer-content-value"},[t._l(t.info[s.key],(function(e){return[t._v(t._s(e.name))]}))],2)]):t._e()]}))],2),e("div",{staticClass:"vHtmlMessage",staticStyle:{margin:"0.52rem 0"},domProps:{innerHTML:t._s(t.info.message)}}),t._l(t.info.images,(function(t,s){return e("img",{key:s,staticClass:"tenement-img",attrs:{src:t}})}))],2)]:[e("div",{staticClass:"offer-content"},[e("div",{ref:"vHtmlMessage",staticClass:"vHtmlMessage",staticStyle:{"line-height":"normal"}})])]],2),0!=t.postList.list.length?t._l(t.postList.list,(function(i,a){return e("div",{key:a,staticClass:"card-item shadow"},[e("div",{staticClass:"card-head flexacenter"},[e("img",{staticClass:"card-head-icon",attrs:{src:i.avatar}}),e("div",{staticClass:"card-head-content flex1 flexflex"},[e("div",{staticClass:"card-head-name flexflex"},[t._v(" "+t._s(i.author||"匿名用户")+" "),1==i.isauthor?e("div",{staticClass:"landlord flexcenter"},[t._v("楼主")]):t._e()]),e("div",{staticClass:"card-head-time"},[t._v(t._s(t.$formattedDate(i.dateline)))])]),1==t.postList.page?e("div",{staticClass:"card-head-fool"},[t._v(t._s(`${(t.postList.page-1)*t.postList.limit+a+2}`))]):e("div",{staticClass:"card-head-fool"},[t._v(t._s(`${(t.postList.page-1)*t.postList.limit+a+1}`))]),1==i.ismyself?e("div",{staticClass:"edit-box flexcenter",on:{click:function(e){return e.stopPropagation(),t.openEditPop(i)}}},[e("img",{staticClass:"edit-icom",attrs:{src:s(627)}})]):t._e()]),e("div",{staticClass:"card-content flex1",domProps:{innerHTML:t._s(i.message)},on:{click:function(e){return e.stopPropagation(),t.handleReplyPop(i)}}})])})):t._e()],2),t.postList.count>t.postList.limit?e("div",{staticClass:"paging flexcenter"},[e("el-pagination",{attrs:{small:"",background:"",layout:"prev, pager, next","current-page":t.postList.page,"page-size":t.postList.limit,total:t.postList.count},on:{"current-change":t.currentChange,"update:currentPage":function(e){return t.$set(t.postList,"page",e)},"update:current-page":function(e){return t.$set(t.postList,"page",e)}}})],1):t._e(),e("div",{staticClass:"discuss-bottom flexflex flexacenter"},[e("div",{staticClass:"swiper"},[e("div",{staticClass:"bottom-item flexacenter"},[e("div",{staticClass:"bottom-comment flexacenter",on:{click:function(e){return t.setValue("popState","discussionSingle")}}},[e("svg-icon",{attrs:{"icon-class":"pen","class-name":"bottom-comment-icom"}}),t._v(" 想问啥,大胆问 "),t.islogin?t._e():e("div",{staticClass:"loginBtn",on:{click:function(e){return e.stopPropagation(),t.setValue("isloginBtnState",!0,"boolean")}}})],1)])]),e("div",{staticClass:"bottom-item flex1 flexacenter"},[e("div",{staticClass:"bottom-operation-box flex1 flexacenter"},[e("div",{staticClass:"bottom-operation-item flex1 flexcolumn flexcenter",on:{click:function(e){0==t.info.islike&&t.tapOperate("like")}}},[t.islogin?t._e():e("div",{staticClass:"loginBtn",on:{click:function(e){return e.stopPropagation(),t.setValue("isloginBtnState",!0,"boolean")}}}),0==t.info.islike?e("img",{staticClass:"bottom-operation-icom",class:{prepareLiskeAnimateState:t.prepareLiskeAnimateState},attrs:{src:s(3262)}}):e("img",{staticClass:"bottom-operation-icom",class:{prepareLiskeAnimateState:t.prepareLiskeAnimateState},attrs:{src:s(2969)}}),e("div",{staticClass:"bottom-operation-text"},[t._v(t._s(0==t.info.recommend_add?"":t.info.recommend_add)+"赞")])]),e("div",{staticClass:"bottom-operation-item flex1 flexcolumn flexcenter",on:{click:function(e){return t.tapOperate(0==t.info.isfav?"collect":"uncollect")}}},[t.islogin?t._e():e("div",{staticClass:"loginBtn",on:{click:function(e){return e.stopPropagation(),t.setValue("isloginBtnState",!0,"boolean")}}}),0==t.info.isfav?e("img",{staticClass:"bottom-operation-icom",attrs:{src:s(3490)}}):e("img",{staticClass:"bottom-operation-icom",attrs:{src:s(5196)}}),e("div",{staticClass:"bottom-operation-text"},[t._v("收藏")])]),e("div",{staticClass:"bottom-operation-item flex1 flexcolumn flexcenter transmit",attrs:{"data-clipboard-text":"Text to copy"},on:{click:function(e){return t.transmit()}}},[e("img",{staticClass:"bottom-operation-icom bottom-transmit-icom",attrs:{src:s(5842)}}),e("div",{staticClass:"bottom-operation-text"},[t._v("转发")])])])])]),e("detail-reply",{attrs:{"two-comment-data":t.twoCommentData,"comment-content":t.commentContent,"pop-state":t.popState}}),e("coins",{attrs:{"coin-config":t.coinConfig,mybalance:t.mybalance,"pop-state":t.popState,info:t.info}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.alert.state,expression:"alert.state"}],staticClass:"alert",class:{alertState:t.alert.state}},[e("el-alert",{attrs:{title:t.alert.message,type:"info",center:"","show-icon":"",closable:!1}})],1)],1)},a=[],n=(s(7658),function(){var t=this,e=t._self._c;return e("div",["discussionSingle"==t.popState?e("div",{staticClass:"pop-box flexflex flexcolumn",on:{click:function(e){t.openDiscussionSingleState&&t.handlePopCancel()}}},[e("div",{staticClass:"discussion-box pop-box-box flexflex flexcolumn",staticStyle:{"border-radius":".4rem .4rem 0 0"},on:{click:function(t){t.stopPropagation()}}},[t.twoCommentData?e("div",{staticClass:"discussion-header flexacenter"},[e("img",{staticClass:"discussion-avatar",attrs:{src:t.twoCommentData&&t.twoCommentData.avatar}}),e("div",{staticClass:"discussion-text one-line"},[t._v(t._s(t.twoCommentData&&t.twoCommentData.content))])]):t._e(),e("div",{staticClass:"discussion-single-box flexflex flex1"},[e("div",{staticClass:"discussion-single-content flexacenter flex1"},[e("input",{directives:[{name:"focus",rawName:"v-focus"}],staticClass:"discussion-single-input flex1",attrs:{"cursor-spacing":"5",type:"text",placeholder:t.twoCommentData?"写回复…":"想问啥,大胆问…",maxlength:"500"},domProps:{value:t.commentContent},on:{input:function(e){return t.inputCommentContent(e)}}}),e("img",{staticClass:"discussion-single-input-icom",attrs:{src:s(2432)},on:{click:function(e){return e.stopPropagation(),t.setValue()}}})]),e("div",{staticClass:"discussion-single-btn flexcenter",on:{click:function(e){return e.stopPropagation(),t.postComment()}}},[t._v("发布")])])])]):t._e(),"discussionMulti"==t.popState?e("div",{staticClass:"pop-box flexflex flexcolumn",on:{click:function(e){return t.handlePopCancel()}}},[e("div",{staticClass:"discussion-multi-box pop-box-box flexflex flexcolumn",staticStyle:{"border-radius":".4rem .4rem 0 0"},on:{click:function(t){t.stopPropagation()}}},[t.twoCommentData?e("div",{staticClass:"discussion-header flexacenter"},[e("img",{staticClass:"discussion-avatar",attrs:{src:t.twoCommentData.avatar}}),e("div",{staticClass:"discussion-text one-line"},[t._v(t._s(t.twoCommentData.content))])]):t._e(),e("div",{staticClass:"discussion-multi-content flexflex flex1"},[e("textarea",{directives:[{name:"focus",rawName:"v-focus"}],staticClass:"discussion-multi-textarea flex1",attrs:{type:"text",maxlength:"500",placeholder:t.twoCommentData?"写回复…":"想问啥,大胆问…"},domProps:{value:t.commentContent},on:{input:function(e){return t.inputCommentContent(e)}}}),e("img",{staticClass:"discussion-multi-icom",attrs:{src:s(7266)},on:{click:function(e){return e.stopPropagation(),t.openDiscussionSingle()}}}),e("div",{staticClass:"discussion-multi-sum"},[t._v(t._s(500-t.commentContent.length))])]),e("div",{staticClass:"discussion-multi-bottom flexflex flexacenter"},[e("div",{staticClass:"discussion-multi-btn flexcenter",on:{click:function(e){return e.stopPropagation(),t.postComment()}}},[t._v("发布")])])])]):t._e()])}),o=[],l={name:"DetailReply",data(){return{openDiscussionSingleState:!0}},props:["twoCommentData","popState","commentContent"],mounted(){},methods:{postComment(){this.$parent.postComment()},handlePopCancel(){this.$parent.twoCommentData=null,this.$parent.popState="",this.$parent.commentContent=""},clearTwoCommentData(){this.$parent.twoCommentData=null},setValue(t,e){this.$parent.popState="discussionMulti"},openDiscussionSingle(){this.$parent.popState="discussionSingle",this.openDiscussionSingleState=!1,setTimeout((()=>{this.openDiscussionSingleState=!0}),500)},inputCommentContent(t){let e=t.currentTarget.value;this.$parent.commentContent=e}}},c=l,r=s(1001),m=(0,r.Z)(c,n,o,!1,null,"2144a694",null),f=m.exports,d=function(){var t=this,e=t._self._c;return e("div",["coinNo"==t.popState?e("div",{staticClass:"pop-box flexflex flexcolumn",on:{click:function(e){return t.handlePopCancel()}}},[e("div",{staticClass:"coin-insufficient pop-box-box",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"coin-close flexcenter",on:{click:function(e){return t.handlePopCancel()}}},[e("svg-icon",{attrs:{"icon-class":"gray-cross","class-name":"coin-close-icom"}})],1),e("div",{staticClass:"insufficient-header flexcenter"},[e("svg-icon",{attrs:{"icon-class":"bi","class-name":"coin-img"}}),t._v(" "+t._s(t.coinConfig.strategy.tips)+" ")],1),e("div",{staticClass:"strategy-btn flexcenter",on:{click:function(e){return e.stopPropagation(),t.$skipUrl(t.coinConfig.strategy.url)}}},[t._v(t._s(t.coinConfig.strategy.button)+" "),e("svg-icon",{attrs:{"icon-class":"arrowsRoundLeft","class-name":"strategy-icom"}})],1)])]):t._e(),"coindisplayuser"==t.popState?e("div",{staticClass:"pop-box flexflex flexcolumn",on:{click:function(e){return t.handlePopCancel()}}},[e("div",{staticClass:"unlockCoin-box pop-box-box",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"coin-close flexcenter",on:{click:function(e){return t.handlePopCancel()}}},[e("svg-icon",{attrs:{"icon-class":"gray-cross","class-name":"coin-close-icom"}})],1),e("div",{staticClass:"unlockCoin-header flexacenter"},[e("svg-icon",{attrs:{"icon-class":"bi","class-name":"coin-img"}}),t._v(" 投币解锁 ")],1),e("div",{staticClass:"unlockCoin-hint flexacenter",staticStyle:{"font-size":".36rem"}},[t._v("作者设置了阅读限制,解锁所有内容仅需 "),e("div",{staticClass:"unlockCoin-hint-sum"},[t._v(t._s(t.info.price))]),t._v(" 寄托币")]),e("div",{staticClass:"unlockCoin-btn flexcenter",on:{click:function(e){return t.postCoin()}}},[t._v("立即解锁 ")]),e("div",{staticClass:"unlockCoin-hint flexcenter"},[t._v("你共有 "+t._s(t.mybalance)+" 个寄托币")])])]):t._e()])},p=[],u={name:"Coins",props:["popState","coinConfig","info","mybalance"],data(){return{}},mounted(){},methods:{handlePopCancel(){this.$parent.popState=""},postCoin(){this.$parent.postCoin()}}},h=u,g=(0,r.Z)(h,d,p,!1,null,"30e5494c",null),v=g.exports,C=s(6799),y=s(8697),x={name:"detailIndex",data(){return{twoCommentData:null,editCommentPid:null,popState:"",coinConfig:{strategy:{button:"攒币指南",tips:"你的寄托币不够,快去发帖挣币吧",url:C.k}},islogin:!0,prepareLiskeAnimateState:!1,stat:{like:0},iscollect:0,ispostOfferLike:null,offerLikesumTimer:0,offerLikesumAnimateTimer:0,listlist:[],tid:0,info:{},type:0,token:"",offerinfo:{},offerinfoKey:[{key:"schoolname",name:"申请学校"},{key:"degree",name:"学位"},{key:"professional",name:"专业"},{key:"project",name:"项目"},{key:"apply_results",name:"申请结果"},{key:"semester",name:"入学学期"},{key:"noticedate",name:"通知时间"},{key:"useperformanceStr",name:"使用成绩"}],shareurl:"",collegelist:[],tenementKey:[{key:"typeText",name:"出租方式"},{key:"rent",name:"月租/"},{key:"property",name:"房屋类型"},{key:"floor",name:"所在楼层"},{key:"acreage",name:"面积(平方呎)"},{key:"locationText",name:"所在区域"},{key:"addressText",name:"地段/地址"},{key:"school",name:"附近学校"},{key:"gender",name:"性别要求"},{key:"rentaldurationText",name:"出租时长"},{key:"introduction",name:"房东或合租人介绍"},{key:"intermediary_text",name:"发布者身份"},{key:"telText",name:"电话"},{key:"wechatText",name:"微信"}],interviewKey:[{name:"学校",key:"school"},{name:"专业",key:"profession"},{name:"项目",key:"project"},{name:"毕业时间",key:"interviewtime"},{name:"面试过程及内容",key:"message"}],postList:{list:[],page:1,limit:20,count:0},loading:null,commentContent:"",operateState:!1,mybalance:0,islogin:!1,alert:{state:!1,message:""},isloginBtnState:!1}},watch:{popState(t,e){t?this.$pageStop():this.$pageMove()},"$store.state.user":{handler(t,e){"{}"!=JSON.stringify(t)&&(this.islogin=t.uid>0,this.tid=this.$route.query["tid"],this.postList.page=this.$route.query["page"]||1,this.getDetail())},immediate:!0},isloginBtnState(t,e){t&&this.$goTologin()}},mounted(){window.scrollTo(0,0)},methods:{getDetail(){this.$startupUnderLoading(this),this.$http.post("/api/thread",{tid:this.tid}).then((t=>{if(200!=t.code)return;let e=t.data,s=e.info;s["message"]=s["message"].trim();const i=new RegExp("\r\n","g");s["message"]=s["message"].replaceAll(i,"<br/>"),s["message"]=s["message"].replace(/<img[^>]*>/g,(t=>t.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,"")));let a=`<div class="flexcenter content-unlock content-unlock-no ${this.islogin?"replyVisible":"registerVisible"} " @click="setValue('popState', ${this.islogin?"discussionSingle":"isloginBtnState"})"><img class="unlock-icom" src="${this.$baseURL}/img/unlock.png"/>作者设置了${this.islogin?"回复":"登录"}可见</div>`,n=`<div class="flexcenter content-unlock content-unlock-no coinVisible"><img class="unlock-icom" src="${this.$baseURL}/img/unlock.png"/>作者设置了投币可见</div>`,o='<div class="content-unlock content-already"><div class="content-already-header flexflex">- 本内容投币可见 -</div><div class="content-unlock-wenzi">标记</div></div>',l=e.info.ispost,c=e.info.price,r=e.info.isbuy,m=e.info.isauthor;if(c>0&&0==r&&1!=m){let t=s["message"];s["message"]="";const e=/\[(free|hide)\]([^[]+)\[\/(free|hide)\]/g;let i=t.match(e)||[];for(let a=0;a<i.length;a++)i[a]=i[a].replace("[free]",""),i[a]=i[a].replace("[/free]",""),s["message"]+=i[a];s["message"]+=n}if(1==r||1==m){let t=s["message"],e="";const i=/\[free\]|\[\/free\]|\[hide\]|\[\/hide\]|\[hide=[^\]]+\]/g,a=Array.from(t.matchAll(i),(t=>t.index)),n=[];for(let s=0;s<a.length;s+=2){const t=[a[s],a[s+1]];n.push(t)}n.forEach(((s,i)=>{if(0!=i){let a=t.slice(n[i-1][1]+7,s[0]);a=this.goEmpty(a),a&&(e+=o.replace("标记",t.slice(n[i-1][1]+7,s[0])))}if(0==i){let i=t.slice(0,s[0]);i=this.goEmpty(i),i&&(e+=t.slice(0,s[0]))}if(i==n.length-1){let i=t.slice(s[1]+7,t.length-1);i=this.goEmpty(i),i&&(e+=o.replace("标记",t.slice(s[1]+7,t.length-1)))}e+=t.slice(s[0],s[1]+7)})),e=e.replaceAll("[free]",""),e=e.replaceAll("[/free]",""),s["message"]=e}const f=/\[hide(?:=[0-9]+)?\]/;if(f.test(s["message"])){const t=/\[hide\].*?\[\/hide\]/g;if(0==l&&1!=m&&(s["message"]=s["message"].replace(t,a)),1==l||1==m){var d=/\[hide(=\d+)?\]/g;s["message"]=s["message"].replaceAll(d,'<div class="content-unlock content-already"><div class="content-already-header flexflex">- 本内容回复可见 -</div><div class="content-unlock-wenzi">'),s["message"]=s["message"].replaceAll("[/hide]","</div></div>")}}this.islogin||0!=r||(s["message"]=s["message"].replaceAll("[free]",""),s["message"]=s["message"].replaceAll("[/free]","")),0==e.type&&(this.$refs["vHtmlMessage"]&&(this.$refs.vHtmlMessage.innerHTML=s["message"]));let p=document.getElementsByClassName("replyVisible");if(!Array.isArray(p)){for(let t=0;t<p.length;t++)p[t].addEventListener("click",(()=>{this.$emit("replyVisibleClick")}));this.$on("replyVisibleClick",(()=>{this.popState="discussionSingle"}))}let u=document.getElementsByClassName("coinVisible");if(!Array.isArray(u)){for(let t=0;t<u.length;t++)u[t].addEventListener("click",(()=>{this.$emit("coinVisibleClick")}));this.$on("coinVisibleClick",(()=>{this.popState=e.mybalance>c?"coindisplayuser":"coinNo"}))}let h=document.getElementsByClassName("registerVisible");if(!Array.isArray(h)){for(let t=0;t<h.length;t++)h[t].addEventListener("click",(()=>{this.$emit("registerVisibleClick")}));this.$on("registerVisibleClick",(()=>{this.isloginBtnState=!0}))}this.info=s,this.type=e.type,this.token=e.token,this.mybalance=e.mybalance,6==this.type?this.getOfferDetail():5==this.type?this.getsummaryDetails():3==this.type?this.getTenementDetails():2==this.type&&this.getInterviewDetails(),0!=s["replies"]&&this.getPostList()})).finally((()=>{this.$closeUnderLoading(this)}))},goEmpty(t){t=t.trim();while(-1!=t.indexOf("<br/>"))t=t.replace("<br/>","");return t},getOfferDetail(){this.$http.get("/api/forum/details",{id:this.token},"offer").then((t=>{let e=t.data,s=e.collegelist[0],i="";s.useperformance&&s.useperformance.forEach(((t,e)=>{i+=t+(s.useperformance.length-1==e?"":"、")})),s["useperformanceStr"]=i,this.offerinfo=s}))},getsummaryDetails(){this.$http.get("/api/forum/details",{id:this.token},"offer").then((t=>{let e=t.data,s=e.collegelist;s.forEach(((t,e)=>{let s="";t.useperformance&&t.useperformance.forEach(((e,i)=>{s+=e+(t.useperformance.length-1==i?"":"、")})),t["useperformanceStr"]=s})),this.info={...this.info,...e.info},this.collegelist=s,this.shareurl=e.shareurl}))},getTenementDetails(){this.$http.post("/tenement/forum/show",{token:this.token},"tenement").then((t=>{201==t.code&&(this.tenementInfoState=!0);let e=this.tenementKey,s={...this.info,...t.info};s["typeText"]=s.gptype+">>"+s.type,e[1].name+=s["currency"]?s["currency"]:"港元",1==s.cityid?s["locationText"]=s.location:s["locationText"]=s.country+">>"+s.city,s["addressText"]=s["address"]||"-",s["rentaldurationText"]=s.rentalduration||"不限",s["telText"]=s.tel||"-",s["wechatText"]=s.wechat||"-";const i=new RegExp("\r\n","g");s["message"]=s["message"].replaceAll(i,"<br/>"),s["message"]=s["message"].replace(/<img[^>]*>/g,(t=>t.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,""))),this.info=s}))},getInterviewDetails(){this.$http.post("/InterviewExperience/thread",{tid:this.tid,token:this.token},"tenement").then((t=>{if(200!=t.code)return;let e=t.data;this.info={...this.info,...e},1!=e["isvisiblereply"]||e["isreply"]||(console.log("需要回复看详情"),console.log("this.info",this.info["message"]))}))},getPostList(){this.$startupUnderLoading(this);let{page:t,limit:e}=this.postList;this.$http.post("/api/thread/postList",{token:this.token,page:t,limit:e}).then((t=>{if(200!=t.code)return;let e=t.data;e.data.forEach((t=>{for(const e in y)t.message=t.message.replaceAll(e,`<img class="gif" src="${y[e]}" />`)})),this.postList.list=e.data,this.postList.page=e.page,this.postList.limit=e.limit,this.postList.count=e.count})).finally((()=>{this.$closeUnderLoading(this)}))},openEditPop(t){let e=t.message;e=e.replace(/<div[^>]*>[\s\S]*?<\/div>/gi,""),e=e.trim(),this.commentContent=e,this.editCommentPid=t.pid,this.popState="discussionMulti"},handleReplyPop(t){let e=t.message;e=e.replace(/<[^>]*>/g,""),e=e.trim(),this.twoCommentData={avatar:t.avatar,content:e,pid:t.pid},this.popState="discussionSingle"},postComment(t){let e="";e=this.editCommentPid?"/api/operation/redactPost":"/api/operation/reply",this.$http.post(e,{token:this.token,message:this.commentContent,pid:this.editCommentPid||this.twoCommentData&&this.twoCommentData.pid}).then((t=>{if(200!=t.code)return;if(this.$Message.success("发布成功"),this.popState="",this.twoCommentData=null,this.editCommentPid)return void setTimeout((()=>{this.$router.go(0)}),800);this.editCommentPid=null;let{count:e,limit:s}=this.postList,i=Math.ceil((e+1)/s);setTimeout((()=>{if(i==this.postList.page)return this.$router.go(0),void clearTimeout(timer);let t={page:i,tid:this.tid};this.$router.push({path:"/detailIndex",query:t})}),800)}))},currentChange(){let t={page:this.postList.page,tid:this.tid};this.getPostList(),this.$updateURLSearchParams(t)},tapOperate(t){if(this.operateState)return;this.operateState=!0;let e="";"like"==t?e="/api/operation/threadLike":"collect"==t?e="/api/operation/threadFav":"uncollect"==t&&(e="/api/operation/threadunFav"),this.$http.post(e,{tid:this.tid}).then((e=>{200==e.code&&("like"==t&&(this.info.islike=1,this.info.recommends),"collect"==t&&(this.info.isfav=1),"uncollect"==t&&(this.info.isfav=0),this.openHintBox(e.message))})).finally((()=>{this.operateState=!1}))},transmit(){let t=location.href;this.$copy(t,"已经复制链接,欢迎分享!")},setValue(t,e){console.log("key",t,e),this[t]=e},toAllSection(){this.$router.push({path:"/allSections",query:{fid:this.info.fid}})},handleIsmyself(t){this.popState="discussionMulti",this.commentContent=t.message},postCoin(){this.$http.post("/api/operation/coinPurchase",{token:this.token}).then((t=>{200==t.code&&(this.openHintBox(t.message),this.popState="",this.$router.go(0))}))},openHintBox(t){this.alert.state=!0,this.alert.message=t,setTimeout((()=>{this.alert.state=!1}),1500)}},components:{DetailReply:f,Coins:v}},k=x,_=(0,r.Z)(k,i,a,!1,null,"09d266e9",null),b=_.exports},6799:function(t,e,s){s.d(e,{a:function(){return i},k:function(){return a}});const i="https://www.gter.net/bbs/post.html",a="https://bbs.gter.net/thread-2543548-1-1.html"}}]);