bztang-admin/addons/yun_shop/static/app/js/chunk-4d0fea09.c88eba76.js

1 line
7.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d0fea09"],{3161:function(t,a,n){"use strict";n("d3f3")},"7b1a":function(t,a,n){"use strict";n("f9ee")},"7bd4":function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{class:t.className},[t.datas.list?n("div",{staticClass:"html-box"},[t.datas.list.length<=0?n("div",{staticStyle:{"text-align":"center","font-size":"18px","min-height":"30px"}},[t._v("请设置显示板块内容")]):t._e(),t._l(t.datas.list,(function(a){return[n(a.uikey,{key:a.id,tag:"component",attrs:{parent_id:t.id,id:a.id,datas:t.handleDatas(a.datas)}})]}))],2):t._e()])},o=[],s=(n("d81d"),n("b64b"),function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"data-list-box",class:t.className},[n("div",{domProps:{innerHTML:t._s(t.css)}}),n("div",{staticClass:"count-box"},[t.datas.show_list<=0?n("div",{staticClass:"no-data"},[t._v(" 请选择显示数据 ")]):t._e(),t._l(t.datas.show_list,(function(a){return n("div",{key:a.value,staticClass:"count-item"},[n("i",{staticClass:"iconfont icon-submit"}),n("span",{staticClass:"data-title"},[t._v(t._s(a.label)+"")]),n("span",{staticClass:"price"},[t._v(t._s(void 0!==t.countData[a.value]?t.countData[a.value]||0:"加载中"))])])}))],2)])}),i=[],c=(n("99af"),n("d3b7"),n("25f0"),n("e9c4"),n("a15b"),function(){if(this.datas.preview_color){var t=this.datas,a=t.padding_top,n=t.padding_bottom,e=t.padding_left,o=t.padding_right,s=t.preview_color,i=t.font_size,c=t.font_color;return"\n .component-c".concat(this.parent_id,"-").concat(this.id," .count-box {\n background-color: ").concat(s.color,";\n background-image: url(").concat(2==s.isColor?s.image:"",");\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n padding-top: ").concat(a,"px;\n padding-bottom: ").concat(n,"px;\n padding-left: ").concat(e,"px;\n padding-right: ").concat(o,"px;\n }\n\n .component-c").concat(this.parent_id,"-").concat(this.id," .count-box{\n font-size: ").concat(i,"px;\n color: ").concat(c,";\n }\n ")}}),r={props:["id","parent_id","datas"],data:function(){return{countData:{},region_name:""}},mounted:function(){var t=this;this.fun.getLocation().then((function(a){t.region_name=a.addressComponent?a.addressComponent[t.datas.city_type]:"",a.addressComponent&&t.recordLocation(a),t.getData()})).catch((function(a){t.getData()}))},computed:{css:function(){return"<style>"+c.call(this)+"</style>"},className:function(){var t=["component-wrapper","component-c".concat(this.parent_id,"-").concat(this.id)];return t}},methods:{getData:function(){var t=this;$http.post("plugin.store-cashier.frontend.store.store.get-store-count",{city_type:this.datas.city_type,region_name:this.region_name}).then((function(a){1===a.result?t.countData={all_stores_count:t.transform(parseInt(a.data.sotreCount+t.datas.all_stores_count)),all_fans_count:t.transform(parseInt(a.data.memberCount+t.datas.all_fans_count)),local_stores_count:t.transform(parseInt(a.data.sotreCityCount+t.datas.local_stores_count)),local_fans_count:t.transform(parseInt(a.data.memberCityCount+t.datas.local_fans_count))}:t.countData={all_stores_count:0,all_fans_count:0,local_stores_count:0,local_fans_count:0}})).catch((function(t){}))},recordLocation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=this.fun.bd_encrypt(t.point.lng,t.point.lat);$http.post("member.member.save-member-location",{province_name:t.addressComponent.province,city_name:t.addressComponent.city,district_name:t.addressComponent.district,longitude:a.lng,latitude:a.lat}).then((function(t){})).catch((function(t){}))},getLocation:function(){var t=this,a=new AMap.Map("iCenter");function n(a){var n=a.position.toString().split(",");t.point={lat:n[1],lng:n[0]},t.address=a.formattedAddress,t.title=a.formattedAddress,t.city=t.fun.isTextEmpty(a.addressComponent.city)?a.addressComponent.province:a.addressComponent.city,t.region_name=a.addressComponent[t.datas.city_type];var e={addressComponent:a.addressComponent,address:a.formattedAddress,city:t.city,title:a.formattedAddress,point:t.point};t.$store.commit("updateLocation",e),t.$store.commit("setLocation",e),window.localStorage.setItem("myLocation",JSON.stringify(e)),t.recordLocation(e),t.getData()}function e(a){t.getData()}a.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});a.addControl(t),t.getCurrentPosition(),AMap.event.addListener(t,"complete",n),AMap.event.addListener(t,"error",e)}))},transform:function(t){var a=["","",""],n=1e3,e=3,o=1;while(t/n>=1)n*=10,e+=1;if(e<=4)a[1]="千",a[0]=parseFloat(t/1e3)+"";else if(e<=8){var s=parseInt(e-4)/3>1?"千万":"万";o="万"===s?1e4:1e7,a[1]=s,a[0]=t/o+""}else if(e<=16){var i=(e-8)/3>1?"千亿":"亿";i=(e-8)/4>1?"万亿":i,i=(e-8)/7>1?"千万亿":i,o=1,"亿"===i?o=1e8:"千亿"===i?o=1e11:"万亿"===i?o=1e12:"千万亿"===i&&(o=1e15),a[1]=i,a[0]=parseFloat(t/o)+""}return t<1e3&&(a[1]="",a[0]=t+""),a.join("")}}},d=r,l=(n("3161"),n("2877")),p=Object(l["a"])(d,s,i,!1,null,"f0424d9a",null),u=p.exports,f={props:["id","datas"],data:function(){return{}},computed:{className:function(){var t=["component-wrapper","component-".concat(this.id)];return t}},components:{C_statistics:u},methods:{handleDatas:function(t){var a={};return t&&Object.keys(t).map((function(n){a[n]=t[n].value})),a}}},m=f,_=(n("7b1a"),Object(l["a"])(m,e,o,!1,null,"af94447e",null));a["default"]=_.exports},a40e:function(t,a,n){var e=n("24fb");a=e(!1),a.push([t.i,".count-box[data-v-f0424d9a]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0 10px}.count-box[data-v-f0424d9a],.count-item[data-v-f0424d9a]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.count-item[data-v-f0424d9a]{width:50%;padding:5px 10px;text-align:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.no-data[data-v-f0424d9a]{width:100%;padding:5px;text-align:center}",""]),t.exports=a},b82c:function(t,a,n){var e=n("24fb");a=e(!1),a.push([t.i,"*[data-v-af94447e]{list-style:none;padding:0;margin:0}.component-wrapper[data-v-af94447e]{width:100%}.data-item[data-v-af94447e]{padding:10px 15px;font-size:15px;text-align:left}.data-item .price[data-v-af94447e]{color:#f56c6c;font-size:16px}",""]),t.exports=a},d3f3:function(t,a,n){var e=n("a40e");e.__esModule&&(e=e.default),"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=n("499e").default;o("b1a05a02",e,!0,{sourceMap:!1,shadowMode:!1})},f9ee:function(t,a,n){var e=n("b82c");e.__esModule&&(e=e.default),"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=n("499e").default;o("deb7d02e",e,!0,{sourceMap:!1,shadowMode:!1})}}]);