1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7ab039bf"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],s=e("795b"),c=e.n(s),o=(e("7f7f"),e("ac6a"),e("f20c")),r=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),f="/industryParkApi",h="/wx/data",m="/wx/public",v="/wx/dictController";function p(t){return Object(l["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function g(t){return Object(l["a"])({url:f+m+"/listProjectAll",method:"post",data:t})}function b(t){return Object(l["a"])({url:f+v+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:d()(t)};return new c.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var C=e("3089"),y={name:"BaseData",data:function(){return{currentPage:1,totalSize:0,pageSize:10,InitialLoading:!0,allLoaded:!1,bottomStatus:"",StaffData:[],StaffMap:{},BizData:[],BizMap:{},UserProject:[],ProjectData:[],ProjectMap:{},dialogImageUrl:"",dialogImageVisible:!1,dc_map:{},dc_data:{},dc_map_no_all:{},dc_data_no_all:{}}},mounted:function(){},methods:{initDict:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!0);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initDict2:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!1);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initBiz:function(){var t=this;return this.BizData=[],p(r["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.businessName,value:a.id};t.BizData.push(e),t.BizMap[a.id]=a.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],g(r["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.name,value:a.id};t.ProjectData.push(e),t.ProjectMap[e.value]=a})}).catch(function(){})},pagination:function(t){var a=this.currentPage,e=this.pageSize,n=a*e-e,i=a*e;return t.slice(n,i)},getDictValue:function(t,a,e){var n=t[a]?o["a"].castEval(t[a].dictValue):[],i=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var s={label:"全部",value:"",active:!0};i.unshift(s)}return i},confirm:function(t,a){return new c.a(function(e,n){C["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(C["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,a=this;console.log("loadBottom"),setTimeout(function(){a.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,a){var e=a.indexOf(t);a.splice(e,1)},noImg:function(){var t=event.srcElement;t.src=e("aed7"),t.onerror=null}}},k=y,w=e("2877"),j=Object(w["a"])(k,n,i,!1,null,"3fa5b905",null);a["a"]=j.exports},"1d75":function(t,a,e){},"21c7":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"merchan"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-type"},[e("div",{staticClass:"left"},[e("div",{staticClass:"top"},[e("span",[t._v(t._s(t.detail.businessName))])]),e("div",{staticClass:"bottom"},[t._v("入驻时间:"+t._s(t.detail.releaseTime))])]),e("div",{staticClass:"right"},[e("div",{staticClass:"tip tip-dark"},[t._v(t._s(t.detail.type))])])])]),e("div",{staticClass:"detail-card"},[e("div",{staticClass:"card-title"},[t._v("服务商简介")]),e("div",{staticClass:"card-body"},[t._m(0),e("div",{staticClass:"address"},[e("PositionNav",{attrs:{address:t.detail.businessAddress}})],1),t._m(1),e("div",{staticClass:"tel-num"},[e("TelNum",{attrs:{num:t.detail.businessPhone}})],1),e("div",{staticClass:"star-item"},[t._m(2),e("van-rate",{staticClass:"star",attrs:{"allow-half":"","void-icon":"star","void-color":"#eee",color:"#ffd21e",readonly:""},model:{value:t.star,callback:function(a){t.star=a},expression:"star"}}),e("div",{staticClass:"tip tip-grid",on:{click:function(a){return t.$router.push({path:"/periphery/assess",query:{id:t.detail.id}})}}},[t._v("\n 我要评价\n ")])],1),t._m(3),e("div",{staticClass:"detail-info",domProps:{innerHTML:t._s(t.detail.introduction)}})])]),e("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker,callback:function(a){t.showPicker=a},expression:"showPicker"}},[e("van-picker",{attrs:{"show-toolbar":"",columns:t.columns},on:{confirm:t.onConfirm,cancel:function(a){t.showPicker=!1}}})],1)],1)},i=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"custom-item-tit"},[e("div",{staticClass:"tit"},[t._v("商家地址")])])},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"custom-item-tit"},[e("div",{staticClass:"tit"},[t._v("商家电话")])])},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"left custom-item-tit"},[e("div",{staticClass:"tit"},[t._v("服务评价")])])},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"custom-item-tit"},[e("span",{staticClass:"tit"},[t._v("商家简介")])])}],s=e("f7eb"),c=e("6382"),o=e("ff65"),r=e("06a8"),u={name:"PeripheryService",components:{TelNum:s["a"],PositionNav:c["a"]},data:function(){return{dc_key:["periphery_type"],star:0,value:"",columns:["公安","警察","物业","其他"],showPicker:!1,id:"",detail:{}}},mixins:[r["a"]],mounted:function(){var t=this;this.id=this.$route.query.id,this.initDict(this.dc_key).then(function(a){t.getDetailById()})},methods:{onConfirm:function(t){this.value=t,this.showPicker=!1},getDetailById:function(){var t=this,a=this;Object(o["c"])({id:a.id}).then(function(e){if(console.log(e.data),e.data){var n=a.getItemJson(e.data);t.detail=n,t.star=(null==n.score?0:n.score)/(null==n.evaluateNum?1:n.evaluateNum)}})},getItemJson:function(t){return t.releaseTime=this.$common.transDate(t.releaseTime),t.type=this.dc_map.periphery_type[t.type],t}}},d=u,l=(e("b6b7"),e("2877")),f=Object(l["a"])(d,n,i,!1,null,"634c64ea",null);a["default"]=f.exports},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,s=/^\s*function ([^ (]*)/,c="name";c in i||e("9e1e")&&n(i,c,{configurable:!0,get:function(){try{return(""+this).match(s)[1]}catch(t){return""}}})},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return h}),e.d(a,"b",function(){return m});var n=e("795b"),i=e.n(n),s=e("bc3a"),c=e.n(s),o=e("4328"),r=e.n(o),u=e("4360"),d=e("5cab"),l=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var e={method:t.method,url:t.url,data:r.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,n){c()(e).then(function(t){if(t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(f["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}function m(t){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var a={method:t.method,url:t.url};return a.data=t.data,t.headers&&(a.headers=t.headers,a.headers["MVVM-Key"]=String((new Date).getTime()),a.headers["xx"]="anything",a.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new i.a(function(e,n){c.a.defaults.withCredentials=!0,c()(a).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},b6b7:function(t,a,e){"use strict";var n=e("1d75"),i=e.n(n);i.a},ff65:function(t,a,e){"use strict";e.d(a,"a",function(){return c}),e.d(a,"d",function(){return o}),e.d(a,"c",function(){return r}),e.d(a,"b",function(){return u});var n=e("8982"),i="/industryParkApi",s="/wx/periphery";function c(t){return Object(n["a"])({url:i+s+"/add",method:"post",data:t})}function o(t){return Object(n["a"])({url:i+s+"/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:i+s+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+s+"/edit",method:"post",data:t})}}}]);
|