1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"1a6a":function(e,t,n){"use strict";n.r(t);var a=n("c15a"),o=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t["default"]=o.a},a239:function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a}));var o=function(){var e=this,t=e.$createElement;e._self._c},i=[]},b901:function(e,t,n){"use strict";(function(e){n("2d0a");a(n("66fd"));var t=a(n("d837"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},c15a:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("a34a")),o=n("2f62");function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t,n,a,o,i,r){try{var s=e[i](r),c=s.value}catch(p){return void n(p)}s.done?t(c):Promise.resolve(c).then(a,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function r(e){p(i,a,o,r,s,"next",e)}function s(e){p(i,a,o,r,s,"throw",e)}r(void 0)}))}}var d=function(){n.e("components/page-component/index/app-index").then(function(){return resolve(n("8721"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("components/page-component/index/app-diy-page").then(function(){return resolve(n("1fa3"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/page-component/app-buy-prompt/app-buy-prompt").then(function(){return resolve(n("fad1"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/page-component/app-my-app/app-my-app").then(function(){return resolve(n("8a41"))}.bind(null,n)).catch(n.oe)},g=function(){Promise.all([n.e("common/vendor"),n.e("components/page-component/app-attr/app-attr")]).then(function(){return resolve(n("8b0c"))}.bind(null,n)).catch(n.oe)},m=function(){n.e("components/page-component/index/app-nav-bar").then(function(){return resolve(n("07f2"))}.bind(null,n)).catch(n.oe)},v={name:"index",components:{appIndex:d,"app-diy-page":l,appBuyPrompt:h,appMyApp:f,appAttr:g,appNavBar:m},data:function(){return{diy__app_nav_bar:{},homePages:{},type:"",is_storage:!1,haveBackground:!0,destroy:!0,pageHide:!1,is_required:!0,coupon_req:!1,page_id:0,attrGoods:{goods:{},attrShow:0},isShowAttention:!1}},onShow:function(){this.pageHide=!1},onHide:function(){this.pageHide=!0},onLoad:function(e){console.log(o.mapGetters),this.$commonLoad.onload(e),this.load(e),wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]});var t=wx.getUpdateManager();t&&(t.onCheckForUpdate((function(e){})),t.onUpdateReady((function(){wx.showModal({title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function(e){e.confirm&&t.applyUpdate()}})})))},onPageScroll:function(e){this.$store.dispatch("page/actionSetScrollTop",e.scrollTop)},methods:{loadMall:function(){var e=this;return u(a.default.mark((function t(){var n,o,i,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$request({url:e.$api.index.tplIndex,data:{page_id:0},method:"get"});case 2:n=t.sent,o=n.code,i=n.data,e.$hideLoading(),0===o&&(e.is_storage=!1,e.$popupAd.show=null,e.type=i.type,r=e,e.is_required=!0,"diy"===e.type&&(e.coupon_req=!0,e.homePages={}),e.$nextTick((function(){e.homePages=i.home_pages,e.homePages.navs&&r.homePages.navs.length>0&&e.homePages.navs.forEach((function(e,t){e.template.data.forEach((function(e,t){"background"===e.id&&(r.haveBackground=!1),"app-nav-bar"===e.id&&(r.diy__app_nav_bar=e.data)}))}))})),e.$storage.setStorageSync("INDEX_MALL",i));case 6:case"end":return t.stop()}}),t)})))()},loadDiy:function(){var e=this;return u(a.default.mark((function t(){var n,o,i,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$request({url:e.$api.index.tplIndex,data:{page_id:e.page_id},method:"get"});case 2:n=t.sent,o=n.code,i=n.data,e.$hideLoading(),0===o&&(e.is_storage=!1,e.$popupAd.show=null,e.homePages=i.home_pages,e.type=i.type,r=e,e.homePages.navs&&r.homePages.navs.length>0&&e.homePages.navs.forEach((function(e,t){e.template.data.forEach((function(e,t){"background"===e.id&&(r.haveBackground=!1),"app-nav-bar"===e.id&&(r.diy__app_nav_bar=e.data)}))})));case 6:case"end":return t.stop()}}),t)})))()},delHistory:function(){},share:function(e){var t;"undefined"!==typeof e.params&&(t=JSON.parse(e.params),this.$jump({url:t.path+"?"+this.$utils.objectToUrlParams(t),open_type:"navigate"}))},qrcode:function(e){var t=this;this.$request({url:this.$api.default.qrcode_parameter,data:{token:e.scene}}).then((function(e){if(0===e.code){t.$store.dispatch("page/actionSetQeury",null);var n=e.data.detail,a=n.data,o=n.path,i="plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin"==o?"".concat(o):"/".concat(o);a&&(i+="?"+t.$utils.objectToUrlParams(a),"undefined"!==typeof a.user_id&&t.$store.dispatch("user/setTempParentId",a.user_id)),("/pages/index/index"!="/".concat(o)||"undefined"!==typeof a.page_id&&a.page_id!==t.homePages.id!==0)&&(t.delHistory(),t.$jump({url:i,open_type:"navigate"}))}})).catch((function(){}))},buyProduct:function(e){this.attrGoods.goods=e.goods,this.attrGoods.attrShow=e.attrShow},load:function(e){var t=this;if("undefined"!==typeof e.scene&&("share"===e.scene?this.share(e):this.qrcode(e)),"undefined"!==typeof e.user_id&&this.$store.dispatch("user/setTempParentId",e.user_id),this.page_id="undefined"!==typeof e.page_id?Number(e.page_id):0,0===this.page_id){var n=this.$storage.getStorageSync("INDEX_MALL");if(n&&n.time){var a=new Date(n.time.replace(/-/g,"/"));a.setMinutes(a.getMinutes()+10);var o=new Date,i=o.getTime()-a.getTime();i>=0?(this.type=n.type,this.homePages=n.home_pages,this.loadMall()):(this.type=n.type,"diy"===this.type&&(this.coupon_req=!0,this.homePages={}),this.$nextTick((function(){t.homePages=n.home_pages;var e=t;t.homePages.navs&&t.homePages.navs.length>0&&t.homePages.navs.forEach((function(t,n){t.template.data.forEach((function(t,n){"background"===t.id&&(e.haveBackground=!1),"app-nav-bar"===t.id&&(e.diy__app_nav_bar=t.data)}))}))})),this.is_required=!1)}else this.loadMall()}else this.coupon_req=!0,this.loadDiy()}},onShareAppMessage:function(){var e={path:"/pages/index/index",params:{}};return 0==this.page_id?(e.title=this.mall.setting.share_title?this.mall.setting.share_title:this.mall.name,e.imageUrl=this.mall.setting.share_pic):(e.title=this.homePages.title,e.params.page_id=this.page_id),this.$shareAppMessage(e)},computed:s(s(s(s(s({navbarStatus:function(){return-1===["windows","mac"].indexOf(this.systemInfo.platform)}},(0,o.mapGetters)("mallConfig",{tabBarNavs:"getNavBar",getTheme:"getTheme"})),(0,o.mapGetters)({userInfo:"user/info"})),(0,o.mapState)({systemInfo:function(e){return e.gConfig.systemInfo}})),(0,o.mapState)("mallConfig",{config:function(e){return e.mall.setting},mall:function(e){return e.mall}})),{},{isSign:function(){return this.$storage.getStorageSync("isSign")}}),onShareTimeline:function(){var e={},t="";return 0==this.page_id?t=this.mall.setting.share_title?this.mall.setting.share_title:this.mall.name:(t=this.homePages.title,e.page_id=this.page_id),this.$shareTimeline({title:t,query:e})}};t.default=v},d837:function(e,t,n){"use strict";n.r(t);var a=n("a239"),o=n("1a6a");for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);var r,s=n("f0c5"),c=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],r);t["default"]=c.exports}},[["b901","common/runtime","common/vendor"]]]);
|