|
@@ -45,7 +45,7 @@
|
|
const _ = require('lodash');
|
|
const _ = require('lodash');
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: maU } = createNamespacedHelpers('admin');
|
|
const { mapActions: maU } = createNamespacedHelpers('admin');
|
|
-const { mapActions: emailResetPwd } = createNamespacedHelpers('emailResetPwd');
|
|
|
|
|
|
+const { mapActions: admins } = createNamespacedHelpers('admins');
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'login',
|
|
name: 'login',
|
|
@@ -66,7 +66,7 @@ export default {
|
|
created() {},
|
|
created() {},
|
|
methods: {
|
|
methods: {
|
|
...maU(['login']),
|
|
...maU(['login']),
|
|
- ...emailResetPwd({ pwdCreate: 'create' }),
|
|
|
|
|
|
+ ...admins(['query', 'delete', 'fetch', 'update', 'create', 'email']),
|
|
onSubmit(formName) {
|
|
onSubmit(formName) {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -95,7 +95,7 @@ export default {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
}).then(async () => {
|
|
}).then(async () => {
|
|
- const res = await this.pwdCreate({ account: this.form.account });
|
|
|
|
|
|
+ const res = await this.email({ account: this.form.account });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$message({ type: `success`, message: `重置密码成功` });
|
|
this.$message({ type: `success`, message: `重置密码成功` });
|
|
}
|
|
}
|