index.js 11 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/annex/special/index"],{2291:function(t,e,n){"use strict";(function(t,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("3c98"),c=n("5679"),s=n("401c"),a=n("26cb"),r=n("f8b7"),u=n("3e4f"),l=n("8e8a"),d=n("865e"),h=(getApp(),{computed:(0,a.mapGetters)(["isLogin","uid"]),components:{Loading:function(){n.e("components/Loading/index").then(function(){return resolve(n("8989"))}.bind(null,n)).catch(n.oe)},recommend:function(){Promise.all([n.e("common/vendor"),n.e("components/recommend/index")]).then(function(){return resolve(n("b281"))}.bind(null,n)).catch(n.oe)},pageFooter:function(){Promise.all([n.e("common/vendor"),n.e("components/pageFooter/index")]).then(function(){return resolve(n("a225"))}.bind(null,n)).catch(n.oe)},couponWindow:function(){Promise.all([n.e("common/vendor"),n.e("components/couponWindow/index")]).then(function(){return resolve(n("52cb"))}.bind(null,n)).catch(n.oe)},homeComb:function(){n.e("pages/index/components/homeComb").then(function(){return resolve(n("1e23"))}.bind(null,n)).catch(n.oe)},newVip:function(){n.e("pages/index/components/newVip").then(function(){return resolve(n("d6e1"))}.bind(null,n)).catch(n.oe)},userInfor:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/userInfor")]).then(function(){return resolve(n("1d4b"))}.bind(null,n)).catch(n.oe)},shortVideo:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/shortVideo")]).then(function(){return resolve(n("240c"))}.bind(null,n)).catch(n.oe)},activeParty:function(){n.e("pages/index/components/activeParty").then(function(){return resolve(n("e602"))}.bind(null,n)).catch(n.oe)},headerSerch:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/headerSerch")]).then(function(){return resolve(n("3fb6"))}.bind(null,n)).catch(n.oe)},swipers:function(){n.e("pages/index/components/swipers").then(function(){return resolve(n("f6e6"))}.bind(null,n)).catch(n.oe)},coupon:function(){n.e("pages/index/components/coupon").then(function(){return resolve(n("7e0a"))}.bind(null,n)).catch(n.oe)},articleList:function(){n.e("pages/index/components/articleList").then(function(){return resolve(n("f019"))}.bind(null,n)).catch(n.oe)},bargain:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/bargain")]).then(function(){return resolve(n("3aa8"))}.bind(null,n)).catch(n.oe)},blankPage:function(){n.e("pages/index/components/blankPage").then(function(){return resolve(n("3b9f"))}.bind(null,n)).catch(n.oe)},combination:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/combination")]).then(function(){return resolve(n("4f31"))}.bind(null,n)).catch(n.oe)},customerService:function(){n.e("pages/index/components/customerService").then(function(){return resolve(n("835b"))}.bind(null,n)).catch(n.oe)},goodList:function(){n.e("pages/index/components/goodList").then(function(){return resolve(n("5efe"))}.bind(null,n)).catch(n.oe)},guide:function(){n.e("pages/index/components/guide").then(function(){return resolve(n("b565"))}.bind(null,n)).catch(n.oe)},liveBroadcast:function(){n.e("pages/index/components/liveBroadcast").then(function(){return resolve(n("3d1b"))}.bind(null,n)).catch(n.oe)},menus:function(){n.e("pages/index/components/menus").then(function(){return resolve(n("3822"))}.bind(null,n)).catch(n.oe)},news:function(){n.e("pages/index/components/news").then(function(){return resolve(n("f80e"))}.bind(null,n)).catch(n.oe)},promotionList:function(){n.e("pages/index/components/promotionList").then(function(){return resolve(n("5b4e"))}.bind(null,n)).catch(n.oe)},richText:function(){n.e("pages/index/components/richText").then(function(){return resolve(n("2640"))}.bind(null,n)).catch(n.oe)},seckill:function(){Promise.all([n.e("common/vendor"),n.e("pages/index/components/seckill")]).then(function(){return resolve(n("2904"))}.bind(null,n)).catch(n.oe)},swiperBg:function(){n.e("pages/index/components/swiperBg").then(function(){return resolve(n("8cbf"))}.bind(null,n)).catch(n.oe)},tabNav:function(){n.e("pages/index/components/tabNav").then(function(){return resolve(n("f75f"))}.bind(null,n)).catch(n.oe)},titles:function(){n.e("pages/index/components/titles").then(function(){return resolve(n("289f"))}.bind(null,n)).catch(n.oe)},pictureCube:function(){n.e("pages/index/components/pictureCube").then(function(){return resolve(n("3f66"))}.bind(null,n)).catch(n.oe)}},data:function(){return{styleConfig:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:this.$config.LIMIT,numConfig:0,code:"",isCouponShow:!1,couponObj:{},couponObjs:{},shareInfo:{},footConfig:{},pageId:"",sortMpTop:0,bgColor:"",bgPic:"",bgTabVal:"",pageShow:!0,windowHeight:0,isShowAuth:!1,isScrolled:!1,sortList:"",sortAll:[],isSortType:0,hostProduct:[],hotScroll:!1,hotPage:1,hotLimit:10,curSort:0,loaded:!1,goodPage:1,goodList:[],sid:0,imgHost:d.HTTP_REQUEST_URL}},onLoad:function(e){var n=this,o=this;this.$nextTick((function(){t.getSystemInfo({success:function(t){o.windowHeight=t.windowHeight}})}));e.state,e.scope;if(this.pageId=e.id,e.scene){var i=o.$util.getUrlParams(decodeURIComponent(e.scene));this.pageId=i.id}t.setNavigationBarTitle({title:"专题栏"}),this.diyData(),this.getIndexData(),this.getTemlIds(),(0,c.getShare)().then((function(t){n.shareInfo=t.data}))},onUnload:function(){t.$off("activeFn")},watch:{isLogin:{deep:!0,handler:function(e,n){var o=(new Date).toLocaleDateString();if(e){try{var i=t.getStorageSync("oldDate")||""}catch(c){}i!=o&&this.getCoupon()}}}},onShow:function(){t.removeStorageSync("form_type_cart");var e=(new Date).toLocaleDateString();if(this.isLogin){try{var n=t.getStorageSync("oldDate")||""}catch(i){}n!=e&&this.getCoupon();var o=t.getStorageSync("oldUser")||0;o||this.getCouponOnce()}},mounted:function(){},methods:{changeSort:function(t,e){this.curSort!=e&&(this.curSort=e,this.sid=t.id,this.goodList=[],this.goodPage=1,this.loaded=!1,this.getGoodsList())},bindSortId:function(t){this.isSortType=-99==t?0:1,this.getProductList(t),0==this.hostProduct.length&&this.get_host_product()},getProductList:function(t){var e=this;this.curSort=0,this.loaded=!1,this.sortAll.length>0?(this.sortAll.forEach((function(n,o){n.id==t&&(e.$set(e,"sortList",n),e.sid=n.children.length?n.children[0].id:"")})),this.goodList=[],this.goodPage=1,this.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))):(0,r.getCategoryList)().then((function(n){e.sortAll=n.data,n.data.forEach((function(n,o){n.id==t&&(e.sortList=n,e.sid=n.children.length?n.children[0].id:"")})),e.goodList=[],e.goodPage=1,e.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))}))},getGoodsList:function(){var t=this;this.loading||this.loaded||(this.loading=!0,(0,r.getProductslist)({sid:this.sid,keyword:"",priceOrder:"",salesOrder:"",news:0,page:this.goodPage,limit:10,cid:this.sortList.id}).then((function(e){t.loading=!1,t.loaded=e.data.length<10,t.goodPage++,t.goodList=t.goodList.concat(e.data)})))},get_host_product:function(){var t=this;t.hotScroll||(0,r.getProductHot)(t.hotPage,t.hotLimit).then((function(e){t.hotPage++,t.hotScroll=e.data.length<t.hotLimit,t.hostProduct=t.hostProduct.concat(e.data)}))},onLoadFun:function(){this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},getCouponOnce:function(){var t=this;(0,i.getCouponNewUser)().then((function(e){t.couponObjs=e.data}))},couponCloses:function(){this.couponObjs.show=!1;try{t.setStorageSync("oldUser",1)}catch(e){}},getCoupon:function(){var t=this;(0,i.getCouponV2)().then((function(e){t.couponObj=e.data,e.data.list.length>0&&(t.isCouponShow=!0)}))},couponClose:function(){this.isCouponShow=!1;try{t.setStorageSync("oldDate",(new Date).toLocaleDateString())}catch(e){}},getTemlIds:function(){var t=o.getStorageSync(s.SUBSCRIBE_MESSAGE);t||(0,i.getTemlIds)().then((function(t){t.data&&o.setStorageSync(s.SUBSCRIBE_MESSAGE,JSON.stringify(t.data))}))},objToArr:function(t){var e=Object.keys(t);e.sort((function(t,e){return t-e}));var n=e.map((function(e){return t[e]}));return n},setDiyData:function(e){var n=this;if(0==e.length)return this.$util.Tips({title:"暂无数据"},{tab:3});e.is_bg_color&&(this.bgColor=e.color_picker),e.is_bg_pic&&(this.bgPic=e.bg_pic,this.bgTabVal=e.bg_tab_val),this.pageShow=e.is_show,t.setNavigationBarTitle({title:e.title});var o=[],i=this.objToArr(e.value);i.forEach((function(e,i,c){"pageFoot"==e.name&&(t.setStorageSync("pageFoot",e),n.$store.commit("FOOT_UPLOAD",e),c.splice(i,1)),o=c})),this.styleConfig=o},getDiyData:function(){var e=this;(0,i.getDiy)(this.pageId).then((function(n){t.setStorageSync("specialDiyData",JSON.stringify(n.data)),e.setDiyData(n.data)}))},diyData:function(){var e=this,n=t.getStorageSync("specialDiyData");n?(0,i.getDiyVersion)(this.pageId).then((function(o){var i=t.getStorageSync("specialDiyVersion");o.data.version+e.pageId===i?e.setDiyData(JSON.parse(n)):(t.setStorageSync("specialDiyVersion",o.data.version+e.pageId),e.getDiyData())})):this.getDiyData()},getIndexData:function(){},changeBarg:function(e){this.isLogin?t.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(e.id,"&spid=").concat(this.uid)}):(0,l.toLogin)()},goDetail:function(e){(0,u.goShopDetail)(e,this.uid).then((function(n){t.navigateTo({url:"/pages/goods_details/index?id=".concat(e.id)})}))}},onReachBottom:function(){},onPageScroll:function(t){t.scrollTop>10?this.isScrolled=!0:this.isScrolled=!1},onShareAppMessage:function(){return{title:this.shareInfo.title,path:"/pages/index/index",imageUrl:this.storeInfo.img}}});e.default=h}).call(this,n("543d")["default"],n("bc2e")["default"])},"671b":function(t,e,n){"use strict";n.r(e);var o=n("d164"),i=n("9bec");for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("72a0");var s=n("f0c5"),a=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=a.exports},"72a0":function(t,e,n){"use strict";var o=n("bf28"),i=n.n(o);i.a},"9bec":function(t,e,n){"use strict";n.r(e);var o=n("2291"),i=n.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);e["default"]=i.a},ac93:function(t,e,n){"use strict";(function(t,e){var o=n("4ea4");n("59a4");o(n("66fd"));var i=o(n("671b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},bf28:function(t,e,n){},d164:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.pageShow&&1==t.isSortType?t.sortList.children&&t.sortList.children.length:null),o=t.pageShow&&1==t.isSortType?t.goodList.length:null,i=t.pageShow&&1==t.isSortType?0==t.goodList.length&&t.loaded:null;t.$mp.data=Object.assign({},{$root:{g0:n,g1:o,g2:i}})},i=[]}},[["ac93","common/runtime","common/vendor"]]]);