重置密码为账号管理页
This commit is contained in:
@ -70,6 +70,12 @@
|
||||
size="small"
|
||||
>升级</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="resetPwd(scope.row.id)"
|
||||
type="text"
|
||||
size="small"
|
||||
>重置密码</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -83,11 +89,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
resetPw
|
||||
} from '@/api/customer';
|
||||
import {
|
||||
getUserList,
|
||||
handleUser,
|
||||
deleteCompanyUser,
|
||||
resetPw
|
||||
} from '@/api/account';
|
||||
export default {
|
||||
data() {
|
||||
@ -142,9 +150,9 @@ export default {
|
||||
// resetPw
|
||||
this.$prompt('请输入新密码', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
|
||||
// inputErrorMessage: '邮箱格式不正确'
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /^\d{6,}$/,
|
||||
inputErrorMessage: '不能为空且六位及以上'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
resetPw({ userId, password: value }).then(({ data }) => {
|
||||
|
@ -104,12 +104,6 @@
|
||||
size="small"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="resetPwd(scope.row.userId)"
|
||||
type="text"
|
||||
size="small"
|
||||
>重置密码</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -186,22 +180,6 @@ export default {
|
||||
this.msgSuccess('删除成功');
|
||||
});
|
||||
},
|
||||
// 重置密码
|
||||
resetPwd(userId) {
|
||||
// resetPw
|
||||
this.$prompt('请输入新密码', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
|
||||
// inputErrorMessage: '邮箱格式不正确'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
resetPw({ userId, password: value }).then(({ data }) => {
|
||||
this.msgSuccess(data);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
Reference in New Issue
Block a user