Compare commits
No commits in common. 'main' and 'master' have entirely different histories.
@ -1,3 +0,0 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
@ -1,23 +0,0 @@
|
||||
.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?
|
@ -1,21 +0,0 @@
|
||||
# chathome
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
# LOVEGET
|
||||
|
@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, declarative_base
|
||||
|
||||
# 数据库连接字符串
|
||||
SQLALCHEMY_DATABASE_URL = "mysql+pymysql://root:mypassword12@127.0.0.1:3306/lianai"
|
||||
|
||||
# 创建数据库引擎
|
||||
engine = create_engine(SQLALCHEMY_DATABASE_URL)
|
||||
|
||||
# 创建会话本地类
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
# 声明基类
|
||||
Base = declarative_base()
|
@ -1,70 +0,0 @@
|
||||
from fastapi import FastAPI, Depends, HTTPException, Request
|
||||
from database import engine, SessionLocal
|
||||
from models import User
|
||||
from sqlalchemy.orm import Session
|
||||
import uvicorn
|
||||
from models import User
|
||||
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# 创建所有表
|
||||
User.metadata.create_all(bind=engine)
|
||||
|
||||
# 依赖注入:获取数据库会话
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
@app.post("/login")
|
||||
async def login(request: Request, db: Session = Depends(get_db)):
|
||||
user_data =await request.json()
|
||||
print(user_data)
|
||||
user=db.query(User).filter(User.username==user_data['username']).first()
|
||||
if user:
|
||||
if user.password==user_data['password']:
|
||||
return {"code":200,"msg":"登录成功"}
|
||||
else:
|
||||
return {"code":400,"msg":"密码错误"}
|
||||
return {"code":501,"msg":"账号不存在"}
|
||||
|
||||
@app.post("/register")
|
||||
async def register(request: Request, db: Session = Depends(get_db)):
|
||||
user_data =await request.json()
|
||||
users=db.query(User).filter(User.username==user_data['username']).first()
|
||||
if users:
|
||||
return {"code":501,"msg":"账号已存在"}
|
||||
else:
|
||||
new_user=User(username=user_data['username'],password=user_data['password'])
|
||||
db.add(new_user)
|
||||
db.commit()
|
||||
db.refresh(new_user)
|
||||
print(new_user)
|
||||
return {"code":200,"msg":"注册成功"}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 运行fastapi程序
|
||||
uvicorn.run(app="main:app", host="127.0.0.1", port=8000, reload=True)
|
@ -1,11 +0,0 @@
|
||||
from sqlalchemy import Column, Integer, String
|
||||
from database import Base
|
||||
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
username = Column(String(30),index=True,primary_key=True)
|
||||
password = Column(String(100), index=True,nullable=False)
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>666</title>
|
||||
<style type="text/css">
|
||||
.div1{
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
overflow-y: scroll;
|
||||
margin: auto;
|
||||
border: 1px solid red;
|
||||
}
|
||||
.div2{
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="div1">
|
||||
666
|
||||
</div>
|
||||
|
||||
<button type="button" id="btn">添加</button>
|
||||
|
||||
<script type="text/javascript">
|
||||
var div1 = document.querySelector('.div1');
|
||||
var btn = document.querySelector('#btn');
|
||||
btn.addEventListener('click',function(){
|
||||
console.log('66')
|
||||
var k = div1.innerHTML;
|
||||
div1.innerHTML = k+"<br/>66";
|
||||
|
||||
div1.scrollTop = div1.scrollHeight;
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "chathome",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.3.1",
|
||||
"core-js": "^3.8.3",
|
||||
"element-ui": "^2.15.12",
|
||||
"mockjs": "^1.1.0",
|
||||
"sass": "^1.56.2",
|
||||
"sass-loader": "^13.2.0",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.2 KiB |
@ -1,28 +0,0 @@
|
||||
<!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>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</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>
|
@ -1,40 +0,0 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<Home></Home>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Home from './view/home.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
Home
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import url(./assets/font/iconfont.css);
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-style: normal;
|
||||
font-size: 25px;
|
||||
vertical-align: middle;
|
||||
color: rgb(117,120,137);
|
||||
transition: .3s;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#app {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
</style>
|
@ -1,41 +0,0 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<Home></Home>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Home from './view/home.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
Home,
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import url(./assets/font/iconfont.css);
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-style: normal;
|
||||
font-size: 25px;
|
||||
vertical-align: middle;
|
||||
color: rgb(117,120,137);
|
||||
transition: .3s;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#app {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
</style>
|
@ -1,21 +0,0 @@
|
||||
import base from './index'
|
||||
let axios = base.axios
|
||||
let baseUrl = base.baseUrl
|
||||
|
||||
// 获取好友
|
||||
export const getFriend = params => {
|
||||
return axios({
|
||||
method: 'post',
|
||||
baseURL: `${baseUrl}/friend/friendList`,
|
||||
data: params
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 获取聊天信息
|
||||
export const getChatMsg = params => {
|
||||
return axios({
|
||||
method: 'post',
|
||||
baseURL: `${baseUrl}/friend/chatMsg`,
|
||||
data: params
|
||||
}).then(res => res.data)
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
import axios from 'axios'
|
||||
|
||||
//全局参数,自定义参数可在发送请求时设置
|
||||
axios.defaults.timeout = 300000000 //超时时间ms
|
||||
axios.defaults.withCredentials = true
|
||||
// 请求时的拦截
|
||||
//回调里面不能获取错误信息
|
||||
axios.interceptors.request.use(
|
||||
function (config) {
|
||||
|
||||
return config;
|
||||
},
|
||||
function (error) {
|
||||
// 当请求异常时做一些处理
|
||||
console.log('请求异常:' + JSON.stringify(error));
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
axios.interceptors.response.use(function (response) {
|
||||
// Do something with response data
|
||||
|
||||
return response
|
||||
}, function (error) {
|
||||
// Do something with response error
|
||||
console.log('响应出错:' + error)
|
||||
return Promise.reject(error)
|
||||
})
|
||||
|
||||
|
||||
const base = {
|
||||
axios: axios,
|
||||
baseUrl: 'http://localhost:8080'
|
||||
}
|
||||
|
||||
export default base
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 15 KiB |
@ -1,539 +0,0 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3829178 */
|
||||
src: url('iconfont.woff2?t=1675406501520') format('woff2'),
|
||||
url('iconfont.woff?t=1675406501520') format('woff'),
|
||||
url('iconfont.ttf?t=1675406501520') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-snapchat:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-wenjian:before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.icon-gf-telephone:before {
|
||||
content: "\e96c";
|
||||
}
|
||||
|
||||
.icon-tupian:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-shipin:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-shu:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-shezhi:before {
|
||||
content: "\e8b8";
|
||||
}
|
||||
|
||||
.icon-xinxi:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-shandian:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
@ -1,72 +0,0 @@
|
||||
{
|
||||
"id": "3829178",
|
||||
"name": "chat",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "1080596",
|
||||
"name": "snapchat",
|
||||
"font_class": "snapchat",
|
||||
"unicode": "e646",
|
||||
"unicode_decimal": 58950
|
||||
},
|
||||
{
|
||||
"icon_id": "6714382",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian",
|
||||
"unicode": "e62e",
|
||||
"unicode_decimal": 58926
|
||||
},
|
||||
{
|
||||
"icon_id": "7568886",
|
||||
"name": "24gf-telephone",
|
||||
"font_class": "gf-telephone",
|
||||
"unicode": "e96c",
|
||||
"unicode_decimal": 59756
|
||||
},
|
||||
{
|
||||
"icon_id": "12382329",
|
||||
"name": "图片",
|
||||
"font_class": "tupian",
|
||||
"unicode": "e610",
|
||||
"unicode_decimal": 58896
|
||||
},
|
||||
{
|
||||
"icon_id": "1283",
|
||||
"name": "视频",
|
||||
"font_class": "shipin",
|
||||
"unicode": "e600",
|
||||
"unicode_decimal": 58880
|
||||
},
|
||||
{
|
||||
"icon_id": "1412",
|
||||
"name": "树",
|
||||
"font_class": "shu",
|
||||
"unicode": "e601",
|
||||
"unicode_decimal": 58881
|
||||
},
|
||||
{
|
||||
"icon_id": "1727422",
|
||||
"name": "205设置",
|
||||
"font_class": "shezhi",
|
||||
"unicode": "e8b8",
|
||||
"unicode_decimal": 59576
|
||||
},
|
||||
{
|
||||
"icon_id": "5744743",
|
||||
"name": "message",
|
||||
"font_class": "xinxi",
|
||||
"unicode": "e607",
|
||||
"unicode_decimal": 58887
|
||||
},
|
||||
{
|
||||
"icon_id": "15391349",
|
||||
"name": "闪电",
|
||||
"font_class": "shandian",
|
||||
"unicode": "e61b",
|
||||
"unicode_decimal": 58907
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 812 KiB |
@ -1,81 +0,0 @@
|
||||
<template>
|
||||
<div class="file-card">
|
||||
<img src="@/assets/img/fileImg/unknowfile.png" alt="" v-if="fileType == 0"/>
|
||||
<img src="@/assets/img/fileImg/word.png" alt="" v-else-if="fileType == 1"/>
|
||||
<img src="@/assets/img/fileImg/excel.png" alt="" v-else-if="fileType == 2"/>
|
||||
<img src="@/assets/img/fileImg/ppt.png" alt="" v-else-if="fileType == 3"/>
|
||||
<img src="@/assets/img/fileImg/pdf.png" alt="" v-else-if="fileType == 4"/>
|
||||
<img src="@/assets/img/fileImg/zpi.png" alt="" v-else-if="fileType == 5"/>
|
||||
<img src="@/assets/img/fileImg/txt.png" alt="" v-else/>
|
||||
<div class="word">
|
||||
<span
|
||||
>{{file.name || '未知'}}</span
|
||||
>
|
||||
<span>154kb</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// props: ["fileType", "file"],
|
||||
props: {
|
||||
fileType: Number,
|
||||
file: File,
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
file() {
|
||||
console.log(this.file);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.file);
|
||||
console.log(this.fileType);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.file-card {
|
||||
width: 250px;
|
||||
height: 100px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: rgb(8, 250, 226);
|
||||
}
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
.word {
|
||||
width: 60%;
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
span {
|
||||
width: 90%;
|
||||
display: inline-block;
|
||||
color: #090000;
|
||||
}
|
||||
span:first-child {
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
span:last-child {
|
||||
font-size: 12px;
|
||||
color: rgb(10, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<div class="head-portrait">
|
||||
<img :src="imgUrl" alt="">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
imgUrl:{ default:require('@/assets/img/head_portrait.jpg')}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.head-portrait {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
// border: 2px solid rgb(137,140,151);
|
||||
border: 2px solid rgb(12, 12, 12);
|
||||
position:relative;
|
||||
&::before {
|
||||
content: '';
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
background-color: rgb(144,225,80);
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border-radius: 50%;
|
||||
// padding: 2px;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<div class="nav">
|
||||
<div class="nav-menu-wrapper">
|
||||
<ul class="menu-list">
|
||||
<li
|
||||
v-for="(item, index) in menuList"
|
||||
:key="index"
|
||||
:class="{ activeNav: index == current }"
|
||||
@click="changeMenu(index)"
|
||||
>
|
||||
<div class="block"></div>
|
||||
<span class="iconfont" :class="item"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="own-pic">
|
||||
<HeadPortrait :imgUrl="imgUrl"></HeadPortrait>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HeadPortrait from "./HeadPortrait.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
HeadPortrait,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuList: [
|
||||
"icon-xinxi",
|
||||
"icon-shipin",
|
||||
"icon-shu",
|
||||
"icon-shandian",
|
||||
"icon-shezhi",
|
||||
],
|
||||
current: 0,
|
||||
imgUrl: require('@/assets/img/head_portrait.jpg')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeMenu(index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
this.$router.push({
|
||||
name: "ChatHome",
|
||||
}, () => {});
|
||||
break;
|
||||
case 1:
|
||||
this.$message("该功能还没有开发哦,敬请期待一下吧~🥳");
|
||||
break;
|
||||
case 2:
|
||||
this.$message("该功能还没有开发哦,敬请期待一下吧~🥳");
|
||||
break;
|
||||
case 3:
|
||||
this.$message("该功能还没有开发哦,敬请期待一下吧~🥳");
|
||||
break;
|
||||
case 4:
|
||||
this.$message("该功能还没有开发哦,敬请期待一下吧~🥳");
|
||||
break;
|
||||
default:
|
||||
this.$router.push({
|
||||
name: "ChatHome",
|
||||
});
|
||||
}
|
||||
|
||||
this.current = index;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nav {
|
||||
width: 100%;
|
||||
height: 90vh;
|
||||
position: relative;
|
||||
border-radius: 20px 0 0 20px;
|
||||
.nav-menu-wrapper {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
transform: translate(0, -50%);
|
||||
.menu-list {
|
||||
margin-left: 10px;
|
||||
|
||||
li {
|
||||
margin: 40px 0 0 30px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
.block {
|
||||
background-color: rgb(29, 144, 245);
|
||||
position: absolute;
|
||||
left: -40px;
|
||||
width: 6px;
|
||||
height: 25px;
|
||||
transition: 0.5s;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
opacity: 0;
|
||||
}
|
||||
&:hover {
|
||||
span {
|
||||
color: rgb(29, 144, 245);
|
||||
}
|
||||
.block {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.own-pic {
|
||||
position: absolute;
|
||||
bottom: 10%;
|
||||
margin-left: 25px;
|
||||
}
|
||||
}
|
||||
.activeNav {
|
||||
span {
|
||||
color: rgb(29, 144, 245);
|
||||
}
|
||||
.block {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,56 +0,0 @@
|
||||
<template>
|
||||
<nav class="navbar">
|
||||
<ul class="nav-links">
|
||||
<li><router-link to="/ChatHome">首页</router-link></li>
|
||||
<li><router-link to="/ReCommend">匹配推荐</router-link></li>
|
||||
<li><router-link to="/LinVite1n">个人资料</router-link></li>
|
||||
<li><router-link to="#">设置</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
width: 100%;
|
||||
background-color: #0073e6;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.nav-links li {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.nav-links li a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
font-size: 25px;
|
||||
transition: color 0.3s;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.nav-links li a:hover {
|
||||
color: #d0e7ff;
|
||||
}
|
||||
</style>
|
@ -1,109 +0,0 @@
|
||||
<template>
|
||||
<div class="person-card" :class="{ activeCard: personInfo.id == current }">
|
||||
<div class="info">
|
||||
<HeadPortrait :imgUrl="personInfo.headImg"></HeadPortrait>
|
||||
<div class="info-detail">
|
||||
<div class="name">{{ personInfo.name }}</div>
|
||||
<!-- <div class="detail">{{ personInfo.detail }}</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HeadPortrait from "./HeadPortrait.vue";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
personInfo: {
|
||||
default: {
|
||||
},
|
||||
},
|
||||
pcCurrent: {
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
HeadPortrait,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
current: '',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
pcCurrent: function() {
|
||||
this.isActive()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isActive() {
|
||||
this.current = this.pcCurrent
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.person-card {
|
||||
width: 280px;
|
||||
height: 80px;
|
||||
border-radius: 0px;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
.info {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 90%;
|
||||
transform: translate(-50%, -50%);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
.info-detail {
|
||||
margin-top: 5px;
|
||||
margin-left: 20px;
|
||||
.name {
|
||||
color: #070707;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.detail {
|
||||
color: #3f5f8f;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
background-color: #1d90f5;
|
||||
transition: 0.3s;
|
||||
// box-shadow: 0px 0px 10px 0px rgba(0, 136, 255);
|
||||
// box-shadow: 0 5px 20px rgba(251, 152, 11, .5);
|
||||
.info {
|
||||
.info-detail {
|
||||
.detail {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.activeCard {
|
||||
background-color: #1d90f5;
|
||||
transition: 0.3s;
|
||||
// box-shadow: 3px 2px 10px 0px rgba(0, 136, 255);
|
||||
.info {
|
||||
.info-detail {
|
||||
.detail {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,16 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import ElementUI from 'element-ui';
|
||||
import VueRouter from 'vue-router'
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import router from './router/index'
|
||||
import "./mock/index.js"
|
||||
|
||||
Vue.use(VueRouter)
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(ElementUI);
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App),
|
||||
}).$mount('#app')
|
@ -1,57 +0,0 @@
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
import ChatHome from '../view/pages/chatHome/index.vue'
|
||||
import Video from '../view/pages/video.vue'
|
||||
import Lingting from '../view/pages/lingting.vue'
|
||||
import Setting from '../view/pages/setting.vue'
|
||||
import LinVite1n from '../view/pages/LnVite1n.vue'
|
||||
import ReCommend from '../view/pages/ReCommend.vue'
|
||||
import LoginPage from '@/view/LoginPage.vue'
|
||||
|
||||
export default new VueRouter({
|
||||
mode: 'hash',
|
||||
routes: [
|
||||
|
||||
|
||||
{
|
||||
path:'/',
|
||||
name: 'Login',
|
||||
component:LoginPage
|
||||
},
|
||||
{
|
||||
path: "/home",
|
||||
name: "Home",
|
||||
redirect: '/ChatHome'
|
||||
},
|
||||
{
|
||||
path: "/ChatHome",
|
||||
name: "ChatHome",
|
||||
component: ChatHome,
|
||||
},
|
||||
{
|
||||
path: "/LinVite1n",
|
||||
name: "LinVite1n",
|
||||
component: LinVite1n
|
||||
},
|
||||
{
|
||||
path: "/Recommend",
|
||||
name: "Recommend",
|
||||
component: ReCommend
|
||||
},
|
||||
{
|
||||
path: "/Video",
|
||||
name: "Video",
|
||||
component: Video
|
||||
},
|
||||
{
|
||||
path: "/Lingting",
|
||||
name: "Lingting",
|
||||
component: Lingting
|
||||
},
|
||||
{
|
||||
path: "/Setting",
|
||||
name: "Setting",
|
||||
component: Setting
|
||||
},
|
||||
]
|
||||
})
|
@ -1,23 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>mian首页</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
div {
|
||||
background-color: aqua;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<div class="app-background">
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<h1>欢迎登录</h1>
|
||||
<form @submit.prevent="login">
|
||||
<div class="input-group">
|
||||
<label for="username">用户名:</label>
|
||||
<input type="text" v-model="formData.username" id="username" required />
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="password">密码:</label>
|
||||
<input type="password" v-model="formData.password" id="password" required />
|
||||
</div>
|
||||
<button type="submit">登录</button>
|
||||
</form>
|
||||
<button @click="register" class="register-button">注册账号</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
username: '',
|
||||
password: ''
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async login() {
|
||||
|
||||
const response = await axios.post('http://127.0.0.1:8000/login', this.formData);
|
||||
console.log(response.data); // 后端返回的数据
|
||||
if(response.data.code === 200){
|
||||
alert("登录成功")
|
||||
this.$router.push('/home').then(() => {
|
||||
location.reload();//刷新页面
|
||||
}).catch(() => {});
|
||||
}else if (response.data.code === 400){
|
||||
alert("密码错误")
|
||||
}else{
|
||||
alert("用户不存在")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
overflow: hidden; /* 防止滚动条 */
|
||||
}
|
||||
|
||||
.app-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("../assets/R.jpg") no-repeat center center;
|
||||
background-size: cover;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
text-align: center;
|
||||
max-width: 600px; /* 宽度 */
|
||||
margin: 0 0 0 auto;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
background-color: hwb(207 71% 7% / 0.959);
|
||||
border-radius: 50px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
padding: 200px; /* 内边距 */
|
||||
box-sizing: border-box;
|
||||
left: 150px;
|
||||
z-index: 2; /* 确保登录框在背景图之上 */
|
||||
position: relative;
|
||||
left: -30px;
|
||||
max-height: 700px;
|
||||
top:16px;
|
||||
}
|
||||
|
||||
.login-box h1 {
|
||||
font-size: 3em;
|
||||
margin-bottom: 20px;
|
||||
color: #0b70b4c1;
|
||||
position: relative;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-group input {
|
||||
width: 180%;
|
||||
padding: 15px;
|
||||
margin-top: 5px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
font-size: 1.2em;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
left: -80px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 180%;
|
||||
padding: 15px;
|
||||
background-color: #538edb;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
font-size: 1.2em;
|
||||
position: relative;
|
||||
left: -80px;
|
||||
|
||||
}
|
||||
.register-button {
|
||||
margin-top: 10px; /* 按钮与登录按钮之间的间距 */
|
||||
padding: 5px; /* 内边距 */
|
||||
background-color: transparent; /* */
|
||||
color: rgb(27, 150, 227);
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
font-size: 0.8em; /* 字体大小 */
|
||||
width: 50%; /* 调整按钮宽度 */
|
||||
align-self: center; /* 居中对齐按钮 */
|
||||
position: relative;
|
||||
left: 150px
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #e55b54;
|
||||
}
|
||||
</style>
|
@ -1,34 +0,0 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<el-container height="100%">
|
||||
<el-main style="padding: 0;">
|
||||
<Navi></Navi>
|
||||
<router-view></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Navi from "@/components/Navi.vue";
|
||||
export default {
|
||||
components: {
|
||||
Navi,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
//聊天背景颜色
|
||||
.home {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color:rgb(255, 255, 255);
|
||||
border-radius: 15px;
|
||||
position: absolute;
|
||||
margin-left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|