1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/guest"],{"0cbf":function(t,e,n){"use strict";n.r(e);var o=n("9f82"),a=n("1a1d");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("c23b");var s,r=n("f0c5"),l=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"8c079038",null,!1,o["a"],s);e["default"]=l.exports},1785:function(t,e,n){"use strict";(function(t){n("39a3");o(n("66fd"));var e=o(n("0cbf"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"1a1d":function(t,e,n){"use strict";n.r(e);var o=n("1b49"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},"1b49":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n("dbb0"));function a(t){return t&&t.__esModule?t:{default:t}}function i(t){return u(t)||l(t)||r(t)||s()}function s(){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 r(t,e){if(t){if("string"===typeof t)return c(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)?c(t,e):void 0}}function l(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function u(t){if(Array.isArray(t))return c(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var f=new o.default({key:"E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII"}),d=function(){n.e("components/Status/Status").then(function(){return resolve(n("177c"))}.bind(null,n)).catch(n.oe)},g={components:{Status:d},data:function(){return{assetsUrl:this.$util.assetsUrl,pageName:"",scrollHeight:0,topNavHeight:0,pageType:"",getOptions:{index:1,size:20,sortValues:[]},listData:[],scrollTotal:0,scrollRefreshing:!1,scrollTriggered:!0,showNoData:!1,user:null,otherInfo:null}},computed:{statusBarHeight:function(){return this.$store.state.statusBarHeight},topbarOffsetHeight:function(){return this.$store.state.topbarOffsetHeight},latitude:function(){return this.$store.state.latitude},longitude:function(){return this.$store.state.longitude}},onLoad:function(t){console.log(t),this.pageType=t.pagetype,this.pageName=t.name,this.computedScollviewHeight(),this.getGuestData()},methods:{back:function(){t.navigateBack({delta:1})},computedScollviewHeight:function(){var e=this,n=t.createSelectorQuery().in(this),o=0;n.select("#topnav").boundingClientRect((function(t){e.topNavHeight=t.height,o+=t.height})).exec((function(){var n=t.getSystemInfoSync();e.scrollHeight=n.windowHeight-o}))},scrollRefresh:function(){var t=this;this.scrollRefreshing||(this.scrollRefreshing=!0,setTimeout((function(){t.scrollTriggered=!1,t.scrollRefreshing=!1}),1e3),this.getOptions={index:1,size:20,sortValues:[]},this.getGuestData())},scrollPulling:function(t){},scrollRestore:function(){this.scrollTriggered=!0},scrollAbort:function(){},scrollToBottom:function(){this.listData.length>=this.scrollTotal||(this.getOptions.index++,this.getGuestData())},getGuestData:function(){var e=this,n=JSON.parse(t.getStorageSync("user"));this.$api.public.guestor({completeUser:n,listType:this.pageType,page:this.getOptions,prefer:{nick:null,onlineIn24Hour:!1},uponUserId:n.id}).then((function(t){t.data.users&&0===t.data.users.length&&(e.showNoData=!0),e.getOptions.index>1?e.listData=[].concat(i(e.listData),i(t.data.users)):e.listData=t.data.users,e.scrollTotal=t.data.page.recordCount;for(var n=[],o={latitude:0,longitude:0},a=0;a<e.listData.length;a++)e.listData[a].lastActiveTime=e.$moment(new Date).diff(e.listData[a].lastActive,"minutes"),o={latitude:0,longitude:0},o.latitude=e.listData[a].geo.lat,o.longitude=e.listData[a].geo.lon,n.push(o);console.log(n),f.calculateDistance({mode:"straight",from:{latitude:e.$store.state.latitude,longitude:e.$store.state.longitude},to:n,success:function(t){if("query ok"===t.message){for(var n=0;n<t.result.elements.length;n++)e.listData[n].distance=t.result.elements[n].distance>1e3?"".concat(Math.floor(t.result.elements[n].distance/100)/10,"km"):"".concat(t.result.elements[n].distance,"m");console.log(e.listData)}},fail:function(t){console.log(t)}})}))},toDetail:function(e){var n=this;t.showLoading({});var o=JSON.parse(t.getStorageSync("user"));this.$api.public.userDetail({getAlbum:!0,completeUser:o,uponUserId:e}).then((function(a){a.data.sex===o.sex?t.showToast({title:"同性用户不能查看主页",icon:"none"}):(n.otherInfo=a.data,t.hideLoading(),t.navigateTo({url:"/pages/friends/user?id=".concat(e)}))}))}}};e.default=g}).call(this,n("543d")["default"])},"9f82":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var o={Status:function(){return n.e("components/Status/Status").then(n.bind(null,"177c"))}},a=function(){var t=this,e=t.$createElement;t._self._c},i=[]},c23b:function(t,e,n){"use strict";var o=n("fb68"),a=n.n(o);a.a},fb68:function(t,e,n){}},[["1785","common/runtime","common/vendor"]]]);
|