接入系统公司、部门、角色接口
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<el-input v-model="form.about" type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary">保存</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
if (!validate) {
|
||||
return false
|
||||
}
|
||||
const res = await this.$API.system.user.verifyCode.post({mobile: this.form.mobile});
|
||||
const res = await this.$API.user.verifyCode.post({mobile: this.form.mobile});
|
||||
if (res.code === 200) {
|
||||
this.$message.success('短信已发送至手机号码');
|
||||
this.disabled = true
|
||||
@@ -119,9 +119,8 @@ export default {
|
||||
save() {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const res = await this.$API.system.user.updateProfile.post(this.form)
|
||||
const res = await this.$API.user.editUser.post(this.form)
|
||||
if (res.code === 200) {
|
||||
// this.$TOOL.data.set("USER_INFO", res.data)
|
||||
this.$message.success("操作成功");
|
||||
await this.getInfo();
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightBtn">
|
||||
<el-button type="primary" :size="size" round v-if="wechat.open_id==''" @click="bindWechat">绑定</el-button>
|
||||
<el-button type="primary" :size="size" round v-else plain @click="secureDingTalk(1)">解除</el-button>
|
||||
<el-button type="primary" :size="size" v-if="wechat.open_id==''" @click="bindWechat">绑 定</el-button>
|
||||
<el-button type="primary" :size="size" v-else plain @click="secureDingTalk(1)">解 除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="boxView">
|
||||
@@ -32,8 +32,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightBtn">
|
||||
<el-button type="primary" :size="size" round v-if="dingTalk.open_id==''" @click="bindDingTalk">绑定</el-button>
|
||||
<el-button type="primary" :size="size" round v-else plain @click="secureDingTalk(2)">解除</el-button>
|
||||
<el-button type="primary" :size="size" v-if="dingTalk.open_id==''" @click="bindDingTalk">绑 定</el-button>
|
||||
<el-button type="primary" :size="size" v-else plain @click="secureDingTalk(2)">解 除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">安全登录</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="title">使用Passkey</div>
|
||||
<div class="boxView boxViewCenter">
|
||||
<div class="nameBox passkeyView">
|
||||
<el-button type="primary" round :size="size" @click="createPasskey">添加指纹</el-button>
|
||||
<el-button type="primary" :size="size" @click="createPasskey">添加指纹</el-button>
|
||||
<div class="msg">借助 Passkey,你可以使用自己的指纹、面孔、屏锁设置或实体安全密钥登录你的账号。请仅在你自有的设备上设置 Passkey。</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
const userInfo = this.$TOOL.data.get("USER_INFO");
|
||||
this.userInfo = userInfo;
|
||||
|
||||
// this.getUserInfo();
|
||||
this.getUserInfo();
|
||||
// this.getSso();
|
||||
// 获取新消息
|
||||
// this.$socketApi.getSock(this.getWsResult);
|
||||
@@ -245,7 +245,6 @@ export default {
|
||||
async createPasskey() {
|
||||
try {
|
||||
const res = await this.$API.system.user.generateRegistration.post();
|
||||
|
||||
const publicKey= {
|
||||
challenge:Uint8Array.from(res.data.challenge),
|
||||
rp:{
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<el-card shadow="never" header="修改密码">
|
||||
<el-alert title="密码更新成功后,您将被重定向到登录页面,您可以使用新密码重新登录。" type="error" show-icon style="margin-bottom: 15px;"/>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" style="margin-top:20px;width: 518px;">
|
||||
<el-form-item label="当前密码" prop="userPassword">
|
||||
<el-input v-model="form.userPassword" type="password" show-password placeholder="请输入当前密码"></el-input>
|
||||
<el-form-item label="当前密码" prop="old_pwd">
|
||||
<el-input v-model="form.old_pwd" type="password" show-password placeholder="请输入当前密码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-form-item label="新密码" prop="new_pwd">
|
||||
<el-popover
|
||||
class="popoverPassword"
|
||||
placement="right"
|
||||
@@ -15,13 +15,13 @@
|
||||
content=""
|
||||
>
|
||||
<template #reference>
|
||||
<el-input v-model="form.newPassword" type="password" show-password placeholder="请输入新密码"></el-input>
|
||||
<el-input v-model="form.new_pwd" type="password" show-password placeholder="请输入新密码"></el-input>
|
||||
</template>
|
||||
<template #default>
|
||||
<div class="passwordView">
|
||||
<div class="title">
|
||||
<div class="name">安全程度等级:</div>
|
||||
<div class="strength"><sc-password-strength v-model="form.newPassword"></sc-password-strength></div>
|
||||
<div class="strength"><sc-password-strength v-model="form.new_pwd"></sc-password-strength></div>
|
||||
</div>
|
||||
<div class="text"><div class="icon"></div>6-20位字符</div>
|
||||
<div class="text"><div class="icon"></div>只能包含大小写字母、数字和标点符号(除空格)</div>
|
||||
@@ -29,8 +29,8 @@
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认新密码" prop="confirmNewPassword">
|
||||
<el-input v-model="form.confirmNewPassword" type="password" show-password placeholder="请再次输入新密码"></el-input>
|
||||
<el-form-item label="确认新密码" prop="conf_pwd">
|
||||
<el-input v-model="form.conf_pwd" type="password" show-password placeholder="请再次输入新密码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="save">保存密码</el-button>
|
||||
@@ -49,21 +49,21 @@
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
userPassword: "",
|
||||
newPassword: "",
|
||||
confirmNewPassword: ""
|
||||
old_pwd: "",
|
||||
new_pwd: "",
|
||||
conf_pwd: ""
|
||||
},
|
||||
rules: {
|
||||
userPassword: [
|
||||
old_pwd: [
|
||||
{ required: true, message: '请输入当前密码'}
|
||||
],
|
||||
newPassword: [
|
||||
new_pwd: [
|
||||
{ required: true, message: '请输入新密码'}
|
||||
],
|
||||
confirmNewPassword: [
|
||||
conf_pwd: [
|
||||
{ required: true, message: '请再次输入新密码'},
|
||||
{validator: (rule, value, callback) => {
|
||||
if (value !== this.form.newPassword) {
|
||||
if (value !== this.form.new_pwd) {
|
||||
callback(new Error('两次输入密码不一致'));
|
||||
}else{
|
||||
callback();
|
||||
@@ -75,17 +75,20 @@
|
||||
},
|
||||
methods: {
|
||||
save(){
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
this.$alert("密码修改成功,是否跳转至登录页使用新密码登录", "修改成功", {
|
||||
type: 'success',
|
||||
center: true
|
||||
}).then(() => {
|
||||
this.$router.replace({
|
||||
path: '/login'
|
||||
})
|
||||
}).catch(() => {})
|
||||
}else{
|
||||
const res = await this.$API.user.editPass.post(this.form);
|
||||
if(res.code == 200){
|
||||
this.$alert("密码修改成功,是否跳转至登录页使用新密码登录", "修改成功", {
|
||||
type: 'success',
|
||||
center: true
|
||||
}).then(() => {
|
||||
this.$router.replace({
|
||||
path: '/login'
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user