1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-27d6275e"],{"0320":function(t,a,e){},"06a8":function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],n=e("795b"),c=e.n(n),r=(e("7f7f"),e("ac6a"),e("f20c")),o=e("5cab"),u=e("f499"),l=e.n(u),d=e("8982"),f="/industryParkApi",m="/wx/data",h="/wx/public",v="/wx/dictController";function p(t){return Object(d["a"])({url:f+m+"/listBizAll/"+t,method:"post"})}function g(t){return Object(d["a"])({url:f+h+"/listProjectAll",method:"post",data:t})}function b(t){return Object(d["a"])({url:f+v+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:l()(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 s=a.getDictValue(t.data,e,!0);a.dc_data[e]=s,a.dc_map[e]=a.$common.transDcMap(s);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 s=a.getDictValue(t.data,e,!1);a.dc_data[e]=s,a.dc_map[e]=a.$common.transDcMap(s);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(o["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(o["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,s=a*e-e,i=a*e;return t.slice(s,i)},getDictValue:function(t,a,e){var s=t[a]?r["a"].castEval(t[a].dictValue):[],i=[];if(s.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var n={label:"全部",value:"",active:!0};i.unshift(n)}return i},confirm:function(t,a){return new c.a(function(e,s){C["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(C["Toast"])("已取消"),s(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,j=e("2877"),w=Object(j["a"])(k,s,i,!1,null,"3fa5b905",null);a["a"]=w.exports},"504a":function(t,a,e){"use strict";var s=e("0320"),i=e.n(s);i.a},"66be":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"merchan"},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-type"},[s("div",{staticClass:"left"},[s("div",{staticClass:"top"},[s("span",[t._v(t._s(t.detail.businessName))])]),s("div",{staticClass:"bottom"},[t._v("入驻时间:"+t._s(t.detail.releaseTime))])]),s("div",{staticClass:"right"},[s("div",{staticClass:"tip tip-dark"},[t._v(t._s(t.detail.typeName))])])])]),s("div",{staticClass:"detail-card"},[s("div",{staticClass:"card-title"},[t._v("服务商简介")]),s("div",{staticClass:"card-body"},[t._m(0),s("div",{staticClass:"address"},[s("PositionNav",{attrs:{address:t.detail.businessAddress}})],1),t._m(1),s("div",{staticClass:"tel-num"},[s("TelNum",{attrs:{num:t.detail.businessPhone}})],1),s("div",{staticClass:"star-item"},[t._m(2),s("van-rate",{staticClass:"star",attrs:{"allow-half":"","void-icon":"star","void-color":"#eee",color:"#ffd21e",readonly:""},model:{value:t.star2,callback:function(a){t.star2=a},expression:"star2"}})],1)])]),s("div",{staticClass:"no-title"},[t._v("服务商评价")]),s("div",{staticClass:"detail-card"},[s("div",{staticClass:"card-body rate"},[s("div",{staticClass:"top"},[s("div",{staticClass:"left"},[s("img",{attrs:{src:e("a0f6"),alt:""}}),s("span",{staticClass:"text"},[t._v(t._s(t.detail.businessName))]),s("span",{staticClass:"tip tip-grid"},[t._v(t._s(t.detail.typeName))])]),s("div",{staticClass:"right"},[t._v("好评率: 100%")])]),s("div",{staticClass:"bottom"},[s("van-rate",{staticClass:"star",attrs:{"void-icon":"star","void-color":"#eee",color:"#ffd21e"},model:{value:t.star,callback:function(a){t.star=a},expression:"star"}})],1)])]),s("div",{staticClass:"but-bottom",on:{click:t.onConfirm}},[t._v("\n 提交\n ")]),s("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker,callback:function(a){t.showPicker=a},expression:"showPicker"}},[s("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("服务评价")])])}],n=e("f7eb"),c=e("6382"),r=e("ff65"),o=e("06a8"),u=e("3089"),l={name:"PeripheryService",components:{TelNum:n["a"],PositionNav:c["a"]},data:function(){return{dc_key:["periphery_type"],star:0,star2:0,value:"",columns:["公安","警察","物业","其他"],showPicker:!1,id:"",detail:{},params:{id:"",evaluateNum:"",score:""}}},mixins:[o["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){var a=this;this.params.evaluateNum=this.params.evaluateNum+1,this.params.score=this.params.score+this.star,Object(r["b"])(this.params).then(function(t){u["Toast"].success("评价成功"),a.$router.push({path:"/periphery/service",query:{type:a.detail.type}})})},getDetailById:function(){var t=this,a=this;Object(r["c"])({id:a.id}).then(function(e){if(console.log(e.data),e.data){var s=a.getItemJson(e.data);t.detail=s,t.params={id:s.id,evaluateNum:s.evaluateNum,score:s.score},t.star2=(null==s.score?0:s.score)/(null==s.evaluateNum?1:s.evaluateNum)}})},getItemJson:function(t){return t.releaseTime=this.$common.transDate(t.releaseTime),t.typeName=this.dc_map.periphery_type[t.type],t}}},d=l,f=(e("504a"),e("2877")),m=Object(f["a"])(d,s,i,!1,null,"cac6057a",null);a["default"]=m.exports},"7f7f":function(t,a,e){var s=e("86cc").f,i=Function.prototype,n=/^\s*function ([^ (]*)/,c="name";c in i||e("9e1e")&&s(i,c,{configurable:!0,get:function(){try{return(""+this).match(n)[1]}catch(t){return""}}})},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return m}),e.d(a,"b",function(){return h});var s=e("795b"),i=e.n(s),n=e("bc3a"),c=e.n(n),r=e("4328"),o=e.n(r),u=e("4360"),l=e("5cab"),d=e("a18c"),f=e("3089");function m(t,a){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var e={method:t.method,url:t.url,data:o.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,s){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(){d["a"].push("/login")})},1500),s(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),s(e.errmsg);break}a(e)}else console.log(t),s(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),s(a,e)})})}function h(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["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,s){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(){d["a"].push("/login")})},1500),s(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),s(a.errmsg);break}e(a)}else console.log(t),s(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),s(a,e)})})}},a0f6:function(t,a,e){t.exports=e.p+"assets/img/header.a5eb627d.png"},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},ff65:function(t,a,e){"use strict";e.d(a,"a",function(){return c}),e.d(a,"d",function(){return r}),e.d(a,"c",function(){return o}),e.d(a,"b",function(){return u});var s=e("8982"),i="/industryParkApi",n="/wx/periphery";function c(t){return Object(s["a"])({url:i+n+"/add",method:"post",data:t})}function r(t){return Object(s["a"])({url:i+n+"/list",method:"post",data:t})}function o(t){return Object(s["a"])({url:i+n+"/getById",method:"post",data:t})}function u(t){return Object(s["a"])({url:i+n+"/edit",method:"post",data:t})}}}]);
|