🎨 update
This commit is contained in:
4
auto-import.d.ts
vendored
4
auto-import.d.ts
vendored
@@ -229,12 +229,14 @@ declare global {
|
||||
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
|
||||
const usePreferredReducedTransparency: typeof import('@vueuse/core')['usePreferredReducedTransparency']
|
||||
const usePrevious: typeof import('@vueuse/core')['usePrevious']
|
||||
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSSRWidth: typeof import('@vueuse/core')['useSSRWidth']
|
||||
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
|
||||
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||
@@ -536,12 +538,14 @@ declare module 'vue' {
|
||||
readonly usePreferredDark: UnwrapRef<typeof import('@vueuse/core')['usePreferredDark']>
|
||||
readonly usePreferredLanguages: UnwrapRef<typeof import('@vueuse/core')['usePreferredLanguages']>
|
||||
readonly usePreferredReducedMotion: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedMotion']>
|
||||
readonly usePreferredReducedTransparency: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedTransparency']>
|
||||
readonly usePrevious: UnwrapRef<typeof import('@vueuse/core')['usePrevious']>
|
||||
readonly useRafFn: UnwrapRef<typeof import('@vueuse/core')['useRafFn']>
|
||||
readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']>
|
||||
readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']>
|
||||
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
|
||||
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
|
||||
readonly useSSRWidth: UnwrapRef<typeof import('@vueuse/core')['useSSRWidth']>
|
||||
readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
|
||||
readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
|
||||
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
|
||||
|
@@ -22,8 +22,8 @@
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vuepic/vue-datepicker": "^10.0.0",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vueuse/integrations": "^12.0.0",
|
||||
"@vueuse/core": "^12.2.0",
|
||||
"@vueuse/integrations": "^12.2.0",
|
||||
"alova": "^3.2.7",
|
||||
"animejs": "^3.2.2",
|
||||
"ant-design-vue": "^4.2.6",
|
||||
@@ -61,12 +61,12 @@
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.13.0",
|
||||
"globals": "^15.14.0",
|
||||
"sass": "^1.83.0",
|
||||
"typescript": "^5.6.3",
|
||||
"typescript-eslint": "^8.18.1",
|
||||
"unplugin-vue-components": "^0.28.0",
|
||||
"vite": "^6.0.3",
|
||||
"vite": "^6.0.5",
|
||||
"vite-plugin-bundle-obfuscator": "1.4.0",
|
||||
"vite-plugin-chunk-split": "^0.5.0",
|
||||
"vue-tsc": "2.1.10"
|
||||
|
@@ -201,7 +201,7 @@ async function commentSubmit(point: any) {
|
||||
message.success(t('comment.commentSuccess'));
|
||||
} else {
|
||||
await comment.getSlideCaptchaData();
|
||||
message.warning(result.message || t('comment.commentError'));
|
||||
message.warning(result.msg || t('comment.commentError'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
||||
border-radius: 50%;
|
||||
|
||||
.reply-popover{
|
||||
.reply-popover {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
@@ -61,8 +61,9 @@
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.reply-name:hover {
|
||||
color: rgba(15, 15, 16, 0.68);
|
||||
color: rgba(15, 15, 16, 0.68);
|
||||
}
|
||||
|
||||
.reply-tag {
|
||||
@@ -94,6 +95,10 @@
|
||||
//margin-top: 5px;
|
||||
.reply-text {
|
||||
overflow: auto;
|
||||
white-space: normal; /* 允许自动换行 */
|
||||
word-wrap: break-word; /* 在长单词内部进行换行 */
|
||||
overflow-wrap: break-word; /* 在长单词内部进行换行 */
|
||||
|
||||
}
|
||||
|
||||
.reply-images {
|
||||
|
@@ -206,15 +206,17 @@ async function replySubmit(point: any) {
|
||||
is_liked: false,
|
||||
reply_nickname: props.item.nickname,
|
||||
};
|
||||
if (!comment.replyVisibility[props.item.id].data.comments) {
|
||||
if (!comment.replyVisibility[props.item.id].data) {
|
||||
comment.replyVisibility[props.item.id].data.comments = []; // 初始化 comments 数组
|
||||
}
|
||||
comment.replyVisibility[props.item.id].data.comments.unshift(tmpData);
|
||||
comment.commentMap[props.item.id].reply_count++;
|
||||
comment.replyVisibility[props.item.id].visible = true;
|
||||
comment.closeReplyInput();
|
||||
replyContent.value = "";
|
||||
await comment.clearFileList();
|
||||
showSubmitCaptcha.value = false;
|
||||
comment.replyLoading[props.item.id] = false;
|
||||
message.success(t('comment.replySuccess'));
|
||||
} else {
|
||||
await comment.getSlideCaptchaData();
|
||||
|
@@ -60,6 +60,12 @@
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
width: 525px;
|
||||
|
||||
.reply-text-child {
|
||||
white-space: normal; /* 允许自动换行 */
|
||||
word-wrap: break-word; /* 在长单词内部进行换行 */
|
||||
overflow-wrap: break-word; /* 在长单词内部进行换行 */
|
||||
}
|
||||
|
||||
.reply-action-item-child {
|
||||
margin-top: 10px;
|
||||
|
||||
|
@@ -210,14 +210,16 @@ async function replyReplySubmit(point: any) {
|
||||
reply_nickname: props.item.nickname,
|
||||
reply_to: result.data.reply_to,
|
||||
};
|
||||
if (!comment.replyVisibility[props.item.id].data.comments) {
|
||||
if (!comment.replyVisibility[props.item.id].data) {
|
||||
comment.replyVisibility[props.item.id].data.comments = []; // 初始化 comments 数组
|
||||
}
|
||||
comment.replyVisibility[props.item.id].data.comments.unshift(tmpData);
|
||||
comment.commentMap[props.item.id].reply_count++;
|
||||
comment.replyVisibility[props.item.id].visible = true;
|
||||
replyReplyContent.value = "";
|
||||
await comment.clearFileList();
|
||||
showSubmitCaptcha.value = false;
|
||||
comment.replyLoading[props.item.id] = false;
|
||||
// await getReplyList();
|
||||
comment.closeReplyInput();
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {reactive, ref} from "vue";
|
||||
import {Comment} from "@/types/comment";
|
||||
import {Comment, CommentContent} from "@/types/comment";
|
||||
import {cancelCommentLikeApi, commentLikeApi, commentListApi, replyListApi} from "@/api/comment";
|
||||
import {message} from "ant-design-vue";
|
||||
import {getSlideCaptchaDataApi} from "@/api/captcha";
|
||||
@@ -69,6 +69,16 @@ export const useCommentStore = defineStore(
|
||||
* 显示回复输入框
|
||||
*/
|
||||
const handleShowReplyInput = (index: any) => {
|
||||
if (!replyVisibility.value[index]) {
|
||||
replyVisibility.value[index] = {
|
||||
visible: false, data: {
|
||||
comments: [] as CommentContent[],
|
||||
current: 0,
|
||||
total: 0,
|
||||
size: 0,
|
||||
} as Comment
|
||||
};
|
||||
}
|
||||
showReplyInput.value = showReplyInput.value === index ? null : index;
|
||||
};
|
||||
/**
|
||||
@@ -95,7 +105,14 @@ export const useCommentStore = defineStore(
|
||||
};
|
||||
if (!replyVisibility.value[commentId]) {
|
||||
// 如果不存在这个评论的状态,初始化
|
||||
replyVisibility.value[commentId] = {visible: false, data: {} as Comment};
|
||||
replyVisibility.value[commentId] = {
|
||||
visible: false, data: {
|
||||
comments: [] as CommentContent[],
|
||||
current: 0,
|
||||
total: 0,
|
||||
size: 0,
|
||||
} as Comment
|
||||
};
|
||||
await getReplyList(params);
|
||||
} else {
|
||||
// 切换可见性
|
||||
@@ -136,7 +153,7 @@ export const useCommentStore = defineStore(
|
||||
};
|
||||
const result: any = await commentLikeApi(params);
|
||||
if (result && result.code !== 200) {
|
||||
message.error(result.message);
|
||||
message.error(result.msg);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -153,7 +170,7 @@ export const useCommentStore = defineStore(
|
||||
};
|
||||
const result: any = await cancelCommentLikeApi(params);
|
||||
if (result && result.code !== 200) {
|
||||
message.error(result.message);
|
||||
message.error(result.msg);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@@ -30,7 +30,7 @@ export const useAuthStore = defineStore(
|
||||
*/
|
||||
async function getGithubRedirectUrl() {
|
||||
const res: any = await getGithubUrl(clientId.value);
|
||||
if (res && res.code === 200 && res.data) {
|
||||
if (res && res.code === 200) {
|
||||
githubRedirectUrl.value = res.data;
|
||||
}
|
||||
}
|
||||
|
5
src/types/response.d.ts
vendored
Normal file
5
src/types/response.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface Response {
|
||||
code: number;
|
||||
data?: any;
|
||||
msg: string;
|
||||
}
|
@@ -57,7 +57,7 @@ export const service = createAlova({
|
||||
|
||||
// 令牌
|
||||
method.config.headers['X-Nonce'] = CryptoJS.lib.WordArray.random(16).toString();
|
||||
|
||||
// 签名
|
||||
if (method.meta?.signature) {
|
||||
method.config.headers['X-Content-Security'] = generateKeySecretSignature(0, method.type, method.url, method.config.params, method.data);
|
||||
}
|
||||
|
@@ -387,7 +387,7 @@ async function phoneLoginSubmit() {
|
||||
}, 1000);
|
||||
} else {
|
||||
loginLoading.value = false;
|
||||
message.error(res.message);
|
||||
message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((error: any) => {
|
||||
@@ -475,8 +475,9 @@ async function checkAccountLoginCaptcha(angle: number) {
|
||||
router.push('/main/photo/all');
|
||||
}, 1000);
|
||||
} else {
|
||||
showAccountRotateCaptcha.value = false;
|
||||
loginLoading.value = false;
|
||||
message.error(res.message);
|
||||
message.error(res.msg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -490,7 +491,7 @@ async function sendMessageByPhone(params: any): Promise<boolean> {
|
||||
message.success(t('login.sendCaptchaSuccess'));
|
||||
return true;
|
||||
} else {
|
||||
message.error(res.message);
|
||||
message.error(res.msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -111,6 +111,8 @@ async function handleListenMessage() {
|
||||
setTimeout(() => {
|
||||
router.push('/main/photo/all');
|
||||
}, 1000);
|
||||
} else {
|
||||
message.warning(t('login.loginError'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ const updateQrcodeSize = () => {
|
||||
};
|
||||
|
||||
function generateQrCodeUrl(): string {
|
||||
return import.meta.env.VITE_APP_WEB_URL + "/upscale/app?user_id=" + user.user.uid + "&token=" + user.user.access_token;
|
||||
return import.meta.env.VITE_APP_WEB_URL + "/upscale/app?user_id=" + user.user.uid + "&token=" + user.token.accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user