/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/adminold/export/js/chunk-b46d288c.dcd013d0.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b46d288c"],{"0a3c7":function(t,e,n){"use strict";n("b9b3")},3835:function(t,e,n){"use strict";function i(t){if(Array.isArray(t))return t}function s(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,s,a=[],r=!0,o=!1;try{for(n=n.call(t);!(r=(i=n.next()).done);r=!0)if(a.push(i.value),e&&a.length===e)break}catch(l){o=!0,s=l}finally{try{r||null==n["return"]||n["return"]()}finally{if(o)throw s}}return a}}n.d(e,"a",(function(){return o}));var a=n("06c5");function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){return i(t)||s(t,e)||Object(a["a"])(t,e)||r()}},ac4c:function(t,e,n){"use strict";n.r(e);n("b54a");var i=function(){var t=this,e=t._self._c;return e("div",[t.$hasPermission("config.statics")?e("vx-card",{attrs:{title:"مدیریت ثابت ها"}},[e("div",{staticClass:"tabs-container px-6 pt-6",attrs:{slot:"no-body"},slot:"no-body"},[e("a-spin",{attrs:{spinning:t.loading,tip:"لطفا کمی تامل کنید"}},[e("vs-tabs",{staticClass:"tab-action-btn-fill-conatiner"},[t.$hasPermission("config.statics.brand")?e("vs-tab",{attrs:{label:"برند ها"}},[e("div",{staticClass:"tab-text"},[e("div",[t._l(t.brands,(function(n,i){return[e("a-tag",{key:n.id,staticClass:"cursor-pointer mb-5",attrs:{color:"green"},on:{click:function(e){return t.editVisible(n,i,0)}}},[e("div",{staticClass:"flex items-center"},[e("i",{staticClass:"feather icon-edit mr-2"}),t._v("\n "+t._s(n.title)+"\n ")])])]})),t.inputVisible&&t.$hasPermission("config.statics.brand.create")?e("a-input",{ref:"input",style:{width:"78px"},attrs:{type:"text",size:"small",value:t.inputValue},on:{change:function(e){return t.handleInputChange(e,0)},blur:function(e){return t.handleInputConfirm(0)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm(0)}}}):t._e(),!t.inputVisible&&t.$hasPermission("config.statics.brand.create")?e("a-tag",{staticStyle:{background:"#fff",borderStyle:"dashed"},on:{click:function(e){return t.showInput(t.index)}}},[e("a-icon",{attrs:{type:"plus"}}),t._v("\n افزودن\n ")],1):t._e()],2)])]):t._e(),t.$hasPermission("config.statics.tags")?e("vs-tab",{attrs:{label:"برچسب ها"}},[e("div",{staticClass:"tab-text grid grid-cols-3 gap-4"},[e("div",{staticClass:"col-span-2"},[t._l(t.tags,(function(n,i){return[e("a-tag",{key:i,staticClass:"cursor-pointer mb-5",attrs:{color:"green"},on:{click:function(e){return t.editVisible(n,i,1)}}},[e("div",{staticClass:"flex items-center"},[e("i",{staticClass:"feather icon-edit mr-2"}),t._v("\n "+t._s(n)+"\n ")])])]})),t.tagsInputVisible&&t.$hasPermission("config.statics.tags.create")?e("a-input",{ref:"tagInput",style:{width:"78px"},attrs:{type:"text",size:"small",value:t.tagsInputValue},on:{change:function(e){return t.handleInputChange(e,1)},blur:function(e){return t.handleInputConfirm(1)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm(1)}}}):t._e(),!t.tagsInputVisible&&t.$hasPermission("config.statics.tags.create")?e("a-tag",{staticStyle:{background:"#fff",borderStyle:"dashed"},on:{click:function(e){t.tagsInputVisible=!0}}},[e("a-icon",{attrs:{type:"plus"}}),t._v("\n افزودن\n ")],1):t._e()],2),t.$hasPermission("custom.config.statics.tags.banner.ids")?e("div",[e("a-form-item",{attrs:{label:"برچسب بنر اول سایت"}},[e("a-select",{staticStyle:{width:"100%"},attrs:{mode:"tags",placeholder:"انتخاب برچسب"},model:{value:t.banner_ids.b1,callback:function(e){t.$set(t.banner_ids,"b1",e)},expression:"banner_ids.b1"}},t._l(t.tags,(function(n,i){return e("a-select-option",{key:i},[t._v("\n "+t._s(n)+"\n ")])})),1)],1),e("a-button",{staticStyle:{width:"100%"},on:{click:t.changeBannerId}},[t._v("ثبت برچسب")])],1):t._e()])]):t._e(),t.$hasPermission("custom.config.statics.slider")?e("vs-tab",{attrs:{label:"اسلایدر موبایل"}},[e("div",{staticClass:"tab-text"},[e("div",{staticClass:"grid sm:grid-cols-1 md:grid-cols-2 gap-4"},[t._l(t.slides,(function(n,i){return e("div",{key:i,staticClass:"bcard",staticStyle:{position:"relative"}},[e("svg",{staticClass:"feather feather-x",staticStyle:{"z-index":"10",position:"absolute",top:"10px",left:"10px",color:"rgb(var(--vs-primary))",cursor:"pointer"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},on:{click:function(e){return t.removeSlide(e,i)}}},[e("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),e("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})]),e("a-row",[e("a-col",{staticClass:"gutter-row",attrs:{md:{span:24},lg:{span:7}}},[e("h6",{staticClass:"mobile-c"},[t._v("اسلاید "+t._s(i+1))]),e("SingleUploadInputPropList",{ref:"slide",refInFor:!0,on:{ok:function(e){return t.uploadIndexImage(e,i)},remove:function(e){return t.removeIndexImage(e,i)}},model:{value:n.src,callback:function(e){t.$set(n,"src",e)},expression:"item.src"}})],1),e("a-col",{staticClass:"gutter-row",attrs:{md:{span:24},lg:{span:17}}},[e("div",{staticStyle:{"padding-bottom":"10px"}},[e("span",[t._v(" نوع نمایش : ")]),e("a-select",{staticClass:"w100",staticStyle:{"margin-left":"10px"},attrs:{size:"small","default-value":"link"},model:{value:t.slides[i].type,callback:function(e){t.$set(t.slides[i],"type",e)},expression:"slides[index].type"}},[e("a-select-option",{attrs:{value:"link"}},[t._v("\n لینک\n ")]),e("a-select-option",{attrs:{value:"popup"}},[t._v("\n پاپ آپ\n ")]),e("a-select-option",{attrs:{value:"discount"}},[t._v("\n تخفیف\n ")])],1)],1),e("div",{staticStyle:{"padding-bottom":"10px"}},[e("span",[t._v(" مکان : ")]),0!==i?e("a-icon",{staticClass:"changer",attrs:{type:"minus-circle"},on:{click:function(e){return t.changeIndex(i-1,i)}}}):t._e(),i!==t.slides.length_1?e("a-icon",{staticClass:"changer",attrs:{type:"plus-circle"},on:{click:function(e){return t.changeIndex(i+1,i)}}}):t._e()],1),"popup"==t.slides[i].type?e("div",[e("div",{staticClass:"popup-description"},[t._v(" توضیحات پاپ آپ : ")]),e("a-textarea",{attrs:{placeholder:"توضیحات پاپ آپ",rows:2},model:{value:t.slides[i].text,callback:function(e){t.$set(t.slides[i],"text",e)},expression:"slides[index].text"}})],1):t._e(),"link"==t.slides[i].type?e("div",[e("div",{staticClass:"popup-description"},[t._v(" لینک : ")]),e("a-input",{attrs:{type:"url",placeholder:"لینک",rows:2},model:{value:t.slides[i].link,callback:function(e){t.$set(t.slides[i],"link",e)},expression:"slides[index].link"}})],1):t._e()])],1)],1)})),t.slides.length<10?e("div",{staticClass:"bcard center text-primary min-164 text-20 pointer",on:{click:t.addSlide}},[e("span",[t._v("افزودن")])]):t._e()],2)]),e("div",{staticClass:"vx-col w-full flex mt-8"},[e("vs-button",{staticClass:"mr-4",attrs:{"icon-pack":"feather",icon:"icon-edit"},on:{click:t.handleSubmitSlider}},[t._v("ثبت اطلاعات\n ")])],1)]):t._e()],1),e("vs-divider")],1)],1)]):t._e(),e("a-modal",{staticStyle:{top:"20px"},attrs:{title:"ویرایش برند","ok-text":"ویرایش",closable:!0,"cancel-text":"بستن"},model:{value:t.bModalEditVisible,callback:function(e){t.bModalEditVisible=e},expression:"bModalEditVisible"}},[[e("a-input",{attrs:{disabled:!t.$hasPermission("config.statics.brand.edit")},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.okModal.apply(null,arguments)}},model:{value:t.tempRow.title,callback:function(e){t.$set(t.tempRow,"title",e)},expression:"tempRow.title"}}),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("div",{staticClass:"flex"},[e("div",{staticClass:"flex-1 flex items-end"},[t.$hasPermission("config.statics.brand.remove")?e("a-popconfirm",{attrs:{"ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.deleteRow(0)}}},[e("template",{slot:"title"},[e("p",[t._v("آیا مطمئن به حذف برند هستید.؟")])]),e("a-button",{attrs:{type:"danger"}},[t._v("حذف برند")])],2):t._e()],1),t.$hasPermission("config.statics.brand.edit")?e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.updateBrand(0)}}},[t._v("ویرایش")]):t._e(),e("a-button",{on:{click:function(e){t.bModalEditVisible=!1}}},[t._v("لغو")])],1)])]],2),e("a-modal",{staticStyle:{top:"20px"},attrs:{title:"ویرایش برچسب","ok-text":"ویرایش",closable:!0,"cancel-text":"بستن"},model:{value:t.tModalEditVisible,callback:function(e){t.tModalEditVisible=e},expression:"tModalEditVisible"}},[[e("a-input",{attrs:{disabled:!t.$hasPermission("config.statics.tags.edit")},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateBrand(1)}},model:{value:t.tempRow.title,callback:function(e){t.$set(t.tempRow,"title",e)},expression:"tempRow.title"}}),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("div",{staticClass:"flex"},[e("div",{staticClass:"flex-1 flex items-end"},[t.$hasPermission("config.statics.tags.remove")?e("a-popconfirm",{attrs:{"ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.deleteRow(1)}}},[e("template",{slot:"title"},[e("p",[t._v("آیا مطمئن به حذف برچسب هستید.؟")])]),e("a-button",{attrs:{type:"danger"}},[t._v("حذف برچسب")])],2):t._e()],1),t.$hasPermission("config.statics.tags.edit")?e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.updateBrand(1)}}},[t._v("ویرایش")]):t._e(),e("a-button",{on:{click:function(e){t.tModalEditVisible=!1}}},[t._v("لغو")])],1)])]],2)],1)},s=[],a=(n("ac4d"),n("8a81"),n("5df3"),n("1c4c"),n("7f7f"),n("6b54"),n("53ca")),r=(n("20d6"),n("28a5"),n("3835")),o=(n("ac6a"),n("96cf"),n("1da1")),l=n("bb36"),c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"clearfix"},[e("AUpload",{attrs:{action:t.url,headers:t.headers,"list-type":"picture-card",multiple:!1,data:t.getData,"file-list":t.list,remove:t.handleRemove,"before-upload":t.handlebeforeUpload},on:{preview:t.handlePreview,select:t.select,change:t.handleChange}},[0==t.list.length?e("div",[e("a-icon",{attrs:{type:"plus"}}),e("div",{staticClass:"ant-upload-text"},[t._v("\n بارگذاری\n ")])],1):t._e()]),e("AModal",{attrs:{visible:t.previewVisible,footer:null},on:{cancel:t.handleCancel}},[e("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:t.previewImage}})])],1)},u=[];n("c5f6");function d(t){return new Promise((function(e,n){var i=new FileReader;i.readAsDataURL(t),i.onload=function(){return e(i.result)},i.onerror=function(t){return n(t)}}))}var p={name:"UploadInput",props:{list:{type:Array,required:!0,default:[]},limit:{type:Number,required:!1,default:20}},model:{prop:"list",event:"change"},data:function(){return{url:l["b"]+"file/create",previewVisible:!1,previewImage:""}},watch:{list:function(t,e){t.length>e.length?this.$emit("add-file",t):t.length<e.length&&this.$emit("remove-file",t)}},methods:{handleRemove:function(t){this.$emit("remove",t)},handleCancel:function(){this.previewVisible=!1},handlePreview:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.url||e.preview){t.next=4;break}return t.next=3,d(e.originFileObj);case 3:e.preview=t.sent;case 4:this.previewImage=e.url||e.preview,this.previewVisible=!0;case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleChange:function(t){var e=t.fileList,n=t.event,i=t.file;console.log("fileList..........",e),console.log(n),console.log(i),"done"==i.status&&i.response&&i.response.id&&this.$emit("ok",i.response),this.$emit("change",e)},select:function(){console.log("555 ==> ",555)},getData:function(){return{has_thumb:1,has_watermark:1,subject:1,title:1}},handlebeforeUpload:function(t){}},computed:{headers:function(){return{Authorization:"Bearer "+localStorage.getItem("accessToken")||!1}}}},h=p,f=(n("0a3c7"),n("2877")),g=Object(f["a"])(h,c,u,!1,null,null,null),b=g.exports;function v(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=m(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,s=function(){};return{s:s,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return r=t.done,t},e:function(t){o=!0,a=t},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function m(t,e){if(t){if("string"===typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var y={name:"Const",components:{SingleUploadInputPropList:b},data:function(){return{loading:!1,brands:[],inputVisible:!1,bModalEditVisible:!1,tModalEditVisible:!1,inputValue:"",tempRow:{},tempIndex:void 0,flag:"",tags:[],tagsInputVisible:!1,tagsInputValue:"",tagsTempIndex:void 0,slides:[],banner_ids:{b1:void 0,b2:void 0},siteConfig:void 0}},computed:{},created:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,this.getTags(),this.getSiteConfig(),this.getSlider(),t.next=7,l["c"].get("/brand");case 7:e=t.sent,n=e.data,this.brands=n,t.next=16;break;case 12:t.prev=12,t.t0=t["catch"](0),console.log("eeeeee",t.t0),this.$message.error("خطا در دریافت اطلاعات");case 16:return t.prev=16,this.loading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[0,12,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),methods:{changeBannerId:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,console.log(this.banner_ids),t.next=5,l["c"].put("/const/54",{val:JSON.stringify(Object.assign(this.siteConfig,{banner_ids:this.banner_ids}))});case 5:this.$message.info("اطلاعات با موفقیت به ثبت رسید."),this.loading=!1,t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](0),this.$message.error("خطا در دریافت اطلاعات"),this.loading=!1;case 13:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(){return t.apply(this,arguments)}return e}(),changeIndex:function(t,e){var n=this.slides[e];this.slides.splice(e,1),this.slides.splice(t,0,n)},uploadIndexImage:function(t,e){this.slides[e].src=t.image},removeSlide:function(t,e){this.slides.splice(e,1)},removeIndexImage:function(t,e){console.log(e,t,"imog remove")},getSlider:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n,i,s,a,o,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,t.next=4,l["c"].get("/const/mobile_main_slider");case 4:return e=t.sent,n=e.data,t.next=8,JSON.parse(n);case 8:this.slides=t.sent,i=v(this.slides.entries());try{for(i.s();!(s=i.n()).done;)a=Object(r["a"])(s.value,2),o=a[0],c=a[1],c.src=[{uid:o,status:"done",response:{id:o,image:"https://henzagold.com/oapi/storage/"+c.src},url:"https://henzagold.com/oapi/storage/"+c.src}]}catch(u){i.e(u)}finally{i.f()}t.next=17;break;case 13:t.prev=13,t.t0=t["catch"](0),console.log("eeeeee",t.t0),this.$message.error("خطا در دریافت اطلاعات");case 17:return t.prev=17,this.loading=!1,t.finish(17);case 20:case"end":return t.stop()}}),t,this,[[0,13,17,20]])})));function e(){return t.apply(this,arguments)}return e}(),addSlide:function(){this.slides.push({link:"",type:"popup",text:"",src:[]})},handleSubmitSlider:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,e=this.slides.map((function(t){var e={text:t.text,type:t.type,src:t.src[0].response.image.split("/").at(-1),link:t.link};return"popup"===t.type?e.link="popup":"discount"===t.type&&(e.link="discount"),e})),t.next=5,l["c"].put("/const/49",{val:JSON.stringify(e)});case 5:this.$message.info("اطلاعات با موفقیت به ثبت رسید."),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),this.$vs.notify({title:"خطا",text:t.t0});case 11:return t.prev=11,this.loading=!1,t.finish(11);case 14:case"end":return t.stop()}}),t,this,[[0,8,11,14]])})));function e(){return t.apply(this,arguments)}return e}(),updateBrand:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var n,i,s,a,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,this.loading=!0,0!==e){t.next=12;break}return t.next=5,l["c"].put("/brand/"+this.tempRow.id,this.tempRow);case 5:n=t.sent,i=n.data,s=this.brands.findIndex((function(t){return t.id===r.tempRow.id})),s>-1&&(this.brands[s]=i),this.bModalEditVisible=!1,t.next=19;break;case 12:if(1!==e){t.next=19;break}return t.next=15,l["c"].put("/const/"+this.tempRow.id,{val:this.tempRow.title});case 15:a=t.sent,a.data,this.tags[this.tempRow.id]=this.tempRow.title,this.tModalEditVisible=!1;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t["catch"](0),console.log(t.t0);case 24:return t.prev=24,this.loading=!1,t.finish(24);case 27:case"end":return t.stop()}}),t,this,[[0,21,24,27]])})));function e(e){return t.apply(this,arguments)}return e}(),handleClose:function(t){return!1},editVisible:function(t,e,n){0===n?(this.flag=0,this.inputValue="",this.tempRow=Object.assign({},t),this.bModalEditVisible=!0):1===n&&(this.flag=1,this.tagsInputValue="",this.tempRow=Object.assign({},{title:t,id:e}),this.tModalEditVisible=!0),this.tempIndex=e},okModal:function(){this.bModalEditVisible=!1,this.tModalEditVisible=!1},cancelModal:function(){tthis.bModalEditVisible=!1,this.tModalEditVisible=!1},deleteRow:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var n,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,this.loading=!0,0!==e){t.next=10;break}return t.next=5,l["c"].delete("/brand/"+this.tempRow.id);case 5:n=this.brands.findIndex((function(t){return t.id===i.tempRow.id})),n>-1&&this.brands.splice(n,1),this.bModalEditVisible=!1,t.next=15;break;case 10:if(1!==e){t.next=15;break}return t.next=13,l["c"].delete("/const/by-id/"+this.tempRow.id);case 13:delete this.tags[this.tempRow.id],this.tModalEditVisible=!1;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t["catch"](0),console.log(t.t0);case 20:return t.prev=20,this.loading=!1,t.finish(20);case 23:case"end":return t.stop()}}),t,this,[[0,17,20,23]])})));function e(e){return t.apply(this,arguments)}return e}(),showInput:function(t){this.inputVisible=!0,this.$nextTick((function(){}))},handleInputChange:function(t,e){0===e?this.inputValue=t.target.value:1===e&&(this.tagsInputValue=t.target.value)},handleInputConfirm:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var n,i,s,a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=void 0,0===e?(n=this.inputValue,this.flag=0):1===e&&(n=this.tagsInputValue,this.flag=1),!n){t.next=32;break}if(t.prev=3,this.loading=!0,0!==e){t.next=15;break}return t.next=8,l["c"].post("/brand/create",{title:n});case 8:i=t.sent,s=i.data,this.brands.push(s),this.inputVisible=!1,this.inputValue="",t.next=23;break;case 15:if(1!==e){t.next=23;break}return t.next=18,l["c"].post("/const",{key:"__list__tags",val:n});case 18:a=t.sent,r=a.data,this.tagsInputVisible=!1,this.tagsInputValue="",this.tags[r.id]=r.val;case 23:this.$message.success("".concat(0===this.flag?"برند":"برچسب"," اضافه شد")),t.next=29;break;case 26:t.prev=26,t.t0=t["catch"](3),this.$message.error(" خطا در اضافه کردن ".concat(0===this.flag?"برند":"برچسب"));case 29:return t.prev=29,this.loading=!1,t.finish(29);case 32:case"end":return t.stop()}}),t,this,[[3,26,29,32]])})));function e(e){return t.apply(this,arguments)}return e}(),getTags:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,t.next=4,l["c"].get("/const/__list__tags");case 4:e=t.sent,n=e.data,this.tags="object"===Object(a["a"])(n)?n:[n],t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),this.$message.error("خطا در دریافت اطلاعات");case 12:return t.prev=12,this.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,this,[[0,9,12,15]])})));function e(){return t.apply(this,arguments)}return e}(),getSiteConfig:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,t.next=4,l["c"].get("/const/site");case 4:e=t.sent,n=e.data,this.siteConfig=JSON.parse(n),this.banner_ids=this.siteConfig.banner_ids,t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),this.$message.error("خطا در دریافت اطلاعات");case 13:return t.prev=13,this.loading=!1,t.finish(13);case 16:case"end":return t.stop()}}),t,this,[[0,10,13,16]])})));function e(){return t.apply(this,arguments)}return e}()}},k=y,w=(n("e2ca"),Object(f["a"])(k,i,s,!1,null,"170891f0",null));e["default"]=w.exports},b54a:function(t,e,n){"use strict";n("386b")("link",(function(t){return function(e){return t(this,"a","href",e)}}))},b9b3:function(t,e,n){},c72a:function(t,e,n){},e2ca:function(t,e,n){"use strict";n("c72a")}}]); //# sourceMappingURL=chunk-b46d288c.dcd013d0.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure