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
9.8 KiB
1 lines
9.8 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/technician"],{"0715":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.cityList&&t.cityList.length>0),i=n&&-1!==t.cityIndex?t.cityList[t.cityIndex].title.length:null,a=n&&-1!==t.cityIndex&&i>3?t.cityList[t.cityIndex].title.substring(0,3):null,c=t.$t("action.attendantName"),r=t.pageActive&&t.list.data&&t.list.data.length>0,o=t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0&&t.location.lng:null,u=!t.loading&&t.list.data.length<=0&&1==t.list.current_page&&t.location.lng;t._isMounted||(t.e0=function(e){return e.stopPropagation(),t.$refs.choose_city_item.close()}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a,m0:c,g3:r,g4:o,g5:u}})},a=[]},"0e7f":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7043");i(n("3240"));var a=i(n("d687"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"27f6":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")),c=i(n("34cf")),r=i(n("7ca3")),o=i(n("ee10")),u=n("8f59"),s=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 d(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,r.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)}},data:function(){return{isLoad:!1,options:{},loading:!0,lockTap:!1}},computed:(0,u.mapState)({pageActive:function(t){return t.technician.pageActive},haveOperItem:function(t){return t.technician.haveOperItem},cityId:function(t){return t.technician.cityId},cityIndex:function(t){return t.technician.cityIndex},cityList:function(t){return t.technician.cityList},activeIndex:function(t){return t.technician.activeIndex},tabList:function(t){return t.technician.tabList},param:function(t){return t.technician.param},list:function(t){return t.technician.list},primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},loginType:function(t){return t.user.loginType},userInfo:function(t){return t.user.userInfo},location:function(t){return t.user.location},isGzhLogin:function(t){return t.user.isGzhLogin},haveShieldOper:function(t){return t.user.haveShieldOper}}),onLoad:function(t){var e=this;return(0,o.default)(a.default.mark((function n(){var i,c,r,o,u,s,l,d,f,p,h,g;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.options=t,i=t.pid,c=void 0===i?0:i,r=t.city_id,o=void 0===r?0:r,u=t.coach_id,s=void 0===u?0:u,l=t.coach_name,d=void 0===l?"":l,f=e.$util.deepCopy(e.param),f.coach_id=s,f.coach_name=d,e.updateTechnicianItem({key:"param",val:f}),s&&e.updateTechnicianItem({key:"cityId",val:o}),e.$util.showLoading(),p=e.list.data,h=void 0===p?[]:p,g=0==h.length||h[0].city_id!=e.cityId,!e.pageActive||s&&c||g){n.next=15;break}return e.isLoad=!0,e.loading=!1,e.$util.hideAll(),n.abrupt("return");case 15:return n.next=17,e.initIndex();case 17:case"end":return n.stop()}}),n)})))()},onShow:function(){var t=this;return(0,o.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:(2==t.haveShieldOper||t.haveOperItem)&&(t.initIndex(),t.updateUserItem({key:"haveShieldOper",val:0}),t.updateTechnicianItem({key:"haveOperItem",val:!1}));case 1:case"end":return e.stop()}}),e)})))()},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/technician?pid=".concat(n);return this.$util.log(i),{title:"",imageUrl:"",path:i}},methods:d(d(d({},(0,u.mapActions)(["getConfigInfo","getUserInfo","getCityList","getServiceCoachList"])),(0,u.mapMutations)(["updateUserItem","updateTechnicianItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,o.default)(a.default.mark((function n(){var i,c,r,o,u;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],c=e.options.pid,r=void 0===c?0:c,e.isGzhLogin,o=e.userInfo.id,u=void 0===o?0:o,!r||u){n.next=7;break}return n.next=7,e.getUserInfo();case 7:if(e.configInfo.id&&!i){n.next=10;break}return n.next=10,e.getConfigInfo();case 10:return n.next=12,e.getList(1,!0);case 12:e.updateTechnicianItem({key:"pageActive",val:!0});case 13:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},toAppShare:function(){var t=this,e=this.userInfo.id,n=void 0===e?0:e,i=this.$t("action.attendantName"),a=s.default.siteroot,c=a.split("/index.php")[0],r="".concat(c,"/h5/#/pages/technician?pid=").concat(n);this.$jweixin.wxReady((function(){t.$jweixin.showOptionMenu(),t.$jweixin.shareAppMessage(i,"",r,""),t.$jweixin.shareTimelineMessage(i,r,"")}))},pickerChange:function(t,e){var n=t.target.value;this.updateTechnicianItem({key:"cityIndex",val:n}),this.updateTechnicianItem({key:"cityId",val:this.cityList[n].id}),this.getList(1)},toOpenLocation:function(){this.$util.checkAuth({type:"userLocation"})},toSearch:function(t){var e=this.$util.deepCopy(this.param);e.coach_id="",e.coach_name=t,this.updateTechnicianItem({key:"param",val:e}),this.getList(1)},toChooseLocation:function(e){var n=this;return(0,o.default)(a.default.mark((function e(){var i,r,o,u,s,l,d,f,p,h,g,v,m,y,I,b,x,w;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,r=i.lat,void 0===r?"":r,o=i.lng,void 0===o?"":o,u={},e.next=7,t.chooseLocation(u);case 7:if(s=e.sent,l=(0,c.default)(s,2),d=l[1],f=d.address,p=void 0===f?"":f,h=d.longitude,g=d.latitude,v=d.province,m=void 0===v?"":v,y=d.city,I=void 0===y?"":y,b=d.district,x=void 0===b?"":b,h){e.next=22;break}return e.abrupt("return");case 22:return w={lng:h,lat:g,address:p,province:m,city:I,district:x},n.updateUserItem({key:"location",val:w}),e.next=26,n.getList(1,!0,1);case 26:case"end":return e.stop()}}),e)})))()},getList:function(){var t=arguments,e=this;return(0,o.default)(a.default.mark((function n(){var i,c,r,o,u,s,l,d,f,p,h,g,v,m,y,I,b,x,w;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]:0,c=t.length>1&&void 0!==t[1]&&t[1],r=t.length>2&&void 0!==t[2]?t[2]:0,i&&(o=e.$util.deepCopy(e.param),o.page=i,e.updateTechnicianItem({key:"param",val:o})),u=e.location,u.lat&&(!u.lat||"定位失败"!=u.address)){n.next=10;break}return n.next=8,e.$util.getBmapLocation();case 8:u=n.sent,e.updateUserItem({key:"location",val:u});case 10:if(s=u,l=s.lng,d=void 0===l?0:l,f=s.lat,p=void 0===f?0:f,!c){n.next=14;break}return n.next=14,e.getCityList({lng:d,lat:p,change:r});case 14:if(e.list,h=e.tabList,g=e.activeIndex,v=e.cityList,m=e.cityIndex,y=e.cityId,I=e.$util.deepCopy(e.param),b=v.findIndex((function(t){return t.id==y})),-1!=b){n.next=23;break}return e.$refs.choose_city_item.open(),e.loading=!1,e.$util.hideAll(),e.updateTechnicianItem({key:"list",val:{data:[],last_page:1,current_page:1}}),n.abrupt("return");case 23:return y=-1==b?0:y,m=-1==b?0:b,e.updateTechnicianItem({key:"cityIndex",val:m}),e.updateTechnicianItem({key:"cityId",val:y}),I=Object.assign({},I,{lng:d,lat:p,city_id:y}),x=e.configInfo.coach_format,w=void 0===x?1:x,1==w&&(I.type=h[g].id),n.next=32,e.getServiceCoachList(I);case 32:e.loading=!1,e.$util.hideAll();case 34:case"end":return n.stop()}}),n)})))()},handerTabChange:function(e){this.updateTechnicianItem({key:"activeIndex",val:e}),this.$util.showLoading(),t.pageScrollTo({scrollTop:0}),this.getList(1)},toShowPopup:function(t,e){var n=this;return(0,o.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,o.default)(a.default.mark((function n(){var i,c,r,o,u;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.list.data[t],c=i.id,r=i.is_collect,o=i.collect_num,u=r?"delCollect":"addCollect",n.next=4,e.$api.mine[u]({coach_id:c});case 4:e.$util.showToast({title:r?"取消成功":"收藏成功"}),e.list.data[t].is_collect=1==r?0:1,e.list.data[t].collect_num=1==r?o-1:o+1;case 7:case"end":return n.stop()}}),n)})))()}})};e.default=f}).call(this,n("df3c")["default"])},d687:function(t,e,n){"use strict";n.r(e);var i=n("0715"),a=n("da68");for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);var r=n("828b"),o=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},da68:function(t,e,n){"use strict";n.r(e);var i=n("27f6"),a=n.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=a.a}},[["0e7f","common/runtime","common/vendor"]]]); |