feat:增加美食表单功能
This commit is contained in:
@@ -5,19 +5,23 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useAuthStore } from '@/store/auth'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { isMobile } from 'vue3-common/utils/layoutUtil'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const loginClick = () => {
|
||||
const loginClick = async () => {
|
||||
if (!isMobile()) {
|
||||
ElMessage.error('暂不支持PC端')
|
||||
return
|
||||
}
|
||||
|
||||
router.push('/record')
|
||||
await authStore.handleLogin('common')
|
||||
userStore.handleSession(authStore.homeSession)
|
||||
await router.push('/record')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user