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

refactor: 升级到 nuxt4

上级 5e49528d
No preview for this file type
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
# .env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
# Nuxt dev/build outputs
.output
.data
.nuxt
# Nuxt generate
.nitro
.cache
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Node dependencies
node_modules
# Service worker
sw.*
# Logs
logs
*.log
# macOS
# Misc
.DS_Store
.fleet
.idea
# Vim swap files
*.swp
# Local env files
.env
.env.*
!.env.example
{
"i18n-ally.localesPaths": ["langs"]
"i18n-ally.localesPaths": ["langs"],
"cSpell.words": ["Marywood"]
}
# new-node-ezijing
# Nuxt Minimal Starter
## Build Setup
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
## Setup
Make sure to install dependencies:
```bash
# install dependencies
$ npm install
# npm
npm install
# serve with hot reload at localhost:3000
$ npm run dev
# pnpm
pnpm install
# build for production and launch server
$ npm run build
$ npm run start
# yarn
yarn install
# generate static project
$ npm run generate
# bun
bun install
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
## Development Server
Start the development server on `http://localhost:3000`:
```bash
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
```
## Production
Build the application for production:
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
```
Locally preview production build:
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
import httpRequest from '@/utils/httpRequest'
const projectId = process.env.projectId
// 使用 composable 获取 projectId
const getProjectId = () => {
const config = useRuntimeConfig()
return config.public.projectId
}
/**
* 获取用户信息
......@@ -41,14 +45,16 @@ export function checkCode(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' }
headers: { 'Content-Type': 'application/json' },
})
}
......@@ -56,6 +62,7 @@ export function updateApplication(data) {
* 获取报名审核状态
*/
export function getApplicationStatus() {
const projectId = getProjectId()
return httpRequest.get(`/api/enrollment/v1.0/application-materials/profile/${projectId}`)
}
......@@ -63,6 +70,7 @@ export function getApplicationStatus() {
* 获取支付二维码
*/
export function getOrder(params) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/request/${projectId}/APPLICATION_FEE`,
{ params }
......@@ -73,6 +81,7 @@ export function getOrder(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 }
......@@ -83,11 +92,12 @@ export function checkPay(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' }
headers: { 'Content-Type': 'application/json' },
}
)
}
......@@ -96,11 +106,12 @@ export function addLetter(userId, letterId, data) {
* 更换推荐人
*/
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' }
headers: { 'Content-Type': 'application/json' },
}
)
}
......@@ -108,6 +119,7 @@ export function updateProvider(letterId, data) {
* 再次邀请
*/
export function sendToProvider(letterId) {
const projectId = getProjectId()
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-provider/${projectId}/${letterId}`
)
......@@ -123,6 +135,7 @@ export function 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 } }
......@@ -155,6 +168,6 @@ export function getSignDocument(params) {
*/
export function postNes(obj) {
return httpRequest.post('/new-app/v1.0/applications', obj, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
})
}
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
<head>
<meta name="baidu-site-verification" content="code-DUTex50XOJ" />
{{ HEAD }}
</head>
<body {{ BODY_ATTRS }}>
{{ APP }}
<script>
var _hmt = _hmt || []
;(function() {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?d07ebd7fc0b0319273df23497cf520d2'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
</script>
</body>
</html>
<template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
export default function(_this) {
return [
{
name: _this.$t('menu.aboutChild.about'),
path: '/about/introduce'
},
{
name: _this.$t('menu.aboutChild.culture'),
path: '/about/culture'
},
{
name: _this.$t('menu.aboutChild.news'),
path: '/about/news'
},
// {
// name: _this.$t('menu.aboutChild.msg'),
// path: '/about/message'
// },
{
name: _this.$t('menu.aboutChild.openLesson'),
path: '/about/lesson'
},
{
name: _this.$t('menu.aboutChild.contact'),
path: '/about/contact'
}
]
}
export default function(_this) {
return [
{
name: _this.$t('menu.alumniChild.alumni'),
path: '/alumnus'
},
{
name: _this.$t('menu.alumniChild.alumniZijinghua'),
path: '/alumnus/zijinghua'
},
{
name: _this.$t('menu.alumniChild.alumniStory'),
path: '/alumnus/story'
}
// {
// name: _this.$t('menu.alumniChild.roadmap'),
// path: '/roadmap'
// }
]
}
html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
......@@ -36,139 +48,7 @@ table {
img {
vertical-align: middle;
}
/* 独立 特殊修改 */
/* 进度条 原始背景色 加深 */
.el-progress-bar__outer {
background-color: #e5e5e5 !important;
}
.el-progress-bar__innerText {
color: #313131;
}
.el-progress-bar {
margin-right: -65px;
padding-right: 65px;
}
.el-progress__text {
margin-left: 6px;
}
/* 学分 页面 - 进度条样式 */
.el-progress-bar__outer {
border-radius: 0;
}
.el-progress-bar__inner {
border-radius: 0;
}
/* 富文本 */
.course-assess .detail .b1 {
display: block;
max-width: 5rem;
margin: 0.2rem auto;
width: 100%;
height: auto;
}
.course-assess .detail .h1 {
font-size: 0.16rem;
font-weight: 700;
color: #313131;
line-height: 0.38rem;
}
.course-assess .detail .h2 {
font-size: 0.14rem;
font-weight: 700;
color: #313131;
line-height: 0.3rem;
}
.course-assess .detail .p {
font-size: 0.14rem;
color: #313131;
line-height: 1.5;
text-align: justify;
}
.course-assess .detail .em {
font-size: 0.12rem;
color: #b49441;
line-height: 1.5;
text-align: justify;
}
/* 富文本 */
.discuss-scroll .item-list .text p {
margin: 0;
padding: 0;
}
/* 富文本 */
.discuss-detail-scroll .ques .text p {
margin: 0;
padding: 0;
}
.discuss-detail-scroll .ask .text p {
margin: 0;
padding: 0;
}
/* 公共标题 - 样式 */
.con-title {
padding: 0 30px;
font-size: 16px;
line-height: 45px;
border-bottom: 1px solid #c9c9c9;
}
/* 公共盒子 - 样式 */
.con-box {
margin: 0.3rem;
padding: 0.3rem 0.3rem 0.15rem 0.3rem;
background: #ffffff;
overflow: hidden;
position: relative;
}
/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
html {
font-size: 80px;
}
.con-box {
margin: 0.2rem 0;
padding: 0.2rem;
}
}
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
html {
font-size: 80px;
}
.step3 {
width: 80%;
}
.con-box {
margin: 0.2rem 0;
padding: 0.2rem;
}
}
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
html {
font-size: 80px;
}
}
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
html {
font-size: 90px;
}
}
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
html {
font-size: 100px;
}
}
a {
color: currentColor;
}
......
export default [
{
name: '最新动态',
path: '/internationalDegree/news'
},
{
name: '常见问题',
path: '/internationalDegree/qa'
}
]
import { Message } from 'element-ui'
import { ElMessage } from 'element-plus'
export const roadMapList = [
{
project_name: '项目名称:',
......@@ -41,7 +41,7 @@ export const roadMapList = [
tenant: '',
name: '国际大一(1+3)即将推出',
onClick() {
Message('即将推出')
ElMessage('即将推出')
},
},
],
......@@ -166,7 +166,7 @@ export const homeMapList = [
name: '高管培训-数字创新管理',
onClick() {
Message('敬请期待')
ElMessage('敬请期待')
},
},
{
......
export default function(_this) {
return [
{
name: _this.$t('menu.college.tit1'),
path: '/services/college'
},
{
name: _this.$t('menu.college.tit2'),
path: '/services/college/project'
},
{
name: _this.$t('menu.college.tit3'),
path: '/services/college/case'
}
]
}
export default [
{
name: '最新动态',
path: '/studyAbroad/news'
}
// {
// name: '常见问题',
// path: '/studyAbroad/qa'
// }
]
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论