Brak opisu

reghao 155829435e update views/my 1 rok temu
img 5e11e23aa2 使用 elementui 替换 vuetify 2 lat temu
public fc2bbb67fc vue 中使用 mathjax 来渲染 tinymce 的 mathjax 插件生成的 latex 格式公式时, 需要从 CDN 引入 mathjax 相关依赖, 这里使用的是 CDN 是 cdnjs.cloudflare.com 1 rok temu
src 155829435e update views/my 1 rok temu
.browserslistrc e6618dd99d 更新配置, 解决 webstorm 不能自动推断 elementui 标签的问题 2 lat temu
.editorconfig e6618dd99d 更新配置, 解决 webstorm 不能自动推断 elementui 标签的问题 2 lat temu
.env.development 77c55cd96c update .env files 1 rok temu
.env.production 77c55cd96c update .env files 1 rok temu
.eslintrc.js e6618dd99d 更新配置, 解决 webstorm 不能自动推断 elementui 标签的问题 2 lat temu
.gitignore f18020c44f update gitignore 2 lat temu
Dockerfile a101b5ad31 更新用户主页 2 lat temu
LICENSE 5e11e23aa2 使用 elementui 替换 vuetify 2 lat temu
README.md 3bea50c028 update README.md 1 rok temu
babel.config.js 8fe2d8fda2 初始版本,https://toscode.gitee.com/puzhiweizuishuai/VideoWeb.git@e1af8bf 4 lat temu
build.sh be9a09bd71 项目名由 bili 修改为 tnbapp 2 lat temu
package.json 7ef2697e49 update 1 rok temu
vue.config.js ea3612f102 添加帐号登录注册相关页面 2 lat temu

README.md

tnbapp

ElementUI 的模板框架来自这个项目 master 分支的 c93506a7 版本

tnbapp 模块

  • / > 主站
  • /my > 用户帐号
  • /mall > 商城
  • /exam > 考试系统
  • /disk > 网盘
  • /cam > 摄像头

依赖

  • os:Linux
  • node:18

后端接口

vue.config.js 文件中配置服务接口地址:

devServer: {
	port: 8000, // 项目的端口号
	// 跨域代理配置
	proxy: {
		'/api': {
			target: 'http://localhost:8888', //这里是接口地址,接口地址联系作者获取
			ws: true,//是否代理websockets
			changeOrigin: true,   // 设置同源  默认false,是否需要改变原始主机头为目标URL
			pathRewrite: {
				'^/api': ''
			}		
		}
	}
}

构建部署

安装依赖

npm --registry http://registry.npm.taobao.org i

启动服务

npm run serve

启动服务后打开浏览器,访问 http://localhost:8000

项目打包

npm run build

使用 .env.production 文件中的配置

构建后生成的结果在 dist 目录中

Nginx 配置

server {
   listen 8080;
   access_log off;
   
   root /opt/webroot;
   location / {
      try_files $uri $uri/ /index.html;
   }
}

root 指令的路径指向 dist 目录的绝对路径