homeComb.js 4.9 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/components/homeComb"],{"1e23":function(t,e,i){"use strict";i.r(e);var o=i("773f"),a=i("4aea");for(var n in a)["default"].indexOf(n)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(n);i("dd87");var r=i("f0c5"),s=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"904e290c",null,!1,o["a"],void 0);e["default"]=s.exports},"4aea":function(t,e,i){"use strict";i.r(e);var o=i("ea3d"),a=i.n(o);for(var n in o)["default"].indexOf(n)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(n);e["default"]=a.a},"773f":function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,i=(t._self._c,t.hotWords.length>0&&t.hotWordShow),o=-99==t.tabId?t.imgUrls.length:null;t._isMounted||(t.e0=function(e){t.isCategory=!1}),t.$mp.data=Object.assign({},{$root:{g0:i,g1:o}})},a=[]},ba9b:function(t,e,i){},dd87:function(t,e,i){"use strict";var o=i("ba9b"),a=i.n(o);a.a},ea3d:function(t,e,i){"use strict";(function(t){var o=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=o(i("448a")),n=i("f8b7"),r=i("3c98"),s=t.getSystemInfoSync().statusBarHeight,c={name:"homeComb",props:{dataConfig:{type:Object,default:function(){}},isFixed:{type:Boolean,default:!1},isScrolled:{type:Boolean,default:!1},isScale:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},special:{type:Number,default:0}},data:function(){return{statusBarHeight:s,autoplay:!0,interval:1e3*this.dataConfig.numConfig.val||2500,duration:500,marTop:0,logoConfig:this.dataConfig.logoConfig.url,hotWords:this.dataConfig.hotWords.list||[],tabClick:0,isLeft:0,isWidth:0,mainWidth:0,tabLeft:0,tabTitle:[],isTop:0,navHeight:38,homeTop:s,indicatorDots:!1,circular:!0,intervals:3e3,imgUrls:[],imageH:310,swiperCur:0,searchVal:"",bgColor:this.dataConfig.swiperConfig.list&&this.dataConfig.swiperConfig.list[0]["img"],tabId:-99,isCategory:!1,classColor:this.dataConfig.classColor.color[0].item,txtColor:this.dataConfig.txtColor.color[0].item,hotWordShow:!1,bgColorLeft:this.dataConfig.bgColor.color[0].item,bgColorRight:this.dataConfig.bgColor.color[1].item}},watch:{imageH:function(t,e){this.imageH=t}},created:function(){var e=this;t.getSystemInfo({success:function(t){e.mainWidth=t.windowWidth,e.isWidth=(t.windowWidth-65)/8}});var i=t.createSelectorQuery().in(e);e.$nextTick((function(){i.select(".navTabBox").boundingClientRect((function(t){e.navHeight=t.height>42?t.height:42})).exec()})),e.isTop=this.statusBarHeight+43+"px",e.imgUrls=e.dataConfig.swiperConfig.list,e.getAllCategory()},mounted:function(){var e=this,i=this;i.hotWords.forEach((function(t){t.val&&(e.hotWordShow=!0)})),t.setStorageSync("hotList",i.hotWords),setTimeout((function(){var o=t.createSelectorQuery().in(e).select(".mp-header");o.boundingClientRect((function(t){i.marTop=t.height})).exec()}),100),i.$nextTick((function(){t.getImageInfo({src:i.setDomain(i.imgUrls[0].img),success:function(t){i.$set(i,"imageH",t.height)},fail:function(t){i.$set(i,"imageH",310)}});var e=t.createSelectorQuery().in(this);e.select("#home").boundingClientRect((function(t){})).exec()}))},methods:{setCategory:function(e){e.unshift({id:-99,cate_name:"首页"}),this.tabTitle=e,this.isTop=t.getSystemInfoSync().statusBarHeight+43+"px"},getCategory:function(){var e=this;(0,n.getCategoryList)().then((function(i){var o=i.data,n=(0,a.default)(o);o.unshift({id:-99,cate_name:"首页"}),t.setStorageSync("category",JSON.stringify(n)),e.tabTitle=o}))},getAllCategory:function(){var e=this,i=t.getStorageSync("category");i?(0,r.getCategoryVersion)().then((function(o){var a=t.getStorageSync("categoryVersion");o.data.version===a?e.setCategory(JSON.parse(i)):(t.setStorageSync("categoryVersion",o.data.version),e.getCategory())})):this.getCategory()},goDetail:function(t){var e=t.info[1].value;this.$util.JumpPath(e)},setDomain:function(t){return t=t?t.toString():"",t.indexOf("https://")>-1?t:t.replace("http://","https://")},swiperChange:function(t){var e=t.detail,i=(e.current,e.source);"autoplay"!==i&&"touch"!==i||(this.swiperCur=t.detail.current,this.bgColor=this.imgUrls[t.detail.current]["img"])},textChange:function(t){var e=t.detail,i=(e.current,e.source);"autoplay"!==i&&"touch"!==i||(this.searchVal=this.hotWords[t.detail.current]["val"])},showCategory:function(){this.isCategory=!0},changeTab:function(t,e){this.tabClick!=e&&(this.tabClick=e,this.isLeft=e*this.isWidth+16,this.isCategory=!1,this.tabId=t.id,this.$emit("bindSortId",t.id))}}};e.default=c}).call(this,i("543d")["default"])}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'pages/index/components/homeComb-create-component',
  4. {
  5. 'pages/index/components/homeComb-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("1e23"))
  7. })
  8. },
  9. [['pages/index/components/homeComb-create-component']]
  10. ]);