1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/book/index/index"],{"034b":function(t,e,n){"use strict";n.r(e);var o=n("9d20"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},"19d3":function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("bd46"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},7901:function(t,e,n){"use strict";var o=n("d627"),i=n.n(o);i.a},"9d20":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n("a34a")),i=n("2f62");function a(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e,n,o,i,a,r){try{var s=t[a](r),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(o,i)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function r(t){u(a,o,i,r,s,"next",t)}function s(t){u(a,o,i,r,s,"throw",t)}r(void 0)}))}}var l=function(){n.e("plugins/book/components/app-head-nav-list").then(function(){return resolve(n("3512"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("plugins/book/components/app-product-list").then(function(){return resolve(n("7b41"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("components/page-component/app-quick-navigation/app-quick-navigation").then(function(){return resolve(n("d475"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/page-component/app-no-goods/app-no-goods").then(function(){return resolve(n("5cd3"))}.bind(null,n)).catch(n.oe)},g={name:"index",data:function(){return{catList:[],cat_id:0,page:1,goods_list:[],page_count:1,is_show_cat:0,text:"123123123"}},onLoad:function(t){var e=this;this.$commonLoad.onload(t),this.requestCats().then((function(){t.cat_id?e.cat_id=t.cat_id:e.cat_id=e.catList[0].id,e.requestList()})),wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]})},methods:{requestCats:function(){var t=this;return d(o.default.mark((function e(){var n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$showLoading(),e.next=3,t.$request({url:t.$api.book.cats,method:"get"});case 3:n=e.sent,t.$hideLoading(),0===n.code&&(t.catList=n.data.cat,t.is_show_cat=n.data.is_show_cat);case 6:case"end":return e.stop()}}),e)})))()},requestList:function(t){var e=this;return d(o.default.mark((function n(){var i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$request({url:e.$api.book.list,data:{page:e.page,cat_id:e.cat_id}});case 2:i=n.sent,0===i.code&&(t&&(e.goods_list=[]),e.dataProcessing(i.data));case 4:case"end":return n.stop()}}),n)})))()},changeStatus:function(t){this.page=1,this.cat_id=t,this.requestList(!0)},dataProcessing:function(t){for(var e=0;e<t.list.length;e+=2)e+1!==t.list.length?this.goods_list.push([t.list[e],t.list[e+1]]):this.goods_list.push([t.list[e]]);this.page_count=t.pagination.page_count},route_go:function(e){e.video_url&&1==this.getVideo?t.navigateTo({url:"/pages/goods/video?goods_id=".concat(e.goods_id,"&sign=booking")}):t.getLocation({type:"wgs84",success:function(){t.navigateTo({url:"/plugins/book/goods/goods?goods_id=".concat(e.goods_id)})},fail:function(){t.showToast({title:"请开启位置权限",icon:"none",duration:1e3,success:function(){}})}})}},onReachBottom:function(){this.page<this.page_count&&(this.page++,this.requestList())},computed:s(s({},(0,i.mapGetters)("mallConfig",{getTheme:"getTheme"})),(0,i.mapState)({platform:function(t){return t.gConfig.systemInfo.platform}})),onShareAppMessage:function(){return this.$shareAppMessage({path:"/plugins/book/index/index",title:this.$children[0].navigationBarTitle})},onShareTimeline:function(){return this.$shareTimeline({title:this.$children[0].navigationBarTitle,query:{}})},components:{"app-head-nav-list":l,"app-product-list":f,"app-quick-navigation":p,"app-no-goods":h}};e.default=g}).call(this,n("543d")["default"])},bd46:function(t,e,n){"use strict";n.r(e);var o=n("d7ea"),i=n("034b");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("7901");var r,s=n("f0c5"),c=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"92668f8e",null,!1,o["a"],r);e["default"]=c.exports},d627:function(t,e,n){},d7ea:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=[]}},[["19d3","common/runtime","common/vendor"]]]);
|