updates
This commit is contained in:
parent
9f07b23136
commit
ab64c81a5e
|
|
@ -60,8 +60,6 @@ const electiveOptions = [
|
||||||
{ label: '政治', value: '政治' },
|
{ label: '政治', value: '政治' },
|
||||||
{ label: '化学', value: '化学' },
|
{ label: '化学', value: '化学' },
|
||||||
{ label: '生物', value: '生物' },
|
{ label: '生物', value: '生物' },
|
||||||
{ label: '历史', value: '历史' },
|
|
||||||
{ label: '物理', value: '物理' },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const majorCategoryOptions = [
|
const majorCategoryOptions = [
|
||||||
|
|
@ -97,6 +95,7 @@ function getSubMajorOptions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleElectiveChange(value: string) {
|
function handleElectiveChange(value: string) {
|
||||||
|
console.warn('handleElectiveChange', value)
|
||||||
const index = selectedElectives.value.indexOf(value)
|
const index = selectedElectives.value.indexOf(value)
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
if (selectedElectives.value.length < 2) {
|
if (selectedElectives.value.length < 2) {
|
||||||
|
|
@ -229,6 +228,7 @@ async function handleSubmit() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
isSubmitting.value = true
|
isSubmitting.value = true
|
||||||
|
console.warn('requestData:', requestData)
|
||||||
await scoreStore.saveScore(requestData)
|
await scoreStore.saveScore(requestData)
|
||||||
// 刷新本地数据
|
// 刷新本地数据
|
||||||
scoreStore.fetchScore()
|
scoreStore.fetchScore()
|
||||||
|
|
@ -236,7 +236,7 @@ async function handleSubmit() {
|
||||||
// 抛出事件
|
// 抛出事件
|
||||||
emit('confirm', formData)
|
emit('confirm', formData)
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
message.error(e.message || '保存失败')
|
//message.error(e.message || '保存失败')
|
||||||
} finally {
|
} finally {
|
||||||
isSubmitting.value = false
|
isSubmitting.value = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ const carouselImages = [
|
||||||
|
|
||||||
// Carousel state
|
// Carousel state
|
||||||
const currentSlide = ref(0)
|
const currentSlide = ref(0)
|
||||||
|
const isLoginModalOpen = ref(false)
|
||||||
let carouselInterval: any
|
let carouselInterval: any
|
||||||
|
|
||||||
// Auto-play carousel
|
// Auto-play carousel
|
||||||
|
|
@ -491,6 +492,25 @@ const filteredSchools = computed(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Login Modal (Z-index 调高,确保覆盖导航栏) -->
|
||||||
|
<div v-if="isLoginModalOpen" class="fixed inset-0 z-50 flex select-none items-center justify-center bg-black bg-opacity-50 px-4">
|
||||||
|
<div class="max-w-md w-full border rounded-lg bg-white p-6 shadow-xl transition-all dark:border-gray-700 dark:bg-gray-800">
|
||||||
|
<div class="mb-4 flex items-center justify-between">
|
||||||
|
<h3 class="text-xl text-gray-900 font-bold dark:text-white">
|
||||||
|
登录
|
||||||
|
</h3>
|
||||||
|
<button
|
||||||
|
class="text-3xl text-gray-400 hover:text-gray-600 dark:hover:text-gray-200"
|
||||||
|
@click="closeLoginModal"
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- 使用组件并监听 confirm 事件 -->
|
||||||
|
<LoginForm @confirm="handleLoginConfirm" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,5 +148,5 @@ class Request {
|
||||||
|
|
||||||
export default new Request({
|
export default new Request({
|
||||||
baseURL: import.meta.env.VITE_API_BASE_URL,
|
baseURL: import.meta.env.VITE_API_BASE_URL,
|
||||||
timeout: 10000,
|
timeout: 100000,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue