王总上门按摩后台代码
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.
 
 
 
 
 
shangmenanmo/public/h6/static/js/pages-technician.d72e8442.js

1 lines
18 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-technician"],{"002b":function(t,e,n){"use strict";n.r(e);var i=n("fb12"),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},"3c50":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("c223"),n("bd06");var a=i(n("5de6")),c=i(n("9b1b")),o=i(n("2634")),r=i(n("2fdc")),s=n("8f59"),u=i(n("cf61")),l=i(n("ea26")),d=i(n("a0e3")),f=i(n("ba2d")),p={components:{tabbar:l.default,technicianListItem:d.default,technicianListPopup:f.default},data:function(){return{isLoad:!1,options:{},loading:!0,lockTap:!1}},computed:(0,s.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,r.default)((0,o.default)().mark((function n(){var i,a,c,r,s,u,l,d,f,p,h,v;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.options=t,i=t.pid,a=void 0===i?0:i,c=t.city_id,r=void 0===c?0:c,s=t.coach_id,u=void 0===s?0:s,l=t.coach_name,d=void 0===l?"":l,f=e.$util.deepCopy(e.param),f.coach_id=u,f.coach_name=d,e.updateTechnicianItem({key:"param",val:f}),u&&e.updateTechnicianItem({key:"cityId",val:r}),uni.setNavigationBarTitle({title:e.$t("action.attendantName")}),p=e.list.data,h=void 0===p?[]:p,v=0==h.length||h[0].city_id!=e.cityId,!e.pageActive||u&&a||v){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,r.default)((0,o.default)().mark((function e(){return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.$jweixin.isWechat()){e.next=4;break}return e.next=3,t.$jweixin.initJssdk();case 3:t.toAppShare();case 4:(2==t.haveShieldOper||t.haveOperItem)&&(t.initIndex(),t.updateUserItem({key:"haveShieldOper",val:0}),t.updateTechnicianItem({key:"haveOperItem",val:!1}));case 5:case"end":return e.stop()}}),e)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.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:(0,c.default)((0,c.default)((0,c.default)({},(0,s.mapActions)(["getConfigInfo","getUserInfo","getCityList","getServiceCoachList"])),(0,s.mapMutations)(["updateUserItem","updateTechnicianItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)((0,o.default)().mark((function n(){var i,a,c,r,s,u;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.length>0&&void 0!==t[0]&&t[0],i||!e.$jweixin.isWechat()){n.next=5;break}return n.next=4,e.$jweixin.initJssdk();case 4:e.toAppShare();case 5:if(a=e.options.pid,c=void 0===a?0:a,r=e.isGzhLogin,s=e.userInfo.id,u=void 0===s?0:s,c&&!u&&(r?setTimeout((function(){e.getUserInfo()}),1e3):e.getUserInfo()),e.configInfo.id&&!i){n.next=12;break}return n.next=12,e.getConfigInfo();case 12:return n.next=14,e.getList(1,!0);case 14:e.updateTechnicianItem({key:"pageActive",val:!0});case 15: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=u.default.siteroot,c=a.split("/index.php")[0],o="".concat(c,"/h5/#/pages/technician?pid=").concat(n);this.$jweixin.wxReady((function(){t.$jweixin.showOptionMenu(),t.$jweixin.shareAppMessage(i,"",o,""),t.$jweixin.shareTimelineMessage(i,o,"")}))},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(t){var e=this;return(0,r.default)((0,o.default)().mark((function t(){var n,i,c,r,s,u,l,d,f,p,h,v,g,m,x,y,b,w,I,_,C,k,$;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$util.checkAuth({type:"userLocation"});case 2:if(n=e.location,i=n.lat,c=void 0===i?"":i,r=n.lng,s=void 0===r?"":r,u={},c||s){t.next=16;break}if(!e.$jweixin.isWechat()){t.next=16;break}return e.$util.showLoading(),t.next=9,e.$jweixin.wxReady2();case 9:return t.next=11,e.$jweixin.getWxLocation();case 11:l=t.sent,d=l.latitude,f=l.longitude,c=d,s=f;case 16:return u={latitude:c,longitude:s},t.next=19,uni.chooseLocation(u);case 19:if(p=t.sent,h=(0,a.default)(p,2),v=h[1],g=v.address,m=void 0===g?"":g,x=v.longitude,y=v.latitude,b=v.province,w=void 0===b?"":b,I=v.city,_=void 0===I?"":I,C=v.district,k=void 0===C?"":C,x){t.next=34;break}return t.abrupt("return");case 34:return $={lng:x,lat:y,address:m,province:w,city:_,district:k},e.updateUserItem({key:"location",val:$}),t.next=38,e.getList(1,!0,1);case 38:case"end":return t.stop()}}),t)})))()},getList:function(){var t=arguments,e=this;return(0,r.default)((0,o.default)().mark((function n(){var i,a,c,r,s,u,l,d,f,p,h,v,g,m,x,y,b,w,I,_,C,k,$,L,T,S,O,j,A,P,M,E,B,R,U,z,H;return(0,o.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,a=t.length>1&&void 0!==t[1]&&t[1],c=t.length>2&&void 0!==t[2]?t[2]:0,i&&(r=e.$util.deepCopy(e.param),r.page=i,e.updateTechnicianItem({key:"param",val:r})),s=e.location,s.lat&&(!s.lat||"定位失败"!=s.address)){n.next=28;break}if(!e.$jweixin.isWechat()){n.next=27;break}return e.$util.showLoading(),n.next=10,e.$jweixin.wxReady2();case 10:if(u=s,l=u.lat,d=void 0===l?"":l,f=u.lng,p=void 0===f?"":f,d||p){n.next=20;break}return n.next=14,e.$jweixin.getWxLocation();case 14:h=n.sent,v=h.latitude,g=h.longitude,d=v,p=g,s={lng:p,lat:d,address:"定位失败",province:"",city:"",district:""};case 20:if(!d||!p){n.next=27;break}return m="".concat(d,",").concat(p),n.next=24,e.$api.base.getMapInfo({location:m});case 24:x=n.sent,y=JSON.parse(x),b=y.status,w=y.result,0==b&&(I=w.address,_=w.address_component,C=_.province,k=_.city,$=_.district,s={lng:p,lat:d,address:I,province:C,city:k,district:$});case 27:e.updateUserItem({key:"location",val:s});case 28:if(L=s,T=L.lng,S=void 0===T?0:T,O=L.lat,j=void 0===O?0:O,!a){n.next=32;break}return n.next=32,e.getCityList({lng:S,lat:j,change:c});case 32:if(e.list,A=e.tabList,P=e.activeIndex,M=e.cityList,E=e.cityIndex,B=e.cityId,R=e.$util.deepCopy(e.param),U=M.findIndex((function(t){return t.id==B})),-1!=U){n.next=41;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 41:return B=-1==U?0:B,E=-1==U?0:U,e.updateTechnicianItem({key:"cityIndex",val:E}),e.updateTechnicianItem({key:"cityId",val:B}),R=Object.assign({},R,{lng:S,lat:j,city_id:B}),z=e.configInfo.coach_format,H=void 0===z?1:z,1==H&&(R.type=A[P].id),n.next=50,e.getServiceCoachList(R);case 50:e.loading=!1,e.$util.hideAll();case 52:case"end":return n.stop()}}),n)})))()},handerTabChange:function(t){this.updateTechnicianItem({key:"activeIndex",val:t}),this.$util.showLoading(),uni.pageScrollTo({scrollTop:0}),this.getList(1)},toShowPopup:function(t,e){var n=this;return(0,r.default)((0,o.default)().mark((function i(){return(0,o.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,r.default)((0,o.default)().mark((function n(){var i,a,c,r,s;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e.list.data[t],a=i.id,c=i.is_collect,r=i.collect_num,s=c?"delCollect":"addCollect",n.next=4,e.$api.mine[s]({coach_id:a});case 4:e.$util.showToast({title:c?"取消成功":"收藏成功"}),e.list.data[t].is_collect=1==c?0:1,e.list.data[t].collect_num=1==c?r-1:r+1;case 7:case"end":return n.stop()}}),n)})))()}})};e.default=p},"7d54":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||e;return n("v-uni-view",{staticClass:"custom-tabbar fix flex-center fill-base b-1px-t"},t._l(t.configInfo.tabBar,(function(e,i){return n("v-uni-view",{key:i,staticClass:"flex-center flex-column mt-sm",style:{width:100/t.configInfo.tabBar.length+"%",color:t.cur==e.id?t.primaryColor:"#666"},on:{click:function(n){n.stopPropagation(),arguments[0]=n=t.$handleEvent(n),t.changeTab(e)}}},[n("i",{staticClass:"iconfont",class:t.cur==e.id?e.selected_img:e.default_img}),n("v-uni-image",{staticStyle:{width:"45rpx",height:"45rpx"},attrs:{src:t.cur==e.id?e.selected_img:e.default_img}}),n("v-uni-view",{staticClass:"text"},[t._v(t._s(e.name))])],1)})),1)},a=[]},"9ff0":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.custom-tabbar[data-v-5f3efd3c]{height:%?98?%;bottom:0;height:calc(%?98?% + env(safe-area-inset-bottom) / 2);padding-bottom:calc(env(safe-area-inset-bottom) / 2)}.custom-tabbar .iconfont[data-v-5f3efd3c]{font-size:%?40?%}.custom-tabbar .text[data-v-5f3efd3c]{font-size:%?22?%;margin-top:%?5?%;height:%?32?%}',""]),t.exports=e},c891:function(t,e,n){var i=n("9ff0");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("4bc89a6a",i,!0,{sourceMap:!1,shadowMode:!1})},cd75:function(t,e,n){"use strict";var i=n("c891"),a=n.n(i);a.a},d687:function(t,e,n){"use strict";n.r(e);var i=n("dac0"),a=n("da68");for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"ac490202",null,!1,i["a"],void 0);e["default"]=r.exports},da68:function(t,e,n){"use strict";n.r(e);var i=n("3c50"),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},dac0: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||e;return n("v-uni-view",{staticClass:"pages-technician"},[n("fixed",{attrs:{initHeight:t.configInfo.coach_format}},[n("uni-nav-bar",{attrs:{fixed:!1,shadow:!1,statusBar:!0,onlyLeft:!0,color:"#fff",backgroundColor:t.primaryColor}},[n("v-uni-view",{staticClass:"map-info flex-y-center",attrs:{slot:"left"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toChooseLocation.apply(void 0,arguments)}},slot:"left"},[n("v-uni-view",{staticClass:"flex-y-center c-base"},[n("i",{staticClass:"iconfont iconjuli mr-sm"}),n("v-uni-view",{staticClass:"map-text max-400 ellipsis"},[t._v(t._s(t.location&&t.location.address?t.location.address:t.isLoad?"定位失败":"定位中..."))]),n("i",{staticClass:"iconfont icon-down"})],1)],1)],1),n("v-uni-view",{staticClass:"fix-info fill-body rel",style:{height:2==t.configInfo.coach_format?"124rpx":""}},[n("v-uni-view",{staticClass:"space-top abs",style:{background:t.primaryColor}}),n("v-uni-view",{staticClass:"search-info fill-base pt-lg pl-lg pr-lg abs",class:[{"pb-md":2!=t.configInfo.coach_format}]},[n("v-uni-view",{staticClass:"flex-center",class:[{"pb-md":2!=t.configInfo.coach_format},{"pb-lg":2==t.configInfo.coach_format}]},[n("v-uni-view",{staticClass:"city-info"},[n("v-uni-picker",{attrs:{value:t.cityIndex,range:t.cityList,"range-key":"title"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.pickerChange(e)}}},[n("v-uni-view",{staticClass:"city-info flex-y-center"},[n("v-uni-view",[t.cityList&&t.cityList.length>0?[t._v(t._s(-1===t.cityIndex?"未知":t.cityList[t.cityIndex].title.length>3?t.cityList[t.cityIndex].title.substring(0,3)+"...":t.cityList[t.cityIndex].title))]:[t._v("请选择")]],2),n("i",{staticClass:"iconfont iconshaixuanxia-1 ml-sm"})],1)],1)],1),n("v-uni-view",{staticClass:"flex-1"},[n("search",{attrs:{type:"input",keyword:t.param.coach_name,padding:0,radius:30,backgroundColor:"#F0F0F0",placeholder:"请输入"+t.$t("action.attendantName")+"姓名"},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.toSearch.apply(void 0,arguments)}}})],1)],1),2!=t.configInfo.coach_format?[n("tab",{attrs:{list:t.tabList,activeIndex:1*t.activeIndex,activeColor:t.primaryColor,width:"25%",height:"90rpx",fontSize:"28rpx"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.handerTabChange.apply(void 0,arguments)}}})]:t._e()],2)],1)],1),t.pageActive&&t.list.data&&t.list.data.length>0?t._l(t.list.data,(function(e,i){return n("v-uni-view",{key:i,staticClass:"mt-md ml-md mr-md"},[n("technician-list-item",{attrs:{info:e},on:{comment:function(e){arguments[0]=e=t.$handleEvent(e),t.toShowPopup(i,"message")},collect:function(e){arguments[0]=e=t.$handleEvent(e),t.toCollect(i)},order:function(e){arguments[0]=e=t.$handleEvent(e),t.toShowPopup(i,"technician")}}})],1)})):t._e(),t.loading?n("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?n("abnor"):t._e(),n("v-uni-view",{staticClass:"space-footer"}),n("technician-list-popup",{ref:"technician_list_popup"}),n("uni-popup",{ref:"choose_city_item",attrs:{type:"top",custom:!0,zIndex:999}},[n("v-uni-view",{style:{height:t.configInfo.navBarHeight+8+"px"}}),n("v-uni-view",{staticClass:"choose-city-popup rel"},[n("v-uni-image",{staticClass:"city-img",attrs:{src:"https://lbqny.migugu.com/admin/anmo/technician/no_city.png"}}),n("v-uni-view",{staticClass:"text f-paragraph c-base abs"},[t._v("很抱歉,该城市未开通, 点击左上角切换其他城市下单服务")]),n("v-uni-view",{staticClass:"flex-between"},[n("v-uni-view"),n("v-uni-view",{staticClass:"item-btn flex-center f-paragraph c-title text-bold radius",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.$refs.choose_city_item.close()}}},[t._v("知道了")])],1)],1)],1),n("v-uni-view",{style:{height:t.configInfo.tabbarHeight+"px"}}),n("tabbar",{attrs:{cur:2}})],2)},a=[]},ea26:function(t,e,n){"use strict";n.r(e);var i=n("7d54"),a=n("002b");for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);n("cd75");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"5f3efd3c",null,!1,i["a"],void 0);e["default"]=r.exports},fb12:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("9b1b")),c=i(n("2634")),o=i(n("2fdc"));n("64aa"),n("5c47"),n("8f71"),n("bf0f");var r=n("8f59"),s={components:{},props:{cur:{type:Number,default:function(){return 0}}},data:function(){return{}},computed:(0,r.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},commonOptions:function(t){return t.user.commonOptions},userPageType:function(t){return t.user.userPageType},activeIndex:function(t){return t.order.activeIndex}}),mounted:function(){var t=this;return(0,o.default)((0,c.default)().mark((function e(){var n,i,a;return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=t,i=uni.getSystemInfoSync().windowHeight,a=n.configInfo.navBarHeight,setTimeout((function(){var e=uni.createSelectorQuery().in(n);e.select(".custom-tabbar").boundingClientRect((function(e){var c=i-e.height-a,o=n.$util.deepCopy(t.configInfo);o.curSysHeight=c,o.tabbarHeight=e.height,n.updateConfigItem({key:"configInfo",val:o})})).exec()}),600);case 4:case"end":return e.stop()}}),e)})))()},methods:(0,a.default)((0,a.default)((0,a.default)({},(0,r.mapActions)(["getConfigInfo"])),(0,r.mapMutations)(["updateConfigItem"])),{},{changeTab:function(t){var e=this;return(0,o.default)((0,c.default)().mark((function n(){var i,a,o,r,s,u,l;return(0,c.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.id){n.next=5;break}return n.next=3,e.getConfigInfo();case 3:i=e.configInfo.tabBar.filter((function(e){return e.name==t.name})),t=i[0];case 5:if(a=t,o=a.id,r=e.activeIndex,s=e.cur,u=e.userPageType,l={1:"/pages/service",2:"/pages/technician",3:"/pages/dynamic",4:"/pages/order?tab=".concat(r),5:"/pages/mine?type=".concat(u),6:"/pages/shopstore",7:"/pages/map"},o!=s){n.next=10;break}return n.abrupt("return");case 10:e.$util.goUrl({url:l[o],openType:"reLaunch"});case 11:case"end":return n.stop()}}),n)})))()}})};e.default=s}}]);