Compare commits

...

2 Commits

Author SHA1 Message Date
xjs 6078950093 feat: 我的页面正在编写中 2025-03-20 18:02:12 +08:00
xjs ed37c3cddd feat: 拖拽组件优化 2025-03-19 17:40:18 +08:00
40 changed files with 8150 additions and 217 deletions

View File

@ -65,7 +65,7 @@ export default defineUniPages({
preloadRule: {
'pages/home/index/index': {
network: 'all',
packages: ['__APP__'],
packages: ['pages-evaluation-sub'],
},
},
condition: {
@ -80,7 +80,7 @@ export default defineUniPages({
},
permission: {
'scope.userLocation': {
desc: '你的位置信息将用于小程序位置接口的效果展示', // 高速公路行驶持续后台定位
desc: '你的位置信息将用于小程序位置接口的效果展示',
},
},
})

View File

@ -0,0 +1,109 @@
<template>
<view class="custom-tabbar pb-safe">
<view class="tabbar-content">
<view
class="tabbar-item"
v-for="item in tabbarList"
:key="item.id"
:class="[item.centerItem ? 'center-item' : '']"
@click="changeItem(item)"
>
<view class="item-top">
<image
class="w-full h-full object-contain item-icon"
:src="currentPage == item.id ? item.selectIcon : item.icon"
></image>
</view>
<view class="item-bottom" :class="[currentPage == item.id ? 'item-active' : '']">
<text>{{ item.text }}</text>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { TabesItem } from '@/service/app/types'
import { tabbarList } from '@/hooks/useTabbarList'
defineProps({
currentPage: {
type: Number,
default: 0,
},
})
const changeItem = (item: TabesItem) => {
uni.switchTab({
url: item.path,
})
}
onMounted(() => {
uni.hideTabBar()
})
</script>
<style scoped>
.custom-tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
border-top: 1px solid #f5f5f5;
z-index: 999;
}
.tabbar-content {
display: flex;
height: 100rpx;
padding: 0 20rpx;
position: relative;
}
.tabbar-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
padding: 10rpx 0;
}
.item-top {
display: flex;
align-items: center;
justify-content: center;
}
.item-bottom {
font-size: 20rpx;
margin-top: 6rpx;
color: #999;
}
.item-active {
color: #3370ff;
}
.center-item {
position: relative;
}
.item-icon {
width: 48rpx;
height: 48rpx;
}
.center-item .item-icon {
width: 98rpx;
height: 98rpx;
}
.center-item .item-bottom {
position: absolute;
bottom: 5rpx;
}
</style>

View File

@ -1,33 +1,9 @@
<template>
<wd-tabbar :bordered="false" safeAreaInsetBottom :placeholder="true" fixed>
<view
class="tabbar-item h-[100rpx] flex flex-col justify-center w-full items-center text-center"
v-for="(item, index) in tabbarList"
:key="item.id"
:class="[item.centerItem ? 'center-item' : '']"
@click="changeItem(item)"
>
<view class="item-top w-[48rpx] h-[48rpx] p-[10rpx]">
<image
class="w-full h-full object-container"
:src="currentPage == item.id ? item.selectIcon : item.icon"
></image>
</view>
<view
class="item-bottom text-[20rpx] mt-[6rpx]"
:class="[currentPage == item.id ? 'item-active text-[#3370ff]' : '']"
>
<text>{{ item.text }}</text>
</view>
</view>
</wd-tabbar>
<custom-tab-bar :current-page="currentPage" :safe-area-inset-bottom="true" />
</template>
<script setup lang="ts">
import { TabesItem } from '@/service/app/types'
import { tabbarList } from '@/hooks/useTabbarList'
const tabbar = ref(1)
import CustomTabBar from './CustomTabBar.vue'
defineProps({
currentPage: {
@ -35,35 +11,4 @@ defineProps({
default: 0,
},
})
const changeItem = (item: TabesItem) => {
uni.switchTab({
url: item.path,
})
}
onMounted(() => {
uni.hideTabBar()
})
</script>
<style scoped>
view {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.center-item {
position: relative;
}
.center-item .item-top {
width: 98rpx;
height: 98rpx;
}
.center-item .item-bottom {
position: absolute;
bottom: 5rpx;
}
</style>

View File

@ -24,7 +24,8 @@ const props = defineProps({
},
})
const systemInfo = uni.getSystemInfoSync()
const systemInfo = uni.getWindowInfo()
const position = ref({ x: props.initialX, y: props.initialY })
const startPosition = ref({ x: 0, y: 0 })
const startTime = ref(0)

View File

@ -91,13 +91,16 @@ const props = defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getSystemInfoSync()
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
const navHeight = computed(() => {
//
const { platform, screenWidth } = systemInfo
const { screenWidth } = systemInfo
const { platform } = deviceInfo
// pxrpx
const ratio = 750 / screenWidth

View File

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

View File

@ -2,7 +2,6 @@ import { TabesItem } from '@/service/app'
import { sysDictType } from '@/service/index/api'
const tabbarList = ref<TabesItem[]>([])
const app = getApp()
sysDictType({ id: 619330547859525 }).then((res) => {
const { code, result } = res

View File

@ -50,10 +50,10 @@ import {
getWxUserInfo,
setWxInfo,
} from '@/service/index/api'
import { useUserStore } from '@/store'
import { useUserStore } from '@/store/user'
import { City } from '@/types/app-type'
const props = defineProps({
defineProps({
show: {
type: Boolean,
default: false,
@ -129,11 +129,15 @@ const getUserInfo = async (code: string) => {
zyBatches: any[]
batchDataUrl: string
batchName: string
avatar: string
nickName: string
}
userStore.setEstimatedAchievement(infoData.userExtend)
userStore.setZyBatches(infoData.zyBatches)
userStore.setBatchDataUrl(infoData.batchDataUrl)
userStore.setBatchName(infoData.batchName)
userStore.setUserAvatar(infoData.avatar)
userStore.setUserNickName(infoData.nickName)
if (resp.code === 200) {
//

View File

@ -91,13 +91,15 @@ const props = defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getSystemInfoSync()
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
const navHeight = computed(() => {
//
const { platform, screenWidth } = systemInfo
const { screenWidth } = systemInfo
const { platform } = deviceInfo
// pxrpx
const ratio = 750 / screenWidth

View File

@ -91,13 +91,15 @@ const props = defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getSystemInfoSync()
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
const navHeight = computed(() => {
//
const { platform, screenWidth } = systemInfo
const { screenWidth } = systemInfo
const { platform } = deviceInfo
// pxrpx
const ratio = 750 / screenWidth

File diff suppressed because one or more lines are too long

View File

@ -330,102 +330,55 @@ const getPosition = (index: number, list = cloneList.value): [number, number] =>
}
//
const initList = (list: ItemType[] = [], changeheight: boolean = false): Promise<void> => {
return new Promise((resolve) => {
const newList = deepCopy(list)
// itemxykey
showList.value = newList.map((item, index) => {
const [x, y] = getPosition(index)
let data = {
...item,
x,
y,
dropId: index + 1,
}
let key = 'slot' + Math.random() + index
// xykey
if (x === item?.x && y === item?.y) {
if (activeIndex.value !== index) {
// key
key = item.key
}
}
//
data.key = key
return data
})
cloneList.value = deepCopy(showList.value)
nextTick(() => {
showArea.value = true
})
if (changeheight && props.itemHeight === 'auto') {
// item
setTimeout(async () => {
// #ifdef APP-NVUE
showArea.value = false
const calculateHeights = async () => {
let max = 0
let viewMaxHeightVal = 0
const promises = slotContent.value.map((content, index) => {
return new Promise<void>((resolve) => {
dom.getComponentRect(content, (res: any) => {
let size = res.size
if (isList.value) {
cloneList.value[index].height = size.height
}
viewMaxHeightVal += size.height
if (size.height > max) {
max = size.height
}
resolve()
})
})
})
await Promise.all(promises)
viewMaxHeight.value = viewMaxHeightVal
itemMaxHeight.value = max + 'px'
nextTick(() => {
initList(cloneList.value).then(resolve)
})
}
await calculateHeights()
// #endif
// #ifndef APP-NVUE
const query = uni.createSelectorQuery().in(instance.proxy)
query
.selectAll('.slotContent')
.boundingClientRect((data) => {
let domList = JSON.parse(JSON.stringify(data))
let max = 0
let viewMaxHeightVal = 0
for (let i = 0; i < domList.length; i++) {
let height = domList[i].height
if (isList.value) {
cloneList.value[i].height = height
}
viewMaxHeightVal += height
if (height > max) {
max = height
}
}
viewMaxHeight.value = viewMaxHeightVal //
itemMaxHeight.value = max + 'px'
initList(cloneList.value).then(resolve)
})
.exec()
// #endif
}, 0)
} else {
resolve()
const initList = (list: ItemType[] = [], changeheight: boolean = false) => {
const newList = deepCopy(list)
showList.value = newList.map((item, index) => {
const [x, y] = getPosition(index)
let data = {
...item,
x,
y,
dropId: index + 1,
}
let key = 'slot' + Math.random() + index
// xykey
if (x === item?.x && y === item?.y) {
if (activeIndex.value !== index) {
// key
key = item.key
}
}
data.key = key
return data
})
cloneList.value = deepCopy(showList.value)
nextTick(() => {
showArea.value = true
})
if (changeheight && props.itemHeight === 'auto') {
const query = uni.createSelectorQuery().in(instance.proxy)
query
.selectAll('.slotContent')
.boundingClientRect((data) => {
let domList = JSON.parse(JSON.stringify(data))
let max = 0
let _viewMaxHeight = 0
for (let i = 0; i < domList.length; i++) {
let height = domList[i].height
if (isList.value) {
cloneList.value[i].height = height
}
_viewMaxHeight += height
if (height > max) {
max = height
}
}
viewMaxHeight.value = _viewMaxHeight //
itemMaxHeight.value = max + 'px'
initList(cloneList.value)
})
.exec()
}
}
//

View File

@ -91,13 +91,15 @@ const props = defineProps({
const emit = defineEmits(['clickLeft'])
//
const systemInfo = uni.getSystemInfoSync()
const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0
//
const navHeight = computed(() => {
//
const { platform, screenWidth } = systemInfo
const { screenWidth } = systemInfo
const { platform } = deviceInfo
// pxrpx
const ratio = 750 / screenWidth

View File

@ -23,7 +23,7 @@ withDefaults(
}>(),
{
backgroundColor: 'rgba(0, 0, 0, 0.7)',
zIndex: 1000,
zIndex: 10,
lockScroll: true,
},
)

View File

@ -42,7 +42,7 @@
<text class="text-[32rpx] font-semibold">[{{ item.yxdm }}]{{ item.yxmc }}</text>
<text class="text-[22rpx] text-[#505050]">{{ item.cityname }}·{{ item.ulevel }}</text>
<text class="text-[#8F959E] text-[22rpx] my-[6rpx]">
{{ item.featuretag?.split('/').slice(0, 4).join('/') }}/ 排名68
{{ item.featuretag?.split('/').slice(0, 4).join('/') }}/ 排名{{ item.zytjRank }}
</text>
</view>
</view>

View File

@ -88,9 +88,8 @@ const rankDiff = (index: number, item) => {
}
const recompileData = computed(() => {
if (!props.data) return []
let _data = props.data.map((item, index) => {
console.log(props.score)
item['rankDiff'] = rankDiff(index, item)
item['lineDiff'] = item['score'] - props.score
return item

View File

@ -0,0 +1,21 @@
<template>
<view class="flex items-center gap-[26rpx] text-[22rpx] text-[#000]">
<view v-for="(model, index) of tModel" :key="model.type" class="flex items-center gap-[6rpx]">
<view
class="w-[16rpx] h-[16rpx] rounded-full"
:style="{ backgroundColor: calcTypeName(model.type).roundedBgColor }"
></view>
<text class="text-[22rpx]">{{ calcTypeName(model.type)?.text }}({{ model.count }})</text>
</view>
</view>
</template>
<script lang="ts" setup>
import { useUserStore } from '@/store/user'
import { countModel, calcTypeName } from '../composable/useWishesList'
const userStore = useUserStore()
const userWhishList = computed(() => userStore.userInfo.wishList)
const { tModel } = countModel(userWhishList.value)
tModel.value = tModel.value
</script>

View File

@ -14,24 +14,12 @@
<text class="i-carbon-help"></text>
</view>
<view v-if="type === 1" class="flex items-center gap-[26rpx] text-[22rpx] text-[#000]">
<view v-for="(model, index) of tModel" :key="model.type" class="flex items-center gap-[6rpx]">
<view
class="w-[16rpx] h-[16rpx] rounded-full"
:style="{ backgroundColor: calcTypeName(model.type).roundedBgColor }"
></view>
<text class="text-[22rpx]">{{ calcTypeName(model.type)?.text }}({{ model.count }})</text>
</view>
</view>
<HeaderModelTip v-if="type === 1" />
</view>
</template>
<script lang="ts" setup>
import { useUserStore } from '@/store/user'
import { countModel, calcTypeName } from '../composable/useWishesList'
const userStore = useUserStore()
import HeaderModelTip from './HeaderModelTip.vue'
defineProps({
userInfo: {
type: Object,
@ -42,9 +30,6 @@ defineProps({
default: 0,
},
})
const userWhishList = computed(() => userStore.userInfo.wishList)
const { tModel } = countModel(userWhishList.value)
</script>
<style lang="scss" scoped>

View File

@ -63,8 +63,9 @@
</view>
<view class="h-[2rpx] bg-[#EDEDED] w-full"></view>
<view
class="overflow-hidden transition-all duration-300"
:style="{ maxHeight: isCollapsed ? '0' : '2000px' }"
class="overflow-auto transition-all duration-300"
:style="{ maxHeight: isCollapsed ? '0' : '100vh' }"
v-if="!isCollapsed"
>
<DragSort v-model:list="college.vItems" ref="majorDrop" @get-list="getMajorList">
<template #content="{ data }">

View File

@ -83,7 +83,7 @@
:class="`h-[80rpx] rounded-[8rpx] bg-[#1580FF] flex items-center justify-center text-[#fff] ${majorCount === 0 ? 'disabled-btn' : ''}`"
@click="handlePreview"
>
预览志愿表({{ majorCount }})
预览志愿表{{ majorCount ? `(${majorCount})` : '' }}
</view>
</view>
</template>
@ -163,7 +163,7 @@ const handleTypeModelChange = ({ item }) => {
}
const majorCount = computed(() => {
return userStore.userInfo.wishList.reduce((a, b) => a + b.vItems.length, 0)
return userStore.userInfo.wishList.reduce((a, b) => a + (b?.vItems?.length || 0), 0)
})
const queryList = (page: number, pageSize: number) => {

View File

@ -18,6 +18,7 @@
<template #content="{ data }">
<view
class="drop"
id="wishListContainer"
:style="[{ transform: data.index === data.activeIndex ? 'scale(1.05)' : 'scale(1)' }]"
>
<SortCollege
@ -33,12 +34,13 @@
</template>
</DragSortList>
<view class="flex items-center pb-safe button-group px-[32rpx] pt-[32rpx]">
<button
<!-- <button
plain
class="border-[#f5f5f5]! flex-auto bg-[#f5f5f5]! rounded-[8rpx]! text-[#1580FF]! text-[32rpx]! font-normal! mr-[22rpx]"
@click="exportPdf"
>
下载PDF
</button>
</button> -->
<button
class="border-[#1580FF]! flex-auto bg-[#1580FF]! rounded-[8rpx]! text-[#fff]! text-[32rpx]! font-normal!"
@click="messageBoxShow = true"
@ -51,9 +53,9 @@
<template>
<input
type="text"
class="w-auto p-[20rpx] text-center input-border mb-[16rpx]"
class="w-auto p-[20rpx] text-center input-border mb-[16rpx] z-[-1]"
v-model="wishListName"
placeholder="请输入志愿表名字"
:placeholder="messageBoxShow ? '请输入志愿表名字' : ''"
confirm-type="done"
@confirm="handleSave"
/>
@ -98,23 +100,21 @@ const handleMove = (index) => {
myDrop.value.handleLongpress(index)
}
const handleDelete = async (index) => {
const handleDelete = (index) => {
//
wishList.value.splice(index, 1)
await myDrop.value.initList(wishList.value, true)
myDrop.value.initList(wishList.value)
}
const handleUpdateHeight = async () => {
const handleUpdateHeight = () => {
// DragSort
await myDrop.value?.initList(wishList.value, true)
myDrop.value?.initList(wishList.value, true)
}
const handleDeleteMajor = async (index, majorIndex) => {
wishList.value[index].vItems.splice(majorIndex, 1)
userStore.sortWishMajorList({ list: wishList.value[index].vItems, uIndex: index })
myDrop.value?.initList(wishList.value, true).then(() => {
handleUpdateHeight()
})
myDrop.value?.initList(wishList.value, true)
}
const handleSave = () => {
@ -146,13 +146,14 @@ const addWishList = () => {
}
})
let params = {
cId: userStore.userInfo.estimatedAchievement.id,
cId: userStore.userInfo.estimatedAchievement.wxId,
tableName: wishListName.value,
batchName: userStore.userInfo.batchName,
type: typeName,
subjectClaim: userStore.userInfo.estimatedAchievement.subjectGroup,
score: +userStore.userInfo.estimatedAchievement.expectedScore,
vTbDetails: _vTbDetails,
LocationCode: userStore.userInfo.estimatedAchievement.provinceCode,
}
saveWishList(params).then((res) => {
if (res.code === 200) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

View File

@ -0,0 +1,76 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '我的预约',
},
}
</route>
<template>
<scroll-view scroll-y class="pb-safe bg-[#f8f8f8]">
<view class="item-wrapper" v-for="(item, index) in wishList" :key="index">
<view class="flex gap-[24rpx] wish-border justify-between p-[32rpx] rounded-[8rpx]">
<view class="flex flex-col gap-[14rpx]">
<text class="text-[#303030] text-[32rpx] font-semibold">
{{ item.tableName }}
</text>
<text class="text-[22rpx] text-[#303030]">{{ item.createTime || '时间消失了' }}</text>
</view>
<view class="flex flex-col justify-between items-center">
<button class="download-btn" @click="handleDelete(item, index)">取消预约</button>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup lang="ts">
import { deleteWishList, getWishList } from '@/service/index/api'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const wishList = ref([])
onLoad(() => {
getWishList().then((res) => {
if (res.code === 200) {
wishList.value = res.result as any[]
}
})
})
const handleDelete = (item, index) => {
deleteWishList({ id: item.vId }).then((res) => {
if (res.code === 200) {
wishList.value.splice(index, 1)
uni.showToast({ title: '删除成功' })
}
})
}
</script>
<style lang="scss" scoped>
.download-btn {
border-radius: 8rpx;
border: 2rpx solid #1580ff;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
line-height: 1;
padding: 12rpx 16rpx;
height: max-content;
color: #1580ff;
}
.item-wrapper {
padding: 32rpx;
}
.wish-border {
background-color: #ffffff;
border-radius: 8rpx;
}
</style>

View File

@ -0,0 +1,62 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '测评结果',
},
}
</route>
<template>
<scroll-view scroll-y class="pb-safe bg-[#f8f8f8]">
<view class="item-wrapper" v-for="(item, index) in wishList" :key="index">
<view class="flex gap-[24rpx] wish-border justify-between p-[32rpx] rounded-[8rpx]">
<view class="flex flex-col gap-[14rpx]">
<text class="text-[#303030] text-[32rpx] font-semibold">
{{ item.tableName }}
</text>
<text class="text-[22rpx] text-[#303030]">{{ item.createTime || '时间消失了' }}</text>
</view>
<view class="flex flex-col justify-between items-end">
<view class="i-carbon-trash-can" @click="handleDelete(item, index)"></view>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup lang="ts">
import { deleteWishList, getWishList } from '@/service/index/api'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const wishList = ref([])
onLoad(() => {
getWishList().then((res) => {
if (res.code === 200) {
wishList.value = res.result as any[]
}
})
})
const handleDelete = (item, index) => {
deleteWishList({ id: item.vId }).then((res) => {
if (res.code === 200) {
wishList.value.splice(index, 1)
uni.showToast({ title: '删除成功' })
}
})
}
</script>
<style lang="scss" scoped>
.item-wrapper {
padding: 32rpx;
}
.wish-border {
background-color: #ffffff;
border-radius: 8rpx;
}
</style>

View File

@ -0,0 +1,159 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '我的收藏',
},
}
</route>
<template>
<z-paging
ref="paging"
use-virtual-list
:force-close-inner-list="true"
cell-height-mode="dynamic"
@virtualListChange="virtualListChange"
@query="queryList"
:auto-show-system-loading="true"
>
<template #top>
<z-tabs
:current="currentTab"
:list="tabsList"
:scrollCount="4"
inactive-color="#BFBFBF"
active-color="#303030"
:bar-style="{ backgroundColor: '#1580FF' }"
:tabsStyle="{ position: 'sticky', top: '0', zIndex: '9' }"
@change="handleTabChange"
v-bind="{} as any"
/>
</template>
<view
class="item-wrapper"
:id="`zp-id-${item.zp_index}`"
:key="item.zp_index"
v-for="(item, index) in starList"
>
<view class="flex gap-[24rpx] py-[40rpx] border-bt" v-if="currentTab === 0">
<image class="w-[112rpx] h-[112rpx]" :src="item.logo" mode="scaleToFill" />
<view class="flex justify-between items-center flex-1">
<view class="flex flex-col" hover-class="none">
<text class="text-[28rpx] text-[#333] font-semibold mb-[6rpx]">
{{ item.name }}
</text>
<view class="flex items-center gap-[8rpx] mb-[16rpx]">
<view
class="truncate max-w-[176rpx] bg-[#f8f8f8] rounded-[4rpx] text-[20rpx] px-[8rpx] py-[2rpx]"
v-for="(fea, fIndex) in item.features.slice(0, 5)"
:key="fIndex"
>
{{ fea }}
</view>
</view>
<text class="text-[22rpx] text-[#999] font-normal">
{{ item.cityName }}.{{ item.nature }}
</text>
</view>
</view>
<button class="collect-btn" plain @click.stop="handleStar(item)">
<view class="i-carbon-star-filled text-[#FFB032]" v-if="item.isStar"></view>
<view class="i-carbon-star" v-else></view>
收藏
</button>
</view>
<view class="flex gap-[24rpx] py-[40rpx] border-bt" v-if="currentTab === 1">
<view class="flex flex-col">
<view>
<text></text>
<text>专业代码001121</text>
</view>
<text>本科批·四年</text>
</view>
<button class="collect-btn" plain @click="handleStar(item)">
<view class="i-carbon-star-filled text-[#FFB032]" v-if="item.isStar"></view>
<view class="i-carbon-star" v-else></view>
收藏
</button>
</view>
</view>
</z-paging>
</template>
<script setup lang="ts">
import zTabs from '@/pages-sub/uni_modules/z-tabs/components/z-tabs/z-tabs.vue'
import { addUnCollection, deleteUnCollection, getUnCollectionList } from '@/service/index/api'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const tabsList = ['院校']
const currentTab = ref(0)
const handleTabChange = (index: number) => {
currentTab.value = index
}
const starList = ref([])
const paging = ref(null)
const queryList = (page: number, pageSize: number) => {
getUnCollectionList({
Page: page,
PageSize: pageSize,
SearchKey: '',
}).then((res) => {
if (res.code === 200) {
paging.value.complete((res.result as any[]).map((item) => ({ ...item, isStar: true })))
}
})
}
const virtualListChange = (_vList) => {
starList.value = _vList
}
const handleStar = (item: any) => {
if (item.isStar) {
deleteUnCollection({
wxId: userStore.userInfo.estimatedAchievement.wxId,
uId: item._id,
}).then((resp) => {
if (resp.code === 200) {
item.isStar = false
}
})
} else {
addUnCollection({
wxId: userStore.userInfo.estimatedAchievement.wxId,
uId: item._id,
}).then((resp) => {
if (resp.code === 200) {
item.isStar = true
}
})
}
}
</script>
<style lang="scss" scoped>
.collect-btn {
border-radius: 8rpx;
border: 2rpx solid #eeeeee;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
line-height: 1;
padding: 8rpx 12rpx;
height: max-content;
}
.item-wrapper {
padding: 0 32rpx;
align-items: center;
}
.border-bt {
border-bottom: 2rpx solid #eeeeee;
}
</style>

View File

@ -0,0 +1,166 @@
<template>
<view class="vip-table-container">
<!-- VIP专栏背景 -->
<view class="vip-column-bg"></view>
<!-- 表格内容 -->
<view class="vip-table">
<!-- 表头 -->
<view class="vip-table-header">
<view class="feature-column">功能</view>
<view class="vip-column vip-header">
<image src="@/pages-sub/static/images/ucenter/vip-crown.png" class="vip-icon"></image>
</view>
<view class="normal-column">普通用户</view>
</view>
<!-- 表格内容 -->
<view class="vip-table-body">
<view class="vip-table-row" v-for="(item, index) in featureList" :key="index">
<view class="feature-name">{{ item.name }}</view>
<view class="vip-access">
<text v-if="item.vipAccess" class="check-icon"></text>
<text v-else>-</text>
</view>
<view class="normal-access">{{ item.normalAccess }}</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const featureList = ref([
{
name: '志愿填报表AI解读',
vipAccess: true,
normalAccess: '—',
},
{
name: '11项测评报告AI解读',
vipAccess: true,
normalAccess: '—',
},
{
name: '高考信息咨询AI咨询',
vipAccess: true,
normalAccess: '次数限制',
},
])
</script>
<style scoped>
.vip-table-container {
font-size: 24rpx;
position: relative;
margin-top: 30rpx;
margin-bottom: 30rpx;
color: #333333;
}
.vip-column-bg {
position: absolute;
width: 19%;
left: 50%;
top: -30rpx;
bottom: -30rpx;
background: linear-gradient(180deg, rgba(254, 235, 192, 0.8) 0%, rgba(255, 204, 104, 0.8) 100%);
z-index: 0;
border-radius: 20rpx;
}
.vip-table {
position: relative;
z-index: 0;
overflow: hidden;
border-radius: 20rpx;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.05);
}
.vip-table-header,
.vip-table-row {
display: flex;
width: 100%;
font-weight: 500;
}
.vip-table-header {
background-color: transparent;
font-weight: 500;
}
.feature-column,
.feature-name {
flex: 4;
text-align: left;
padding: 24rpx 32rpx;
background-color: #fff;
font-weight: 500;
display: flex;
align-items: center;
}
.vip-column,
.vip-access {
flex: 2;
display: flex;
justify-content: center;
align-items: center;
padding: 24rpx 0;
background-color: transparent;
position: relative;
z-index: 3;
}
.normal-column,
.normal-access {
flex: 3;
display: flex;
justify-content: center;
align-items: center;
padding: 24rpx 0;
color: #666;
background-color: #fff;
}
.vip-header {
display: flex;
justify-content: center;
align-items: center;
}
.vip-icon {
width: 66rpx;
height: 46rpx;
background-color: transparent;
}
.check-icon {
color: #8b5a00;
font-weight: bold;
font-size: 36rpx;
}
.vip-table-body {
background-color: transparent;
}
.vip-table-row:last-child {
border-bottom: none;
}
.feature-column,
.normal-column {
border-radius: 20rpx 0 0 0;
}
.feature-column:not(:last-child),
.feature-name:not(:last-child) {
border-bottom: 1rpx solid #f5f5f5;
}
.normal-access,
.normal-column {
border-bottom: 1rpx solid #f5f5f5;
}
</style>

View File

@ -0,0 +1,148 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '六纬VIP会员卡',
},
}
</route>
<template>
<view class="h-screen flex flex-col bg-[#f8f8f8]">
<view class="px-[32rpx]">
<image
src="@/pages-sub/static/images/ucenter/vip-back.png"
class="mt-[32rpx] h-[400rpx]"
mode="aspectFit"
/>
<view
class="flex flex-col rounded-[16rpx] bg-[#fff] mt-[30rpx] pt-[24rpx] pl-[18rpx] pr-[20rpx] pb-[32rpx]"
>
<view class="flex items-center gap-[16rpx]">
<view class="text-[32rpx] font-semibold">
<text class="text-[#303030]">六纬VIP</text>
<text class="text-[#784B0F]">会员权益</text>
</view>
<text class="text-[20rpx] text-[#636363]">服务截止2025.9.1</text>
</view>
<view class="text-[28rpx] font-semibold flex gap-[12rpx] mt-[16rpx]">
<view
class="flex flex-col items-center justify-center text-item gap-[16rpx] w-[208rpx] h-[124rpx] rounded-[16rpx]"
>
<view>
<text class="text-[#784B0F]">志愿</text>
<text>填报表</text>
</view>
<text>AI解读</text>
</view>
<view
class="flex flex-col items-center justify-center text-item gap-[16rpx] w-[208rpx] h-[124rpx] rounded-[16rpx]"
>
<view>
<text class="text-[#784B0F]">11项测评</text>
<text>报告</text>
</view>
<text>AI解读</text>
</view>
<view
class="flex flex-col items-center justify-center text-item gap-[16rpx] w-[208rpx] h-[124rpx] rounded-[16rpx]"
>
<view>
<text class="text-[#784B0F]">高考信息</text>
<text>资讯</text>
</view>
<text>AI咨询</text>
</view>
</view>
</view>
<VipTable class="mt-[40rpx]" />
</view>
<view
class="pb-safe bottom-0 left-0 mt-auto px-[32rpx] pt-[24rpx] bg-[#fff] text-[22rpx] flex flex-col gap-[16rpx] items-center"
>
<text class="text-[22rpx] text-[#303030]">生涯测评+志愿填报报告无限解读</text>
<button
class="custom-button-bg text-[#9D5800] text-[28rpx] font-semibold rounded-[8rpx] h-[80rpx]! w-full!"
@tap="handleOpenVip"
>
{{ productionList.price }} Vip会员
</button>
<view>
<text class="text-[#636363]">开通会员表示同意</text>
<text class="text-[#9D5800]">会员协议</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import VipTable from './components/VipTable.vue'
import { getProductionList, payTransaction } from '@/service/index/api'
import { useUserStore } from '@/store/user'
const userStore = useUserStore()
const productionList = ref({ price: 0, name: '' })
const handleOpenVip = () => {
payTransaction({
total: productionList.value.price * 100,
openId: userStore.userInfo.openid,
description: productionList.value.name,
}).then((res) => {
if (res.code === 200) {
requestPay(res.result)
} else {
uni.showToast({
title: res.message,
icon: 'none',
})
}
})
}
const requestPay = (res) => {
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.timeStamp,
orderInfo: '',
nonceStr: res.nonceStr, //32
package: res.package, //prepay_id prepay_id=xx
signType: res.signType, //MD5
paySign: res.paySign, //
success: (result) => {
uni.showToast({
title: '支付成功!',
icon: 'success',
})
uni.navigateBack()
},
fail: (error) => {
console.log(error)
},
})
}
onLoad(() => {
getProductionList({ Id: '653695577120837' }).then((res) => {
if (res.code === 200) {
productionList.value = res.result as { price: number; name: string }
}
})
})
</script>
<style scoped lang="scss">
.text-item {
background: linear-gradient(45deg, #fdf8ee 0%, #fff5dc 100%);
}
.custom-button-bg {
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(270deg, #f9e1b5 0%, #e4be80 100%);
}
</style>

View File

@ -0,0 +1,119 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '我的志愿表',
},
}
</route>
<template>
<scroll-view scroll-y class="pb-safe bg-[#f8f8f8]">
<view class="item-wrapper" v-for="(item, index) in wishList" :key="index">
<view class="flex gap-[24rpx] wish-border justify-between p-[32rpx] rounded-[8rpx]">
<view>
<view class="flex gap-[18rpx] items-center">
<text class="text-[#303030] text-[32rpx] font-semibold">{{ item.tableName }}</text>
<view
class="bg-[#F8F8F8] text-[20rpx] text-[#636363] px-[8rpx] py-[4rpx] rounded-[8rpx]"
>
{{ userStore.userInfo.estimatedAchievement.provinceName }}·{{ item.type }}
</view>
</view>
<view class="text-[22rpx] text-[#303030] mt-[14rpx] mb-[22rpx]">
<text>{{ item.score }}</text>
<text class="ml-[24rpx]">{{ item.subjectClaim.split(',').join('/') }}</text>
</view>
<text class="text-[22rpx] text-[#303030]">{{ item.createTime || '时间消失了' }}</text>
</view>
<view class="flex flex-col justify-between items-end">
<view class="i-carbon-trash-can" @click="handleDelete(item, index)"></view>
<button class="download-btn" @click="handleDownload(item)">PDF</button>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup lang="ts">
import { deleteWishList, getWishList } from '@/service/index/api'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const wishList = ref([])
onLoad(() => {
getWishList().then((res) => {
if (res.code === 200) {
wishList.value = res.result as any[]
}
})
})
const handleDelete = (item, index) => {
deleteWishList({ id: item.vId }).then((res) => {
if (res.code === 200) {
wishList.value.splice(index, 1)
uni.showToast({ title: '删除成功' })
}
})
}
const handleDownload = (item) => {
uni.downloadFile({
url: '',
success: function (res) {
console.log(res)
let filepathss = res.tempFilePath
setTimeout(
() =>
uni.openDocument({
filePath: filepathss,
showMenu: false,
success: function () {
console.log('打开文档成功')
uni.hideLoading()
},
fail: function () {
uni.showToast({
title: '暂不支持此类型',
duration: 2000,
icon: 'none',
})
uni.hideLoading()
},
}),
1000,
)
},
fail: function (res) {
console.log(res) //
},
})
}
</script>
<style lang="scss" scoped>
.download-btn {
border-radius: 8rpx;
border: 2rpx solid #1580ff;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
line-height: 1;
padding: 12rpx 16rpx;
height: max-content;
color: #1580ff;
}
.item-wrapper {
padding: 32rpx;
}
.wish-border {
background-color: #ffffff;
border-radius: 8rpx;
}
</style>

View File

@ -81,14 +81,17 @@
{
"path": "pages/ucenter/index/index",
"type": "page",
"style": {}
"style": {
"navigationStyle": "custom"
},
"needLogin": true
}
],
"preloadRule": {
"pages/home/index/index": {
"network": "all",
"packages": [
"__APP__"
"pages-evaluation-sub"
]
}
},
@ -252,6 +255,41 @@
"style": {
"navigationBarTitleText": "当前志愿表"
}
},
{
"path": "ucenter/appointment/appointment",
"type": "page",
"style": {
"navigationBarTitleText": "我的预约"
}
},
{
"path": "ucenter/evaluate/evaluateList",
"type": "page",
"style": {
"navigationBarTitleText": "测评结果"
}
},
{
"path": "ucenter/star/myStar",
"type": "page",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "ucenter/vip/openVip",
"type": "page",
"style": {
"navigationBarTitleText": "六纬VIP会员卡"
}
},
{
"path": "ucenter/wishList/wishList",
"type": "page",
"style": {
"navigationBarTitleText": "我的志愿表"
}
}
]
},

View File

@ -1,8 +1,242 @@
<route lang="json5" type="page">
{
style: {
navigationStyle: 'custom',
},
needLogin: true,
}
</route>
<template>
<view class="">用户信息</view>
<TabBar :current-page="4"></TabBar>
<view class="bg-[#F8F8F8] h-screen flex flex-col gap-[32rpx]">
<view class="background">
<Navbar safeAreaInsetTop bg-color="transparent" placeholder :bordered="false"></Navbar>
<view class="flex px-[32rpx] gap-[24rpx] custom-user-info">
<image
:src="userStore.userInfo.avatar"
class="w-[112rpx] h-[112rpx] rounded-full z-[1]"
mode="scaleToFill"
/>
<view class="flex flex-col gap-[6rpx] py-[8rpx] z-[1] text-white">
<text class="text-[32rpx] font-semibold">{{ userStore.userInfo.nickname }}</text>
<text class="text-[24rpx]">
{{ userStore.userInfo.estimatedAchievement.provinceName }}·{{
userStore.userInfo.estimatedAchievement.expectedScore
}}
{{ userStore.userInfo.estimatedAchievement.subjectGroup.split(',').join('/') }}
</text>
</view>
</view>
<view
class="absolute bottom-0 py-[16rpx] pl-[32rpx] pr-[24rpx] left-[50%] translate-x-[-50%] flex items-center w-max custom-vip-bg"
v-if="!userStore.userInfo.estimatedAchievement.isVIP"
>
<image
src="/static/images/ucenter/vip.png"
mode="scaleToFill"
class="w-[64rpx] h-[64rpx]"
/>
<view class="h-[32rpx] w-[1rpx] bg-[#fff] mx-[20rpx]"></view>
<text class="text-white text-[24rpx]">诸多分析特权免费查看</text>
<button
class="w-[136rpx]! h-[52rpx]! text-[#803D00]! text-[24rpx]! custom-button-bg font-normal flex! items-center! justify-center! rounded-[80rpx]! p-[0]! ml-[70rpx]!"
@click="goVip"
>
立即开通
</button>
</view>
<view class="diagonal-lines"></view>
</view>
<view
class="mx-[32rpx] flex items-center justify-center text-[#303030] text-[24rpx] bg-[#fff] pt-[24rpx] pb-[18rpx] gap-[144rpx] rounded-[8rpx]"
>
<view class="flex flex-col items-center gap-[16rpx]" @click="goWishList">
<image
src="@/pages-sub/static/images/ucenter/wish-list.png"
class="w-[51rpx] h-[51rpx]"
mode="scaleToFill"
/>
<text>志愿表</text>
</view>
<view class="flex flex-col items-center gap-[16rpx]" @click="goEvaluate">
<image
src="@/pages-sub/static/images/ucenter/evaluation-list.png"
class="w-[51rpx] h-[51rpx]"
mode="scaleToFill"
/>
<text>测评结果</text>
</view>
<view class="flex flex-col items-center gap-[16rpx]" @click="goStar">
<image
src="@/pages-sub/static/images/ucenter/star.png"
class="w-[51rpx] h-[51rpx]"
mode="scaleToFill"
/>
<text>收藏</text>
</view>
</view>
<view class="mx-[32rpx] bg-[#fff] rounded-[8rpx]">
<view
class="flex items-center justify-between mx-[32rpx] py-[28rpx] not-last-child"
@click="goAppointment"
>
<text>我的预约</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
<view class="flex items-center justify-between mx-[32rpx] py-[28rpx]">
<text>激活记录</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
</view>
<view class="mx-[32rpx] bg-[#fff] rounded-[8rpx]">
<view class="flex items-center justify-between mx-[32rpx] py-[28rpx] not-last-child">
<text>设置</text>
<view class="i-carbon-chevron-down rotate-270 text-[#BFBFBF]"></view>
</view>
</view>
<TabBar :current-page="4"></TabBar>
<FabButton :initial-x="0" :initial-y="100" />
</view>
</template>
<script lang="ts" setup>
import TabBar from '@/components/bar/TabBar.vue'
import Navbar from '@/components/navbar/Navbar.vue'
import FabButton from '@/components/fab/FabButton.vue'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const goVip = () => {
const { platform } = uni.getDeviceInfo()
switch (platform) {
case 'android':
uni.navigateTo({
url: '/pages-sub/ucenter/vip/openVip',
})
break
case 'ios':
uni.showModal({
title: 'iso系统暂不支持线上支付',
})
break
default:
uni.navigateTo({
url: '/pages-sub/ucenter/vip/openVip',
})
break
}
}
const goStar = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/star/myStar',
})
}
const goWishList = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/wishList/wishList',
})
}
const goEvaluate = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/evaluate/evaluateList',
})
}
const goAppointment = () => {
uni.navigateTo({
url: '/pages-sub/ucenter/appointment/appointment',
})
}
</script>
<style lang="scss" scoped>
.background {
position: relative;
width: 100%;
height: 420rpx;
overflow: hidden;
background: linear-gradient(135deg, #33ccff 0%, #3399ff 100%);
}
/* 左下角大圆 */
.background::before {
content: '';
position: absolute;
width: 400rpx;
height: 400rpx;
bottom: -200rpx;
left: -100rpx;
border-radius: 50%;
background-color: rgba(150, 230, 255, 0.4);
z-index: 0;
}
/* 左上角中等圆 */
.background::after {
content: '';
position: absolute;
width: 300rpx;
height: 300rpx;
top: -150rpx;
right: 40%;
border-radius: 50%;
background-color: rgba(150, 230, 255, 0.3);
}
/* 右上角斜线 */
.diagonal-lines {
position: absolute;
top: 30rpx;
right: 30rpx;
}
.diagonal-lines::before {
content: '';
position: absolute;
width: 120rpx;
height: 20rpx;
top: 70rpx;
right: -80rpx;
background-color: rgba(150, 230, 255, 0.5);
border-radius: 10rpx;
transform: rotate(-45deg);
}
.diagonal-lines::after {
content: '';
position: absolute;
width: 160rpx;
height: 30rpx;
top: 130rpx;
right: -80rpx;
background-color: rgba(150, 230, 255, 0.5);
border-radius: 20rpx;
transform: rotate(-45deg);
}
.custom-button-bg {
background: linear-gradient(135deg, #ffcd6c 0%, #fff6c5 100%);
}
.custom-vip-bg {
background: linear-gradient(135deg, #000000 0%, #525252 100%);
border-radius: 20rpx 20rpx 0 0;
}
.custom-user-info {
position: absolute;
bottom: 172rpx;
}
.not-last-child {
border-bottom: 2rpx solid #f5f5f5;
}
</style>

View File

@ -289,6 +289,7 @@ type WishListParams = {
type: string
subjectClaim: string
score: number
LocationCode: string
vTbDetails: {
unId: number
unName: string
@ -309,3 +310,19 @@ type WishListParams = {
export const saveWishList = (params: WishListParams) => {
return http.post('/api/volunTb/post', params)
}
export const getProductionList = (params: { Id: string }) => {
return http.get('/api/busProduct/detail', params)
}
export const payTransaction = (params: { total: number; openId: string; description: string }) => {
return http.post('/api/sysWechatPay/payTransaction', params)
}
export const getWishList = () => {
return http.get('/api/volunTb/list')
}
export const deleteWishList = (params: { id: number }) => {
return http.post('/api/volunTb/delete', params)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View File

@ -29,6 +29,11 @@ interface NavigateToOptions {
"/pages-sub/home/schoolRank/index" |
"/pages-sub/home/wishesList/index" |
"/pages-sub/home/wishesList/wishesList" |
"/pages-sub/ucenter/appointment/appointment" |
"/pages-sub/ucenter/evaluate/evaluateList" |
"/pages-sub/ucenter/star/myStar" |
"/pages-sub/ucenter/vip/openVip" |
"/pages-sub/ucenter/wishList/wishList" |
"/login-sub/index" |
"/pages-evaluation-sub/index" |
"/pages-evaluation-sub/aiAutoFill/index" |

View File

@ -1,6 +0,0 @@
// 枚举定义
export enum TestEnum {
A = '1',
B = '2',
}

View File

@ -1,8 +1,5 @@
import { CustomRequestOptions } from '@/interceptors/request'
import { staticBaseUrl, baseUrl } from '@/utils/index'
import { useUserStore } from '@/store'
const userStore = useUserStore()
export const http = <T>(options: CustomRequestOptions) => {
// 1. 返回 Promise 对象

View File

@ -34,7 +34,8 @@
"src/**/*.tsx",
"src/**/*.jsx",
"src/**/*.vue",
"src/**/*.json"
"src/**/*.json",
"src/pages-sub/components/canvas/html2canvas.min.js"
],
"files": ["src/pages-evaluation-sub/uni_modules/lime-echart/static/echarts.min.js"]
}