You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
12 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/map"],{"128a":function(t,e,n){},"63fc":function(t,e,n){"use strict";n.r(e);var i=n("bf75"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"704e":function(t,e,n){"use strict";var i=n("128a"),a=n.n(i);a.a},7402:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={wPicker:function(){return n.e("components/w-picker/w-picker").then(n.bind(null,"13f3"))}},a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.isLoad&&t.configInfo.plugAuth.map&&"list"==t.mapType?t.list.data&&t.list.data.length>0:null),i=t.isLoad&&t.configInfo.plugAuth.map&&"list"==t.mapType&&n&&t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0&&t.location.lng:null,a=t.isLoad&&t.configInfo.plugAuth.map&&"list"==t.mapType&&n?!t.loading&&t.list.data.length<=0&&1==t.list.current_page&&t.location.lng:null,r=t.isLoad?t.$t("action.attendantName"):null,o=t.isLoad?t.$t("action.attendantName"):null;t._isMounted||(t.e0=function(e){return e.stopPropagation(),t.$refs.search_item.open()},t.e1=function(e){return e.stopPropagation(),t.$refs.technician_info_item.close()}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a,m0:r,m1:o}})},r=[]},a59a:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7043");i(n("3240"));var a=i(n("b325"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},b325:function(t,e,n){"use strict";n.r(e);var i=n("7402"),a=n("63fc");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("704e");var o=n("828b"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},bf75:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("7eb4")),r=i(n("34cf")),o=i(n("7ca3")),c=i(n("ee10")),s=n("8f59"),u=i(n("cf61"));function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f={components:{tabbar:function(){n.e("components/tabbar").then(function(){return resolve(n("ea26"))}.bind(null,n)).catch(n.oe)},technicianListItem:function(){n.e("components/technician-list-item").then(function(){return resolve(n("a0e3"))}.bind(null,n)).catch(n.oe)},technicianListPopup:function(){n.e("components/technician-list-popup").then(function(){return resolve(n("ba2d"))}.bind(null,n)).catch(n.oe)},wPicker:function(){n.e("components/w-picker/w-picker").then(function(){return resolve(n("13f3"))}.bind(null,n)).catch(n.oe)}},data:function(){return{isLoad:!1,options:{},textType:{1:"可服务",2:"服务中",3:"可预约",4:"不可预约"},popupHeight:"",startYear:"",toDay:"",showDate:!1,timer:null,detail:{},loading:!0,lockTap:!1}},computed:(0,s.mapState)({pageActive:function(t){return t.map.pageActive},sexList:function(t){return t.map.sexList},yearList:function(t){return t.map.yearList},check:function(t){return t.map.check},param:function(t){return t.map.param},service_cate:function(t){return t.map.service_cate},mapList:function(t){return t.map.mapList},list:function(t){return t.map.list},mapType:function(t){return t.map.mapType},map:function(t){return t.map.map},covers:function(t){return t.map.covers},primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},autograph:function(t){return t.user.autograph},userInfo:function(t){return t.user.userInfo},location:function(t){return t.user.location},isGzhLogin:function(t){return t.user.isGzhLogin}}),onLoad:function(e){var n=this;return(0,c.default)(a.default.mark((function i(){return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n.$util.showLoading(),i.next=3,n.updateCommonOptions(e);case 3:return e=i.sent,n.options=e,t.onNetworkStatusChange((function(t){var e=t.isConnected;!e||n.pageActive||n.initIndex()})),i.next=8,n.initIndex();case 8:case"end":return i.stop()}}),i)})))()},onUnload:function(){this.timer&&clearTimeout(this.timer)},onShow:function(){return(0,c.default)(a.default.mark((function t(){return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.loading=!0,this.getList(this.param.page+1))},onShareAppMessage:function(t){var e=this.userInfo.id,n=void 0===e?0:e,i="/pages/map?pid=".concat(n);return this.$util.log(i),{title:"",imageUrl:"",path:i}},methods:p(p(p({},(0,s.mapActions)(["getConfigInfo","getUserInfo","updateCommonOptions","getMapIndex","getMapList","getMapCoachList"])),(0,s.mapMutations)(["updateMapItem","updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,c.default)(a.default.mark((function n(){var i,r,o,c,s,u,l,p,f,d,h;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.length>0&&void 0!==t[0]&&t[0],r=e.options.pid,o=void 0===r?0:r,i||!e.pageActive||o){n.next=8;break}return e.isLoad=!0,e.loading=!1,e.$util.setNavigationBarColor({bg:e.primaryColor}),e.$util.hideAll(),n.abrupt("return");case 8:if(e.isGzhLogin,c=e.userInfo.id,s=void 0===c?0:c,!o||s){n.next=13;break}return n.next=13,e.getUserInfo();case 13:if(e.configInfo.id&&!i&&(!e.configInfo.id||e.configInfo.plugAuth.hasOwnProperty("map"))){n.next=16;break}return n.next=16,e.getConfigInfo();case 16:if(e.$util.setNavigationBarColor({bg:e.primaryColor}),u=new Date(Math.ceil((new Date).getTime())),e.startYear=e.$util.formatTime(u,"YY"),e.toDay=e.$util.formatTime(u,"YY-M-D"),l=e.configInfo.plugAuth.map,p=void 0!==l&&l,p){n.next=26;break}return e.isLoad=!0,e.loading=!1,e.$util.hideAll(),n.abrupt("return");case 26:return f=e.location,d=f.lng,void 0===d?0:d,h=f.lat,void 0===h?0:h,n.next=29,e.getMapIndex();case 29:return n.next=31,e.getList(1);case 31:e.updateMapItem({key:"pageActive",val:!0}),e.isLoad=!0;case 33:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},handerTabChange:function(t){var e=this.service_cate[t].id,n=Object.assign({},this.param,{cate_id:e,page:1,activeIndex:t});this.updateMapItem({key:"param",val:n}),this.getList()},getList:function(t){var e=this;return(0,c.default)(a.default.mark((function n(){var i,r,o,c,s,u,l,p,f,d,h,m,g;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t&&(e.param.page=1,e.timer&&clearTimeout(e.timer)),i=e.mapType,r=e.location,o=r.lng,c=void 0===o?0:o,s=r.lat,u=void 0===s?0:s,l=Object.assign({},e.param,{lat:u,lng:c}),p=l.cate_id,f=void 0===p?0:p,d=e.service_cate.findIndex((function(t){return t.id==f})),d=-1==d?0:d,f=e.service_cate[d].id,l.cate_id=f,h=Object.assign({},e.param,{cate_id:f,activeIndex:d}),e.updateMapItem({key:"param",val:h}),m=e.yearList.filter((function(t){return t.id==l.year}))[0].year,l.work_time_start=m[0],l.work_time_end=m[1],l.service_time=l.service_time?e.$util.DateToUnix(l.service_time):"",-1==l.sex&&delete l.sex,"map"==e.mapType&&delete l.page,delete l.activeIndex,delete l.year,g="map"==i?"getMapList":"getMapCoachList",n.next=22,e[g](l);case 22:e.$util.hideAll(),e.loading=!1,"map"==e.mapType&&(e.timer=setTimeout((function(){e.getList(1)}),6e5));case 25:case"end":return n.stop()}}),n)})))()},toAppShare:function(){var t=this,e=this.userInfo.id,n=void 0===e?0:e,i=u.default.siteroot,a=i.split("/index.php")[0],r="".concat(a,"/h5/#/pages/service?pid=").concat(n);this.$jweixin.wxReady((function(){t.$jweixin.showOptionMenu(),t.$jweixin.shareAppMessage("首页","",r,""),t.$jweixin.shareTimelineMessage("首页",r,"")}))},initFixHeight:function(t){this.popupHeight=t},toChooseLocation:function(e){var n=this;return(0,c.default)(a.default.mark((function e(){var i,o,c,s,u,l,p,f,d,h,m,g,v,w,b,x,k,y;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n.$util.checkAuth({type:"userLocation"});case 2:return i=n.location,o=i.lat,void 0===o?"":o,c=i.lng,void 0===c?"":c,s={},e.next=7,t.chooseLocation(s);case 7:if(u=e.sent,l=(0,r.default)(u,2),p=l[1],f=p.address,d=void 0===f?"":f,h=p.longitude,m=p.latitude,g=p.province,v=void 0===g?"":g,w=p.city,b=void 0===w?"":w,x=p.district,k=void 0===x?"":x,h){e.next=22;break}return e.abrupt("return");case 22:return y={lng:h,lat:m,address:d,province:v,city:b,district:k},n.updateUserItem({key:"location",val:y}),e.next=26,n.getList(1);case 26:case"end":return e.stop()}}),e)})))()},toChangeItem:function(t,e){if(["sex","year"].includes(t)){var n=this["".concat(t,"List")][e].id,i="sex"==t?{sex:n}:{year:n},a=Object.assign({},this.check,i);this.updateMapItem({key:"check",val:a})}else this.updateMapItem({key:"mapType",val:t}),this.getList(1)},toClearServiceTime:function(){this.check.service_time=""},toShowDate:function(){this.showDate=!0},onConfirm:function(t){var e=this;return(0,c.default)(a.default.mark((function n(){var i,r,o;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.result,r=e.$util.formatTime((new Date).getTime(),"YY-M-D h:m"),!(e.$util.DateToUnix(i)<=e.$util.DateToUnix(r))){n.next=5;break}return e.$util.showToast({title:"只能选择未来时间哦"}),n.abrupt("return");case 5:o=Object.assign({},e.check,{service_time:i}),e.updateMapItem({key:"check",val:o});case 7:case"end":return n.stop()}}),n)})))()},toReset:function(){this.updateMapItem({key:"check",val:{sex:-1,year:1,coach_name:"",service_time:""}}),this.toConfirm()},toConfirm:function(){var t=Object.assign({},this.param,this.check);this.updateMapItem({key:"param",val:t}),this.getList(1),this.$refs.search_item.close()},toShowPopup:function(t,e){var n=this;return(0,c.default)(a.default.mark((function i(){return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:n.$refs.technician_list_popup.toShowPopup(n.list.data[t],e);case 1:case"end":return i.stop()}}),i)})))()},toCollect:function(t){var e=this;return(0,c.default)(a.default.mark((function n(){var i,r,o,c,s;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.list.data[t],r=i.id,o=i.is_collect,c=i.collect_num,s=o?"delCollect":"addCollect",n.next=4,e.$api.mine[s]({coach_id:r});case 4:e.$util.showToast({title:o?"取消成功":"收藏成功"}),e.list.data[t].is_collect=1==o?0:1,e.list.data[t].collect_num=1==o?c-1:c+1;case 7:case"end":return n.stop()}}),n)})))()},regionchange:function(t){var e=this;return(0,c.default)(a.default.mark((function t(){var n,i,r,o,c,s,u,l,p,f;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return");case 6:return e.lockTap=!0,n="".concat(void 0,",").concat(void 0),t.prev=8,t.next=11,e.$api.base.getMapInfo({location:n});case 11:i=t.sent,r=JSON.parse(i),o=r.status,c=r.result,0==o&&(s=c.address,u=c.address_component,l=u.province,p=u.city,f=u.district,e.updateUserItem({key:"location",val:{lng:void 0,lat:void 0,address:s,province:l,city:p,district:f}}),e.getList(),e.lockTap=!1),t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](8),e.lockTap=!1;case 19:case"end":return t.stop()}}),t,null,[[8,16]])})))()},getDetail:function(t){var e=this;return(0,c.default)(a.default.mark((function n(){var i,r,o,c,s;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=t.detail.markerId,r=e.mapList[i],o=r.id,c=r.distance,n.next=4,e.$api.service.coachInfo({id:o});case 4:s=n.sent,s.distance=c,e.detail=s,e.$refs.technician_info_item.open();case 8:case"end":return n.stop()}}),n)})))()},goInfo:function(){var t=this.detail.id;this.$refs.technician_info_item.close(),this.$util.goUrl({url:"/user/pages/technician-info?id=".concat(t)})}})};e.default=f}).call(this,n("df3c")["default"])}},[["a59a","common/runtime","common/vendor"]]]);