1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8d588f36"],{3268:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".activeColour[data-v-705afa61]{color:#ffa300}.search_box[data-v-705afa61]{position:fixed;width:100%;z-index:100}.search_box .search[data-v-705afa61]{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:0 .875rem;z-index:99;margin:auto;background:#fff;text-align:center;height:2.75rem;line-height:2.75rem}.search_box .search img[data-v-705afa61]{width:10%;float:left;max-height:2.5rem}.search_box .search .left[data-v-705afa61]{color:#ffa300;font-size:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.search_box .search .left span[data-v-705afa61]{display:block;margin:0 .25rem;max-width:5.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search_box .search .left i[data-v-705afa61]:last-child{font-size:1.125rem}.search_box .search .left .icon-back[data-v-705afa61]{font-size:1.3rem;color:#000;margin-right:1rem}.search_box .search .right[data-v-705afa61]{width:14.375rem;height:1.875rem;background:#f5f5f5;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;line-height:1.875rem;border-radius:1rem;padding:0 .625rem;font-size:14px}.search_box .search .right i[data-v-705afa61]{font-size:1.125rem;color:#999;margin-right:.375rem}.search_box .search .right input[data-v-705afa61]{border:none;width:100%}.search-popup-box[data-v-705afa61]{position:absolute;top:2.3rem;left:2rem;width:25%;color:#3c3c3c;background:#fff;border-radius:10px;border-bottom:1px solid #eee;border-left:1px solid #eee;border-right:1px solid #eee}.popup-box[data-v-705afa61]{width:100%;background:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1rem}.popup-box p[data-v-705afa61]{padding:.1rem .5rem;display:inline-block;background-color:#fff2e6;color:#f4a82e;border-radius:1.094rem}.box[data-v-705afa61]{padding-top:.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background:#fff;line-height:1.5rem;position:relative}.box-left[data-v-705afa61]{color:#ffa300}.box-left[data-v-705afa61],.box-right[data-v-705afa61]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.box-right[data-v-705afa61]{margin:0 auto;width:3.5rem;color:#ccc}.box-right[data-v-705afa61],.icon-box[data-v-705afa61]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.icon-box[data-v-705afa61]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-top:-.2rem}.icon-member-top[data-v-705afa61]{height:.5rem}.list[data-v-705afa61]{background:#fff}.list-item[data-v-705afa61]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:.5rem}.item-left[data-v-705afa61]{-webkit-box-flex:0;-webkit-flex:0 0 5rem;-ms-flex:0 0 5rem;flex:0 0 5rem;height:5rem;margin-right:.5rem}.item-left img[data-v-705afa61]{width:100%;height:100%;border-radius:.375rem}.item-right[data-v-705afa61]{padding:.3rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;text-align:left;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.item-right .title[data-v-705afa61]{font-weight:700;font-size:16px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2}.describe[data-v-705afa61],.item-right .talk[data-v-705afa61]{color:#ccc}.describe[data-v-705afa61]{font-size:12px;text-align:left;padding-top:.3rem;border-top:1px solid #ffc29d;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2}.blue[data-v-705afa61]{display:inline-block;padding:0 .1rem;border-radius:2.5px;background-color:#6eabff;color:#fff}.technician-list[data-v-705afa61]{background-color:#fff;padding:1rem 0}.tag[data-v-705afa61]{display:inline-block;border-radius:12px;border:.5px solid #f4a82e;padding:.1rem .3rem;color:#f4a82e;font-size:12px;width:3rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.technician-item[data-v-705afa61]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:.5rem 0;border-bottom:1px solid #f2f2f7}.technician-item .number[data-v-705afa61]{font-size:22px;font-weight:700;line-height:4rem}.technician-item .number[data-v-705afa61],.technician-item .pic[data-v-705afa61]{-webkit-box-flex:0;-webkit-flex:0 0 3rem;-ms-flex:0 0 3rem;flex:0 0 3rem}.technician-item .pic[data-v-705afa61]{width:3rem;height:3rem;margin:.5rem}.technician-item .pic img[data-v-705afa61]{width:100%;height:100%;border-radius:50%}.technician-item .technician-right[data-v-705afa61]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.technician-item .technician-right .gray[data-v-705afa61]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.technician-item .technician-right .address[data-v-705afa61]{color:#ccc}.technician-item .top[data-v-705afa61]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.technician-item .top p[data-v-705afa61]{font-weight:700;line-height:1.3rem;margin-right:.5rem}.technician-item .top .star[data-v-705afa61]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;text-align:right}.technician-item .gray[data-v-705afa61]{font-size:12px;color:#b0b0b0;text-align:left}.technician-item .describe1[data-v-705afa61]{font-size:12px;color:#ccc;text-align:left;padding-top:.3rem;width:16rem}",""]),t.exports=e},"50b7":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"appointment-search"}},[i("div",{staticClass:"search_box",style:{width:3==t.fun.getPhoneEnv()?"375px":""}},[i("ul",{staticClass:"search"},[i("li",{staticClass:"left"},[i("i",{staticClass:"iconfont icon-back",on:{click:t.goBack}}),i("span",{on:{click:function(e){return e.stopPropagation(),t.showProject.apply(null,arguments)}}},[t._v(t._s("1"===t.status?t.appointmentLang.project:t.appointmentLang.worker))]),i("i",{staticClass:"iconfont icon-member-bottom",on:{click:function(e){return e.stopPropagation(),t.showProject.apply(null,arguments)}}}),t.show2?i("div",{staticClass:"search-popup-box"},[i("div",{staticStyle:{margin:"0.3rem 0.5rem","border-bottom":"1px solid #eee"}},[i("p",{on:{click:function(e){return t.selectType("1")}}},[t._v(t._s(t.appointmentLang.project))])]),i("div",{staticStyle:{margin:"0.3rem 0.5rem"}},[i("p",{on:{click:function(e){return t.selectType("2")}}},[t._v(t._s(t.appointmentLang.worker))])])]):t._e()]),i("li",{staticClass:"right"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.kwd,expression:"kwd"}],attrs:{type:"text",title:"搜索",placeholder:"搜索"+t.appointmentLang.project+"/"+t.appointmentLang.worker},domProps:{value:t.kwd},on:{input:function(e){e.target.composing||(t.kwd=e.target.value)}}}),i("i",{staticClass:"iconfont icon-sousuo",on:{click:t.getData}})])]),"2"!==t.status?i("div",{staticClass:"box"},[i("div",{staticClass:"box-left",on:{click:t.showClass}},[i("span",[t._v(t._s(t.category.name||"全部"))]),i("i",{staticClass:"iconfont icon-member-bottom"})]),i("div",{staticStyle:{flex:"1"},on:{click:t.evaluateBtn}},[i("div",{staticClass:"box-right"},[i("span",{class:[t.show1?"":"activeColour"]},[t._v("评价")]),i("div",{staticClass:"icon-box"},[i("i",{staticClass:"iconfont icon-member-top",class:[t.show1?"":"asc"==t.sort?"activeColour":""]}),i("i",{staticClass:"iconfont icon-member-bottom",class:[t.show1?"":"desc"==t.sort?"activeColour":""]})])])])]):t._e()]),i("div",{style:{height:"2"===t.status?"2.5rem":"5rem"}}),"2"!==t.status?[i("div",{staticClass:"list"},t._l(t.projectList,(function(e){return i("div",{key:e.id,staticClass:"list-item",on:{click:function(i){return t.toUrl("ProjectDetails",{project_id:e.id})}}},[i("div",{staticClass:"item-left"},[i("img",{attrs:{src:e.thumb,alt:""}})]),i("div",{staticClass:"item-right"},[i("p",{staticClass:"title",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(t._s(e.title))]),i("div",{staticClass:"talk"},[i("i",{staticClass:"iconfont icon-liaotian"}),t._v(" "),i("span",[t._v(t._s(e.comment_num||0))])])])])})),0)]:t._e(),"2"===t.status?t._l(t.projectList,(function(e){return i("div",{key:e.id,staticClass:"technician-list",on:{click:function(i){return t.toUrl("TechnicianDetails",{worker_id:e.id})}}},[i("div",{staticClass:"technician-item"},[i("div",{staticClass:"pic",staticStyle:{"margin-left":"2rem"}},[i("img",{attrs:{src:e.thumb,alt:""}})]),i("div",{staticClass:"technician-right"},[i("div",{staticClass:"top"},[i("p",[t._v(t._s(e.name))]),t._l(e.tags,(function(e,a){return i("span",{key:a,staticClass:"tag"},[t._v(t._s(e))])})),i("div",{staticClass:"star"},[i("van-rate",{attrs:{size:"14",readonly:""},model:{value:e.score,callback:function(i){t.$set(e,"score",i)},expression:"item.score"}})],1)],2),e.has_one_store?i("div",{staticStyle:{display:"flex"}},[i("p",{staticClass:"gray"},[t._v(t._s(e.has_one_store.store_name))]),i("div",{staticClass:"address"},[i("i",{staticClass:"iconfont icon-order_locate"}),i("span",[t._v(t._s(e.has_one_store.distance)+t._s(e.has_one_store.unit))])])]):t._e(),i("div",{staticClass:"describe1 text-over"},t._l(e.worker_projects,(function(a,o){return i("span",{key:o,staticClass:"gray"},[t._v(t._s(a.title)),o<e.worker_projects.length-1?i("em",[t._v(",")]):t._e()])})),0)])])])})):t._e(),i("van-popup",{attrs:{closeable:"","close-icon":"close",position:"top"},model:{value:t.show1,callback:function(e){t.show1=e},expression:"show1"}},[i("div",{staticClass:"popup-box"},[i("div",{staticStyle:{margin:"0.3rem 0.5rem"},on:{click:function(e){return t.selectClass("")}}},[i("p",[t._v("全部")])]),t._l(t.className,(function(e){return i("div",{key:e.id,staticStyle:{margin:"0.3rem 0.5rem"},on:{click:function(i){return t.selectClass(e)}}},[i("p",[t._v(" "+t._s(e.name))])])}))],2)])],2)},o=[],s=(i("e7e5"),i("d399")),n=(i("14d9"),i("4e82"),i("99af"),i("d3b7"),i("25f0"),i("e9c4"),i("6968")),r=i("ac0d"),c={mixins:[r["a"]],data:function(){return{status:"1",category:{},show1:!1,show2:!1,className:[],url:"",json:{},sort:"asc",point:{},city:"",kwd:"",projectList:[],isLoadMore:!0,page:1,total_page:0}},activated:function(){this.init(),this.getClass(),this.getData()},computed:{appointmentLang:function(){return this.$store.state.shopLanguage.appointment?this.$store.state.shopLanguage.appointment:{worker:"技师",project:"项目",service:"服务"}}},methods:{goBack:function(){window.history.length<=1?this.$router.push(this.fun.getUrl("home",{})):this.$router.go(-1)},evaluateBtn:function(){"asc"==this.sort?this.sort="desc":this.sort="asc",this.show1=!1,this.getData()},selectType:function(t){t!=this.status?(this.status=t,this.projectList=[],this.getData(),"2"===this.status&&(this.category={}),this.show2=!1):this.show2=!1},selectClass:function(t){t.id?this.category=t:this.category={},this.getData(),this.show1=!1},getClass:function(){var t=this;$http.get("plugin.appointment.frontend.project-category.get-list",{},"获取中").then((function(e){t.fun.setWXTitle("搜索"+t.appointmentLang.project+"/"+t.appointmentLang.worker),1===e.result?t.className=e.data:Object(s["a"])(e.msg)})).catch((function(t){}))},showClass:function(){"2"!==this.status&&(this.show2=!1,this.show1?this.show1=!1:this.show1=!0)},showProject:function(){this.show1=!1,this.show2?this.show2=!1:this.show2=!0},toUrl:function(t,e){this.$router.push(this.fun.getUrl(t,e))},init:function(){this.projectList=[],this.kwd="",this.category={},this.status="1",this.show1=!1,this.show2=!1,this.sort="asc",this.isLoadMore=!0,this.json.page=1,this.total_page=0},getData:function(){var t=this;this.point.lng?("1"===this.status?(this.url="plugin.appointment.frontend.project.get-list",this.json={lng:this.point.lng,lat:this.point.lat,city_name:this.city,sort:this.sort,category_id:this.category.id,name:this.kwd,page:1}):(this.url="plugin.appointment.frontend.worker.get-workers-by-name",this.json={lng:this.point.lng,lat:this.point.lat,city_name:this.city,kwd:this.kwd,page:1}),$http.get(this.url,this.json,"加载中").then((function(e){1===e.result?(t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0),t.projectList=e.data.data):Object(s["a"])(e.msg)})).catch((function(t){}))):this.ready()},getMoreData:function(){var t=this;t.isLoadMore=!1,this.json.page>=this.total_page||(this.json.page=this.json.page+1,$http.get(this.url,this.json,"加载中").then((function(e){if(t.isLoadMore=!0,1!==e.result)return t.json.page=t.json.page-1,void(t.isLoadMore=!1);var i=e.data.data;t.projectList=t.projectList.concat(i)}),(function(t){})))},ready:function(){var t=this;this.fun.getLocation().then((function(e){t.point=e.point,t.address=e.title,t.city=e.city,t.getData()})).catch((function(t){}))},getLocation:function(){var t=this,e=new AMap.Map("iCenter");function i(e){var i=e.position.toString().split(",");t.point={lat:i[1],lng:i[0]},t.address=e.formattedAddress,t.title=e.formattedAddress,t.city=t.fun.isTextEmpty(e.addressComponent.city)?e.addressComponent.province:e.addressComponent.city;var a={address:e.formattedAddress,city:t.city,title:e.formattedAddress,point:t.point};t.$store.commit("updateLocation",a),t.$store.commit("setLocation",a),window.localStorage.setItem("myLocation",JSON.stringify(a)),t.getData()}function a(t){Object(s["a"])("定位失败")}e.plugin("AMap.Geolocation",(function(){var t=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,maximumAge:0,convert:!0,showButton:!0,buttonPosition:"LB",buttonOffset:new AMap.Pixel(10,20),showMarker:!0,showCircle:!0,panToLocation:!0,zoomToAccuracy:!0});e.addControl(t),t.getCurrentPosition(),AMap.event.addListener(t,"complete",i),AMap.event.addListener(t,"error",a)}))}},components:{cTitle:n["a"]}},l=c,d=l,p=(i("ae9a"),i("2877")),f=Object(p["a"])(d,a,o,!1,null,"705afa61",null);e["default"]=f.exports},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var a=document.documentElement,o=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&a.clientHeight?Math.min(o.clientHeight,a.clientHeight):Math.max(o.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(o.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},ae9a:function(t,e,i){"use strict";i("c24e")},c24e:function(t,e,i){var a=i("3268");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("25315c1f",a,!0,{sourceMap:!1,shadowMode:!1})}}]); |