Compare commits

..

8 Commits

Author SHA1 Message Date
xjs 4b5cd29bfe fix: 文件名大小写错误 2026-01-15 11:00:55 +08:00
xjs 1dee63af1b fix: 文件名大小写错误 2026-01-15 11:00:24 +08:00
xjs f2b844f0a7 fix: page url error 2026-01-13 17:33:24 +08:00
xjs 60cb378f21 fix: page name error 2026-01-13 15:53:14 +08:00
xjs 94d7d1a7ae feat: 修改项目名 2025-11-10 14:24:22 +08:00
xjs ee5042a830 feat: 更新内容 2025-10-14 15:38:05 +08:00
xjs 7c4cedaeff feat: 钉钉适配 2025-09-05 09:30:04 +08:00
Mu Yi 4bcb347d4a feat: 钉钉适配 2025-09-01 11:54:24 +08:00
140 changed files with 2401 additions and 1696 deletions

0
.husky/pre-commit Normal file → Executable file
View File

View File

@ -1 +0,0 @@
18.20.8

12
.vscode/settings.json vendored
View File

@ -2,7 +2,7 @@
// prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
//
"editor.formatOnSave": true,
"editor.formatOnSave": false,
//
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
@ -10,8 +10,8 @@
"source.fixAll.stylelint": "explicit"
},
// stylelint
"stylelint.validate": ["css", "scss", "vue", "html"], // package.jsonscripts
"stylelint.enable": true,
"stylelint.validate": ["css", "vue", "html"], // package.jsonscripts
"stylelint.enable": false,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
@ -22,7 +22,7 @@
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "Vue.volar"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
@ -59,8 +59,4 @@
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs"
},
"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": false,
"vetur.experimental.templateInterpolationService": true
}

View File

@ -27,4 +27,4 @@
- web平台 `pnpm build:h5`,打包后的文件在 `dist/build/h5`可以放到web服务器如nginx运行。如果最终不是放在根目录可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
- weixin平台`pnpm build:mp-weixin`, 打包后的文件在 `dist/build/mp-weixin`,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。
- APP平台`pnpm build:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/build/app` 文件夹,选择发行 - APP云打包
- APP平台`pnpm build:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/build/app` 文件夹,选择发行 - APP云打包

2
env/.env vendored
View File

@ -1,4 +1,4 @@
VITE_APP_TITLE = '六纬志愿'
VITE_APP_TITLE = '六纬升学'
VITE_APP_PORT = 9000
VITE_UNI_APPID = 'H57F2ACE4'

View File

@ -2,7 +2,6 @@
"name": "volunteer-4",
"type": "commonjs",
"version": "2.5.5",
"description": "unibest - 最好的 uniapp 开发模板",
"license": "MIT",
"engines": {
"node": ">=18",
@ -73,29 +72,42 @@
"bin-wrapper": "npm:bin-wrapper-china"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4020920240930001",
"@dcloudio/uni-app-plus": "3.0.0-4020920240930001",
"@dcloudio/uni-components": "3.0.0-4020920240930001",
"@dcloudio/uni-h5": "3.0.0-4020920240930001",
"@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001",
"@dcloudio/uni-app": "3.0.0-4070520250711001",
"@dcloudio/uni-app-harmony": "3.0.0-4070520250711001",
"@dcloudio/uni-app-plus": "3.0.0-4070520250711001",
"@dcloudio/uni-components": "3.0.0-4070520250711001",
"@dcloudio/uni-h5": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-alipay": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-baidu": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-harmony": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-jd": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-lark": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-qq": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-weixin": "3.0.0-4070520250711001",
"@dcloudio/uni-mp-xhs": "3.0.0-4070520250711001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4070520250711001",
"@tanstack/vue-query": "^5.62.16",
"abortcontroller-polyfill": "^1.7.8",
"dayjs": "1.11.10",
"htmlparser2": "^10.0.0",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
"pinyin-pro": "^3.26.0",
"qs": "6.5.3",
"vue": "3.4.21",
"vue": "^3.4.21",
"vue-i18n": "^9.14.5",
"wot-design-uni": "^1.4.0"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@dcloudio/types": "^3.4.14",
"@dcloudio/uni-automator": "3.0.0-4020920240930001",
"@dcloudio/uni-cli-shared": "3.0.0-4020920240930001",
"@dcloudio/uni-stacktracey": "3.0.0-4020920240930001",
"@dcloudio/vite-plugin-uni": "3.0.0-4020920240930001",
"@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-4070520250711001",
"@dcloudio/uni-cli-shared": "3.0.0-4070520250711001",
"@dcloudio/uni-stacktracey": "3.0.0-4070520250711001",
"@dcloudio/vite-plugin-uni": "3.0.0-4070520250711001",
"@esbuild/darwin-arm64": "0.20.2",
"@esbuild/darwin-x64": "0.20.2",
"@iconify-json/carbon": "^1.2.4",
@ -110,7 +122,7 @@
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
"@unocss/preset-legacy-compat": "^0.59.4",
"@vue/runtime-core": "^3.5.13",
"@vue/runtime-core": "^3.4.21",
"@vue/tsconfig": "^0.1.3",
"autoprefixer": "^10.4.20",
"commitlint": "^18.6.1",
@ -149,5 +161,8 @@
},
"minimize": {
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize"
},
"volta": {
"node": "23.8.0"
}
}

View File

@ -3,7 +3,7 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
export default defineUniPages({
globalStyle: {
navigationBarTextStyle: 'black',
navigationBarTitleText: '六纬志愿',
navigationBarTitleText: '六纬升学',
navigationBarBackgroundColor: '#fff',
backgroundColor: '#F8F8F8',
},

File diff suppressed because it is too large Load Diff

View File

@ -3,33 +3,44 @@
style: {
navigationBarTitleText: '六纬AI小助手',
},
needLogin: true,
}
</route>
<template>
<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>
<web-view :src="url" @message="handleChildMessage" :update-title="false" />
</template>
<script setup lang="ts">
let queryStr = '?'
onLoad((options: any) => {
// AI
const temQuery = Object.entries(options)
.map(([key, value]) => `${key}=${value}`)
.join('&')
queryStr += temQuery
console.log(queryStr)
})
import { useUserStore } from '@/store'
import { getAssistant } from '@/service/index/api'
const navigateToAi = () => {
uni.navigateTo({ url: `/aiService-sub/index/newAi${queryStr}` })
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}&timestamp=${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>

View File

@ -1,42 +0,0 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '六纬AI小助手',
},
needLogin: true,
}
</route>
<template>
<web-view :src="url" :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(``)
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}&timestamp=${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>

View File

@ -2,7 +2,7 @@
<!-- TabBar占位块 - 与TabBar高度一致 -->
<view
v-if="showPlaceholder"
class="tabbar-placeholder"
class="tabbar-placeholder mb-safe"
:style="{ height: `${tabbarTotalHeight}px` }"
></view>
@ -34,7 +34,6 @@
import { TabesItem } from '@/service/app/types'
import { tabbarList } from '@/hooks/useTabbarList'
import { ref, computed, onMounted } from 'vue'
import { useUserStore } from '@/store'
defineProps({
currentPage: {
@ -50,7 +49,6 @@ defineProps({
//
const safeAreaBottom = ref(0)
const userStore = useUserStore()
// TabBar (TabBar + )
const tabbarTotalHeight = computed(() => {
@ -61,16 +59,9 @@ const tabbarTotalHeight = computed(() => {
const changeItem = (item: TabesItem) => {
if (item.navigatorItem) {
// ai
if (item.path === '/aiService-sub/index/index' && !userStore.isLoginFlag) {
uni.navigateTo({
url: item.path,
})
} else {
uni.navigateTo({
url: '/aiService-sub/index/newAi',
})
}
uni.navigateTo({
url: item.path,
})
} else {
uni.switchTab({
url: item.path,
@ -80,7 +71,6 @@ const changeItem = (item: TabesItem) => {
onMounted(() => {
uni.hideTabBar()
//
uni.getSystemInfo({
success: (res) => {
@ -171,4 +161,9 @@ defineExpose({
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.mb-safe {
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
}
</style>

View File

@ -14,6 +14,7 @@
</template>
<script lang="ts" setup>
import { getWindowInfo } from '@/utils/tools'
import { ref } from 'vue'
const props = defineProps({
@ -27,7 +28,7 @@ const props = defineProps({
},
})
const systemInfo = uni.getWindowInfo()
const systemInfo = getWindowInfo()
const position = ref({ x: props.initialX, y: props.initialY })
const startPosition = ref({ x: 0, y: 0 })
@ -110,11 +111,11 @@ const handleClick = () => {
<style scoped>
.fab-button {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
width: 128rpx;
height: 128rpx;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
</style>

View File

@ -15,10 +15,12 @@
: '输入模考/高考成绩'
}}
</text>
<image
class="w-[42rpx] h-[39rpx]"
src="https://api.static.ycymedu.com/src/images/home/pen.svg"
></image>
<view class="w-[42rpx] h-[39rpx]">
<image
class="w-[42rpx] h-[39rpx]"
src="https://api.static.ycymedu.com/src/images/home/pen.svg"
></image>
</view>
</view>
<view class="flex items-center justify-center" v-else>
<image

View File

@ -5,12 +5,13 @@
hover-class="none"
:hover-stop-propagation="false"
>
<text class="text-[32rpx] text-[#333333] font-semibold">高考资讯</text>
<image
class="w-[40rpx] h-[40rpx]"
src="https://api.static.ycymedu.com/src/images/home/right.svg"
@click="toNewsPage"
></image>
<text class="text-[32rpx] text-[#333333] font-semibold w-max">高考资讯</text>
<view class="w-[40rpx] h-[40rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/right.svg"
@click="toNewsPage"
></image>
</view>
</view>
<view
@ -34,9 +35,7 @@
import { useCityNewTop, newsList } from '@/hooks/useCityInfoHook'
import { News } from '@/types/app-type'
onShow(() => {
useCityNewTop()
})
useCityNewTop()
const handleClick = (item: News) => {
uni.navigateTo({

View File

@ -5,12 +5,14 @@
hover-class="none"
:hover-stop-propagation="false"
>
<text class="text-[32rpx] text-[#333333] font-semibold">热门排行榜</text>
<image
class="w-[40rpx] h-[40rpx]"
src="https://api.static.ycymedu.com/src/images/home/right.svg"
@click="toSchool('0')"
></image>
<text class="text-[32rpx] text-[#333333] font-semibold w-max">热门排行榜</text>
<view class="w-[40rpx] h-[40rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/right.svg"
@click="toSchool('0')"
></image>
</view>
</view>
<view
@ -19,63 +21,75 @@
:hover-stop-propagation="false"
>
<!-- 骨架屏 -->
<view
v-if="isLoading"
v-for="(_skeleton, index) in skeletonItems"
:key="'skeleton-' + index"
:class="`hot-rank-item flex-none skeleton-item`"
hover-class="none"
:hover-stop-propagation="false"
>
<view class="skeleton-text mx-[32rpx] mt-[32rpx] h-[40rpx] w-[120rpx] rounded"></view>
<template v-if="isLoading">
<view
v-for="(_skeleton, index) in skeletonItems"
:key="'skeleton-' + index"
:class="`hot-rank-item flex-none skeleton-item`"
hover-class="none"
:hover-stop-propagation="false"
>
<view class="skeleton-text mx-[32rpx] mt-[32rpx] h-[40rpx] w-[120rpx] rounded"></view>
<view class="flex items-center justify-left mt-[30rpx] mx-[32rpx]" v-for="i in 3" :key="i">
<view class="skeleton-text w-[20rpx] h-[28rpx] mr-[10rpx] rounded"></view>
<view class="skeleton-image w-[80rpx] h-[80rpx] rounded-full flex-none mr-[16rpx]"></view>
<view class="flex flex-col w-full">
<view class="skeleton-text h-[28rpx] w-[120rpx] rounded"></view>
<view class="skeleton-text h-[22rpx] w-[100rpx] mt-[10rpx] rounded"></view>
<view
class="flex items-center justify-left mt-[30rpx] mx-[32rpx]"
v-for="i in 3"
:key="i"
>
<view class="skeleton-text w-[20rpx] h-[28rpx] mr-[10rpx] rounded"></view>
<view
class="skeleton-image w-[80rpx] h-[80rpx] rounded-full flex-none mr-[16rpx]"
></view>
<view class="flex flex-col w-full">
<view class="skeleton-text h-[28rpx] w-[120rpx] rounded"></view>
<view class="skeleton-text h-[22rpx] w-[100rpx] mt-[10rpx] rounded"></view>
</view>
</view>
</view>
</view>
</template>
<!-- 真实数据 -->
<view
v-else
:class="`hot-rank-item flex-none`"
hover-class="none"
:hover-stop-propagation="false"
v-for="typeWrap in universityTypeRankList"
:key="typeWrap.type"
@click="toSchool(typeWrap.type)"
v-show="typeWrap.rows.length > 0"
>
<text class="font-semibold text-[#303030] text-[32rpx] inline-block mx-[32rpx] mt-[32rpx]">
{{ typeWrap.name }}
</text>
<template v-else>
<view
class="flex items-center justify-left mt-[30rpx] mx-[32rpx]"
v-for="(item, index) in typeWrap.rows"
:key="index"
:class="`hot-rank-item flex-none`"
hover-class="none"
:hover-stop-propagation="false"
v-for="typeWrap in universityTypeRankList"
:key="typeWrap.type"
@click="toSchool(typeWrap.type)"
v-show="typeWrap.rows.length > 0"
>
<text class="font-[28rpx] text-[#999999] font-normal mr-[10rpx]">
{{ item.rank }}
<text
class="font-semibold text-[#303030] text-[32rpx] inline-block mx-[32rpx] mt-[32rpx]"
>
{{ typeWrap.name }}
</text>
<image
class="w-[80rpx] h-[80rpx] rounded-full flex-none mr-[16rpx]"
:src="item.logo"
></image>
<view class="truncate flex flex-col" hover-class="none">
<text class="font-normal text-[#333333] text-[28rpx] truncate">
{{ item.universityName }}
</text>
<text class="text-[22rpx] text-[#999999] font-normal mt-[10rpx]">
{{ item.cityName }}.{{ item.uType }}
<view
class="flex items-center justify-left mt-[30rpx] mx-[32rpx]"
v-for="(item, index) in typeWrap.rows"
:key="index"
>
<text class="font-[28rpx] text-[#999999] font-normal mr-[10rpx]">
{{ item.rank }}
</text>
<view class="w-[80rpx] h-[80rpx] rounded-full">
<image
class="flex-none mr-[16rpx] w-full h-full rounded-full"
:src="item.logo"
></image>
</view>
<view class="truncate flex flex-col" hover-class="none">
<text class="font-normal text-[#333333] text-[28rpx] truncate">
{{ item.universityName }}
</text>
<text class="text-[22rpx] text-[#999999] font-normal mt-[10rpx]">
{{ item.cityName }}.{{ item.uType }}
</text>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
</template>
@ -91,7 +105,7 @@ const toSchool = (id: string) => {
}
const { unSortTypeList } = useUnSortType()
let universityTypeRankList = ref<any[]>([])
const universityTypeRankList = ref([])
const isLoading = ref(true)
//
@ -138,22 +152,22 @@ watch(
<style lang="scss" scoped>
.hot-rank-item {
position: relative;
width: 356rpx;
height: 452rpx;
position: relative;
background: #fff;
border-radius: 8px;
}
.hot-rank-item::before {
content: '';
width: 360rpx;
height: 456rpx;
position: absolute;
border-radius: 8px;
top: -2rpx;
left: -2rpx;
z-index: -1;
width: 360rpx;
height: 456rpx;
content: '';
border-radius: 8px;
}
.hot-rank-outer .hot-rank-item:nth-child(1) {
@ -198,7 +212,6 @@ watch(
.hot-rank-outer .hot-rank-item:nth-child(5) {
background: linear-gradient(180deg, #e5ffc4 0%, rgba(213, 255, 196, 0) 23%, #fff 100%);
}
/* 骨架屏样式 */
.skeleton-text,
.skeleton-image {

View File

@ -1,22 +1,16 @@
<template>
<view class="navbar">
<!-- 状态栏占位 -->
<view
v-if="safeAreaInsetTop"
class="status-bar"
:style="{ height: statusBarHeight + 'px', backgroundColor: bgColor }"
></view>
<view v-if="safeAreaInsetTop" class="status-bar"
:style="{ height: statusBarHeight + 'px', backgroundColor: bgColor }"></view>
<!-- 导航栏主体 -->
<view
class="navbar-content"
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
<view class="navbar-content" :class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
:style="{
backgroundColor: bgColor,
height: navHeight + 'px',
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
}"
>
}">
<!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon">
@ -39,18 +33,16 @@
</view>
<!-- 占位元素 -->
<view
v-if="placeholder && fixed"
:style="{
height: `${navHeight}px`,
backgroundColor: bgColor,
}"
></view>
<view v-if="placeholder && fixed" :style="{
height: `${navHeight}px`,
backgroundColor: bgColor,
}"></view>
<slot name="background"></slot>
</view>
</template>
<script lang="ts" setup>
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
import { computed } from 'vue'
defineProps({
@ -91,8 +83,8 @@ defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const systemInfo = getWindowInfo()
const deviceInfo = getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
@ -131,20 +123,20 @@ const handleClickLeft = () => {
}
.navbar-content {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
/* justify-content: space-between; */
padding: 0 16rpx;
box-sizing: border-box;
background-color: #fff;
}
.navbar-fixed {
position: fixed;
left: 0;
width: 100%;
z-index: 999;
width: 100%;
}
.navbar-border {
@ -154,8 +146,8 @@ const handleClickLeft = () => {
.navbar-left {
display: flex;
align-items: center;
height: 100%;
min-width: 100rpx;
height: 100%;
}
.back-icon {
@ -166,20 +158,20 @@ const handleClickLeft = () => {
}
.navbar-title {
/* flex: 1; */
text-align: center;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
/* flex: 1; */
text-align: center;
}
.title-text {
font-size: 34rpx;
color: #333;
font-weight: 500;
overflow: hidden;
font-size: 34rpx;
font-weight: 500;
color: #333;
text-overflow: ellipsis;
white-space: nowrap;
}
@ -187,15 +179,14 @@ const handleClickLeft = () => {
.navbar-right {
display: flex;
align-items: center;
min-width: 52rpx;
justify-content: flex-end;
min-width: 52rpx;
height: 100%;
}
@font-face {
font-family: 'iconfont';
src: url('data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAAKYAAsAAAAABlAAAAJMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACCcApcdgE2AiQDCAsGAAQgBYRnBzYbmQXIHpIkBQQKkYCABBEPz2/t/XN3twEbowBkQTxQEQ1RKaKSxEOi0agkJKF5Qvj/f037IFKwlZ2dWU2tJu0EhPwHkBwgOVAclKcvAQpI/v/fz/08XECy+YBymmPQiwIcSmhAY4uSFcgJ+IaxC1zCYwLtRjWSnZ2rGgQWBowLxCPrVBBYllQqNTQ0VISaBXEHtTRNUwW4jb4f/xYEC0kqMzDx6CGrQuKXxKc6Zf7POYQgQHs5kIwjYwEoxK3G/DpRwbi0dlNwKKjAL4lf6vw/R2zVWvTPIwuiCnp2wCRUZ3yJX5pJFVDfByyAFR2AblMAX/OR3t7+zOJi8GyyfzC1uQXLZvtnk/0zyfTy+PvH0/Xp5OzR98/H797/+/fDu3d/3739+/fd+/+nmxvLc5vrS+sry2vz84tLs9Mzc4vzs9NTM/Ozc1OzM3MzU/Mz0wvTU4vTk0tTE8uTEyuT4yv/G0E3XUxv7wwNbu/s9G8fbO9v7+3sb+3ubW4dbO4dbO3vbu4dbO3JzqPFtRE4gEGAX0NBkL+hpCZALkEp5FKUQqE0NHlXJIGrDNAOcEQBCHU+kXT5QNblC7kEv1EK9Y9SB/8o7YYu2m0YXrJLouNIjQJhH+QbVkVZrUQ+YuqzUJdzxPMHhdIj0+hg4o0D8ogj5r5bSoQUxjADz+A8hBDQFEYwh3mommXTul7Vm5ZtqAqJHIdoKCDYDyQ3mCqUG1YKn5+C0s0yiJ/qKVAQedKAhg6Y3mEHJBQaWKnvLVMiiEIxGAY8Aw6HIAhAJmEIzIIOUjLTTAB1taL1QvNq+fYN7QDjcc2okeioaOmy5LFXt3QAAAAA')
format('woff2');
src: url('data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAAKYAAsAAAAABlAAAAJMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACCcApcdgE2AiQDCAsGAAQgBYRnBzYbmQXIHpIkBQQKkYCABBEPz2/t/XN3twEbowBkQTxQEQ1RKaKSxEOi0agkJKF5Qvj/f037IFKwlZ2dWU2tJu0EhPwHkBwgOVAclKcvAQpI/v/fz/08XECy+YBymmPQiwIcSmhAY4uSFcgJ+IaxC1zCYwLtRjWSnZ2rGgQWBowLxCPrVBBYllQqNTQ0VISaBXEHtTRNUwW4jb4f/xYEC0kqMzDx6CGrQuKXxKc6Zf7POYQgQHs5kIwjYwEoxK3G/DpRwbi0dlNwKKjAL4lf6vw/R2zVWvTPIwuiCnp2wCRUZ3yJX5pJFVDfByyAFR2AblMAX/OR3t7+zOJi8GyyfzC1uQXLZvtnk/0zyfTy+PvH0/Xp5OzR98/H797/+/fDu3d/3739+/fd+/+nmxvLc5vrS+sry2vz84tLs9Mzc4vzs9NTM/Ozc1OzM3MzU/Mz0wvTU4vTk0tTE8uTEyuT4yv/G0E3XUxv7wwNbu/s9G8fbO9v7+3sb+3ubW4dbO4dbO3vbu4dbO3JzqPFtRE4gEGAX0NBkL+hpCZALkEp5FKUQqE0NHlXJIGrDNAOcEQBCHU+kXT5QNblC7kEv1EK9Y9SB/8o7YYu2m0YXrJLouNIjQJhH+QbVkVZrUQ+YuqzUJdzxPMHhdIj0+hg4o0D8ogj5r5bSoQUxjADz+A8hBDQFEYwh3mommXTul7Vm5ZtqAqJHIdoKCDYDyQ3mCqUG1YKn5+C0s0yiJ/qKVAQedKAhg6Y3mEHJBQaWKnvLVMiiEIxGAY8Aw6HIAhAJmEIzIIOUjLTTAB1taL1QvNq+fYN7QDjcc2okeioaOmy5LFXt3QAAAAA') format('woff2');
}
.back-text {

View File

@ -19,7 +19,7 @@ export const useCityInfo = () => {
const li = groupByFirstLetter(list)
cityStore.setCities(li)
const defaultCity = list.filter((item) => item.provincename === '山东省')[0] as City
if (userStore.userInfo.city?.code === '0') {
if (userStore.userInfo.city.code === '0') {
userStore.setUserCity(defaultCity)
}
}
@ -48,12 +48,12 @@ const groupByFirstLetter = (lis: Province[]): { letter: string; provinces: Provi
.map((key) => ({ letter: key, provinces: grouped[key] }))
}
export const newsList = ref<News[]>([])
export const newsList = ref([])
export const useCityNewTop = () => {
const fetchNewTopFun = (provinceCode: string) => {
const fetchNewTopFun = (provinceCode) => {
getNewsTop({ Top: 4, CategoryId: 1, provinceCode }).then((res) => {
if (res.code === 200) {
newsList.value = res.result as News[]
newsList.value = res.result as { title: string }[]
}
})
}

View File

@ -8,7 +8,7 @@ interface Region {
pinyin: string
}
export const useRegionInfo = () => {
const regionList = ref<any[]>([])
const regionList = ref([])
getRegionInfo().then((res) => {
if (res.code === 200) {
regionList.value = res.result as Region[]
@ -19,7 +19,7 @@ export const useRegionInfo = () => {
}
export const useUniversityType = () => {
const typeList = ref<any[]>([])
const typeList = ref([])
getUniversityType().then((res) => {
if (res.code === 200) {
typeList.value = res.result as { id: number; name: string }[]
@ -30,7 +30,7 @@ export const useUniversityType = () => {
}
export const useNatureList = () => {
const natureList = ref<any[]>([])
const natureList = ref([])
getNature().then((res) => {
if (res.code === 200) {
natureList.value = res.result as { id: number; name: string }[]

View File

@ -1,5 +1,6 @@
import { onReady } from '@dcloudio/uni-app'
import { getIsTabbar, getLastItem } from '@/utils/index'
import { getWindowInfo } from '@/utils/tools'
export default () => {
// 获取页面栈
@ -9,7 +10,7 @@ export default () => {
// 页面滚动到底部时的操作,通常用于加载更多数据
const onScrollToLower = () => {}
// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getWindowInfo()
const { safeAreaInsets } = getWindowInfo()
// #ifdef MP-WEIXIN
// 基于小程序的 Page 类型扩展 uni-app 的 Page

View File

@ -4,7 +4,7 @@ import { getUnSortType, getUniversityRank } from '@/service/index/api'
type UnSortType = { type: number; name: string }[]
export const useUnSortType = () => {
let unSortTypeList = ref<any[]>([])
let unSortTypeList = ref([])
getUnSortType().then((res) => {
unSortTypeList.value = res.result as UnSortType
})
@ -23,7 +23,7 @@ export const useUniversityRank = ({
PageSize: number
PageIndex: number
}) => {
let universityRankList = ref<any[]>([])
let universityRankList = ref([])
getUniversityRank({ Year, Type, PageSize, PageIndex }).then((res) => {
if (res.code === 200) {
const _res = res.result as { rows: any[] }

View File

@ -4,11 +4,13 @@
class="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center bg-white p-[40rpx] rounded-[32rpx]"
@click.stop
>
<image
class="w-[200rpx] h-[200rpx]"
src="https://api.static.ycymedu.com/images/logo.png"
mode="aspectFit"
></image>
<view class="w-[200rpx] h-[200rpx]">
<image
class="w-[200rpx] h-[200rpx]"
src="https://api.static.ycymedu.com/images/logo.png"
mode="aspectFit"
></image>
</view>
<view class="flex flex-col items-center">
<text class="text-[26rpx] mt-[20rpx] mb-[40rpx]" :selectable="false">
{{ phone ? '申请使用您的手机号' : '申请获取您的个人信息' }}
@ -83,8 +85,8 @@ const handleClose = () => {
}
const phone = ref(true) //
const checked = ref<any[]>([]) //
const getPhoneInfo = ref<any | null>(null)
const checked = ref([]) //
const getPhoneInfo = ref(null)
const handleClickUserAgreement = () => {
uni.navigateTo({
@ -101,7 +103,7 @@ const handleClickPrivacyPolicy = () => {
const getPhoneNumber = async (e: any) => {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
const detail = e.detail
let _getPhoneInfo = {
const _getPhoneInfo = {
iv: detail.iv,
encryptedData: detail.encryptedData,
code: detail.code,
@ -127,12 +129,11 @@ const handleClick = () => {
title: '您需先同意《服务条款》和《隐私条款》',
icon: 'none',
})
return
}
}
const getUserInfo = async (_code: string) => {
let userInfo = (await useLogin()) as { code: string; errMsg: string }
const userInfo = (await useLogin()) as { code: string; errMsg: string }
if (userInfo.errMsg == 'login:ok') {
const resp = await getSessionKey({ JsCode: userInfo.code })
@ -163,9 +164,9 @@ const getUserInfo = async (_code: string) => {
if (resp.code === 200) {
//
getVolunteerInitialization().then((res) => {
let list = res.result as any[]
let code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
let addressItem: City | null = null
const list = res.result as any[]
const code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
let addressItem: City
if (code !== '') {
for (let i = 0; i < list.length; i++) {
if (list[i].code == code) {
@ -173,9 +174,7 @@ const getUserInfo = async (_code: string) => {
}
}
}
if (addressItem) {
userStore.setUserCity(addressItem)
}
userStore.setUserCity(addressItem)
handleClose()
emits('authReady')
})

View File

@ -51,6 +51,7 @@
</template>
<script lang="ts" setup>
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
import { computed } from 'vue'
defineProps({
@ -91,8 +92,8 @@ defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const systemInfo = getWindowInfo()
const deviceInfo = getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
@ -131,20 +132,20 @@ const handleClickLeft = () => {
}
.navbar-content {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
/* justify-content: space-between; */
padding: 0 16rpx;
box-sizing: border-box;
background-color: #fff;
}
.navbar-fixed {
position: fixed;
left: 0;
width: 100%;
z-index: 999;
width: 100%;
}
.navbar-border {
@ -154,8 +155,8 @@ const handleClickLeft = () => {
.navbar-left {
display: flex;
align-items: center;
height: 100%;
min-width: 100rpx;
height: 100%;
}
.back-icon {
@ -166,20 +167,20 @@ const handleClickLeft = () => {
}
.navbar-title {
/* flex: 1; */
text-align: center;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
/* flex: 1; */
text-align: center;
}
.title-text {
font-size: 34rpx;
color: #333;
font-weight: 500;
overflow: hidden;
font-size: 34rpx;
font-weight: 500;
color: #333;
text-overflow: ellipsis;
white-space: nowrap;
}
@ -187,8 +188,8 @@ const handleClickLeft = () => {
.navbar-right {
display: flex;
align-items: center;
min-width: 52rpx;
justify-content: flex-end;
min-width: 52rpx;
height: 100%;
}

View File

@ -1,32 +1,22 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '新高考选科',
},
}
</route>
<template>
<view class="h-screen flex flex-col">
<Navbar
safeAreaInsetTop
:bordered="false"
:fixed="true"
:placeholder="true"
left-arrow
bgColor="transparent"
@click-left="handleClickLeft"
>
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium">授权登录</text>
</template>
</Navbar>
<view class="h-screen flex flex-col bg-white">
<view class="flex flex-col justify-center items-center flex-1 pb-safe mt-[-100px]">
<image
class="w-[424rpx] h-[424rpx]"
src="https://api.static.ycymedu.com/images/logo.png"
mode="aspectFit"
></image>
<view class="w-[424rpx] h-[424rpx]">
<image
class="w-[424rpx] h-[424rpx]"
src="https://api.static.ycymedu.com/images/logo.png"
mode="aspectFit"
></image>
</view>
<!-- #ifdef MP-WEIXIN -->
<button
class="w-[493rpx]! mb-[40rpx] h-[88rpx]! rounded-[44rpx] text-[32rpx] text-white flex items-center justify-center"
:class="checked.length > 0 ? 'bg-[#1580FF]' : 'bg-[#BFBFBF]'"
@ -37,6 +27,17 @@
>
一键登录
</button>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<button
class="w-[493rpx]! mb-[40rpx] h-[88rpx]! rounded-[44rpx] text-[32rpx] text-white flex items-center justify-center"
:class="checked.length > 0 ? 'bg-[#1580FF]' : 'bg-[#BFBFBF]'"
@click.stop="handleClick"
>
一键登录
</button>
<!-- #endif -->
<view class="flex items-center flex-nowrap">
<CheckboxGroup v-model="checked" class="check-class mr-[10rpx]">
@ -78,15 +79,13 @@ import { useLogin } from '@/login-sub/hooks/useUserInfo'
const show = ref(false)
const checked = ref<any[]>([]) //
const getPhoneInfo = ref<any>(null)
const scene = ref('')
const checked = ref([]) //
const getPhoneInfo = ref(null)
const getPhoneNumber = async (e: any) => {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
const detail = e.detail
let _getPhoneInfo = {
const _getPhoneInfo = {
iv: detail.iv,
encryptedData: detail.encryptedData,
code: detail.code,
@ -112,8 +111,18 @@ const handleClick = () => {
title: '您需先同意《服务条款》和《隐私条款》',
icon: 'none',
})
return
}
// #ifdef MP-ALIPAY
dd.getAuthCode({
corpId: '3912995586',
success: (res) => {
const { authCode } = res
console.log(res)
},
fail: () => {},
complete: () => {},
})
// #endif
}
//
@ -140,7 +149,7 @@ const handleClickPrivacyPolicy = () => {
const userStore = useUserStore()
const getUserInfo = async (_code: string) => {
let userInfo = (await useLogin()) as { code: string; errMsg: string }
const userInfo = (await useLogin()) as { code: string; errMsg: string }
if (userInfo.errMsg == 'login:ok') {
const resp = await getSessionKey({ JsCode: userInfo.code })
@ -175,8 +184,8 @@ const getUserInfo = async (_code: string) => {
//
getVolunteerInitialization()
.then((res) => {
let list = res.result as any[]
let code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
const list = res.result as any[]
const code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
let addressItem: City
if (code !== '') {
for (let i = 0; i < list.length; i++) {
@ -191,8 +200,6 @@ const getUserInfo = async (_code: string) => {
//
if (infoData.userExtend && !infoData.userExtend.init) {
uni.navigateTo({ url: '/login-sub/inviteCode' })
} else if (scene.value !== '') {
uni.navigateTo({ url: `/pages/index/index?scene=${scene.value}` })
} else {
uni.switchTab({
url: '/pages/home/index/index',
@ -209,11 +216,6 @@ const getUserInfo = async (_code: string) => {
})
}
}
onLoad((options) => {
//
scene.value = options.scene || ''
})
</script>
<style lang="scss" scoped>

View File

@ -1,5 +1,5 @@
{
"name": "六纬志愿",
"name": "六纬升学",
"appid": "H57F2ACE4",
"description": "",
"versionName": "1.0.0",

View File

@ -1,28 +1,20 @@
export const renderEchart = ({
echart,
echarts,
pieChartData,
}: {
echart: any
echarts: any
pieChartData: any
}) => {
const typeColorMap: { [key: string]: any } = {
export const renderEchart = ({ echart, echarts, pieChartData }) => {
const typeColorMap = {
: { color: '#EB5241', simpleName: '冲' },
: { color: '#F0BA16', simpleName: '稳' },
: { color: '#15C496', simpleName: '保' },
}
const formattedData = pieChartData.value.map((item: any) => ({
const formattedData = pieChartData.value.map((item) => ({
...item,
itemStyle: {
color: typeColorMap[item.name]?.color,
},
label: {
formatter: (params: any) => typeColorMap[params.name]?.simpleName || params.name,
formatter: (params) => typeColorMap[params.name]?.simpleName || params.name,
},
}))
echart.value.init(echarts, (chart: any) => {
echart.value.init(echarts, (chart) => {
let option = {
tooltip: {
trigger: 'item',
@ -50,7 +42,7 @@ export const renderEchart = ({
},
},
label: {
formatter: (params: any) => typeColorMap[params.name]?.simpleName || params.name,
formatter: (params) => typeColorMap[params.name]?.simpleName || params.name,
},
},
],
@ -74,7 +66,7 @@ export const renderEchart = ({
left: 'center',
top: '50%',
style: {
text: formattedData.reduce((acc: any, curr: any) => acc + curr.value, 0),
text: formattedData.reduce((acc, curr) => acc + curr.value, 0),
fontSize: 24,
fill: '#1F2329',
textAlign: 'center',

View File

@ -72,10 +72,10 @@ const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
const echart = ref<any>(null)
const echart = ref(null)
const pieChartData = ref<any[]>([])
const universities = ref<any[]>([])
const pieChartData = ref([])
const universities = ref([])
onLoad(() => {
aiPreview({
location: userInfo.value.estimatedAchievement.provinceCode,

View File

@ -13,18 +13,21 @@
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
:style="{
backgroundColor: bgColor,
height: navHeight + 'px',
height: `${navHeight}px`,
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
}"
>
<!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft">
<view
:class="`navbar-left ${leftWidthMin ? 'min-w-[48rpx]' : ''} min-w-[48rpx]`"
@click="handleClickLeft"
>
<!-- #ifndef MP-ALIPAY -->
<view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
</view>
<!-- #endif -->
<slot name="left"></slot>
</view>
<!-- 中间标题区域 -->
<view class="navbar-title">
<slot name="title">
@ -51,9 +54,9 @@
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
const props = defineProps({
defineProps({
title: {
type: String,
default: '',
@ -86,13 +89,18 @@ const props = defineProps({
type: String,
default: 'justify-between',
},
leftWidthMin: {
type: Boolean,
default: false,
},
})
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const deviceInfo = getDeviceInfo()
const systemInfo = getWindowInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
@ -130,20 +138,20 @@ const handleClickLeft = () => {
}
.navbar-content {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
/* justify-content: space-between; */
padding: 0 16rpx;
box-sizing: border-box;
background-color: #fff;
}
.navbar-fixed {
position: fixed;
left: 0;
width: 100%;
z-index: 99;
width: 100%;
}
.navbar-border {
@ -164,20 +172,20 @@ const handleClickLeft = () => {
}
.navbar-title {
/* flex: 1; */
text-align: center;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
/* flex: 1; */
text-align: center;
}
.title-text {
font-size: 34rpx;
color: #333;
font-weight: 500;
overflow: hidden;
font-size: 34rpx;
font-weight: 500;
color: #333;
text-overflow: ellipsis;
white-space: nowrap;
}
@ -185,8 +193,8 @@ const handleClickLeft = () => {
.navbar-right {
display: flex;
align-items: center;
min-width: 52rpx;
justify-content: flex-end;
min-width: 52rpx;
height: 100%;
}

View File

@ -31,7 +31,7 @@
</template>
<script lang="ts" setup>
import { computed, ref, watch } from 'vue'
import { computed } from 'vue'
const props = defineProps({
modelValue: {

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -87,24 +89,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {
@ -119,8 +121,8 @@ onLoad((options) => {
}
.border-class {
border-radius: 20rpx 20rpx 0 0;
padding-bottom: 42rpx;
margin-bottom: -14rpx;
border-radius: 20rpx 20rpx 0 0;
}
</style>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -24,10 +26,12 @@
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="header-bg"
/>
<view class="header-bg">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="w-full h-full"
/>
</view>
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
</view>
@ -92,24 +96,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {

View File

@ -1,33 +1,23 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '兴趣测评报告',
},
}
</route>
<template>
<view class="flex flex-col h-screen relative custom-bg">
<Navbar
safeAreaInsetTop
:bordered="false"
leftArrow
@clickLeft="handleBack"
bg-color="transparent"
>
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">兴趣测评报告</text>
</template>
</Navbar>
<view class="flex-1 overflow-auto relative mt-[40rpx]">
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="header-bg"
/>
<view class="header-bg">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="w-full h-full"
/>
</view>
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
</view>
@ -90,24 +80,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -87,24 +89,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {
@ -119,8 +121,8 @@ onLoad((options) => {
}
.border-class {
border-radius: 20rpx 20rpx 0 0;
padding-bottom: 42rpx;
margin-bottom: -14rpx;
border-radius: 20rpx 20rpx 0 0;
}
</style>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -24,10 +26,12 @@
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="header-bg"
/>
<view class="header-bg">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="w-full h-full"
/>
</view>
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
</view>
@ -92,24 +96,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {

View File

@ -1,33 +1,23 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '兴趣测评报告',
},
}
</route>
<template>
<view class="flex flex-col h-screen relative custom-bg">
<Navbar
safeAreaInsetTop
:bordered="false"
leftArrow
@clickLeft="handleBack"
bg-color="transparent"
>
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">兴趣测评报告</text>
</template>
</Navbar>
<view class="flex-1 overflow-auto relative mt-[40rpx]">
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="header-bg"
/>
<view class="header-bg">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="w-full h-full"
/>
</view>
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
</view>
@ -90,24 +80,24 @@ onLoad((options) => {
}
.header-bg {
width: calc(100% - 80rpx);
height: 244rpx;
position: absolute;
top: 0;
left: 40rpx;
z-index: 1;
width: calc(100% - 80rpx);
height: 244rpx;
}
.type-tag {
font-size: 24rpx;
min-width: 40rpx;
font-size: 24rpx;
text-align: center;
}
.position-tag {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
font-size: 26rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.table-row {

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -24,10 +26,12 @@
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="header-bg"
/>
<view class="header-bg">
<image
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
class="w-full h-full"
/>
</view>
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的职业价值观</text>
<text class="text-[#117CFC] text-[40rpx] z-2">{{ studyRecord.tag }}</text>
</view>

View File

@ -8,10 +8,12 @@
<view
class="rounded-[8rpx] border-[#1580FF] border-[2rpx] border-solid w-full py-[14rpx] flex items-center justify-center"
>
<image
src="https://api.static.ycymedu.com/images/btn-bottom.png"
class="w-[52rpx] h-[52rpx] mr-[10rpx]"
></image>
<view class="w-[52rpx] h-[52rpx] mr-[10rpx]">
<image
src="https://api.static.ycymedu.com/images/btn-bottom.png"
class="w-[52rpx] h-[52rpx]"
></image>
</view>
<text class="text-[#1580FF] text-[32rpx] font-700">智能AI顾问</text>
</view>
</view>

View File

@ -17,11 +17,13 @@
v-for="(person, index) in personList"
:key="index"
>
<image
:src="person.avatarUrl"
class="w-[120rpx] h-[120rpx] rounded-full"
mode="aspectFill"
></image>
<view class="w-[120rpx] h-[120rpx]">
<image
:src="person.avatarUrl"
class="w-[120rpx] h-[120rpx] rounded-full"
mode="aspectFill"
></image>
</view>
<text class="mt-[10rpx] text-[26rpx] text-[28rpx] font-normal text-center">
{{ person.nickName }}
</text>
@ -45,7 +47,7 @@ const props = defineProps({
},
})
const personList = ref<any[]>([])
const personList = ref([])
watch(
() => props.tag,

View File

@ -34,7 +34,7 @@ const props = defineProps({
},
})
const majorList = ref<any[]>([])
const majorList = ref([])
watch(
() => props.tag,

View File

@ -4,12 +4,6 @@
<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>
@ -21,11 +15,7 @@
import TitleBar from './TitleBar.vue'
defineProps({
items: {
type: Array<{
title: string
description?: string | []
items?: { title: string; description?: string }[]
}>,
type: Array<{ title: string; description: string | [] }>,
default: () => [],
},
title: {

View File

@ -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-left">
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-center">
<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-left">
<view class="mt-[20rpx] text-center">
<view class="text-[#000] text-[26rpx] font-700">学习风格表现</view>
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.learning_performance" :key="index">
{{ sonItem }}
<view class="mt-[10rpx]" v-for="(item, index) in item.learning_performance" :key="index">
{{ item }}
</view>
</view>
<view class="mt-[20rpx] text-left">
<view class="mt-[20rpx] text-center">
<view class="text-[#000] text-[26rpx] font-700">学习风格特点</view>
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.features" :key="index">
{{ sonItem }}
<view class="mt-[10rpx]" v-for="(item, index) in item.features" :key="index">
{{ item }}
</view>
</view>
</view>

View File

@ -13,11 +13,13 @@
</view>
<view class="relative mt-[68rpx] bg-[#F5FAFF]">
<image
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
mode="scaleToFill"
class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]"
/>
<view class="absolute top-[-9rpx] left-[20rpx] w-[180rpx] h-[52rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
mode="scaleToFill"
class="w-[180rpx] h-[52rpx]"
/>
</view>
<view class="px-[20rpx] pb-[20rpx] pt-[58rpx] text-[#333] text-[26rpx]">
{{ description }}
</view>

View File

@ -2,11 +2,13 @@
<view class="flex flex-col bg-white rounded-[24rpx] p-[30rpx] gap-[40rpx]">
<view class="flex flex-col gap-[12rpx]">
<view class="flex items-center gap-[10rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/life-icon.png"
mode="scaleToFill"
class="w-[38rpx] h-[38rpx]"
/>
<view class="w-[38rpx] h-[38rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/life-icon.png"
mode="scaleToFill"
class="w-[38rpx] h-[38rpx]"
/>
</view>
<text class="text-[32rpx] text-[#000] font-700">生活建议</text>
</view>
<view class="text-[26rpx] text-[#666] font-400">
@ -14,5 +16,37 @@
避免过度放松保持适度的学习节奏
</view>
</view>
<view class="flex flex-col gap-[12rpx]">
<view class="flex items-center gap-[10rpx]">
<view class="w-[38rpx] h-[38rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/diet-icon.png"
mode="scaleToFill"
class="w-[38rpx] h-[38rpx]"
/>
</view>
<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]">
<view class="w-[38rpx] h-[38rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/learn-icon.png"
mode="scaleToFill"
class="w-[38rpx] h-[38rpx]"
/>
</view>
<text class="text-[32rpx] text-[#000] font-700">学习建议</text>
</view>
<view class="text-[26rpx] text-[#666] font-400">
保持规律作息早睡早起避免熬夜 每天适当运动如散步跑步保持精力充沛
避免过度放松保持适度的学习节奏
</view>
</view>
</view>
</template>

View File

@ -85,7 +85,7 @@ const transformData = (names: string[], values: number[]) => {
return result
}
const characterData = ref<any[]>([])
const characterData = ref([])
watch(
() => props.linChart,
(newV) => {

View File

@ -30,7 +30,7 @@
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
import TitleBar from '../TitleBar.vue'
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
const echart = ref<any>(null)
const echart = ref(null)
const props = defineProps({
mainDomain: {
@ -57,7 +57,7 @@ const styleConfig = [
{ bg: '#FDF0F0', text: '#F58C8C', size: 45, x: 166, y: 118 },
]
const chartData = ref<any[]>([])
const chartData = ref([])
//
const selectStylesByLength = (items: string[]) => {

View File

@ -9,7 +9,7 @@
<script lang="ts" 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<any>(null)
const echart = ref(null)
const props = defineProps({
picData: {
type: Object,

View File

@ -13,7 +13,7 @@
<script lang="ts" 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<any>(null)
const echart = ref(null)
const props = defineProps({
echartData: {

View File

@ -9,7 +9,7 @@
<script lang="ts" 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<any>(null)
const echart = ref(null)
interface IndicatorItem {
name: string

View File

@ -9,7 +9,7 @@
<script lang="ts" 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<any>(null)
const echart = ref(null)
</script>
<script lang="scss" scoped></script>

View File

@ -4,11 +4,13 @@
<LEchart ref="echart" :customStyle="`z-index:1;`"></LEchart>
</view>
<view class="relative mt-[68rpx] bg-[#F5FAFF] mx-[20rpx] px-[24rpx] pt-[58rpx] pb-[20rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
mode="scaleToFill"
class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]"
/>
<view class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]">
<image
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
mode="scaleToFill"
class="w-[180rpx] h-[52rpx]"
/>
</view>
<view v-for="(item, index) in innerParsing" class="text-[26rpx] mb-[20rpx]" :key="index">
<text class="text-[#000] font-700">{{ item.title }}:&nbsp;</text>
<text class="text-[#3d3d3d] font-400">{{ item.desc }}</text>
@ -32,7 +34,7 @@
<script lang="ts" 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<any>(null)
const echart = ref(null)
const props = defineProps({
picData: {
@ -45,7 +47,7 @@ const props = defineProps({
},
})
const innerParsing = ref<any[]>([])
const innerParsing = ref([])
const policy = ref({ items: [] })
watch(
@ -57,7 +59,6 @@ watch(
_val.tags.forEach((item) => {
if (item.title === '策略偏好') {
policy.value = item
return
} else {
innerParsing.value.push(...item.items)
}
@ -89,7 +90,7 @@ watch(
//
const maxLength = 4
const result = []
let _val = value.split(',')
const _val = value.split(',')
for (let i = 0; i < _val[0].length; i += maxLength) {
result.push(value.slice(i, i + maxLength))
}

View File

@ -2,19 +2,15 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
<template>
<view :scroll-y="true" class="flex flex-col h-screen relative custom-bg">
<Navbar
safeAreaInsetTop
:bordered="false"
leftArrow
@clickLeft="handleBack"
bg-color="transparent"
>
<Navbar safeAreaInsetTop :bordered="false" leftArrow @clickLeft="handleBack" bg-color="transparent">
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">MHT心理健康自评</text>
</template>
@ -68,6 +64,7 @@ onLoad((options) => {
.custom-bg {
background: linear-gradient(184deg, #0d79fc 0%, #2186fc 100%);
}
:deep(.icon-class) {
color: #fff !important;
}

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -20,7 +22,7 @@
</template>
</Navbar>
<view class="flex-1 overflow-auto relative flex flex-col">
<view class="flex-1 overflow-auto relative">
<view class="flex flex-col flex-1 overflow-auto pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="mt-[30rpx] mx-[24rpx]">
@ -99,7 +101,7 @@ const calcLevel = (val: string) => {
}
}
onLoad((options: any) => {
onLoad((options) => {
pageType.value = +options.type
pageId.value = options.id

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -20,7 +22,7 @@
</template>
</Navbar>
<view class="flex-1 overflow-auto relative flex flex-col">
<view class="flex-1 overflow-auto relative">
<view class="flex flex-col flex-1 overflow-auto pb-[20rpx]">
<!-- 顶部卡片 -->
<view class="mt-[30rpx] mx-[24rpx]">

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -98,7 +100,7 @@ const studyRecord = ref({
})
const calcLevel = (val: string) => {
let _s = JSON.parse(val)
const _s = JSON.parse(val)
if (_s[0].Total >= 161) {
return 4
} else if (_s[0].Total >= 137) {
@ -112,9 +114,9 @@ const calcLevel = (val: string) => {
}
}
const suggestions = ref<any[]>([])
const suggestions = ref([])
onLoad((options: any) => {
onLoad((options) => {
pageType.value = +options.type
pageId.value = options.id
@ -146,8 +148,8 @@ onLoad((options: any) => {
.custom-border {
width: 162rpx;
height: 162rpx;
border-radius: 50%;
border: 6rpx dashed;
border-color: #05d69c transparent transparent transparent;
border-radius: 50%;
}
</style>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -60,9 +62,9 @@ const studyRecord = ref({
suggestions: '',
})
const chartData = ref<any[]>([])
const chartData = ref([])
const parsing = ref('')
const suggestions = ref<any[]>([])
const suggestions = ref([])
onLoad((options) => {
pageType.value = +options.type
@ -96,8 +98,8 @@ onLoad((options) => {
.custom-border {
width: 162rpx;
height: 162rpx;
border-radius: 50%;
border: 6rpx dashed;
border-color: #05d69c transparent transparent transparent;
border-radius: 50%;
}
</style>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -97,9 +99,9 @@ const calcLevel = (val: string) => {
}
}
const suggestions = ref<any[]>([])
const suggestions = ref([])
onLoad((options: any) => {
onLoad((options) => {
pageType.value = +options.type
pageId.value = options.id

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -98,7 +100,7 @@ const studyRecord = ref({
})
const calcLevel = (val: string) => {
let _s = JSON.parse(val)
const _s = JSON.parse(val)
if (_s[0].Total >= 161) {
return 4
} else if (_s[0].Total >= 137) {
@ -112,9 +114,9 @@ const calcLevel = (val: string) => {
}
}
const suggestions = ref<any[]>([])
const suggestions = ref([])
onLoad((options: any) => {
onLoad((options) => {
pageType.value = +options.type
pageId.value = options.id
@ -146,8 +148,8 @@ onLoad((options: any) => {
.custom-border {
width: 162rpx;
height: 162rpx;
border-radius: 50%;
border: 6rpx dashed;
border-color: #05d69c transparent transparent transparent;
border-radius: 50%;
}
</style>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -60,9 +62,9 @@ const studyRecord = ref({
suggestions: '',
})
const chartData = ref<any[]>([])
const chartData = ref([])
const parsing = ref('')
const suggestions = ref<any[]>([])
const suggestions = ref([])
onLoad((options) => {
pageType.value = +options.type
@ -96,8 +98,8 @@ onLoad((options) => {
.custom-border {
width: 162rpx;
height: 162rpx;
border-radius: 50%;
border: 6rpx dashed;
border-color: #05d69c transparent transparent transparent;
border-radius: 50%;
}
</style>

View File

@ -18,7 +18,7 @@ interface Region {
simplename: string
pinyin: string
}
const regionList = ref<any[]>([])
const regionList = ref([])
getRegionInfo().then((res) => {
if (res.code === 200) {
regionList.value = res.result as Region[]

File diff suppressed because one or more lines are too long

View File

@ -1,36 +1,33 @@
# echarts 图表 <span style="font-size:16px;">👑👑👑👑👑 <span style="background:#ff9d00;padding:2px 4px;color:#fff;font-size:10px;border-radius: 3px;">全端</span></span>
> 一个基于 JavaScript 的开源可视化图表库 [查看更多](https://limeui.qcoon.cn/#/echart) <br>
> 基于 echarts 做了兼容处理,更多示例请访问 [uni示例](https://limeui.qcoon.cn/#/echart-example) | [官方示例](https://echarts.apache.org/examples/zh/index.html) <br>
> 一个基于 JavaScript 的开源可视化图表库 [查看更多](https://limeui.qcoon.cn/#/echart) <br>
> 基于 echarts 做了兼容处理,更多示例请访问 [uni示例](https://limeui.qcoon.cn/#/echart-example) | [官方示例](https://echarts.apache.org/examples/zh/index.html) <br>
## 平台兼容
| H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 头条小程序 | QQ 小程序 | App |
| --- | ---------- | ------------ | ---------- | ---------- | --------- | --- |
| √ | √ | √ | √ | √ | √ | √ |
| H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 头条小程序 | QQ 小程序 | App |
| --- | ---------- | ------------ | ---------- | ---------- | --------- | ---- |
| √ | √ | √ | √ | √ | √ | √ |
## 安装
- 第一步:在市场导入 [百度图表](https://ext.dcloud.net.cn/plugin?id=4899)
- 第二步:选择插件依赖:<br>
1、可以选插件内的`echarts`包或自定义包,自定义包[下载地址](https://echarts.apache.org/zh/builder.html)<br>
2、或者使用`npm`安装`echarts`
**注意**
* 🔔 echarts 5.3.0及以上
* 🔔 如果是 `cli` 项目请下载插件到`src`目录下的`uni_modules`,没有这个目录就创建一个
- 🔔 echarts 5.3.0及以上
- 🔔 如果是 `cli` 项目请下载插件到`src`目录下的`uni_modules`,没有这个目录就创建一个
## 代码演示
### Vue2
- 引入依赖,可以是插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html),也可以是`npm`包
```html
<view style="width:750rpx; height:750rpx">
<l-echart ref="chartRef" @finished="init"></l-echart>
</view>
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef" @finished="init"></l-echart></view>
```
```js
@ -44,110 +41,110 @@ import * as echarts from 'echarts'
```js
export default {
data() {
return {
option: {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
confine: true,
},
legend: {
data: ['热度', '正面', '负面'],
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true,
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999',
},
},
axisLabel: {
color: '#666666',
},
},
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999',
},
},
axisLabel: {
color: '#666666',
},
},
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside',
},
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
},
},
data: [120, 102, 141, 174, 190, 250, 220],
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left',
},
},
data: [-20, -32, -21, -34, -90, -130, -110],
},
],
},
}
},
// 组件能被调用必须是组件的节点已经被渲染到页面上
methods: {
async init() {
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts)
chart.setOption(this.option)
},
},
data() {
return {
option: {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
confine: true
},
legend: {
data: ['热度', '正面', '负面']
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside'
}
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true
}
},
data: [120, 102, 141, 174, 190, 250, 220]
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left'
}
},
data: [-20, -32, -21, -34, -90, -130, -110]
}
]
},
};
},
// 组件能被调用必须是组件的节点已经被渲染到页面上
methods: {
async init() {
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts);
chart.setOption(this.option)
}
}
}
```
### Vue3
- 小程序可以使用`require`引入插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html)
- `require`仅支持相对路径,不支持路径别名
- 非小程序使用 `npm`
```html
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef"></l-echart></view>
```
@ -155,9 +152,9 @@ export default {
```js
// 小程序 二选一
// 插件内的 二选一
const echarts = require('../../uni_modules/lime-echart/static/echarts.min')
const echarts = require('../../uni_modules/lime-echart/static/echarts.min');
// 自定义的 二选一 下载后放入项目的路径
const echarts = require('xxx/xxx/echarts')
const echarts = require('xxx/xxx/echarts');
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 非小程序
@ -166,109 +163,112 @@ import * as echarts from 'echarts'
```
```js
const chartRef = ref < any > null
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
confine: true,
},
legend: {
data: ['热度', '正面', '负面'],
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true,
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999',
},
},
axisLabel: {
color: '#666666',
},
},
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999',
},
},
axisLabel: {
color: '#666666',
},
},
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside',
},
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
},
},
data: [120, 102, 141, 174, 190, 250, 220],
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left',
},
},
data: [-20, -32, -21, -34, -90, -130, -110],
},
],
}
onMounted(() => {
// 组件能被调用必须是组件的节点已经被渲染到页面上
setTimeout(async () => {
if (!chartRef.value) return
const myChart = await chartRef.value.init(echarts)
myChart.setOption(option)
}, 300)
const chartRef = ref(null)
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
confine: true
},
legend: {
data: ['热度', '正面', '负面']
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside'
}
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true
}
},
data: [120, 102, 141, 174, 190, 250, 220]
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left'
}
},
data: [-20, -32, -21, -34, -90, -130, -110]
}
]
};
onMounted( ()=>{
// 组件能被调用必须是组件的节点已经被渲染到页面上
setTimeout(async()=>{
if(!chartRef.value) return
const myChart = await chartRef.value.init(echarts)
myChart.setOption(option)
},300)
})
```
### Uvue
### Uvue
- Uvue和Nvue不需要引入`echarts`,因为它们的实现方式是`webview`
- uniapp x需要HBX 4.13以上
```html
<view style="width: 100%; height: 408px;">
<l-echart ref="chartRef" @finished="init"></l-echart>
<l-echart ref="chartRef" @finished="init"></l-echart>
</view>
```
@ -290,8 +290,8 @@ const init = async () => {
}
```
## 数据更新
## 数据更新
- 1、使用 `ref` 可获取`setOption`设置更新
- 2、也可以拿到图表实例`chart`设置`myChart.setOption(data)`
@ -304,37 +304,33 @@ myChart.setOption(data)
```
## 图表大小
- 在有些场景下,我们希望当容器大小改变时,图表的大小也相应地改变。
```js
// 默认获取容器尺寸
this.$refs.chart.resize()
// 指定尺寸
this.$refs.chart.resize({ width: 375, height: 375 })
this.$refs.chart.resize({width: 375, height: 375})
```
## 自定义Tooltips
- uvue\nvue 不支持
由于除H5之外都不存在dom但又有tooltips个性化的需求代码就不贴了看示例吧
由于除H5之外都不存在dom但又有tooltips个性化的需求代码就不贴了看示例吧
```
代码位于/uni_modules/lime-echart/component/lime-echart
```
## 插件标签
## 插件标签
- 默认 l-echart 为 component
- 默认 lime-echart 为 demo
```html
// 在任意地方使用可查看domo, 代码位于/uni_modules/lime-echart/component/lime-echart
// 在任意地方使用可查看domo, 代码位于/uni_modules/lime-echart/component/lime-echart
<lime-echart></lime-echart>
```
## 常见问题
## 常见问题
- 钉钉小程序 由于没有`measureText`,模拟的`measureText`又无法得到当前字体的`fontWeight`,故可能存在估计不精细的问题
- 微信小程序 `2d` 只支持 真机调试2.0
- 微信开发工具会出现 `canvas` 不跟随页面的情况,真机不影响
@ -344,7 +340,6 @@ this.$refs.chart.resize({ width: 375, height: 375 })
- dataZoom H5不要设置 `showDetail`
- 如果微信小程序的`tooltip`文字有阴影,可能是微信的锅,临时解决方法是`tooltip.shadowBlur = 0`
- 如果钉钉小程序上传时报安全问题`Uint8Clamped`,可以向钉钉反馈是安全代码扫描把Uint8Clamped数组错误识别了也可以在 echarts 文件修改`Uint8Clamped`
```js
// 找到这段代码把代码中`Uint8Clamped`改成`Uint8_Clamped`,再把下划线去掉,不过直接去掉`Uint8Clamped`也是可行的
// ["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]
@ -353,7 +348,6 @@ this.$refs.chart.resize({ width: 375, height: 375 })
```
### vue3
如果您是使用 **vite + vue3** 非微信小程序可能会遇到`echarts`文件缺少`wx`判断导致无法使用或缺少`tooltip`<br>
方式一:可以在`echarts.min.js`文件开头增加以下内容参考插件内的echart.min.js的做法
@ -368,46 +362,47 @@ let wx = uni
```js
// 或者在`vite.config.js`的`define`设置环境
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
const define = {}
if (!['mp-weixin', 'h5', 'web'].includes(process.env.UNI_PLATFORM)) {
define['global'] = null
define['wx'] = 'uni'
if(!["mp-weixin", "h5", "web"].includes(process.env.UNI_PLATFORM)) {
define['global'] = null
define['wx'] = 'uni'
}
export default defineConfig({
plugins: [uni()],
define,
})
plugins: [uni()],
define
});
```
## Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----------------- | -------------------------- | --------- | ------- | ---- |
| custom-style | 自定义样式 | `string` | - | - |
| type | 指定 canvas 类型 | `string` | `2d` | |
| is-disable-scroll | 触摸图表时是否禁止页面滚动 | `boolean` | `false` | |
| beforeDelay | 延迟初始化 (毫秒) | `number` | `30` | |
| enableHover | PC端使用鼠标悬浮 | `boolean` | `false` | |
| landscape | 是否旋转90deg,模拟横屏效果 | `boolean` | `false` | |
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --------------- | -------- | ------- | ------------ | ----- |
| custom-style | 自定义样式 | `string` | - | - |
| type | 指定 canvas 类型 | `string` | `2d` | |
| is-disable-scroll | 触摸图表时是否禁止页面滚动 | `boolean` | `false` | |
| beforeDelay | 延迟初始化 (毫秒) | `number` | `30` | |
| enableHover | PC端使用鼠标悬浮 | `boolean` | `false` | |
| landscape | 是否旋转90deg,模拟横屏效果 | `boolean` | `false` | |
## 事件
| 参数 | 说明 |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| init(echarts, chart => {}) | 初始化调用函数,第一个参数是传入`echarts`,第二个参数是回调函数,回调函数的参数是 `chart` 实例 |
| setChart(chart => {}) | 已经初始化后,请使用这个方法,是个回调函数,参数是 `chart` 实例 |
| setOption(data) | [图表配置项](https://echarts.apache.org/zh/option.html#title),用于更新 ,传递是数据 `option` |
| clear() | 清空当前实例,会移除实例中所有的组件和图表。 |
| dispose() | 销毁实例 |
| showLoading() | 显示加载 |
| hideLoading() | 隐藏加载 |
| [canvasToTempFilePath](https://uniapp.dcloud.io/api/canvas/canvasToTempFilePath.html#canvastotempfilepath)(opt) | 用于生成图片,与官方使用方法一致,但不需要传`canvasId` |
| 参数 | 说明 |
| --------------- | --------------- |
| init(echarts, chart => {}) | 初始化调用函数,第一个参数是传入`echarts`,第二个参数是回调函数,回调函数的参数是 `chart` 实例 |
| setChart(chart => {}) | 已经初始化后,请使用这个方法,是个回调函数,参数是 `chart` 实例 |
| setOption(data) | [图表配置项](https://echarts.apache.org/zh/option.html#title),用于更新 ,传递是数据 `option` |
| clear() | 清空当前实例,会移除实例中所有的组件和图表。 |
| dispose() | 销毁实例 |
| showLoading() | 显示加载 |
| hideLoading() | 隐藏加载 |
| [canvasToTempFilePath](https://uniapp.dcloud.io/api/canvas/canvasToTempFilePath.html#canvastotempfilepath)(opt) | 用于生成图片,与官方使用方法一致,但不需要传`canvasId` |
## 打赏
如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。
![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/alipay.png)
![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/wpay.png)

View File

@ -1,31 +1,38 @@
<template>
<CheckboxGroup
v-model="defValue"
checked-color="#1580FF"
@change="handleChange"
v-bind="$attrs"
:style="{ '--default-cols': defaultCols }"
>
<Checkbox
v-for="item in list"
:key="item[valueKey]"
:name="item[valueKey]"
cell
shape="button"
class="custom-checkbox"
:style="checkboxStyle"
>
{{ item[labelKey] }}
</Checkbox>
</CheckboxGroup>
<view class="custom-checkbox">
<CheckboxGroup v-model="defValue" checked-color="#1580FF" @change="handleChange" v-bind="$attrs" :default-cols="4">
<Checkbox v-for="item in list" :key="item[valueKey]" :name="item[valueKey]" cell shape="button" :default-style="`
${checkboxStyle}
--checkbox-bg: #f7f8fa;
--checkbox-radius: 8rpx;
--checkbox-active-border: 2rpx solid #1580ff;
--checkbox-active-color: #1580ff;
height: var(--checkbox-height);
background-color: var(--checkbox-bg);
border-radius: var(--checkbox-radius);
display: flex;
align-items: center;
justify-content: center;
`">
{{ item[labelKey] }}
</Checkbox>
</CheckboxGroup>
</view>
</template>
<script lang="ts" setup>
import Checkbox from './Checkbox.vue'
import CheckboxGroup from './CheckboxGroup.vue'
const props = defineProps({
list: {
type: Array<any>,
type: Array,
default: () => [],
},
labelKey: {
@ -84,15 +91,13 @@ watch(
const checkboxStyle = computed(() => {
const width = typeof props.width === 'number' ? `${props.width}rpx` : props.width
const height = typeof props.height === 'number' ? `${props.height}rpx` : props.height
return {
'--checkbox-width': width,
'--checkbox-height': height,
}
return `--checkbox-width: ${width};--checkbox-height: ${height};`
})
</script>
<style lang="scss" scoped>
:deep(.custom-checkbox) {
.custom-checkbox {
//
--checkbox-width: 216rpx;
--checkbox-height: 60rpx;
@ -100,30 +105,29 @@ const checkboxStyle = computed(() => {
--checkbox-radius: 8rpx;
color: #333;
.checkbox {
width: var(--checkbox-width);
height: var(--checkbox-height);
min-width: var(--checkbox-width);
background-color: var(--checkbox-bg);
border-radius: var(--checkbox-radius);
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid var(--checkbox-bg);
}
.checkbox__icon {
display: none;
}
}
:deep(.checkbox-group) {
display: grid;
grid-template-columns: repeat(var(--default-cols), 1fr);
gap: 16rpx;
:deep(.ycym-checkbox) {
width: var(--checkbox-width);
height: var(--checkbox-height);
min-width: var(--checkbox-width);
background-color: var(--checkbox-bg);
border-radius: var(--checkbox-radius);
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid var(--checkbox-bg);
}
:deep(.checkbox__icon) {
display: none;
}
:deep(.checkbox-active) {
border-color: #1580ff !important;
.checkbox__label {
color: #1580ff !important;
}

View File

@ -1,6 +1,6 @@
<template>
<view
class="checkbox"
:style="`${defaultStyle}`"
:class="{
'checkbox--disabled': isDisabled,
'checkbox-active': isChecked,
@ -8,7 +8,7 @@
}"
@click="handleClick"
>
<view class="checkbox__icon" :class="{ 'checkbox__icon--checked': isChecked }">
<view class="checkbox__icon" :class="{ 'checkbox__icon--checked': isChecked }" v-if="showIcon">
<text v-if="isChecked" class="i-carbon-checkmark checkbox__icon-check"></text>
</view>
<view class="checkbox__label">
@ -33,6 +33,16 @@ const props = defineProps({
type: Boolean,
default: false,
},
showIcon:{
default:false
},
defaultStyle:{
type:String,
default: 'display: inline-flex;align-items: center;cursor: pointer;font-size: 28rpx;'
},
checkboxActive:{
default:'background-color: #0083ff;border-color: #0083ff;'
}
})
const emit = defineEmits(['change'])
@ -83,12 +93,6 @@ const handleClick = () => {
</script>
<style scoped>
.checkbox {
display: inline-flex;
align-items: center;
cursor: pointer;
font-size: 28rpx;
}
.checkbox--disabled {
cursor: not-allowed;
@ -108,7 +112,6 @@ const handleClick = () => {
}
.checkbox__icon--checked {
background-color: #0083ff;
border-color: #0083ff;
}
@ -122,8 +125,8 @@ const handleClick = () => {
}
.checkbox-active {
background-color: #0083ff;
border-color: #0083ff;
border:var(--checkbox-active-border);
color: var(--checkbox-active-color)
}
.checkbox-disabled {

View File

@ -1,5 +1,5 @@
<template>
<view class="checkbox-group">
<view class="checkbox-group" :style="`${checkgroupStyle}`">
<slot></slot>
</view>
</template>
@ -20,6 +20,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
checkgroupStyle:{
type:String,
default:'grid-template-columns: repeat(3, 1fr);'
}
})
const emit = defineEmits(['update:modelValue', 'change'])
@ -64,9 +68,9 @@ provide('checkboxGroup', {
</script>
<style scoped lang="scss">
.checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
.checkbox-group{
display: grid;
gap: 16rpx;
}
</style>

View File

@ -4,7 +4,7 @@
</view>
</template>
<script setup lang="ts">
<script setup>
import { ref, computed, watch, provide, onMounted, nextTick } from 'vue'
const props = defineProps({
@ -26,8 +26,8 @@ const props = defineProps({
const emit = defineEmits(['change', 'activeItem', 'input', 'update:modelValue'])
//
const childrens = ref<any[]>([])
const names = ref<any[]>([])
const childrens = ref([])
const names = ref([])
// 使 vue2 vue3
const dataValue = computed(() => {
@ -38,25 +38,25 @@ const dataValue = computed(() => {
return props.value
})
//
const emitValue = (val: any) => {
const emitValue = (val) => {
emit('input', val)
emit('update:modelValue', val)
}
//
const register = (childInstance: any) => {
const register = (childInstance) => {
childrens.value.push(childInstance)
}
//
const unregister = (childInstance: any) => {
const unregister = (childInstance) => {
const index = childrens.value.findIndex((child) => child.nameSync === childInstance.nameSync)
if (index !== -1) {
childrens.value.splice(index, 1)
}
}
// -
const setOpen = (val: any) => {
const setOpen = (val) => {
//
const isString = typeof val === 'string' || typeof val === 'number'
const isArray = Array.isArray(val)
@ -110,7 +110,7 @@ watch(
)
// -
const setAccordion = (self: any) => {
const setAccordion = (self) => {
if (!props.accordion) return
childrens.value.forEach((vm) => {
@ -143,7 +143,7 @@ const resize = () => {
}
//
const onChange = (isOpen: any, self: any) => {
const onChange = (isOpen, self) => {
let activeItem = ''
if (props.accordion) {
@ -151,7 +151,7 @@ const onChange = (isOpen: any, self: any) => {
activeItem = isOpen ? self.nameSync : ''
} else {
//
const activeItems: any = []
const activeItems = []
childrens.value.forEach((vm) => {
if (vm.isOpen) {
activeItems.push(vm.nameSync)
@ -181,7 +181,7 @@ provide('uniCollapseContext', {
: []
}
//
return Array.isArray(dataValue.value) ? dataValue.value.map((v: any) => v.toString()) : []
return Array.isArray(dataValue.value) ? dataValue.value.map((v) => v.toString()) : []
},
})

View File

@ -12,7 +12,9 @@
<view class="uni-collapse-item__title-wrap">
<slot name="title" :expanded="isOpen">
<view class="uni-collapse-item__title-box" :class="{ 'is-disabled': disabled }">
<image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
<view class="uni-collapse-item__title-img">
<image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
</view>
<text class="uni-collapse-item__title-text">{{ title }}</text>
</view>
</slot>
@ -132,10 +134,10 @@ const props = defineProps({
// IDbug
const elId = ref(`Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`)
const isOpen = ref(false)
const isheight = ref < any > null
const isheight = ref(null)
const height = ref(0)
const nameSync = ref('0')
const collapseHook = ref < any > null
const collapseHook = ref(null)
const proxy = getCurrentInstance()
//

View File

@ -1,12 +1,12 @@
<template>
<view class="flex items-center rounded-[48rpx] bg-[#F7F7F7]! px-[24rpx] py-[12rpx] ml-[32rpx]">
<view class="flex items-center rounded-[48rpx] bg-[#F7F7F7] px-[24rpx] py-[12rpx] ml-[12rpx]">
<view class="i-carbon-search text-[#999]"></view>
<input
v-model="searchValue"
:placeholder="placeholder"
confirm-type="search"
placeholder-style="color:#999"
class="text-start ml-20rpx"
class="text-start ml-20rpx bg-transparent"
@confirm="handleConfirm"
@input="handleInput"
/>

View File

@ -11,11 +11,13 @@
/>
</view>
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/qujian.png"
mode="scaleToFill"
class="mx-[20rpx] flex-1 h-[20rpx]"
/>
<view class="mx-[20rpx] flex-1 h-[20rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/qujian.png"
mode="scaleToFill"
class="h-[20rpx]"
/>
</view>
<view
class="w-[84rpx] h-[36rpx] rounded-full border-[#187CFF] border-solid border-[2rpx] flex items-center px-[18rpx] py-[10rpx] text-[#1580FF] text-[26rpx] bg-[rgba(21,128,255,0.1)]"
>
@ -92,7 +94,7 @@ const handleNumberChange = () => {
}
const handleRightThumbTouchEnd = () => {
let changeValue = [currentLeftValue.value, currentRightValue.value]
const changeValue = [currentLeftValue.value, currentRightValue.value]
emits('change', changeValue)
}

View File

@ -13,18 +13,21 @@
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
:style="{
backgroundColor: bgColor,
height: navHeight + 'px',
height: `${navHeight}px`,
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
}"
>
<!-- 左侧区域 -->
<view :class="`navbar-left ${leftWidthMin ? 'w-m-[100rpx]' : ''}`" @click="handleClickLeft">
<view
:class="`navbar-left ${leftWidthMin ? 'min-w-[48rpx]' : ''} min-w-[48rpx]`"
@click="handleClickLeft"
>
<!-- #ifndef MP-ALIPAY -->
<view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
</view>
<!-- #endif -->
<slot name="left"></slot>
</view>
<!-- 中间标题区域 -->
<view class="navbar-title">
<slot name="title">
@ -51,7 +54,7 @@
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
defineProps({
title: {
@ -95,8 +98,9 @@ defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const deviceInfo = getDeviceInfo()
const systemInfo = getWindowInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
@ -134,20 +138,20 @@ const handleClickLeft = () => {
}
.navbar-content {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
/* justify-content: space-between; */
padding: 0 16rpx;
box-sizing: border-box;
background-color: #fff;
}
.navbar-fixed {
position: fixed;
left: 0;
width: 100%;
z-index: 99;
width: 100%;
}
.navbar-border {
@ -168,20 +172,20 @@ const handleClickLeft = () => {
}
.navbar-title {
/* flex: 1; */
text-align: center;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
/* flex: 1; */
text-align: center;
}
.title-text {
font-size: 34rpx;
color: #333;
font-weight: 500;
overflow: hidden;
font-size: 34rpx;
font-weight: 500;
color: #333;
text-overflow: ellipsis;
white-space: nowrap;
}
@ -189,8 +193,8 @@ const handleClickLeft = () => {
.navbar-right {
display: flex;
align-items: center;
min-width: 52rpx;
justify-content: flex-end;
min-width: 52rpx;
height: 100%;
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<template>
<view v-if="slot.default">
<view>
<slot></slot>
</view>
</template>

View File

@ -22,7 +22,6 @@ export function useTable() {
const addColumn = (column: Column) => {
columns.value.push(column)
}
provide(key, {
columns,
addColumn,

View File

@ -1,26 +1,22 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '在线客服',
},
}
</route>
<template>
<view class="bg-[#fff] h-[100vh] flex flex-col">
<Navbar safeAreaInsetTop :bordered="false" title="在线客服" leftArrow @clickLeft="handleBack">
<template #title>
<text class="text-[#1F2329] text-[36rpx] font-medium">在线客服</text>
</template>
</Navbar>
<view class="flex-1 bg-[#F8F8F8] px-[32rpx] pb-safe">
<view class="mt-[84rpx] h-[754rpx] rounded-[16rpx] bg-[#fff]">
<view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center">
<image
class="min-w-[144rpx] min-h-[144rpx] w-[144rpx] h-[144rpx] rounded-full"
src="https://api.static.ycymedu.com/sub/images/customerService/avatar.jpg"
></image>
<view class="min-w-[144rpx] min-h-[144rpx] w-[144rpx] h-[144rpx]">
<image
class="rounded-full"
src="https://api.static.ycymedu.com/sub/images/customerService/avatar.jpg"
></image>
</view>
<view class="flex flex-col text-[#000] ml-[32rpx]">
<text class="mb-[12rpx] font-normal text-[28rpx]">专属客服为您服务</text>
<view class="flex items-center">
@ -36,11 +32,13 @@
</view>
<view class="px-[168rpx] pt-[48rpx]">
<image
class="w-[352rpx] h-[352rpx]"
:src="qrCodeUrl"
:show-menu-by-longpress="true"
></image>
<view class="w-[352rpx] h-[352rpx]">
<image
class="w-[352rpx] h-[352rpx]"
:src="qrCodeUrl"
:show-menu-by-longpress="true"
></image>
</view>
<view class="flex items-center justify-center mt-[34rpx]">
<view class="i-carbon-fingerprint-recognition text-[#E75859] text-[28rpx]"></view>
@ -55,7 +53,6 @@
</template>
<script lang="ts" setup>
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
import { useUserStore } from '@/store'
const userStore = useUserStore()
@ -84,10 +81,6 @@ const makePhoneCall = () => {
})
}
const handleBack = () => {
uni.navigateBack()
}
onBeforeMount(() => {
phoneNumber.value = contact[userStore.userInfo.city.code]?.phone || phoneNumber.value
qrCodeUrl.value = contact[userStore.userInfo.city.code]?.qrCode || qrCodeUrl.value

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -45,6 +47,7 @@
cell
shape="button"
class="custom-checkbox"
default-style="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;"
>
{{ item.name }}
</Checkbox>
@ -101,7 +104,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 '@/pages-sub/composables/useRouterDetail'
import { useRouterDetail } from './useRouterDetail'
const userStore = useUserStore()
@ -114,7 +117,7 @@ const handleBack = () => {
uni.navigateBack()
}
const checkedList = ref<any[]>([])
const checkedList = ref([])
const answerMap = new Map()
const disableBtn = ref(true)
const handleCheckChange = (value: any[]) => {
@ -155,7 +158,7 @@ const calcScore = () => {
//
const currentIndex = ref(0)
const questions = ref<any[]>([])
const questions = ref([])
const questionType = ref(-1)
const questionName = ref('')

View File

@ -122,12 +122,12 @@
<view class="text-[24rpx] text-[#1580FF] mr-[8rpx]">
{{ isExpand ? '展开' : '收起' }}
</view>
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/shouqi.png"
mode="scaleToFill"
class="w-[16rpx] h-[12rpx]"
:style="isExpand ? 'transform:rotate(180deg)' : ''"
/>
<view class="w-[16rpx] h-[12rpx]" :style="isExpand ? 'transform:rotate(180deg)' : ''">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/shouqi.png"
class="w-[16rpx] h-[12rpx]"
/>
</view>
</view>
</view>
</template>

View File

@ -42,11 +42,12 @@
</view>
<view class="top-[50%] left-[50%] absolute translate-x-[-50%] translate-y-[-50%]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/zhongjian.png"
mode="scaleToFill"
class="w-[184rpx] h-[184rpx]"
/>
<view class="w-[184rpx] h-[184rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/zhongjian.png"
mode="scaleToFill"
/>
</view>
</view>
</view>
</template>

View File

@ -1,43 +1,53 @@
<template>
<view class="w-full flex flex-col">
<view class="flex flex-col items-center">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/toubu.png "
mode="scaleToFill"
class="w-full h-[538rpx]"
/>
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/mingzi.png"
mode="scaleToFill"
class="h-[44rpx] w-[420rpx] bg-transparent mt-[-78rpx]"
/>
<view class="w-full h-[538rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/toubu.png "
mode="scaleToFill"
class="w-full h-[538rpx]"
/>
</view>
<view class="h-[44rpx] w-[420rpx] mt-[-78rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/mingzi.png"
mode="scaleToFill"
class="h-[44rpx] w-[420rpx] bg-transparent"
/>
</view>
</view>
<view
class="rounded-[0rpx_0rpx_20rpx_20rpx] h-[474rpx] ml-[36rpx] mr-[38rpx] bg-white px-[24rpx] pt-[28rpx] pb-[18rpx]"
>
<view class="flex items-center">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png"
mode="scaleToFill"
class="w-[214rpx] h-[180rpx] min-w-[214rpx]"
@click="
previewImg(
['https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png'],
0,
)
"
/>
<view class="w-[214rpx] h-[180rpx] min-w-[214rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png"
mode="scaleToFill"
class="w-[214rpx] h-[180rpx] min-w-[214rpx]"
@click="
previewImg(
[
'https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png',
],
0,
)
"
/>
</view>
<view class="text-[26rpx] text-[#3d3d3d] ml-[16rpx] text-wrap">
经济南市教育局批准成立的十二年一贯制学校由山东锦泽实业集团投资创办坐落于济南市平阴县深泉路1号占地12万平方米环境清幽设施一流
</view>
</view>
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tifen.png"
mode="scaleToFill"
class="h-[234rpx]"
/>
<view class="h-[234rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tifen.png"
mode="scaleToFill"
class="h-[234rpx]"
/>
</view>
<view class="grid grid-cols-[1fr_2fr_1fr] text-[#333] text-[26rpx] gap-[10prx] mt-[6rpx]">
<view class="justify-self-center">轻松可提</view>
<view class="justify-self-center">复读生平均提分</view>

View File

@ -11,14 +11,16 @@
</view>
<view class="grid grid-cols-2 gap-x-[16rpx] gap-y-[10rpx]">
<image
:src="item"
mode="scaleToFill"
v-for="(item, index) in imageList"
:key="index"
class="w-full h-[170rpx]"
@click="previewImg(imageList, index)"
/>
<view class="w-full h-[170rpx]">
<image
:src="item"
mode="scaleToFill"
v-for="(item, index) in imageList"
:key="index"
class="w-full h-[170rpx]"
@click="previewImg(imageList, index)"
/>
</view>
</view>
</view>
</template>

View File

@ -1,11 +1,13 @@
<template>
<view class="flex mx-[20rpx] flex-col">
<view class="w-full relative z-2">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/biaoti.png"
mode="widthFix"
class="w-full h-[100rpx]"
/>
<view class="w-full h-[100rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/biaoti.png"
mode="widthFix"
class="w-full h-[100rpx]"
/>
</view>
<view
class="text-[40rpx] font-700 absolute top-[12rpx] left-[50rpx] tracking-[10rpx] text-white italic"
>

View File

@ -6,7 +6,9 @@
class="rounded-[40rpx] bg-white px-[36rpx] pt-[38rpx] pb-[20rpx] grid grid-cols-4 gap-x-[0rpx] gap-y-[28rpx]"
>
<view class="flex flex-col items-center" v-for="(item, index) in schools" :key="index">
<image :src="item.badge" mode="scaleToFill" class="w-[120rpx] h-[120rpx]" />
<view class="w-[120rpx] h-[120rpx]">
<image :src="item.badge" mode="scaleToFill" class="w-[120rpx] h-[120rpx]" />
</view>
<span class="text-[26rpx] text-[#333]">{{ item.name }}</span>
</view>

View File

@ -1,26 +1,33 @@
<template>
<view class="bg-white px-[30rpx] pb-safe pt-[14rpx] grid grid-cols-2 gap-[24rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/dh.png"
mode="scaleToFill"
class="h-[88rpx]"
@click="handlePhone"
/>
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/wx.png"
mode="scaleToFill"
class="h-[88rpx]"
@click="handleFriend"
/>
<view class="h-[88rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/dh.png"
mode="scaleToFill"
class="h-[88rpx]"
@click="handlePhone"
/>
</view>
<view class="h-[88rpx]">
<image
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/wx.png"
mode="scaleToFill"
class="h-[88rpx]"
@click="handleFriend"
/>
</view>
<MessageBox v-model:show="show" title="好友添加">
<template>
<image
:src="friendImage"
mode="scaleToFill"
class="w-full h-[80vh] py-[20rpx]"
:show-menu-by-longpress="true"
/>
<view class="w-full h-[80vh] py-[20rpx]">
<image
:src="friendImage"
mode="scaleToFill"
class="w-full h-[80vh]"
:show-menu-by-longpress="true"
/>
</view>
</template>
</MessageBox>
</view>

View File

@ -9,11 +9,13 @@
<template>
<view class="flex flex-col h-screen">
<Tabs v-model:modelValue="currentIndex" :tabs="tabs"></Tabs>
<swiper :current="currentIndex" class="flex-1" @change="handleSwiperChange">
<swiper-item v-for="(item, index) in tabs" :key="index">
<image :src="item.image" mode="scaleToFill" class="w-full h-full" />
</swiper-item>
</swiper>
<view class="flex-1">
<swiper :current="currentIndex" @change="handleSwiperChange">
<swiper-item v-for="(item, index) in tabs" :key="index">
<image :src="item.image" mode="scaleToFill" class="w-full h-full" />
</swiper-item>
</swiper>
</view>
<ShareButtonGroup
phone-number="18516500555"
friend-image="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tianjiawx-liuxue.jpg"

View File

@ -20,12 +20,14 @@
</button>
</Badge>
<image
class="w-[286rpx] h-[286rpx] mt-[134rpx] mix-blend-darken"
src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg"
mode="widthFix"
@click="show = true"
></image>
<view class="w-[286rpx] h-[286rpx] mt-[134rpx]">
<image
class="w-[286rpx] h-[286rpx] mix-blend-darken"
src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg"
mode="widthFix"
@click="show = true"
></image>
</view>
</view>
<ActionSheet
v-model:show="show"
@ -71,14 +73,14 @@ const badgeValue = ref(1)
const filterMenuRef = ref()
const handleChange = (params: any) => {
const handleChange = (params) => {
badgeValue.value = params.length
}
const handleResult = () => {
let _params = filterMenuRef.value.handleConfirm()
const _params = filterMenuRef.value.handleConfirm()
let params = {
const params = {
p: userStore.userInfo.estimatedAchievement.sp,
location: userStore.userInfo.estimatedAchievement.provinceCode,
subjects: userStore.userInfo.estimatedAchievement.subjectGroup.split(','),
@ -91,12 +93,12 @@ const handleResult = () => {
getUniversityListByFilter(params).then((res) => {
if (res.code === 200) {
let collegeList = (res.result as { rows: any[] }).rows
let wishList = collegeList.map((item) => {
let _major = {
const collegeList = (res.result as { rows: any[] }).rows
const wishList = collegeList.map((item) => {
const _major = {
...item,
name: item.universityName,
vItems: item.majorItems.map((majorItem: any) => ({
vItems: item.majorItems.map((majorItem) => ({
...majorItem,
name: majorItem.majorName,
items: majorItem.planItems,

View File

@ -30,8 +30,8 @@ const props = defineProps({
},
})
const menus = ref<any[]>([])
const currentMenuObj = ref<any>(null)
const menus = ref([])
const currentMenuObj = ref(null)
const changeMenu = (item: any) => {
currentMenuObj.value = item

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
needLogin: true,
}
@ -25,11 +27,13 @@
<text class="text-[36rpx] text-[#000] font-bold mt-[24rpx] mb-[22rpx]">
{{ professionInfo.career }}
</text>
<image
class="w-full h-[264rpx] rounded-[8rpx]"
:src="professionInfo.img_url"
mode="aspectFill"
/>
<view class="w-full h-[264rpx]">
<image
class="w-full h-[264rpx] rounded-[8rpx]"
:src="professionInfo.img_url"
mode="aspectFill"
/>
</view>
</view>
<view class="h-[18rpx] bg-[#F8F8F8] mt-[24rpx] mb-[16rpx]"></view>
<view class="">
@ -161,7 +165,7 @@ const professionInfo = ref<ProfessionInfo>({
const professionId = ref('')
onLoad((options) => {
professionId.value = options?.id
professionId.value = options.id
getProfessionInfo({ id: professionId.value }).then((resp) => {
if (resp.code === 200) {
professionInfo.value = resp.result as ProfessionInfo

View File

@ -1,13 +1,12 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '城市列表'
},
}
</route>
<template>
<view class="wraper overflow-hidden flex flex-col" :bordered="false">
<Navbar title="城市列表" left-arrow @click-left="navigatorBack" safeAreaInsetTop />
<wd-index-bar sticky class="overflow-y h-0 flex-auto">
<view v-for="item in cities" :key="item.letter">
<wd-index-anchor :index="item.letter" />
@ -28,7 +27,6 @@
import { useCityStore } from '@/store/city'
import { useUserStore } from '@/store/user'
import { City } from '@/types/app-type'
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
import { getUserCity } from '@/service/index/api'
const cityStore = useCityStore()

View File

@ -1,11 +1,13 @@
<template>
<view class="flex flex-col px-[32rpx] pt-[32rpx] bg-[#fff] mt-16rpx">
<view class="flex items-center gap-[10rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/faculty.png"
mode="scaleToFill"
/>
<view class="w-[48rpx] h-[48rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/faculty.png"
mode="scaleToFill"
/>
</view>
<text class="text-[32rpx] font-semibold text-[#333]">院系设置</text>
</view>
@ -51,9 +53,9 @@ watch(
(newVal) => {
getUniversityListByProvince({ id: newVal }).then((resp) => {
if (resp.code === 200) {
let _res = (originTableData = resp.result as { name: string; item: { name: string }[] }[])
const _res = (originTableData = resp.result as { name: string; item: { name: string }[] }[])
_res.forEach((college) => {
let _college = { name: college.name, major: '' }
const _college = { name: college.name, major: '' }
_college.major = college.item.map((item) => item.name).join(',')
tableData.value.push(_college)
})
@ -62,7 +64,7 @@ watch(
},
)
const tableData = ref<any[]>([])
const tableData = ref([])
const show = ref(false)
let originTableData = []

View File

@ -54,13 +54,13 @@ const batche = ref(batchList[0])
const batches = ref(batchList)
const year = ref('')
const yearList = ref<any[]>([])
const yearList = ref([])
const pickList = ref<any[]>([])
const pickList = ref([])
const pickValue = ref('')
let pickType = 1
const tableData = ref<any[]>([])
const tableData = ref([])
let isFirst = true
watch(

View File

@ -79,13 +79,13 @@ const batches = ref(batchList)
const provinceName = userStore.userInfo.estimatedAchievement.provinceName
const year = ref('')
const yearList = ref<any[]>([])
const yearList = ref([])
const pickList = ref<any[]>([])
const pickList = ref([])
const pickValue = ref('')
let pickType = 1
const tableData = ref<any[]>([])
const tableData = ref([])
let isFirst = true
watch(

View File

@ -37,11 +37,13 @@
v-show="assessmentSubjectList.length > 0"
>
<view class="flex items-center gap-[10rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/subject.png"
mode="scaleToFill"
/>
<view class="w-[48rpx] h-[48rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/subject.png"
mode="scaleToFill"
/>
</view>
<text class="text-[30rpx] font-600 text-[#000]">
学科评估·{{ assessmentSubjectList.length }}
</text>
@ -72,11 +74,13 @@
</view>
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]" v-show="featureSubjectList.length > 0">
<view class="flex items-center gap-[10rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/profession.png"
mode="scaleToFill"
/>
<view class="w-[48rpx] h-[48rpx]">
<image
class="w-[48rpx] h-[48rpx]"
src="https://api.static.ycymedu.com/zdx/profession.png"
mode="scaleToFill"
/>
</view>
<text class="text-[30rpx] font-600 text-[#000]">
特色专业·{{ featureSubjectList.length }}
</text>
@ -162,9 +166,9 @@
import { getSubjectIntroduceList } from '@/service/index/api'
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
const subjectIntroduceList = ref<any[]>([])
const assessmentSubjectList = ref<any[]>([])
const featureSubjectList = ref<any[]>([])
const subjectIntroduceList = ref([])
const assessmentSubjectList = ref([])
const featureSubjectList = ref([])
const props = defineProps({
id: {
type: Number,
@ -207,7 +211,7 @@ const parsedNames = (name: string) => {
}
}
return {
name: name,
name,
grade: '',
}
}

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
}
</route>
@ -49,21 +51,21 @@
v-if="currentMenu === 1"
@changeName="handleRegionChange"
@change="handleRegionIdChange"
class="custom-check-group"
checkgroupStyle="display: grid;grid-template-columns: repeat(4, 1fr);gap: 16rpx;padding: 24rpx 24rpx 36rpx;"
/>
<Nature
v-if="currentMenu === 2"
:defaultValue="natureKeyInfo"
@changeName="handleNatureChange"
@change="handleNatureIdChange"
class="custom-check-group"
checkgroupStyle="display: grid;grid-template-columns: repeat(4, 1fr);gap: 16rpx;padding: 24rpx 24rpx 36rpx;"
/>
<UniType
v-if="currentMenu === 3"
:defaultValue="uniTypeKeyInfo"
@changeName="handleUniTypeChange"
@change="handleUniTypeIdChange"
class="custom-check-group"
checkgroupStyle="display: grid;grid-template-columns: repeat(4, 1fr);gap: 16rpx;padding: 24rpx 24rpx 36rpx;"
/>
<view class="flex items-center justify-between px-[32rpx] pb-[32rpx] gap-[20rpx]">
<view class="cancel-btn" @click="handleClear(index)"></view>
@ -80,8 +82,12 @@
v-for="item in schoolList"
@click="itemClick(item, item.zp_index)"
>
<view class="flex items-center p-[32rpx] w-full">
<image class="w-[80rpx] h-[80rpx] ml-[18rpx] mr-[24rpx]" :src="item.logo"></image>
<view class="flex items-center p-[32rpx]">
<view class="w-[80rpx] h-[80rpx] ml-[18rpx] mr-[24rpx]">
<view class="w-[80rpx] h-[80rpx]">
<image class="w-[80rpx] h-[80rpx] rounded-full" :src="item.logo"></image>
</view>
</view>
<view class="flex justify-between items-center flex-1 overflow-y-hidden">
<view class="flex flex-col w-full" hover-class="none">
<text class="text-[28rpx] text-[#333] font-semibold mb-[6rpx]">
@ -137,21 +143,21 @@ const subMenu = ref([
const dropMenuRef = ref()
const regionInfo = ref<any[]>([]) //
const uniTypeInfo = ref<any[]>([]) //
const natureInfo = ref<any[]>([]) //
const regionInfo = ref([]) //
const uniTypeInfo = ref([]) //
const natureInfo = ref([]) //
const regionKeyInfo = ref<any[]>([]) //
const uniTypeKeyInfo = ref<any[]>([]) //
const natureKeyInfo = ref<any[]>([]) //
const regionKeyInfo = ref([]) //
const uniTypeKeyInfo = ref([]) //
const natureKeyInfo = ref([]) //
const currentMenu = ref(1)
const handleOpenSubMenu = (id: number) => {
currentMenu.value = id
}
const schoolList = ref<any[]>([])
const paging = ref<any>(null)
const schoolList = ref([])
const paging = ref(null)
const queryList = (page: number, pageSize: number) => {
getUniversityList({

View File

@ -2,6 +2,8 @@
{
style: {
navigationStyle: 'custom',
transparentTitle: 'always',
navigationBarTitleText: '',
},
needLogin: true,
}
@ -24,11 +26,13 @@
<view class="flex-1 flex flex-col pb-safe overflow-y-auto">
<view class="flex items-center p-[32rpx]" hover-class="none">
<image
class="w-[104rpx] h-[104rpx]"
:src="universityBaseInfo?.universityResult.logo"
:lazy-load="true"
></image>
<view class="w-[104rpx] h-[104rpx]">
<image
class="w-[104rpx] h-[104rpx]"
:src="universityBaseInfo?.universityResult.logo"
:lazy-load="true"
></image>
</view>
<view class="flex flex-col ml-[24rpx]">
<text class="text-[32rpx] font-semibold text-[#303030]">
{{ universityBaseInfo?.universityResult.name }}

View File

@ -109,18 +109,18 @@ const changeMenu = (item: { id: number; name: string }) => {
currentMenu.value = item.id
}
const defaultRegion = ref<any[]>([])
const defaultNature = ref<any[]>([])
const defaultUniType = ref<any[]>([])
const defaultCollegeFeature = ref<any[]>([])
const defaultRegion = ref([])
const defaultNature = ref([])
const defaultUniType = ref([])
const defaultCollegeFeature = ref([])
const defaultPhase = ref('')
const filterParams = ref<any[]>([])
const filterParams = ref([])
const chooseRegion = ref<any[]>([])
const chooseNature = ref<any[]>([])
const chooseUniType = ref<any[]>([])
const chooseCollegeFeature = ref<any[]>([])
const chooseRegion = ref([])
const chooseNature = ref([])
const chooseUniType = ref([])
const chooseCollegeFeature = ref([])
const choosePhase = ref('')
const handleRegionChangeObj = (val: any[]) => {

View File

@ -30,7 +30,7 @@ import { useRules } from '@/pages-sub/home/inputScore/useRules'
const userStore = useUserStore()
const phaseList = ref<any[]>([])
const phaseList = ref([])
const choosePhase = ref('')

View File

@ -4,11 +4,17 @@
</view>
</template>
<script lang="ts" setup>
const props = defineProps({
progress: {
type: [Number, String],
default: 0,
<script>
import { defineComponent } from 'vue'
export default defineComponent({
name: 'ProgressBar',
props: {
progress: {
type: Number | String,
required: true,
default: 0,
},
},
})
</script>

View File

@ -4,6 +4,7 @@
@change="handleChange"
label-key="simplename"
v-bind="$attrs"
:defaultCols="4"
width="100%"
/>
</template>
@ -12,6 +13,10 @@
import { getRegionInfo } from '@/service/index/api'
import CheckGroup from '@/pages-sub/components/check-group/CheckGroup.vue'
defineOptions({
inheritAttrs:true
})
interface Region {
code: string
name: string
@ -19,7 +24,7 @@ interface Region {
simplename: string
pinyin: string
}
const regionList = ref<any[]>([])
const regionList = ref([])
getRegionInfo().then((res) => {
if (res.code === 200) {
regionList.value = res.result as Region[]

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More