import{n as u,a as _,_ as p}from"./index.13f93d3a.js";const f={name:"upload-information-enterprise",data(){return{form:{data:{company_card_color:"",company_url:"",introduce:"",company_name:""},rules:{}}}},mounted(){const{company_card_color:r}=this.userInfo;this.form.data.company_card_color=r},methods:{saveCardInfo(){const{company_card_color:r,company_name:a,company_url:t,introduce:o}=this.userInfo,{company_card_color:s,company_url:n,introduce:c,company_name:i}=this.form.data,e=this.$t("common.failure");this.$axios.post("/api/users/up_user_info",{company_card_color:s||r,company_url:n||t,introduce:c||o,company_name:i||a}).then(l=>{const{code:m,msg:d=e}=l.data;m==0?(this.$store.dispatch("syncUserinfo"),this.toCategory()):this.$message.error(d||e)}).catch(()=>{this.$message.error(e)})},changeCompanyCardColor(r){this.form.data.company_card_color=r},backToInformation(){const{id:r,category:a}=this.$route.query;this.$router.push({path:"/upload/information",query:{id:r,category:a}})},toCategory(){const{id:r,category:a}=this.$route.query;this.$router.push({path:`/upload/${a}`,query:{id:r}})}},computed:{userInfo(){return this.$store.state.userInfo}}};var y=function(){var a=this,t=a._self._c;return t("div",{staticClass:"upload-information-enterprise"},[t("div",{staticClass:"left"},[t("div",{staticClass:"left-card"},[t("div",{class:["left-card-content",a.form.data.company_card_color]},[a._v(" \uD654\uC7A5\uD488 \uC804\uBB38 \uB514\uC790\uC778 \uD68C\uC0AC "),t("br"),a._v(" FASHINEY "),t("b",[a._v(a._s(a.userInfo.company_name))])])]),t("div",{staticClass:"left-colors"},[a._v(" "+a._s(a.$t("upload.information.enterprise.cardTip"))+" "),t("ul",[t("li",{staticClass:"color-item blue",on:{click:function(o){return a.changeCompanyCardColor("blue")}}}),t("li",{staticClass:"color-item red",on:{click:function(o){return a.changeCompanyCardColor("red")}}}),t("li",{staticClass:"color-item yellow",on:{click:function(o){return a.changeCompanyCardColor("yellow")}}}),t("li",{staticClass:"color-item green",on:{click:function(o){return a.changeCompanyCardColor("green")}}})])]),t("div",{staticClass:"left-button"},[t("el-button",{attrs:{type:"primary",round:""}},[a._v(a._s(a.$t("upload.information.enterprise.viewCard")))])],1)]),t("div",{staticClass:"right"},[t("div",{staticClass:"right-top"},[t("div",{staticClass:"right-top-left"},[a.userInfo.avatar?t("img",{attrs:{src:a.userInfo.avatar,alt:"thumb"}}):t("img",{attrs:{src:_,alt:"thumb"}}),t("b",[a._v(a._s(a.userInfo.name))])]),t("div",{staticClass:"right-top-right",on:{click:a.backToInformation}},[t("img",{attrs:{src:p,alt:"back"}})])]),t("div",{staticClass:"right-form"},[t("el-form",{ref:"form",attrs:{model:a.form.data,rules:a.form.rules}},[t("el-form-item",{staticClass:"site",attrs:{prop:"company_url",label:a.$t("upload.information.enterprise.site")}},[t("el-input",{staticClass:"site",attrs:{clearable:""},model:{value:a.form.data.company_url,callback:function(o){a.$set(a.form.data,"company_url",o)},expression:"form.data.company_url"}})],1),t("el-form-item",{staticClass:"desc",attrs:{prop:"introduce",label:a.$t("upload.information.enterprise.desc")}},[t("el-input",{staticClass:"desc",attrs:{clearable:""},model:{value:a.form.data.introduce,callback:function(o){a.$set(a.form.data,"introduce",o)},expression:"form.data.introduce"}})],1),t("el-form-item",{staticClass:"name",attrs:{prop:"company_name",label:a.$t("upload.information.enterprise.name")}},[t("el-input",{staticClass:"name",attrs:{clearable:""},model:{value:a.form.data.company_name,callback:function(o){a.$set(a.form.data,"company_name",o)},expression:"form.data.company_name"}})],1)],1)],1),t("div",{staticClass:"right-button"},[t("el-button",{attrs:{type:"primary",round:""},on:{click:a.saveCardInfo}},[a._v(a._s(a.$t("common.save")))])],1)])])},C=[],v=u(f,y,C,!1,null,"b3d0a908",null,null);const b=v.exports;export{b as default};
