1 line
3.4 KiB
JavaScript
1 line
3.4 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60f878ba"],{"21fb":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-selfpick",class:e.className},[i("div",{domProps:{innerHTML:e._s(e.css)}}),i("div",{staticClass:"selfpick-box",on:{click:function(t){return t.stopPropagation(),e.gotoUrl.apply(null,arguments)}}},[i("i",{staticClass:"iconfont icon-fontclass-dianpu"}),i("div",{staticClass:"name"},[e._v(e._s(e.deliverInfo.deliver_name))]),e.deliverInfo.loading?e._e():[i("div",{staticClass:"line"}),i("div",{staticStyle:{"font-size":"12px"}},[e._v("切换")]),i("i",{staticClass:"iconfont icon-member_right"})]],2)])},o=[],a=(i("99af"),function(){var e=this.datas,t=e.font_color,i=e.preview_color;return"\n .component-".concat(this.id," .selfpick-box {\n color: ").concat(t||"#f8f8f8",";\n background-color: ").concat(i.color,";\n background-image: url(").concat(2==i.isColor?i.image:"",")\n }\n ")}),s={props:["id","datas","styles"],data:function(){return{activeID:0,deliverInfo:{deliver_name:"正在获取中...",loading:!0}}},mounted:function(){var e=this,t=sessionStorage.getItem("deliverId")||null,i=window.location.href;if(t)this.activeID=t;else if(i.indexOf("deliverId")>-1){var n=this.fun.getKey("deliverId");window.sessionStorage.setItem("deliverId",n),this.activeID=n}this.fun.getLocation().then((function(t){e.getNowPackageDeliver(t.point.lat,t.point.lng)})).catch((function(t){e.deliverInfo["deliver_name"]="获取不到定位,请手动切换选择!",e.deliverInfo.loading=!1}))},components:{},computed:{css:function(){return"<style>"+a.call(this)+"</style>"},className:function(){var e=["component-wrapper","component-".concat(this.id)];return e}},methods:{gotoUrl:function(){this.deliverInfo.loading||this.$router.push(this.fun.getUrl("selectSelfPickupPoint",{tag:1,deliverId:this.activeID}))},getNowPackageDeliver:function(e,t){var i=this,n={lng:t||"",lat:e||""};this.activeID&&(n.deliver_id=this.activeID),$http.get("plugin.package-deliver.frontend.decorate-deliver.getNowPackageDeliver",n).then((function(e){i.deliverInfo.loading=!1,1===e.result?(i.deliverInfo=e.data,window.sessionStorage.setItem("deliverId",e.data.id),i.$emit("refresh",{type:"selfpick"})):(i.$toast(e.msg),i.deliverInfo["deliver_name"]="请手动切换选择!")}),(function(e){}))}}},l=s,c=(i("b049"),i("2877")),r=Object(c["a"])(l,n,o,!1,null,"96c02aae",null);t["default"]=r.exports},"583a":function(e,t,i){var n=i("58b6");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("499e").default;o("a13b82b2",n,!0,{sourceMap:!1,shadowMode:!1})},"58b6":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,".component-selfpick .selfpick-box[data-v-96c02aae]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:2.75rem;line-height:2.75rem;padding:0 .875rem;font-size:14px}.component-selfpick .selfpick-box .name[data-v-96c02aae]{max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.component-selfpick .selfpick-box .icon-fontclass-dianpu[data-v-96c02aae]{font-size:24px;margin-right:.25rem}.component-selfpick .selfpick-box .line[data-v-96c02aae]{width:1px;height:.625rem;background:#9f9e9e;margin:0 .5rem}",""]),e.exports=t},b049:function(e,t,i){"use strict";i("583a")}}]); |