Compare commits
8 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
4b5cd29bfe | |
|
|
1dee63af1b | |
|
|
f2b844f0a7 | |
|
|
60cb378f21 | |
|
|
94d7d1a7ae | |
|
|
ee5042a830 | |
|
|
7c4cedaeff | |
|
|
4bcb347d4a |
|
|
@ -2,7 +2,7 @@
|
||||||
// 默认格式化工具选择prettier
|
// 默认格式化工具选择prettier
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
// 保存的时候自动格式化
|
// 保存的时候自动格式化
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": false,
|
||||||
//开启自动修复
|
//开启自动修复
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
"source.fixAll.stylelint": "explicit"
|
"source.fixAll.stylelint": "explicit"
|
||||||
},
|
},
|
||||||
// 配置stylelint检查的文件类型范围
|
// 配置stylelint检查的文件类型范围
|
||||||
"stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应
|
"stylelint.validate": ["css", "vue", "html"], // 与package.json的scripts对应
|
||||||
"stylelint.enable": true,
|
"stylelint.enable": false,
|
||||||
"css.validate": false,
|
"css.validate": false,
|
||||||
"less.validate": false,
|
"less.validate": false,
|
||||||
"scss.validate": false,
|
"scss.validate": false,
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "Vue.volar"
|
||||||
},
|
},
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"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",
|
"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"
|
".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
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,4 @@
|
||||||
|
|
||||||
- web平台: `pnpm build:h5`,打包后的文件在 `dist/build/h5`,可以放到web服务器,如nginx运行。如果最终不是放在根目录,可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
|
- web平台: `pnpm build:h5`,打包后的文件在 `dist/build/h5`,可以放到web服务器,如nginx运行。如果最终不是放在根目录,可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
|
||||||
- weixin平台:`pnpm build:mp-weixin`, 打包后的文件在 `dist/build/mp-weixin`,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。
|
- 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云打包。
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
VITE_APP_TITLE = '六纬志愿'
|
VITE_APP_TITLE = '六纬升学'
|
||||||
VITE_APP_PORT = 9000
|
VITE_APP_PORT = 9000
|
||||||
|
|
||||||
VITE_UNI_APPID = 'H57F2ACE4'
|
VITE_UNI_APPID = 'H57F2ACE4'
|
||||||
|
|
|
||||||
41
package.json
41
package.json
|
|
@ -2,7 +2,6 @@
|
||||||
"name": "volunteer-4",
|
"name": "volunteer-4",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "2.5.5",
|
"version": "2.5.5",
|
||||||
"description": "unibest - 最好的 uniapp 开发模板",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=18",
|
||||||
|
|
@ -73,29 +72,42 @@
|
||||||
"bin-wrapper": "npm:bin-wrapper-china"
|
"bin-wrapper": "npm:bin-wrapper-china"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dcloudio/uni-app": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-app-plus": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app-harmony": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-components": "3.0.0-4020920240930001",
|
"@dcloudio/uni-app-plus": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-h5": "3.0.0-4020920240930001",
|
"@dcloudio/uni-components": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001",
|
"@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",
|
"@tanstack/vue-query": "^5.62.16",
|
||||||
"abortcontroller-polyfill": "^1.7.8",
|
"abortcontroller-polyfill": "^1.7.8",
|
||||||
"dayjs": "1.11.10",
|
"dayjs": "1.11.10",
|
||||||
|
"htmlparser2": "^10.0.0",
|
||||||
"pinia": "2.0.36",
|
"pinia": "2.0.36",
|
||||||
"pinia-plugin-persistedstate": "3.2.1",
|
"pinia-plugin-persistedstate": "3.2.1",
|
||||||
"pinyin-pro": "^3.26.0",
|
"pinyin-pro": "^3.26.0",
|
||||||
"qs": "6.5.3",
|
"qs": "6.5.3",
|
||||||
"vue": "3.4.21",
|
"vue": "^3.4.21",
|
||||||
|
"vue-i18n": "^9.14.5",
|
||||||
"wot-design-uni": "^1.4.0"
|
"wot-design-uni": "^1.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^18.6.1",
|
"@commitlint/cli": "^18.6.1",
|
||||||
"@commitlint/config-conventional": "^18.6.3",
|
"@commitlint/config-conventional": "^18.6.3",
|
||||||
"@dcloudio/types": "^3.4.14",
|
"@dcloudio/types": "^3.4.8",
|
||||||
"@dcloudio/uni-automator": "3.0.0-4020920240930001",
|
"@dcloudio/uni-automator": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-cli-shared": "3.0.0-4020920240930001",
|
"@dcloudio/uni-cli-shared": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/uni-stacktracey": "3.0.0-4020920240930001",
|
"@dcloudio/uni-stacktracey": "3.0.0-4070520250711001",
|
||||||
"@dcloudio/vite-plugin-uni": "3.0.0-4020920240930001",
|
"@dcloudio/vite-plugin-uni": "3.0.0-4070520250711001",
|
||||||
"@esbuild/darwin-arm64": "0.20.2",
|
"@esbuild/darwin-arm64": "0.20.2",
|
||||||
"@esbuild/darwin-x64": "0.20.2",
|
"@esbuild/darwin-x64": "0.20.2",
|
||||||
"@iconify-json/carbon": "^1.2.4",
|
"@iconify-json/carbon": "^1.2.4",
|
||||||
|
|
@ -110,7 +122,7 @@
|
||||||
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
|
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
|
||||||
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
|
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
|
||||||
"@unocss/preset-legacy-compat": "^0.59.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",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"commitlint": "^18.6.1",
|
"commitlint": "^18.6.1",
|
||||||
|
|
@ -149,5 +161,8 @@
|
||||||
},
|
},
|
||||||
"minimize": {
|
"minimize": {
|
||||||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
|
||||||
export default defineUniPages({
|
export default defineUniPages({
|
||||||
globalStyle: {
|
globalStyle: {
|
||||||
navigationBarTextStyle: 'black',
|
navigationBarTextStyle: 'black',
|
||||||
navigationBarTitleText: '六纬志愿',
|
navigationBarTitleText: '六纬升学',
|
||||||
navigationBarBackgroundColor: '#fff',
|
navigationBarBackgroundColor: '#fff',
|
||||||
backgroundColor: '#F8F8F8',
|
backgroundColor: '#F8F8F8',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
856
pnpm-lock.yaml
856
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -3,33 +3,44 @@
|
||||||
style: {
|
style: {
|
||||||
navigationBarTitleText: '六纬AI小助手',
|
navigationBarTitleText: '六纬AI小助手',
|
||||||
},
|
},
|
||||||
|
needLogin: true,
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view class="w-full h-screen">
|
<web-view :src="url" @message="handleChildMessage" :update-title="false" />
|
||||||
<image
|
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/shengxue_aibg.png"
|
|
||||||
mode="widthFix"
|
|
||||||
class="w-full"
|
|
||||||
@click="navigateToAi"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
let queryStr = '?'
|
import { useUserStore } from '@/store'
|
||||||
onLoad((options: any) => {
|
import { getAssistant } from '@/service/index/api'
|
||||||
// 预加载AI小助手页面
|
|
||||||
const temQuery = Object.entries(options)
|
|
||||||
.map(([key, value]) => `${key}=${value}`)
|
|
||||||
.join('&')
|
|
||||||
queryStr += temQuery
|
|
||||||
console.log(queryStr)
|
|
||||||
})
|
|
||||||
|
|
||||||
const navigateToAi = () => {
|
const userStore = useUserStore()
|
||||||
uni.navigateTo({ url: `/aiService-sub/index/newAi${queryStr}` })
|
|
||||||
|
//chat.ycymedu.com
|
||||||
|
//chatv2.ycymedu.com
|
||||||
|
const url = ref(``)
|
||||||
|
|
||||||
|
const handleChildMessage = (event) => {
|
||||||
|
console.log('子应用传递的消息', event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
getAssistant().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const data = res.result as unknown as string
|
||||||
|
url.value = `${data}?userId=${userStore.userInfo.estimatedAchievement.wxId}&subjectGroup=${userStore.userInfo.estimatedAchievement.subjectGroup}&expectedScore=${userStore.userInfo.estimatedAchievement.expectedScore}&provinceName=${userStore.userInfo.estimatedAchievement.provinceName}&locationCode=${userStore.userInfo.estimatedAchievement.provinceCode}&token=${userStore.userInfo.token}×tamp=${new Date().getTime()}`
|
||||||
|
}
|
||||||
|
if (options.id) {
|
||||||
|
url.value += `&reportId=${options.id}`
|
||||||
|
}
|
||||||
|
if (options.type) {
|
||||||
|
url.value += `&reportType=${options.type}`
|
||||||
|
}
|
||||||
|
if (options.fileId) {
|
||||||
|
url.value += `&fileId=${options.fileId}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -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}×tamp=${new Date().getTime()}`
|
|
||||||
}
|
|
||||||
if (options?.id) {
|
|
||||||
url.value += `&reportId=${options.id}`
|
|
||||||
}
|
|
||||||
if (options?.type) {
|
|
||||||
url.value += `&reportType=${options.type}`
|
|
||||||
}
|
|
||||||
if (options?.fileId) {
|
|
||||||
url.value += `&fileId=${options.fileId}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<!-- TabBar占位块 - 与TabBar高度一致 -->
|
<!-- TabBar占位块 - 与TabBar高度一致 -->
|
||||||
<view
|
<view
|
||||||
v-if="showPlaceholder"
|
v-if="showPlaceholder"
|
||||||
class="tabbar-placeholder"
|
class="tabbar-placeholder mb-safe"
|
||||||
:style="{ height: `${tabbarTotalHeight}px` }"
|
:style="{ height: `${tabbarTotalHeight}px` }"
|
||||||
></view>
|
></view>
|
||||||
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
import { TabesItem } from '@/service/app/types'
|
import { TabesItem } from '@/service/app/types'
|
||||||
import { tabbarList } from '@/hooks/useTabbarList'
|
import { tabbarList } from '@/hooks/useTabbarList'
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted } from 'vue'
|
||||||
import { useUserStore } from '@/store'
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
currentPage: {
|
currentPage: {
|
||||||
|
|
@ -50,7 +49,6 @@ defineProps({
|
||||||
|
|
||||||
// 安全区域底部高度
|
// 安全区域底部高度
|
||||||
const safeAreaBottom = ref(0)
|
const safeAreaBottom = ref(0)
|
||||||
const userStore = useUserStore()
|
|
||||||
|
|
||||||
// 计算TabBar总高度 (TabBar高度 + 安全区域高度)
|
// 计算TabBar总高度 (TabBar高度 + 安全区域高度)
|
||||||
const tabbarTotalHeight = computed(() => {
|
const tabbarTotalHeight = computed(() => {
|
||||||
|
|
@ -61,16 +59,9 @@ const tabbarTotalHeight = computed(() => {
|
||||||
|
|
||||||
const changeItem = (item: TabesItem) => {
|
const changeItem = (item: TabesItem) => {
|
||||||
if (item.navigatorItem) {
|
if (item.navigatorItem) {
|
||||||
// 唯独ai有这个情况
|
|
||||||
if (item.path === '/aiService-sub/index/index' && !userStore.isLoginFlag) {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.path,
|
url: item.path,
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/aiService-sub/index/newAi',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: item.path,
|
url: item.path,
|
||||||
|
|
@ -80,7 +71,6 @@ const changeItem = (item: TabesItem) => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
uni.hideTabBar()
|
uni.hideTabBar()
|
||||||
|
|
||||||
// 获取系统信息以计算安全区域
|
// 获取系统信息以计算安全区域
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
|
@ -171,4 +161,9 @@ defineExpose({
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
padding-bottom: constant(safe-area-inset-bottom);
|
||||||
padding-bottom: env(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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { getWindowInfo } from '@/utils/tools'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
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 position = ref({ x: props.initialX, y: props.initialY })
|
||||||
const startPosition = ref({ x: 0, y: 0 })
|
const startPosition = ref({ x: 0, y: 0 })
|
||||||
|
|
@ -110,11 +111,11 @@ const handleClick = () => {
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fab-button {
|
.fab-button {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
width: 128rpx;
|
width: 128rpx;
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,13 @@
|
||||||
: '输入模考/高考成绩'
|
: '输入模考/高考成绩'
|
||||||
}}
|
}}
|
||||||
</text>
|
</text>
|
||||||
|
<view class="w-[42rpx] h-[39rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[42rpx] h-[39rpx]"
|
class="w-[42rpx] h-[39rpx]"
|
||||||
src="https://api.static.ycymedu.com/src/images/home/pen.svg"
|
src="https://api.static.ycymedu.com/src/images/home/pen.svg"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="flex items-center justify-center" v-else>
|
<view class="flex items-center justify-center" v-else>
|
||||||
<image
|
<image
|
||||||
class="w-[74%] h-[50rpx]"
|
class="w-[74%] h-[50rpx]"
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,14 @@
|
||||||
hover-class="none"
|
hover-class="none"
|
||||||
:hover-stop-propagation="false"
|
:hover-stop-propagation="false"
|
||||||
>
|
>
|
||||||
<text class="text-[32rpx] text-[#333333] font-semibold">高考资讯</text>
|
<text class="text-[32rpx] text-[#333333] font-semibold w-max">高考资讯</text>
|
||||||
|
<view class="w-[40rpx] h-[40rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[40rpx] h-[40rpx]"
|
|
||||||
src="https://api.static.ycymedu.com/src/images/home/right.svg"
|
src="https://api.static.ycymedu.com/src/images/home/right.svg"
|
||||||
@click="toNewsPage"
|
@click="toNewsPage"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="truncate flex flex-col py-[32rpx]"
|
class="truncate flex flex-col py-[32rpx]"
|
||||||
|
|
@ -34,9 +35,7 @@
|
||||||
import { useCityNewTop, newsList } from '@/hooks/useCityInfoHook'
|
import { useCityNewTop, newsList } from '@/hooks/useCityInfoHook'
|
||||||
import { News } from '@/types/app-type'
|
import { News } from '@/types/app-type'
|
||||||
|
|
||||||
onShow(() => {
|
useCityNewTop()
|
||||||
useCityNewTop()
|
|
||||||
})
|
|
||||||
|
|
||||||
const handleClick = (item: News) => {
|
const handleClick = (item: News) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,15 @@
|
||||||
hover-class="none"
|
hover-class="none"
|
||||||
:hover-stop-propagation="false"
|
:hover-stop-propagation="false"
|
||||||
>
|
>
|
||||||
<text class="text-[32rpx] text-[#333333] font-semibold">热门排行榜</text>
|
<text class="text-[32rpx] text-[#333333] font-semibold w-max">热门排行榜</text>
|
||||||
|
|
||||||
|
<view class="w-[40rpx] h-[40rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[40rpx] h-[40rpx]"
|
|
||||||
src="https://api.static.ycymedu.com/src/images/home/right.svg"
|
src="https://api.static.ycymedu.com/src/images/home/right.svg"
|
||||||
@click="toSchool('0')"
|
@click="toSchool('0')"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="flex items-center overflow-x-auto hot-rank-outer gap-[16rpx] h-[462rpx] px-[32rpx]"
|
class="flex items-center overflow-x-auto hot-rank-outer gap-[16rpx] h-[462rpx] px-[32rpx]"
|
||||||
|
|
@ -19,8 +21,8 @@
|
||||||
:hover-stop-propagation="false"
|
:hover-stop-propagation="false"
|
||||||
>
|
>
|
||||||
<!-- 骨架屏 -->
|
<!-- 骨架屏 -->
|
||||||
|
<template v-if="isLoading">
|
||||||
<view
|
<view
|
||||||
v-if="isLoading"
|
|
||||||
v-for="(_skeleton, index) in skeletonItems"
|
v-for="(_skeleton, index) in skeletonItems"
|
||||||
:key="'skeleton-' + index"
|
:key="'skeleton-' + index"
|
||||||
:class="`hot-rank-item flex-none skeleton-item`"
|
:class="`hot-rank-item flex-none skeleton-item`"
|
||||||
|
|
@ -29,19 +31,26 @@
|
||||||
>
|
>
|
||||||
<view class="skeleton-text mx-[32rpx] mt-[32rpx] h-[40rpx] w-[120rpx] rounded"></view>
|
<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="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-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="skeleton-image w-[80rpx] h-[80rpx] rounded-full flex-none mr-[16rpx]"
|
||||||
|
></view>
|
||||||
<view class="flex flex-col w-full">
|
<view class="flex flex-col w-full">
|
||||||
<view class="skeleton-text h-[28rpx] w-[120rpx] rounded"></view>
|
<view class="skeleton-text h-[28rpx] w-[120rpx] rounded"></view>
|
||||||
<view class="skeleton-text h-[22rpx] w-[100rpx] mt-[10rpx] rounded"></view>
|
<view class="skeleton-text h-[22rpx] w-[100rpx] mt-[10rpx] rounded"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 真实数据 -->
|
<!-- 真实数据 -->
|
||||||
|
<template v-else>
|
||||||
<view
|
<view
|
||||||
v-else
|
|
||||||
:class="`hot-rank-item flex-none`"
|
:class="`hot-rank-item flex-none`"
|
||||||
hover-class="none"
|
hover-class="none"
|
||||||
:hover-stop-propagation="false"
|
:hover-stop-propagation="false"
|
||||||
|
|
@ -50,7 +59,9 @@
|
||||||
@click="toSchool(typeWrap.type)"
|
@click="toSchool(typeWrap.type)"
|
||||||
v-show="typeWrap.rows.length > 0"
|
v-show="typeWrap.rows.length > 0"
|
||||||
>
|
>
|
||||||
<text class="font-semibold text-[#303030] text-[32rpx] inline-block mx-[32rpx] mt-[32rpx]">
|
<text
|
||||||
|
class="font-semibold text-[#303030] text-[32rpx] inline-block mx-[32rpx] mt-[32rpx]"
|
||||||
|
>
|
||||||
{{ typeWrap.name }}
|
{{ typeWrap.name }}
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
|
|
@ -62,10 +73,12 @@
|
||||||
<text class="font-[28rpx] text-[#999999] font-normal mr-[10rpx]">
|
<text class="font-[28rpx] text-[#999999] font-normal mr-[10rpx]">
|
||||||
{{ item.rank }}
|
{{ item.rank }}
|
||||||
</text>
|
</text>
|
||||||
|
<view class="w-[80rpx] h-[80rpx] rounded-full">
|
||||||
<image
|
<image
|
||||||
class="w-[80rpx] h-[80rpx] rounded-full flex-none mr-[16rpx]"
|
class="flex-none mr-[16rpx] w-full h-full rounded-full"
|
||||||
:src="item.logo"
|
:src="item.logo"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<view class="truncate flex flex-col" hover-class="none">
|
<view class="truncate flex flex-col" hover-class="none">
|
||||||
<text class="font-normal text-[#333333] text-[28rpx] truncate">
|
<text class="font-normal text-[#333333] text-[28rpx] truncate">
|
||||||
{{ item.universityName }}
|
{{ item.universityName }}
|
||||||
|
|
@ -76,6 +89,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -91,7 +105,7 @@ const toSchool = (id: string) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { unSortTypeList } = useUnSortType()
|
const { unSortTypeList } = useUnSortType()
|
||||||
let universityTypeRankList = ref<any[]>([])
|
const universityTypeRankList = ref([])
|
||||||
const isLoading = ref(true)
|
const isLoading = ref(true)
|
||||||
|
|
||||||
// 创建默认的骨架屏数据
|
// 创建默认的骨架屏数据
|
||||||
|
|
@ -138,22 +152,22 @@ watch(
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.hot-rank-item {
|
.hot-rank-item {
|
||||||
|
position: relative;
|
||||||
width: 356rpx;
|
width: 356rpx;
|
||||||
height: 452rpx;
|
height: 452rpx;
|
||||||
position: relative;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank-item::before {
|
.hot-rank-item::before {
|
||||||
content: '';
|
|
||||||
width: 360rpx;
|
|
||||||
height: 456rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 8px;
|
|
||||||
top: -2rpx;
|
top: -2rpx;
|
||||||
left: -2rpx;
|
left: -2rpx;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
width: 360rpx;
|
||||||
|
height: 456rpx;
|
||||||
|
content: '';
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank-outer .hot-rank-item:nth-child(1) {
|
.hot-rank-outer .hot-rank-item:nth-child(1) {
|
||||||
|
|
@ -198,7 +212,6 @@ watch(
|
||||||
.hot-rank-outer .hot-rank-item:nth-child(5) {
|
.hot-rank-outer .hot-rank-item:nth-child(5) {
|
||||||
background: linear-gradient(180deg, #e5ffc4 0%, rgba(213, 255, 196, 0) 23%, #fff 100%);
|
background: linear-gradient(180deg, #e5ffc4 0%, rgba(213, 255, 196, 0) 23%, #fff 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 骨架屏样式 */
|
/* 骨架屏样式 */
|
||||||
.skeleton-text,
|
.skeleton-text,
|
||||||
.skeleton-image {
|
.skeleton-image {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="navbar">
|
<view class="navbar">
|
||||||
<!-- 状态栏占位 -->
|
<!-- 状态栏占位 -->
|
||||||
<view
|
<view v-if="safeAreaInsetTop" class="status-bar"
|
||||||
v-if="safeAreaInsetTop"
|
:style="{ height: statusBarHeight + 'px', backgroundColor: bgColor }"></view>
|
||||||
class="status-bar"
|
|
||||||
:style="{ height: statusBarHeight + 'px', backgroundColor: bgColor }"
|
|
||||||
></view>
|
|
||||||
|
|
||||||
<!-- 导航栏主体 -->
|
<!-- 导航栏主体 -->
|
||||||
<view
|
<view class="navbar-content" :class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
||||||
class="navbar-content"
|
|
||||||
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
height: navHeight + 'px',
|
height: navHeight + 'px',
|
||||||
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<!-- 左侧区域 -->
|
<!-- 左侧区域 -->
|
||||||
<view class="navbar-left" @click="handleClickLeft">
|
<view class="navbar-left" @click="handleClickLeft">
|
||||||
<view v-if="leftArrow" class="back-icon">
|
<view v-if="leftArrow" class="back-icon">
|
||||||
|
|
@ -39,18 +33,16 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 占位元素 -->
|
<!-- 占位元素 -->
|
||||||
<view
|
<view v-if="placeholder && fixed" :style="{
|
||||||
v-if="placeholder && fixed"
|
|
||||||
:style="{
|
|
||||||
height: `${navHeight}px`,
|
height: `${navHeight}px`,
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
}"
|
}"></view>
|
||||||
></view>
|
|
||||||
<slot name="background"></slot>
|
<slot name="background"></slot>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
|
@ -91,8 +83,8 @@ defineProps({
|
||||||
const emit = defineEmits(['clickLeft'])
|
const emit = defineEmits(['clickLeft'])
|
||||||
|
|
||||||
// 获取系统信息
|
// 获取系统信息
|
||||||
const systemInfo = uni.getWindowInfo()
|
const systemInfo = getWindowInfo()
|
||||||
const deviceInfo = uni.getDeviceInfo()
|
const deviceInfo = getDeviceInfo()
|
||||||
|
|
||||||
const statusBarHeight = systemInfo.statusBarHeight || 0
|
const statusBarHeight = systemInfo.statusBarHeight || 0
|
||||||
|
|
||||||
|
|
@ -131,20 +123,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-content {
|
.navbar-content {
|
||||||
width: 100%;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
/* justify-content: space-between; */
|
/* justify-content: space-between; */
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed {
|
.navbar-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-border {
|
.navbar-border {
|
||||||
|
|
@ -154,8 +146,8 @@ const handleClickLeft = () => {
|
||||||
.navbar-left {
|
.navbar-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
|
||||||
min-width: 100rpx;
|
min-width: 100rpx;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-icon {
|
.back-icon {
|
||||||
|
|
@ -166,20 +158,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-title {
|
.navbar-title {
|
||||||
/* flex: 1; */
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
/* flex: 1; */
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
font-size: 34rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
@ -187,15 +179,14 @@ const handleClickLeft = () => {
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 52rpx;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
min-width: 52rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'iconfont';
|
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')
|
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');
|
||||||
format('woff2');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-text {
|
.back-text {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export const useCityInfo = () => {
|
||||||
const li = groupByFirstLetter(list)
|
const li = groupByFirstLetter(list)
|
||||||
cityStore.setCities(li)
|
cityStore.setCities(li)
|
||||||
const defaultCity = list.filter((item) => item.provincename === '山东省')[0] as City
|
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)
|
userStore.setUserCity(defaultCity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,12 +48,12 @@ const groupByFirstLetter = (lis: Province[]): { letter: string; provinces: Provi
|
||||||
.map((key) => ({ letter: key, provinces: grouped[key] }))
|
.map((key) => ({ letter: key, provinces: grouped[key] }))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const newsList = ref<News[]>([])
|
export const newsList = ref([])
|
||||||
export const useCityNewTop = () => {
|
export const useCityNewTop = () => {
|
||||||
const fetchNewTopFun = (provinceCode: string) => {
|
const fetchNewTopFun = (provinceCode) => {
|
||||||
getNewsTop({ Top: 4, CategoryId: 1, provinceCode }).then((res) => {
|
getNewsTop({ Top: 4, CategoryId: 1, provinceCode }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
newsList.value = res.result as News[]
|
newsList.value = res.result as { title: string }[]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ interface Region {
|
||||||
pinyin: string
|
pinyin: string
|
||||||
}
|
}
|
||||||
export const useRegionInfo = () => {
|
export const useRegionInfo = () => {
|
||||||
const regionList = ref<any[]>([])
|
const regionList = ref([])
|
||||||
getRegionInfo().then((res) => {
|
getRegionInfo().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
regionList.value = res.result as Region[]
|
regionList.value = res.result as Region[]
|
||||||
|
|
@ -19,7 +19,7 @@ export const useRegionInfo = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useUniversityType = () => {
|
export const useUniversityType = () => {
|
||||||
const typeList = ref<any[]>([])
|
const typeList = ref([])
|
||||||
getUniversityType().then((res) => {
|
getUniversityType().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
typeList.value = res.result as { id: number; name: string }[]
|
typeList.value = res.result as { id: number; name: string }[]
|
||||||
|
|
@ -30,7 +30,7 @@ export const useUniversityType = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useNatureList = () => {
|
export const useNatureList = () => {
|
||||||
const natureList = ref<any[]>([])
|
const natureList = ref([])
|
||||||
getNature().then((res) => {
|
getNature().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
natureList.value = res.result as { id: number; name: string }[]
|
natureList.value = res.result as { id: number; name: string }[]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { onReady } from '@dcloudio/uni-app'
|
import { onReady } from '@dcloudio/uni-app'
|
||||||
import { getIsTabbar, getLastItem } from '@/utils/index'
|
import { getIsTabbar, getLastItem } from '@/utils/index'
|
||||||
|
import { getWindowInfo } from '@/utils/tools'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
// 获取页面栈
|
// 获取页面栈
|
||||||
|
|
@ -9,7 +10,7 @@ export default () => {
|
||||||
// 页面滚动到底部时的操作,通常用于加载更多数据
|
// 页面滚动到底部时的操作,通常用于加载更多数据
|
||||||
const onScrollToLower = () => {}
|
const onScrollToLower = () => {}
|
||||||
// 获取屏幕边界到安全区域距离
|
// 获取屏幕边界到安全区域距离
|
||||||
const { safeAreaInsets } = uni.getWindowInfo()
|
const { safeAreaInsets } = getWindowInfo()
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 基于小程序的 Page 类型扩展 uni-app 的 Page
|
// 基于小程序的 Page 类型扩展 uni-app 的 Page
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { getUnSortType, getUniversityRank } from '@/service/index/api'
|
||||||
type UnSortType = { type: number; name: string }[]
|
type UnSortType = { type: number; name: string }[]
|
||||||
|
|
||||||
export const useUnSortType = () => {
|
export const useUnSortType = () => {
|
||||||
let unSortTypeList = ref<any[]>([])
|
let unSortTypeList = ref([])
|
||||||
getUnSortType().then((res) => {
|
getUnSortType().then((res) => {
|
||||||
unSortTypeList.value = res.result as UnSortType
|
unSortTypeList.value = res.result as UnSortType
|
||||||
})
|
})
|
||||||
|
|
@ -23,7 +23,7 @@ export const useUniversityRank = ({
|
||||||
PageSize: number
|
PageSize: number
|
||||||
PageIndex: number
|
PageIndex: number
|
||||||
}) => {
|
}) => {
|
||||||
let universityRankList = ref<any[]>([])
|
let universityRankList = ref([])
|
||||||
getUniversityRank({ Year, Type, PageSize, PageIndex }).then((res) => {
|
getUniversityRank({ Year, Type, PageSize, PageIndex }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const _res = res.result as { rows: any[] }
|
const _res = res.result as { rows: any[] }
|
||||||
|
|
|
||||||
|
|
@ -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]"
|
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
|
@click.stop
|
||||||
>
|
>
|
||||||
|
<view class="w-[200rpx] h-[200rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[200rpx] h-[200rpx]"
|
class="w-[200rpx] h-[200rpx]"
|
||||||
src="https://api.static.ycymedu.com/images/logo.png"
|
src="https://api.static.ycymedu.com/images/logo.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<view class="flex flex-col items-center">
|
<view class="flex flex-col items-center">
|
||||||
<text class="text-[26rpx] mt-[20rpx] mb-[40rpx]" :selectable="false">
|
<text class="text-[26rpx] mt-[20rpx] mb-[40rpx]" :selectable="false">
|
||||||
{{ phone ? '申请使用您的手机号' : '申请获取您的个人信息' }}
|
{{ phone ? '申请使用您的手机号' : '申请获取您的个人信息' }}
|
||||||
|
|
@ -83,8 +85,8 @@ const handleClose = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const phone = ref(true) // 手机号登陆
|
const phone = ref(true) // 手机号登陆
|
||||||
const checked = ref<any[]>([]) // 是否同意条款
|
const checked = ref([]) // 是否同意条款
|
||||||
const getPhoneInfo = ref<any | null>(null)
|
const getPhoneInfo = ref(null)
|
||||||
|
|
||||||
const handleClickUserAgreement = () => {
|
const handleClickUserAgreement = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -101,7 +103,7 @@ const handleClickPrivacyPolicy = () => {
|
||||||
const getPhoneNumber = async (e: any) => {
|
const getPhoneNumber = async (e: any) => {
|
||||||
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||||
const detail = e.detail
|
const detail = e.detail
|
||||||
let _getPhoneInfo = {
|
const _getPhoneInfo = {
|
||||||
iv: detail.iv,
|
iv: detail.iv,
|
||||||
encryptedData: detail.encryptedData,
|
encryptedData: detail.encryptedData,
|
||||||
code: detail.code,
|
code: detail.code,
|
||||||
|
|
@ -127,12 +129,11 @@ const handleClick = () => {
|
||||||
title: '您需先同意《服务条款》和《隐私条款》',
|
title: '您需先同意《服务条款》和《隐私条款》',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getUserInfo = async (_code: string) => {
|
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') {
|
if (userInfo.errMsg == 'login:ok') {
|
||||||
const resp = await getSessionKey({ JsCode: userInfo.code })
|
const resp = await getSessionKey({ JsCode: userInfo.code })
|
||||||
|
|
@ -163,9 +164,9 @@ const getUserInfo = async (_code: string) => {
|
||||||
if (resp.code === 200) {
|
if (resp.code === 200) {
|
||||||
// 根据用户信息中的城市设置对应城市的分数等信息
|
// 根据用户信息中的城市设置对应城市的分数等信息
|
||||||
getVolunteerInitialization().then((res) => {
|
getVolunteerInitialization().then((res) => {
|
||||||
let list = res.result as any[]
|
const list = res.result as any[]
|
||||||
let code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
|
const code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
|
||||||
let addressItem: City | null = null
|
let addressItem: City
|
||||||
if (code !== '') {
|
if (code !== '') {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (list[i].code == code) {
|
if (list[i].code == code) {
|
||||||
|
|
@ -173,9 +174,7 @@ const getUserInfo = async (_code: string) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (addressItem) {
|
|
||||||
userStore.setUserCity(addressItem)
|
userStore.setUserCity(addressItem)
|
||||||
}
|
|
||||||
handleClose()
|
handleClose()
|
||||||
emits('authReady')
|
emits('authReady')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
|
@ -91,8 +92,8 @@ defineProps({
|
||||||
const emit = defineEmits(['clickLeft'])
|
const emit = defineEmits(['clickLeft'])
|
||||||
|
|
||||||
// 获取系统信息
|
// 获取系统信息
|
||||||
const systemInfo = uni.getWindowInfo()
|
const systemInfo = getWindowInfo()
|
||||||
const deviceInfo = uni.getDeviceInfo()
|
const deviceInfo = getDeviceInfo()
|
||||||
|
|
||||||
const statusBarHeight = systemInfo.statusBarHeight || 0
|
const statusBarHeight = systemInfo.statusBarHeight || 0
|
||||||
|
|
||||||
|
|
@ -131,20 +132,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-content {
|
.navbar-content {
|
||||||
width: 100%;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
/* justify-content: space-between; */
|
/* justify-content: space-between; */
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed {
|
.navbar-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-border {
|
.navbar-border {
|
||||||
|
|
@ -154,8 +155,8 @@ const handleClickLeft = () => {
|
||||||
.navbar-left {
|
.navbar-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
|
||||||
min-width: 100rpx;
|
min-width: 100rpx;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-icon {
|
.back-icon {
|
||||||
|
|
@ -166,20 +167,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-title {
|
.navbar-title {
|
||||||
/* flex: 1; */
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
/* flex: 1; */
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
font-size: 34rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
@ -187,8 +188,8 @@ const handleClickLeft = () => {
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 52rpx;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
min-width: 52rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,22 @@
|
||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationBarTitleText: '新高考选科',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="h-screen flex flex-col">
|
<view class="h-screen flex flex-col bg-white">
|
||||||
<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="flex flex-col justify-center items-center flex-1 pb-safe mt-[-100px]">
|
<view class="flex flex-col justify-center items-center flex-1 pb-safe mt-[-100px]">
|
||||||
|
<view class="w-[424rpx] h-[424rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[424rpx] h-[424rpx]"
|
class="w-[424rpx] h-[424rpx]"
|
||||||
src="https://api.static.ycymedu.com/images/logo.png"
|
src="https://api.static.ycymedu.com/images/logo.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button
|
<button
|
||||||
class="w-[493rpx]! mb-[40rpx] h-[88rpx]! rounded-[44rpx] text-[32rpx] text-white flex items-center justify-center"
|
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]'"
|
:class="checked.length > 0 ? 'bg-[#1580FF]' : 'bg-[#BFBFBF]'"
|
||||||
|
|
@ -37,6 +27,17 @@
|
||||||
>
|
>
|
||||||
一键登录
|
一键登录
|
||||||
</button>
|
</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">
|
<view class="flex items-center flex-nowrap">
|
||||||
<CheckboxGroup v-model="checked" class="check-class mr-[10rpx]">
|
<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 show = ref(false)
|
||||||
|
|
||||||
const checked = ref<any[]>([]) // 是否同意条款
|
const checked = ref([]) // 是否同意条款
|
||||||
const getPhoneInfo = ref<any>(null)
|
const getPhoneInfo = ref(null)
|
||||||
|
|
||||||
const scene = ref('')
|
|
||||||
|
|
||||||
const getPhoneNumber = async (e: any) => {
|
const getPhoneNumber = async (e: any) => {
|
||||||
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||||
const detail = e.detail
|
const detail = e.detail
|
||||||
let _getPhoneInfo = {
|
const _getPhoneInfo = {
|
||||||
iv: detail.iv,
|
iv: detail.iv,
|
||||||
encryptedData: detail.encryptedData,
|
encryptedData: detail.encryptedData,
|
||||||
code: detail.code,
|
code: detail.code,
|
||||||
|
|
@ -112,8 +111,18 @@ const handleClick = () => {
|
||||||
title: '您需先同意《服务条款》和《隐私条款》',
|
title: '您需先同意《服务条款》和《隐私条款》',
|
||||||
icon: 'none',
|
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 userStore = useUserStore()
|
||||||
|
|
||||||
const getUserInfo = async (_code: string) => {
|
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') {
|
if (userInfo.errMsg == 'login:ok') {
|
||||||
const resp = await getSessionKey({ JsCode: userInfo.code })
|
const resp = await getSessionKey({ JsCode: userInfo.code })
|
||||||
|
|
@ -175,8 +184,8 @@ const getUserInfo = async (_code: string) => {
|
||||||
// 根据用户信息中的城市设置对应城市的分数等信息
|
// 根据用户信息中的城市设置对应城市的分数等信息
|
||||||
getVolunteerInitialization()
|
getVolunteerInitialization()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let list = res.result as any[]
|
const list = res.result as any[]
|
||||||
let code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
|
const code = infoData.userExtend ? infoData.userExtend.provinceCode : ''
|
||||||
let addressItem: City
|
let addressItem: City
|
||||||
if (code !== '') {
|
if (code !== '') {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|
@ -191,8 +200,6 @@ const getUserInfo = async (_code: string) => {
|
||||||
// 个人信息初始化
|
// 个人信息初始化
|
||||||
if (infoData.userExtend && !infoData.userExtend.init) {
|
if (infoData.userExtend && !infoData.userExtend.init) {
|
||||||
uni.navigateTo({ url: '/login-sub/inviteCode' })
|
uni.navigateTo({ url: '/login-sub/inviteCode' })
|
||||||
} else if (scene.value !== '') {
|
|
||||||
uni.navigateTo({ url: `/pages/index/index?scene=${scene.value}` })
|
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/home/index/index',
|
url: '/pages/home/index/index',
|
||||||
|
|
@ -209,11 +216,6 @@ const getUserInfo = async (_code: string) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
|
||||||
// 如果是授权登录页面回来,则要回去授权页面
|
|
||||||
scene.value = options.scene || ''
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "六纬志愿",
|
"name": "六纬升学",
|
||||||
"appid": "H57F2ACE4",
|
"appid": "H57F2ACE4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.0.0",
|
"versionName": "1.0.0",
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,20 @@
|
||||||
export const renderEchart = ({
|
export const renderEchart = ({ echart, echarts, pieChartData }) => {
|
||||||
echart,
|
const typeColorMap = {
|
||||||
echarts,
|
|
||||||
pieChartData,
|
|
||||||
}: {
|
|
||||||
echart: any
|
|
||||||
echarts: any
|
|
||||||
pieChartData: any
|
|
||||||
}) => {
|
|
||||||
const typeColorMap: { [key: string]: any } = {
|
|
||||||
需冲刺: { color: '#EB5241', simpleName: '冲' },
|
需冲刺: { color: '#EB5241', simpleName: '冲' },
|
||||||
较稳妥: { color: '#F0BA16', simpleName: '稳' },
|
较稳妥: { color: '#F0BA16', simpleName: '稳' },
|
||||||
可保底: { color: '#15C496', simpleName: '保' },
|
可保底: { color: '#15C496', simpleName: '保' },
|
||||||
}
|
}
|
||||||
const formattedData = pieChartData.value.map((item: any) => ({
|
const formattedData = pieChartData.value.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: typeColorMap[item.name]?.color,
|
color: typeColorMap[item.name]?.color,
|
||||||
},
|
},
|
||||||
label: {
|
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 = {
|
let option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
|
|
@ -50,7 +42,7 @@ export const renderEchart = ({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
label: {
|
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',
|
left: 'center',
|
||||||
top: '50%',
|
top: '50%',
|
||||||
style: {
|
style: {
|
||||||
text: formattedData.reduce((acc: any, curr: any) => acc + curr.value, 0),
|
text: formattedData.reduce((acc, curr) => acc + curr.value, 0),
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fill: '#1F2329',
|
fill: '#1F2329',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
|
|
||||||
|
|
@ -72,10 +72,10 @@ const userStore = useUserStore()
|
||||||
|
|
||||||
const userInfo = computed(() => userStore.userInfo)
|
const userInfo = computed(() => userStore.userInfo)
|
||||||
|
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
|
|
||||||
const pieChartData = ref<any[]>([])
|
const pieChartData = ref([])
|
||||||
const universities = ref<any[]>([])
|
const universities = ref([])
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
aiPreview({
|
aiPreview({
|
||||||
location: userInfo.value.estimatedAchievement.provinceCode,
|
location: userInfo.value.estimatedAchievement.provinceCode,
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,21 @@
|
||||||
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
height: navHeight + 'px',
|
height: `${navHeight}px`,
|
||||||
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<!-- 左侧区域 -->
|
<view
|
||||||
<view class="navbar-left" @click="handleClickLeft">
|
:class="`navbar-left ${leftWidthMin ? 'min-w-[48rpx]' : ''} min-w-[48rpx]`"
|
||||||
|
@click="handleClickLeft"
|
||||||
|
>
|
||||||
|
<!-- #ifndef MP-ALIPAY -->
|
||||||
<view v-if="leftArrow" class="back-icon">
|
<view v-if="leftArrow" class="back-icon">
|
||||||
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
|
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 中间标题区域 -->
|
<!-- 中间标题区域 -->
|
||||||
<view class="navbar-title">
|
<view class="navbar-title">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
|
|
@ -51,9 +54,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
|
||||||
|
|
||||||
const props = defineProps({
|
defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
|
|
@ -86,13 +89,18 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: 'justify-between',
|
default: 'justify-between',
|
||||||
},
|
},
|
||||||
|
leftWidthMin: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['clickLeft'])
|
const emit = defineEmits(['clickLeft'])
|
||||||
|
|
||||||
// 获取系统信息
|
// 获取系统信息
|
||||||
const systemInfo = uni.getWindowInfo()
|
const deviceInfo = getDeviceInfo()
|
||||||
const deviceInfo = uni.getDeviceInfo()
|
const systemInfo = getWindowInfo()
|
||||||
|
|
||||||
const statusBarHeight = systemInfo.statusBarHeight || 0
|
const statusBarHeight = systemInfo.statusBarHeight || 0
|
||||||
|
|
||||||
// 动态计算导航栏高度
|
// 动态计算导航栏高度
|
||||||
|
|
@ -130,20 +138,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-content {
|
.navbar-content {
|
||||||
width: 100%;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
/* justify-content: space-between; */
|
/* justify-content: space-between; */
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed {
|
.navbar-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-border {
|
.navbar-border {
|
||||||
|
|
@ -164,20 +172,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-title {
|
.navbar-title {
|
||||||
/* flex: 1; */
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
/* flex: 1; */
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
font-size: 34rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
@ -185,8 +193,8 @@ const handleClickLeft = () => {
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 52rpx;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
min-width: 52rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -87,24 +89,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
@ -119,8 +121,8 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.border-class {
|
.border-class {
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
|
||||||
padding-bottom: 42rpx;
|
padding-bottom: 42rpx;
|
||||||
margin-bottom: -14rpx;
|
margin-bottom: -14rpx;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -24,10 +26,12 @@
|
||||||
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
|
<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">
|
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||||
|
<view class="header-bg">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
||||||
class="header-bg"
|
class="w-full h-full"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
|
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
|
||||||
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -92,24 +96,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,23 @@
|
||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationBarTitleText: '兴趣测评报告',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="flex flex-col h-screen relative custom-bg">
|
<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="flex-1 overflow-auto relative mt-[40rpx]">
|
||||||
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
|
<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">
|
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||||
|
<view class="header-bg">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
||||||
class="header-bg"
|
class="w-full h-full"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
|
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
|
||||||
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -90,24 +80,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -87,24 +89,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
@ -119,8 +121,8 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.border-class {
|
.border-class {
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
|
||||||
padding-bottom: 42rpx;
|
padding-bottom: 42rpx;
|
||||||
margin-bottom: -14rpx;
|
margin-bottom: -14rpx;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -24,10 +26,12 @@
|
||||||
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
|
<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">
|
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||||
|
<view class="header-bg">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
||||||
class="header-bg"
|
class="w-full h-full"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
|
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的性格类型为</text>
|
||||||
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -92,24 +96,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,23 @@
|
||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationBarTitleText: '兴趣测评报告',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="flex flex-col h-screen relative custom-bg">
|
<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="flex-1 overflow-auto relative mt-[40rpx]">
|
||||||
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
|
<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">
|
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||||
|
<view class="header-bg">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
||||||
class="header-bg"
|
class="w-full h-full"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
|
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的兴趣类型为</text>
|
||||||
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
<text class="text-[#117CFC] text-[36rpx] z-2">{{ studyRecord.title }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -90,24 +80,24 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
width: calc(100% - 80rpx);
|
|
||||||
height: 244rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
height: 244rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tag {
|
.type-tag {
|
||||||
font-size: 24rpx;
|
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-tag {
|
.position-tag {
|
||||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -24,10 +26,12 @@
|
||||||
<view class="overflow-auto relative mt-[40rpx] flex-1 pb-[20rpx]">
|
<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">
|
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||||
|
<view class="header-bg">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
src="https://api.static.ycymedu.com/src/images/evaluate/bg.png"
|
||||||
class="header-bg"
|
class="w-full h-full"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的职业价值观</text>
|
<text class="text-[#333] text-[28rpx] mb-[14rpx] z-2">您的职业价值观</text>
|
||||||
<text class="text-[#117CFC] text-[40rpx] z-2">{{ studyRecord.tag }}</text>
|
<text class="text-[#117CFC] text-[40rpx] z-2">{{ studyRecord.tag }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,12 @@
|
||||||
<view
|
<view
|
||||||
class="rounded-[8rpx] border-[#1580FF] border-[2rpx] border-solid w-full py-[14rpx] flex items-center justify-center"
|
class="rounded-[8rpx] border-[#1580FF] border-[2rpx] border-solid w-full py-[14rpx] flex items-center justify-center"
|
||||||
>
|
>
|
||||||
|
<view class="w-[52rpx] h-[52rpx] mr-[10rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/images/btn-bottom.png"
|
src="https://api.static.ycymedu.com/images/btn-bottom.png"
|
||||||
class="w-[52rpx] h-[52rpx] mr-[10rpx]"
|
class="w-[52rpx] h-[52rpx]"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<text class="text-[#1580FF] text-[32rpx] font-700">智能AI顾问</text>
|
<text class="text-[#1580FF] text-[32rpx] font-700">智能AI顾问</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,13 @@
|
||||||
v-for="(person, index) in personList"
|
v-for="(person, index) in personList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
<view class="w-[120rpx] h-[120rpx]">
|
||||||
<image
|
<image
|
||||||
:src="person.avatarUrl"
|
:src="person.avatarUrl"
|
||||||
class="w-[120rpx] h-[120rpx] rounded-full"
|
class="w-[120rpx] h-[120rpx] rounded-full"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<text class="mt-[10rpx] text-[26rpx] text-[28rpx] font-normal text-center">
|
<text class="mt-[10rpx] text-[26rpx] text-[28rpx] font-normal text-center">
|
||||||
{{ person.nickName }}
|
{{ person.nickName }}
|
||||||
</text>
|
</text>
|
||||||
|
|
@ -45,7 +47,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const personList = ref<any[]>([])
|
const personList = ref([])
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.tag,
|
() => props.tag,
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const majorList = ref<any[]>([])
|
const majorList = ref([])
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.tag,
|
() => props.tag,
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,6 @@
|
||||||
|
|
||||||
<view v-for="(item, index) in items" :key="index" class="suggestion-item">
|
<view v-for="(item, index) in items" :key="index" class="suggestion-item">
|
||||||
<view class="text-[32rpx] font-700">{{ item.title }}</view>
|
<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]">
|
<view class="text-[26rpx] font-400 mt-[10rpx] text-[#666]">
|
||||||
{{ item.description instanceof Array ? item.description.join(',') : item.description }}
|
{{ item.description instanceof Array ? item.description.join(',') : item.description }}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -21,11 +15,7 @@
|
||||||
import TitleBar from './TitleBar.vue'
|
import TitleBar from './TitleBar.vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
items: {
|
items: {
|
||||||
type: Array<{
|
type: Array<{ title: string; description: string | [] }>,
|
||||||
title: string
|
|
||||||
description?: string | []
|
|
||||||
items?: { title: string; description?: string }[]
|
|
||||||
}>,
|
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="mt-[30rpx] bg-white rounded-[20rpx] p-[30rpx]">
|
<view class="mt-[30rpx] bg-white rounded-[20rpx] p-[30rpx]">
|
||||||
<TitleBar :title="title" />
|
<TitleBar :title="title" />
|
||||||
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-left">
|
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-center">
|
||||||
<text
|
<text
|
||||||
class="text-[22rpx] px-[12rpx] py-[4rpx] rounded-[20rpx] bg-[rgba(250,142,35,0.15)] text-[#FA8E23]"
|
class="text-[22rpx] px-[12rpx] py-[4rpx] rounded-[20rpx] bg-[rgba(250,142,35,0.15)] text-[#FA8E23]"
|
||||||
>
|
>
|
||||||
{{ item.notes }}
|
{{ item.notes }}
|
||||||
</text>
|
</text>
|
||||||
<view class="mt-[20rpx] text-left">
|
<view class="mt-[20rpx] text-center">
|
||||||
<view class="text-[#000] text-[26rpx] font-700">学习风格表现</view>
|
<view class="text-[#000] text-[26rpx] font-700">学习风格表现</view>
|
||||||
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.learning_performance" :key="index">
|
<view class="mt-[10rpx]" v-for="(item, index) in item.learning_performance" :key="index">
|
||||||
{{ sonItem }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</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="text-[#000] text-[26rpx] font-700">学习风格特点</view>
|
||||||
<view class="mt-[10rpx]" v-for="(sonItem, index) in item.features" :key="index">
|
<view class="mt-[10rpx]" v-for="(item, index) in item.features" :key="index">
|
||||||
{{ sonItem }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,13 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="relative mt-[68rpx] bg-[#F5FAFF]">
|
<view class="relative mt-[68rpx] bg-[#F5FAFF]">
|
||||||
|
<view class="absolute top-[-9rpx] left-[20rpx] w-[180rpx] h-[52rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
|
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]"
|
class="w-[180rpx] h-[52rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<view class="px-[20rpx] pb-[20rpx] pt-[58rpx] text-[#333] text-[26rpx]">
|
<view class="px-[20rpx] pb-[20rpx] pt-[58rpx] text-[#333] text-[26rpx]">
|
||||||
{{ description }}
|
{{ description }}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
<view class="flex flex-col bg-white rounded-[24rpx] p-[30rpx] gap-[40rpx]">
|
<view class="flex flex-col bg-white rounded-[24rpx] p-[30rpx] gap-[40rpx]">
|
||||||
<view class="flex flex-col gap-[12rpx]">
|
<view class="flex flex-col gap-[12rpx]">
|
||||||
<view class="flex items-center gap-[10rpx]">
|
<view class="flex items-center gap-[10rpx]">
|
||||||
|
<view class="w-[38rpx] h-[38rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/home/life-icon.png"
|
src="https://api.static.ycymedu.com/src/images/home/life-icon.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-[38rpx] h-[38rpx]"
|
class="w-[38rpx] h-[38rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[32rpx] text-[#000] font-700">生活建议</text>
|
<text class="text-[32rpx] text-[#000] font-700">生活建议</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-[26rpx] text-[#666] font-400">
|
<view class="text-[26rpx] text-[#666] font-400">
|
||||||
|
|
@ -14,5 +16,37 @@
|
||||||
避免过度放松,保持适度的学习节奏。
|
避免过度放松,保持适度的学习节奏。
|
||||||
</view>
|
</view>
|
||||||
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ const transformData = (names: string[], values: number[]) => {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
const characterData = ref<any[]>([])
|
const characterData = ref([])
|
||||||
watch(
|
watch(
|
||||||
() => props.linChart,
|
() => props.linChart,
|
||||||
(newV) => {
|
(newV) => {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
||||||
import TitleBar from '../TitleBar.vue'
|
import TitleBar from '../TitleBar.vue'
|
||||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
mainDomain: {
|
mainDomain: {
|
||||||
|
|
@ -57,7 +57,7 @@ const styleConfig = [
|
||||||
{ bg: '#FDF0F0', text: '#F58C8C', size: 45, x: 166, y: 118 },
|
{ bg: '#FDF0F0', text: '#F58C8C', size: 45, x: 166, y: 118 },
|
||||||
]
|
]
|
||||||
|
|
||||||
const chartData = ref<any[]>([])
|
const chartData = ref([])
|
||||||
|
|
||||||
// 根据文字长度选择合适的样式
|
// 根据文字长度选择合适的样式
|
||||||
const selectStylesByLength = (items: string[]) => {
|
const selectStylesByLength = (items: string[]) => {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
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 echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
picData: {
|
picData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
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 echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
echartData: {
|
echartData: {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
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 echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
|
|
||||||
interface IndicatorItem {
|
interface IndicatorItem {
|
||||||
name: string
|
name: string
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
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 echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="scss" scoped></script>
|
<script lang="scss" scoped></script>
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@
|
||||||
<LEchart ref="echart" :customStyle="`z-index:1;`"></LEchart>
|
<LEchart ref="echart" :customStyle="`z-index:1;`"></LEchart>
|
||||||
</view>
|
</view>
|
||||||
<view class="relative mt-[68rpx] bg-[#F5FAFF] mx-[20rpx] px-[24rpx] pt-[58rpx] pb-[20rpx]">
|
<view class="relative mt-[68rpx] bg-[#F5FAFF] mx-[20rpx] px-[24rpx] pt-[58rpx] pb-[20rpx]">
|
||||||
|
<view class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
|
src="https://api.static.ycymedu.com/src/images/home/test-icon.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]"
|
class="w-[180rpx] h-[52rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<view v-for="(item, index) in innerParsing" class="text-[26rpx] mb-[20rpx]" :key="index">
|
<view v-for="(item, index) in innerParsing" class="text-[26rpx] mb-[20rpx]" :key="index">
|
||||||
<text class="text-[#000] font-700">{{ item.title }}: </text>
|
<text class="text-[#000] font-700">{{ item.title }}: </text>
|
||||||
<text class="text-[#3d3d3d] font-400">{{ item.desc }}</text>
|
<text class="text-[#3d3d3d] font-400">{{ item.desc }}</text>
|
||||||
|
|
@ -32,7 +34,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
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 echarts = require('../../../uni_modules/lime-echart/static/echarts.min')
|
||||||
const echart = ref<any>(null)
|
const echart = ref(null)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
picData: {
|
picData: {
|
||||||
|
|
@ -45,7 +47,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const innerParsing = ref<any[]>([])
|
const innerParsing = ref([])
|
||||||
const policy = ref({ items: [] })
|
const policy = ref({ items: [] })
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -57,7 +59,6 @@ watch(
|
||||||
_val.tags.forEach((item) => {
|
_val.tags.forEach((item) => {
|
||||||
if (item.title === '策略偏好') {
|
if (item.title === '策略偏好') {
|
||||||
policy.value = item
|
policy.value = item
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
innerParsing.value.push(...item.items)
|
innerParsing.value.push(...item.items)
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +90,7 @@ watch(
|
||||||
// 处理文字换行
|
// 处理文字换行
|
||||||
const maxLength = 4
|
const maxLength = 4
|
||||||
const result = []
|
const result = []
|
||||||
let _val = value.split(',')
|
const _val = value.split(',')
|
||||||
for (let i = 0; i < _val[0].length; i += maxLength) {
|
for (let i = 0; i < _val[0].length; i += maxLength) {
|
||||||
result.push(value.slice(i, i + maxLength))
|
result.push(value.slice(i, i + maxLength))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,15 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view :scroll-y="true" class="flex flex-col h-screen relative custom-bg">
|
<view :scroll-y="true" class="flex flex-col h-screen relative custom-bg">
|
||||||
<Navbar
|
<Navbar safeAreaInsetTop :bordered="false" leftArrow @clickLeft="handleBack" bg-color="transparent">
|
||||||
safeAreaInsetTop
|
|
||||||
:bordered="false"
|
|
||||||
leftArrow
|
|
||||||
@clickLeft="handleBack"
|
|
||||||
bg-color="transparent"
|
|
||||||
>
|
|
||||||
<template #title>
|
<template #title>
|
||||||
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">MHT心理健康自评</text>
|
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">MHT心理健康自评</text>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -68,6 +64,7 @@ onLoad((options) => {
|
||||||
.custom-bg {
|
.custom-bg {
|
||||||
background: linear-gradient(184deg, #0d79fc 0%, #2186fc 100%);
|
background: linear-gradient(184deg, #0d79fc 0%, #2186fc 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.icon-class) {
|
:deep(.icon-class) {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -20,7 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Navbar>
|
</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="flex flex-col flex-1 overflow-auto pb-[20rpx]">
|
||||||
<!-- 顶部卡片 -->
|
<!-- 顶部卡片 -->
|
||||||
<view class="mt-[30rpx] mx-[24rpx]">
|
<view class="mt-[30rpx] mx-[24rpx]">
|
||||||
|
|
@ -99,7 +101,7 @@ const calcLevel = (val: string) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options: any) => {
|
onLoad((options) => {
|
||||||
pageType.value = +options.type
|
pageType.value = +options.type
|
||||||
pageId.value = options.id
|
pageId.value = options.id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -20,7 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Navbar>
|
</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="flex flex-col flex-1 overflow-auto pb-[20rpx]">
|
||||||
<!-- 顶部卡片 -->
|
<!-- 顶部卡片 -->
|
||||||
<view class="mt-[30rpx] mx-[24rpx]">
|
<view class="mt-[30rpx] mx-[24rpx]">
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -98,7 +100,7 @@ const studyRecord = ref({
|
||||||
})
|
})
|
||||||
|
|
||||||
const calcLevel = (val: string) => {
|
const calcLevel = (val: string) => {
|
||||||
let _s = JSON.parse(val)
|
const _s = JSON.parse(val)
|
||||||
if (_s[0].Total >= 161) {
|
if (_s[0].Total >= 161) {
|
||||||
return 4
|
return 4
|
||||||
} else if (_s[0].Total >= 137) {
|
} 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
|
pageType.value = +options.type
|
||||||
pageId.value = options.id
|
pageId.value = options.id
|
||||||
|
|
||||||
|
|
@ -146,8 +148,8 @@ onLoad((options: any) => {
|
||||||
.custom-border {
|
.custom-border {
|
||||||
width: 162rpx;
|
width: 162rpx;
|
||||||
height: 162rpx;
|
height: 162rpx;
|
||||||
border-radius: 50%;
|
|
||||||
border: 6rpx dashed;
|
border: 6rpx dashed;
|
||||||
border-color: #05d69c transparent transparent transparent;
|
border-color: #05d69c transparent transparent transparent;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -60,9 +62,9 @@ const studyRecord = ref({
|
||||||
suggestions: '',
|
suggestions: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const chartData = ref<any[]>([])
|
const chartData = ref([])
|
||||||
const parsing = ref('')
|
const parsing = ref('')
|
||||||
const suggestions = ref<any[]>([])
|
const suggestions = ref([])
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
pageType.value = +options.type
|
pageType.value = +options.type
|
||||||
|
|
@ -96,8 +98,8 @@ onLoad((options) => {
|
||||||
.custom-border {
|
.custom-border {
|
||||||
width: 162rpx;
|
width: 162rpx;
|
||||||
height: 162rpx;
|
height: 162rpx;
|
||||||
border-radius: 50%;
|
|
||||||
border: 6rpx dashed;
|
border: 6rpx dashed;
|
||||||
border-color: #05d69c transparent transparent transparent;
|
border-color: #05d69c transparent transparent transparent;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</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
|
pageType.value = +options.type
|
||||||
pageId.value = options.id
|
pageId.value = options.id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -98,7 +100,7 @@ const studyRecord = ref({
|
||||||
})
|
})
|
||||||
|
|
||||||
const calcLevel = (val: string) => {
|
const calcLevel = (val: string) => {
|
||||||
let _s = JSON.parse(val)
|
const _s = JSON.parse(val)
|
||||||
if (_s[0].Total >= 161) {
|
if (_s[0].Total >= 161) {
|
||||||
return 4
|
return 4
|
||||||
} else if (_s[0].Total >= 137) {
|
} 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
|
pageType.value = +options.type
|
||||||
pageId.value = options.id
|
pageId.value = options.id
|
||||||
|
|
||||||
|
|
@ -146,8 +148,8 @@ onLoad((options: any) => {
|
||||||
.custom-border {
|
.custom-border {
|
||||||
width: 162rpx;
|
width: 162rpx;
|
||||||
height: 162rpx;
|
height: 162rpx;
|
||||||
border-radius: 50%;
|
|
||||||
border: 6rpx dashed;
|
border: 6rpx dashed;
|
||||||
border-color: #05d69c transparent transparent transparent;
|
border-color: #05d69c transparent transparent transparent;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -60,9 +62,9 @@ const studyRecord = ref({
|
||||||
suggestions: '',
|
suggestions: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const chartData = ref<any[]>([])
|
const chartData = ref([])
|
||||||
const parsing = ref('')
|
const parsing = ref('')
|
||||||
const suggestions = ref<any[]>([])
|
const suggestions = ref([])
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
pageType.value = +options.type
|
pageType.value = +options.type
|
||||||
|
|
@ -96,8 +98,8 @@ onLoad((options) => {
|
||||||
.custom-border {
|
.custom-border {
|
||||||
width: 162rpx;
|
width: 162rpx;
|
||||||
height: 162rpx;
|
height: 162rpx;
|
||||||
border-radius: 50%;
|
|
||||||
border: 6rpx dashed;
|
border: 6rpx dashed;
|
||||||
border-color: #05d69c transparent transparent transparent;
|
border-color: #05d69c transparent transparent transparent;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ interface Region {
|
||||||
simplename: string
|
simplename: string
|
||||||
pinyin: string
|
pinyin: string
|
||||||
}
|
}
|
||||||
const regionList = ref<any[]>([])
|
const regionList = ref([])
|
||||||
getRegionInfo().then((res) => {
|
getRegionInfo().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
regionList.value = res.result as Region[]
|
regionList.value = res.result as Region[]
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -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>
|
# 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>
|
> 一个基于 JavaScript 的开源可视化图表库 [查看更多](https://limeui.qcoon.cn/#/echart) <br>
|
||||||
> 基于 echarts 做了兼容处理,更多示例请访问 [uni示例](https://limeui.qcoon.cn/#/echart-example) | [官方示例](https://echarts.apache.org/examples/zh/index.html) <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)
|
- 第一步:在市场导入 [百度图表](https://ext.dcloud.net.cn/plugin?id=4899)
|
||||||
- 第二步:选择插件依赖:<br>
|
- 第二步:选择插件依赖:<br>
|
||||||
1、可以选插件内的`echarts`包或自定义包,自定义包[下载地址](https://echarts.apache.org/zh/builder.html)<br>
|
1、可以选插件内的`echarts`包或自定义包,自定义包[下载地址](https://echarts.apache.org/zh/builder.html)<br>
|
||||||
2、或者使用`npm`安装`echarts`
|
2、或者使用`npm`安装`echarts`
|
||||||
|
|
||||||
**注意**
|
**注意**
|
||||||
|
* 🔔 echarts 5.3.0及以上
|
||||||
|
* 🔔 如果是 `cli` 项目请下载插件到`src`目录下的`uni_modules`,没有这个目录就创建一个
|
||||||
|
|
||||||
- 🔔 echarts 5.3.0及以上
|
|
||||||
- 🔔 如果是 `cli` 项目请下载插件到`src`目录下的`uni_modules`,没有这个目录就创建一个
|
|
||||||
|
|
||||||
## 代码演示
|
## 代码演示
|
||||||
|
|
||||||
### Vue2
|
### Vue2
|
||||||
|
|
||||||
- 引入依赖,可以是插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html),也可以是`npm`包
|
- 引入依赖,可以是插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html),也可以是`npm`包
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<view style="width:750rpx; height:750rpx">
|
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef" @finished="init"></l-echart></view>
|
||||||
<l-echart ref="chartRef" @finished="init"></l-echart>
|
|
||||||
</view>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -50,32 +47,32 @@ export default {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow'
|
||||||
},
|
},
|
||||||
confine: true,
|
confine: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['热度', '正面', '负面'],
|
data: ['热度', '正面', '负面']
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 15,
|
bottom: 15,
|
||||||
top: 40,
|
top: 40,
|
||||||
containLabel: true,
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#999999',
|
color: '#999999'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#666666',
|
color: '#666666'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
|
|
@ -84,13 +81,13 @@ export default {
|
||||||
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
|
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#999999',
|
color: '#999999'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#666666',
|
color: '#666666'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
|
@ -99,8 +96,8 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'inside',
|
position: 'inside'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data: [300, 270, 340, 344, 300, 320, 310],
|
data: [300, 270, 340, 344, 300, 320, 310],
|
||||||
},
|
},
|
||||||
|
|
@ -110,10 +107,10 @@ export default {
|
||||||
stack: '总量',
|
stack: '总量',
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
data: [120, 102, 141, 174, 190, 250, 220]
|
||||||
data: [120, 102, 141, 174, 190, 250, 220],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '负面',
|
name: '负面',
|
||||||
|
|
@ -122,32 +119,32 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'left',
|
position: 'left'
|
||||||
},
|
|
||||||
},
|
|
||||||
data: [-20, -32, -21, -34, -90, -130, -110],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data: [-20, -32, -21, -34, -90, -130, -110]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
// 组件能被调用必须是组件的节点已经被渲染到页面上
|
// 组件能被调用必须是组件的节点已经被渲染到页面上
|
||||||
methods: {
|
methods: {
|
||||||
async init() {
|
async init() {
|
||||||
// chart 图表实例不能存在data里
|
// chart 图表实例不能存在data里
|
||||||
const chart = await this.$refs.chartRef.init(echarts)
|
const chart = await this.$refs.chartRef.init(echarts);
|
||||||
chart.setOption(this.option)
|
chart.setOption(this.option)
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Vue3
|
### Vue3
|
||||||
|
|
||||||
- 小程序可以使用`require`引入插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html)
|
- 小程序可以使用`require`引入插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html)
|
||||||
- `require`仅支持相对路径,不支持路径别名
|
- `require`仅支持相对路径,不支持路径别名
|
||||||
- 非小程序使用 `npm` 包
|
- 非小程序使用 `npm` 包
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef"></l-echart></view>
|
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef"></l-echart></view>
|
||||||
```
|
```
|
||||||
|
|
@ -155,9 +152,9 @@ export default {
|
||||||
```js
|
```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,37 +163,38 @@ import * as echarts from 'echarts'
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const chartRef = ref < any > null
|
|
||||||
|
const chartRef = ref(null)
|
||||||
const option = {
|
const option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow'
|
||||||
},
|
},
|
||||||
confine: true,
|
confine: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['热度', '正面', '负面'],
|
data: ['热度', '正面', '负面']
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 15,
|
bottom: 15,
|
||||||
top: 40,
|
top: 40,
|
||||||
containLabel: true,
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#999999',
|
color: '#999999'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#666666',
|
color: '#666666'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
|
|
@ -205,13 +203,13 @@ const option = {
|
||||||
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
|
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#999999',
|
color: '#999999'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#666666',
|
color: '#666666'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
|
@ -220,8 +218,8 @@ const option = {
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'inside',
|
position: 'inside'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data: [300, 270, 340, 344, 300, 320, 310],
|
data: [300, 270, 340, 344, 300, 320, 310],
|
||||||
},
|
},
|
||||||
|
|
@ -231,10 +229,10 @@ const option = {
|
||||||
stack: '总量',
|
stack: '总量',
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
data: [120, 102, 141, 174, 190, 250, 220]
|
||||||
data: [120, 102, 141, 174, 190, 250, 220],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '负面',
|
name: '负面',
|
||||||
|
|
@ -243,26 +241,28 @@ const option = {
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'left',
|
position: 'left'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
data: [-20, -32, -21, -34, -90, -130, -110]
|
||||||
data: [-20, -32, -21, -34, -90, -130, -110],
|
}
|
||||||
},
|
]
|
||||||
],
|
};
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
onMounted( ()=>{
|
||||||
// 组件能被调用必须是组件的节点已经被渲染到页面上
|
// 组件能被调用必须是组件的节点已经被渲染到页面上
|
||||||
setTimeout(async () => {
|
setTimeout(async()=>{
|
||||||
if (!chartRef.value) return
|
if(!chartRef.value) return
|
||||||
const myChart = await chartRef.value.init(echarts)
|
const myChart = await chartRef.value.init(echarts)
|
||||||
myChart.setOption(option)
|
myChart.setOption(option)
|
||||||
}, 300)
|
},300)
|
||||||
})
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uvue
|
|
||||||
|
|
||||||
|
### Uvue
|
||||||
- Uvue和Nvue不需要引入`echarts`,因为它们的实现方式是`webview`
|
- Uvue和Nvue不需要引入`echarts`,因为它们的实现方式是`webview`
|
||||||
- uniapp x需要HBX 4.13以上
|
- uniapp x需要HBX 4.13以上
|
||||||
|
|
||||||
|
|
@ -290,8 +290,8 @@ const init = async () => {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 数据更新
|
|
||||||
|
|
||||||
|
## 数据更新
|
||||||
- 1、使用 `ref` 可获取`setOption`设置更新
|
- 1、使用 `ref` 可获取`setOption`设置更新
|
||||||
- 2、也可以拿到图表实例`chart`设置`myChart.setOption(data)`
|
- 2、也可以拿到图表实例`chart`设置`myChart.setOption(data)`
|
||||||
|
|
||||||
|
|
@ -304,37 +304,33 @@ myChart.setOption(data)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 图表大小
|
## 图表大小
|
||||||
|
|
||||||
- 在有些场景下,我们希望当容器大小改变时,图表的大小也相应地改变。
|
- 在有些场景下,我们希望当容器大小改变时,图表的大小也相应地改变。
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// 默认获取容器尺寸
|
// 默认获取容器尺寸
|
||||||
this.$refs.chart.resize()
|
this.$refs.chart.resize()
|
||||||
// 指定尺寸
|
// 指定尺寸
|
||||||
this.$refs.chart.resize({ width: 375, height: 375 })
|
this.$refs.chart.resize({width: 375, height: 375})
|
||||||
```
|
```
|
||||||
|
|
||||||
## 自定义Tooltips
|
## 自定义Tooltips
|
||||||
|
|
||||||
- uvue\nvue 不支持
|
- uvue\nvue 不支持
|
||||||
由于除H5之外都不存在dom,但又有tooltips个性化的需求,代码就不贴了,看示例吧
|
由于除H5之外都不存在dom,但又有tooltips个性化的需求,代码就不贴了,看示例吧
|
||||||
|
|
||||||
```
|
```
|
||||||
代码位于/uni_modules/lime-echart/component/lime-echart
|
代码位于/uni_modules/lime-echart/component/lime-echart
|
||||||
```
|
```
|
||||||
|
|
||||||
## 插件标签
|
|
||||||
|
|
||||||
|
## 插件标签
|
||||||
- 默认 l-echart 为 component
|
- 默认 l-echart 为 component
|
||||||
- 默认 lime-echart 为 demo
|
- 默认 lime-echart 为 demo
|
||||||
|
|
||||||
```html
|
```html
|
||||||
// 在任意地方使用可查看domo, 代码位于/uni_modules/lime-echart/component/lime-echart
|
// 在任意地方使用可查看domo, 代码位于/uni_modules/lime-echart/component/lime-echart
|
||||||
<lime-echart></lime-echart>
|
<lime-echart></lime-echart>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 常见问题
|
|
||||||
|
|
||||||
|
## 常见问题
|
||||||
- 钉钉小程序 由于没有`measureText`,模拟的`measureText`又无法得到当前字体的`fontWeight`,故可能存在估计不精细的问题
|
- 钉钉小程序 由于没有`measureText`,模拟的`measureText`又无法得到当前字体的`fontWeight`,故可能存在估计不精细的问题
|
||||||
- 微信小程序 `2d` 只支持 真机调试2.0
|
- 微信小程序 `2d` 只支持 真机调试2.0
|
||||||
- 微信开发工具会出现 `canvas` 不跟随页面的情况,真机不影响
|
- 微信开发工具会出现 `canvas` 不跟随页面的情况,真机不影响
|
||||||
|
|
@ -344,7 +340,6 @@ this.$refs.chart.resize({ width: 375, height: 375 })
|
||||||
- dataZoom H5不要设置 `showDetail`
|
- dataZoom H5不要设置 `showDetail`
|
||||||
- 如果微信小程序的`tooltip`文字有阴影,可能是微信的锅,临时解决方法是`tooltip.shadowBlur = 0`
|
- 如果微信小程序的`tooltip`文字有阴影,可能是微信的锅,临时解决方法是`tooltip.shadowBlur = 0`
|
||||||
- 如果钉钉小程序上传时报安全问题`Uint8Clamped`,可以向钉钉反馈是安全代码扫描把Uint8Clamped数组错误识别了,也可以在 echarts 文件修改`Uint8Clamped`
|
- 如果钉钉小程序上传时报安全问题`Uint8Clamped`,可以向钉钉反馈是安全代码扫描把Uint8Clamped数组错误识别了,也可以在 echarts 文件修改`Uint8Clamped`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// 找到这段代码把代码中`Uint8Clamped`改成`Uint8_Clamped`,再把下划线去掉,不过直接去掉`Uint8Clamped`也是可行的
|
// 找到这段代码把代码中`Uint8Clamped`改成`Uint8_Clamped`,再把下划线去掉,不过直接去掉`Uint8Clamped`也是可行的
|
||||||
// ["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]
|
// ["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
|
### vue3
|
||||||
|
|
||||||
如果您是使用 **vite + vue3** 非微信小程序可能会遇到`echarts`文件缺少`wx`判断导致无法使用或缺少`tooltip`<br>
|
如果您是使用 **vite + vue3** 非微信小程序可能会遇到`echarts`文件缺少`wx`判断导致无法使用或缺少`tooltip`<br>
|
||||||
|
|
||||||
方式一:可以在`echarts.min.js`文件开头增加以下内容,参考插件内的echart.min.js的做法
|
方式一:可以在`echarts.min.js`文件开头增加以下内容,参考插件内的echart.min.js的做法
|
||||||
|
|
@ -368,24 +362,25 @@ let wx = uni
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// 或者在`vite.config.js`的`define`设置环境
|
// 或者在`vite.config.js`的`define`设置环境
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite';
|
||||||
import uni from '@dcloudio/vite-plugin-uni'
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
const define = {}
|
const define = {}
|
||||||
if (!['mp-weixin', 'h5', 'web'].includes(process.env.UNI_PLATFORM)) {
|
if(!["mp-weixin", "h5", "web"].includes(process.env.UNI_PLATFORM)) {
|
||||||
define['global'] = null
|
define['global'] = null
|
||||||
define['wx'] = 'uni'
|
define['wx'] = 'uni'
|
||||||
}
|
}
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
define,
|
define
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Props
|
## Props
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
| ----------------- | -------------------------- | --------- | ------- | ---- |
|
| --------------- | -------- | ------- | ------------ | ----- |
|
||||||
| custom-style | 自定义样式 | `string` | - | - |
|
| custom-style | 自定义样式 | `string` | - | - |
|
||||||
| type | 指定 canvas 类型 | `string` | `2d` | |
|
| type | 指定 canvas 类型 | `string` | `2d` | |
|
||||||
| is-disable-scroll | 触摸图表时是否禁止页面滚动 | `boolean` | `false` | |
|
| is-disable-scroll | 触摸图表时是否禁止页面滚动 | `boolean` | `false` | |
|
||||||
|
|
@ -396,7 +391,7 @@ export default defineConfig({
|
||||||
## 事件
|
## 事件
|
||||||
|
|
||||||
| 参数 | 说明 |
|
| 参数 | 说明 |
|
||||||
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
| --------------- | --------------- |
|
||||||
| init(echarts, chart => {}) | 初始化调用函数,第一个参数是传入`echarts`,第二个参数是回调函数,回调函数的参数是 `chart` 实例 |
|
| init(echarts, chart => {}) | 初始化调用函数,第一个参数是传入`echarts`,第二个参数是回调函数,回调函数的参数是 `chart` 实例 |
|
||||||
| setChart(chart => {}) | 已经初始化后,请使用这个方法,是个回调函数,参数是 `chart` 实例 |
|
| setChart(chart => {}) | 已经初始化后,请使用这个方法,是个回调函数,参数是 `chart` 实例 |
|
||||||
| setOption(data) | [图表配置项](https://echarts.apache.org/zh/option.html#title),用于更新 ,传递是数据 `option` |
|
| setOption(data) | [图表配置项](https://echarts.apache.org/zh/option.html#title),用于更新 ,传递是数据 `option` |
|
||||||
|
|
@ -406,8 +401,8 @@ export default defineConfig({
|
||||||
| hideLoading() | 隐藏加载 |
|
| hideLoading() | 隐藏加载 |
|
||||||
| [canvasToTempFilePath](https://uniapp.dcloud.io/api/canvas/canvasToTempFilePath.html#canvastotempfilepath)(opt) | 用于生成图片,与官方使用方法一致,但不需要传`canvasId` |
|
| [canvasToTempFilePath](https://uniapp.dcloud.io/api/canvas/canvasToTempFilePath.html#canvastotempfilepath)(opt) | 用于生成图片,与官方使用方法一致,但不需要传`canvasId` |
|
||||||
|
|
||||||
## 打赏
|
|
||||||
|
|
||||||
|
## 打赏
|
||||||
如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。
|
如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。
|
||||||

|

|
||||||

|

|
||||||
|
|
@ -1,31 +1,38 @@
|
||||||
<template>
|
<template>
|
||||||
<CheckboxGroup
|
<view class="custom-checkbox">
|
||||||
v-model="defValue"
|
|
||||||
checked-color="#1580FF"
|
<CheckboxGroup v-model="defValue" checked-color="#1580FF" @change="handleChange" v-bind="$attrs" :default-cols="4">
|
||||||
@change="handleChange"
|
|
||||||
v-bind="$attrs"
|
<Checkbox v-for="item in list" :key="item[valueKey]" :name="item[valueKey]" cell shape="button" :default-style="`
|
||||||
:style="{ '--default-cols': defaultCols }"
|
${checkboxStyle}
|
||||||
>
|
--checkbox-bg: #f7f8fa;
|
||||||
<Checkbox
|
--checkbox-radius: 8rpx;
|
||||||
v-for="item in list"
|
--checkbox-active-border: 2rpx solid #1580ff;
|
||||||
:key="item[valueKey]"
|
--checkbox-active-color: #1580ff;
|
||||||
:name="item[valueKey]"
|
|
||||||
cell
|
height: var(--checkbox-height);
|
||||||
shape="button"
|
|
||||||
class="custom-checkbox"
|
background-color: var(--checkbox-bg);
|
||||||
:style="checkboxStyle"
|
border-radius: var(--checkbox-radius);
|
||||||
>
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
`">
|
||||||
{{ item[labelKey] }}
|
{{ item[labelKey] }}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
|
|
||||||
</CheckboxGroup>
|
</CheckboxGroup>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Checkbox from './Checkbox.vue'
|
import Checkbox from './Checkbox.vue'
|
||||||
import CheckboxGroup from './CheckboxGroup.vue'
|
import CheckboxGroup from './CheckboxGroup.vue'
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: Array<any>,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
labelKey: {
|
labelKey: {
|
||||||
|
|
@ -84,15 +91,13 @@ watch(
|
||||||
const checkboxStyle = computed(() => {
|
const checkboxStyle = computed(() => {
|
||||||
const width = typeof props.width === 'number' ? `${props.width}rpx` : props.width
|
const width = typeof props.width === 'number' ? `${props.width}rpx` : props.width
|
||||||
const height = typeof props.height === 'number' ? `${props.height}rpx` : props.height
|
const height = typeof props.height === 'number' ? `${props.height}rpx` : props.height
|
||||||
return {
|
return `--checkbox-width: ${width};--checkbox-height: ${height};`
|
||||||
'--checkbox-width': width,
|
|
||||||
'--checkbox-height': height,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.custom-checkbox) {
|
.custom-checkbox {
|
||||||
// 定义默认变量
|
// 定义默认变量
|
||||||
--checkbox-width: 216rpx;
|
--checkbox-width: 216rpx;
|
||||||
--checkbox-height: 60rpx;
|
--checkbox-height: 60rpx;
|
||||||
|
|
@ -100,7 +105,9 @@ const checkboxStyle = computed(() => {
|
||||||
--checkbox-radius: 8rpx;
|
--checkbox-radius: 8rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
||||||
.checkbox {
|
}
|
||||||
|
|
||||||
|
:deep(.ycym-checkbox) {
|
||||||
width: var(--checkbox-width);
|
width: var(--checkbox-width);
|
||||||
height: var(--checkbox-height);
|
height: var(--checkbox-height);
|
||||||
min-width: var(--checkbox-width);
|
min-width: var(--checkbox-width);
|
||||||
|
|
@ -110,20 +117,17 @@ const checkboxStyle = computed(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 2rpx solid var(--checkbox-bg);
|
border: 2rpx solid var(--checkbox-bg);
|
||||||
}
|
|
||||||
.checkbox__icon {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.checkbox-group) {
|
:deep(.checkbox__icon) {
|
||||||
display: grid;
|
display: none;
|
||||||
grid-template-columns: repeat(var(--default-cols), 1fr);
|
|
||||||
gap: 16rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:deep(.checkbox-active) {
|
:deep(.checkbox-active) {
|
||||||
border-color: #1580ff !important;
|
border-color: #1580ff !important;
|
||||||
|
|
||||||
.checkbox__label {
|
.checkbox__label {
|
||||||
color: #1580ff !important;
|
color: #1580ff !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view
|
<view
|
||||||
class="checkbox"
|
:style="`${defaultStyle}`"
|
||||||
:class="{
|
:class="{
|
||||||
'checkbox--disabled': isDisabled,
|
'checkbox--disabled': isDisabled,
|
||||||
'checkbox-active': isChecked,
|
'checkbox-active': isChecked,
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
}"
|
}"
|
||||||
@click="handleClick"
|
@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>
|
<text v-if="isChecked" class="i-carbon-checkmark checkbox__icon-check"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="checkbox__label">
|
<view class="checkbox__label">
|
||||||
|
|
@ -33,6 +33,16 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
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'])
|
const emit = defineEmits(['change'])
|
||||||
|
|
@ -83,12 +93,6 @@ const handleClick = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.checkbox {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox--disabled {
|
.checkbox--disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|
@ -108,7 +112,6 @@ const handleClick = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox__icon--checked {
|
.checkbox__icon--checked {
|
||||||
background-color: #0083ff;
|
|
||||||
border-color: #0083ff;
|
border-color: #0083ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,8 +125,8 @@ const handleClick = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-active {
|
.checkbox-active {
|
||||||
background-color: #0083ff;
|
border:var(--checkbox-active-border);
|
||||||
border-color: #0083ff;
|
color: var(--checkbox-active-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-disabled {
|
.checkbox-disabled {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="checkbox-group">
|
<view class="checkbox-group" :style="`${checkgroupStyle}`">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -20,6 +20,10 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
checkgroupStyle:{
|
||||||
|
type:String,
|
||||||
|
default:'grid-template-columns: repeat(3, 1fr);'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change'])
|
const emit = defineEmits(['update:modelValue', 'change'])
|
||||||
|
|
@ -64,9 +68,9 @@ provide('checkboxGroup', {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.checkbox-group {
|
|
||||||
display: flex;
|
.checkbox-group{
|
||||||
flex-wrap: wrap;
|
display: grid;
|
||||||
gap: 20rpx;
|
gap: 16rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { ref, computed, watch, provide, onMounted, nextTick } from 'vue'
|
import { ref, computed, watch, provide, onMounted, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -26,8 +26,8 @@ const props = defineProps({
|
||||||
const emit = defineEmits(['change', 'activeItem', 'input', 'update:modelValue'])
|
const emit = defineEmits(['change', 'activeItem', 'input', 'update:modelValue'])
|
||||||
|
|
||||||
// 子组件集合
|
// 子组件集合
|
||||||
const childrens = ref<any[]>([])
|
const childrens = ref([])
|
||||||
const names = ref<any[]>([])
|
const names = ref([])
|
||||||
|
|
||||||
// 计算当前使用的值(兼容 vue2 和 vue3 的双向绑定)
|
// 计算当前使用的值(兼容 vue2 和 vue3 的双向绑定)
|
||||||
const dataValue = computed(() => {
|
const dataValue = computed(() => {
|
||||||
|
|
@ -38,25 +38,25 @@ const dataValue = computed(() => {
|
||||||
return props.value
|
return props.value
|
||||||
})
|
})
|
||||||
// 发送事件
|
// 发送事件
|
||||||
const emitValue = (val: any) => {
|
const emitValue = (val) => {
|
||||||
emit('input', val)
|
emit('input', val)
|
||||||
emit('update:modelValue', val)
|
emit('update:modelValue', val)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册子组件
|
// 注册子组件
|
||||||
const register = (childInstance: any) => {
|
const register = (childInstance) => {
|
||||||
childrens.value.push(childInstance)
|
childrens.value.push(childInstance)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注销子组件
|
// 注销子组件
|
||||||
const unregister = (childInstance: any) => {
|
const unregister = (childInstance) => {
|
||||||
const index = childrens.value.findIndex((child) => child.nameSync === childInstance.nameSync)
|
const index = childrens.value.findIndex((child) => child.nameSync === childInstance.nameSync)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
childrens.value.splice(index, 1)
|
childrens.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置打开状态 - 进一步优化
|
// 设置打开状态 - 进一步优化
|
||||||
const setOpen = (val: any) => {
|
const setOpen = (val) => {
|
||||||
// 处理不同类型的值
|
// 处理不同类型的值
|
||||||
const isString = typeof val === 'string' || typeof val === 'number'
|
const isString = typeof val === 'string' || typeof val === 'number'
|
||||||
const isArray = Array.isArray(val)
|
const isArray = Array.isArray(val)
|
||||||
|
|
@ -110,7 +110,7 @@ watch(
|
||||||
)
|
)
|
||||||
|
|
||||||
// 设置手风琴模式 - 修复版
|
// 设置手风琴模式 - 修复版
|
||||||
const setAccordion = (self: any) => {
|
const setAccordion = (self) => {
|
||||||
if (!props.accordion) return
|
if (!props.accordion) return
|
||||||
|
|
||||||
childrens.value.forEach((vm) => {
|
childrens.value.forEach((vm) => {
|
||||||
|
|
@ -143,7 +143,7 @@ const resize = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 状态变化事件
|
// 状态变化事件
|
||||||
const onChange = (isOpen: any, self: any) => {
|
const onChange = (isOpen, self) => {
|
||||||
let activeItem = ''
|
let activeItem = ''
|
||||||
|
|
||||||
if (props.accordion) {
|
if (props.accordion) {
|
||||||
|
|
@ -151,7 +151,7 @@ const onChange = (isOpen: any, self: any) => {
|
||||||
activeItem = isOpen ? self.nameSync : ''
|
activeItem = isOpen ? self.nameSync : ''
|
||||||
} else {
|
} else {
|
||||||
// 非手风琴模式返回数组
|
// 非手风琴模式返回数组
|
||||||
const activeItems: any = []
|
const activeItems = []
|
||||||
childrens.value.forEach((vm) => {
|
childrens.value.forEach((vm) => {
|
||||||
if (vm.isOpen) {
|
if (vm.isOpen) {
|
||||||
activeItems.push(vm.nameSync)
|
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()) : []
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
<view class="uni-collapse-item__title-wrap">
|
<view class="uni-collapse-item__title-wrap">
|
||||||
<slot name="title" :expanded="isOpen">
|
<slot name="title" :expanded="isOpen">
|
||||||
<view class="uni-collapse-item__title-box" :class="{ 'is-disabled': disabled }">
|
<view class="uni-collapse-item__title-box" :class="{ 'is-disabled': disabled }">
|
||||||
|
<view class="uni-collapse-item__title-img">
|
||||||
<image v-if="thumb" :src="thumb" 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>
|
<text class="uni-collapse-item__title-text">{{ title }}</text>
|
||||||
</view>
|
</view>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
@ -132,10 +134,10 @@ const props = defineProps({
|
||||||
// 生成随机元素ID,用于解决百度小程序获取同一个元素位置信息的bug
|
// 生成随机元素ID,用于解决百度小程序获取同一个元素位置信息的bug
|
||||||
const elId = ref(`Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`)
|
const elId = ref(`Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`)
|
||||||
const isOpen = ref(false)
|
const isOpen = ref(false)
|
||||||
const isheight = ref < any > null
|
const isheight = ref(null)
|
||||||
const height = ref(0)
|
const height = ref(0)
|
||||||
const nameSync = ref('0')
|
const nameSync = ref('0')
|
||||||
const collapseHook = ref < any > null
|
const collapseHook = ref(null)
|
||||||
const proxy = getCurrentInstance()
|
const proxy = getCurrentInstance()
|
||||||
|
|
||||||
// 获取折叠面板父组件上下文
|
// 获取折叠面板父组件上下文
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<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>
|
<view class="i-carbon-search text-[#999]"></view>
|
||||||
<input
|
<input
|
||||||
v-model="searchValue"
|
v-model="searchValue"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
confirm-type="search"
|
confirm-type="search"
|
||||||
placeholder-style="color:#999"
|
placeholder-style="color:#999"
|
||||||
class="text-start ml-20rpx"
|
class="text-start ml-20rpx bg-transparent"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
@input="handleInput"
|
@input="handleInput"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,13 @@
|
||||||
/>
|
/>
|
||||||
分
|
分
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mx-[20rpx] flex-1 h-[20rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/qujian.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/qujian.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="mx-[20rpx] flex-1 h-[20rpx]"
|
class="h-[20rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<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)]"
|
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 = () => {
|
const handleRightThumbTouchEnd = () => {
|
||||||
let changeValue = [currentLeftValue.value, currentRightValue.value]
|
const changeValue = [currentLeftValue.value, currentRightValue.value]
|
||||||
emits('change', changeValue)
|
emits('change', changeValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,21 @@
|
||||||
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
:class="[contentClass, fixed ? 'navbar-fixed' : '', bordered ? 'navbar-border' : '']"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
height: navHeight + 'px',
|
height: `${navHeight}px`,
|
||||||
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
top: fixed ? (safeAreaInsetTop ? statusBarHeight : 0) + 'px' : '0',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<!-- 左侧区域 -->
|
<view
|
||||||
<view :class="`navbar-left ${leftWidthMin ? 'w-m-[100rpx]' : ''}`" @click="handleClickLeft">
|
:class="`navbar-left ${leftWidthMin ? 'min-w-[48rpx]' : ''} min-w-[48rpx]`"
|
||||||
|
@click="handleClickLeft"
|
||||||
|
>
|
||||||
|
<!-- #ifndef MP-ALIPAY -->
|
||||||
<view v-if="leftArrow" class="back-icon">
|
<view v-if="leftArrow" class="back-icon">
|
||||||
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
|
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 中间标题区域 -->
|
<!-- 中间标题区域 -->
|
||||||
<view class="navbar-title">
|
<view class="navbar-title">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
|
|
@ -51,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { getDeviceInfo, getWindowInfo } from '@/utils/tools'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -95,8 +98,9 @@ defineProps({
|
||||||
const emit = defineEmits(['clickLeft'])
|
const emit = defineEmits(['clickLeft'])
|
||||||
|
|
||||||
// 获取系统信息
|
// 获取系统信息
|
||||||
const systemInfo = uni.getWindowInfo()
|
const deviceInfo = getDeviceInfo()
|
||||||
const deviceInfo = uni.getDeviceInfo()
|
const systemInfo = getWindowInfo()
|
||||||
|
|
||||||
const statusBarHeight = systemInfo.statusBarHeight || 0
|
const statusBarHeight = systemInfo.statusBarHeight || 0
|
||||||
|
|
||||||
// 动态计算导航栏高度
|
// 动态计算导航栏高度
|
||||||
|
|
@ -134,20 +138,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-content {
|
.navbar-content {
|
||||||
width: 100%;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
/* justify-content: space-between; */
|
/* justify-content: space-between; */
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-fixed {
|
.navbar-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-border {
|
.navbar-border {
|
||||||
|
|
@ -168,20 +172,20 @@ const handleClickLeft = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-title {
|
.navbar-title {
|
||||||
/* flex: 1; */
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
/* flex: 1; */
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
font-size: 34rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
@ -189,8 +193,8 @@ const handleClickLeft = () => {
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 52rpx;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
min-width: 52rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view v-if="slot.default">
|
<view>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ export function useTable() {
|
||||||
const addColumn = (column: Column) => {
|
const addColumn = (column: Column) => {
|
||||||
columns.value.push(column)
|
columns.value.push(column)
|
||||||
}
|
}
|
||||||
|
|
||||||
provide(key, {
|
provide(key, {
|
||||||
columns,
|
columns,
|
||||||
addColumn,
|
addColumn,
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,22 @@
|
||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationBarTitleText: '在线客服',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="bg-[#fff] h-[100vh] flex flex-col">
|
<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="flex-1 bg-[#F8F8F8] px-[32rpx] pb-safe">
|
||||||
<view class="mt-[84rpx] h-[754rpx] rounded-[16rpx] bg-[#fff]">
|
<view class="mt-[84rpx] h-[754rpx] rounded-[16rpx] bg-[#fff]">
|
||||||
<view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center">
|
<view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center">
|
||||||
|
<view class="min-w-[144rpx] min-h-[144rpx] w-[144rpx] h-[144rpx]">
|
||||||
<image
|
<image
|
||||||
class="min-w-[144rpx] min-h-[144rpx] w-[144rpx] h-[144rpx] rounded-full"
|
class="rounded-full"
|
||||||
src="https://api.static.ycymedu.com/sub/images/customerService/avatar.jpg"
|
src="https://api.static.ycymedu.com/sub/images/customerService/avatar.jpg"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<view class="flex flex-col text-[#000] ml-[32rpx]">
|
<view class="flex flex-col text-[#000] ml-[32rpx]">
|
||||||
<text class="mb-[12rpx] font-normal text-[28rpx]">专属客服为您服务</text>
|
<text class="mb-[12rpx] font-normal text-[28rpx]">专属客服为您服务</text>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
|
|
@ -36,11 +32,13 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="px-[168rpx] pt-[48rpx]">
|
<view class="px-[168rpx] pt-[48rpx]">
|
||||||
|
<view class="w-[352rpx] h-[352rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[352rpx] h-[352rpx]"
|
class="w-[352rpx] h-[352rpx]"
|
||||||
:src="qrCodeUrl"
|
:src="qrCodeUrl"
|
||||||
:show-menu-by-longpress="true"
|
:show-menu-by-longpress="true"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="flex items-center justify-center mt-[34rpx]">
|
<view class="flex items-center justify-center mt-[34rpx]">
|
||||||
<view class="i-carbon-fingerprint-recognition text-[#E75859] text-[28rpx]"></view>
|
<view class="i-carbon-fingerprint-recognition text-[#E75859] text-[28rpx]"></view>
|
||||||
|
|
@ -55,7 +53,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
|
|
||||||
import { useUserStore } from '@/store'
|
import { useUserStore } from '@/store'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
@ -84,10 +81,6 @@ const makePhoneCall = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleBack = () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
phoneNumber.value = contact[userStore.userInfo.city.code]?.phone || phoneNumber.value
|
phoneNumber.value = contact[userStore.userInfo.city.code]?.phone || phoneNumber.value
|
||||||
qrCodeUrl.value = contact[userStore.userInfo.city.code]?.qrCode || qrCodeUrl.value
|
qrCodeUrl.value = contact[userStore.userInfo.city.code]?.qrCode || qrCodeUrl.value
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -45,6 +47,7 @@
|
||||||
cell
|
cell
|
||||||
shape="button"
|
shape="button"
|
||||||
class="custom-checkbox"
|
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 }}
|
{{ item.name }}
|
||||||
</Checkbox>
|
</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 CheckboxGroup from '@/pages-sub/components/check-group/CheckboxGroup.vue'
|
||||||
|
|
||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
import { useRouterDetail } from '@/pages-sub/composables/useRouterDetail'
|
import { useRouterDetail } from './useRouterDetail'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
|
@ -114,7 +117,7 @@ const handleBack = () => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkedList = ref<any[]>([])
|
const checkedList = ref([])
|
||||||
const answerMap = new Map()
|
const answerMap = new Map()
|
||||||
const disableBtn = ref(true)
|
const disableBtn = ref(true)
|
||||||
const handleCheckChange = (value: any[]) => {
|
const handleCheckChange = (value: any[]) => {
|
||||||
|
|
@ -155,7 +158,7 @@ const calcScore = () => {
|
||||||
|
|
||||||
// 当前显示的卡片索引
|
// 当前显示的卡片索引
|
||||||
const currentIndex = ref(0)
|
const currentIndex = ref(0)
|
||||||
const questions = ref<any[]>([])
|
const questions = ref([])
|
||||||
const questionType = ref(-1)
|
const questionType = ref(-1)
|
||||||
|
|
||||||
const questionName = ref('')
|
const questionName = ref('')
|
||||||
|
|
|
||||||
|
|
@ -122,14 +122,14 @@
|
||||||
<view class="text-[24rpx] text-[#1580FF] mr-[8rpx]">
|
<view class="text-[24rpx] text-[#1580FF] mr-[8rpx]">
|
||||||
{{ isExpand ? '展开' : '收起' }}
|
{{ isExpand ? '展开' : '收起' }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="w-[16rpx] h-[12rpx]" :style="isExpand ? 'transform:rotate(180deg)' : ''">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/shouqi.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/shouqi.png"
|
||||||
mode="scaleToFill"
|
|
||||||
class="w-[16rpx] h-[12rpx]"
|
class="w-[16rpx] h-[12rpx]"
|
||||||
:style="isExpand ? 'transform:rotate(180deg)' : ''"
|
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</RoundedBorder>
|
</RoundedBorder>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,14 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="top-[50%] left-[50%] absolute translate-x-[-50%] translate-y-[-50%]">
|
<view class="top-[50%] left-[50%] absolute translate-x-[-50%] translate-y-[-50%]">
|
||||||
|
<view class="w-[184rpx] h-[184rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/zhongjian.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/zhongjian.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-[184rpx] h-[184rpx]"
|
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</RoundedBorder>
|
</RoundedBorder>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,53 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="w-full flex flex-col">
|
<view class="w-full flex flex-col">
|
||||||
<view class="flex flex-col items-center">
|
<view class="flex flex-col items-center">
|
||||||
|
<view class="w-full h-[538rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/toubu.png "
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/toubu.png "
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-full h-[538rpx]"
|
class="w-full h-[538rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="h-[44rpx] w-[420rpx] mt-[-78rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/mingzi.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/mingzi.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="h-[44rpx] w-[420rpx] bg-transparent mt-[-78rpx]"
|
class="h-[44rpx] w-[420rpx] bg-transparent"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="rounded-[0rpx_0rpx_20rpx_20rpx] h-[474rpx] ml-[36rpx] mr-[38rpx] bg-white px-[24rpx] pt-[28rpx] pb-[18rpx]"
|
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">
|
<view class="flex items-center">
|
||||||
|
<view class="w-[214rpx] h-[180rpx] min-w-[214rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-[214rpx] h-[180rpx] min-w-[214rpx]"
|
class="w-[214rpx] h-[180rpx] min-w-[214rpx]"
|
||||||
@click="
|
@click="
|
||||||
previewImg(
|
previewImg(
|
||||||
['https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png'],
|
[
|
||||||
|
'https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/xuexiao.png',
|
||||||
|
],
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="text-[26rpx] text-[#3d3d3d] ml-[16rpx] text-wrap">
|
<view class="text-[26rpx] text-[#3d3d3d] ml-[16rpx] text-wrap">
|
||||||
经济南市教育局批准成立的十二年一贯制学校,由山东锦泽实业集团投资创办,坐落于济南市平阴县深泉路1号,占地12万平方米,环境清幽,设施一流。
|
经济南市教育局批准成立的十二年一贯制学校,由山东锦泽实业集团投资创办,坐落于济南市平阴县深泉路1号,占地12万平方米,环境清幽,设施一流。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="h-[234rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tifen.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tifen.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="h-[234rpx]"
|
class="h-[234rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<view class="grid grid-cols-[1fr_2fr_1fr] text-[#333] text-[26rpx] gap-[10prx] mt-[6rpx]">
|
<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 class="justify-self-center">复读生平均提分</view>
|
<view class="justify-self-center">复读生平均提分</view>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="grid grid-cols-2 gap-x-[16rpx] gap-y-[10rpx]">
|
<view class="grid grid-cols-2 gap-x-[16rpx] gap-y-[10rpx]">
|
||||||
|
<view class="w-full h-[170rpx]">
|
||||||
<image
|
<image
|
||||||
:src="item"
|
:src="item"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</RoundedBorder>
|
</RoundedBorder>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="flex mx-[20rpx] flex-col">
|
<view class="flex mx-[20rpx] flex-col">
|
||||||
<view class="w-full relative z-2">
|
<view class="w-full relative z-2">
|
||||||
|
<view class="w-full h-[100rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/biaoti.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/biaoti.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="w-full h-[100rpx]"
|
class="w-full h-[100rpx]"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
class="text-[40rpx] font-700 absolute top-[12rpx] left-[50rpx] tracking-[10rpx] text-white italic"
|
class="text-[40rpx] font-700 absolute top-[12rpx] left-[50rpx] tracking-[10rpx] text-white italic"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -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]"
|
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">
|
<view class="flex flex-col items-center" v-for="(item, index) in schools" :key="index">
|
||||||
|
<view class="w-[120rpx] h-[120rpx]">
|
||||||
<image :src="item.badge" mode="scaleToFill" 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>
|
<span class="text-[26rpx] text-[#333]">{{ item.name }}</span>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,33 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="bg-white px-[30rpx] pb-safe pt-[14rpx] grid grid-cols-2 gap-[24rpx]">
|
<view class="bg-white px-[30rpx] pb-safe pt-[14rpx] grid grid-cols-2 gap-[24rpx]">
|
||||||
|
<view class="h-[88rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/dh.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/dh.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="h-[88rpx]"
|
class="h-[88rpx]"
|
||||||
@click="handlePhone"
|
@click="handlePhone"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="h-[88rpx]">
|
||||||
<image
|
<image
|
||||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/wx.png"
|
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/wx.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="h-[88rpx]"
|
class="h-[88rpx]"
|
||||||
@click="handleFriend"
|
@click="handleFriend"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
<MessageBox v-model:show="show" title="好友添加">
|
<MessageBox v-model:show="show" title="好友添加">
|
||||||
<template>
|
<template>
|
||||||
|
<view class="w-full h-[80vh] py-[20rpx]">
|
||||||
<image
|
<image
|
||||||
:src="friendImage"
|
:src="friendImage"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="w-full h-[80vh] py-[20rpx]"
|
class="w-full h-[80vh]"
|
||||||
:show-menu-by-longpress="true"
|
:show-menu-by-longpress="true"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="flex flex-col h-screen">
|
<view class="flex flex-col h-screen">
|
||||||
<Tabs v-model:modelValue="currentIndex" :tabs="tabs"></Tabs>
|
<Tabs v-model:modelValue="currentIndex" :tabs="tabs"></Tabs>
|
||||||
<swiper :current="currentIndex" class="flex-1" @change="handleSwiperChange">
|
<view class="flex-1">
|
||||||
|
<swiper :current="currentIndex" @change="handleSwiperChange">
|
||||||
<swiper-item v-for="(item, index) in tabs" :key="index">
|
<swiper-item v-for="(item, index) in tabs" :key="index">
|
||||||
<image :src="item.image" mode="scaleToFill" class="w-full h-full" />
|
<image :src="item.image" mode="scaleToFill" class="w-full h-full" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
</view>
|
||||||
<ShareButtonGroup
|
<ShareButtonGroup
|
||||||
phone-number="18516500555"
|
phone-number="18516500555"
|
||||||
friend-image="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tianjiawx-liuxue.jpg"
|
friend-image="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/ad-banner/tianjiawx-liuxue.jpg"
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,15 @@
|
||||||
</button>
|
</button>
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|
||||||
|
<view class="w-[286rpx] h-[286rpx] mt-[134rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[286rpx] h-[286rpx] mt-[134rpx] mix-blend-darken"
|
class="w-[286rpx] h-[286rpx] mix-blend-darken"
|
||||||
src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg"
|
src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="show = true"
|
@click="show = true"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<ActionSheet
|
<ActionSheet
|
||||||
v-model:show="show"
|
v-model:show="show"
|
||||||
title="筛选"
|
title="筛选"
|
||||||
|
|
@ -71,14 +73,14 @@ const badgeValue = ref(1)
|
||||||
|
|
||||||
const filterMenuRef = ref()
|
const filterMenuRef = ref()
|
||||||
|
|
||||||
const handleChange = (params: any) => {
|
const handleChange = (params) => {
|
||||||
badgeValue.value = params.length
|
badgeValue.value = params.length
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleResult = () => {
|
const handleResult = () => {
|
||||||
let _params = filterMenuRef.value.handleConfirm()
|
const _params = filterMenuRef.value.handleConfirm()
|
||||||
|
|
||||||
let params = {
|
const params = {
|
||||||
p: userStore.userInfo.estimatedAchievement.sp,
|
p: userStore.userInfo.estimatedAchievement.sp,
|
||||||
location: userStore.userInfo.estimatedAchievement.provinceCode,
|
location: userStore.userInfo.estimatedAchievement.provinceCode,
|
||||||
subjects: userStore.userInfo.estimatedAchievement.subjectGroup.split(','),
|
subjects: userStore.userInfo.estimatedAchievement.subjectGroup.split(','),
|
||||||
|
|
@ -91,12 +93,12 @@ const handleResult = () => {
|
||||||
|
|
||||||
getUniversityListByFilter(params).then((res) => {
|
getUniversityListByFilter(params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
let collegeList = (res.result as { rows: any[] }).rows
|
const collegeList = (res.result as { rows: any[] }).rows
|
||||||
let wishList = collegeList.map((item) => {
|
const wishList = collegeList.map((item) => {
|
||||||
let _major = {
|
const _major = {
|
||||||
...item,
|
...item,
|
||||||
name: item.universityName,
|
name: item.universityName,
|
||||||
vItems: item.majorItems.map((majorItem: any) => ({
|
vItems: item.majorItems.map((majorItem) => ({
|
||||||
...majorItem,
|
...majorItem,
|
||||||
name: majorItem.majorName,
|
name: majorItem.majorName,
|
||||||
items: majorItem.planItems,
|
items: majorItem.planItems,
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const menus = ref<any[]>([])
|
const menus = ref([])
|
||||||
const currentMenuObj = ref<any>(null)
|
const currentMenuObj = ref(null)
|
||||||
|
|
||||||
const changeMenu = (item: any) => {
|
const changeMenu = (item: any) => {
|
||||||
currentMenuObj.value = item
|
currentMenuObj.value = item
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
needLogin: true,
|
needLogin: true,
|
||||||
}
|
}
|
||||||
|
|
@ -25,12 +27,14 @@
|
||||||
<text class="text-[36rpx] text-[#000] font-bold mt-[24rpx] mb-[22rpx]">
|
<text class="text-[36rpx] text-[#000] font-bold mt-[24rpx] mb-[22rpx]">
|
||||||
{{ professionInfo.career }}
|
{{ professionInfo.career }}
|
||||||
</text>
|
</text>
|
||||||
|
<view class="w-full h-[264rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-full h-[264rpx] rounded-[8rpx]"
|
class="w-full h-[264rpx] rounded-[8rpx]"
|
||||||
:src="professionInfo.img_url"
|
:src="professionInfo.img_url"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="h-[18rpx] bg-[#F8F8F8] mt-[24rpx] mb-[16rpx]"></view>
|
<view class="h-[18rpx] bg-[#F8F8F8] mt-[24rpx] mb-[16rpx]"></view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<z-tabs
|
<z-tabs
|
||||||
|
|
@ -161,7 +165,7 @@ const professionInfo = ref<ProfessionInfo>({
|
||||||
const professionId = ref('')
|
const professionId = ref('')
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
professionId.value = options?.id
|
professionId.value = options.id
|
||||||
getProfessionInfo({ id: professionId.value }).then((resp) => {
|
getProfessionInfo({ id: professionId.value }).then((resp) => {
|
||||||
if (resp.code === 200) {
|
if (resp.code === 200) {
|
||||||
professionInfo.value = resp.result as ProfessionInfo
|
professionInfo.value = resp.result as ProfessionInfo
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationBarTitleText: '城市列表'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view class="wraper overflow-hidden flex flex-col" :bordered="false">
|
<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">
|
<wd-index-bar sticky class="overflow-y h-0 flex-auto">
|
||||||
<view v-for="item in cities" :key="item.letter">
|
<view v-for="item in cities" :key="item.letter">
|
||||||
<wd-index-anchor :index="item.letter" />
|
<wd-index-anchor :index="item.letter" />
|
||||||
|
|
@ -28,7 +27,6 @@
|
||||||
import { useCityStore } from '@/store/city'
|
import { useCityStore } from '@/store/city'
|
||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
import { City } from '@/types/app-type'
|
import { City } from '@/types/app-type'
|
||||||
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
|
|
||||||
import { getUserCity } from '@/service/index/api'
|
import { getUserCity } from '@/service/index/api'
|
||||||
|
|
||||||
const cityStore = useCityStore()
|
const cityStore = useCityStore()
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="flex flex-col px-[32rpx] pt-[32rpx] bg-[#fff] mt-16rpx">
|
<view class="flex flex-col px-[32rpx] pt-[32rpx] bg-[#fff] mt-16rpx">
|
||||||
<view class="flex items-center gap-[10rpx]">
|
<view class="flex items-center gap-[10rpx]">
|
||||||
|
<view class="w-[48rpx] h-[48rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[48rpx] h-[48rpx]"
|
class="w-[48rpx] h-[48rpx]"
|
||||||
src="https://api.static.ycymedu.com/zdx/faculty.png"
|
src="https://api.static.ycymedu.com/zdx/faculty.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[32rpx] font-semibold text-[#333]">院系设置</text>
|
<text class="text-[32rpx] font-semibold text-[#333]">院系设置</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -51,9 +53,9 @@ watch(
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
getUniversityListByProvince({ id: newVal }).then((resp) => {
|
getUniversityListByProvince({ id: newVal }).then((resp) => {
|
||||||
if (resp.code === 200) {
|
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) => {
|
_res.forEach((college) => {
|
||||||
let _college = { name: college.name, major: '' }
|
const _college = { name: college.name, major: '' }
|
||||||
_college.major = college.item.map((item) => item.name).join(',')
|
_college.major = college.item.map((item) => item.name).join(',')
|
||||||
tableData.value.push(_college)
|
tableData.value.push(_college)
|
||||||
})
|
})
|
||||||
|
|
@ -62,7 +64,7 @@ watch(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref([])
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
let originTableData = []
|
let originTableData = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,13 @@ const batche = ref(batchList[0])
|
||||||
const batches = ref(batchList)
|
const batches = ref(batchList)
|
||||||
|
|
||||||
const year = ref('')
|
const year = ref('')
|
||||||
const yearList = ref<any[]>([])
|
const yearList = ref([])
|
||||||
|
|
||||||
const pickList = ref<any[]>([])
|
const pickList = ref([])
|
||||||
const pickValue = ref('')
|
const pickValue = ref('')
|
||||||
let pickType = 1
|
let pickType = 1
|
||||||
|
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref([])
|
||||||
|
|
||||||
let isFirst = true
|
let isFirst = true
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -79,13 +79,13 @@ const batches = ref(batchList)
|
||||||
const provinceName = userStore.userInfo.estimatedAchievement.provinceName
|
const provinceName = userStore.userInfo.estimatedAchievement.provinceName
|
||||||
|
|
||||||
const year = ref('')
|
const year = ref('')
|
||||||
const yearList = ref<any[]>([])
|
const yearList = ref([])
|
||||||
|
|
||||||
const pickList = ref<any[]>([])
|
const pickList = ref([])
|
||||||
const pickValue = ref('')
|
const pickValue = ref('')
|
||||||
let pickType = 1
|
let pickType = 1
|
||||||
|
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref([])
|
||||||
|
|
||||||
let isFirst = true
|
let isFirst = true
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,13 @@
|
||||||
v-show="assessmentSubjectList.length > 0"
|
v-show="assessmentSubjectList.length > 0"
|
||||||
>
|
>
|
||||||
<view class="flex items-center gap-[10rpx]">
|
<view class="flex items-center gap-[10rpx]">
|
||||||
|
<view class="w-[48rpx] h-[48rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[48rpx] h-[48rpx]"
|
class="w-[48rpx] h-[48rpx]"
|
||||||
src="https://api.static.ycymedu.com/zdx/subject.png"
|
src="https://api.static.ycymedu.com/zdx/subject.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[30rpx] font-600 text-[#000]">
|
<text class="text-[30rpx] font-600 text-[#000]">
|
||||||
学科评估·{{ assessmentSubjectList.length }}
|
学科评估·{{ assessmentSubjectList.length }}
|
||||||
</text>
|
</text>
|
||||||
|
|
@ -72,11 +74,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]" v-show="featureSubjectList.length > 0">
|
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]" v-show="featureSubjectList.length > 0">
|
||||||
<view class="flex items-center gap-[10rpx]">
|
<view class="flex items-center gap-[10rpx]">
|
||||||
|
<view class="w-[48rpx] h-[48rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[48rpx] h-[48rpx]"
|
class="w-[48rpx] h-[48rpx]"
|
||||||
src="https://api.static.ycymedu.com/zdx/profession.png"
|
src="https://api.static.ycymedu.com/zdx/profession.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
<text class="text-[30rpx] font-600 text-[#000]">
|
<text class="text-[30rpx] font-600 text-[#000]">
|
||||||
特色专业·{{ featureSubjectList.length }}
|
特色专业·{{ featureSubjectList.length }}
|
||||||
</text>
|
</text>
|
||||||
|
|
@ -162,9 +166,9 @@
|
||||||
import { getSubjectIntroduceList } from '@/service/index/api'
|
import { getSubjectIntroduceList } from '@/service/index/api'
|
||||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||||
|
|
||||||
const subjectIntroduceList = ref<any[]>([])
|
const subjectIntroduceList = ref([])
|
||||||
const assessmentSubjectList = ref<any[]>([])
|
const assessmentSubjectList = ref([])
|
||||||
const featureSubjectList = ref<any[]>([])
|
const featureSubjectList = ref([])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|
@ -207,7 +211,7 @@ const parsedNames = (name: string) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
name: name,
|
name,
|
||||||
grade: '',
|
grade: '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
@ -49,21 +51,21 @@
|
||||||
v-if="currentMenu === 1"
|
v-if="currentMenu === 1"
|
||||||
@changeName="handleRegionChange"
|
@changeName="handleRegionChange"
|
||||||
@change="handleRegionIdChange"
|
@change="handleRegionIdChange"
|
||||||
class="custom-check-group"
|
checkgroupStyle="display: grid;grid-template-columns: repeat(4, 1fr);gap: 16rpx;padding: 24rpx 24rpx 36rpx;"
|
||||||
/>
|
/>
|
||||||
<Nature
|
<Nature
|
||||||
v-if="currentMenu === 2"
|
v-if="currentMenu === 2"
|
||||||
:defaultValue="natureKeyInfo"
|
:defaultValue="natureKeyInfo"
|
||||||
@changeName="handleNatureChange"
|
@changeName="handleNatureChange"
|
||||||
@change="handleNatureIdChange"
|
@change="handleNatureIdChange"
|
||||||
class="custom-check-group"
|
checkgroupStyle="display: grid;grid-template-columns: repeat(4, 1fr);gap: 16rpx;padding: 24rpx 24rpx 36rpx;"
|
||||||
/>
|
/>
|
||||||
<UniType
|
<UniType
|
||||||
v-if="currentMenu === 3"
|
v-if="currentMenu === 3"
|
||||||
:defaultValue="uniTypeKeyInfo"
|
:defaultValue="uniTypeKeyInfo"
|
||||||
@changeName="handleUniTypeChange"
|
@changeName="handleUniTypeChange"
|
||||||
@change="handleUniTypeIdChange"
|
@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="flex items-center justify-between px-[32rpx] pb-[32rpx] gap-[20rpx]">
|
||||||
<view class="cancel-btn" @click="handleClear(index)">清空</view>
|
<view class="cancel-btn" @click="handleClear(index)">清空</view>
|
||||||
|
|
@ -80,8 +82,12 @@
|
||||||
v-for="item in schoolList"
|
v-for="item in schoolList"
|
||||||
@click="itemClick(item, item.zp_index)"
|
@click="itemClick(item, item.zp_index)"
|
||||||
>
|
>
|
||||||
<view class="flex items-center p-[32rpx] w-full">
|
<view class="flex items-center p-[32rpx]">
|
||||||
<image class="w-[80rpx] h-[80rpx] ml-[18rpx] mr-[24rpx]" :src="item.logo"></image>
|
<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 justify-between items-center flex-1 overflow-y-hidden">
|
||||||
<view class="flex flex-col w-full" hover-class="none">
|
<view class="flex flex-col w-full" hover-class="none">
|
||||||
<text class="text-[28rpx] text-[#333] font-semibold mb-[6rpx]">
|
<text class="text-[28rpx] text-[#333] font-semibold mb-[6rpx]">
|
||||||
|
|
@ -137,21 +143,21 @@ const subMenu = ref([
|
||||||
|
|
||||||
const dropMenuRef = ref()
|
const dropMenuRef = ref()
|
||||||
|
|
||||||
const regionInfo = ref<any[]>([]) // 省份信息
|
const regionInfo = ref([]) // 省份信息
|
||||||
const uniTypeInfo = ref<any[]>([]) // 层次信息
|
const uniTypeInfo = ref([]) // 层次信息
|
||||||
const natureInfo = ref<any[]>([]) // 类型信息
|
const natureInfo = ref([]) // 类型信息
|
||||||
|
|
||||||
const regionKeyInfo = ref<any[]>([]) // 省份信息
|
const regionKeyInfo = ref([]) // 省份信息
|
||||||
const uniTypeKeyInfo = ref<any[]>([]) // 层次信息
|
const uniTypeKeyInfo = ref([]) // 层次信息
|
||||||
const natureKeyInfo = ref<any[]>([]) // 类型信息
|
const natureKeyInfo = ref([]) // 类型信息
|
||||||
|
|
||||||
const currentMenu = ref(1)
|
const currentMenu = ref(1)
|
||||||
const handleOpenSubMenu = (id: number) => {
|
const handleOpenSubMenu = (id: number) => {
|
||||||
currentMenu.value = id
|
currentMenu.value = id
|
||||||
}
|
}
|
||||||
|
|
||||||
const schoolList = ref<any[]>([])
|
const schoolList = ref([])
|
||||||
const paging = ref<any>(null)
|
const paging = ref(null)
|
||||||
|
|
||||||
const queryList = (page: number, pageSize: number) => {
|
const queryList = (page: number, pageSize: number) => {
|
||||||
getUniversityList({
|
getUniversityList({
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
{
|
{
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
|
transparentTitle: 'always',
|
||||||
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
needLogin: true,
|
needLogin: true,
|
||||||
}
|
}
|
||||||
|
|
@ -24,11 +26,13 @@
|
||||||
|
|
||||||
<view class="flex-1 flex flex-col pb-safe overflow-y-auto">
|
<view class="flex-1 flex flex-col pb-safe overflow-y-auto">
|
||||||
<view class="flex items-center p-[32rpx]" hover-class="none">
|
<view class="flex items-center p-[32rpx]" hover-class="none">
|
||||||
|
<view class="w-[104rpx] h-[104rpx]">
|
||||||
<image
|
<image
|
||||||
class="w-[104rpx] h-[104rpx]"
|
class="w-[104rpx] h-[104rpx]"
|
||||||
:src="universityBaseInfo?.universityResult.logo"
|
:src="universityBaseInfo?.universityResult.logo"
|
||||||
:lazy-load="true"
|
:lazy-load="true"
|
||||||
></image>
|
></image>
|
||||||
|
</view>
|
||||||
<view class="flex flex-col ml-[24rpx]">
|
<view class="flex flex-col ml-[24rpx]">
|
||||||
<text class="text-[32rpx] font-semibold text-[#303030]">
|
<text class="text-[32rpx] font-semibold text-[#303030]">
|
||||||
{{ universityBaseInfo?.universityResult.name }}
|
{{ universityBaseInfo?.universityResult.name }}
|
||||||
|
|
|
||||||
|
|
@ -109,18 +109,18 @@ const changeMenu = (item: { id: number; name: string }) => {
|
||||||
currentMenu.value = item.id
|
currentMenu.value = item.id
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultRegion = ref<any[]>([])
|
const defaultRegion = ref([])
|
||||||
const defaultNature = ref<any[]>([])
|
const defaultNature = ref([])
|
||||||
const defaultUniType = ref<any[]>([])
|
const defaultUniType = ref([])
|
||||||
const defaultCollegeFeature = ref<any[]>([])
|
const defaultCollegeFeature = ref([])
|
||||||
const defaultPhase = ref('')
|
const defaultPhase = ref('')
|
||||||
|
|
||||||
const filterParams = ref<any[]>([])
|
const filterParams = ref([])
|
||||||
|
|
||||||
const chooseRegion = ref<any[]>([])
|
const chooseRegion = ref([])
|
||||||
const chooseNature = ref<any[]>([])
|
const chooseNature = ref([])
|
||||||
const chooseUniType = ref<any[]>([])
|
const chooseUniType = ref([])
|
||||||
const chooseCollegeFeature = ref<any[]>([])
|
const chooseCollegeFeature = ref([])
|
||||||
const choosePhase = ref('')
|
const choosePhase = ref('')
|
||||||
|
|
||||||
const handleRegionChangeObj = (val: any[]) => {
|
const handleRegionChangeObj = (val: any[]) => {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import { useRules } from '@/pages-sub/home/inputScore/useRules'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const phaseList = ref<any[]>([])
|
const phaseList = ref([])
|
||||||
|
|
||||||
const choosePhase = ref('')
|
const choosePhase = ref('')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,18 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script>
|
||||||
const props = defineProps({
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'ProgressBar',
|
||||||
|
props: {
|
||||||
progress: {
|
progress: {
|
||||||
type: [Number, String],
|
type: Number | String,
|
||||||
|
required: true,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
label-key="simplename"
|
label-key="simplename"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
:defaultCols="4"
|
||||||
width="100%"
|
width="100%"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -12,6 +13,10 @@
|
||||||
import { getRegionInfo } from '@/service/index/api'
|
import { getRegionInfo } from '@/service/index/api'
|
||||||
import CheckGroup from '@/pages-sub/components/check-group/CheckGroup.vue'
|
import CheckGroup from '@/pages-sub/components/check-group/CheckGroup.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
inheritAttrs:true
|
||||||
|
})
|
||||||
|
|
||||||
interface Region {
|
interface Region {
|
||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
|
|
@ -19,7 +24,7 @@ interface Region {
|
||||||
simplename: string
|
simplename: string
|
||||||
pinyin: string
|
pinyin: string
|
||||||
}
|
}
|
||||||
const regionList = ref<any[]>([])
|
const regionList = ref([])
|
||||||
getRegionInfo().then((res) => {
|
getRegionInfo().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
regionList.value = res.result as Region[]
|
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
Loading…
Reference in New Issue