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.
xxdj1/unpackage/dist/build/h5/static/js/user-pages-choose-technicia...

1 line
19 KiB

1 year ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-choose-technician"],{"1cfd":function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("99af");var n=a(i("3835")),s=a(i("5530")),c=a(i("c7eb")),o=a(i("1da1")),r=i("26cb"),l={components:{},data:function(){return{isLoad:!1,options:{},imgType:{1:"top",2:"hot",3:"new"},param:{page:1,ser_id:0,coach_name:""},list:{data:[]},loading:!0,showInd:-1,showType:"",lockTap:!1,serviceList:[],commentList:[]}},computed:(0,r.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo},location:function(t){return t.user.location}}),onLoad:function(t){var e=this;return(0,o.default)((0,c.default)().mark((function i(){return(0,c.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.options=t,i.next=3,e.initIndex();case 3:e.isLoad=!0;case 4:case"end":return i.stop()}}),i)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:(0,s.default)((0,s.default)({},(0,r.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,o.default)((0,c.default)().mark((function i(){var a;return(0,c.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=t.length>0&&void 0!==t[0]&&t[0],a||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:e.getList();case 6:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},toOpenLocation:function(){this.$util.checkAuth({type:"userLocation"})},toSearch:function(t){this.param.page=1,this.param.coach_name=t,this.getList()},toChooseLocation:function(t){var e=this;return(0,o.default)((0,c.default)().mark((function t(){var i,a,s,o,r,l,u,d,p,f,v,h,m,g;return(0,c.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$util.checkAuth({type:"userLocation"});case 2:return t.next=4,uni.chooseLocation();case 4:if(i=t.sent,a=(0,n.default)(i,2),s=a[1],o=s.address,r=void 0===o?"":o,l=s.longitude,u=s.latitude,d=s.province,p=void 0===d?"":d,f=s.city,v=void 0===f?"":f,h=s.district,m=void 0===h?"":h,l){t.next=19;break}return t.abrupt("return");case 19:g={lng:l,lat:u,address:r,province:p,city:v,district:m},e.updateUserItem({key:"location",val:g}),e.param.page=1,e.getList();case 23:case"end":return t.stop()}}),t)})))()},getList:function(){var t=this;return(0,o.default)((0,c.default)().mark((function e(){var i,a,n,s,o,r,l,u,d,p,f,v,h,m,g,w,x,_,b,C,y,k,$,L,I;return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.location,i.lat){e.next=22;break}if(!t.$jweixin.isWechat()){e.next=21;break}return t.$util.showLoading(),e.next=6,t.$jweixin.wxReady2();case 6:return e.next=8,t.$jweixin.getWxLocation();case 8:if(a=e.sent,n=a.latitude,s=void 0===n?0:n,o=a.longitude,r=void 0===o?0:o,i={lng:r,lat:s,address:"定位失败",province:"",city:"",district:""},!s||!r){e.next=21;break}return l="".concat(s,",").concat(r),e.next=18,t.$api.base.getMapInfo({location:l});case 18:u=e.sent,d=JSON.parse(u),p=d.status,f=d.result,0==p&&(v=f.address,h=f.address_component,m=h.province,g=h.city,w=h.district,i={lng:r,lat:s,address:v,province:m,city:g,district:w});case 21:t.updateUserItem({key:"location",val:i});case 22:return x=t.options.id,_=t.list,b=t.param,C=i,y=C.lng,k=void 0===y?0:y,$=C.lat,L=void 0===$?0:$,b=Object.assign({},b,{ser_id:x,lng:k,lat:L}),e.next=28,t.$api.service.serviceCoachList(b);case 28:I=e.sent,1==t.param.page||(I.data=_.data.concat(I.data)),t.list=I,t.loading=!1,t.$util.hideAll();case 32:case"end":return e.stop()}}),e)})))()},handerTabChange:function(t){this.activeIndex=t,this.showInd=-1,this.$util.showLoading(),this