2 lines
5.9 KiB
JavaScript
2 lines
5.9 KiB
JavaScript
import{o as e,x as s,F as t,y as i,c as r,w as a,a as n,b as l,t as c,h as o,A as d,k as u,d as f,i as p,n as h,a5 as m,a6 as g,j as I}from"./index.953fb5a2.js";import{r as y,_}from"./watermark.5346bec0.js";import{_ as k}from"./friends-circle-top.d5489e8f.js";import{_ as C}from"./bf.ab99e8ff.js";import{_ as w}from"./plugin-vue_export-helper.21dcd24c.js";import{_ as v}from"./uni-load-more.3382b9b4.js";var x=w({emits:["clickItem"],data:()=>({}),props:{content:{type:Array,default:[]}},methods:{returnDate(e,s){return this.$fc.getNewDate(s,!0,e)},clickItem(e){this.$emit("clickItem",e)}}},[["render",function(h,m,g,I,y,_){const k=u,w=f,v=p;return e(),s(t,null,[(e(!0),s(t,null,i(g.content,((u,f)=>(e(),r(w,{class:"friends-circle-person-item",key:f},{default:a((()=>[n(w,{class:"friends-circle-person-item-date"},{default:a((()=>[n(k,{class:"day"},{default:a((()=>[l(c(_.returnDate(u.createTime,"d")),1)])),_:2},1024),n(k,{class:"month"},{default:a((()=>[l(c(_.returnDate(u.createTime,"m"))+"月",1)])),_:2},1024),n(w,{class:"year"},{default:a((()=>[l(c(_.returnDate(u.createTime,"y")),1)])),_:2},1024),u.location.name?(e(),r(w,{key:0,class:"year"},{default:a((()=>[l(c(u.location.name),1)])),_:2},1024)):o("",!0)])),_:2},1024),n(w,{class:"friends-circle-person-view",onClick:e=>_.clickItem(u)},{default:a((()=>["IMAGE"==u.topicType&&u.files.length>0?(e(),r(w,{key:0,class:"friends-circle-person-content"},{default:a((()=>[n(w,{class:"friends-circle-person-imgs"},{default:a((()=>[(e(!0),s(t,null,i(u.files.slice(0,4),((s,t)=>(e(),r(v,{key:t,class:d("fci"+u.files.slice(0,4).length),src:s.url,mode:"aspectFill"},null,8,["class","src"])))),128))])),_:2},1024),n(w,{class:"friends-circle-person-imgs-text"},{default:a((()=>[n(k,null,{default:a((()=>[l(c(u.text),1)])),_:2},1024),n(w,{class:"friends-circle-person-imgs-total"},{default:a((()=>[l("共"+c(u.files.length)+"张",1)])),_:2},1024)])),_:2},1024)])),_:2},1024)):o("",!0),"VIDEO"==u.topicType&&u.files.length>0?(e(),r(w,{key:1,class:"friends-circle-person-content"},{default:a((()=>[n(w,{class:"friendsCircle-content-video"},{default:a((()=>[n(v,{class:"friendsCircle-content-video-icon",src:C,mode:"aspectFill"}),n(v,{class:"friendsCircle-content-video-img",src:u.files[0].url,mode:"aspectFill"},null,8,["src"])])),_:2},1024),n(w,{class:"friends-circle-person-imgs-text"},{default:a((()=>[n(k,null,{default:a((()=>[l(c(u.text),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)):o("",!0),"TEXT"==u.topicType?(e(),r(w,{key:2,class:"friends-circle-person-content"},{default:a((()=>[n(w,{class:"friends-circle-person-text"},{default:a((()=>[n(k,null,{default:a((()=>[l(c(u.text),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)):o("",!0)])),_:2},1032,["onClick"])])),_:2},1024)))),128)),g.content.length<=0?(e(),r(w,{key:0,class:"friends-circle-nodata"},{default:a((()=>[n(w,{class:"friends-circle-nodata-line"}),n(w,{class:"friends-circle-nodata-text"},{default:a((()=>[l("未发布朋友圈")])),_:1})])),_:1})):o("",!0)],64)}],["__scopeId","data-v-1f9c106f"]]);var P=w({data:()=>({queryParams:{refreshing:!1,status:"more",pageNum:1,pageSize:10},content:[],showMsglist:!1,showChangePoster:!1,userInfox:{},cover:{type:"img",name:"",url:""},userId:""}),computed:{userInfo(){return this.$store.state.userInfo}},onLoad(e){e.userId?this.userId=e.userId:this.userId=this.userInfo.userId,this.userId==this.userInfo.userId&&(this.showMsglist=!0,this.showChangePoster=!0)},mounted(){this.$fc.setTitleNViewBtns(0,""),this.showMsglist&&this.$fc.setTitleNViewBtns(0,""),this.getUserInfo(this.userId)},onShow(){this.queryParams.refreshing=!0,this.getlist(this.userId)},methods:{getUserInfo(e){this.$http.request({url:"/friend/info/"+e,success:e=>{200==e.data.code&&(this.cover=e.data.data.cover?JSON.parse(e.data.data.cover):{type:"img",name:"",url:""},this.userInfox=e.data.data)}})},userClick(e,s){h({url:"../../wx/personInfo/detail?param="+s.userId})},getlist(e){this.queryParams.status="loading",this.$fc.loadMore({url:"/topic/userTopic/"+e+"/?",queryParams:this.queryParams}).then((e=>{if(this.queryParams=e.queryParams,"3"!=e.status){if("0"!=e.status){for(var s=e.list,t=[],i=0;i<s.length;i++){var r=s[i];t.push({userId:r.topic.userId,nickName:r.topic.nickName,avatar:r.topic.portrait,topicId:r.topic.topicId,text:JSON.parse(r.topic.content).content,topicType:r.topic.topicType,files:JSON.parse(r.topic.content).files,location:r.topic.location?JSON.parse(r.topic.location):{},time:r.topic.createTime,like:r.like,likeList:r.likeList,replyList:r.replyList})}"2"==e.status&&(this.content=t),"1"==e.status&&(this.content=this.content.concat(t))}}else this.list=[]}))},goFriendsCircleSendMsg(){h({url:"../friendsCircle/sendMsg"})},goFriendsCircleDetail(e){h({url:"../friendsCircle/detail?topicId="+e.topicId})}},onPullDownRefresh(){this.queryParams.refreshing=!0,this.getlist(this.userId)},onReachBottom(){this.getlist(this.userId)},onNavigationBarButtonTap(e){if(this.showMsglist&&0===e.index)h({url:"../friendsCircle/msglist"})}},[["render",function(s,t,i,c,d,u){const p=y(I("watermark"),_),h=y(I("friends-circle-top"),k),C=f,w=y(I("friends-circle-person-item"),x),P=y(I("uni-load-more"),v);return e(),r(C,{class:"friendsCircle"},{default:a((()=>[n(p),n(h,{cover:d.cover,userInfo:d.userInfox,onUserClick:u.userClick,showChangePoster:d.showChangePoster},null,8,["cover","userInfo","onUserClick","showChangePoster"]),n(C,{class:"friendsCircle-content-today"},{default:a((()=>[d.showMsglist?(e(),r(C,{key:0,class:"friends-circle-today"},{default:a((()=>[n(C,{class:"friends-circle-today-text"},{default:a((()=>[l("今天")])),_:1}),n(C,{class:"friends-circle-today-icon",onClick:u.goFriendsCircleSendMsg},{default:a((()=>[n(C,{class:"wxfont xiangji"})])),_:1},8,["onClick"])])),_:1})):o("",!0),n(w,{content:d.content,"onUpdate:content":t[0]||(t[0]=e=>d.content=e),onClickItem:u.goFriendsCircleDetail},null,8,["content","onClickItem"])])),_:1}),m(n(P,{status:d.queryParams.status},null,8,["status"]),[[g,d.content.length>9]])])),_:1})}],["__scopeId","data-v-04acfefe"]]);export{P as default};
|