|
@@ -22,7 +22,7 @@
|
|
|
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd">
|
|
|
<ResetPwd />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label='人脸信息' name="faceInfo">
|
|
|
+ <el-tab-pane label='人脸信息' name="faceInfo" v-if="userType === 1">
|
|
|
<FaceInfo />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
|
|
@@ -34,11 +34,28 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import { BasicInfo, ProfileUser, ResetPwd, UserSocial, FaceInfo } from './components'
|
|
|
+import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
|
|
+
|
|
|
+const userType = ref(0)
|
|
|
+console.log(userType,'1')
|
|
|
+const userInfo = ref({} as ProfileVO)
|
|
|
+const getUserInfo = async () => {
|
|
|
+ const users = await getUserProfile()
|
|
|
+ console.log(users)
|
|
|
+ userInfo.value = users
|
|
|
+ userType.value = Number(users.userType)
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
defineOptions({ name: 'Profile' })
|
|
|
const activeName = ref('basicInfo')
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getUserInfo()
|
|
|
+})
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.user {
|