headerSerch.js 5.7 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/components/headerSerch"],{"208f":function(t,e,o){"use strict";o.r(e);var a=o("e025"),n=o.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){o.d(e,t,(function(){return a[t]}))}(i);e["default"]=n.a},"2ec7":function(t,e,o){"use strict";var a=o("c2dd"),n=o.n(a);n.a},"3fb6":function(t,e,o){"use strict";o.r(e);var a=o("b8c5"),n=o("208f");for(var i in n)["default"].indexOf(i)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(i);o("2ec7");var r=o("f0c5"),s=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=s.exports},b8c5:function(t,e,o){"use strict";o.d(e,"b",(function(){return a})),o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,o=(t._self._c,t.special&&(1===t.tabVal||2===t.tabVal&&1===t.radioVal)&&1===t.tabVal&&0==t.storeVal?t.storeName.slice(0,7)||"选择门店":null),a=t.special&&(1===t.tabVal||2===t.tabVal&&1===t.radioVal)&&2===t.tabVal&&0==t.storeVal?t.storeName.slice(0,4)||"选择门店":null,n=t.special||1!==t.tabVal&&(2!==t.tabVal||1!==t.radioVal)||1!==t.tabVal||0!=t.storeVal?null:t.storeName.slice(0,7)||"选择门店",i=t.special||1!==t.tabVal&&(2!==t.tabVal||1!==t.radioVal)||2!==t.tabVal||0!=t.storeVal?null:t.storeName.slice(0,4)||"选择门店";t.$mp.data=Object.assign({},{$root:{g0:o,g1:a,g2:n,g3:i}})},n=[]},c2dd:function(t,e,o){},e025:function(t,e,o){"use strict";(function(t,a){var n=o("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("9523")),r=o("4818"),s=o("8bb5"),c=o("26cb");function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,a)}return o}function u(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?l(Object(o),!0).forEach((function(e){(0,i.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var f=t.getSystemInfoSync().statusBarHeight,d={name:"headerSerch",props:{dataConfig:{type:Object,default:function(){}},special:{type:Number,default:0}},components:{privacyAgreementPopup:function(){Promise.all([o.e("common/vendor"),o.e("components/privacyAgreementPopup/index")]).then(function(){return resolve(o("2cb7"))}.bind(null,o)).catch(o.oe)}},data:function(){return{statusBarHeight:f,marTop:63,bgColor:this.dataConfig.bgColor.color,boxStyle:this.dataConfig.boxStyle.type,logoConfig:this.dataConfig.logoConfig.url,mbConfig:this.dataConfig.mbConfig.val,txtStyle:this.dataConfig.txtStyle.type,hotWords:this.dataConfig.hotWords.list,prConfig:this.dataConfig.prConfig.val,tabVal:this.dataConfig.tabConfig.tabVal,radioVal:this.dataConfig.radioConfig.tabVal,storeVal:this.dataConfig.mapConfig.tabVal,textColor:this.dataConfig.textColor.color[0].item,textStyle:this.dataConfig.textStyle.list[this.dataConfig.textStyle.type].style,titleConfig:this.dataConfig.titleConfig.value,storeName:"",addressInfo:"选择地址",addressInfos:"选择地址",location:{},canGetPrivacySetting:!1}},watch:{location:function(t){this.getnearbyStore(t)}},mounted:function(){var e=this,o=this;if(a.getPrivacySetting&&(this.canGetPrivacySetting=!0),t.setStorageSync("hotList",o.hotWords),o.$store.commit("hotWords/setHotWord",o.hotWords),setTimeout((function(){var a=t.createSelectorQuery().in(e).select(".mp-header");a.boundingClientRect((function(t){o.marTop=t.height})).exec()}),100),1===this.tabVal||2===this.tabVal&&1===this.radioVal){this.selfLocation();var n=this;t.$on("canGetPrivacySetting",(function(e){e&&!t.getStorageSync("user_latitude")&&n.selfLocation()}))}t.$on("activeFn",(function(t){t&&(e.storeName=t.name,e.SET_NEARBY(t.id))}))},methods:u(u({},(0,c.mapMutations)(["SET_NEARBY"])),{},{onAgree:function(){this.selfLocation()},selfLocation:function(){var e=this;t.getLocation({type:"gcj02",success:function(o){try{t.setStorageSync("user_latitude",o.latitude),t.setStorageSync("user_longitude",o.longitude),e.getGeocoderCity(o.latitude,o.longitude),e.location={latitude:o.latitude,longitude:o.longitude}}catch(a){}},fail:function(e){t.getSetting({success:function(e){"undefined"==typeof e.authSetting["scope.userLocation"]||e.authSetting["scope.userLocation"]||t.setStorageSync("refuseLocation",!0)}})}})},getGeocoderCity:function(t,e){var o=this;(0,r.getGeocoder)({lat:t,long:e}).then((function(t){var e=t.data.address_component;o.addressInfo=e?e.city.slice(0,4):"选择地址",o.addressInfos=e?(e.city+e.district).slice(0,7):"选择地址"}))},goLink:function(){var t=this.dataConfig.linkConfig.value;this.$util.JumpPath(t)},chooseLocation:function(){var e=this,o=this;0==o.storeVal?t.navigateTo({url:"/pages/store/store_list/index?type=1&isCollage=1"}):t.chooseLocation({success:function(t){var a=o.$util.addressInfo(t.address);e.addressInfo=a?a.city.slice(0,4):"选择地址",e.addressInfos=a?(a.city+a.district).slice(0,7):"选择地址",o.location={latitude:t.latitude,longitude:t.longitude}},fail:function(t){}})},getnearbyStore:function(t){var e=this;(0,s.getnearbyStore)(t).then((function(t){e.SET_NEARBY(t.data.info.id),e.storeName=t.data.info.name}))}})};e.default=d}).call(this,o("543d")["default"],o("bc2e")["default"])}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'pages/index/components/headerSerch-create-component',
  4. {
  5. 'pages/index/components/headerSerch-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("3fb6"))
  7. })
  8. },
  9. [['pages/index/components/headerSerch-create-component']]
  10. ]);