1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/friends/user"],{"2e76":function(t,e,i){},"5aca":function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return n}));var n={uniPopup:function(){return i.e("node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(i.bind(null,"8eb5"))},Popup:function(){return i.e("components/Popup/Popup").then(i.bind(null,"5643"))}},o=function(){var t=this,e=t.$createElement;t._self._c},s=[]},"68c7":function(t,e,i){"use strict";i.r(e);var n=i("5aca"),o=i("cdfe");for(var s in o)"default"!==s&&function(t){i.d(e,t,(function(){return o[t]}))}(s);i("69f6");var u,c=i("f0c5"),r=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"7cc5a910",null,!1,n["a"],u);e["default"]=r.exports},"69f6":function(t,e,i){"use strict";var n=i("2e76"),o=i.n(n);o.a},bed3b:function(t,e,i){"use strict";(function(t){i("39a3");n(i("66fd"));var e=n(i("68c7"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=i,t(e.default)}).call(this,i("543d")["createPage"])},c72f:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(i("dbb0"));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){Promise.all([i.e("common/vendor"),i.e("components/TabBar/TabBar")]).then(function(){return resolve(i("a31d"))}.bind(null,i)).catch(i.oe)},u=function(){i.e("components/Popup/Popup").then(function(){return resolve(i("5643"))}.bind(null,i)).catch(i.oe)},c=function(){i.e("components/Popup/PayPopup").then(function(){return resolve(i("db93"))}.bind(null,i)).catch(i.oe)},r=function(){i.e("components/Popup/VipPopup").then(function(){return resolve(i("82d5"))}.bind(null,i)).catch(i.oe)},a=new n.default({key:"E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII"}),p={components:{TabBar:s,Popup:u,PayPopup:c,VipPopup:r},data:function(){return{scrollHeight:0,topNavAlpha:0,assetsUrl:this.$util.assetsUrl,startTime:0,startPosition:0,endPosition:0,currentPic:null,currentIndex:0,pics:[],userInfo:null,cover:{url:"",cate:"video",isFullScreen:!1},labels:[],hopes:[],liveCitys:["1","2"],tabIndex:0,id:null,latitude:0,longitude:0,hobbysEnums:[],hopesEnums:[],likeNum:0,isLiked:!1,popup:{content1:"",content2:"",tip1:"",tip2:"",btntext:""},payPopupIndex:-1,vipPopupIndex:-1,scrollTop:0}},computed:{statusBarHeight:function(){return this.$store.state.statusBarHeight},topbarOffsetHeight:function(){return this.$store.state.topbarOffsetHeight},platForm:function(){return this.$store.state.platform},mineInfo:function(){return this.$store.state.userInfo||JSON.parse(t.getStorageSync("userInfo"))}},onLoad:function(t){this.getConfig(),this.id=t.id,this.getUserDetail(),this.likeInit(),this.getLikeData(),this.getMineDetail()},mounted:function(){},onPageScroll:function(t){this.topNavAlpha=t.scrollTop/250,this.scrollTop=t.scrollTop},onShareAppMessage:function(){return{title:"糖果公园",path:"/pages/login/login?share=".concat(this.userInfo.inviteCode)}},methods:{back:function(){t.navigateBack({delta:1})},moveStop:function(){return!1},closePopup:function(){this.$refs.popup.close()},closePayPopup:function(){this.payPopupIndex=-1,this.$refs.paypopup.close()},closeVipPopup:function(){this.vipPopupIndex=-1,this.$refs.vippopup.close()},likeInit:function(){var e=this,i=JSON.parse(t.getStorageSync("user"));this.$api.public.isLike({completeUser:i,opte:"Fav",rdtn:"Do",uurd:this.id}).then((function(t){"该用户已被收藏"===t.data.msg?e.isLiked=!0:e.$api.public.isLike({completeUser:i,opte:"Fav",rdtn:"Cancel",uurd:e.id}).then((function(t){}))}))},toService:function(){this.$refs.popup.close(),t.openCustomerServiceChat({extInfo:{url:"https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9"},corpId:"wwa8f2a0d8a6dc0950",fail:function(t){console.log(t),wx.showToast({title:"客服联系失败",icon:"none"})}})},likeAction:function(){var e=this,i=JSON.parse(t.getStorageSync("user"));this.$api.public.isLike({completeUser:i,opte:"Fav",rdtn:this.isLiked?"Cancel":"Do",uurd:this.id}).then((function(t){t.data.succ&&(e.isLiked=!e.isLiked,e.isLiked?e.likeNum++:e.likeNum--)}))},preview:function(){for(var e=[],i={},n=0;n<this.pics.length;n++)console.log(this.pics[n]),i={url:"",type:"",width:"",height:""},"Img"===this.pics[n].cate&&(i.type="image"),"Vdo"===this.pics[n].cate&&(i.type="video",i.width=686,i.height=this.pics[n].h/(this.pics[n].w/343)*2),i.url=this.pics[n].url,e.push(i);console.log(e),t.previewMedia({sources:e,current:this.currentIndex,showmenu:!0})},tabClick:function(t){this.tabIndex=t},touchStart:function(t){this.startTime=Date.now(),this.startPosition=t.changedTouches[0].clientY},touchEnd:function(t){var e=Date.now();if(!(e-this.startTime<100)&&Math.abs(this.endPosition-this.startPosition)>10){this.endPosition=t.changedTouches[0].clientY;var i=this.endPosition-this.startPosition>0?"toBottom":"toTop";this.cover.isFullScreen="toBottom"===i}},videoAction:function(){this.cover.isFullScreen&&(this.cover.isFullScreen=!1)},getUserDetail:function(){var e=this,i=getCurrentPages(),n=i[i.length-2],o=JSON.parse(t.getStorageSync("user"));if(this.userInfo=n.$vm.otherInfo,this.pics=this.userInfo.medias,"Male"===o.sex?this.$api.public.seeMaleDetail({completeUser:o,jsjf:this.id}).then((function(){})):"Famale"===o.sex&&this.$api.public.seeFamaleDetail({completeUser:o,pusd:this.id}).then((function(){})),this.userInfo.lastActiveTime=this.$moment(new Date).diff(this.userInfo.lastActive,"minutes"),this.currentPic=this.userInfo.medias[0],-1!==this.userInfo.bkg.indexOf(".mp4")?(this.cover.cate="video",this.cover.url=this.userInfo.bkg):(this.cover.cate="img",this.cover.url=this.userInfo.bkg),a.calculateDistance({mode:"straight",from:{latitude:this.$store.state.latitude,longitude:this.$store.state.longitude},to:[{latitude:this.userInfo.geo.lat,longitude:this.userInfo.geo.lon}],success:function(t){e.userInfo.distance=t.result.elements[0].distance>1e3?"".concat(Math.floor(t.result.elements[0].distance/100)/10,"km"):"".concat(t.result.elements[0].distance,"m")}}),this.userInfo.hobbies){var s=[];this.userInfo.hobbies.forEach((function(t,i){e.hobbysEnums.forEach((function(e,i){t!==e.key||s.includes(e.desc)||s.push(e.desc)}))})),this.userInfo.hobbysStr=s}if(this.userInfo.wanteds){var u=[];this.userInfo.wanteds.forEach((function(t,i){e.hopesEnums.forEach((function(e,i){t!==e.key||u.includes(e.desc)||u.push(e.desc)}))})),this.userInfo.hopesStr=u}},picItemClick:function(e){var i=this;this.currentIndex=e,this.currentPic=this.pics[e],this.currentPic.height=this.currentPic.h/(this.currentPic.w/343),this.$nextTick((function(){setTimeout((function(){t.pageScrollTo({scrollTop:i.scrollTop,duration:0})}),50)}))},getConfig:function(){var t=this;this.$api.public.config({tscsj:["Hobbys","Hopes"]}).then((function(e){t.hobbysEnums=e.data.hobbys,t.hopesEnums=e.data.hopes})).catch((function(t){console.log(t)}))},getLikeData:function(){var e=this,i=JSON.parse(t.getStorageSync("user"));this.$api.public.userData({completeUser:i,listType:"FavsForMe",page:{index:1,size:20,sortValues:[]},uponUserId:this.id}).then((function(t){e.likeNum=t.data}))},toTalk:function(){if(console.log(this.userInfo,this.mineInfo),"Male"!==this.mineInfo.sex||this.mineInfo.vip)return"Famale"!==this.mineInfo.sex||this.mineInfo.realMan?void t.navigateTo({url:"/pagesSub/chatting/chatting?conversationid=C2C".concat(this.userInfo.id)}):(this.popup={content1:"认证后才能开启私聊哦",content2:"给客服回复关键词「真人认证」",tip1:"",tip2:"",btntext:"联系客服去认证"},void this.$refs.popup.open());"ios"===this.platForm?(this.vipPopupIndex=0,this.$refs.vippopup.open()):(this.payPopupIndex=0,this.$refs.paypopup.open())},getMineDetail:function(){var e=this,i=JSON.parse(t.getStorageSync("user"));this.$api.public.mineDetail({getAlbum:!0,completeUser:i}).then((function(i){e.$store.commit("setUserInfo",i.data),t.setStorageSync("userInfo",JSON.stringify(i.data))}))}}};e.default=p}).call(this,i("543d")["default"])},cdfe:function(t,e,i){"use strict";i.r(e);var n=i("c72f"),o=i.n(n);for(var s in n)"default"!==s&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=o.a}},[["bed3b","common/runtime","common/vendor"]]]);
|