@ -0,0 +1,4 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
||||
not ie 11
|
@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
},
|
||||
'extends': [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended'
|
||||
],
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser'
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
// 'vue/multi-word-component-names':'off',
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
@ -0,0 +1,24 @@
|
||||
# demo
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "demo",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.7.7",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.8.6",
|
||||
"vite": "^5.4.10",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"unplugin-auto-import": "^0.18.3",
|
||||
"unplugin-vue-components": "^0.27.4"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
|
||||
<router-view/>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style>
|
||||
/* 让页面铺满整个屏幕,不出现滚动条 */
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,147 @@
|
||||
.base{
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: url("@/assets/pictures/background.png");
|
||||
background-size: 100%;
|
||||
}
|
||||
.loginAndRegist{
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
right:6%;
|
||||
top:35%;
|
||||
|
||||
|
||||
}
|
||||
.loginArea{
|
||||
background-color: rgba(255,255,255,0.8);
|
||||
opacity: 0.8;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
height: 400px;
|
||||
width: 400px;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.registArea{
|
||||
opacity: 0.8;
|
||||
border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
height: 400px;
|
||||
width: 400px;
|
||||
background-color: rgba(255,255,255,0.8);
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content:center ;
|
||||
align-items: center;
|
||||
}
|
||||
.showInfo{
|
||||
border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
position: absolute;
|
||||
height: 400px;
|
||||
width: 400px;
|
||||
z-index:2;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-image: url("@/assets/pictures/welcome.png");
|
||||
background-size: 90%;
|
||||
}
|
||||
.showInfo:hover{
|
||||
background-size: 100%;
|
||||
background-position: -50px -50px;
|
||||
}
|
||||
.title{
|
||||
width: 80%;
|
||||
flex:1;
|
||||
border-bottom: 1px solid #E44B9D;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #E44B9D;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
#aaa{
|
||||
transition: 0.3s linear;
|
||||
}
|
||||
.pwdArea{
|
||||
width: 100%;
|
||||
flex:2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #E44B9D;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.pwdArea input{
|
||||
height: 30px;
|
||||
border-radius:15px ;
|
||||
padding-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
/* 移除输入框边框 */
|
||||
.el-input__inner {
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.pwdArea input:focus{
|
||||
border: 2px solid #E44B9D;
|
||||
}
|
||||
.btnArea{
|
||||
flex:1;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
}
|
||||
.rigestTitle{
|
||||
width: 70%;
|
||||
flex: 1;
|
||||
color: #E44B9D;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #E44B9D;
|
||||
}
|
||||
.registForm{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #E44B9D;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.registForm input{
|
||||
outline: none;
|
||||
height: 30px;
|
||||
border-radius:13px ;
|
||||
padding-left: 10px;
|
||||
font-size: 12px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
.registForm input:focus{
|
||||
border: 2px solid #E44B9D;
|
||||
}
|
||||
#elselect:focus{
|
||||
border: 2px solid #E44B9D;
|
||||
}
|
||||
.registBtn{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 294 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 761 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 196 KiB |
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div class="comment-input">
|
||||
<textarea v-model="commentText" placeholder="输入评论..." rows="3"></textarea>
|
||||
<button @click="submitComment">发布评论</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
commentText: '', // 存储用户输入的评论
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitComment() {
|
||||
if (this.commentText.trim()) {
|
||||
this.$emit('submitComment', this.commentText); // 向父组件传递评论文本
|
||||
this.commentText = ''; // 清空输入框
|
||||
this.$emit('updateLikeCount', this.likeCount + 1);
|
||||
} else {
|
||||
alert("评论不能为空!");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.comment-input {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
textarea {
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
button {
|
||||
align-self: flex-end;
|
||||
padding: 8px 15px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
|
||||
|
||||
<div class="main-content">
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style>
|
||||
.main-content {
|
||||
/* 设置背景为渐变色 */
|
||||
|
||||
background:
|
||||
url('@/assests/pictures/backtree.png') no-repeat center center,linear-gradient(to bottom, rgba(252, 220, 215, 1) 0%, rgba(252, 220, 215, 1) 5%, rgba(255, 249, 161, 1) 25%, rgba(255, 249, 161, 1) 100%);
|
||||
box-sizing: border-box; /* 使内边距计算在总高度内 */
|
||||
|
||||
background-size:auto 90% 60%;
|
||||
background-position: center; /* 使背景图居中 */
|
||||
height: 100vh; /* 使主界面高度占满整个视口 */
|
||||
padding: 20px; /* 添加一些内边距 */
|
||||
box-sizing: border-box; /* 使内边距计算在总高度内 */
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
export default
|
||||
{
|
||||
name: 'BackGround', // 添加组件名称
|
||||
// 其他组件选项
|
||||
}
|
||||
</script>
|
@ -0,0 +1,14 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
|
||||
const app = createApp(App)
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
app.use(ElementPlus)
|
||||
app.use(router)
|
||||
app.mount('#app')
|
@ -0,0 +1,50 @@
|
||||
import login from '@/views/login/login.vue'
|
||||
import main from '../views/Main.vue'
|
||||
import recommend from '@/views/recommend/index.vue'
|
||||
import community from '@/views/community/trends.vue'
|
||||
import chat from '@/views/chat/chat.vue'
|
||||
import space from '@/views/space/space.vue'
|
||||
|
||||
|
||||
import {createRouter ,createWebHashHistory} from 'vue-router'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path : '/',
|
||||
|
||||
component : login
|
||||
},
|
||||
{
|
||||
path:'/main',
|
||||
component : main,
|
||||
children:[
|
||||
{
|
||||
path:'recommend',
|
||||
component: recommend
|
||||
},
|
||||
{
|
||||
path:'community',
|
||||
component: community
|
||||
},
|
||||
{
|
||||
path:'chat',
|
||||
component: chat
|
||||
},
|
||||
{
|
||||
path:'space',
|
||||
component: space
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
routes,
|
||||
history:createWebHashHistory()
|
||||
})
|
||||
|
||||
export default router
|
@ -0,0 +1,18 @@
|
||||
// 存储、获取、删除token的文件
|
||||
// 定义 setToken 函数,用于将 token 存储到 localStorage
|
||||
export function setToken(token) {
|
||||
localStorage.setItem('authToken', token);
|
||||
}
|
||||
|
||||
// 定义 getToken 函数,用于从 localStorage 获取 token
|
||||
export function getToken() {
|
||||
return localStorage.getItem('authToken');
|
||||
}
|
||||
|
||||
// 定义 removeToken 函数,用于从 localStorage 删除 token
|
||||
export function removeToken() {
|
||||
localStorage.removeItem('authToken');
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
|
||||
<heade/>
|
||||
<div>
|
||||
<RouterView />
|
||||
</div>
|
||||
|
||||
<router-view/>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import heade from '../components/header.vue'
|
||||
// import background from '../components/background.vue'
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'MainView', // 添加组件名称
|
||||
// 其他组件选项
|
||||
}
|
||||
</script>
|
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
智能推荐
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'RecommendIndex', // 添加组件名称
|
||||
// 其他组件选项
|
||||
}
|
||||
</script>
|
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
个人空间
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'spaceIndex', // 添加组件名称
|
||||
// 其他组件选项
|
||||
}
|
||||
</script>
|
@ -0,0 +1,4 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|