Compare commits
2 Commits
master
...
share-code
| Author | SHA1 | Date |
|---|---|---|
|
|
648a7f2e48 | |
|
|
1fe7977a92 |
|
|
@ -5,23 +5,23 @@ VITE_UNI_APPID = 'H57F2ACE4'
|
|||
# VITE_WX_APPID = 'wxc48ad15d58a3e417' 六纬中考通
|
||||
# VITE_WX_APPID = 'wx4b925e36c17dd54a' 智能中专学校的
|
||||
# wx487ac749c0e10be5 深泉外国语的
|
||||
VITE_WX_APPID = 'wxc48ad15d58a3e417'
|
||||
VITE_WX_APPID = 'wx4b925e36c17dd54a'
|
||||
# VITE_WX_VIDEO_ID= 'sphju9MCfZetYHP' 智能中专学校的
|
||||
# VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4' 深泉外国语
|
||||
VITE_WX_VIDEO_ID= 'spht0MPpWjxEKb4'
|
||||
VITE_WX_VIDEO_ID= 'sphju9MCfZetYHP'
|
||||
|
||||
# 微信小程序 AI
|
||||
# 智能中专学校的
|
||||
# VITE_CLOUD_ENV_ID= 'cloud1-d3g5q6bq61a240786',
|
||||
# VITE_CLOUD_BOT_ID= 'agent-wxai-4gl75um61026324f',
|
||||
VITE_CLOUD_ENV_ID= 'cloud1-d3g5q6bq61a240786',
|
||||
VITE_CLOUD_BOT_ID= 'agent-wxai-4gl75um61026324f',
|
||||
|
||||
# 深泉外国语学院的
|
||||
# VITE_CLOUD_ENV_ID='cloud1-d9g4odcaqf6a2114f'
|
||||
# VITE_CLOUD_BOT_ID='agent-wxai-9gi3rts96061202f'
|
||||
|
||||
# 六纬中考通
|
||||
VITE_CLOUD_ENV_ID='cloud1-d3g5q6bq61a240786'
|
||||
VITE_CLOUD_BOT_ID='agent-wxai-4gl75um61026324f'
|
||||
# VITE_CLOUD_ENV_ID='cloud1-d3g5q6bq61a240786'
|
||||
# VITE_CLOUD_BOT_ID='agent-wxai-4gl75um61026324f'
|
||||
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
# https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { tabBar } from './src/tabbar/config'
|
|||
export default defineUniPages({
|
||||
globalStyle: {
|
||||
navigationStyle: 'default',
|
||||
navigationBarTitleText: '六纬中考通',
|
||||
navigationBarTitleText: '深泉分享助手',
|
||||
navigationBarBackgroundColor: '#FFFFFF',
|
||||
navigationBarTextStyle: 'black',
|
||||
backgroundColor: '#FFFFFF',
|
||||
|
|
@ -25,9 +25,9 @@ export default defineUniPages({
|
|||
// tabbar 的配置统一在 “./src/tabbar/config.ts” 文件中
|
||||
tabBar: tabBar as any,
|
||||
preloadRule: {
|
||||
'pages/index/index': {
|
||||
'pages/evaluation/index': {
|
||||
network: 'all',
|
||||
packages: ['chart-sub', 'pages-ai'],
|
||||
packages: ['chart-sub'],
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<button
|
||||
form-type="submit"
|
||||
class="mx-auto mt-[60rpx] h-[88rpx] w-[480rpx] rounded-[12rpx] border-none bg-[#1580FF] text-[32rpx] text-[#fff] font-500 active:bg-[#1580FF] disabled:bg-[#A9D0FF]"
|
||||
class="mx-auto mt-[60rpx] h-[88rpx] w-[480rpx] flex items-center justify-center rounded-[12rpx] border-none bg-[#1580FF] text-[32rpx] text-[#fff] font-500 active:bg-[#1580FF] disabled:bg-[#A9D0FF]"
|
||||
:disabled="!canSubmit || loading"
|
||||
:loading="loading"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const inviteStore = useInviteStore()
|
|||
const referralCode = inviteStore.currentPromoter?.referralCode
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
title: '六纬中考通',
|
||||
title: '深泉分享助手',
|
||||
path: `/pages-sub/invite/jump?referralCode=${referralCode}`,
|
||||
imageUrl: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/yaoqingzhibotu.png',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,11 @@
|
|||
<template>
|
||||
<view class="custom-background flex flex-col pb-safe">
|
||||
<view>
|
||||
<sar-navbar :fixed="true" fixation-style="top:unset;"
|
||||
:root-style="{ '--sar-navbar-bg': `rgba(255, 255, 255, ${opacity})`, '--sar-navbar-height': `${systemInfo?.statusBarHeight + 44}px` }">
|
||||
<template #title>
|
||||
<view class="text-[32rpx] font-500" :style="{ 'padding-top': `${systemInfo?.statusBarHeight}px` }">
|
||||
志愿填报
|
||||
</view>
|
||||
</template>
|
||||
</sar-navbar>
|
||||
</view>
|
||||
<view class="px-[32rpx] mt-[30rpx]">
|
||||
<EvaluationItem :item="value"
|
||||
v-for="value in evaluationList" :key="value.id" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getEvaluationList } from '@/service/requestApi'
|
||||
import { systemInfo } from '@/utils/systemInfo'
|
||||
import EvaluationItem from './components/EvaluationItem.vue'
|
||||
import {getEvaluationList} from "@/service/requestApi"
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
definePage({
|
||||
type: 'home',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
|
|
@ -32,6 +14,7 @@ definePage({
|
|||
|
||||
// #ifndef MP-WEIXIN
|
||||
definePage({
|
||||
type: 'home',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
transparentTitle: 'always',
|
||||
|
|
@ -46,20 +29,72 @@ onPageScroll((e) => {
|
|||
opacity.value = Math.min(scrollTop / 100, 1)
|
||||
})
|
||||
|
||||
const evaluationList = ref<{name:string,minImg:string,id:number}[]>([])
|
||||
const evaluationList = ref<{ name: string, minImg: string, id: number }[]>([])
|
||||
|
||||
onLoad(() => {
|
||||
getEvaluationList({query:{menuid:'340509778657349'}}).then(resp => {
|
||||
if(resp.code === 200){
|
||||
getEvaluationList({ query: { menuid: '340509778657349' } }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
evaluationList.value = resp.result
|
||||
}
|
||||
})
|
||||
|
||||
const updateManager = uni.getUpdateManager()
|
||||
updateManager.onCheckForUpdate((res) => {
|
||||
// 请求完新版本信息的回调
|
||||
if (res.hasUpdate) {
|
||||
uni.showToast({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,将进行更新',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
updateManager.onUpdateReady(() => {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
updateManager.onUpdateFailed(() => {
|
||||
// 新版本下载失败
|
||||
uni.showToast({
|
||||
title: '更新失败',
|
||||
icon: 'none',
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="custom-background flex flex-col pb-safe">
|
||||
<view>
|
||||
<sar-navbar
|
||||
:fixed="true" fixation-style="top:unset;"
|
||||
:root-style="{ '--sar-navbar-bg': `rgba(255, 255, 255, ${opacity})`, '--sar-navbar-height': `${systemInfo?.statusBarHeight + 44}px` }"
|
||||
>
|
||||
<template #title>
|
||||
<view class="text-[32rpx] font-500" :style="{ 'padding-top': `${systemInfo?.statusBarHeight}px` }">
|
||||
志愿填报
|
||||
</view>
|
||||
</template>
|
||||
</sar-navbar>
|
||||
</view>
|
||||
<view class="mt-[30rpx] px-[32rpx]">
|
||||
<EvaluationItem v-for="value in evaluationList" :key="value.id" :item="value" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.custom-background {
|
||||
background: linear-gradient(180deg, #ecf2ff 0%,#f6f8ff 40rpx, #fff 128rpx);
|
||||
background: linear-gradient(180deg, #ecf2ff 0%, #f6f8ff 40rpx, #fff 128rpx);
|
||||
background-position: 50% 50%;
|
||||
background-origin: padding-box;
|
||||
background-clip: border-box;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ defineOptions({
|
|||
|
||||
// #ifdef MP-WEIXIN
|
||||
definePage({
|
||||
type: 'home',
|
||||
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
|
|
@ -19,7 +19,6 @@ definePage({
|
|||
|
||||
// #ifndef MP-WEIXIN
|
||||
definePage({
|
||||
type: 'home',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
transparentTitle: 'always',
|
||||
|
|
@ -30,7 +29,7 @@ definePage({
|
|||
|
||||
const tokenStore = useTokenStore()
|
||||
const wechatVideoId = import.meta.env.VITE_WX_VIDEO_ID || ''
|
||||
const { channelVideoList, getChannelLiveNoticeInfo, handleChannelVideoAction,goToLiveHomePage } = useChannelLive(wechatVideoId)
|
||||
const { channelVideoList, getChannelLiveNoticeInfo, handleChannelVideoAction, goToLiveHomePage } = useChannelLive(wechatVideoId)
|
||||
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
|
|
@ -126,18 +125,17 @@ onLoad(() => {
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
function goToLiveHomePageZZ(){
|
||||
uni.openChannelsUserProfile({
|
||||
finderUserName:'sphju9MCfZetYHP',
|
||||
success: () => {
|
||||
console.log('跳转视频号主页成功')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('跳转视频号主页失败:', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
function goToLiveHomePageZZ() {
|
||||
uni.openChannelsUserProfile({
|
||||
finderUserName: 'sphju9MCfZetYHP',
|
||||
success: () => {
|
||||
console.log('跳转视频号主页成功')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('跳转视频号主页失败:', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getTopNew({ query: { Top: 3 } }).then((resp) => {
|
||||
|
|
@ -296,7 +294,7 @@ onShow(() => {
|
|||
</view>
|
||||
|
||||
<scroll-view scroll-x class="w-full">
|
||||
<view class="w-full flex gap-[30rpx] whitespace-nowrap" v-if="channelVideoList.length > 0">
|
||||
<view v-if="channelVideoList.length > 0" class="w-full flex gap-[30rpx] whitespace-nowrap">
|
||||
<view
|
||||
v-for="item in channelVideoList"
|
||||
:key="item.id"
|
||||
|
|
@ -336,7 +334,7 @@ onShow(() => {
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-[20rpx] mt-[20rpx] text-[34rpx] text-[#333] font-500 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
<view class="mx-[20rpx] mt-[20rpx] overflow-hidden text-ellipsis whitespace-nowrap text-[34rpx] text-[#333] font-500">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
|
||||
|
|
@ -349,14 +347,14 @@ onShow(() => {
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-full grid grid-cols-2 items-center justify-center gap-[24rpx]" v-if="channelVideoList.length === 0">
|
||||
<view class="w-full h-[400rpx]" @click="goToLiveHomePage()">
|
||||
<view v-if="channelVideoList.length === 0" class="grid grid-cols-2 w-full items-center justify-center gap-[24rpx]">
|
||||
<view class="h-[400rpx] w-full" @click="goToLiveHomePage()">
|
||||
<image
|
||||
src="https://lw-zk.oss-cn-hangzhou.aliyuncs.com/img/home/zhibo_banner1.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="w-full h-[400rpx]" @click="goToLiveHomePageZZ()">
|
||||
<view class="h-[400rpx] w-full" @click="goToLiveHomePageZZ()">
|
||||
<image
|
||||
src="https://lw-zk.oss-cn-hangzhou.aliyuncs.com/img/home/zhibo_banner2.png"
|
||||
mode="scaleToFill"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import { storeToRefs } from 'pinia'
|
||||
|
||||
import { useUserStore } from '@/store'
|
||||
import { useTokenStore } from '@/store/token'
|
||||
import { safeAreaInsets, systemInfo } from '@/utils/systemInfo'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
|
|
@ -26,16 +25,14 @@ definePage({
|
|||
// #endif
|
||||
|
||||
const userStore = useUserStore()
|
||||
const tokenStore = useTokenStore()
|
||||
// 使用storeToRefs解构userInfo
|
||||
const { userInfo } = storeToRefs(userStore)
|
||||
|
||||
const topMenuList = [{ name: '我的志愿表', img: 'https://lwzk.ycymedu.com/img/qt/wd_biao.png', url: '/pages-sub/me/wishlist' }, { name: '我的测评', img: 'https://lwzk.ycymedu.com/img/qt/wd_cp.png', url: '/pages-sub/me/evaluation' }]
|
||||
const bottomMenuList = [
|
||||
{ name: '收藏院校', img: 'https://lwzk.ycymedu.com/img/qt/wd_shoucang.png', url: '/pages-sub/me/starSchool' },
|
||||
{ name: '联系客服', img: 'https://lwzk.ycymedu.com/img/qt/wd_kefu.png', url: '/pages-sub/about/onlineCustom' },
|
||||
|
||||
{ name: '我的测评', img: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/liebian_wd_baogao.png', url: '/pages-sub/me/evaluation' },
|
||||
{ name: '直播码注册', img: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/wd_liebian.png', url: '/pages-sub/invite/login' },
|
||||
{ name: '关于我们', img: 'https://lwzk.ycymedu.com/img/qt/wd_guanyu.png', url: '/pages-sub/about/about' },
|
||||
// { name: '直播码注册', img: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/wd_liebian.png', url: '/pages-sub/invite/login' },
|
||||
]
|
||||
|
||||
function navigateToUrl(url: string) {
|
||||
|
|
@ -89,18 +86,6 @@ function navigateToUserInfo() {
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="grid grid-cols-2 items-center justify-between gap-[28rpx] px-[30rpx]">
|
||||
<view
|
||||
v-for="(value, index) in topMenuList"
|
||||
:key="index" class="flex items-center border-[2rpx] border-white rounded-[20rpx] border-solid bg-[#E4EEFF] px-[50rpx] py-[44rpx]" @click="navigateToUrl(value.url)"
|
||||
>
|
||||
<view class="mr-[10rpx] h-[48rpx] w-[48rpx]">
|
||||
<image :src="value.img" mode="scaleToFill" class="h-[48rpx] w-[48rpx]" />
|
||||
</view>
|
||||
<view>{{ value.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-[30rpx] mt-[30rpx] rounded-[20rpx] bg-white px-[30rpx] pt-[30rpx]">
|
||||
<view class="text-[34rpx] font-500">
|
||||
其他功能
|
||||
|
|
|
|||
|
|
@ -26,18 +26,6 @@ type NativeTabBarItem = TabBar['list'][number]
|
|||
|
||||
// TODO: 2/3. 使用 NATIVE_TABBAR 时,更新下面的 tabbar 配置
|
||||
export const nativeTabbarList: NativeTabBarItem[] = [
|
||||
{
|
||||
iconPath: 'static/tabbar/home.png',
|
||||
selectedIconPath: 'static/tabbar/home-active.png',
|
||||
pagePath: 'pages/index/index',
|
||||
text: '首页',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/talented.png',
|
||||
selectedIconPath: 'static/tabbar/talented-active.png',
|
||||
pagePath: 'pages/talented/index',
|
||||
text: '个性化',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/evaluation.png',
|
||||
selectedIconPath: 'static/tabbar/evaluation-active.png',
|
||||
|
|
@ -68,40 +56,7 @@ export interface CustomTabBarItem {
|
|||
// TODO: 3/3. 使用 CUSTOM_TABBAR(2,3) 时,更新下面的 tabbar 配置
|
||||
// 如果需要配置鼓包,需要在 'tabbar/store.ts' 里面设置,最后在 `tabbar/index.vue` 里面更改鼓包的图片
|
||||
export const customTabbarList: CustomTabBarItem[] = [
|
||||
{
|
||||
text: '首页',
|
||||
pagePath: 'pages/index/index',
|
||||
// 注意 unocss 图标需要如下处理:(二选一)
|
||||
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
||||
// 2)配置到 unocss.config.ts 的 safelist 中
|
||||
iconType: 'image',
|
||||
icon: '/static/tabbar/home.png',
|
||||
iconActive: '/static/tabbar/home-active.png',
|
||||
// badge: 'dot',
|
||||
},
|
||||
{
|
||||
text: '个性化',
|
||||
pagePath: 'pages/talented/index',
|
||||
// 注意 unocss 图标需要如下处理:(二选一)
|
||||
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
||||
// 2)配置到 unocss.config.ts 的 safelist 中
|
||||
iconType: 'image',
|
||||
icon: '/static/tabbar/talented.png',
|
||||
iconActive: '/static/tabbar/talented-active.png',
|
||||
// badge: 'dot',
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
pagePath: 'pages-ai/ai/index',
|
||||
// 注意 unocss 图标需要如下处理:(二选一)
|
||||
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
||||
// 2)配置到 unocss.config.ts 的 safelist 中
|
||||
iconType: 'image',
|
||||
icon: '/static/tabbar/ai.png',
|
||||
iconActive: '/static/tabbar/ai.png',
|
||||
openType: 'navigateTo',
|
||||
// badge: 'dot',
|
||||
},
|
||||
|
||||
{
|
||||
text: '测评',
|
||||
pagePath: 'pages/evaluation/index',
|
||||
|
|
|
|||
|
|
@ -122,9 +122,9 @@ export function getEnvBaseUrl() {
|
|||
// https://liebian.ycymedu.com 智能中专学校的
|
||||
// https://xqwgy.ycymedu.com/ 深泉外国语学院
|
||||
// # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。
|
||||
const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'https://senior.ycymedu.com'
|
||||
const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'https://senior.ycymedu.com'
|
||||
const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'https://senior.ycymedu.com'
|
||||
const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'https://liebian.ycymedu.com'
|
||||
const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'https://liebian.ycymedu.com'
|
||||
const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'https://liebian.ycymedu.com'
|
||||
|
||||
// 微信小程序端环境区分
|
||||
if (isMpWeixin) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue