/
home
/
henzagold
/
customerB
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/customerB/export/js/chunk-6bacced6.f978bdaf.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6bacced6"],{"03f2":function(t,e,a){},1799:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("ul",{directives:[{name:"show",rawName:"v-show",value:t.totalPages>1,expression:"totalPages > 1"}],staticClass:"pagination"},[e("li",{staticClass:"page-item page-first"},[t.totalPages>1?e("a",{staticClass:"page-link",staticStyle:{padding:"12px"},on:{click:t.onClickFirstPage}},[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("path",{attrs:{fill:"currentColor",d:"M5.59,7.41L7,6L13,12L7,18L5.59,16.59L10.17,12L5.59,7.41M11.59,7.41L13,6L19,12L13,18L11.59,16.59L16.17,12L11.59,7.41Z"}})])]):t._e()]),e("li",{staticClass:"page-item page-first"},[t.totalPages>1?e("a",{staticClass:"page-link",staticStyle:{padding:"12px"},on:{click:t.onClickPreviousPage}},[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("path",{attrs:{fill:"currentColor",d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}})])]):t._e()]),t._l(t.pages,(function(a,i){return e("li",{key:i,class:["page-item",t.isPageActive(t.pages[i].name)?"active":null]},[e("a",{staticClass:"page-link",attrs:{disabled:t.pages[i].isDisabled},on:{click:function(e){return t.onClickPage(t.pages[i].name)}}},[t._v(t._s(t.pages[i].name))])])})),e("li",{staticClass:"page-item page-increment"},[t.totalPages>1?e("a",{staticClass:"page-link",staticStyle:{padding:"12px"},on:{click:t.onClickNextPage}},[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("path",{attrs:{fill:"currentColor",d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}})])]):t._e()]),e("li",{staticClass:"page-item page-last"},[t.totalPages>1?e("a",{staticClass:"page-link",staticStyle:{padding:"12px"},on:{click:t.onClickLastPage}},[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("path",{attrs:{fill:"currentColor",d:"M18.41,7.41L17,6L11,12L17,18L18.41,16.59L13.83,12L18.41,7.41M12.41,7.41L11,6L5,12L11,18L12.41,16.59L7.83,12L12.41,7.41Z"}})])]):t._e()])],2)},s=[],l=(a("14d9"),{data(){return{}},props:{maxVisibleButtons:{type:Number,required:!1,default:6},totalPages:{type:Number,required:!0},value:{}},watch:{},computed:{startPage(){return 1===this.value?1:this.value===this.totalPages?this.totalPages>this.maxVisibleButtons?this.totalPages-this.maxVisibleButtons+1:1:this.value-1},endPage(){return Math.min(this.startPage+this.maxVisibleButtons-1,this.totalPages)},pages(){const t=[];for(let e=this.startPage;e<=this.endPage;e+=1)t.push({name:e,isDisabled:e===this.value});return t},isInFirstPage(){return 1===this.value},isInLastPage(){return this.value===this.totalPages}},methods:{onClickFirstPage(){this.$emit("input",1),this.$emit("pagechanged",1)},onClickPreviousPage(){this.value>1&&this.$emit("input",this.value-1),this.$emit("pagechanged",this.value-1)},onClickPage(t){this.$emit("input",t),this.$emit("pagechanged",t)},onClickNextPage(){this.value<this.totalPages&&(this.$emit("input",this.value+1),this.$emit("pagechanged",this.value+1))},onClickLastPage(){this.$emit("input",this.totalPages),this.$emit("pagechanged",this.totalPages)},isPageActive(t){return this.value===t}},mounted(){}}),r=l,o=(a("2bb6"),a("2877")),c=Object(o["a"])(r,i,s,!1,null,null,null);e["a"]=c.exports},"2bb6":function(t,e,a){"use strict";a("03f2")},"8a9b":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[t.flag?e("div",{attrs:{id:"ecommerce-wishlist-demo"}},[t._m(0)]):t._e(),t.products&&t.products.length>0?e("div",[e("div",{staticClass:"acr-global-product-controls"},[e("div",{staticClass:"acr-product-active-filters"},[e("h6",{staticStyle:{margin:"0"},attrs:{id:"productList"}},[t._v(" "+t._s(t.count)+" محصول یافت شد ")])]),e("div",{staticClass:"acr-toggle-views d-none d-sm-block"},[e("a",{class:{active:"grid"==t.Style},attrs:{"data-toggle":"tooltip","data-original-title":"نمایش به صورت شبکه ای"},on:{click:function(e){return t.Styling("grid")}}},[e("i",[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("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"}})])])]),e("a",{class:{active:"row"==t.Style},attrs:{"data-toggle":"tooltip","data-original-title":"نمایش به صورت لیست"},on:{click:function(e){return t.Styling("row")}}},[e("i",[e("svg",{staticStyle:{width:"24px",height:"24px"},attrs:{viewBox:"0 0 24 24"}},[e("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"}})])])])])]),e("div",{staticClass:"row"},t._l(t.list,(function(a,i){return e("div",{key:i,class:{"col-xl-4 col-lg-6 col-md-6 col-sm-6":"grid"==t.Style,"col-md-12":"row"==t.Style}},[a.product?e("div",{staticClass:"product",class:{"product-list":"row"==t.Style}},[e("div",{staticClass:"product-thumbnail",staticStyle:{"text-align":"center"}},[e("a",{attrs:{target:"_blank",href:`https://henzagold.com/product/${a.product.title.split(" ").join("-")}/${a.product.id}`}},[e("img",{staticStyle:{width:"190px",height:"190px","object-fit":"scale-down"},attrs:{src:t.list[i].product.image.image,alt:"product"}})]),e("div",{staticClass:"product-controls"},[e("a",{staticClass:"favorite",attrs:{href:"#"},on:{click:function(e){return t.removeFromWishList(a)}}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px"}},[e("path",{attrs:{fill:"currentColor",d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"}})])])])]),e("div",{staticClass:"product-body",class:{center:"grid"==t.Style}},[e("div",{staticClass:"row"},[e("h5",{staticClass:"product-title col-lg-12 col-xs-12",staticStyle:{display:"inline-block"}},[e("a",{attrs:{href:`https://henzagold.com/product/${a.product.title.split(" ").join("-")}/${a.product.id}`,target:"_blank",title:a.product.title}},[t._v(t._s(t.list[i].product.title))])])]),e("div",{staticClass:"product-gallery-wrapper",staticStyle:{"margin-top":"1rem"}})])]):t._e()])})),0),e("pagination",{attrs:{"total-pages":Math.ceil(t.count/3)},on:{pagechanged:t.onPageChange},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1):t._e()])},s=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"vx-card",attrs:{"data-v-16d3ec44":""}},[e("div",{staticClass:"vx-card__header"},[e("div",{staticClass:"vx-card__title"},[e("h4",{staticClass:"center"},[t._v("هیچ آیتم علاقمندی ندارید.")])])])])}],l=(a("14d9"),a("1799")),r=a("be3b"),o={props:{togglePreLoader:Function},components:{Pagination:l["a"]},data(){return{list:null,products:null,count:0,page:1,Style:"grid",flag:!1}},methods:{async removeFromWishList(t){await r["a"].delete("cu/fav/"+t.product_id).then(()=>{this.getList(),this.$vs.notify({time:3500,text:"محصول از لیست علاقمندی ها حذف شد",color:"var(--secondary-color)",icon:"check"})})},addToCart(t){let e=JSON.parse(localStorage.getItem("cart_items")),a=this.$store.state.cart.items.findIndex(t=>{if(t.item.pid==t.product.id)return!0});-1===a&&(e.push(t),localStorage.setItem("cart_items",JSON.stringify(e)))},getData(){var t=3*this.page,e=t-3;this.list=this.products.slice(e,t)},Styling(t){this.Style=t},onPageChange(){this.getData();let t=document.getElementById("productList");document.body.scrollTop=t.offsetTop-150,document.documentElement.scrollTop=t.offsetTop-150},async getList(){try{this.togglePreLoader("open");let{data:t}=await r["a"].get("cu/fav");this.products=t,this.count=t.length,this.$store.dispatch("getWishList",t),this.products&&this.products.length>0?this.getData():this.flag=!0}catch(t){if(t.response&&t.response.data.errors){let e="";for(let a of Object.values(t.response.data.errors))a.map(t=>{t.includes("shipping address")?e+=t.replace("shipping address","آدرس")+"<br/>":e+=t+"<br/>"});this.$vs.notify({title:"خطایی رخ داد",time:3500,text:e,color:"var(--secondary-color)",icon:"error_outline"})}else t&&("Error: Network Error"==t?this.$vs.notify({title:"خطایی رخ داد",time:3500,text:"اتصال برقرار نشد",color:"var(--secondary-color)",icon:"error_outline"}):this.$vs.notify({title:"خطایی رخ داد",time:3500,text:t,color:"var(--secondary-color)",icon:"error_outline"}))}finally{this.togglePreLoader("close")}}},created(){this.getList()}},c=o,n=a("2877"),d=Object(n["a"])(c,i,s,!1,null,null,null);e["default"]=d.exports}}]); //# sourceMappingURL=chunk-6bacced6.f978bdaf.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure