diff --git a/src/api/models/forum.ts b/src/api/models/forum.ts
index b1184ee..768b710 100644
--- a/src/api/models/forum.ts
+++ b/src/api/models/forum.ts
@@ -49,6 +49,7 @@ export type ForumModel = {
createAt: number
isAdmin: boolean
+ isMember: boolean
}
export type ForumSectionModel = {
id: number
diff --git a/src/components/RegisterAndLogin.vue b/src/components/RegisterAndLogin.vue
index 694d413..97621eb 100644
--- a/src/components/RegisterAndLogin.vue
+++ b/src/components/RegisterAndLogin.vue
@@ -3,7 +3,24 @@ import { AccountInfo } from '@/api/api-models'
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
import { useLocalStorage } from '@vueuse/core'
-import { FormInst, FormItemInst, FormItemRule, FormRules, NAlert, NButton, NCard, NCountdown, NDivider, NForm, NFormItem, NInput, NSpace, NTabPane, NTabs, useMessage } from 'naive-ui'
+import {
+ FormInst,
+ FormItemInst,
+ FormItemRule,
+ FormRules,
+ NAlert,
+ NButton,
+ NCard,
+ NCountdown,
+ NDivider,
+ NForm,
+ NFormItem,
+ NInput,
+ NSpace,
+ NTabPane,
+ NTabs,
+ useMessage,
+} from 'naive-ui'
import { onUnmounted, ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
@@ -87,7 +104,11 @@ const loginRules: FormRules = {
],
}
function validatePasswordStartWith(rule: FormItemRule, value: string): boolean {
- return !!registerModel.value.password && registerModel.value.password.startsWith(value) && registerModel.value.password.length >= value.length
+ return (
+ !!registerModel.value.password &&
+ registerModel.value.password.startsWith(value) &&
+ registerModel.value.password.length >= value.length
+ )
}
function validatePasswordSame(rule: FormItemRule, value: string): boolean {
return value === registerModel.value.password
@@ -157,7 +178,9 @@ function onLoginButtonClick() {
}
async function onForgetPassword() {
canSendForgetPassword.value = false
- await QueryGetAPI(ACCOUNT_API_URL + 'reset-password', { email: inputForgetPasswordValue.value }, [['Turnstile', token.value]])
+ await QueryGetAPI(ACCOUNT_API_URL + 'reset-password', { email: inputForgetPasswordValue.value }, [
+ ['Turnstile', token.value],
+ ])
.then(async (data) => {
if (data.code == 200) {
message.success('已发送密码重置链接到你的邮箱, 请检查')
@@ -193,17 +216,31 @@ onUnmounted(() => {
你已经登录
-
+
-
+
- 忘记密码
+
+ 忘记密码
+
登陆
@@ -211,27 +248,43 @@ onUnmounted(() => {
-
+
-
+
-
+
-
+
- 注册
+
+ 注册
+
- 提交
+
+ 提交
+
diff --git a/src/components/UserBasicInfoCard.vue b/src/components/UserBasicInfoCard.vue
new file mode 100644
index 0000000..82fe46f
--- /dev/null
+++ b/src/components/UserBasicInfoCard.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+ {{ currentUser.name }}
+
+
+
+
+
diff --git a/src/views/manage/ForumManage.vue b/src/views/manage/ForumManage.vue
index 1d39400..786d5b8 100644
--- a/src/views/manage/ForumManage.vue
+++ b/src/views/manage/ForumManage.vue
@@ -1,6 +1,6 @@
@@ -256,14 +341,52 @@ async function addAdmin() {
{{ currentForum.admins?.length ?? 0 }}
设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 申请
+ 申请加入
管理员
- 添加管理员
+
+ 添加管理员
+
+
成员
@@ -274,6 +397,10 @@ async function addAdmin() {
/>
封禁用户
+
+ 封禁用户
+
+
@@ -288,7 +415,27 @@ async function addAdmin() {
+ (currentAdminInfo = v)" />
+
- 添加
+
+ 添加
+
+
+
+ (currentBanUserInfo = v)" />
+
+
+
+
+ 封禁
+
+
+
diff --git a/src/views/pointViews/PointGoodsView.vue b/src/views/pointViews/PointGoodsView.vue
index ff18906..6b83635 100644
--- a/src/views/pointViews/PointGoodsView.vue
+++ b/src/views/pointViews/PointGoodsView.vue
@@ -160,11 +160,11 @@ const renderOption = ({ node, option }: { node: any; option: SelectOption }) =>
)
}
function gotoAuthPage() {
- if (!accountInfo.value?.biliUserAuthInfo) {
+ /*if (!accountInfo.value?.biliUserAuthInfo) {
message.error('你尚未进行 Bilibili 认证, 请前往面板进行认证和绑定')
return
}
- /*useAuthStore()
+ useAuthStore()
.setCurrentAuth(accountInfo.value?.biliUserAuthInfo.token)
.then(() => {
NavigateToNewTab('/bili-user')
diff --git a/src/views/view/forumViews/ForumView.vue b/src/views/view/forumViews/ForumView.vue
index ed11afc..d0d435c 100644
--- a/src/views/view/forumViews/ForumView.vue
+++ b/src/views/view/forumViews/ForumView.vue
@@ -24,12 +24,14 @@ import { onMounted, onUnmounted, ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
import ForumPreviewItem from './ForumPreviewItem.vue'
import ForumCommentItem from './ForumCommentItem.vue'
+import { useAccount } from '@/api/account'
const { biliInfo, userInfo } = defineProps<{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
biliInfo: any | undefined
userInfo: UserInfo | undefined
}>()
+const accountInfo = useAccount()
const token = ref('')
const turnstile = ref()
const editor = ref()
@@ -107,11 +109,15 @@ onUnmounted(() => {
forumInfo.settings.allowedViewerLevel > forumInfo.level
"
>
- 你需要成为成员才能访问
+ 你需要成为成员才能访问 {{ forumInfo.name }}
+
已申请, 正在等待管理员审核
-
- 加入 {{ forumInfo.name }}
-
+
+ 需要登录后才能够加入
+ 申请需要审核
+ 该讨论区可直接加入
+
+
{{ forumInfo.settings.requireApply ? '申请' : '' }}加入
@@ -129,6 +135,9 @@ onUnmounted(() => {
发布话题
+
+
+