GterForumWeB/dist/js/928.ad9d345c.js

1 line
11 KiB
JavaScript
Raw Normal View History

2024-02-29 11:43:19 +08:00
"use strict";(self["webpackChunkninepage"]=self["webpackChunkninepage"]||[]).push([[928],{8928:function(e,t,i){i.r(t),i.d(t,{default:function(){return m}});var s=i(6421),n=(i(7658),i(4820)),a=i(1809),o=i(6799),l=(i(8697),{name:"detailIndex",data(){return{twoCommentData:null,editCommentPid:null,popState:"",coinConfig:{strategy:{button:"攒币指南",tips:"你的寄托币不够,快去发帖挣币吧",url:o.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(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;i["message"]=i["message"].trim();const s=new RegExp("\r\n","g");i["message"]=i["message"].replaceAll(s,"<br/>"),i["message"]=i["message"].replace(/<img[^>]*>/g,(e=>e.replace(/width="[^"]*"/g,"").replace(/height="[^"]*"/g,"")));let n=`<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>`,a=`<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=t.info.ispost,r=t.info.price,c=t.info.isbuy,h=t.info.isauthor;if(r>0&&0==c&&1!=h){let e=i["message"];i["message"]="";const t=/\[(free|hide)\]([^[]+)\[\/(free|hide)\]/g;let s=e.match(t)||[];for(let n=0;n<s.length;n++)s[n]=s[n].replace("[free]",""),s[n]=s[n].replace("[/free]",""),i["message"]+=s[n];i["message"]+=a}if(1==c||1==h){let e=i["message"],t="";const s=/\[free\]|\[\/free\]|\[hide\]|\[\/hide\]|\[hide=[^\]]+\]/g,n=Array.from(e.matchAll(s),(e=>e.index)),a=[];for(let i=0;i<n.length;i+=2){const e=[n[i],n[i+1]];a.push(e)}a.forEach(((i,s)=>{if(0!=s){let n=e.slice(a[s-1][1]+7,i[0]);n=this.goEmpty(n),n&&(t+=o.replace("标记",e.slice(a[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==a.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)))