chunk-70537de9.90cdc2d4.js 9.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-70537de9"],{"1ab5":function(e,o,r){},"393f":function(e,o,r){"use strict";r("1ab5")},5257:function(e,o,r){e.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},cb04:function(e,o,r){"use strict";r("5257")},f1a1:function(e,o,r){"use strict";r.r(o);var t=function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"user",attrs:{"element-loading-text":"Loading","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)"}},[t("el-form",{ref:"userForm",staticClass:"user-form",attrs:{"label-width":"120px",model:e.userForm,rules:e.userRules,"hide-required-asterisk":""}},[t("el-form-item",{attrs:{prop:"name",label:"星级:"}},[0!=e.starLevel?t("div",{staticClass:"stars"},e._l(e.starLevel,(function(e,o){return t("img",{key:o,attrs:{src:r("fac5")}})})),0):t("p",{staticClass:"noStar"},[e._v("暂无星级")])]),e._v(" "),t("el-form-item",{attrs:{prop:"name",label:"昵称:"}},[t("el-input",{ref:"name",staticStyle:{width:"250px"},attrs:{type:"text",size:"small",name:"name",placeholder:"请输入昵称"},model:{value:e.userForm.name,callback:function(o){e.$set(e.userForm,"name",o)},expression:"userForm.name"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"personWords",label:"简介:"}},[t("el-input",{ref:"personWords",staticStyle:{width:"250px"},attrs:{type:"textarea",size:"small",name:"personWords",rows:"3",resize:"none",placeholder:"请输入简介"},model:{value:e.userForm.personWords,callback:function(o){e.$set(e.userForm,"personWords",o)},expression:"userForm.personWords"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"imageUrl",label:"头像:"}},[e.userForm.imageUrl?t("div",{staticClass:"image"},[t("el-image",{staticClass:"img",attrs:{fit:"contain",src:e.userForm.imageUrl,"preview-src-list":[e.userForm.imageUrl]}}),e._v(" "),t("div",{staticClass:"operation"},[t("i",{staticClass:"el-icon-circle-close",on:{click:e.fileRemove}})])],1):t("el-upload",{ref:"upload",staticClass:"image",attrs:{action:"string",accept:"image/jpeg, image/png, image/jpg",multiple:!1,limit:1,"before-upload":e.onBeforeUploadImage,"http-request":e.UploadImage,"on-remove":e.fileRemove,"show-file-list":!1}},[t("i",{staticClass:"el-icon-circle-plus upload-icon"}),e._v(" "),t("p",[e._v("上传头像")])]),e._v(" "),t("div",{staticClass:"el-upload__tip"},[e._v("\n 只能上传jpg/png文件,大小不能超过 500KB\n ")])],1),e._v(" "),t("el-form-item",[t("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(o){return o.preventDefault(),e.Save(o)}}},[e._v("保存")])],1)],1),e._v(" "),t("el-form",{ref:"mobileForm",staticClass:"user-form",attrs:{"label-width":"120px",model:e.mobileForm,rules:e.mobileRules,"hide-required-asterisk":""}},[t("el-form-item",{attrs:{prop:"mobile",label:"手机号码:"}},[t("el-input",{ref:"mobile",staticStyle:{width:"220px"},attrs:{type:"text",size:"small",name:"mobile",placeholder:"请输入手机号码"},model:{value:e.mobileForm.mobile,callback:function(o){e.$set(e.mobileForm,"mobile",o)},expression:"mobileForm.mobile"}}),e._v(" "),t("el-button",{directives:[{name:"show",rawName:"v-show",value:e.loginMobile!==e.mobileForm.mobile,expression:"loginMobile!==mobileForm.mobile"}],staticClass:"code",attrs:{type:"danger",size:"small",disabled:e.countDown>0,plain:""},nativeOn:{click:function(o){return o.preventDefault(),e.getCode(o)}}},[e._v(e._s(e.countDown>0?e.countDown+"s":"获取验证码"))])],1),e._v(" "),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.loginMobile!==e.mobileForm.mobile,expression:"loginMobile!==mobileForm.mobile"}],attrs:{prop:"code",label:"验证码:"}},[t("el-input",{ref:"code",staticStyle:{width:"220px"},attrs:{type:"text",size:"small",name:"code",placeholder:"请输入验证码"},model:{value:e.mobileForm.code,callback:function(o){e.$set(e.mobileForm,"code",o)},expression:"mobileForm.code"}})],1),e._v(" "),"1"==e.userType||"2"==e.userType?t("el-form-item",{attrs:{prop:"userName",label:"管理员名称:"}},[t("el-input",{ref:"userName",staticStyle:{width:"220px"},attrs:{type:"text",size:"small",name:"code",placeholder:"请输入管理员名称"},model:{value:e.mobileForm.userName,callback:function(o){e.$set(e.mobileForm,"userName",o)},expression:"mobileForm.userName"}})],1):e._e()],1)],1)},i=[],a=(r("7f7f"),r("b775")),l=r("61f7"),s={name:"Real",data:function(){var e=function(e,o,r){o&&(Object(l["d"])(o)?r():r(new Error("请输入正确的手机号码")))},o=function(e,o,r){o&&(Object(l["b"])(o)?r():r(new Error("验证码为6位数字")))};return{loading:!1,mobileFlog:"",userType:this.$store.getters.userType,countDown:"00",userForm:{name:"",personWords:"",imageUrl:""},userRules:{},mobileRules:{mobile:[{required:!0,trigger:"blur",validator:e}],code:[{required:!0,trigger:"blur",validator:o}]},mobileForm:{mobile:"",code:"",userName:""},file:"",starLevel:0,loginMobile:""}},computed:{},created:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this,o={transCode:"B00001"};Object(a["e"])(o).then((function(o){e.$store.dispatch("user/changeState",{key:"name",value:o.nickName}),e.userForm.name=o.nickName,e.userForm.personWords=o.personWords,e.userForm.imageUrl=Object(a["c"])(o.headProfile),e.starLevel=parseInt(o.starLevel),e.mobileForm.mobile=o.mobileNo,e.loginMobile=o.mobileNo,e.mobileForm.userName=o.adminName})).catch((function(e){}))},onBeforeUploadImage:function(e){var o="image/jpeg"===e.type||"image/jpg"===e.type||"image/png"===e.type;o||this.$message.error("上传文件只能是图片格式!");var r=e.size/1024/1024<.5;return r||this.$message.error("上传文件大小不能超过 500KB!"),o&&r},UploadImage:function(e){this.userForm.imageUrl=URL.createObjectURL(e.file),this.file=e.file,this.$refs.upload.clearFiles()},fileRemove:function(){this.userForm.imageUrl="",this.file=""},theLast:function(){var e=this;this.countDown=60;var o=setInterval((function(){e.countDown>0?(e.countDown--,e.countDown<10&&(e.countDown="0"+e.countDown)):clearInterval(o)}),1e3)},getCode:function(){var e=this;if(this.mobileFlog=1,this.countDown>0)return this.$message.error("请不要频繁点击!");if(!this.mobileForm.mobile)return this.$message.error("请输入手机号码!");if(!Object(l["d"])(this.mobileForm.mobile))return this.$message.error("请输入正确的手机号码!");var o={transCode:"A00001",mailOrPhone:this.mobileForm.mobile,type:"4",channel:"1"};Object(a["e"])(o).then((function(o){e.$message.success("验证码已发送至手机号码: ".concat(e.mobileForm.mobile," ,请注意查收!")),e.theLast()})).catch((function(e){}))},Save:function(){var e=this;this.$refs.userForm.validate((function(o){if(!o)return!1;e.loading=!0;var r=new FormData;r.append("transCode","B00002"),r.append("nickName",e.userForm.name),r.append("mobnub",e.mobileForm.mobile),1===e.mobileFlog?r.append("mobnub",e.mobileForm.mobile):r.append("mobnub",""),1===e.mobileFlog?r.append("verificationCode",e.mobileForm.code):r.append("verificationCode",""),r.append("adminName",e.mobileForm.userName),r.append("personWords",e.userForm.personWords),r.append("headProfile",e.file),Object(a["f"])(r,"service",(function(e){console.log("progress: "+e+"%")})).then((function(o){e.$message.success("保存成功!"),e.loading=!1})).catch((function(o){e.loading=!1}))}))},getImage:function(e){return Object(a["c"])(e)}}},n=s,m=(r("393f"),r("cb04"),r("2877")),c=Object(m["a"])(n,t,i,!1,null,"cd660f84",null);o["default"]=c.exports},fac5:function(e,o){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAXCAYAAAARIY8tAAAF2ElEQVRIiWWU6YveVxXHP3f7PevMk1mezGSaNmuTJk1NNKRLVLBarJpCRVAkbVN8YYMgLq/EDcG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