Browse Source

新项目创建

master
yuanshun 1 year ago
commit
4f6a4c69fc
  1. 24
      .gitignore
  2. 3
      .vscode/extensions.json
  3. 31
      README.md
  4. 13
      index.html
  5. 1406
      package-lock.json
  6. 26
      package.json
  7. 1
      public/vite.svg
  8. 10
      src/App.vue
  9. 0
      src/api/contract.ts
  10. 0
      src/api/message.ts
  11. 0
      src/api/my.ts
  12. 0
      src/api/talent.ts
  13. 0
      src/api/task.ts
  14. 28
      src/api/user.ts
  15. 0
      src/assets/css/style.css
  16. BIN
      src/assets/img/icon/bar-contract-active.png
  17. BIN
      src/assets/img/icon/bar-contract-link.png
  18. BIN
      src/assets/img/icon/bar-message-active.png
  19. BIN
      src/assets/img/icon/bar-message-link.png
  20. BIN
      src/assets/img/icon/bar-my-active.png
  21. BIN
      src/assets/img/icon/bar-my-link.png
  22. BIN
      src/assets/img/icon/bar-talent-active.png
  23. BIN
      src/assets/img/icon/bar-talent-link.png
  24. BIN
      src/assets/img/icon/bar-task-active.png
  25. BIN
      src/assets/img/icon/bar-task-link.png
  26. BIN
      src/assets/img/icon/icon-file.png
  27. BIN
      src/assets/img/icon/icon-message.png
  28. BIN
      src/assets/img/icon/icon-no-data.png
  29. BIN
      src/assets/img/icon/icon-phone.png
  30. BIN
      src/assets/img/icon/icon-place.png
  31. BIN
      src/assets/img/icon/icon-remind.png
  32. BIN
      src/assets/img/icon/icon-search.png
  33. 93
      src/components/FooterTabbar.vue
  34. 0
      src/components/list/ContractList.vue
  35. 0
      src/components/list/TalentList.vue
  36. 36
      src/components/list/TaskList.vue
  37. 0
      src/components/list/message.vue
  38. 19
      src/main.ts
  39. 144
      src/router/index.ts
  40. 4
      src/store/index.ts
  41. 79
      src/style.css
  42. 14
      src/utils/rem.ts
  43. 39
      src/utils/request.ts
  44. 0
      src/view/contract/details.vue
  45. 0
      src/view/contract/index.vue
  46. 0
      src/view/contract/progress.vue
  47. 11
      src/view/login/index.vue
  48. 0
      src/view/login/privacyPolicy.vue
  49. 0
      src/view/login/serviceAgree.vue
  50. 0
      src/view/message/index.vue
  51. 0
      src/view/message/systemDetails.vue
  52. 0
      src/view/message/systemList.vue
  53. 0
      src/view/message/talk.vue
  54. 0
      src/view/my/account/advance.vue
  55. 0
      src/view/my/account/coinExplain.vue
  56. 0
      src/view/my/account/depositExplain.vue
  57. 0
      src/view/my/account/index.vue
  58. 0
      src/view/my/collect/index.vue
  59. 0
      src/view/my/feedback/index.vue
  60. 0
      src/view/my/index.vue
  61. 0
      src/view/my/resume/index.vue
  62. 0
      src/view/my/resume/preview.vue
  63. 0
      src/view/my/set/index.vue
  64. 0
      src/view/my/user/authReal.vue
  65. 0
      src/view/my/user/certified.vue
  66. 0
      src/view/my/user/identitySwitch.vue
  67. 0
      src/view/my/user/index.vue
  68. 0
      src/view/talent/details.vue
  69. 0
      src/view/talent/index.vue
  70. 0
      src/view/task/companySource.vue
  71. 0
      src/view/task/details.vue
  72. 11
      src/view/task/index.vue
  73. 0
      src/view/task/search.vue
  74. 1
      src/vite-env.d.ts
  75. 30
      tsconfig.json
  76. 10
      tsconfig.node.json
  77. 21
      vite.config.ts

24
.gitignore

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

3
.vscode/extensions.json

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}

31
README.md

@ -0,0 +1,31 @@
# Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support For `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
# 项目界面结构
views
1.login
inde.vue //登录页
serviceAgree //服务协议
privacyPolicy.vue //隐私政策
task
contract
message
my
talent

13
index.html

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

1406
package-lock.json
File diff suppressed because it is too large
View File

26
package.json

@ -0,0 +1,26 @@
{
"name": "vite-vue3-ts",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@vueuse/core": "^10.7.0",
"axios": "^1.6.2",
"pinia": "^2.1.7",
"vant": "^4.8.1",
"vue": "^3.3.11",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@vitejs/plugin-vue": "^4.5.2",
"typescript": "^5.2.2",
"vite": "^5.0.8",
"vue-tsc": "^1.8.25"
}
}

1
public/vite.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

10
src/App.vue

@ -0,0 +1,10 @@
<script setup lang="ts">
</script>
<template>
<router-view></router-view>
</template>
<style scoped>
</style>

0
src/api/contract.ts

0
src/api/message.ts

0
src/api/my.ts

0
src/api/talent.ts

0
src/api/task.ts

28
src/api/user.ts

@ -0,0 +1,28 @@
import request from "../utils/request";
//登录接口
export function login(data: any) {
return request({
url: '/login',
method: 'post',
data
})
}
//验证码
export function getCode(data:any) {
return request({
url: '/login/code',
method: 'post',
data
})
}
//协议文件
export function getPolicy(data:any) {
return request({
url: '/policy_protocol/list',
method: 'get',
params:data
})
}

0
src/assets/css/style.css

BIN
src/assets/img/icon/bar-contract-active.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 3.0 KiB

BIN
src/assets/img/icon/bar-contract-link.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 3.1 KiB

BIN
src/assets/img/icon/bar-message-active.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.1 KiB

BIN
src/assets/img/icon/bar-message-link.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.0 KiB

BIN
src/assets/img/icon/bar-my-active.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.2 KiB

BIN
src/assets/img/icon/bar-my-link.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.1 KiB

BIN
src/assets/img/icon/bar-talent-active.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 4.5 KiB

BIN
src/assets/img/icon/bar-talent-link.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 4.8 KiB

BIN
src/assets/img/icon/bar-task-active.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.6 KiB

BIN
src/assets/img/icon/bar-task-link.png

Binary file not shown.

After

Width: 88  |  Height: 88  |  Size: 2.4 KiB

BIN
src/assets/img/icon/icon-file.png

Binary file not shown.

After

Width: 68  |  Height: 68  |  Size: 2.0 KiB

BIN
src/assets/img/icon/icon-message.png

Binary file not shown.

After

Width: 198  |  Height: 196  |  Size: 10 KiB

BIN
src/assets/img/icon/icon-no-data.png

Binary file not shown.

After

Width: 336  |  Height: 215  |  Size: 36 KiB

BIN
src/assets/img/icon/icon-phone.png

Binary file not shown.

After

Width: 76  |  Height: 76  |  Size: 1.2 KiB

BIN
src/assets/img/icon/icon-place.png

Binary file not shown.

After

Width: 78  |  Height: 76  |  Size: 3.7 KiB

BIN
src/assets/img/icon/icon-remind.png

Binary file not shown.

After

Width: 98  |  Height: 96  |  Size: 4.3 KiB

BIN
src/assets/img/icon/icon-search.png

Binary file not shown.

After

Width: 68  |  Height: 68  |  Size: 2.2 KiB

93
src/components/FooterTabbar.vue

@ -0,0 +1,93 @@
<template>
<div class="FooterBar">
<div class="FooterBar-item" :class="route.path=='/task'?'active':''" @click="gotoPage('/task')">
<i class="icon_task"></i>
<p>任务</p>
</div>
<div class="FooterBar-item" :class="route.path=='/contract'?'active':''" @click="gotoPage('/contract')">
<i class="icon_contract"></i>
<p>合约</p>
</div>
<div class="FooterBar-item" :class="route.path=='/message'?'active':''" @click="gotoPage('/message')">
<i class="icon_message"></i>
<p>消息</p>
</div>
<div class="FooterBar-item" :class="route.path=='/my'?'active':''" @click="gotoPage('/my')">
<i class="icon_my"></i>
<p>我的</p>
</div>
</div>
</template>
<script setup lang="ts">
import { useRoute,useRouter } from "vue-router";
const route=useRoute()
const router=useRouter()
const gotoPage=(path:any)=>{
router.push(path)
}
</script>
<style scoped>
.FooterBar{
width:100%;
display:flex;
height:3rem;
position:fixed;
bottom:0px;
left:0px;
border-top:1px solid #dddddd;
}
.FooterBar-item{
flex:1;
padding:0.69rem 0;
justify-content:center;
text-align:center;
font-size:0.59rem;
font-family:PingFang SC;
font-weight:400;
color:#666666;
}
.FooterBar-item i{
width: 0.91rem;
height: 0.91rem;
display: block;
margin: 0 auto;
}
.icon_task{
background: url('../assets//img/icon/bar-task-link.png');
background-size: 100%;
}
.icon_task:hover{
background: url('../assets//img/icon/bar-task-active.png');
background-size: 100%;
}
.icon_contract{
background: url('../assets//img/icon/bar-contract-link.png');
background-size: 100%;
}
.icon_contract:hover{
background: url('../assets//img/icon/bar-contract-active.png');
background-size: 100%;
}
.icon_message{
background: url('../assets//img/icon/bar-message-link.png');
background-size: 100%;
}
.icon_message:hover{
background: url('../assets//img/icon/bar-message-active.png');
background-size: 100%;
}
.icon_my{
background: url('../assets//img/icon/bar-my-link.png');
background-size: 100%;
}
.icon_my:hover{
background: url('../assets//img/icon/bar-my-link.png');
background-size: 100%;
}
.active p{
color: #ff9415;
}
</style>

0
src/components/list/ContractList.vue

0
src/components/list/TalentList.vue

36
src/components/list/TaskList.vue

@ -0,0 +1,36 @@
<template>
<div class="task-item">
<div class="task-item-top">
<h3>移动端小程序前端开发</h3>
<span>紧急</span>
</div>
<dl>
<dt>
<h5>任务预算</h5>
<strong>1000</strong>
</dt>
<dt>
<h5>任务周期</h5>
<strong>90</strong>
</dt>
<dt>
<h5>服务方式</h5>
<strong>驻场</strong>
</dt>
</dl>
<p></p>
<div class="task-item-bottom">
<label></label>
<span><van-icon name=""/></span>
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";
const router=useRouter()
const gotoPage=(path:any)=>{
router.push(path)
}
</script>
<style scoped>
</style>

0
src/components/list/message.vue

19
src/main.ts

@ -0,0 +1,19 @@
import { createApp } from 'vue'
import "./assets/css/style.css";
import 'vant/lib/index.css'
import App from './App.vue'
import store from "./store/index.ts";
import router from "./router";
import './utils/rem.ts'
import { Button,NavBar,Tabbar,TabbarItem,Checkbox,Toast,Icon } from "vant";
const app = createApp(App)
app.use(Button)
app.use(NavBar)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Checkbox)
app.use(Toast)
app.use(Icon)
app.use(store)
app.use(router)
app.mount('#app')

144
src/router/index.ts

@ -0,0 +1,144 @@
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
const routes: Array<RouteRecordRaw> = [
//login
{
path: '/login',
component: () => import('@/view/login/index.vue')
},
{
path: '/login/privacyPolicy',
component: () => import('@/view/login/privacyPolicy.vue')
},
{
path: '/login/serviceAgree',
component: () => import('@/view/login/serviceAgree.vue')
},
//task
{
path: '/task',
component: () => import('@/view/task/index.vue')
},
{
path: '/task/search',
component: () => import('@/view/task/search.vue')
},
{
path: '/task/details/:id',
component: () => import('@/view/task/details.vue')
},
{
path: '/task/companySource/:id',
component: () => import('@/view/task/companySource.vue')
},
//contract
{
path: '/contract',
component: () => import('@/view/contract/index.vue')
},
{
path: '/contract/details',
component: () => import('@/view/contract/details.vue')
},
{
path: '/contract/progress',
component: () => import('@/view/contract/progress.vue')
},
//message
{
path: '/message',
component: () => import('@/view/message/index.vue')
},
{
path: '/message/systemList',
component: () => import('@/view/message/systemList.vue')
},
{
path: '/message/systemDetails/:id',
component: () => import('@/view/message/systemDetails.vue')
},
{
path: '/message/talk/:id',
component: () => import('@/view/message/talk.vue')
},
//my
{
path: '/my',
component: () => import('@/view/my/index.vue')
},
//my //user
{
path: '/my/user',
component: () => import('@/view/my/user/index.vue')
},
{
path: '/my/user/certified',
component: () => import('@/view/my/user/certified.vue')
},
{
path: '/my/user/identitySwitch',
component: () => import('@/view/my/user/identitySwitch.vue')
},
{
path: '/my/user/authReal',
component: () => import('@/view/my/user/authReal.vue')
},
// /my/set
{
path: '/my/set',
component: () => import('@/view/my/set/index.vue')
},
// /my/feedback
{
path: '/my/feedback',
component: () => import('@/view/my/feedback/index.vue')
},
// /my/account
{
path: '/my/account',
component: () => import('@/view/my/account/index.vue')
},
{
path: '/my/account/advance',
component: () => import('@/view/my/account/advance.vue')
},
{
path: '/my/account/coinExplain',
component: () => import('@/view/my/account/coinExplain.vue')
},
{
path: '/my/account/depositExplain',
component: () => import('@/view/my/account/depositExplain.vue')
},
// /my/resume
{
path: '/my/resume',
component: () => import('@/view/my/resume/index.vue')
},
{
path: '/my/resume/preview',
component: () => import('@/view/my/resume/preview.vue')
},
// /my/collect
{
path: '/my/collect',
component: () => import('@/view/my/collect/index.vue')
},
// /talent
{
path: '/talent',
component: () => import('@/view/talent/index.vue')
},
{
path: '/talent/details',
component: () => import('@/view/talent/details.vue')
},
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
export default router

4
src/store/index.ts

@ -0,0 +1,4 @@
import { createPinia } from "pinia";
const store = createPinia
export default store

79
src/style.css

@ -0,0 +1,79 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

14
src/utils/rem.ts

@ -0,0 +1,14 @@
//定义大小
const baseSize = 37.5
function setRem() {
const scale = document.documentElement.clientWidth / 750
document.documentElement.style.fontSize=baseSize*Math.min(scale,1)+'px'
}
setRem()
window.onresize = function () {
setRem()
}
export default baseSize

39
src/utils/request.ts

@ -0,0 +1,39 @@
import axios from "axios";
import { showToast } from 'vant';
let baseURL = "/api"
const service = axios.create({
baseURL,
timeout:10000
})
service.interceptors.request.use(
config=>{
const token = window.localStorage.getItem('token')
if (token) {
config.params = {
'token':token
}
}
return config
},
error =>Promise.reject(error)
)
//相应拦截器
service.interceptors.response.use(
response => {
const res = response.data
if (response.status != 200) {
return Promise.reject(new Error(res.message || 'Error'))
} else {
if (res.code == 200) {
return res.result
} else {
showToast(res.success)
return null
}
}
},
error => {
return Promise.reject(error)
}
)
export default service

0
src/view/contract/details.vue

0
src/view/contract/index.vue

0
src/view/contract/progress.vue

11
src/view/login/index.vue

@ -0,0 +1,11 @@
<template>
<div>
登录页
</div>
</template>
<script setup lang="ts">
</script>
<style lang="" scoped>
</style>

0
src/view/login/privacyPolicy.vue

0
src/view/login/serviceAgree.vue

0
src/view/message/index.vue

0
src/view/message/systemDetails.vue

0
src/view/message/systemList.vue

0
src/view/message/talk.vue

0
src/view/my/account/advance.vue

0
src/view/my/account/coinExplain.vue

0
src/view/my/account/depositExplain.vue

0
src/view/my/account/index.vue

0
src/view/my/collect/index.vue

0
src/view/my/feedback/index.vue

0
src/view/my/index.vue

0
src/view/my/resume/index.vue

0
src/view/my/resume/preview.vue

0
src/view/my/set/index.vue

0
src/view/my/user/authReal.vue

0
src/view/my/user/certified.vue

0
src/view/my/user/identitySwitch.vue

0
src/view/my/user/index.vue

0
src/view/talent/details.vue

0
src/view/talent/index.vue

0
src/view/task/companySource.vue

0
src/view/task/details.vue

11
src/view/task/index.vue

@ -0,0 +1,11 @@
<script setup lang="ts">
import FooterTabbar from '@/components/FooterTabbar.vue'
</script>
<template>
<div>
<FooterTabbar></FooterTabbar>
</div>
</template>
<style scoped>
</style>

0
src/view/task/search.vue

1
src/vite-env.d.ts

@ -0,0 +1 @@
/// <reference types="vite/client" />

30
tsconfig.json

@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@":["./src"],
"@/*":["./src/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}

10
tsconfig.node.json

@ -0,0 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

21
vite.config.ts

@ -0,0 +1,21 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@':path.resolve(__dirname,'./src')
}
},
server: {
port: 8002,
open:true,
proxy: {
'/api': 'https//api.imooc.zcwytd.com'
},
cors:true
}
})
Loading…
Cancel
Save