fix: 修复BUG

share-code
xjs 2026-06-09 09:48:56 +08:00
parent ce32206709
commit 3188de9982
17 changed files with 124 additions and 71 deletions

5
env/.env vendored
View File

@ -8,7 +8,6 @@ VITE_UNI_APPID = 'H57F2ACE4'
VITE_WX_APPID = 'wx487ac749c0e10be5' VITE_WX_APPID = 'wx487ac749c0e10be5'
# VITE_WX_VIDEO_ID= 'sphju9MCfZetYHP' 智能中专学校的 # VITE_WX_VIDEO_ID= 'sphju9MCfZetYHP' 智能中专学校的
# VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4' 深泉外国语 # VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4' 深泉外国语
# spheuUaMulnlpHH 深泉外国语学院 认证的
VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4' VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4'
# 微信小程序 AI # 微信小程序 AI
@ -20,6 +19,10 @@ VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4'
VITE_CLOUD_ENV_ID='cloud1-d9g4odcaqf6a2114f' VITE_CLOUD_ENV_ID='cloud1-d9g4odcaqf6a2114f'
VITE_CLOUD_BOT_ID='agent-wxai-9gi3rts96061202f' VITE_CLOUD_BOT_ID='agent-wxai-9gi3rts96061202f'
# 六纬中考通
# VITE_CLOUD_ENV_ID='cloud1-d3g5q6bq61a240786'
# VITE_CLOUD_BOT_ID='agent-wxai-4gl75um61026324f'
# h5部署网站的base配置到 manifest.config.ts 里的 h5.router.base # h5部署网站的base配置到 manifest.config.ts 里的 h5.router.base
# https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router # https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router
# 比如你要部署到 https://unibest.tech/doc/ ,则配置为 /doc/ # 比如你要部署到 https://unibest.tech/doc/ ,则配置为 /doc/

View File

@ -69,7 +69,7 @@ onLoad((options) => {
pageType.value = +options.type pageType.value = +options.type
pageId.value = options.id pageId.value = options.id
getAbilityDimension({ ScaleId: pageId.value }).then((resp) => { getAbilityDimension({query:{ ScaleId: pageId.value }}).then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
studyRecord.value = resp.result as { studyRecord.value = resp.result as {
description: string description: string

View File

@ -81,11 +81,14 @@ const studyRecord = ref({
hTag: '', hTag: '',
}) })
onLoad((options) => { onLoad((options:any) => {
pageType.value = +options.type pageType.value = +options.type
pageId.value = options.id pageId.value = options.id
getMBTIDimension({ ScaleId: pageId.value }).then((resp) => { console.log("------------",pageId.value);
getMBTIDimension({query:{ ScaleId: pageId.value }}).then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
studyRecord.value = resp.result as { studyRecord.value = resp.result as {
description: string description: string

View File

@ -20,8 +20,6 @@
<!-- 类型说明 --> <!-- 类型说明 -->
<TypeDetail :reportItems="studyRecord.reportItems" /> <TypeDetail :reportItems="studyRecord.reportItems" />
<!-- 适合职业 -->
<IntroMajor :tag="studyRecord.hTag" />
<!-- 兴趣分析与代表人物 --> <!-- 兴趣分析与代表人物 -->
<InterestingThings :tag="studyRecord.hTag" :description="studyRecord.description" /> <InterestingThings :tag="studyRecord.hTag" :description="studyRecord.description" />
</view> </view>
@ -34,7 +32,6 @@
<script setup lang="ts"> <script setup lang="ts">
import TypeDetail from '../components/TypeDetail.vue' import TypeDetail from '../components/TypeDetail.vue'
import InterestRadar from '../components/interestChart/InterestRadar.vue' import InterestRadar from '../components/interestChart/InterestRadar.vue'
import IntroMajor from '../components/IntroMajor.vue'
import { getHollandDimensionInfo } from '@/service' import { getHollandDimensionInfo } from '@/service'
import InterestingThings from '../components/InterestingThings.vue' import InterestingThings from '../components/InterestingThings.vue'
@ -67,7 +64,7 @@ const pageId = ref(0)
const studyRecord = ref({ description: '', title: '', picCharts: {}, reportItems: [], hTag: '' }) const studyRecord = ref({ description: '', title: '', picCharts: {}, reportItems: [], hTag: '' })
onLoad((options) => { onLoad((options:any) => {
pageType.value = +options.type pageType.value = +options.type
pageId.value = options.id pageId.value = options.id

View File

@ -79,7 +79,7 @@ onLoad((options) => {
pageType.value = +options.type pageType.value = +options.type
pageId.value = options.id pageId.value = options.id
getOpinionAbout({ ScaleId: pageId.value }).then((resp) => { getOpinionAbout({query:{ ScaleId: pageId.value }}).then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
studyRecord.value = resp.result as { studyRecord.value = resp.result as {
description: string description: string

View File

@ -47,16 +47,23 @@ const props = defineProps({
}, },
}) })
const personList = ref([]) const personList = ref<any[]>([])
const tag = toRef(props, 'tag')
watch( watch(
() => props.tag, tag,
(newV) => { (newV) => {
// getTagMapPerson({ tag: newV }).then((resp) => { if (!newV)
// if (resp.code === 200) { return
// personList.value = resp.result as any[]
// } getTagMapPerson({ query: { tag: newV } }).then((resp) => {
// }) if (resp.code === 200) {
personList.value = resp.result as any[]
}
})
},
{
immediate: true,
}, },
) )
</script> </script>

View File

@ -150,7 +150,7 @@ const handleCheckChange = (value: any[]) => {
const calcScore = () => { const calcScore = () => {
let _type = questions.value[currentIndex.value].type let _type = questions.value[currentIndex.value].type
let _name = questions.value[currentIndex.value].answer[0].tag let _name = questions.value[currentIndex.value].answer[0].tag
let _options = questions.value[currentIndex.value].answer.filter((answer) => { let _options = questions.value[currentIndex.value].answer.filter((answer:any) => {
return checkedList.value.includes(answer.key) return checkedList.value.includes(answer.key)
}) })
@ -168,7 +168,7 @@ const calcScore = () => {
// //
const currentIndex = ref(0) const currentIndex = ref(0)
const questions = ref([]) const questions = ref<any[]>([])
const questionType = ref(-1) const questionType = ref(-1)
const questionName = ref('') const questionName = ref('')
@ -176,7 +176,7 @@ const useTime = ref('')
const quesApplication = ref('') const quesApplication = ref('')
const isLoading = ref(false) const isLoading = ref(false)
onLoad((options) => { onLoad((options:any) => {
pageName.value = options.name pageName.value = options.name
pageId.value = options.id pageId.value = options.id
getAssessmentQuestions({query:{ ScaleId: pageId.value }}).then((res) => { getAssessmentQuestions({query:{ ScaleId: pageId.value }}).then((res) => {
@ -225,12 +225,12 @@ const handleSubmit = () => {
} }
isLoading.value = true isLoading.value = true
let params = { let params:any = {
customId: userStore.userInfo.wxId, customId: userStore.userInfo.wxId,
scaleId: pageId.value, scaleId: pageId.value,
inputs: [], inputs: [],
} }
let _inputs = [] let _inputs:any[] = []
answerMap.forEach((value, key) => { answerMap.forEach((value, key) => {
_inputs.push({ type: key, name: value.name, value: value.value }) _inputs.push({ type: key, name: value.name, value: value.value })
}) })

View File

@ -57,6 +57,7 @@ const httpInterceptor = {
} else if (token) { } else if (token) {
options.header.Authorization = `Bearer ${token}` options.header.Authorization = `Bearer ${token}`
} }
console.log(import.meta.env.VITE_WX_APPID)
return options return options
}, },
} }

View File

@ -1,41 +1,62 @@
<script lang="ts" setup> <script lang="ts" setup>
const activeMore = ref(false) const props = defineProps({
defineProps({
paragraph: { paragraph: {
type: String, type: String,
default: `` default: ``,
} },
}) })
const activeMore = ref(false)
const visible = ref(false) const visible = ref(false)
const onOverlayClick = () => { function onOverlayClick() {
visible.value = false visible.value = false
} }
const paragraphText = computed(() => props.paragraph)
const previewParagraph = computed(() => {
if (activeMore.value)
return paragraphText.value
return paragraphText.value.slice(0, 100)
})
function formatParagraph(paragraph: string) {
return paragraph.replace(/\r\n|\n/g, '<br/>')
}
const previewHtml = computed(() => formatParagraph(previewParagraph.value))
const fullHtml = computed(() => formatParagraph(paragraphText.value))
</script> </script>
<template> <template>
<view class="flex"> <view class="flex">
<view class="text-[26rpx] text-[#666] fake-placeholder"> <view class="fake-placeholder text-[26rpx] text-[#666]">
<view class="line-clamp-3">{{ paragraph }}</view> <view class="line-clamp-3">
<view class="text-[#3287FF] text-[26rpx] flex items-center justify-center" @click="visible = true"> <rich-text :nodes="previewHtml" />
{{ activeMore ? "收起" : '更多' }} <sar-icon name="down"></sar-icon></view> </view>
<view class="flex items-center justify-center text-[26rpx] text-[#3287FF]" @click="visible = true">
{{ activeMore ? '收起' : '更多' }}
<sar-icon name="down" />
</view>
</view> </view>
</view> </view>
<sar-popup :visible="visible" effect="slide-bottom" @overlay-click="onOverlayClick"> <sar-popup :visible="visible" effect="slide-bottom" @overlay-click="onOverlayClick">
<view class="bg-white rounded-[24rpx_24rpx_0_0] px-[30rpx] pb-safe pt-[30rpx]"> <view class="rounded-[24rpx_24rpx_0_0] bg-white px-[30rpx] pt-[30rpx] pb-safe">
<view class="text-[34rpx] font-500 flex items-center justify-between mb-[30rpx]"> <view class="mb-[30rpx] flex items-center justify-between text-[34rpx] font-500">
<view>院校简介</view> <view>院校简介</view>
<view class="w-[36rpx] h-[36rpx] flex items-center" @click="onOverlayClick"> <view class="h-[36rpx] w-[36rpx] flex items-center" @click="onOverlayClick">
<image <image
src="https://lwzk.ycymedu.com/img/tianbao/tb_guanbi.png" src="https://lwzk.ycymedu.com/img/tianbao/tb_guanbi.png"
mode="scaleToFill" mode="scaleToFill"
class="w-[36rpx] h-[36rpx]" class="h-[36rpx] w-[36rpx]"
/> />
</view> </view>
</view> </view>
<view class="text-[#333] text-[26rpx] max-h-[66vh] overflow-y-auto pb-[44rpx]">{{ paragraph }}</view> <view class="max-h-[66vh] overflow-y-auto pb-[44rpx] text-[26rpx] text-[#333]">
<rich-text :nodes="fullHtml" />
</view>
</view> </view>
</sar-popup> </sar-popup>
</template> </template>

View File

@ -79,10 +79,10 @@ onLoad(() => {
收藏 收藏
</view> </view>
</view> </view>
<swiper class="basis-full h-[126rpx] grid grid-cols-3" circular :autoplay="true" :indicator="false" v-if="schoolDetail.imageList" <swiper class="basis-full h-[126rpx] flex mb-[20rpx]" circular :autoplay="true" :indicator="false" v-if="schoolDetail.imageList"
:display-multiple-items="schoolDetail.imageList.length > 2 ? 3 : 1"> :display-multiple-items="3">
<swiper-item v-for="(item, index) in schoolDetail.imageList" :key="item" class="flex justify-center"> <swiper-item v-for="(item, index) in schoolDetail.imageList" :key="item" class="flex justify-center">
<image :src="item" mode="scaleToFill" class="w-full h-full mx-[4rpx] rounded-[8rpx]" <image :src="item" mode="aspectFill" class="w-full h-full mx-[4rpx] rounded-[8rpx]"
@click.stop="handlePreviewImage(item, index)" /> @click.stop="handlePreviewImage(item, index)" />
</swiper-item> </swiper-item>
</swiper> </swiper>

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useRouterDetail } from '@/pages-sub/me/useRouterDetail' import { useRouterDetail } from '@/pages-sub/me/useRouterDetail'
import { getMyBusReports } from '@/service' import { deleteBusReport, getMyBusReports } from '@/service'
import { useUserStore } from '@/store' import { useUserStore } from '@/store'
definePage({ definePage({
@ -10,7 +10,24 @@ definePage({
}) })
const userStore = useUserStore() const userStore = useUserStore()
const list = ref([]) const list = ref<any[]>([])
function deleteReport(id: string) {
uni.showModal({
title: '确认需要删除吗?',
confirmText: '删除',
success: ({ confirm }) => {
if (!confirm)
return
deleteBusReport({ data: { id } }).then((res) => {
if (res.code === 200) {
list.value = list.value.filter(item => item.reportsId !== id)
}
})
},
})
}
onShow(() => { onShow(() => {
getMyBusReports({query:{ CustomId: userStore.userInfo?.userExtend.wxId }}).then((res) => { getMyBusReports({query:{ CustomId: userStore.userInfo?.userExtend.wxId }}).then((res) => {
@ -23,17 +40,16 @@ onShow(() => {
<template> <template>
<view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-y-auto"> <view class="bg-[#F8F8F8] h-screen px-[30rpx] overflow-y-auto">
<view v-for="(val, index) in list" :key="index" class="flex first:mt-[30rpx] not-last:mb-[20rpx]" v-if="list.length > 0" @click="useRouterDetail(val)"> <view v-for="(val, index) in list" :key="index" class="flex first:mt-[30rpx] not-last:mb-[20rpx]" v-if="list.length > 0" @click.stop="useRouterDetail(val)">
<view <view
class="text-[30rpx] grid gap-[8rpx] bg-white px-[30rpx] py-[20rpx] rounded-[16rpx] w-full flex items-center justify-between"> class="text-[30rpx] grid gap-[8rpx] bg-white px-[30rpx] py-[20rpx] rounded-[16rpx] w-full flex items-center justify-between">
<view class=""> <view class="">
<view class="text-[32rpx] font-600">{{ val.title }}</view> <view class="text-[32rpx] font-600">{{ val.title }}</view>
<view class="text-[#666] text-[24rpx]"> <view class="text-[#666] text-[24rpx]">
{{ val.createTime }} {{ val.createTime }}
</view> </view>
</view> </view>
<view class="flex items-center border-[2rpx] border-[#ccc] border-solid rounded-[8rpx] px-[12rpx] py-[4rpx]"> <view class="flex items-center border-[2rpx] border-[#ccc] border-solid rounded-[8rpx] px-[12rpx] py-[4rpx]" @click.stop="deleteReport(val.reportsId)">
<view class="w-[32rpx] h-[32rpx] flex items-center"> <view class="w-[32rpx] h-[32rpx] flex items-center">
<image src="https://lwzk.ycymedu.com/img/qt/wd_shanchu.png" <image src="https://lwzk.ycymedu.com/img/qt/wd_shanchu.png"
class="w-[32rpx] h-[32rpx]" /> class="w-[32rpx] h-[32rpx]" />

View File

@ -58,7 +58,7 @@ onShow(() => {
<view class="text-[32rpx] font-600">{{ val.title }}</view> <view class="text-[32rpx] font-600">{{ val.title }}</view>
<view <view
class="text-[24rpx] text-[#333] bg-[url(https://lwzk.ycymedu.com/img/qt/wd_jianbian.png)] bg-no-repeat bg-origin-border bg-left px-[12rpx]"> class="text-[24rpx] text-[#333] bg-[url(https://lwzk.ycymedu.com/img/qt/wd_jianbian.png)] bg-no-repeat bg-origin-border bg-left px-[12rpx]">
{{ val.totalScore }} · {{ val.batchName }}</view> {{ val.totalScore }}</view>
<view class="flex items-center justify-between"> <view class="flex items-center justify-between">
<view class="text-[#666] text-[24rpx]"> <view class="text-[#666] text-[24rpx]">
{{ val.createTime }} {{ val.createTime }}

View File

@ -31,7 +31,7 @@ const schools = ref(content.schools)
:class="`${val.tags === '稳' ? 'text-[#FA8E23] bg-[#ffeede]' : val.tags === '保' ? 'bg-[#dcf6f0] text-[#15C496]' : 'bg-[#fce5e3] text-[#EB5241]'}`"> :class="`${val.tags === '稳' ? 'text-[#FA8E23] bg-[#ffeede]' : val.tags === '保' ? 'bg-[#dcf6f0] text-[#15C496]' : 'bg-[#fce5e3] text-[#EB5241]'}`">
{{ val.tags }}</view> {{ val.tags }}</view>
{{ val.schoolName }}</view> {{ val.schoolName }}</view>
<view class="text-[24rpx] text-[#333]">{{new Date().getFullYear()}}计划招生{{ val.planCount }}</view> <view class="text-[24rpx] text-[#333]">{{ val.year }}计划招生{{ val.planCount }}</view>
<view class="text-[#333] text-[24rpx]"> <view class="text-[#333] text-[24rpx]">
{{ val.region }}·{{ val.schoolNature }} {{ val.region }}·{{ val.schoolNature }}

View File

@ -64,7 +64,7 @@ onBackPress(() => {
:class="`${val.tags === '稳' ? 'text-[#FA8E23] bg-[#ffeede]' : val.tags === '保' ? 'bg-[#dcf6f0] text-[#15C496]' : 'bg-[#fce5e3] text-[#EB5241]'}`"> :class="`${val.tags === '稳' ? 'text-[#FA8E23] bg-[#ffeede]' : val.tags === '保' ? 'bg-[#dcf6f0] text-[#15C496]' : 'bg-[#fce5e3] text-[#EB5241]'}`">
{{ val.tags }}</view> {{ val.tags }}</view>
{{ val.schoolName }}</view> {{ val.schoolName }}</view>
<view class="text-[24rpx] text-[#333]">{{new Date().getFullYear()}}计划招生{{ val.planCount }}</view> <view class="text-[24rpx] text-[#333]">{{ val.year }}计划招生{{ val.planCount }}</view>
<!-- <view class="flex items-center"> <!-- <view class="flex items-center">
<view class="rgb(173 116 116) bg-[#F8F8F8] rounded-[8rpx] px-[10rpx] py-[4rpx]" <view class="rgb(173 116 116) bg-[#F8F8F8] rounded-[8rpx] px-[10rpx] py-[4rpx]"
v-for="value in 2" :key="value">重点高中</view> v-for="value in 2" :key="value">重点高中</view>

View File

@ -65,7 +65,7 @@ onLoad((options) => {
</template> </template>
</sar-navbar> </sar-navbar>
<view class="mx-[30rpx] pb-safe flex-1 flex flex-col overflow-hidden"> <view class="mx-[30rpx] pb-safe flex-1 flex flex-col overflow-hidden">
<MxSearch v-model:searchText="keywords" root-class="bg-white! border-solid border-1 border-[#1580FF]" placeholder="输入高中名称" /> <MxSearch v-model:searchText="keywords" root-class="bg-white! border-solid border-1 border-[#1580FF] p-[20rpx_20rpx_20rpx_30rpx]" placeholder="输入高中名称" />
<view class="flex-1 overflow-y-auto"> <view class="flex-1 overflow-y-auto">
<view class="py-[29rpx] border-b border-b-solid border-b-[#EDEDED] text-[30rpx] text-[#333] flex items-center justify-between" v-for="(val,index) in schools" :key="val.id" @click="handleActiveSchool(val.schoolName)"> <view class="py-[29rpx] border-b border-b-solid border-b-[#EDEDED] text-[30rpx] text-[#333] flex items-center justify-between" v-for="(val,index) in schools" :key="val.id" @click="handleActiveSchool(val.schoolName)">
<view :class="`${userInfo.userExtend.schoolName === val.schoolName ? 'text-[#1580FF]' : ''}`">{{ val.schoolName }}</view> <view :class="`${userInfo.userExtend.schoolName === val.schoolName ? 'text-[#1580FF]' : ''}`">{{ val.schoolName }}</view>

View File

@ -292,7 +292,7 @@ onShow(() => {
<view class="relative h-[280rpx] rounded-[18rpx]"> <view class="relative h-[280rpx] rounded-[18rpx]">
<image <image
:src="item.coverUrl" :src="item.coverUrl"
mode="scaleToFill" mode="aspectFit"
class="h-full w-full" class="h-full w-full"
/> />
<view v-if="item.type === 'live'" class="absolute bottom-0 h-[48rpx] w-full flex items-center justify-between rounded-[0_0_18rpx_18rpx] bg-black bg-opacity-50"> <view v-if="item.type === 'live'" class="absolute bottom-0 h-[48rpx] w-full flex items-center justify-between rounded-[0_0_18rpx_18rpx] bg-black bg-opacity-50">
@ -323,7 +323,7 @@ onShow(() => {
</view> </view>
</view> </view>
<view class="ml-[20rpx] mt-[20rpx] text-[34rpx] text-[#333] font-500"> <view class="mx-[20rpx] mt-[20rpx] text-[34rpx] text-[#333] font-500 overflow-hidden text-ellipsis whitespace-nowrap">
{{ item.title }} {{ item.title }}
</view> </view>

View File

@ -13,6 +13,7 @@ export const getHollandDimensionInfo = (options: any) => {
return request<API.Response>("/api/busScale/GetHollandDimension", { method: "GET", ...options }) return request<API.Response>("/api/busScale/GetHollandDimension", { method: "GET", ...options })
} }
export const getOpinionAbout = (options: any) => { export const getOpinionAbout = (options: any) => {
return request<API.Response>("/api/busScale/GetOpinionAbout", { method: "GET", ...options }) return request<API.Response>("/api/busScale/GetOpinionAbout", { method: "GET", ...options })
} }
@ -31,13 +32,17 @@ export const sysDictType = (options: any) => {
export const getTagMapPerson = (options: any) => { export const getTagMapPerson = (options: any) => {
return request<API.Response>("/api/busScale/getTagMapPerso", { method: "GET", ...options }) return request<API.Response>("/api/busScale/getTagMapPerson", { method: "GET", ...options })
} }
export const getMyBusReports = (options: any) => { export const getMyBusReports = (options: any) => {
return request<API.Response>('/api/busScale/GetBusCustomReports/v2', { method: "GET", ...options }); return request<API.Response>('/api/busScale/GetBusCustomReports/v2', { method: "GET", ...options });
} }
export const deleteBusReport = (options: any) => {
return request<API.Response>('/api/busScale/delete', { method: "POST", ...options });
}
export const getSessionKey = (options: any) => { export const getSessionKey = (options: any) => {
return request<API.Response>('/api/sysWxOpen/wxOpenId', { method: "GET", ...options }); return request<API.Response>('/api/sysWxOpen/wxOpenId', { method: "GET", ...options });
} }