|
@@ -2,12 +2,16 @@
|
|
|
<el-drawer v-model="visible" :title="$t('personal.name')" size="40%">
|
|
<el-drawer v-model="visible" :title="$t('personal.name')" size="40%">
|
|
|
<el-tabs style="height: 200px" class="demo-tabs">
|
|
<el-tabs style="height: 200px" class="demo-tabs">
|
|
|
<el-tab-pane label="基本信息" v-loading="loading">
|
|
<el-tab-pane label="基本信息" v-loading="loading">
|
|
|
- <template #label>
|
|
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
- <path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
|
|
|
- </svg>
|
|
|
|
|
- 基本信息
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
+ <path
|
|
|
|
|
+ stroke-linecap="round"
|
|
|
|
|
+ stroke-linejoin="round"
|
|
|
|
|
+ d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
|
|
|
+ />
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ 基本信息
|
|
|
|
|
+ </template>
|
|
|
<el-form :model="formData" :rules="ruleForm" label-width="100px" class="mt30" ref="formdataRef">
|
|
<el-form :model="formData" :rules="ruleForm" label-width="100px" class="mt30" ref="formdataRef">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="24" class="mb20">
|
|
<el-col :span="24" class="mb20">
|
|
@@ -55,26 +59,36 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="安全信息">
|
|
<el-tab-pane label="安全信息">
|
|
|
- <template #label>
|
|
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
|
|
|
|
|
- </svg>
|
|
|
|
|
- 安全信息
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
+ <path
|
|
|
|
|
+ stroke-linecap="round"
|
|
|
|
|
+ stroke-linejoin="round"
|
|
|
|
|
+ d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"
|
|
|
|
|
+ />
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ 安全信息
|
|
|
|
|
+ </template>
|
|
|
<el-form :model="passwordFormData" :rules="passwordRuleForm" label-width="100px" class="mt30" ref="passwordFormdataRef">
|
|
<el-form :model="passwordFormData" :rules="passwordRuleForm" label-width="100px" class="mt30" ref="passwordFormdataRef">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="24" class="mb20">
|
|
<el-col :span="24" class="mb20">
|
|
|
<el-form-item label="原密码" prop="password">
|
|
<el-form-item label="原密码" prop="password">
|
|
|
- <el-input v-model="passwordFormData.password" :type="showPassword ? 'text' : 'password'" placeholder="请输入密码" clearable type="password">
|
|
|
|
|
- <template #suffix>
|
|
|
|
|
- <i
|
|
|
|
|
- class="iconfont el-input__icon login-content-password"
|
|
|
|
|
- :class="showPassword ? 'icon-yincangmima' : 'icon-xianshimima'"
|
|
|
|
|
- @click="showPassword = !showPassword"
|
|
|
|
|
- >
|
|
|
|
|
- </i>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="passwordFormData.password"
|
|
|
|
|
+ :type="showPassword ? 'text' : 'password'"
|
|
|
|
|
+ placeholder="请输入密码"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ type="password"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <i
|
|
|
|
|
+ class="iconfont el-input__icon login-content-password"
|
|
|
|
|
+ :class="showPassword ? 'icon-yincangmima' : 'icon-xianshimima'"
|
|
|
|
|
+ @click="showPassword = !showPassword"
|
|
|
|
|
+ >
|
|
|
|
|
+ </i>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24" class="mb20">
|
|
<el-col :span="24" class="mb20">
|
|
@@ -103,13 +117,17 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="第三方账号">
|
|
<el-tab-pane label="第三方账号">
|
|
|
- <template #label>
|
|
|
|
|
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
- <path stroke-linecap="round" stroke-linejoin="round" d="M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33" />
|
|
|
|
|
- </svg>
|
|
|
|
|
-
|
|
|
|
|
- 社交登录
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
|
|
|
+ <path
|
|
|
|
|
+ stroke-linecap="round"
|
|
|
|
|
+ stroke-linejoin="round"
|
|
|
|
|
+ d="M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33"
|
|
|
|
|
+ />
|
|
|
|
|
+ </svg>
|
|
|
|
|
+
|
|
|
|
|
+ 社交登录
|
|
|
|
|
+ </template>
|
|
|
<el-table :data="socialList" class="mt10">
|
|
<el-table :data="socialList" class="mt10">
|
|
|
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
|
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
|
|
<el-table-column prop="name" label="平台"></el-table-column>
|
|
<el-table-column prop="name" label="平台"></el-table-column>
|
|
@@ -132,14 +150,14 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts" name="personal">
|
|
<script setup lang="ts" name="personal">
|
|
|
-import {useUserInfo} from '/@/stores/userInfo';
|
|
|
|
|
-import {editInfo, getObj, password, unbindingUser} from '/@/api/admin/user';
|
|
|
|
|
-import {useMessage} from '/@/hooks/message';
|
|
|
|
|
-import {rule, validateNull} from '/@/utils/validate';
|
|
|
|
|
|
|
+import { useUserInfo } from '/@/stores/userInfo';
|
|
|
|
|
+import { editInfo, getObj, password, unbindingUser } from '/@/api/admin/user';
|
|
|
|
|
+import { useMessage } from '/@/hooks/message';
|
|
|
|
|
+import { rule, validateNull } from '/@/utils/validate';
|
|
|
import other from '/@/utils/other';
|
|
import other from '/@/utils/other';
|
|
|
-import {Session} from '/@/utils/storage';
|
|
|
|
|
-import {useI18n} from 'vue-i18n';
|
|
|
|
|
-import {getLoginAppList} from "/@/api/admin/social";
|
|
|
|
|
|
|
+import { Session } from '/@/utils/storage';
|
|
|
|
|
+import { useI18n } from 'vue-i18n';
|
|
|
|
|
+import { getLoginAppList } from '/@/api/admin/social';
|
|
|
import { SocialLoginEnum } from '/@/api/login';
|
|
import { SocialLoginEnum } from '/@/api/login';
|
|
|
|
|
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -177,9 +195,18 @@ const ruleForm = reactive({
|
|
|
{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
|
{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
|
|
{ validator: rule.validatePhone, trigger: 'blur' },
|
|
{ validator: rule.validatePhone, trigger: 'blur' },
|
|
|
],
|
|
],
|
|
|
- nickname: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '昵称不能为空', trigger: 'blur' }],
|
|
|
|
|
- email: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
|
|
|
|
- name: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
|
|
|
|
|
+ nickname: [
|
|
|
|
|
+ { validator: rule.overLength, trigger: 'blur' },
|
|
|
|
|
+ { required: true, message: '昵称不能为空', trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ email: [
|
|
|
|
|
+ { validator: rule.overLength, trigger: 'blur' },
|
|
|
|
|
+ { required: true, message: '邮箱不能为空', trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ name: [
|
|
|
|
|
+ { validator: rule.overLength, trigger: 'blur' },
|
|
|
|
|
+ { required: true, message: '姓名不能为空', trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
});
|
|
});
|
|
|
const validatorPassword2 = (rule: any, value: any, callback: any) => {
|
|
const validatorPassword2 = (rule: any, value: any, callback: any) => {
|
|
|
if (value !== passwordFormData.newpassword1) {
|
|
if (value !== passwordFormData.newpassword1) {
|