Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front

This commit is contained in:
X1627315083@163.com
2026-02-27 16:24:04 +08:00
22 changed files with 274 additions and 133 deletions

View File

@@ -47,6 +47,7 @@
overflow: hidden;
display: flex;
user-select: none;
> .right-main {
flex: 1;
display: flex;
@@ -61,8 +62,10 @@
}
}
}
.bg-1 {
z-index: -1;
background: #f8f7f5;
animation: opacity-in 0.5s ease-in-out 1 both;
}
.bg-2 {
@@ -73,7 +76,6 @@
width: 100%;
height: 100%;
overflow: hidden;
// background-color: rgba(248, 247, 245, 1);
> * {
position: absolute;
border-radius: 50%;

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="label">Region</div>
<dropdown-menu v-model="region" :list="regions" @change="changeRegion" />
<dropdown-menu v-model="base" :list="baseList" @change="changeBase" />
</div>
<div>
<div class="label">Role</div>
@@ -25,9 +25,10 @@
import dropdownMenu from '@/components/dropdown-menu.vue'
import { useUserInfoStore } from '@/stores'
import { useI18n } from 'vue-i18n'
const userInfoStore = useUserInfoStore()
const { locale } = useI18n()
const region = ref('China')
const regions = ref([
const base = ref(userInfoStore.state.userInfo.base)
const baseList = ref([
{ label: 'United States', value: 'United States' },
{ label: 'Singapore', value: 'Singapore' },
{ label: 'Australia', value: 'Australia' },
@@ -39,16 +40,17 @@
{ label: 'Canada', value: 'Canada' },
{ label: 'Germany', value: 'Germany' }
])
const changeRegion = (value: string) => {
const changeBase = (value: string) => {
console.log(value)
}
const role = ref('Designer')
const role = ref(userInfoStore.state.userInfo.role)
const roles = ref([
{ label: 'Designer', value: 'Designer' },
{ label: 'Student', value: 'Student' },
{ label: 'Teacher', value: 'Teacher' },
{ label: 'Parent', value: 'Parent' }
{ label: 'Parent', value: 'Parent' },
{ value: 'Other', label: 'Other' }
])
const changeRole = (value: string) => {
console.log(value)

View File

@@ -64,7 +64,7 @@
<script setup lang="ts">
import md5 from 'md5'
import { Login } from '@/api/login'
import { Login } from '@/api/user'
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { validateEmail, validatePass, validatePrivacy } from './tools'

View File

@@ -67,7 +67,7 @@
<script setup lang="ts">
import md5 from 'md5'
import { Register } from '@/api/login'
import { Register } from '@/api/user'
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { validateName, validateEmail, validatePass, validatePrivacy } from './tools'

View File

@@ -55,7 +55,7 @@
<script setup lang="ts">
import md5 from 'md5'
import { ForgotPassword } from '@/api/login'
import { ForgotPassword } from '@/api/user'
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { validateEmail, validatePass } from './tools'

View File

@@ -14,7 +14,7 @@
<script setup lang="ts">
import md5 from 'md5'
import { ElMessage } from 'element-plus'
import { SendVerificationCode } from '@/api/login'
import { SendVerificationCode } from '@/api/user'
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import { CountDown } from '@/utils/tools'
import InputCode from '@/components/input-code.vue'

View File

@@ -32,6 +32,7 @@
<script setup lang="ts">
import { computed, ref, markRaw } from 'vue'
import { UpdateUserProfile } from '@/api/user'
import nuic1 from './nuic-1.vue'
import nuic2 from './nuic-2.vue'
import nuic3 from './nuic-3.vue'
@@ -44,16 +45,38 @@
const onClose = () => {
router.push({ name: 'mainInput' })
}
const onNext = () => {
const onNext = (value) => {
const index = active.value + 1
if (index < list.length) {
router.push({ query: { index } })
} else {
loading.value = true
setTimeout(() => {
router.push({ name: 'mainInput' })
}, 5000)
const data = {
...route.query,
...(value ? value : {})
}
delete data.index
if (index < list.length) {
router.push({
query: {
...data,
index
}
})
} else {
onSubmit(data)
}
}
const onSubmit = (data) => {
loading.value = true
const stime = Date.now()
UpdateUserProfile(data)
.then((res) => {
if (!res) return (loading.value = false)
const time = stime - Date.now() + 3000
setTimeout(() => {
router.push({ name: 'mainInput' })
}, time)
})
.catch((err) => {
loading.value = false
})
}
</script>

View File

@@ -10,7 +10,7 @@
</div>
</div>
<div class="btns">
<button class="next" @click="emit('next')">{{ $t('Nuic.next') }}</button>
<button class="next" @click="onNext">{{ $t('Nuic.next') }}</button>
<button class="more" @click="onLoadMore">
<span>{{ $t('Nuic.loadMore') }}</span>
<div><svg-icon name="refresh-single" size="24" /></div>
@@ -34,6 +34,15 @@
{ id: 7, url: '/image/nuic/style-7.png', title: '沙发', active: false },
{ id: 8, url: '/image/nuic/style-8.png', title: '桌子', active: false }
])
const onNext = () => {
const data = {
vibe: list.value
.filter((v) => v.active)
.map((v) => v.id)
.join(',')
}
emit('next', data)
}
const onLoadMore = () => {}
</script>

View File

@@ -4,10 +4,10 @@
<div class="select-item">
<div class="title">{{ $t('Nuic.basedIn') }}</div>
<el-select v-model="data.based">
<el-select v-model="data.base">
<el-option
class="el-select__option"
v-for="v in data.basedList"
v-for="v in data.baseList"
:key="v.value"
:label="v.label"
:value="v.value"
@@ -27,7 +27,7 @@
</el-select>
</div>
<div class="btns">
<button class="next" @click="emit('next')">{{ $t('Nuic.allSet') }}</button>
<button class="next" @click="onNext">{{ $t('Nuic.allSet') }}</button>
</div>
</div>
</template>
@@ -38,21 +38,35 @@
const router = useRouter()
const emit = defineEmits(['next'])
const data = reactive({
basedList: [
{ value: '1', label: 'Student' },
{ value: '2', label: 'Teacher' },
{ value: '3', label: 'Parent' },
{ value: '4', label: 'Other' }
baseList: [
{ label: 'United States', value: 'United States' },
{ label: 'Singapore', value: 'Singapore' },
{ label: 'Australia', value: 'Australia' },
{ label: 'South Korea', value: 'South Korea' },
{ label: 'China', value: 'China' },
{ label: 'Italy', value: 'Italy' },
{ label: 'France', value: 'France' },
{ label: 'Japan', value: 'Japan' },
{ label: 'Canada', value: 'Canada' },
{ label: 'Germany', value: 'Germany' }
],
roleList: [
{ value: '1', label: 'Student' },
{ value: '2', label: 'Teacher' },
{ value: '3', label: 'Parent' },
{ value: '4', label: 'Other' }
{ label: 'Designer', value: 'Designer' },
{ value: 'Student', label: 'Student' },
{ value: 'Teacher', label: 'Teacher' },
{ value: 'Parent', label: 'Parent' },
{ value: 'Other', label: 'Other' }
],
based: '',
role: ''
base: 'China',
role: 'Student'
})
const onNext = () => {
const data_ = {
base: data.base,
role: data.role
}
emit('next', data_)
}
</script>
<style lang="less" scoped>