password.js 3.9 KB

1
  1. require('common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/setting/password"],{"0566":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("7736"),o=n("5f87"),i=n("7555");function a(t){return s(t)||f(t)||c(t)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(t){if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function f(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t){if(Array.isArray(t))return l(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(){n.e("components/plugin/list-cell").then(function(){return resolve(n("1861"))}.bind(null,n)).catch(n.oe)},h=n("90f4"),v={name:"password-setting",components:{TuiListCell:p},data:function(){return{tabIndex:1,form:{old:"",new:"",confirm:""},old:[{name:"old",rule:["required"],msg:["请输入旧密码"]}],rules:[{name:"new",rule:["required"],msg:["请输入新密码"]},{name:"confirm",rule:["required"],msg:["请输入确认密码"]}]}},computed:m(m({},(0,r.mapGetters)({selfInfo:"getSelfInfo"})),{},{isOldPass:function(){var t=!!this.selfInfo&&(1==this.tabIndex?this.selfInfo.password:this.selfInfo.confirmPassword);return!!t}}),onLoad:function(){(0,o.getSelfInfo)().then((function(t){}))},methods:{changeTab:function(t){this.tabIndex=t,this.form={old:"",new:"",confirm:""}},confirmFn:function(){var t=this;this.isOldPass||delete this.form.old;var e=1==this.tabIndex?i.updatePassword:i.updateConfirmPassword;e(this.form).then((function(e){t.$msg("修改成功!"),t.$util.pageTo({url:"/admin/home/workbench",type:4})}))},formSubmit:function(t){var e=this.isOldPass?[].concat(a(this.old),a(this.rules)):this.rules,n=t.detail.value,r=h.validation(n,e);r?this.$msg(r):this.confirmFn()}}};e.default=v},"13a0":function(t,e,n){"use strict";n.r(e);var r=n("b59b"),o=n("6cfc");for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("bac6");var a,u=n("8261"),c=Object(u["a"])(o["default"],r["b"],r["c"],!1,null,"32484e66",null,!1,r["a"],a);e["default"]=c.exports},"14a9":function(t,e,n){},"26f5":function(t,e,n){"use strict";(function(t){n("6cdc");r(n("b5e3"));var e=r(n("13a0"));function r(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("934e")["createPage"])},"6cfc":function(t,e,n){"use strict";n.r(e);var r=n("0566"),o=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},b59b:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var o=function(){var t=this,e=t.$createElement;t._self._c},i=[]},bac6:function(t,e,n){"use strict";var r=n("14a9"),o=n.n(r);o.a}},[["26f5","common/runtime","common/vendor","admin/setting/common/vendor"]]]);