提交 e708550a authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 2590def1
......@@ -5,56 +5,63 @@ export function getAdvertisementList(params) {
return httpRequest.get('/api/cms/api/v1/advertisements', { params })
}
// 获取新闻列表
export function getNewsList(params) {
return httpRequest.get(`/api/zws/v1/cms/news`, { params })
/**
* 获取文章列表
*/
export function getArticleList(params) {
return httpRequest.get('/api/cms/api/v1/articles', { params })
}
/**
* 获取图文列表
*/
export function getImgTextList(params) {
return httpRequest.get('/api/cms/api/v1/img-text', { params })
}
// 获取新闻详情
export function getNewsDetails(params) {
return httpRequest.get(`/api/zws/v1/cms/new`, { params })
// 提交留咨信息
export function submitApplicationForm(data) {
return httpRequest.post('/api/enrollment/v1.0/applications', data)
}
/**
* 发送验证码
* 获取用户信息
*/
export function sendCode(data) {
return httpRequest.post('/api/usercenter/user/send-code', data, {
headers: { 'Content-Type': 'multipart/form-data' },
})
export function getUser(params = { learning_info: 1 }) {
return httpRequest.get('/api/usercenter/v2/frontend/user/get-user-info', { params })
}
/**
* 检验验证码
* 修改用户信息
*/
export function checkCode(params) {
return httpRequest.get('/api/usercenter/user/check-code', { params })
export function updateUser(data) {
return httpRequest.post('/api/usercenter/user/update-user', data)
}
/**
* 提交留咨信息
* 修改密码
*/
export function postNes(data) {
return httpRequest.post('/api/enrollment/v1.0/applications', data, {
headers: { 'Content-Type': 'multipart/form-data' },
})
export function updatePassword(data) {
return httpRequest.post('/api/usercenter/user/update-pwd', data)
}
/**
* 获取文章列表
* 发送验证码
*/
export function getArticleList(params) {
return httpRequest.get('/api/cms/api/v1/articles', { params })
export function sendCode(data) {
return httpRequest.post('/api/usercenter/user/send-code', data)
}
/**
* 获取图文列表
* 检验验证码
*/
export function getImgTextList(params) {
return httpRequest.get('/api/cms/api/v1/img-text', { params })
export function checkCode(params) {
return httpRequest.get('/api/usercenter/user/check-code', { params })
}
// 提交留咨信息
export function submitApplicationForm(data) {
return httpRequest.post('/api/enrollment/v1.0/applications', data)
/**
* 退出登录
*/
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
}
import httpRequest from '@/utils/httpRequest'
// 使用 composable 获取 projectId
const getProjectId = () => {
const config = useRuntimeConfig()
return config.public.projectId
}
/**
* 获取用户信息
*/
export function getUser(params = { learning_info: 1 }) {
return httpRequest.get('/api/usercenter/v2/frontend/user/get-user-info', { params })
}
/**
* 修改用户信息
*/
export function updateUser(data) {
return httpRequest.post('/api/usercenter/user/update-user', data)
}
/**
* 修改密码
*/
export function updatePassword(data) {
return httpRequest.post('/api/usercenter/user/update-pwd', data)
}
/**
* 发送验证码
*/
export function sendCode(data) {
return httpRequest.post('/api/usercenter/user/send-code', data)
}
/**
* 检验验证码
*/
export function checkCode(params) {
return httpRequest.get('/api/usercenter/user/check-code', { params })
}
/**
* 获取报名信息
*/
export function getApplication(params) {
const projectId = getProjectId()
return httpRequest.get(`/api/enrollment/v1.0/application-materials/${projectId}`, { params })
}
/**
* 获取报名信息
*/
export function updateApplication(data) {
const projectId = getProjectId()
return httpRequest.post(`/api/enrollment/v1.0/application-materials/${projectId}/put`, data, {
headers: { 'Content-Type': 'application/json' },
})
}
/**
* 获取报名审核状态
*/
export function getApplicationStatus() {
const projectId = getProjectId()
return httpRequest.get(`/api/enrollment/v1.0/application-materials/profile/${projectId}`)
}
/**
* 获取支付二维码
*/
export function getOrder(params) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/request/${projectId}/APPLICATION_FEE`,
{ params }
)
}
/**
* 检查支付状态
*/
export function checkPay(id, params) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/check-status/${projectId}/APPLICATION_FEE/${id}`,
{ params }
)
}
/**
* 写推荐信
*/
export function addLetter(userId, letterId, data) {
const projectId = getProjectId()
return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/submit/${projectId}/${userId}/${letterId}/put`,
data,
{
headers: { 'Content-Type': 'application/json' },
}
)
}
/**
* 更换推荐人
*/
export function updateProvider(letterId, data) {
const projectId = getProjectId()
return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/change-provider/${projectId}/${letterId}/put`,
data,
{
headers: { 'Content-Type': 'application/json' },
}
)
}
/**
* 再次邀请
*/
export function sendToProvider(letterId) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-provider/${projectId}/${letterId}`
)
}
/**
* 退出登录
*/
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
}
/**
* 更改附件状态
*/
export function changeFileStatus(userId, recordId, status) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/attachments/change-status/${projectId}/${userId}/${recordId}`,
{ params: { status } }
)
}
/**
* 修改用户信息
*/
export function getOpenId(data) {
return httpRequest.post('/api/usercenter/v1/wechat/get-openid', data)
}
/**
* 签名
*/
export function createSign(data) {
return httpRequest.post('/api/usercenter/v1/sign/sign', data)
}
/**
* 获取签名文档
*/
export function getSignDocument(params) {
return httpRequest.get('/api/usercenter/v1/sign/document', { params })
}
/**
* 提交留咨信息
*/
export function postNes(obj) {
return httpRequest.post('/new-app/v1.0/applications', obj, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
})
}
......@@ -7,7 +7,7 @@ const items = [
href: '/#school',
items: [
{
name: 'AI教学基础',
name: 'AI教学基础设施',
href: '/ai',
},
{
......
......@@ -2,10 +2,14 @@
import { Search } from '@element-plus/icons-vue'
import IconPhone from './icons/IconPhone.vue'
import { useStore } from '@/composables/useStore'
const { visibleAppDownloadPopup } = useStore()
const { visibleAppDownloadPopup, user, isLogin, learningLink, fetchUser } = useStore()
const { locale, setLocale } = useI18n()
const runtimeConfig = useRuntimeConfig()
onMounted(() => {
fetchUser()
})
const showDownloadPopup = () => {
visibleAppDownloadPopup.value = true
}
......@@ -18,15 +22,15 @@ const navList = ref([
{
name: 'AI教学基础设施',
items: [
{ name: '人工智能基础:数据分析通识课', href: '/bi' },
{ name: '人工智能应用通识课', href: '/ai' },
{ name: '人工智能基础:数据分析实践通识课', href: '/bi' },
{ name: '人工智能应用实践通识课', href: '/ai' },
{ name: '数字教材', href: '/book' },
{ name: '个性化智能学习平台', href: 'https://saas-learn.ezijing.com/' },
{ name: '紫荆e-SaaS', href: 'https://e-saas.ezijing.com/' },
],
},
{
name: 'AI专业建设',
name: 'AI+专业建设',
items: [
{
name: '新工科',
......@@ -232,8 +236,14 @@ const onDropdownLeave = () => {
<span class="slogan">让每个人都有改变的能力</span>
</div>
<div class="user-section">
<a href="javascript:;" class="login-btn" @click="handleLogin">登录/学习空间</a>
<a href="javascript:;" class="register-btn" @click="handleRegister">注册</a>
<template v-if="isLogin">
<p>欢迎,{{ user.realname || user.nickname || user.username }}</p>
<NuxtLink :to="learningLink" target="_blank" class="login-btn">登录/学习空间</NuxtLink>
</template>
<template v-else>
<a href="javascript:;" class="login-btn" @click="handleLogin">登录/学习空间</a>
<a href="javascript:;" class="register-btn" @click="handleRegister">注册</a>
</template>
<span class="lang-switch" @click="toggleLocale">
{{ locale === 'zh' ? '中文' : 'EN' }} / {{ locale === 'zh' ? 'EN' : '中文' }}
</span>
......@@ -364,6 +374,9 @@ const onDropdownLeave = () => {
display: flex;
align-items: center;
gap: 20px;
p {
color: #fff;
}
}
.login-btn {
......
......@@ -2,7 +2,7 @@
<div class="app-right-aside">
<ul>
<li>
<div class="text hover-text">售前<br />咨询</div>
<div class="text hover-text">报名<br />咨询</div>
<div class="hover">
<div class="enroll_cont">
<h5>{{ t('aside.apply') }}</h5>
......@@ -88,7 +88,7 @@
</template>
<script setup>
import { sendCode, checkCode, postNes } from '@/api/index'
import { sendCode, checkCode, submitApplicationForm } from '@/api/index'
import { useStore } from '@/composables/useStore'
const { visibleAppDownloadPopup } = useStore()
......@@ -247,7 +247,7 @@ const enrollQuery = async () => {
}
try {
const res = await postNes(params)
const res = await submitApplicationForm(params)
if (res && res.status === 200 && res.error === 0) {
return {
type: 'enroll',
......
......@@ -97,7 +97,7 @@
<script setup>
import { ElMessage } from 'element-plus'
import { postNes } from '@/api/index'
import { submitApplicationForm } from '@/api/index'
const props = defineProps({
type: { type: Number, default: 1 },
......@@ -173,7 +173,7 @@ const handleSubmit = () => {
if (params.project_id === '9999') {
params.project_id = '1016'
}
postNes(params)
submitApplicationForm(params)
.then((res) => {
if (res && res.status === 200 && res.error === 0) {
ElMessage.success('报名提交成功')
......
......@@ -41,7 +41,7 @@ const swiperOption = {
}
const data = [
{ web_img_uri: 'https://webapp-pub.ezijing.com/www/pc/next/banner1.jpg' },
{ web_img_uri: 'https://webapp-pub.ezijing.com/www/pc/next/banner2.jpg?v=1' },
{ web_img_uri: 'https://webapp-pub.ezijing.com/www/pc/next/banner2.jpg?v=2' },
{ web_img_uri: 'https://webapp-pub.ezijing.com/www/pc/next/banner3.jpg' },
]
// 使用 useAsyncData 进行服务端渲染
......
......@@ -68,22 +68,22 @@ const items = ref([
{
name: '人工智能通识应用',
href: 'https://eec.ezijing.com/AI',
items: [{ name: '零基础AI工具课' }, { name: '学ChatGPT等工具职场实操' }, { name: '适配全行业提效职员' }],
// items: [{ name: '零基础AI工具课' }, { name: '学ChatGPT等工具职场实操' }, { name: '适配全行业提效职员' }],
},
{
name: '智能数据分析与实战应用',
href: 'https://eec.ezijing.com/product',
items: [{ name: '数据可视化实操课' }, { name: 'Python/Tableau+真实案例' }, { name: '适配市场/运营/财务岗' }],
// items: [{ name: '数据可视化实操课' }, { name: 'Python/Tableau+真实案例' }, { name: '适配市场/运营/财务岗' }],
},
{
name: '智能数据营销与实战应用',
href: 'https://eec.ezijing.com/',
items: [{ name: 'AI营销升级课' }, { name: '智能画像+平台投放' }, { name: '适配营销/新媒体从业者' }],
// items: [{ name: 'AI营销升级课' }, { name: '智能画像+平台投放' }, { name: '适配营销/新媒体从业者' }],
},
{
name: '私人财富风险管理课程',
href: 'https://prp.ezijing.com/',
items: [{ name: '资产风控课' }, { name: '风险识别+避险策略' }, { name: '适配高净值人群/理财顾问' }],
// items: [{ name: '资产风控课' }, { name: '风险识别+避险策略' }, { name: '适配高净值人群/理财顾问' }],
},
],
moreText: '了解更多职业技能',
......@@ -91,7 +91,7 @@ const items = ref([
},
{
name: '就业服务',
items: [{ name: '1V1定制化' }, { name: '全程辅导' }, { name: '内推面试' }, { name: '内推入职' }],
items: [{ name: '高端1V1' }, { name: '企业内推' }, { name: '企业直签' }],
moreText: '了解更多就业服务',
moreHref: '/job',
},
......@@ -154,7 +154,7 @@ const colList = computed(() => {
</dd>
</dl>
</div>
<div class="box3" v-if="index === 2">
<div class="box3" v-if="index === 2 || index === 3">
<dl v-for="source in item.items" :key="source.name">
<dt>
<a :href="source.href" target="_blank">{{ source.name }}</a>
......@@ -168,7 +168,7 @@ const colList = computed(() => {
</dd>
</dl>
</div>
<div class="box4" v-if="index === 3">
<!-- <div class="box4" v-if="index === 3">
<h4>8步就业辅导体系覆盖求职全流程</h4>
<p>精准解决核心问题,为求职者提供科学、高效的就业支持</p>
<div class="ul-box">
......@@ -185,7 +185,7 @@ const colList = computed(() => {
<li>8. 试用期辅导</li>
</ul>
</div>
</div>
</div> -->
<div class="more">
<a :href="item.moreHref" target="_blank"
>{{ item.moreText }}
......@@ -387,7 +387,7 @@ const colList = computed(() => {
}
.box3 {
margin-top: -20px;
margin-top: 60px;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px 0;
......
......@@ -119,8 +119,8 @@ const rows = [
{
className: 'home-school-box-ai',
btns: [
{ name: '人工智能基础:数据分析通识课', href: '/bi' },
{ name: '人工智能应用通识课', href: '/ai' },
{ name: '人工智能基础:数据分析实践通识课', href: '/bi' },
{ name: '人工智能应用实践通识课', href: '/ai' },
{ name: '数字教材', href: '/book' },
{ name: '个性化智能学习平台', href: 'https://saas-learn.ezijing.com/', tips: '即将上线,敬请期待' },
{ name: '紫荆e-SaaS', href: 'https://e-saas.ezijing.com/' },
......
const store = reactive({
visibleAppDownloadPopup: false,
});
import { getUser } from '~/api'
export const useStore = () => {
return toRefs(store);
}
\ No newline at end of file
const visibleAppDownloadPopup = useState<boolean>('visibleAppDownloadPopup', () => false)
const user = useState<any>('user', () => null)
const isFetchingUser = useState<boolean>('isFetchingUser', () => false)
const isLogin = computed(() => !!user.value)
const fetchUser = async () => {
// 如果已经有用户数据,或者正在抓取中,则直接返回
if (user.value || isFetchingUser.value) return
isFetchingUser.value = true
try {
const res = await getUser()
user.value = res.data
} catch (error) {
user.value = null
} finally {
isFetchingUser.value = false
}
}
const tenantMap: Record<string, string> = {
sofia: 'https://sofia-learning.ezijing.com/',
kelley: 'https://kelley-learning.ezijing.com/',
gm: 'https://gm-learning.ezijing.com/',
seg: 'https://seg-learning.ezijing.com/',
campbellsville: 'https://campbellsville-learning.ezijing.com/',
ciis: 'https://ciis-learning.ezijing.com/',
marywood: 'https://marywood-learning.ezijing.com/',
cuw: 'https://cuw-learning.ezijing.com/',
}
const learningLink = computed(() => {
if (!user.value) return 'javascript:;'
const tenant = user.value?.learning_info[0]?.tenant || 'ezijing'
return tenantMap[tenant] || 'javascript:;'
})
return { visibleAppDownloadPopup, user, isLogin, fetchUser, learningLink }
}
export const useUser = () => {}
......@@ -19,7 +19,7 @@ const tabList = [
<div class="bi-page">
<div class="banner">
<div class="banner-inner">
<h1>人工智能基础:数据分析通识课</h1>
<h1>人工智能基础:数据分析实践通识课</h1>
<span class="line"></span>
<h2>“一体两翼”式设计AI+数据分析能力建设</h2>
<p>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论