1 line
6.1 KiB
JavaScript
1 line
6.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-590e5fba"],{2502:function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{style:{backgroundColor:t.info.main_color},attrs:{id:"othersPage"}},[i("c-title",{attrs:{hide:!1,text:t.info.title?t.info.title:"专题页"}}),t.info.banner?i("div",{staticClass:"banner"},[i("img",{attrs:{src:t.info.banner,alt:""}})]):t._e(),i("div",{staticClass:"listBox"},t._l(t.list,(function(e,o){return i("div",{key:o,staticClass:"lis",on:{click:function(i){return t.toGoods(e.id)}}},[i("div",{staticClass:"image"},[i("img",{attrs:{src:e.thumb,alt:""}})]),i("div",{staticClass:"bottom"},[i("div",{staticClass:"title"},[t._v(t._s(e.title))]),i("div",{staticClass:"bottom_main"},[i("div",{staticClass:"price"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.price))]),t._m(0,!0)])])])})),0)],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"buyBtn"},[i("i",{staticClass:"iconfont icon-gaiicon-"})])}],n=(i("e7e5"),i("d399")),s=(i("99af"),i("ac0d")),l={mixins:[s["a"]],data:function(){return{list:[],topic_id:"",info:[],isLoadMore:!0,page:1,total_page:0}},activated:function(){window.scrollTo(0,0),this.$route.params.id&&(this.topic_id=this.$route.params.id,this.getinfo(),this.getData())},methods:{init:function(){this.isLoadMore=!0,this.page=1,this.total_page=1,this.list=[]},toGoods:function(t){this.$router.push(this.fun.getUrl("goods",{id:t}))},getinfo:function(){var t=this,e="plugin.project-template.frontend.topic.getTopicByTopicId";$http.get(e,{topic_id:this.topic_id},"生成中").then((function(e){1===e.result?(t.info=e.data,t.fun.setWXTitle(t.info.title?t.info.title:"专题页")):t.$dialog.alert({message:e.msg})})).catch((function(t){}))},getData:function(){var t=this,e="plugin.project-template.frontend.topic.getTopicGoodsByTopicId";$http.get(e,{page:this.page,topic_id:this.topic_id},"生成中").then((function(e){1===e.result?(t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0),t.list=e.data.data):t.$dialog.alert({message:e.msg})})).catch((function(t){}))},getMoreData:function(){var t=this,e="plugin.project-template.frontend.topic.getTopicGoodsByTopicId";this.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.get(e,{page:this.page,topic_id:this.topic_id},"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var i=e.data.data;t.list=t.list.concat(i)}else t.page=t.page-1,t.isLoadMore=!1}),(function(t){Object(n["a"])(t.msg)})).catch((function(t){})))}}},c=l,r=(i("ef490"),i("2877")),d=Object(r["a"])(c,o,a,!1,null,"3b2bc0c0",null);e["default"]=d.exports},"8fe1e":function(t,e,i){var o=i("9568");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var a=i("499e").default;a("63b67bac",o,!0,{sourceMap:!1,shadowMode:!1})},9568:function(t,e,i){var o=i("24fb");e=o(!1),e.push([t.i,"#othersPage[data-v-3b2bc0c0]{min-height:100vh}.banner[data-v-3b2bc0c0]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.banner img[data-v-3b2bc0c0]{width:100%;height:auto}.listBox[data-v-3b2bc0c0]{padding:.94rem .94rem 1.5rem .94rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.listBox[data-v-3b2bc0c0],.listBox .lis[data-v-3b2bc0c0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.listBox .lis[data-v-3b2bc0c0]{margin-bottom:.625rem;background:#fff;padding-bottom:1rem;width:10.47rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;border-radius:.31rem}.listBox .lis .image[data-v-3b2bc0c0]{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:10.47rem;border-radius:.31rem .31rem 0 0}.listBox .lis .image img[data-v-3b2bc0c0]{width:100%;height:100%;border-radius:.31rem .31rem 0 0}.listBox .lis .bottom[data-v-3b2bc0c0]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding:.63rem .28rem 0 .53rem;overflow:hidden}.listBox .lis .bottom .title[data-v-3b2bc0c0]{text-align:left;font-size:.81rem;font-weight:700;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:.59rem}.listBox .lis .bottom .bottom_main[data-v-3b2bc0c0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center}.listBox .lis .bottom .bottom_main .price[data-v-3b2bc0c0]{font-size:.85rem;color:#ff464c;line-height:26px}.listBox .lis .bottom .bottom_main .buyBtn[data-v-3b2bc0c0]{border-radius:100%;width:26px;height:26px;border:.5px solid #ff2c29;color:#ff2c29;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.listBox .lis .bottom .bottom_main .buyBtn .iconfont[data-v-3b2bc0c0]{font-size:12px;font-weight:400}",""]),t.exports=e},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var o=document.documentElement,a=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return o&&o.scrollTop?t=o.scrollTop:a&&(t=a.scrollTop),t},getClientHeight:function(){var t=0;return t=a.clientHeight&&o.clientHeight?Math.min(a.clientHeight,o.clientHeight):Math.max(a.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(a.scrollHeight,o.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},ef490:function(t,e,i){"use strict";i("8fe1e")}}]); |