beehole-store-server
Version:
www.bee-hole.com
1 lines • 11.1 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1950598a","chunk-c008239a"],{"33e6":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-settings-info-view"},[e("a-row",{attrs:{gutter:16}},[e("a-col",{attrs:{md:20,lg:12,offset:2}},[e("a-form-model",{ref:"user",attrs:{layout:"vertical",rules:t.rules,model:t.user}},[e("a-form-model-item",{ref:"realname",attrs:{label:"昵称",required:!0,prop:"realname"}},[e("a-input",{attrs:{placeholder:"给自己起个名字"},model:{value:t.user.realname,callback:function(e){t.$set(t.user,"realname",e)},expression:"user.realname"}})],1),e("a-form-model-item",{attrs:{label:"手机",required:!0,prop:"mobile"}},[e("a-input",{attrs:{placeholder:"xxxxxx"},model:{value:t.user.mobile,callback:function(e){t.$set(t.user,"mobile",e)},expression:"user.mobile"}})],1),e("a-form-model-item",{attrs:{label:"电子邮件",required:!0,prop:"email"}},[e("a-input",{attrs:{placeholder:"exp@admin.com"},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}})],1),e("a-form-model-item",{attrs:{label:"性别",required:!1}},[e("a-radio-group",{model:{value:t.user.sex,callback:function(e){t.$set(t.user,"sex",e)},expression:"user.sex"}},[e("a-radio",{attrs:{value:t.sexValue.men}},[t._v("男")]),e("a-radio",{attrs:{value:t.sexValue.women}},[t._v("女")])],1)],1),e("a-form-model-item",[e("a-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("保存")])],1)],1)],1),e("a-col",{attrs:{md:20,lg:6,offset:2}},[e("div",{staticClass:"ant-upload-preview"},[e("a-icon",{staticClass:"upload-icon",attrs:{type:"camera"}}),e("div",{staticClass:"mask"}),e("img",{attrs:{src:t.avatar}})],1),e("attach-upload",{attrs:{name:t.$t("compoent.attachlist.btn.uploadAvatar"),params:{shop_id:1,good_id:1}},on:{uploadBack:t.setavatar}})],1)],1)],1)},o=[],n=a("5530"),i=a("8d90"),s=a("c0c7"),u=a("5880"),c=a("3f42"),l=a("4360"),d={components:{AvatarModal:i["default"],attachUpload:c["a"]},data:function(){return{sexValue:{men:"1",women:"2"},user:{},subuser:{},preview:{},option:{img:this.avatar,info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1]},rules:{username:[{required:!0,message:"请输入昵称",trigger:"blur"},{min:3,max:5,message:"长度应为3-5",trigger:"blur"}],email:[{required:!0,type:"email",message:"请正确填写邮箱地址",trigger:["blur","change"]}],phonenumber:[{required:!0,pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请正确填写手机号",trigger:"blur"}]}}},computed:Object(n["a"])({},Object(u["mapGetters"])(["username","avatar"])),mounted:function(){},methods:{getUser:function(){var t=this;Object(s["j"])().then((function(e){var a=e;t.user=a.user,t.roleGroup=a.roleGroup,t.postGroup=a.postGroup}))},setUserInfo:function(t){t.subUser?this.user=t.subUser:this.user=t.user,this.roleGroup=t.roleGroup,this.postGroup=t.postGroup},setavatar:function(t){var e=this;Object(s["r"])({avatar:t.file_path}).then((function(a){l["a"].commit("SET_AVATAR",t.file_path),e.option.img=t.file_path}))},submit:function(){var t=this,e=this.$createElement;this.$refs.user.validate((function(a){if(!a)return!1;Object(s["p"])(t.user).then((function(a){t.$notification.open({message:"提示",description:"修改成功",icon:e("a-icon",{attrs:{type:"check"},style:"color: #1890FF"}),duration:3})}))}))}}},m=d,p=(a("9e1e"),a("2877")),f=Object(p["a"])(m,r,o,!1,null,"22bba28c",null);e["default"]=f.exports},"3f42":function(t,e,a){"use strict";a("b0c0");var r=function(){var t=this,e=t._self._c;return e("a-upload",{attrs:{name:"file",multiple:!0,action:t.url,data:t.getData,headers:t.headers,showUploadList:!1,"before-upload":t.beforeUpload,accept:"image/*,video/*"},on:{change:t.handleChange}},[e("a-button",[e("a-icon",{attrs:{type:"upload"}}),t._v(" "+t._s(t.name?t.name:t.$t("compoent.attachlist.btn.uploadImg"))+" ")],1)],1)},o=[],n=a("5530"),i=(a("99af"),a("8ded")),s=a.n(i),u=a("9fb0"),c=a("5880"),l=a("a5e7"),d={name:"attachUpload",props:{params:{value:{}},name:{value:""}},computed:Object(n["a"])({},Object(c["mapGetters"])({shop_id:"shopId"})),data:function(){return{headers:{Authorization:"Bearer "+s.a.get(u["a"])},url:"/admin"+l["a"].attachAdd,fileList:[]}},methods:{getData:function(t){var e={};return this.shop_id&&(e.shop_id=this.shop_id,e.tmp_id=parseInt(Math.floor((Math.random()+Math.floor(9*Math.random()+1))*Math.pow(10,9))),this.params.good_id&&(e.good_id=this.params.good_id)),e},handleChange:function(t){t.file.status,"done"===t.file.status?(t.file.response.data?(this.$set(this,"fileList",[]),this.$emit("uploadBack",t.file.response.data)):this.$message.error("".concat(t.file.name," ").concat(t.file.response.message," ")),this.$message.success("".concat(t.file.name," file uploaded successfully"))):"error"===t.file.status&&this.$message.error("".concat(t.file.name," file upload failed."))},beforeUpload:function(t){var e=t.size/1024/1024<5;return e||this.$message.error("file must smaller than 5MB!"),e}}},m=Object(n["a"])({},d),p=m,f=a("2877"),b=Object(f["a"])(p,r,o,!1,null,null,null);e["a"]=b.exports},"8d90":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("a-modal",{attrs:{title:"修改头像",visible:t.visible,maskClosable:!1,confirmLoading:t.confirmLoading,width:800,footer:null},on:{cancel:t.cancelHandel}},[e("a-row",[e("a-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[e("vue-cropper",{ref:"cropper",attrs:{img:t.options.img,info:!0,autoCrop:t.options.autoCrop,autoCropWidth:t.options.autoCropWidth,autoCropHeight:t.options.autoCropHeight,fixedBox:t.options.fixedBox},on:{realTime:t.realTime}})],1),e("a-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[e("div",{staticClass:"avatar-upload-preview"},[e("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])],1),e("br"),e("a-row",[e("a-col",{attrs:{lg:2,md:2}},[e("a-upload",{attrs:{name:"file",beforeUpload:t.beforeUpload,showUploadList:!1}},[e("a-button",{attrs:{icon:"upload"}},[t._v("选择图片")])],1)],1),e("a-col",{attrs:{lg:{span:1,offset:2},md:2}},[e("a-button",{attrs:{icon:"plus"},on:{click:function(e){return t.changeScale(1)}}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"minus"},on:{click:function(e){return t.changeScale(-1)}}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"undo"},on:{click:t.rotateLeft}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"redo"},on:{click:t.rotateRight}})],1),e("a-col",{attrs:{lg:{span:2,offset:6},md:2}},[e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.finish("blob")}}},[t._v("保存")])],1)],1)],1)},o=[],n=a("5530"),i=(a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d"),a("9861"),a("4360")),s=a("c0c7"),u=a("5880"),c={data:function(){return{visible:!1,id:null,confirmLoading:!1,fileList:[],uploading:!1,options:{img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0},previews:{}}},computed:Object(n["a"])({},Object(u["mapGetters"])(["avatar"])),methods:{edit:function(t){this.visible=!0,this.id=t,this.options.img=this.avatar},close:function(){this.id=null,this.visible=!1},cancelHandel:function(){this.close()},changeScale:function(t){t=t||1,this.$refs.cropper.changeScale(t)},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()},beforeUpload:function(t){var e=this,a=new FileReader;return a.readAsDataURL(t),a.onload=function(){e.options.img=a.result},!1},finish:function(t){var e=this,a=this,r=new FormData;"blob"===t?this.$refs.cropper.getCropBlob((function(t){var o=window.URL.createObjectURL(t);e.model=!0,e.modelSrc=o,r.append("avatarfile",t,e.fileName),Object(s["r"])(r).then((function(t){e.open=!1,i["a"].commit("SET_AVATAR",t.imgUrl),a.$message.success("上传成功"),a.$emit("ok",t.imgUrl),a.visible=!1}))})):this.$refs.cropper.getCropData((function(t){e.model=!0,e.modelSrc=t}))},okHandel:function(){var t=this;t.confirmLoading=!0,setTimeout((function(){t.confirmLoading=!1,t.close(),t.$message.success("上传头像成功")}),2e3)},realTime:function(t){this.previews=t}}},l=c,d=(a("c8c8"),a("2877")),m=Object(d["a"])(l,r,o,!1,null,"55e02ffa",null);e["default"]=m.exports},"9e1e":function(t,e,a){"use strict";a("a09d")},a09d:function(t,e,a){},a5e7:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return s}));var r=a("b775"),o={attachAdd:"/upload/file",attachList:"/upload/file/list",attachDel:"/upload/file/delete"},n=o;function i(t){return Object(r["b"])({url:o.attachList,method:"post",params:t})}function s(t){return Object(r["b"])({url:o.attachDel,method:"post",params:t})}},c0c7:function(t,e,a){"use strict";a.d(e,"l",(function(){return n})),a.d(e,"h",(function(){return i})),a.d(e,"a",(function(){return s})),a.d(e,"o",(function(){return u})),a.d(e,"e",(function(){return c})),a.d(e,"f",(function(){return l})),a.d(e,"m",(function(){return d})),a.d(e,"j",(function(){return m})),a.d(e,"p",(function(){return p})),a.d(e,"q",(function(){return f})),a.d(e,"r",(function(){return b})),a.d(e,"k",(function(){return h})),a.d(e,"d",(function(){return g})),a.d(e,"b",(function(){return v})),a.d(e,"c",(function(){return j})),a.d(e,"i",(function(){return O})),a.d(e,"g",(function(){return x})),a.d(e,"n",(function(){return _}));var r=a("b775"),o=a("028d");function n(t){return Object(r["b"])({url:"/member/list",method:"get",params:t})}function i(t){return Object(r["b"])({url:"/member/view",method:"get",params:{id:Object(o["j"])(t)}})}function s(t){return Object(r["b"])({url:"/member/edit",method:"post",data:t})}function u(t){return Object(r["b"])({url:"/member/edit",method:"post",data:t})}function c(t){return Object(r["b"])({url:"/member/delete",method:"post",params:{id:Object(o["j"])(t)}})}function l(t){return Object(r["b"])({url:"/member/export",method:"get",params:t})}function d(t,e){var a={id:t,password:e};return Object(r["b"])({url:"/member/reset_pwd",method:"post",data:a})}function m(){return Object(r["b"])({url:"/member/profile",method:"get"})}function p(t){return Object(r["b"])({url:"/member/update_profile",method:"post",data:t})}function f(t,e){var a={oldPassword:t,newPassword:e};return Object(r["b"])({url:"/member/update_pwd",method:"post",params:a})}function b(t){return Object(r["b"])({url:"/member/update_avatar",method:"post",data:t})}function h(){return Object(r["b"])({url:"/system/user/importTemplate",method:"get"})}function g(t){return Object(r["b"])({url:"/member/name_unique",method:"get",params:t})}function v(t){return Object(r["b"])({url:"/member/email_unique",method:"get",params:t})}function j(t){return Object(r["b"])({url:"/member/mobile_unique",method:"get",params:t})}function O(t){return Object(r["b"])({url:"/member/getUserInfoByIds",method:"post",data:t})}function x(t){return Object(r["b"])({url:"/role/member_list",method:"get",params:t})}function _(t){return Object(r["b"])({url:"/member/addRoleUser",method:"post",data:t})}},c8c8:function(t,e,a){"use strict";a("f83f")},f83f:function(t,e,a){}}]);