(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1c57b6e0"],{"10a6":function(t,e,n){t.exports=n.p+"img/qrcode.4a3933c4.png"},"4af19":function(t,e,n){},"86c9":function(t,e,n){"use strict";n.r(e);var a=(n("a4d3"),n("e01a"),n("b0c0"),n("d3b7"),n("96cf"),n("1da1")),r=n("5530"),o=n("2b0e"),c=n("f1b3"),i=n("39c2"),u=n("7bde"),s=n("bc3a"),d=n.n(s);function l(t,e){return f.apply(this,arguments)}function f(){return(f=Object(a.a)(regeneratorRuntime.mark((function t(e,n){var a,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"",a=Object(c.h)()?Object(c.l)():i.a.sig,r=Object(u.a)(e,"text"),(o=new FormData).append("appId","dtalk"),o.append("key","oa/".concat(n+(new Date).getTime())),o.append("file",r),t.abrupt("return",d()({method:"post",url:"/oss/upload",data:o,headers:{"content-type":"multipart/form-data","FZM-SIGNATURE":a}}).then((function(t){return t.data.data})));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var p=o.a.extend({name:"TeamInfo",components:{"app-icon":function(){return Promise.all([n.e("chunk-0a381f90"),n.e("chunk-7c0e491e")]).then(n.bind(null,"73f7"))},"main-page":function(){return n.e("chunk-6119f298").then(n.bind(null,"4c9e"))},"c-cell":function(){return n.e("chunk-fc1d43b8").then(n.bind(null,"4420"))},"c-button":function(){return n.e("chunk-2d0df078").then(n.bind(null,"87be"))},"input-cell":function(){return n.e("chunk-14b38b7c").then(n.bind(null,"82bc"))},"avator-editor":function(){return n.e("chunk-f8844a2c").then(n.bind(null,"2b1e"))}},data:function(){return{updateInfo:{},defaultImg:n("10a6"),showEditor:!1,loading:!1,entInfo:{}}},mounted:function(){this.entInfo=Object(r.a)({},JSON.parse(localStorage.getItem("ENT_INFO")));var t=this.entInfo,e=t.id,n=t.avatar,a=t.description,o=t.name;this.updateInfo={id:e,avatar:n,description:a,name:o},this.defaultImg=n},methods:{save:function(){var t=this;return Object(a.a)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.updateInfo.name){e.next=3;break}return t.$toast("请检查填写信息"),e.abrupt("return");case 3:if(!(t.defaultImg.indexOf(";base64")>-1)){e.next=10;break}return e.next=6,l(t.defaultImg,t.entInfo.id);case 6:n=e.sent,t.updateInfo.avatar=n.url,e.next=11;break;case 10:t.updateInfo.avatar=t.defaultImg;case 11:t.loading=!0,t.$service.enterprise.updateEnterprise(t.updateInfo).then(function(){var e=Object(a.a)(regeneratorRuntime.mark((function e(n){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.loading=!1,(a=n.data).code!==t.$global.success){e.next=9;break}return t.$toast("修改成功"),e.next=6,t.getEntInfo(t.updateInfo.id);case 6:t.$router.go(-1),e.next=10;break;case 9:t.$toast(a.msg);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(){return t.loading=!1}));case 13:case"end":return e.stop()}}),e)})))()},getEntInfo:function(t){var e=this;return this.loading=!0,this.$service.enterprise.getEnterpriseInfo({id:t}).then(function(){var t=Object(a.a)(regeneratorRuntime.mark((function t(n){var a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=n.data,e.loading=!1,a.code===e.$global.success&&(localStorage.setItem("ENT_INFO",JSON.stringify(a.data)),e.entInfo=a.data,e.defaultImg=a.data.avatar);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){return e.loading=!1}))}}}),m=(n("9567"),n("2877")),h=Object(m.a)(p,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main-page",{attrs:{loading:t.loading,"left-arrow":""},on:{"click-left":function(e){return t.$router.go(-1)}}},[n("avator-editor",{attrs:{show:t.showEditor,"img-src":t.defaultImg},on:{"update:show":function(e){t.showEditor=e},"update:imgSrc":function(e){t.defaultImg=e},"update:img-src":function(e){t.defaultImg=e}}}),t.showEditor?t._e():n("div",{staticClass:"px-4 pt-14"},[n("c-cell",{attrs:{dot:"",title:"团队头像"},on:{click:function(e){t.showEditor=!0}}},[n("template",{slot:"right"},[n("div",{staticClass:"w-7 h-7 rounded overflow-hidden flex items-center justify-center"},[t.defaultImg?n("img",{staticClass:"max-w-full",attrs:{src:t.defaultImg,alt:""}}):t._e()])])],2),n("input-cell",{staticClass:"mt-4",attrs:{required:"",limit:20,label:"团队名称",placeholder:"请输入团队名称","error-msg":"团队名称为空"},model:{value:t.updateInfo.name,callback:function(e){t.$set(t.updateInfo,"name",e)},expression:"updateInfo.name"}}),n("input-cell",{staticClass:"mt-4",attrs:{limit:300,type:"textarea",label:"团队描述",placeholder:"请输入团队描述"},model:{value:t.updateInfo.description,callback:function(e){t.$set(t.updateInfo,"description",e)},expression:"updateInfo.description"}}),n("c-button",{staticClass:"mt-4",on:{click:t.save}},[t._v("保存")])],1)],1)}),[],!1,null,"ed4c7c40",null);e.default=h.exports},9567:function(t,e,n){"use strict";n("4af19")}}]);
//# sourceMappingURL=chunk-1c57b6e0.bd08e650.js.map