/
home
/
henzagold
/
oldsite
/
.nuxt
/
dist
/
client
/
File Upload :
llllll
Current File: /home/henzagold/oldsite/.nuxt/dist/client/c8c160b.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{494:function(t,e,n){var content=n(513);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(37).default)("eb146584",content,!0,{sourceMap:!1})},512:function(t,e,n){"use strict";n(494)},513:function(t,e,n){var o=n(36)((function(i){return i[1]}));o.push([t.i,"html{scroll-behavior:smooth}",""]),o.locals={},t.exports=o},535:function(t,e,n){"use strict";n.r(e);var o=n(39),r=n(4),c=(n(19),n(148)),l=n(474),d=n(485),m=n(486),v=n(57),h={fetchOnServer:!0,asyncData:function(t){return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r,c,l,d,m,h,f,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.error,r=t.route,c=t.params,e.prev=1,e.next=4,v.a.get("https://henzagold.com/oapi/admin/const/__list__tags");case 4:return l=e.sent,d=r.query.limit||24,m="asc",h=parseInt(r.query.page)||1,f=[],c.id&&("id"===c.id&&r.query.tags&&"object"===Object(o.a)(f)?f=r.query.tags:f.push(c.id)),e.next=12,v.a.post("/products",{limit:d,orderBy:m,page:h,tags:f});case 12:return y=e.sent,e.abrupt("return",{list:y.rows,count:y.count,page:y.page,tags:f,tagsList:l,limit:d,orderBy:m});case 16:e.prev=16,e.t0=e.catch(1),n({statusCode:404,message:"Post not found"});case 19:case"end":return e.stop()}}),e,null,[[1,16]])})))()},layout:"MasterPage",name:"list",components:{FModal:n(480).a,Pagination:d.a,SubHeader:c.a,Product:l.a,SpinLoading:m.a},methods:{getData:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.spinning=!0,e.next=4,v.a.post("/products",{page:t.page,orderBy:t.orderBy,limit:t.limit,tags:t.tags});case 4:n=e.sent,t.list=n.rows,t.page=n.page,t.count=n.count,t.spinning=!1,o=Object.assign({},t.$route.query),t.$router.push({path:t.$route.path,query:Object.assign(o,{page:t.page,limit:t.limit,tag:t.tags})}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.log(e.t0),error({statusCode:404,message:"Post not found"});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))()},onPageChange:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getData();case 2:document.body.scrollTop=$("#productList").offset().top-150,document.documentElement.scrollTop=$("#productList").offset().top-150;case 4:case"end":return e.stop()}}),e)})))()}},data:function(){return{model:!1,showGrid:!0,spinning:!1}},computed:{myTag:function(){return this.$route.params.id?this.tagsList[this.$route.params.id]:void 0},header:function(){return this.$store.state.header}},mounted:function(){$('[data-toggle="tooltip"]').tooltip(),$(".acr-collapse-trigger").on("click",(function(){$(this).next().slideToggle(200)}))},created:function(){this.$store.dispatch("bread/set",["لیست جدیدترین محصولات"])}},f=(n(512),n(5)),component=Object(f.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("SubHeader",{attrs:{title:"جدید ترین محصولات",backgroundImage:t.header}}),t._v(" "),n("div",{staticClass:"section"},[n("div",{staticClass:"container-fluid",staticStyle:{"padding-right":"10%","padding-left":"10%"}},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-lg-12"},[n("spin-loading",{attrs:{spinning:t.spinning}}),t._v(" "),n("div",{staticClass:"acr-global-product-controls"},[n("div",{staticClass:"acr-product-active-filters"},[t.count>0?n("h6",{staticClass:"end",staticStyle:{margin:"0"},attrs:{id:"productList"}},[t._v(" "+t._s(t.count)+" محصول یافت شد ")]):t._e()]),t._v(" "),n("div",{staticClass:"acr-toggle-views d-none d-sm-block"},[n("a",{class:t.showGrid?"active":null,attrs:{"data-toggle":"tooltip",title:"نمایش به صورت شبکه ای"},on:{click:function(e){t.showGrid=!0}}},[n("i",[n("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[n("path",{attrs:{fill:"currentColor",d:"M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2M4,4V11H11V4H4M4,20H11V13H4V20M20,20V13H13V20H20M20,4H13V11H20V4Z"}})])])]),t._v(" "),n("a",{class:t.showGrid?null:"active",attrs:{"data-toggle":"tooltip",title:"نمایش به صورت لیست"},on:{click:function(e){t.showGrid=!1}}},[n("i",[n("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[n("path",{attrs:{fill:"currentColor",d:"M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z"}})])])])])]),t._v(" "),n("div",{staticClass:"row",staticStyle:{position:"relative"}},[0==t.list.length?n("div",{staticStyle:{margin:"0 auto"}},[n("img",{directives:[{name:"lazy-load",rawName:"v-lazy-load"}],attrs:{"data-src":"/static/img/nofound.svg",width:"450px",alt:t.myTag?t.myTag:"هنزاگلد | لیست جدید ترین محصولات"}}),t._v(" "),n("h4",{staticStyle:{"text-align":"center"}},[t._v("محصولی یافت نشد")])]):t._e(),t._v(" "),t._l(t.list,(function(e,o){return n("div",{key:o,class:t.showGrid?"col-xl-4 col-lg-6 col-md-6 col-sm-6":"col-md-12"},[n("product",{key:e.id,attrs:{list:!t.showGrid,product:e},model:{value:t.model,callback:function(e){t.model=e},expression:"model"}})],1)}))],2),t._v(" "),n("div",[n("pagination",{attrs:{"total-pages":Math.ceil(t.count/t.limit)},on:{pagechanged:t.onPageChange},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)],1)])])]),t._v(" "),n("fModal",{attrs:{"max-width":"500px"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n عدم دسترسی\n ")]},proxy:!0},{key:"body",fn:function(){return[n("p",{staticStyle:{"text-align":"center",margin:"30px 0"}},[t._v("برای افزودن محصول به علاقمندی ها باید ابتدا به حساب کاربری خود وارد شوید")]),t._v(" "),n("div",{staticClass:"flex",staticStyle:{"justify-content":"space-evenly"}},[n("a",{staticClass:"btn-custom primary",staticStyle:{"z-index":"0","margin-left":"14px"},attrs:{href:"/customer/login?outerRoute="+t.$route.path}},[t._v("ورود به حساب کاربری")]),t._v(" "),n("button",{staticClass:"btn-custom rejectBtn",staticStyle:{"z-index":"0"},on:{click:function(e){t.model=!1}}},[t._v("انصراف")])])]},proxy:!0}]),model:{value:t.model,callback:function(e){t.model=e},expression:"model"}})],1)}),[],!1,null,null,null);e.default=component.exports}}]);
Copyright ©2k19 -
Hexid
|
Tex7ure