feat: 测评接口对接

master
xjs 2025-03-24 18:01:15 +08:00
parent 6f25dee2fa
commit 0816b72919
24 changed files with 642 additions and 128 deletions

View File

@ -91,6 +91,7 @@ export default defineManifestConfig({
subPackages: true,
},
requiredPrivateInfos: ['getLocation'],
requiredBackgroundModes: ['audio'],
// __usePrivacyCheck__: true,
},
uniStatistics: {

View File

@ -82,5 +82,8 @@ export default defineUniPages({
'scope.userLocation': {
desc: '你的位置信息将用于小程序位置接口的效果展示',
},
'scope.record': {
desc: '你的录音功能将用于小程序录音接口的效果展示',
},
},
})

View File

@ -0,0 +1,25 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '小纬',
},
needLogin: true,
}
</route>
<template>
<web-view src="http://localhost:3000/" />
</template>
<script setup lang="ts">
onLoad(() => {
const manager = uni.getRecorderManager()
manager.start({
format: 'mp3',
})
manager.onStop((e) => {
console.log('录音结束')
})
})
</script>
<style lang="scss" scoped></style>

View File

@ -35,7 +35,7 @@ import { TabesItem } from '@/service/app/types'
import { tabbarList } from '@/hooks/useTabbarList'
import { ref, computed, onMounted } from 'vue'
const props = defineProps({
defineProps({
currentPage: {
type: Number,
default: 0,
@ -58,9 +58,15 @@ const tabbarTotalHeight = computed(() => {
})
const changeItem = (item: TabesItem) => {
if (item.navigatorItem) {
uni.navigateTo({
url: item.path,
})
} else {
uni.switchTab({
url: item.path,
})
}
}
onMounted(() => {

View File

@ -4,7 +4,7 @@
v-for="item in subMenus"
:key="item.id"
class="flex items-center justify-center flex-col"
@click="goPath(item.path)"
@click="goPath(item.path, item.isTab)"
>
<image :src="item.icon" class="w-[88rpx] h-[88rpx]" mode="widthFix"></image>
<view class="text-[22rpx] text-[#303030] mt-[8rpx]">{{ item.name }}</view>
@ -19,12 +19,14 @@ const subMenus = [
name: '找大学',
path: '/pages-sub/home/college/index',
icon: '/static/images/home/college.svg',
isTab: false,
},
{
id: 2,
name: '查专业',
path: '/pages-sub/home/major/index',
icon: '/static/images/home/major.svg',
isTab: false,
},
//
{
@ -32,6 +34,7 @@ const subMenus = [
name: '看职业',
path: '/pages-sub/home/career/index',
icon: '/static/images/home/career.svg',
isTab: false,
},
// 线
{
@ -46,6 +49,7 @@ const subMenus = [
name: '查位次',
path: '/pages-evaluation-sub/rank/index',
icon: '/static/images/home/rank.svg',
isTab: false,
},
//
{
@ -53,6 +57,7 @@ const subMenus = [
name: '查扩缩招',
path: '/pages-sub/home/expand/index',
icon: '/static/images/home/expand.svg',
isTab: false,
},
//
{
@ -60,6 +65,7 @@ const subMenus = [
name: '专业测评',
path: '/pages/evaluation/index/index',
icon: '/static/images/home/evaluation.svg',
isTab: true,
},
//
{
@ -67,12 +73,19 @@ const subMenus = [
name: '大学甄别',
path: '/pages-sub/home/distinguish/index',
icon: '/static/images/home/distinguish.svg',
isTab: false,
},
]
const goPath = (path: string) => {
const goPath = (path: string, isTab: boolean) => {
if (isTab) {
uni.switchTab({
url: path,
})
} else {
uni.navigateTo({
url: path,
})
}
}
</script>

View File

@ -24,11 +24,12 @@ sysDictType({ id: 619330547859525 }).then((res) => {
},
{
id: 2,
path: '/pages/aiService/index/index',
path: '/aiService-sub/index/index',
icon: '/static/tabBar/ai.png',
selectIcon: '/static/tabBar/ai-active.png',
text: '',
centerItem: true,
navigatorItem: true,
},
{
id: 1,

View File

@ -65,6 +65,9 @@
},
"requiredPrivateInfos": [
"getLocation"
],
"requiredBackgroundModes": [
"audio"
]
},
"mp-alipay": {

View File

@ -1,55 +0,0 @@
<template>
<view class="">
<l-echart ref="echart"></l-echart>
</view>
</template>
<script setup>
import lEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
const echarts = require('./uni_modules/lime-echart/static/echarts.min')
const echart = ref(null)
onMounted(() => {
echart.value.init(echarts, (chart) => {
let option = {
title: {
text: '某站点用户访问来源',
subtext: '纯属虚构',
left: 'center',
},
tooltip: {
trigger: 'item',
},
legend: {
orient: 'vertical',
left: 'left',
},
series: [
{
name: '访问来源',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: '搜索引擎' },
{ value: 735, name: '直接访问' },
{ value: 580, name: '邮件营销' },
{ value: 484, name: '联盟广告' },
{ value: 300, name: '视频广告' },
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
}
chart.setOption(option)
})
})
</script>
<style lang="scss" scoped></style>

View File

@ -20,7 +20,7 @@
<!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold" />
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold icon-class" />
</view>
<slot name="left"></slot>
</view>

View File

@ -24,7 +24,7 @@
<view class="flex flex-col text-[#000] ml-[32rpx]">
<text class="mb-[12rpx] font-normal text-[28rpx]">专属客服为您服务</text>
<view class="flex items-center">
<text class="text-[44rpx] font-medium whitespace-nowrap">400-621-1003</text>
<text class="text-[44rpx] font-medium whitespace-nowrap">{{ phoneNumber }}</text>
<view
@click="makePhoneCall"
class="rounded-[8rpx] w-[88rpx] h-[44rpx] btn-border text-[#1580FF] text-[24rpx] font-normal flex items-center justify-center ml-[44rpx]"
@ -38,15 +38,12 @@
<view class="px-[168rpx] pt-[48rpx]">
<image
class="w-[352rpx] h-[352rpx]"
src="@/pages-sub/static/images/customerService/qrCode.svg"
src="https://api.static.ycymedu.com/images/kf.jpg"
:show-menu-by-longpress="true"
></image>
<view class="flex items-center justify-center mt-[34rpx]">
<image
class="w-[28rpx] h-[28rpx]"
src="@/pages-sub/static/images/customerService/vector.svg"
></image>
<view class="i-carbon-fingerprint-recognition text-[#E75859] text-[28rpx]"></view>
<text class="text-[24rpx] text-[#000] font-normal ml-[12rpx]">
扫码添加客服企业微信
</text>
@ -60,10 +57,12 @@
<script lang="ts" setup>
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
const phoneNumber = '400-621-1003'
const makePhoneCall = () => {
uni
.makePhoneCall({
phoneNumber: '400-621-1003',
phoneNumber: phoneNumber,
})
.catch((err) => {
console.error(err)

View File

@ -0,0 +1,292 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="flex flex-col h-screen relative">
<Navbar
safeAreaInsetTop
:bordered="false"
leftArrow
@clickLeft="handleBack"
bg-color="transparent"
>
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">{{ pageName }}</text>
</template>
</Navbar>
<view class="h-full w-full custom-bg absolute top-0 left-0 -z-1"></view>
<view class="question-container flex-1 overflow-hidden mt-[30rpx]">
<view
v-for="(question, index) in questions"
:key="index"
:class="`card-container ${currentIndex === index ? 'current-card' : ''}`"
>
<view class="px-[30rpx] py-[40rpx] flex flex-col card-content">
<text class="mb-[30rpx] text-[34rpx] font-semibold">
{{ index + 1 }}{{ question.title }}
</text>
<CheckboxGroup
v-model="checkedList"
checked-color="#1580FF"
@change="handleCheckChange"
:max="questionType === 0 ? 1 : 0"
>
<Checkbox
v-for="item in question.answer"
:key="item.key"
:name="item.key"
cell
shape="button"
class="custom-checkbox"
>
{{ item.name }}
</Checkbox>
</CheckboxGroup>
</view>
</view>
<view class="pb-safe mt-auto px-[30rpx]">
<button class="next-question" :disabled="disableBtn" @click="handleNextQuestion">
{{ currentIndex === questions.length - 1 ? '提交' : '下一题' }}
({{ currentIndex + 1 }}/{{ questions.length }})
</button>
</view>
</view>
</view>
<MessageBox v-model:show="show" title="" :defaultPadding="false">
<template>
<view class="custom-background">
<view class="px-[32rpx] pt-[48rpx]">
<text class="text-[#000] text-[48rpx] font-semibold">{{ questionName }}</text>
<view
class="bg-[rgba(21,128,255,0.1)] flex items-center gap-[10rpx] text-[24rpx] text-[#444] px-[24rpx] py-[6rpx] w-max rounded-[10rpx] mt-[10rpx]"
>
<view class="i-carbon-time-filled text-[#1580FF]"></view>
<view>{{ useTime }}</view>
</view>
<view class="text-[30rpx] my-[40rpx]">{{ quesApplication }}</view>
</view>
<view
class="text-center py-[26rpx] text-[#1580FF] text-[36rpx] font-medium start-border"
@click="show = false"
>
开始答题
</view>
</view>
</template>
</MessageBox>
</template>
<script setup lang="ts">
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
import MessageBox from '../components/messageBox/MessageBox.vue'
import {
getAssessmentQuestions,
getBusScaleDescription,
saveBusScaleAnswer,
} from '@/service/index/api'
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'
const userStore = useUserStore()
const pageName = ref('')
const pageId = ref(-1)
const show = ref(true)
const handleBack = () => {
uni.navigateBack()
}
const checkedList = ref([])
const answerMap = new Map()
const disableBtn = ref(true)
const handleCheckChange = (value: any[]) => {
if (value.length === 0) {
disableBtn.value = true
return
} else {
disableBtn.value = false
}
let _type = questions.value[currentIndex.value].type
let _name = questions.value[currentIndex.value].answer[0].tag
if (answerMap.has(_type)) {
let val = answerMap.get(_type)
val.value += value.length
answerMap.set(_type, val)
} else {
answerMap.set(_type, { name: _name, value: value.length })
}
}
//
const currentIndex = ref(0)
const questions = ref([])
const questionType = ref(-1)
const questionName = ref('')
const useTime = ref('')
const quesApplication = ref('')
onLoad((options) => {
pageName.value = options.name
pageId.value = options.id
getAssessmentQuestions({ ScaleId: pageId.value }).then((res) => {
if (res.code === 200) {
let result = res.result as {
name: string
description: string
go: number
questionsType: number
scaleQuestions: any[]
}
questions.value = result.scaleQuestions
questionType.value = result.questionsType
}
})
getBusScaleDescription({ ScaleId: pageId.value }).then((res) => {
if (res.code === 200) {
let result = (
res.result as {
busScaleDescriptions: any[]
}
).busScaleDescriptions[0]
questionName.value = result.title
quesApplication.value = result.application
useTime.value = result.usesTime
}
})
})
const handleNextQuestion = () => {
if (disableBtn.value) return
disableBtn.value = true
checkedList.value = []
if (currentIndex.value === questions.value.length - 1) {
handleSubmit()
} else {
currentIndex.value++
}
}
const handleSubmit = () => {
let params = {
customId: userStore.userInfo.estimatedAchievement.wxId,
scaleId: pageId.value,
inputs: [],
}
let _inputs = []
answerMap.forEach((value, key) => {
_inputs.push({ type: key, name: value.name, value: value.value })
})
params.inputs = _inputs
saveBusScaleAnswer(params).then((res) => {
if (res.code === 200) {
uni.navigateBack()
} else {
uni.showToast({
title: res.message,
icon: 'none',
})
}
})
}
</script>
<style scoped lang="scss">
.custom-bg {
background: linear-gradient(184deg, #0d79fc 0%, #2186fc 56%, #b3ebfc 100%);
}
.custom-background {
background: linear-gradient(180deg, #d8e7fc 0%, rgba(255, 255, 255, 0) 20%);
border-radius: 24rpx;
}
:deep(.icon-class) {
color: #fff !important;
}
.start-border {
border-top: 1rpx solid #dedede;
}
.next-question {
background: #1580ff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 22rpx 0;
line-height: 1;
color: #fff;
text-align: center;
}
:deep(.custom-checkbox) {
//
.checkbox {
width: 100%;
height: 80rpx;
background-color: #f6f7f8;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 400;
color: #303030;
border: 2rpx solid #f6f7f8;
}
.checkbox__icon {
display: none;
}
}
:deep(.checkbox-group) {
display: grid !important;
gap: 16rpx;
// padding: 32rpx 16rpx 16rpx;
}
:deep(.checkbox-active) {
background: rgba(21, 128, 255, 0.05) !important;
border: 2rpx solid #1580ff !important;
border: 2rpx solid #1580ff;
.checkbox__label {
color: #2a82e4 !important;
}
}
.question-container {
position: relative;
display: flex;
flex-direction: column;
}
.card-container {
background: rgb(140, 199, 245);
width: calc(100% - 60rpx);
border-radius: 20rpx;
position: absolute;
transform: translate3d(100vw, 0, 0);
margin: 0 30rpx;
}
.current-card {
background: #fff;
z-index: 1;
transform: translate3d(0, 0, 0);
transition: all 0.3s ease;
}
</style>

View File

@ -45,16 +45,48 @@
<view class="h-[16rpx] bg-[#F8F8F8] my-[40rpx]"></view>
<scroll-view scroll-y class="flex flex-col flex-1 pb-safe px-[32rpx] w-auto" enable-flex>
<WXXTable :data="tableData">
<WXXTableCol
prop="universityName"
label="院校名称"
width="37%"
colClass="py-[24rpx]!"
></WXXTableCol>
<WXXTableCol prop="locationName" label="办学地点" width="35%"></WXXTableCol>
<WXXTableCol prop="type" label="院校鉴别" width="28%"></WXXTableCol>
</WXXTable>
<view>
<!-- 头部 -->
<view
class="flex items-center justify-between bg-[#F7F7F7] text-[20rpx] text-[#333] border-header"
>
<view class="flex items-center py-[16rpx] pl-[42rpx] w-[37%] border-right">
<text>院校名称</text>
</view>
<view class="flex items-center justify-center py-[16rpx] w-[35%] border-right">
<text>办学地点</text>
</view>
<view class="flex items-center justify-center py-[16rpx] w-[28%]">
<text>院校鉴别</text>
</view>
</view>
<view>
<view
class="flex items-center justify-between text-[22rpx] text-[#333] border-body"
v-for="(item, index) in tableData"
:key="index"
>
<view class="flex items-center py-[16rpx] pl-[42rpx] w-[37%] border-right">
<text>{{ item.universityName }}</text>
</view>
<view class="flex items-center justify-center py-[16rpx] w-[35%] border-right">
<text>{{ item.locationName }}</text>
</view>
<view class="flex items-center justify-center py-[16rpx] w-[28%]">
<text :style="{ color: item.type === 1 ? '#FF4242' : '#000' }">
{{ item.type === 1 ? '虚假大学' : '真实大学' }}
</text>
</view>
</view>
<view
class="flex items-center justify-center text-[22rpx] text-[#333] border-body py-[16rpx]"
v-if="tableData.length === 0"
>
暂无数据
</view>
</view>
</view>
</scroll-view>
<ActionSheet v-model:show="show" title="">
@ -82,17 +114,13 @@
<script lang="ts" setup>
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
import WXXTable from '@/pages-sub/components/table/Table.vue'
import WXXTableCol from '@/pages-sub/components/table/TableCol.vue'
import Region from '@/pages-sub/home/components/Region.vue'
import { useUserStore } from '@/store'
import { verifyUniversity } from '@/service/index/api'
const userStore = useUserStore()
const searchParams = ref({
locationCode: userStore.userInfo.estimatedAchievement.provinceCode || '370000',
locationName: userStore.userInfo.estimatedAchievement.provinceName || '山东省',
locationCode: '',
locationName: '',
collegeName: '',
})
const show = ref(false)
@ -120,12 +148,9 @@ const getUniversityList = () => {
}).then((res) => {
if (res.code === 200) {
let result = res.result as any[]
tableData.value = result.map((item) => {
return {
...item,
type: item.type === 1 ? '虚假大学' : '真实大学',
}
})
tableData.value = result
} else {
tableData.value = []
}
})
}
@ -144,4 +169,17 @@ onLoad(() => {
@import '@/pages-evaluation-sub/styles/navbar-background.scss';
@import '@/pages-sub/home/styles/search-input.scss';
@import '@/pages-sub/home/styles/picker-view-btn.scss';
.border-right {
border-right: 2rpx solid #eeeeee;
}
.border-header {
border: 2rpx solid #eeeeee;
}
.border-body {
border-bottom: 2rpx solid #eeeeee;
border-left: 2rpx solid #eeeeee;
border-right: 2rpx solid #eeeeee;
}
</style>

View File

@ -1,3 +0,0 @@
<svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.60748 11.523C9.60748 11.6659 9.55621 11.8029 9.46494 11.9039C9.37368 12.0049 9.2499 12.0617 9.12083 12.0617C8.99176 12.0617 8.86798 12.0049 8.77672 11.9039C8.68545 11.8029 8.63418 11.6659 8.63418 11.523V9.26151C8.63418 7.59624 7.4139 6.24614 5.90871 6.24614C4.40352 6.24614 3.1834 7.59624 3.1834 9.26151V11.2C3.1834 11.3428 3.13212 11.4799 3.04084 11.5809C2.94956 11.6819 2.82576 11.7387 2.69667 11.7387C2.56758 11.7387 2.44378 11.6819 2.3525 11.5809C2.26122 11.4799 2.20994 11.3428 2.20994 11.2V9.26151C2.20994 7.00142 3.86595 5.16922 5.90887 5.16922C7.95147 5.16922 9.60748 7.00142 9.60748 9.26151V11.523ZM11.8868 3.09435C11.9278 3.14862 11.9587 3.21129 11.9778 3.27878C11.9969 3.34627 12.0038 3.41726 11.9981 3.4877C11.9923 3.55813 11.9742 3.62663 11.9445 3.68929C11.9149 3.75194 11.8744 3.80753 11.8254 3.85286C11.7263 3.94442 11.5985 3.98871 11.47 3.97598C11.3414 3.96326 11.2227 3.89457 11.1399 3.78501C9.85267 2.08025 7.9552 1.07692 5.90871 1.07692C3.95351 1.07692 2.13243 1.9923 0.848098 3.56784C0.805273 3.62038 0.753518 3.66307 0.695788 3.69347C0.638057 3.72387 0.575482 3.74139 0.511634 3.74502C0.447787 3.74865 0.383918 3.73833 0.323675 3.71464C0.263432 3.69096 0.207994 3.65437 0.160528 3.60696C0.0647506 3.51128 0.00723663 3.37741 0.000637399 3.23479C-0.00596183 3.09217 0.0388942 2.95249 0.125338 2.84648C1.59242 1.04713 3.67508 0 5.90871 0C8.24677 0 10.4165 1.14764 11.8868 3.09435ZM11.6514 8.93844C11.6514 9.08132 11.6001 9.21834 11.5088 9.31938C11.4175 9.42041 11.2937 9.47717 11.1646 9.47717C11.0356 9.47717 10.9118 9.42041 10.8205 9.31938C10.7292 9.21834 10.6779 9.08132 10.6779 8.93844C10.6779 6.74726 9.45975 4.80809 7.64645 4.02266C7.58696 3.99687 7.53264 3.95837 7.48659 3.90935C7.44055 3.86032 7.40368 3.80175 7.37809 3.73695C7.3525 3.67216 7.33868 3.60242 7.33744 3.53172C7.3362 3.46102 7.34755 3.39075 7.37085 3.3249C7.39415 3.25906 7.42893 3.19894 7.47322 3.14797C7.51751 3.09701 7.57044 3.0562 7.62898 3.02787C7.68752 2.99955 7.75052 2.98426 7.8144 2.98289C7.87827 2.98151 7.94177 2.99408 8.00126 3.01986C10.1848 3.9654 11.6514 6.30034 11.6514 8.93844ZM5.90871 2.58461C6.03773 2.58461 6.16147 2.64134 6.25271 2.74232C6.34394 2.8433 6.3952 2.98026 6.3952 3.12307C6.3952 3.26588 6.34394 3.40284 6.25271 3.50382C6.16147 3.6048 6.03773 3.66153 5.90871 3.66153C3.2747 3.66153 1.13934 6.02411 1.13934 8.93844C1.13934 9.08129 1.08807 9.2183 0.996805 9.31931C0.905541 9.42033 0.781759 9.47708 0.652691 9.47708C0.523624 9.47708 0.399842 9.42033 0.308578 9.31931C0.217313 9.2183 0.166041 9.08129 0.166041 8.93844C0.166041 5.42947 2.73713 2.58461 5.90871 2.58461ZM5.90871 8.83074C5.80688 8.83072 5.7091 8.87487 5.63634 8.95372C5.56358 9.03258 5.52164 9.13985 5.51952 9.25254L5.52244 9.33923C5.53351 9.68599 5.53962 10.0329 5.54076 10.3799C5.54093 10.7145 5.53395 10.9937 5.51757 11.2055C5.46325 11.9102 5.28828 12.5249 5.02946 13.048C4.92715 13.2568 4.80709 13.4543 4.67092 13.6379C4.59227 13.7428 4.52692 13.8174 4.48184 13.8623C4.38576 13.9577 4.2594 14.0069 4.13053 13.9992C4.00166 13.9915 3.88083 13.9275 3.79459 13.8212C3.70842 13.7149 3.66391 13.5751 3.67084 13.4326C3.67777 13.29 3.73559 13.1563 3.83157 13.0609C3.83043 13.062 3.83546 13.0568 3.84584 13.0447C3.86757 13.0201 3.89287 12.9887 3.92124 12.951C4.01794 12.8202 4.10319 12.6795 4.17584 12.5309C4.37141 12.1356 4.50535 11.6647 4.54784 11.114C4.5613 10.9394 4.56762 10.6868 4.56746 10.3804C4.56699 10.0462 4.56104 9.712 4.54962 9.378L4.54638 9.28413L4.54606 9.26151C4.54606 8.42869 5.15611 7.75382 5.90871 7.75382C6.27004 7.75378 6.61658 7.91259 6.87213 8.19533C7.12767 8.47807 7.27128 8.86158 7.27136 9.26151V12.1398C7.27136 12.2826 7.22009 12.4196 7.12883 12.5206C7.03756 12.6217 6.91378 12.6784 6.78471 12.6784C6.65565 12.6784 6.53186 12.6217 6.4406 12.5206C6.34933 12.4196 6.29806 12.2826 6.29806 12.1398V9.26151C6.29806 9.14727 6.25706 9.0377 6.18407 8.95691C6.11108 8.87613 6.01209 8.83074 5.90887 8.83074H5.90871Z" fill="#E75859"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,62 @@
<template>
<view class="flex flex-col bg-[#f8f8f8] h-screen">
<view
class="mx-[32rpx] bg-[#fff] rounded-[8rpx] mt-[32rpx] text-[28rpx] text-[#303030] font-bold"
>
<view
class="flex items-center justify-between mr-[16rpx] ml-[32rpx] py-[28rpx] not-last-child"
>
<text>客服电话</text>
<view class="flex items-center gap-[16rpx]" @click="makePhoneCall">
<text>{{ phoneNumber }}</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
</view>
<view class="flex items-center justify-between mx-[32rpx] py-[28rpx]">
<text>Email</text>
<view class="flex items-center">
<text>yly@ycymedu.com</text>
</view>
</view>
</view>
<view
class="flex flex-col items-center py-[48rpx] bg-[#fff] rounded-[16rpx] mx-[32rpx] mt-[144rpx]"
>
<text class="text-[36rpx] font-semibold mb-[38rpx]">官方微信公众号</text>
<view class="w-[252rpx] h-[252rpx]">
<image
src="https://api.static.ycymedu.com/images/erweima.jpg"
mode="scaleToFill"
:show-menu-by-longpress="true"
/>
</view>
<view class="flex items-center justify-center mt-[40rpx]">
<view class="i-carbon-fingerprint-recognition text-[#E75859] text-[28rpx]"></view>
<text class="text-[24rpx] text-[#000] font-normal ml-[12rpx]">
长按二维码关注后获取实时通知
</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
const phoneNumber = '0531-58786060'
const makePhoneCall = () => {
uni
.makePhoneCall({
phoneNumber: phoneNumber,
})
.catch((err) => {
console.error(err)
})
}
</script>
<style lang="scss" scoped>
.not-last-child {
border-bottom: 2rpx solid #f5f5f5;
}
</style>

View File

@ -0,0 +1,65 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '设置',
},
}
</route>
<template>
<view class="flex flex-col bg-[#f8f8f8] h-screen">
<view
class="mx-[32rpx] bg-[#fff] rounded-[8rpx] mt-[32rpx] text-[28rpx] text-[#303030] font-bold"
>
<view
class="flex items-center justify-between mx-[32rpx] py-[28rpx] not-last-child"
@click="toAbout"
>
<text>关于我们</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
<view class="flex items-center justify-between mx-[32rpx] py-[28rpx]">
<text>用户隐私协议</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
</view>
<button class="logout-btn" @click="handleLogout">退</button>
</view>
</template>
<script setup lang="ts">
import { useUserStore } from '@/store/user'
const userStore = useUserStore()
const handleLogout = () => {
userStore.clearUserInfo()
uni.switchTab({
url: '/pages/home/index/index',
})
}
const toAbout = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/setting/about',
})
}
</script>
<style scoped lang="scss">
.not-last-child {
border-bottom: 2rpx solid #f5f5f5;
}
.logout-btn {
background: linear-gradient(90deg, #ff5454 0%, #ff9882 100%);
border-radius: 80rpx;
padding: 22rpx 0;
font-weight: 600;
font-size: 36rpx;
color: #ffffff;
line-height: 1;
margin: 90rpx 32rpx 0;
}
</style>

View File

@ -57,11 +57,6 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/aiService/index/index",
"type": "page",
"style": {}
},
{
"path": "pages/evaluation/index/index",
"type": "page",
@ -108,12 +103,22 @@
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
},
"scope.record": {
"desc": "你的录音功能将用于小程序录音接口的效果展示"
}
},
"subPackages": [
{
"root": "pages-sub",
"pages": [
{
"path": "evaluation/assessmentPage",
"type": "page",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "customerService/index/index",
"type": "page",
@ -277,6 +282,17 @@
"navigationBarTitleText": "测评结果"
}
},
{
"path": "ucenter/setting/about",
"type": "page"
},
{
"path": "ucenter/setting/index",
"type": "page",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "ucenter/star/myStar",
"type": "page",
@ -316,10 +332,6 @@
{
"root": "pages-evaluation-sub",
"pages": [
{
"path": "index",
"type": "page"
},
{
"path": "aiAutoFill/index",
"type": "page",
@ -336,6 +348,19 @@
}
}
]
},
{
"root": "aiService-sub",
"pages": [
{
"path": "index/index",
"type": "page",
"style": {
"navigationBarTitleText": "小纬"
},
"needLogin": true
}
]
}
]
}

View File

@ -1,7 +0,0 @@
<template>
<view class="">AI管家</view>
</template>
<script setup></script>
<style lang="scss" scoped></style>

View File

@ -1,12 +1,12 @@
<template>
<view class="item-wrapper relative mt-[32rpx]">
<view class="item-wrapper relative mt-[32rpx]" @click="toAssessmentPage">
<view
class="flag text-[22rpx] text-center absolute top-0 right-0"
:class="{ free: item.isFree }"
>
{{ isFree ? '免费' : 'VIP' }}
</view>
<view class="flex items-stretch gap-[30rpx]">
<view class="flex items-stretch gap-[30rpx] justify-between">
<view class="flex flex-col gap-[29rpx] mt-[16rpx]">
<view class="text-[#333] text-[40rpx] font-semibold">{{ item.name }}</view>
<view class="text-[24rpx] text-[#999]">
@ -24,7 +24,11 @@
</template>
<script lang="ts" setup>
defineProps({
import { useUserStore } from '@/store/user'
const userStore = useUserStore()
const props = defineProps({
isFree: {
type: Boolean,
default: true,
@ -35,7 +39,22 @@ defineProps({
},
})
onLoad(() => {})
const toAssessmentPage = () => {
if (props.item.isFree) {
uni.navigateTo({
url: `/pages-sub/evaluation/assessmentPage?id=${props.item.id}&name=${props.item.name}`,
})
} else if (userStore.userInfo.estimatedAchievement.isVIP) {
uni.navigateTo({
url: `/pages-sub/evaluation/assessmentPage?id=${props.item.id}&name=${props.item.name}`,
})
} else {
uni.showToast({
title: '请先开通VIP',
icon: 'none',
})
}
}
</script>
<style scoped lang="scss">

View File

@ -9,7 +9,7 @@
<template>
<view class="flex flex-col h-screen">
<Tabs v-model:modelValue="currentIndex" :tabs="tabs" @change="handleChange"></Tabs>
<Tabs v-model:modelValue="currentIndex" :tabs="tabs"></Tabs>
<swiper class="flex-1" :current="currentIndex">
<swiper-item>
<view class="mx-[32rpx] overflow-auto h-full">
@ -51,10 +51,6 @@ const tabs = [
const currentIndex = ref(0)
const handleChange = (e: any) => {
console.log(e)
}
const academicList = ref([])
const healthList = ref([])
const learningList = ref([])

View File

@ -92,7 +92,10 @@
</view>
<view class="mx-[32rpx] bg-[#fff] rounded-[8rpx]">
<view class="flex items-center justify-between mx-[32rpx] py-[28rpx] not-last-child">
<view
class="flex items-center justify-between mx-[32rpx] py-[28rpx] not-last-child"
@click="toSetting"
>
<text>设置</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
@ -161,6 +164,12 @@ const goActive = () => {
url: '/pages-sub/ucenter/active/activePage',
})
}
const toSetting = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/setting/index',
})
}
</script>
<style lang="scss" scoped>

View File

@ -135,4 +135,5 @@ export type TabesItem = {
selectIcon: string
text: string
centerItem: boolean
navigatorItem?: boolean
}

View File

@ -370,3 +370,17 @@ export const getAdmissionTrendsByCollege = (params: {
export const getEvaluationList = (params: { menuid: string }) => {
return http.get('/api/busScale/list', params)
}
export const getAssessmentQuestions = (params: { ScaleId: number }) => {
return http.get('/api/busScale/getscalequestions', params)
}
export const getBusScaleDescription = (params: { ScaleId: number }) => {
return http.get('/api/busScale/GetBusScaleDescription', params)
}
export const saveBusScaleAnswer = (params: {
customId: number
scaleId: number
inputs: { type: string; name: string; value: string }[]
}) => {
return http.post('/api/busScale/CustomBusScale/v2', params)
}

View File

@ -5,10 +5,10 @@
interface NavigateToOptions {
url: "/pages/home/index/index" |
"/pages/aiService/index/index" |
"/pages/evaluation/index/index" |
"/pages/expert/index/index" |
"/pages/ucenter/index/index" |
"/pages-sub/evaluation/assessmentPage" |
"/pages-sub/customerService/index/index" |
"/pages-sub/home/autoFill/index" |
"/pages-sub/home/career/index" |
@ -32,13 +32,15 @@ interface NavigateToOptions {
"/pages-sub/ucenter/active/activePage" |
"/pages-sub/ucenter/appointment/appointment" |
"/pages-sub/ucenter/evaluate/evaluateList" |
"/pages-sub/ucenter/setting/about" |
"/pages-sub/ucenter/setting/index" |
"/pages-sub/ucenter/star/myStar" |
"/pages-sub/ucenter/vip/openVip" |
"/pages-sub/ucenter/wishList/wishList" |
"/login-sub/index" |
"/pages-evaluation-sub/index" |
"/pages-evaluation-sub/aiAutoFill/index" |
"/pages-evaluation-sub/rank/index";
"/pages-evaluation-sub/rank/index" |
"/aiService-sub/index/index";
}
interface RedirectToOptions extends NavigateToOptions {}

View File

@ -55,7 +55,12 @@ export default ({ command, mode }) => {
routeBlockLang: 'json5', // 虽然设了默认值但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
// homePage 通过 vue 文件的 route-block 的type="home"来设定
// pages 目录为 src/pages分包目录不能配置在pages目录下
subPackages: ['src/pages-sub', 'src/login-sub', 'src/pages-evaluation-sub'], // 是个数组可以配置多个但是不能为pages里面的目录
subPackages: [
'src/pages-sub',
'src/login-sub',
'src/pages-evaluation-sub',
'src/aiService-sub',
], // 是个数组可以配置多个但是不能为pages里面的目录
dts: 'src/types/uni-pages.d.ts',
}),
UniLayouts(),