"use strict";(self["webpackChunkninepage"]=self["webpackChunkninepage"]||[]).push([[84],{6513:function(e,t,i){i.r(t);var s=i(3479),a=i(4864),n=(i(199),i(1001)),o=(0,n.Z)(a.Z,s.s,s.x,!1,null,"60d2a264",null);t["default"]=o.exports},61:function(e,t,i){i(7658);var s=i(4820),a=i(1809),n=i(6799);i(8697);t["Z"]={name:"detailIndex",data(){return{twoCommentData:null,editCommentPid:null,popState:"",coinConfig:{strategy:{button:"攒币指南",tips:"你的寄托币不够,快去发帖挣币吧",url:n.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,locationInfoKey:[{key:"profession",name:"目前专业"},{key:"estate",name:"目前状态"},{key:"undergraduate_school",name:"本科学校"},{key:"gpa_score",name:"GPA"},{key:"gpa_ranking",name:"排名"},{key:"master_school",name:"硕士学校"},{key:"master_achievement",name:"成绩"},{key:"gre_total",name:"GRE"},{key:"ielts_total",name:"IELTS"},{key:"toefl_total",name:"TOEFL"}],locationThreadKey:[{key:"profession",name:"申请专业"},{key:"profession_cid",name:"专业分类"},{key:"apply_master",name:"学位"},{key:"country",name:"国家或地区"},{key:"experience",name:"科研经验"},{key:"scholarship",name:"是否要奖学金"},{key:"lsat",name:"LSAT"},{key:"sex",name:"性别"},{key:"paper",name:"论文发表"},{key:"recommendation",name:"推荐信"},{key:"hope",name:"定位期望"}],locationInfoData:[],locationThreadData:[],estate:{1:"本科生",2:"硕士生",3:"毕业工作",4:"其它"},experience:{0:0,1:"1年",2:"2年",3:"3-5年",5:"5-10年"},profession_cid:{1:"理工科",2:"法律",3:"商科",4:"非法律其他文科",5:"艺术",6:"其它",7:"建筑与设计",8:"人文",9:"CS/EE",10:"生农医药"},adminOperateState:!1,deletePostToken:"",managementauthority:0,adminOperateListIndex:null}},watch:{popState(e,t){e?this.$pageStop():this.$pageMove()},"$store.state.user":{handler(e,t){"{}"!=JSON.stringify(e)&&(this.islogin=e.uid>0,this.tid=this.$route.query["tid"],this.postList.page=this.$route.query["page"]||1,this.getDetail())},immediate:!0},isloginBtnState(e,t){e&&this.$goTologin()}},mounted(){window.scrollTo(0,0)},methods:{getDetail(){this.$startupUnderLoading(this),this.$http.post("/api/thread",{tid:this.tid}).then((e=>{if(200!=e.code)return;let t=e.data,i=t.info;this.managementauthority=t.managementauthority,i["message"]=i["message"].trim();const s=new RegExp("\r\n","g");i["message"]=i["message"].replaceAll(s,"
"),i["message"]=i["message"].replace(/]*>/g,(e=>e.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,"")));let a=`
作者设置了${this.islogin?"回复":"登录"}可见
`,n=`
作者设置了投币可见
`,o='
- 本内容投币可见 -
标记
',l=t.info.ispost,r=t.info.price,h=t.info.isbuy,c=t.info.isauthor;if(r>0&&0==h&&1!=c){let e=i["message"];i["message"]="";const t=/\[(free|hide)\]([^[]+)\[\/(free|hide)\]/g;let s=e.match(t)||[];for(let a=0;ae.index)),n=[];for(let i=0;i{if(0!=s){let a=e.slice(n[s-1][1]+7,i[0]);a=this.goEmpty(a),a&&(t+=o.replace("标记",e.slice(n[s-1][1]+7,i[0])))}if(0==s){let s=e.slice(0,i[0]);s=this.goEmpty(s),s&&(t+=e.slice(0,i[0]))}if(s==n.length-1){let s=e.slice(i[1]+7,e.length-1);s=this.goEmpty(s),s&&(t+=o.replace("标记",e.slice(i[1]+7,e.length-1)))}t+=e.slice(i[0],i[1]+7)})),t=t.replaceAll("[free]",""),t=t.replaceAll("[/free]",""),i["message"]=t}const m=/\[hide(?:=[0-9]+)?\]/;if(m.test(i["message"])){const e=/\[hide\].*?\[\/hide\]/g;if(0==l&&1!=c&&(i["message"]=i["message"].replace(e,a)),1==l||1==c){var p=/\[hide(=\d+)?\]/g;i["message"]=i["message"].replaceAll(p,'
- 本内容回复可见 -
'),i["message"]=i["message"].replaceAll("[/hide]","
")}}this.islogin||0!=h||(i["message"]=i["message"].replaceAll("[free]",""),i["message"]=i["message"].replaceAll("[/free]","")),0==t.type&&(this.$refs["vHtmlMessage"]&&(this.$refs.vHtmlMessage.innerHTML=i["message"]));let d=document.getElementsByClassName("replyVisible");if(!Array.isArray(d)){for(let e=0;e{this.$emit("replyVisibleClick")}));this.$on("replyVisibleClick",(()=>{this.popState="discussionSingle"}))}let g=document.getElementsByClassName("coinVisible");if(!Array.isArray(g)){for(let e=0;e{this.$emit("coinVisibleClick")}));this.$on("coinVisibleClick",(()=>{this.popState=t.mybalance>r?"coindisplayuser":"coinNo"}))}let f=document.getElementsByClassName("registerVisible");if(!Array.isArray(f)){for(let e=0;e{this.$emit("registerVisibleClick")}));this.$on("registerVisibleClick",(()=>{this.isloginBtnState=!0}))}this.info=i,this.type=t.type,this.token=t.token,this.mybalance=t.mybalance,6==this.type?this.getOfferDetail():5==this.type?this.getsummaryDetails():3==this.type?this.getTenementDetails():2==this.type?this.getInterviewDetails():1==this.type&&this.getLocationDetails(),0!=i["replies"]&&this.getPostList()})).finally((()=>{this.$closeUnderLoading(this)}))},goEmpty(e){e=e.trim();while(-1!=e.indexOf("
"))e=e.replace("
","");return e},getOfferDetail(){this.$http.get("/api/forum/details",{id:this.token},"offer").then((e=>{let t=e.data,i=t.collegelist[0],s="";i.useperformance&&i.useperformance.forEach(((e,t)=>{s+=e+(i.useperformance.length-1==t?"":"、")})),i["useperformanceStr"]=s,this.offerinfo=i}))},getsummaryDetails(){this.$http.get("/api/forum/details",{id:this.token},"offer").then((e=>{let t=e.data,i=t.collegelist;i.forEach(((e,t)=>{let i="";e.useperformance&&e.useperformance.forEach(((t,s)=>{i+=t+(e.useperformance.length-1==s?"":"、")})),e["useperformanceStr"]=i})),this.info={...this.info,...t.info},this.collegelist=i,this.shareurl=t.shareurl}))},getTenementDetails(){this.$http.post("/tenement/forum/show",{token:this.token},"tenement").then((e=>{201==e.code&&(this.tenementInfoState=!0);let t=this.tenementKey,i={...this.info,...e.info};i["typeText"]=i.gptype+">>"+i.type,t[1].name+=i["currency"]?i["currency"]:"港元",1==i.cityid?i["locationText"]=i.location:i["locationText"]=i.country+">>"+i.city,i["addressText"]=i["address"]||"-",i["rentaldurationText"]=i.rentalduration||"不限",i["telText"]=i.tel||"-",i["wechatText"]=i.wechat||"-";const s=new RegExp("\r\n","g");i["message"]=i["message"].replaceAll(s,"
"),i["message"]=i["message"].replace(/]*>/g,(e=>e.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,""))),this.info=i}))},getInterviewDetails(){this.$http.post("/InterviewExperience/thread",{tid:this.tid,token:this.token},"tenement").then((e=>{if(200!=e.code)return;let t=e.data;this.info={...this.info,...t},1!=t["isvisiblereply"]||t["isreply"]||(console.log("需要回复看详情"),console.log("this.info",this.info["message"]))}))},getPostList(){this.$startupUnderLoading(this);let{page:e,limit:t}=this.postList;this.$http.post("/api/thread/postList",{token:this.token,page:e,limit:t}).then((e=>{if(200!=e.code)return;let t=e.data;this.info.ispost;t.data.forEach((e=>{e["message"]=e["message"].trim();const t=new RegExp("\r\n","g");e["message"]=e["message"].replaceAll(t,"
"),e["message"]=e["message"].replace(/]*>/g,(e=>e.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,"")));let i=`
作者设置了${this.islogin?"回复":"登录"}可见
`;const s=/\[hide(?:=[0-9]+)?\]/;if(s.test(e["message"])){const t=/\[hide\].*?\[\/hide\]/g;if(this.islogin){var a=/\[hide(=\d+)?\]/g;e["message"]=e["message"].replaceAll(a,'
- 本内容回复可见 -
'),e["message"]=e["message"].replaceAll("[/hide]","
")}else e["message"]=e["message"].replace(t,i)}this.islogin||(e["message"]=e["message"].replaceAll("[free]",""),e["message"]=e["message"].replaceAll("[/free]",""))})),this.postList.list=t.data,this.postList.page=t.page,this.postList.limit=t.limit,this.postList.count=t.count})).finally((()=>{this.$closeUnderLoading(this)}))},openEditPop(e){let t=e.message;t=t.replace(/]*>[\s\S]*?<\/div>/gi,""),t=t.trim(),this.commentContent=t,this.editCommentPid=e.pid,this.popState="discussionMulti"},handleReplyPop(e){this.islogin||(this.isloginBtnState=!0);let t=e.message;t=t.replace(/<[^>]*>/g,""),t=t.trim(),this.twoCommentData={avatar:e.avatar,content:t,pid:e.pid},this.popState="discussionSingle"},postComment(e){let t="";t=this.editCommentPid?"/api/operation/redactPost":"/api/operation/reply",this.$http.post(t,{token:this.token,message:this.commentContent,pid:this.editCommentPid||this.twoCommentData&&this.twoCommentData.pid}).then((e=>{if(200!=e.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:t,limit:i}=this.postList,s=Math.ceil((t+1)/i);setTimeout((()=>{if(s==this.postList.page)return this.$router.go(0),void clearTimeout(timer);let e={page:s,tid:this.tid};this.$router.push({path:"/detailIndex",query:e})}),800)}))},currentChange(){let e={page:this.postList.page,tid:this.tid};this.getPostList(),this.$updateURLSearchParams(e)},tapOperate(e){if(this.operateState)return;this.operateState=!0;let t="";"like"==e?t="/api/operation/threadLike":"collect"==e?t="/api/operation/threadFav":"uncollect"==e&&(t="/api/operation/threadunFav"),this.$http.post(t,{tid:this.tid}).then((t=>{200==t.code&&("like"==e&&(this.info.islike=1,this.info.recommends),"collect"==e&&(this.info.isfav=1),"uncollect"==e&&(this.info.isfav=0),this.openHintBox(t.message))})).finally((()=>{this.operateState=!1}))},transmit(){let e=location.href;this.$copy(e,"已经复制链接,欢迎分享!")},setValue(e,t){this[e]=t},toAllSection(){this.$router.push({path:"/allSections",query:{fid:this.info.fid}})},handleIsmyself(e){this.popState="discussionMulti",this.commentContent=e.message},postCoin(){this.$http.post("/api/operation/coinPurchase",{token:this.token}).then((e=>{200==e.code&&(this.openHintBox(e.message),this.popState="",this.$router.go(0))}))},openHintBox(e){this.alert.state=!0,this.alert.message=e,setTimeout((()=>{this.alert.state=!1}),1500)},getLocationDetails(){this.$http.post("/api/position/thread",{token:this.token}).then((e=>{if(200!=e.code)return;const t=e.data,i=this.estate,s=this.experience,a=this.profession_cid,n=this.locationInfoKey||[],o=this.locationThreadKey||[],l=t.info,r=t.thread;let h=[];n.forEach((e=>{const t=e.key;if(l[t]){let s="";s="estate"==t?i[l[t]]:"gre_total"==t?`总分: ${l.gre_total} V: ${l.gre_v} Q: ${l.gre_q} AW: ${l.gre_aw}`:"ielts_total"==t?`总分: ${l.ielts_total} R: ${l.ielts_r} L: ${l.ielts_l} S: ${l.ielts_s} W: ${l.ielts_w}`:"toefl_total"==t?`总分: ${l.toefl_total} R: ${l.toefl_r} L: ${l.toefl_l} S: ${l.toefl_s} W: ${l.toefl_w}`:l[t],h.push({name:e.name,value:s})}})),this.locationInfoData=h;let c=[];o.forEach((e=>{const t=e.key;if(r[t]){let i="";"profession_cid"==t?(i=a[r[t]],r.apply_llm&&(i+=" LL.M"),r.apply_jd&&(i+=" J.D")):"country"==t?r.country.forEach(((e,t)=>{i+=e.name+(t>1?"、":"")})):i="scholarship"==t?"是":"sex"==t?2==r.profession_cid?1==r[t]?"男":"女":null:"lsat"==t?2==r.profession_cid?r["lsat"]:null:"experience"==t?s[r[t]]:r[t],null!=i&&c.push({name:e.name,value:i})}})),this.locationThreadData=c}))},openAdminOperate(e){if(this.deletePostToken="",this.adminOperateListIndex=null,null==e)return this.adminOperateState=!0,void(this.deletePostToken=this.token);this.postList.list[e]["adminOperateState"]=!0,this.deletePostToken=this.postList.list[e].token,this.adminOperateListIndex=e,this.$forceUpdate()},closeAdminOperate(){this.adminOperateState=!1,this.postList.list.forEach((e=>{e["adminOperateState"]=!1})),this.$forceUpdate()},popUupDialog(e){this.closeAdminOperate();const t=confirm(`确定要${e?"删除且禁言":"删除"}?`);t&&this.deletePost(e)},deletePost(e){console.log(this.adminOperateListIndex,"this.adminOperateListIndex"),this.$http.post("/api/manage/delete",{token:this.deletePostToken,hackinguser:e}).then((e=>{200==e.code&&(console.log(this.adminOperateListIndex),null==this.adminOperateListIndex?(document.referrer?window.history.back():window.location.href="/",this.openHintBox("res.message"),this.deletePostToken=""):location.reload())}))}},components:{DetailReply:s.Z,Coins:a.Z}}}}]);