fix: style code
parent
e2a31c1c2b
commit
84584a6fd9
|
@ -4,6 +4,7 @@ import ImageUpload from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
export const useImagesUpload = () => {
|
export const useImagesUpload = () => {
|
||||||
return defineComponent({
|
return defineComponent({
|
||||||
|
name: 'ImagesUpload',
|
||||||
props: {
|
props: {
|
||||||
multiple: {
|
multiple: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -20,6 +21,5 @@ export const useImagesUpload = () => {
|
||||||
<ImageUpload maxNumber={props.maxNumber} multiple={props.multiple} />
|
<ImageUpload maxNumber={props.maxNumber} multiple={props.multiple} />
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
name: 'ImagesUpload',
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Recordable } from '@vben/types';
|
import type { Recordable } from '@vben/types';
|
||||||
|
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm, z } from '#/adapter/form';
|
import { useVbenForm, z } from '#/adapter/form';
|
||||||
import { updateUserPassword } from '#/api/system/user/profile';
|
import { updateUserPassword } from '#/api/system/user/profile';
|
||||||
import { $t } from '@vben/locales';
|
|
||||||
|
|
||||||
const [Form, formApi] = useVbenForm({
|
const [Form, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
|
|
|
@ -2,26 +2,27 @@
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { SystemSocialUserApi } from '#/api/system/social/user';
|
import type { SystemSocialUserApi } from '#/api/system/social/user';
|
||||||
|
|
||||||
|
import { computed, onMounted, ref } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { Button, Card, Image, message, Modal } from 'ant-design-vue';
|
import { Button, Card, Image, message, Modal } from 'ant-design-vue';
|
||||||
|
|
||||||
import { computed, ref, onMounted } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import { $t } from '#/locales';
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
|
import { socialAuthRedirect } from '#/api/core/auth';
|
||||||
import {
|
import {
|
||||||
getBindSocialUserList,
|
getBindSocialUserList,
|
||||||
socialUnbind,
|
|
||||||
socialBind,
|
socialBind,
|
||||||
|
socialUnbind,
|
||||||
} from '#/api/system/social/user';
|
} from '#/api/system/social/user';
|
||||||
import { socialAuthRedirect } from '#/api/core/auth';
|
import { $t } from '#/locales';
|
||||||
import { DICT_TYPE, getDictLabel } from '#/utils/dict';
|
|
||||||
import { SystemUserSocialTypeEnum } from '#/utils/constants';
|
import { SystemUserSocialTypeEnum } from '#/utils/constants';
|
||||||
|
import { DICT_TYPE, getDictLabel } from '#/utils/dict';
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:activeName', v: string): void;
|
(e: 'update:activeName', v: string): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
/** 已经绑定的平台 */
|
/** 已经绑定的平台 */
|
||||||
const bindList = ref<SystemSocialUserApi.SocialUser[]>([]);
|
const bindList = ref<SystemSocialUserApi.SocialUser[]>([]);
|
||||||
const allBindList = computed<any[]>(() => {
|
const allBindList = computed<any[]>(() => {
|
||||||
|
@ -126,8 +127,7 @@ async function onBind(bind: any) {
|
||||||
try {
|
try {
|
||||||
// 计算 redirectUri
|
// 计算 redirectUri
|
||||||
// tricky: type 需要先 encode 一次,否则钉钉回调会丢失。配合 getUrlValue() 使用
|
// tricky: type 需要先 encode 一次,否则钉钉回调会丢失。配合 getUrlValue() 使用
|
||||||
const redirectUri =
|
const redirectUri = `${location.origin}/profile?${encodeURIComponent(`type=${type}`)}`;
|
||||||
location.origin + '/profile?' + encodeURIComponent(`type=${type}`);
|
|
||||||
|
|
||||||
// 进行跳转
|
// 进行跳转
|
||||||
window.location.href = await socialAuthRedirect(type, redirectUri);
|
window.location.href = await socialAuthRedirect(type, redirectUri);
|
||||||
|
|
Loading…
Reference in New Issue