index.js 9.3 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/annex/special/index"],{"1f21":function(e,n,t){"use strict";t.r(n);var o=t("ef8a"),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},"734c":function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("4789");o(t("66fd"));var i=o(t("aa54"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"81aa":function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){}));var o=function(){var e=this.$createElement,n=(this._self._c,this.pageShow?this.tempArr.length&&"promotionList"==this.styleConfig[this.styleConfig.length-1].name:null);this.$mp.data=Object.assign({},{$root:{g0:n}})},i=[]},aa54:function(e,n,t){"use strict";t.r(n);var o=t("81aa"),i=t("1f21");for(var a in i)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(a);t("ecef");var c=t("f0c5"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=r.exports},d38f:function(e,n,t){},ecef:function(e,n,t){"use strict";var o=t("d38f"),i=t.n(o);i.a},ef8a:function(e,n,t){"use strict";(function(e,o){var i=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,c=i(t("9523")),r=t("5743"),s=t("4e39"),u=t("4cfb"),l=t("26cb"),d=t("2a39"),g=t("6557"),f=t("86eb"),h=(getApp(),a={computed:(0,l.mapGetters)(["isLogin","uid"]),components:{pageFooter:function(){Promise.all([t.e("common/vendor"),t.e("components/pageFooter/index")]).then(function(){return resolve(t("605d"))}.bind(null,t)).catch(t.oe)},couponWindow:function(){Promise.all([t.e("common/vendor"),t.e("components/couponWindow/index")]).then(function(){return resolve(t("64ec"))}.bind(null,t)).catch(t.oe)},authorize:function(){t.e("components/Authorize").then(function(){return resolve(t("ad23"))}.bind(null,t)).catch(t.oe)},activeParty:function(){t.e("pages/index/diy/components/activeParty").then(function(){return resolve(t("6c66"))}.bind(null,t)).catch(t.oe)},headerSerch:function(){t.e("pages/index/diy/components/headerSerch").then(function(){return resolve(t("06b7"))}.bind(null,t)).catch(t.oe)},swipers:function(){t.e("pages/index/diy/components/swipers").then(function(){return resolve(t("b51c"))}.bind(null,t)).catch(t.oe)},coupon:function(){t.e("pages/index/diy/components/coupon").then(function(){return resolve(t("b567"))}.bind(null,t)).catch(t.oe)},articleList:function(){t.e("pages/index/diy/components/articleList").then(function(){return resolve(t("af5c"))}.bind(null,t)).catch(t.oe)},bargain:function(){Promise.all([t.e("common/vendor"),t.e("pages/index/diy/components/bargain")]).then(function(){return resolve(t("d722"))}.bind(null,t)).catch(t.oe)},blankPage:function(){t.e("pages/index/diy/components/blankPage").then(function(){return resolve(t("304b"))}.bind(null,t)).catch(t.oe)},combination:function(){Promise.all([t.e("common/vendor"),t.e("pages/index/diy/components/combination")]).then(function(){return resolve(t("279f"))}.bind(null,t)).catch(t.oe)},customerService:function(){Promise.all([t.e("common/vendor"),t.e("pages/index/diy/components/customerService")]).then(function(){return resolve(t("5229"))}.bind(null,t)).catch(t.oe)},goodList:function(){t.e("pages/index/diy/components/goodList").then(function(){return resolve(t("ab66"))}.bind(null,t)).catch(t.oe)},guide:function(){t.e("pages/index/diy/components/guide").then(function(){return resolve(t("6e93"))}.bind(null,t)).catch(t.oe)},liveBroadcast:function(){t.e("pages/index/diy/components/liveBroadcast").then(function(){return resolve(t("99d3"))}.bind(null,t)).catch(t.oe)},menus:function(){t.e("pages/index/diy/components/menus").then(function(){return resolve(t("7e46"))}.bind(null,t)).catch(t.oe)},news:function(){t.e("pages/index/diy/components/news").then(function(){return resolve(t("947e"))}.bind(null,t)).catch(t.oe)},promotionList:function(){t.e("pages/index/diy/components/promotionList").then(function(){return resolve(t("024a"))}.bind(null,t)).catch(t.oe)},richText:function(){t.e("pages/index/diy/components/richText").then(function(){return resolve(t("12d9"))}.bind(null,t)).catch(t.oe)},seckill:function(){Promise.all([t.e("common/vendor"),t.e("pages/index/diy/components/seckill")]).then(function(){return resolve(t("2908"))}.bind(null,t)).catch(t.oe)},swiperBg:function(){t.e("pages/index/diy/components/swiperBg").then(function(){return resolve(t("bc65"))}.bind(null,t)).catch(t.oe)},tabNav:function(){t.e("pages/index/diy/components/tabNav").then(function(){return resolve(t("2515"))}.bind(null,t)).catch(t.oe)},titles:function(){t.e("pages/index/diy/components/titles").then(function(){return resolve(t("5781"))}.bind(null,t)).catch(t.oe)},pictureCube:function(){t.e("pages/index/diy/components/pictureCube").then(function(){return resolve(t("2b59"))}.bind(null,t)).catch(t.oe)}}},(0,c.default)(a,"computed",(0,l.mapGetters)(["isLogin"])),(0,c.default)(a,"data",(function(){return{styleConfig:[],tempArr:[],goodType:3,loading:!1,loadend:!1,loadTitle:this.$t("加载更多"),page:1,limit:this.$config.LIMIT,iSshowH:!1,numConfig:0,code:"",isCouponShow:!1,couponObj:{},couponObjs:{},shareInfo:{},footConfig:{},pageId:"",sortMpTop:0,newData:{},activeRouter:"",bgColor:"",bgPic:"",bgTabVal:"",pageShow:!0,windowHeight:0}})),(0,c.default)(a,"onLoad",(function(n){var t=this,o=this;this.$nextTick((function(){e.getSystemInfo({success:function(e){o.windowHeight=e.windowHeight}})}));n.state,n.scope;if(this.pageId=n.id,n.scene){var i=o.$util.getUrlParams(decodeURIComponent(n.scene));this.pageId=i.id}e.setNavigationBarTitle({title:this.$t("专题栏")}),e.getLocation({type:"wgs84",success:function(n){try{e.setStorageSync("user_latitude",n.latitude),e.setStorageSync("user_longitude",n.longitude)}catch(t){}}}),this.diyData(),this.getIndexData(),this.getTempIds(),(0,s.getShare)().then((function(e){t.shareInfo=e.data}));var a=getCurrentPages(),c=a[a.length-1].route;this.activeRouter="/"+c+"?id="+this.pageId})),(0,c.default)(a,"watch",{isLogin:{deep:!0,handler:function(n,t){var o=(new Date).toLocaleDateString();if(n){try{var i=e.getStorageSync("oldDate")||""}catch(a){}i!=o&&this.getCoupon()}}}}),(0,c.default)(a,"mounted",(function(){var n=(new Date).toLocaleDateString();if(this.isLogin){try{var t=e.getStorageSync("oldDate")||""}catch(i){}t!=n&&this.getCoupon();var o=e.getStorageSync("oldUser")||0;o||this.getCouponOnce()}})),(0,c.default)(a,"methods",{goRouter:function(n){var t=getCurrentPages(),o=t[t.length-1].$page.fullPath;n.link!=o&&e.switchTab({url:n.link,fail:function(t){e.redirectTo({url:n.link})}})},getCouponOnce:function(){var e=this;(0,r.getCouponNewUser)().then((function(n){e.couponObjs=n.data}))},couponCloses:function(){this.couponObjs.show=!1;try{e.setStorageSync("oldUser",1)}catch(n){}},getCoupon:function(){var e=this;(0,r.getCouponV2)().then((function(n){e.couponObj=n.data,n.data.list.length>0&&(e.isCouponShow=!0)}))},couponClose:function(){this.isCouponShow=!1;try{e.setStorageSync("oldDate",(new Date).toLocaleDateString())}catch(n){}},onLoadFun:function(){},getTempIds:function(){var e=o.getStorageSync(u.SUBSCRIBE_MESSAGE);e||(0,r.getTempIds)().then((function(e){e.data&&o.setStorageSync(u.SUBSCRIBE_MESSAGE,JSON.stringify(e.data))}))},objToArr:function(e){if(e){var n=Object.keys(e);n.sort((function(e,n){return e-n}));var t=n.map((function(n){return e[n]}));return t}},diyData:function(){var n=this,t=this;(0,r.getDiy)(this.pageId).then((function(o){var i=o.data;if(0==o.data.length)return n.$util.Tips({title:n.$t("暂无数据")},{tab:3});i.is_bg_color&&(n.bgColor=i.color_picker),i.is_bg_pic&&(n.bgPic=i.bg_pic,n.bgTabVal=i.bg_tab_val),n.pageShow=i.is_show,e.setNavigationBarTitle({title:o.data.title});var a=[],c=t.objToArr(o.data.value);c.forEach((function(o,i,c){"pageFoot"==o.name&&(e.setStorageSync("pageFoot",o),t.$store.commit("FOOT_UPLOAD",o),c.splice(i,1),n.newData=o),"promotionList"==o.name&&(t.numConfig=o.numConfig.val,t.getGroomList()),a=c})),t.styleConfig=a}))},getIndexData:function(){},changeBarg:function(n){this.isLogin?e.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(n.id,"&bargain=").concat(this.uid)}):(0,f.toLogin)()},changeTab:function(e){this.goodType=e,this.tempArr=[],this.page=1,this.loadend=!1;this.getGroomList(!0)},getGroomList:function(e){var n=this,t=this,o=t.goodType;return!t.loadend&&(!t.loading&&(e&&t.$set(t,"iSshowH",!0),void(0,d.getGroomList)(o,{page:t.page,limit:t.limit}).then((function(e){var o=e.data;t.$set(t,"iSshowH",!1);var i=Math.ceil(n.numConfig/n.limit),a=o.list,c=a.length<t.limit||t.page>=i,r=t.$util.SplitArray(a,t.tempArr);t.$set(t,"tempArr",r.slice(0,n.numConfig)),t.loadend=c,t.loadTitle=c?t.$t("没有更多内容啦~"):t.$t("加载更多"),t.page=t.page+1,t.loading=!1})).catch((function(e){t.loading=!1,t.loadTitle=t.$t("加载更多")}))))},goDetail:function(n){(0,g.goShopDetail)(n,this.uid).then((function(t){e.navigateTo({url:"/pages/goods_details/index?id=".concat(n.id)})}))}}),(0,c.default)(a,"onReachBottom",(function(){this.getGroomList()})),(0,c.default)(a,"onShareAppMessage",(function(){return{title:this.shareInfo.title,path:"/pages/index/index",imageUrl:this.storeInfo.img}})),(0,c.default)(a,"onPageScroll",(function(n){e.$emit("scroll")})),a);n.default=h}).call(this,t("543d")["default"],t("bc2e")["default"])}},[["734c","common/runtime","common/vendor"]]]);