1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/composition/index/index"],{2789:function(t,o,i){},"608f":function(t,o,i){"use strict";i.r(o);var n=i("c647"),e=i("b6d4");for(var a in e)"default"!==a&&function(t){i.d(o,t,(function(){return e[t]}))}(a);i("d3f0");var s,r=i("f0c5"),c=Object(r["a"])(e["default"],n["b"],n["c"],!1,null,"b1a9b77c",null,!1,n["a"],s);o["default"]=c.exports},b6d4:function(t,o,i){"use strict";i.r(o);var n=i("f8b1"),e=i.n(n);for(var a in n)"default"!==a&&function(t){i.d(o,t,(function(){return n[t]}))}(a);o["default"]=e.a},c647:function(t,o,i){"use strict";var n,e=function(){var t=this,o=t.$createElement;t._self._c},a=[];i.d(o,"b",(function(){return e})),i.d(o,"c",(function(){return a})),i.d(o,"a",(function(){return n}))},cd9f:function(t,o,i){"use strict";(function(t){i("8748");n(i("66fd"));var o=n(i("608f"));function n(t){return t&&t.__esModule?t:{default:t}}t(o.default)}).call(this,i("543d")["createPage"])},d3f0:function(t,o,i){"use strict";var n=i("2789"),e=i.n(n);e.a},f8b1:function(t,o,i){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=i("2f62");function e(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,n)}return i}function a(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?e(Object(i),!0).forEach((function(o){s(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}function s(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}var r=function(){i.e("components/basic-component/app-composition/app-composition").then(function(){return resolve(i("b3bd"))}.bind(null,i)).catch(i.oe)},c={data:function(){return{about:"",list:[],detail:{},position:"static",iphone_x:!1,noMore:!1,showGoods:!1,page:2,height:0,scrollHeight:0,tabbarbool:!1,animationData:{},currentRoute:this.$platDiff.route(),activityBg:""}},components:{"app-composition":r},computed:a({},(0,n.mapState)({theme:function(t){return t.mallConfig.theme},tabBarNavs:function(t){return t.mallConfig.navbar.navs},compositionImg:function(t){return t.mallConfig.__wxapp_img.composition}})),watch:{tabBarNavs:{handler:function(){this.b()},immediate:!0}},methods:{b:function(){for(var t=this.currentRoute,o=0;o<this.tabBarNavs.length;o++)if(t.includes(this.tabBarNavs[o].url.split("?")[0]))return this.tabbarbool=!0;return this.tabbarbool=!1},show:function(o){var i=this;i.detail=o,i.showGoods=!0,i.position="fixed";var n=t.createAnimation({duration:1e3,timingFunction:"ease"});i.animation=n,n.translateY(i.height).step(),i.animationData=n.export()},close:function(){this.detail={},this.showGoods=!1,this.position="static"},toRule:function(){t.navigateTo({url:"/plugins/composition/rule/rule"})},toDetail:function(o){t.navigateTo({url:"/plugins/composition/detail/detail?composition_id="+o.id})},toGoods:function(o){t.navigateTo({url:"/pages/goods/goods?id="+o})},toSearch:function(){t.navigateTo({url:"/plugins/composition/search/search"})},getSetting:function(){var o=this;o.$showLoading({type:"global",text:"加载中..."}),o.$request({url:o.$api.composition.config}).then((function(i){0==i.code?(o.getList(),o.activityBg=i.data.activityBg):(o.$hideLoading(),t.showToast({title:i.msg,icon:"none",duration:1e3}))})).catch((function(t){o.$hideLoading()}))},getList:function(){var o=this;o.$request({url:o.$api.composition.index}).then((function(i){if(o.$hideLoading(),0==i.code){for(var n in o.list=i.data.list,o.list.length<5&&(o.noMore=!0),o.list)for(var e in o.list[n].choose=!1,o.list[n].goods_list)o.list[n].goods_list[e].choose_attr=null,2==o.list[n].type&&(o.list[n].host_list[0].choose_attr=null,o.list[n].host_list[0].opacity=1,o.list[n].goods_list[e].choose_goods=!1,o.list[n].host_list[0].choose_goods=!1);t.setStorage({key:"composition",data:o.list})}else o.$hideLoading(),t.showToast({title:i.msg,icon:"none",duration:1e3})})).catch((function(t){o.$hideLoading()}))},getMore:function(){var o=this,i=this;t.showLoading({title:"加载中"}),i.$request({url:i.$api.composition.index,data:{page:i.page}}).then((function(n){if(t.hideLoading(),0==n.code){if(0==n.data.list.length)return o.noMore=!0,!1;i.page++;var e=n.data.list;for(var a in e)for(var s in e[a].choose=!1,e[a].goods_list)e[a].goods_list[s].choose_attr=null,2==e[a].type&&(e[a].host_list[0].choose_attr=null,e[a].host_list[0].opacity=1,e[a].goods_list[s].choose_goods=!1,e[a].host_list[0].choose_goods=!1);i.list=i.list.concat(e),t.setStorage({key:"composition",data:i.list})}else t.hideLoading(),t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(t){i.$hideLoading()}))}},onLoad:function(o){var i=this;t.getSystemInfo({success:function(t){console.log(t),i.height=-t.screenHeight,(t.model.indexOf("iPhone X")>-1||t.model.indexOf("iPhone 11")>-1||t.model.indexOf("iPhone11")>-1||t.model.indexOf("iPhone12")>-1||t.model.indexOf("Unknown Device")>-1)&&(i.iphone_x=!0)}}),i.getSetting()},onReachBottom:function(){this.noMore||this.getMore()}};o.default=c}).call(this,i("543d")["default"])}},[["cd9f","common/runtime","common/vendor"]]]);
|