feat: 文件更新
parent
746a6bf417
commit
0c2339522f
|
|
@ -3,54 +3,23 @@
|
|||
style: {
|
||||
navigationBarTitleText: '六纬AI小助手',
|
||||
},
|
||||
needLogin: true,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<web-view :src="url" @message="handleChildMessage" :update-title="false" />
|
||||
<view class="w-full h-screen">
|
||||
<image
|
||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/shengxue_aibg.png"
|
||||
mode="widthFix"
|
||||
class="w-full"
|
||||
@click="navigateToAi"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/store'
|
||||
import { getAssistant } from '@/service/index/api'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
//chat.ycymedu.com
|
||||
//chatv2.ycymedu.com
|
||||
const url = ref(``)
|
||||
|
||||
const handleChildMessage = (event) => {
|
||||
console.log('子应用传递的消息', event)
|
||||
const navigateToAi = () => {
|
||||
uni.navigateTo({ url: '/aiService-sub/index/newAi' })
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
getAssistant().then((res) => {
|
||||
if (res.code === 200) {
|
||||
const data = res.result as unknown as string
|
||||
url.value = `${data}?userId=${userStore.userInfo.estimatedAchievement.wxId}&subjectGroup=${userStore.userInfo.estimatedAchievement.subjectGroup}&expectedScore=${userStore.userInfo.estimatedAchievement.expectedScore}&provinceName=${userStore.userInfo.estimatedAchievement.provinceName}&locationCode=${userStore.userInfo.estimatedAchievement.provinceCode}&token=${userStore.userInfo.token}×tamp=${new Date().getTime()}`
|
||||
}
|
||||
if (options.id) {
|
||||
url.value += `&reportId=${options.id}`
|
||||
}
|
||||
if (options.type) {
|
||||
url.value += `&reportType=${options.type}`
|
||||
}
|
||||
if (options.fileId) {
|
||||
url.value += `&fileId=${options.fileId}`
|
||||
}
|
||||
})
|
||||
// if (options.locationCode) {
|
||||
// url.value += `&locationCode=${options.locationCode}`
|
||||
// }
|
||||
// const recorderManager = uni.getRecorderManager()
|
||||
// recorderManager.onError((res) => {
|
||||
// console.log('录音错误', res)
|
||||
// })
|
||||
// recorderManager.onStop((res) => {
|
||||
// console.log('录音停止', res)
|
||||
// })
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '六纬AI小助手',
|
||||
},
|
||||
needLogin: true,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<web-view :src="url" @message="handleChildMessage" :update-title="false" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/store'
|
||||
import { getAssistant } from '@/service/index/api'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
//chat.ycymedu.com
|
||||
//chatv2.ycymedu.com
|
||||
const url = ref(``)
|
||||
|
||||
const handleChildMessage = (event) => {
|
||||
console.log('子应用传递的消息', event)
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
getAssistant().then((res) => {
|
||||
if (res.code === 200) {
|
||||
const data = res.result as unknown as string
|
||||
url.value = `${data}?userId=${userStore.userInfo.estimatedAchievement.wxId}&subjectGroup=${userStore.userInfo.estimatedAchievement.subjectGroup}&expectedScore=${userStore.userInfo.estimatedAchievement.expectedScore}&provinceName=${userStore.userInfo.estimatedAchievement.provinceName}&locationCode=${userStore.userInfo.estimatedAchievement.provinceCode}&token=${userStore.userInfo.token}×tamp=${new Date().getTime()}`
|
||||
}
|
||||
if (options.id) {
|
||||
url.value += `&reportId=${options.id}`
|
||||
}
|
||||
if (options.type) {
|
||||
url.value += `&reportType=${options.type}`
|
||||
}
|
||||
if (options.fileId) {
|
||||
url.value += `&fileId=${options.fileId}`
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
import { TabesItem } from '@/service/app/types'
|
||||
import { tabbarList } from '@/hooks/useTabbarList'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
defineProps({
|
||||
currentPage: {
|
||||
|
|
@ -49,6 +50,7 @@ defineProps({
|
|||
|
||||
// 安全区域底部高度
|
||||
const safeAreaBottom = ref(0)
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 计算TabBar总高度 (TabBar高度 + 安全区域高度)
|
||||
const tabbarTotalHeight = computed(() => {
|
||||
|
|
@ -59,9 +61,16 @@ const tabbarTotalHeight = computed(() => {
|
|||
|
||||
const changeItem = (item: TabesItem) => {
|
||||
if (item.navigatorItem) {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
})
|
||||
// 唯独ai有这个情况
|
||||
if (item.path === '/aiService-sub/index/index' && !userStore.isLoginFlag) {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/aiService-sub/index/newAi',
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: item.path,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
@click-left="handleClickLeft"
|
||||
>
|
||||
<template #title>
|
||||
<text class="text-[#1F2329] text-[36rpx] font-medium">新高考选科</text>
|
||||
<text class="text-[#1F2329] text-[36rpx] font-medium">授权登录</text>
|
||||
</template>
|
||||
</Navbar>
|
||||
<view class="flex flex-col justify-center items-center flex-1 pb-safe mt-[-100px]">
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
<view v-for="(item, index) in items" :key="index" class="suggestion-item">
|
||||
<view class="text-[32rpx] font-700">{{ item.title }}</view>
|
||||
<view class="mt-[20rpx] text-left" v-for="sonItem in item.items">
|
||||
<view class="text-[#000] text-[26rpx] font-700">{{ sonItem.title }}</view>
|
||||
<view class="mt-[10rpx] text-[26rpx] text-[#666]">
|
||||
{{ sonItem.description }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-[26rpx] font-400 mt-[10rpx] text-[#666]">
|
||||
{{ item.description instanceof Array ? item.description.join(',') : item.description }}
|
||||
</view>
|
||||
|
|
@ -15,7 +21,11 @@
|
|||
import TitleBar from './TitleBar.vue'
|
||||
defineProps({
|
||||
items: {
|
||||
type: Array<{ title: string; description: string | [] }>,
|
||||
type: Array<{
|
||||
title: string
|
||||
description?: string | []
|
||||
items?: { title: string; description?: string }[]
|
||||
}>,
|
||||
default: () => [],
|
||||
},
|
||||
title: {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
<template>
|
||||
<view class="mt-[30rpx] bg-white rounded-[20rpx] p-[30rpx]">
|
||||
<TitleBar :title="title" />
|
||||
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-center">
|
||||
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-left">
|
||||
<text
|
||||
class="text-[22rpx] px-[12rpx] py-[4rpx] rounded-[20rpx] bg-[rgba(250,142,35,0.15)] text-[#FA8E23]"
|
||||
>
|
||||
{{ item.notes }}
|
||||
</text>
|
||||
<view class="mt-[20rpx] text-center">
|
||||
<view class="mt-[20rpx] text-left">
|
||||
<view class="text-[#000] text-[26rpx] font-700">学习风格表现</view>
|
||||
<view class="mt-[10rpx]" v-for="(item, index) in item.learning_performance" :key="index">
|
||||
{{ item }}
|
||||
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.learning_performance" :key="index">
|
||||
{{ sonItem }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-[20rpx] text-center">
|
||||
<view class="mt-[20rpx] text-left">
|
||||
<view class="text-[#000] text-[26rpx] font-700">学习风格特点</view>
|
||||
<view class="mt-[10rpx]" v-for="(item, index) in item.features" :key="index">
|
||||
{{ item }}
|
||||
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.features" :key="index">
|
||||
{{ sonItem }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -14,33 +14,5 @@
|
|||
避免过度放松,保持适度的学习节奏。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col gap-[12rpx]">
|
||||
<view class="flex items-center gap-[10rpx]">
|
||||
<image
|
||||
src="https://api.static.ycymedu.com/src/images/home/diet-icon.png"
|
||||
mode="scaleToFill"
|
||||
class="w-[38rpx] h-[38rpx]"
|
||||
/>
|
||||
<text class="text-[32rpx] text-[#000] font-700">饮食建议</text>
|
||||
</view>
|
||||
<view class="text-[26rpx] text-[#666] font-400">
|
||||
保持规律作息,早睡早起,避免熬夜。 每天适当运动(如散步、跑步),保持精力充沛。
|
||||
避免过度放松,保持适度的学习节奏。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col gap-[12rpx]">
|
||||
<view class="flex items-center gap-[10rpx]">
|
||||
<image
|
||||
src="https://api.static.ycymedu.com/src/images/home/learn-icon.png"
|
||||
mode="scaleToFill"
|
||||
class="w-[38rpx] h-[38rpx]"
|
||||
/>
|
||||
<text class="text-[32rpx] text-[#000] font-700">学习建议</text>
|
||||
</view>
|
||||
<view class="text-[26rpx] text-[#666] font-400">
|
||||
保持规律作息,早睡早起,避免熬夜。 每天适当运动(如散步、跑步),保持精力充沛。
|
||||
避免过度放松,保持适度的学习节奏。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
</Navbar>
|
||||
|
||||
<view class="flex-1 overflow-auto relative">
|
||||
<view class="flex-1 overflow-auto relative flex flex-col">
|
||||
<view class="flex flex-col flex-1 overflow-auto pb-[20rpx]">
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="mt-[30rpx] mx-[24rpx]">
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
</Navbar>
|
||||
|
||||
<view class="flex-1 overflow-auto relative">
|
||||
<view class="flex-1 overflow-auto relative flex flex-col">
|
||||
<view class="flex flex-col flex-1 overflow-auto pb-[20rpx]">
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="mt-[30rpx] mx-[24rpx]">
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ import Checkbox from '@/pages-sub/components/check-group/Checkbox.vue'
|
|||
import CheckboxGroup from '@/pages-sub/components/check-group/CheckboxGroup.vue'
|
||||
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { useRouterDetail } from './useRouterDetail'
|
||||
import { useRouterDetail } from '@/pages-sub/composables/useRouterDetail'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<template>
|
||||
<scroll-view scroll-y class="bg-[#f8f8f8] h-screen">
|
||||
<view class="px-[32rpx] mt-[32rpx] flex flex-col gap-[16rpx]">
|
||||
<view class="px-[32rpx] mt-[32rpx] flex flex-col gap-[16rpx] pb-safe">
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
<script setup lang="ts">
|
||||
import { getMyBusReports } from '@/service/index/api'
|
||||
import { useUserStore } from '@/store'
|
||||
import { useRouterDetail } from './useRouterDetail'
|
||||
import { useRouterDetail } from '@/pages-sub/composables/useRouterDetail'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
export const useRouterDetail = (item: { reportsId: string; type: number }) => {
|
||||
// type=0 兴趣测评报告
|
||||
// =1 性格测评报告
|
||||
// =2 能力测评
|
||||
// =3 学生考试考虑
|
||||
// =4 学习风格
|
||||
// =5 学习技能
|
||||
// =6 SAS
|
||||
// =7 SDS
|
||||
// =8 SCL-90
|
||||
// =9 MHT
|
||||
/// =-1 价值观
|
||||
/// =-2 留学咨询
|
||||
let url = ''
|
||||
|
||||
if (item.type === 0) {
|
||||
url = `/pages-evaluation-sub/evaluate/academicReport/interestReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 1) {
|
||||
url = `/pages-evaluation-sub/evaluate/academicReport/characterReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 2) {
|
||||
url = `/pages-evaluation-sub/evaluate/academicReport/capabilityReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === -1) {
|
||||
url = `/pages-evaluation-sub/evaluate/academicReport/opinionAboutReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 6) {
|
||||
url = `/pages-evaluation-sub/evaluate/psychologicalReport/sasReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 7) {
|
||||
url = `/pages-evaluation-sub/evaluate/psychologicalReport/sdsReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 9) {
|
||||
// url = `/pages-evaluation-sub/evaluate/psychologicalReport/mhtReport?id=${item.reportsId}&type=${item.type}`
|
||||
uni.showToast({
|
||||
title: '开发中....',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
} else if (item.type === 4) {
|
||||
url = `/pages-evaluation-sub/evaluate/studyReport/learnStudyReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 5) {
|
||||
url = `/pages-evaluation-sub/evaluate/studyReport/learnSkillReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else if (item.type === 3) {
|
||||
url = `/pages-evaluation-sub/evaluate/studyReport/anxietyReport?id=${item.reportsId}&type=${item.type}`
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '开发中....',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
|
@ -466,6 +466,13 @@
|
|||
{
|
||||
"path": "index/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "六纬AI小助手"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "index/newAi",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "六纬AI小助手"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ interface NavigateToOptions {
|
|||
"/pages-evaluation-sub/evaluate/studyReport/anxietyReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/learnSkillReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/learnStudyReport" |
|
||||
"/aiService-sub/index/index";
|
||||
"/aiService-sub/index/index" |
|
||||
"/aiService-sub/index/newAi";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue