代码拉取完成,页面将自动刷新
同步操作将从 LC/SAAS-UPMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
启动eureka
启动redis
修改upms配置文件中数据库信息、redis信息
\upms\upms-startup\src\main\resources\application.yml
spring:
datasource:
# 数据库文件位置
url: jdbc:sqlite:d:/upms/db/sqlitedb3
redis:
# Redis服务器地址
host: 127.0.0.1
eureka:
client:
service-url:
# eureka地址
defaultZone: http://eurekaIp:eurekaPort/eureka
运行upms服务
运行upms-web前端
\upms-web\
npm run dev
运行upms-web-admin前端
\upms-operate-web\
npm run dev
打开浏览器
admin·
/123456aA.
运行批次管理系统
如上,修改配置文件然后启动即可
本地调试需要在http://localhost:8080/ 登陆成功后在源码中设置token信息,不然接口权限校验会失败
pcgl-web\src\permission.js
router.beforeEach((to, from, next) => {
// 本地测试使用,正式环境需移除 start
// if (!Vue.ls.get(ACCESS_TOKEN)) {
// Vue.ls.set(ACCESS_TOKEN, '078ff8c46f424c1bb4fe805925befcc6')
// Vue.ls.set(USER_INFO, {infoRandom: '42efea56519c46d8a0dc3a9ccfc5d25f'})
// }
// 本地测试使用,正式环境需移除 end
console.log('userInfo', Vue.ls.get(USER_INFO))
if (to.meta.title) {
document.title = to.meta.title
}
if (Vue.ls.get(ACCESS_TOKEN)) {
// 判断当前的token是否存在
next()
} else {
if (to.fullPath.indexOf('/login') >= 0) {
next()
} else {
next({
path: '/login',
query: {redirect: to.fullPath}
})
}
}
})
启动redis
eureka、upms后端服务打包后,直接java -jar 启动就行
upms-web、upms-web-admin前端打包
npm run build
配置nginx.conf
worker_processes 1;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
# npm-web 打包后的静态文件放在这
root html/dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /upmsApi/ {
proxy_pass http://localhost:1081/;
}
location /pcglApi/ {
proxy_pass http://localhost:1082/;
}
location /admin {
# npm-web-admin 打包后的静态文件放在这
alias html/adminDist/;
index index.html index.htm;
try_files $uri $uri/ /admin/index.html;
}
location /pcgl {
# pcgl-web 打包后的静态文件放在这
alias html/pcglDist/;
index index.html index.htm;
try_files $uri $uri/ /pcgl/index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
启动nginx
结束
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。