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

chore: update

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