12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8b6adf18"],{"195d":function(t,e,s){"use strict";s.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wrap"},[n("div",{staticClass:"top"},[t._v("\n\t\t首页\n\t\t"),n("img",{staticClass:"top-icon",attrs:{src:s("f212")}}),n("span",{staticClass:"top-name"},[t._v(t._s(t.info.title))]),n("ul",{staticClass:"tab-list"},t._l(t.secondIndexMenu,(function(e,s){return n("li",{key:s,class:{active:t.secondIndexMenuIndex==s},on:{click:function(e){return t.checked(s)}}},[n("a",{attrs:{href:"javascript:void(0)"}},[t._v(t._s(e.title))])])})),0)]),n("div",{staticClass:"container"},[n("p",{staticClass:"label"},[t._v("精选好物")]),n("ul",{staticClass:"list"},[t._l(t.list,(function(e,s){return n("li",{key:s,on:{click:function(s){return t.productDetails(e.goods_id)}}},[n("div",{staticClass:"product-item-column2"},[n("div",{staticClass:"img-box"},[n("img",{staticClass:"product-item-column2-img",attrs:{src:e.cover}})]),n("div",{staticClass:"product-item-column2-bottom"},[n("div",{staticClass:"product-item-column-name2"},[t._v(t._s(e.name))]),n("div",{staticClass:"product-item-column2-row-between"},[n("div",{staticClass:"product-item-column2-price"},[t._v("\n\t\t\t\t\t\t\t\t¥"+t._s(e.low_price)+"\n\t\t\t\t\t\t\t\t"),n("span",[t._v("¥"+t._s(e.max_price))])])])])])])})),0==t.list.length?n("div",{staticClass:"normal-box"},[n("img",{attrs:{src:s("9748")}}),t._v("\n\t\t\t\t暂无精选好物\n\t\t\t")]):t._e()],2),n("p",{staticClass:"label"},[t._v("精选搭配")]),n("ul",{staticClass:"collocation-list"},[t._l(t.recommendGoods,(function(e,s){return n("li",{key:s,on:{click:function(s){return t.productDetails(e.goods_id)}}},[n("div",{staticClass:"collocation-row-between"},[n("p",{staticClass:"product-name"},[t._v(t._s(e.name))]),n("button",{staticClass:"btn",attrs:{type:"button"}},[t._v("查看")])]),n("p",{staticClass:"product-msg"},[t._v(t._s(e.desc))]),n("div",{staticClass:"img-wrap"},[n("img",{staticStyle:{width:"100%"},attrs:{src:e.cover}})]),n("p",{staticClass:"collocation-msg"},[t._v("¥"+t._s(e.low_price))])])})),0==t.recommendGoods.length?n("div",{staticClass:"normal-box"},[n("img",{attrs:{src:s("9748")}}),t._v("\n\t\t\t\t暂无精选搭配\n\t\t\t")]):t._e()],2)])])},i=[],a=s("75fc"),c=s("67cf"),o=s("ca00"),r={components:{},data:function(){return{tabId:0,tabList:[{title:"养心"},{title:"养肝"},{title:"养脾"},{title:"养肺"},{title:"养肾"}],buy:!1,isOpen:!1,info:{id:0,title:""},secondIndexMenu:[],secondIndexMenuIndex:0,list:[],page:1,page_num:20,recommendGoods:[]}},mounted:function(){var t=this,e=this.$route.query;this.info.id=parseInt(e.id||0),this.info.title=e.title||"",this.getSecondIndexMenu(),this.getRecommendGoods(),Object(o["a"])((function(){return t.getList()}))},methods:{getSecondIndexMenu:function(){var t=this;Object(c["mb"])({id:this.info.id}).then((function(e){var s=e.code,n=e.msg,i=e.data;1==s?(t.secondIndexMenu=i,t.page=1,i.length>0&&t.getList()):t.$message.error(n)}))},getRecommendGoods:function(){var t=this;Object(c["ib"])({first_id:this.info.id}).then((function(e){var s=e.code,n=e.msg,i=e.data;1==s?t.recommendGoods=i.list:t.$message.error(n)}))},getList:function(){var t=this,e=this.page,s=this.page_num,n={page:e,page_num:s,second_id:this.secondIndexMenu[this.secondIndexMenuIndex].id};Object(c["hb"])(n).then((function(s){var n=s.code,i=s.msg,c=s.data;if(1===n){var o=c.list;t.list=e>1?[].concat(Object(a["a"])(t.list),Object(a["a"])(o)):o,0===o.length?t.$message.info("没有更多数据了"):t.page=t.page+1}else t.$message.error(i)}))},active:function(t){this.active=t},checked:function(t){this.secondIndexMenuIndex=t,this.page=1,this.getList()},productDetails:function(t){this.$router.push("/index/product-details?id=".concat(t))}}},d=r,l=(s("607e"),s("2877")),u=Object(l["a"])(d,n,i,!1,null,"e6f4e64e",null);e["default"]=u.exports},"607e":function(t,e,s){"use strict";s("72e7")},"72e7":function(t,e,s){},"75fc":function(t,e,s){"use strict";s.d(e,"a",(function(){return l}));var n=s("a745"),i=s.n(n),a=s("db2a");function c(t){if(i()(t))return Object(a["a"])(t)}var o=s("3953"),r=s("e630");function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){return c(t)||Object(o["a"])(t)||Object(r["a"])(t)||d()}},9748:function(t,e,s){t.exports=s.p+"img/normal-4.220b345f.png"},f212:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABLElEQVQoU5VRPUsDQRB9c+HYtYySxsof4Edpc8pxgd27zv/hTxDUQlQUJREEC/0FaQQV7o6UHqkNBGyNpRzcERuLnZUVDQZsfDBTzLxh3swjrfWGMea92WwOe72eCcNQSikVgGGapi8ALL5BcRyH1tpDF2VZZq7earW2AGwz826e548A2NXJJaXUsud5Z8x8L4S4kVJ+1HW9TkTHALpZlt0CMF9khziOl6y1rjkyxlwEQTAZDAYrAI6IKB2Px1dTshtot9sLvu/vAZhj5p08z9+iKFr0fb8L4HmGrLWeJ6L9P8iXbuOMDADnzPzEzB0noyiKVc/zTonobipDa71GRCfM/CCEuHYHVlUVNBqNA2ttZ3rgv16nlNpk5smPKUmSCGNMxMyjfr//+tuUT1yrpMaVZ6gIAAAAAElFTkSuQmCC"}}]);
- //# sourceMappingURL=chunk-8b6adf18.4cff26e2.js.map
|