highseas.js 4.4 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/highseas/highseas"],{"141b":function(t,e,n){"use strict";n.r(e);var o=n("846d"),i=n("f95e");for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("837d");var a=n("828b"),r=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=r.exports},"349c":function(t,e,n){},"4b15":function(t,e,n){"use strict";(function(t,o){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=i(n("453b")),a=n("2ecb"),r=i(n("a0bd")),s={mixins:[c.default],data:function(){return{boundingClientRect:{},list:[],activeCity:{cityName:"",cityCode:""},coordinates:""}},onShow:function(){this.boundingClientRect=t.getMenuButtonBoundingClientRect()},onLoad:function(){var t=this;o.$on("changeCity",(function(e){t.activeCity=e,t.$store.dispatch("app/changeActiveCity",t.activeCity),o.setStorageSync("vuex_state",t.$store.state),t.mescroll.resetUpScroll()})),o.getLocation({type:"wgs84",success:function(e){t.coordinates=e.longitude+","+e.latitude,t.$store.dispatch("app/changeCoordinates",t.coordinates),o.setStorageSync("vuex_state",t.$store.state),t.getLocation()},fail:function(){t.coordinates=t.$store.getters.coordinates,t.getLocation()}})},methods:{getLocation:function(){var t=this,e=this.coordinates.split(",");o.request({url:"http://api.tianditu.gov.cn/geocoder?postStr={'lon':"+e[0]+",'lat':"+e[1]+",'ver':1}&type=geocode&tk=72632adad893994a0450b55949c8a8fc",method:"GET",success:function(e){if(200===e.statusCode){var n=e.data;if("ok"==n.msg){if(!n.result||!n.result.addressComponent||!n.result.addressComponent.city)return t.activeCity=t.$store.getters.activeCity,void t.mescroll.resetUpScroll();var i=n.result.addressComponent.city.replace("市",""),c=r.default.filter((function(t){return t.cityName.replace("市","")==i}));t.activeCity=c[0],t.$store.dispatch("app/changeActiveCity",t.activeCity),o.setStorageSync("vuex_state",t.$store.state),t.mescroll.resetUpScroll()}else t.activeCity=t.$store.getters.activeCity,t.mescroll.resetUpScroll()}else t.activeCity=t.$store.getters.activeCity,t.mescroll.resetUpScroll()},fail:function(){t.activeCity=t.$store.getters.activeCity,t.mescroll.resetUpScroll()}})},geStatusBarHeight:function(){return o.getSystemInfoSync()["statusBarHeight"]},getNavBarHeight:function(){var t=o.getMenuButtonBoundingClientRect(),e=t.height+2*(t.top-o.getSystemInfoSync()["statusBarHeight"])+4;return e},getTopHeight:function(){return this.geStatusBarHeight()+this.getNavBarHeight()+30},upCallback:function(t){var e=this;if(!this.coordinates)return this.mescroll.endErr();(0,a.getOpenHouseListByPage)({currPage:t.num,pageSize:10,coordinates:this.coordinates,addressCode:this.activeCity.cityCode}).then((function(n){200===n.code?(e.mescroll.endBySize(n.data.dataList.length,n.data.totalCount),1==t.num&&(e.list=[]),e.list=e.list.concat(n.data.dataList)):e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}},components:{navbar:function(){n.e("components/common/navbar").then(function(){return resolve(n("4a99"))}.bind(null,n)).catch(n.oe)},houseItem:function(){n.e("components/house/houseItem").then(function(){return resolve(n("9e7b"))}.bind(null,n)).catch(n.oe)}}};e.default=s}).call(this,n("3223")["default"],n("df3c")["default"])},"837d":function(t,e,n){"use strict";var o=n("349c"),i=n.n(o);i.a},"846d":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return o}));var o={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"3d33"))},mescrollBody:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/mescroll-uni/components/mescroll-body/mescroll-body")]).then(n.bind(null,"6eb1"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.getTopHeight());t._isMounted||(t.e0=function(e){t.$navigateTo("/pages/city/city?activeCity="+JSON.stringify(t.activeCity))}),t.$mp.data=Object.assign({},{$root:{m0:n}})},c=[]},cea1:function(t,e,n){"use strict";(function(t,e){var o=n("47a9");n("7748");o(n("3240"));var i=o(n("141b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},f95e:function(t,e,n){"use strict";n.r(e);var o=n("4b15"),i=n.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);e["default"]=i.a}},[["cea1","common/runtime","common/vendor"]]]);