(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/friends/friends"],{"188f":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={TabBar:function(){return Promise.all([n.e("common/vendor"),n.e("components/TabBar/TabBar")]).then(n.bind(null,"a31d"))},uniPopup:function(){return n.e("node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(n.bind(null,"8eb5"))},Popup:function(){return n.e("components/Popup/Popup").then(n.bind(null,"5643"))},Status:function(){return n.e("components/Status/Status").then(n.bind(null,"177c"))}},o=function(){var t=this,e=t.$createElement;t._self._c},s=[]},3603:function(t,e,n){"use strict";(function(t){n("39a3");i(n("66fd"));var e=i(n("fe92"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},b5fb:function(t,e,n){"use strict";var i=n("bee7"),o=n.n(i);o.a},bee7:function(t,e,n){},dd5a:function(t,e,n){"use strict";n.r(e);var i=n("ed69"),o=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},ed69:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("dbb0")),o=a(n("9c8d")),s=a(n("bed3"));function a(t){return t&&t.__esModule?t:{default:t}}function r(t){return l(t)||d(t)||u(t)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(t){if("string"===typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function d(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function l(t){if(Array.isArray(t))return m(t)}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=this.recommendTotal||(this.recommendListOptions.page.index++,this.getRecommendList())},nearRefresh:function(){var t=this;this.nearRefreshing||(this.nearRefreshing=!0,setTimeout((function(){t.nearTriggered=!1,t.nearRefreshing=!1}),1e3),this.nearListOptions.page={index:1,size:20,sortValues:[]},this.getNearTopsMData(),this.getNearTopsHData(),this.getNearList())},nearPulling:function(t){},nearRestore:function(){this.nearTriggered=!0},nearAbort:function(){},nearToBottom:function(){this.nearList.length>=this.nearTotal||(this.nearListOptions.page.index++,this.getNearList())},computedScollviewHeight:function(){var e=this,n=t.createSelectorQuery().in(this),i=this.$store.state.tabbarHeight/2;n.select("#topnav").boundingClientRect((function(t){i+=t.height})).exec((function(){var n=t.getSystemInfoSync();e.scrollHeight=n.windowHeight-i}))},computedLocation:function(){var e=this;t.getFuzzyLocation({type:"gcj02",success:function(n){e.latitude=n.latitude,e.longitude=n.longitude,e.$store.commit("setLatitude",e.latitude),e.$store.commit("setLongitude",e.longitude),f.reverseGeocoder({location:{latitude:n.latitude,longitude:n.longitude},success:function(n){e.locationCity=n.result.ad_info.city,e.locationCityCode=n.result.ad_info.city_code.split(n.result.ad_info.nation_code)[1],e.getTempRecommendList(),t.getStorageSync("token")?e.$api.public.heartBeat({city:e.locationCity,cityCode:e.locationCityCode,geo:{lat:e.latitude,lon:e.longitude}}).then((function(){e.getNearTopsMData(),e.getNearTopsHData(),e.getNearList(),e.getRecommendList(),e.showGetLocation=!1})).catch((function(t){e.getTempRecommendList()})):e.getTempRecommendList()}})},fail:function(n){e.showGetLocation=!0,t.showModal({content:"检测到您没打开地址信息权限,是否去设置打开?",confirmText:"确认",cancelText:"取消",success:function(n){n.confirm&&t.openSetting({success:function(t){t.authSetting&&e.computedLocation()}})}})}})},toLogin:function(){t.reLaunch({url:"/pages/login/login"})},navClick:function(e){if(!t.getStorageSync("token"))return this.popup={content1:"您还未登录",content2:"该功能登录后才能使用",tip1:"",tip2:"",btntext:"去登录"},void this.$refs.popup.open();this.rankingOptions.city=0===e?"":this.locationCity,this.rankingOptions.cityCode=0===e?"":this.locationCityCode,this.navIndex=e},toSearch:function(){if(!t.getStorageSync("token"))return this.popup={content1:"您还未登录",content2:"该功能登录后才能使用",tip1:"",tip2:"",btntext:"去登录"},void this.$refs.popup.open();t.navigateTo({url:"/pages/search/search"})},topsNavClick:function(t){this.topsIndex=t},outerSwiperChange:function(t){this.navIndex=t.detail.current},swiperChange:function(t){this.topsIndex=t.detail.current},getRecommendTopsMData:function(){var t=this;this.rankingOptions.type="M",this.$api.public.ranking(this.rankingOptions).then((function(e){t.recommendTopsM=e.data.list}))},getRecommendTopsHData:function(){var t=this;this.rankingOptions.type="H",this.$api.public.ranking(this.rankingOptions).then((function(e){t.recommendTopsH=e.data.list}))},getNearTopsMData:function(){var t=this;this.rankingOptions.type="M",this.rankingOptions.city=this.locationCity,this.rankingOptions.cityCode=this.locationCityCode,this.$api.public.ranking(this.rankingOptions).then((function(e){t.nearTopsM=e.data.list}))},getNearTopsHData:function(){var t=this;this.rankingOptions.type="H",this.rankingOptions.city=this.locationCity,this.rankingOptions.cityCode=this.locationCityCode,this.$api.public.ranking(this.rankingOptions).then((function(e){t.nearTopsH=e.data.list}))},getTempRecommendList:function(){var e=this;this.recommendListOptions.type="FamaleReco",this.$api.public.friendsNoAuth(this.recommendListOptions).then((function(n){if("Succ"===n.status){e.recommendTotal=n.data.page.recordCount,e.recommendListOptions.page.sortValues=n.data.sortValues;for(var i=[],o={latitude:0,longitude:0},s=0;s1e3?"".concat(Math.floor(i.result.elements[o].distance/100)/10,"km"):"".concat(i.result.elements[o].distance,"m");e.recommendListOptions.page.index>1?e.recommendList=[].concat(r(e.recommendList),r(n.data.users)):e.recommendList=n.data.users,t.hideLoading(),e.$forceUpdate()}}}),e.recommendList=n.data.users}}))},getRecommendList:function(){var e=this,n=JSON.parse(t.getStorageSync("user"));this.recommendListOptions.type="male"===n.sex?"MaleReco":"FamaleReco",this.recommendListOptions.queryPre.city=this.locationCity,this.recommendListOptions.queryPre.cityCode=this.locationCityCode,this.recommendListOptions.queryPre.geo.lat=this.latitude,this.recommendListOptions.queryPre.geo.lon=this.longitude,this.$api.public.friends(this.recommendListOptions).then((function(t){if("Succ"===t.status){e.recommendTotal=t.data.page.recordCount,e.recommendListOptions.page.sortValues=t.data.sortValues;for(var n=[],i={latitude:0,longitude:0},o=0;o1e3?"".concat(Math.floor(n.result.elements[i].distance/100)/10,"km"):"".concat(n.result.elements[i].distance,"m");e.recommendListOptions.page.index>1?e.recommendList=[].concat(r(e.recommendList),r(t.data.users)):e.recommendList=t.data.users,e.$forceUpdate()}}})}}))},getNearList:function(){var e=this,n=JSON.parse(t.getStorageSync("user"));this.nearListOptions.type="male"===n.sex?"MaleNearby":"FamaleNearby",this.nearListOptions.queryPre.city=this.locationCity,this.nearListOptions.queryPre.cityCode=this.locationCityCode,this.nearListOptions.queryPre.geo.lat=this.latitude,this.nearListOptions.queryPre.geo.lon=this.longitude,this.$api.public.friends(this.nearListOptions).then((function(t){if("Succ"===t.status&&t.data.users.length>0){e.nearTotal=t.data.page.recordCount,e.nearListOptions.page.sortValues=t.data.sortValues,e.showNoData=0===t.data.users.length;for(var n=[],i={latitude:0,longitude:0},o=0;o1e3?"".concat(Math.floor(n.result.elements[i].distance/100)/10,"km"):"".concat(n.result.elements[i].distance,"m");e.nearListOptions.page.index>1?e.nearList=[].concat(r(e.nearList),r(t.data.users)):e.nearList=t.data.users,e.$forceUpdate()}}})}else e.showNoData=0===e.nearList.length}))},toDetail:function(e){var n=this;if(!t.getStorageSync("token"))return this.popup={content1:"您还未登录",content2:"该功能登录后才能使用",tip1:"",tip2:"",btntext:"去登录"},void this.$refs.popup.open();t.showLoading({});var i=JSON.parse(t.getStorageSync("user"));this.$api.public.userDetail({getAlbum:!0,completeUser:i,uponUserId:e}).then((function(o){o.data.frozen?t.showToast({title:"该用户已被冻结",icon:"none"}):o.data.sex===i.sex?t.showToast({title:"同性用户不能查看主页",icon:"none"}):(n.otherInfo=o.data,t.hideLoading(),t.navigateTo({url:"/pages/friends/user?id=".concat(e)}))}))}}};e.default=y}).call(this,n("543d")["default"])},fe92:function(t,e,n){"use strict";n.r(e);var i=n("188f"),o=n("dd5a");for(var s in o)"default"!==s&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n("b5fb");var a,r=n("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"86b3b4ec",null,!1,i["a"],a);e["default"]=c.exports}},[["3603","common/runtime","common/vendor"]]]);