UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 6.84 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9fa2669c"],{"4e85":function(t,e,r){},7329:function(t,e,r){"use strict";r("4e85")},b6db:function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t._self._c;return e("div",[e("a-form-model",{ref:"form",attrs:{model:t.form,rules:t.rules}},[e("a-row",[e("a-col",{attrs:{span:12,offset:2}},[e("a-form-model-item",{attrs:{"has-feedback":"",label:"旧密码",prop:"oldPassword"}},[e("a-input-password",{attrs:{placeholder:"请输入旧密码"},model:{value:t.form.oldPassword,callback:function(e){t.$set(t.form,"oldPassword",e)},expression:"form.oldPassword"}})],1)],1)],1),e("a-row",[e("a-col",{attrs:{span:24,offset:2}},[e("password-strength",{attrs:{prop:"newPassword",tip:"新密码"},model:{value:t.form.newPassword,callback:function(e){t.$set(t.form,"newPassword",e)},expression:"form.newPassword"}})],1)],1),e("a-row",[e("a-col",{attrs:{span:12,offset:2}},[e("a-form-model-item",{attrs:{"has-feedback":"",label:"确认密码",prop:"confirmPassword"}},[e("a-input-password",{attrs:{placeholder:"请确认密码"},model:{value:t.form.confirmPassword,callback:function(e){t.$set(t.form,"confirmPassword",e)},expression:"form.confirmPassword"}})],1)],1)],1),e("a-row",[e("a-col",{attrs:{span:12,offset:2}},[e("a-form-item",[e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("保存")])],1)],1)],1)],1)],1)},n=[],s=(r("ac1f"),r("c0c7")),a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("a-row",[e("a-col",{attrs:{span:12}},[e("a-form-model-item",{attrs:{"has-feedback":"",label:t.tip,prop:t.prop}},[e("a-input-password",{attrs:{id:"inputValue",placeholder:"请输入"+t.tip},model:{value:t.pwdee,callback:function(e){t.pwdee=e},expression:"pwdee"}})],1)],1),e("a-col",{attrs:{span:10}},[e("div",{staticClass:"input_span",staticStyle:{width:"240px","margin-top":"40px","margin-left":"15px"}},[e("label",[t._v("安全强度:")]),e("span",{attrs:{id:"one"}},[t._v("弱")]),e("span",{attrs:{id:"two"}},[t._v("中")]),e("span",{attrs:{id:"three"}},[t._v("强")])])])],1)],1)},d=[],u={props:{tip:{type:String,default:"密码"},prop:String},data:function(){return{msgText:"",pwdee:""}},methods:{checkStrong:function(t){var e=0;if(t.length<1)return e;switch(/\d/.test(t)&&e++,/[a-z]/.test(t)&&e++,/[A-Z]/.test(t)&&e++,/\W/.test(t)&&e++,e){case 1:return 1;case 2:return 2;case 3:case 4:return t.length<4?3:4}return e}},components:{},watch:{pwdee:function(t,e){this.msgText=this.checkStrong(t),this.msgText>1||1===this.msgText?document.getElementById("one").style.background="red":document.getElementById("one").style.background="#cccccc",this.msgText>2||2===this.msgText?document.getElementById("two").style.background="orange":document.getElementById("two").style.background="#cccccc",4===this.msgText?document.getElementById("three").style.background="#00D1B2":document.getElementById("three").style.background="#cccccc",this.$emit("input",t)}}},c=u,i=(r("7329"),r("2877")),m=Object(i["a"])(c,a,d,!1,null,"3f2626ae",null),l=m.exports,f={props:{},data:function(){var t=this,e=function(e,r,o){""===r?o(new Error("请输入新密码")):/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$)([^\u4e00-\u9fa5\s]){6,20}$/.test(r)?(""!==t.form.confirmPassword&&t.$refs.form.validateField("confirmPassword"),o()):o(new Error("请输入6-20位英文字母、数字或者符号(除空格),且字母、数字和标点符号至少包含两种"))},r=function(e,r,o){""===r?o(new Error("请再次输入新密码确认")):r!==t.form.newPassword?o(new Error("两次输入的密码不一致")):o()};return{title:"重置密码",open:!1,childrenDrawer:!1,formLayout:"horizontal",form:{oldPassword:void 0,newPassword:void 0,confirmPassword:void 0},rules:{oldPassword:[{required:!0,message:"密码不能为空",trigger:"blur"}],newPassword:[{required:!0,validator:e,trigger:"change"}],confirmPassword:[{required:!0,validator:r,trigger:"change"}]},layout:{labelCol:{span:4},wrapperCol:{span:14}}}},components:{passwordStrength:l},methods:{cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={oldPassword:void 0,newPassword:void 0,confirmPassword:void 0,newPassword1:void 0}},submitForm:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;Object(s["q"])(t.form.oldPassword,t.form.newPassword).then((function(e){t.$message.success("修改成功",3),t.form.oldPassword=void 0,t.form.newPassword=void 0,t.form.confirmPassword=void 0}))}))}}},p=f,b=Object(i["a"])(p,o,n,!1,null,null,null);e["default"]=b.exports},c0c7:function(t,e,r){"use strict";r.d(e,"l",(function(){return s})),r.d(e,"h",(function(){return a})),r.d(e,"a",(function(){return d})),r.d(e,"o",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"f",(function(){return i})),r.d(e,"m",(function(){return m})),r.d(e,"j",(function(){return l})),r.d(e,"p",(function(){return f})),r.d(e,"q",(function(){return p})),r.d(e,"r",(function(){return b})),r.d(e,"k",(function(){return w})),r.d(e,"d",(function(){return h})),r.d(e,"b",(function(){return g})),r.d(e,"c",(function(){return v})),r.d(e,"i",(function(){return P})),r.d(e,"g",(function(){return j})),r.d(e,"n",(function(){return O}));var o=r("b775"),n=r("028d");function s(t){return Object(o["b"])({url:"/member/list",method:"get",params:t})}function a(t){return Object(o["b"])({url:"/member/view",method:"get",params:{id:Object(n["j"])(t)}})}function d(t){return Object(o["b"])({url:"/member/edit",method:"post",data:t})}function u(t){return Object(o["b"])({url:"/member/edit",method:"post",data:t})}function c(t){return Object(o["b"])({url:"/member/delete",method:"post",params:{id:Object(n["j"])(t)}})}function i(t){return Object(o["b"])({url:"/member/export",method:"get",params:t})}function m(t,e){var r={id:t,password:e};return Object(o["b"])({url:"/member/reset_pwd",method:"post",data:r})}function l(){return Object(o["b"])({url:"/member/profile",method:"get"})}function f(t){return Object(o["b"])({url:"/member/update_profile",method:"post",data:t})}function p(t,e){var r={oldPassword:t,newPassword:e};return Object(o["b"])({url:"/member/update_pwd",method:"post",params:r})}function b(t){return Object(o["b"])({url:"/member/update_avatar",method:"post",data:t})}function w(){return Object(o["b"])({url:"/system/user/importTemplate",method:"get"})}function h(t){return Object(o["b"])({url:"/member/name_unique",method:"get",params:t})}function g(t){return Object(o["b"])({url:"/member/email_unique",method:"get",params:t})}function v(t){return Object(o["b"])({url:"/member/mobile_unique",method:"get",params:t})}function P(t){return Object(o["b"])({url:"/member/getUserInfoByIds",method:"post",data:t})}function j(t){return Object(o["b"])({url:"/role/member_list",method:"get",params:t})}function O(t){return Object(o["b"])({url:"/member/addRoleUser",method:"post",data:t})}}}]);