diff --git a/.env.development b/.env.development index 302ecd1..897ed26 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,13 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = Jarvis # 开发环境配置 ENV = 'development' -# 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +# Jarvis/开发环境 +VUE_APP_BASE_API = '' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true + +VUE_APP_BASE_API = 'http://127.0.0.1:30313' \ No newline at end of file diff --git a/.env.production b/.env.production index b4893b0..a0017bd 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = Jarvis # 生产环境配置 ENV = 'production' -# 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# Jarvis/生产环境 +VUE_APP_BASE_API = '' + +# VUE_APP_BASE_API = 'http://134.175.126.60:30313' diff --git a/.env.staging b/.env.staging index 209b64e..a6bd022 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 若依管理系统 +VUE_APP_TITLE = Jarvis BABEL_ENV = production @@ -8,5 +8,5 @@ NODE_ENV = production # 测试环境配置 ENV = 'staging' -# 若依管理系统/测试环境 +# Jarvis/测试环境 VUE_APP_BASE_API = '/stage-api' diff --git a/nginx-jarvis.conf b/nginx-jarvis.conf new file mode 100644 index 0000000..ba060fa --- /dev/null +++ b/nginx-jarvis.conf @@ -0,0 +1,51 @@ +server { + listen 80; + server_name jarvis.van333.cn; + + # 设置根目录 + root /www/sites/jarvis.van333.cn/index; + index index.html index.htm; + + # 代理头设置 + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Real-IP $remote_addr; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + + # 日志配置 + access_log /www/sites/jarvis.van333.cn/log/access.log main; + error_log /www/sites/jarvis.van333.cn/log/error.log; + + # SSL证书验证 + location ^~ /.well-known/acme-challenge { + allow all; + root /usr/share/nginx/html; + } + + # 静态资源处理 + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + try_files $uri =404; + } + + # API代理 - 如果有后端API + location /api/ { + proxy_pass http://localhost:8080/; # 根据您的后端服务地址调整 + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # 处理Vue Router的History模式 + location / { + try_files $uri $uri/ /index.html; + } + + # 404错误页面 + error_page 404 /404.html; +} \ No newline at end of file diff --git a/package.json b/package.json index ab3bdab..01fac35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ruoyi", "version": "3.9.0", - "description": "若依管理系统", + "description": "Jarvis", "author": "若依", "license": "MIT", "scripts": { diff --git a/src/api/system/orderrows.js b/src/api/system/orderrows.js new file mode 100644 index 0000000..54cedf7 --- /dev/null +++ b/src/api/system/orderrows.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询京粉订单列表 +export function listOrderrows(query) { + return request({ + url: '/jarvis/orderrows/list', + method: 'get', + params: query + }) +} + +// 查询京粉订单详细 +export function getOrderrows(orderId) { + return request({ + url: '/jarvis/orderrows/' + orderId, + method: 'get' + }) +} + +// 新增京粉订单 +export function addOrderrows(data) { + return request({ + url: '/jarvis/orderrows', + method: 'post', + data: data + }) +} + +// 修改京粉订单 +export function updateOrderrows(data) { + return request({ + url: '/jarvis/orderrows', + method: 'put', + data: data + }) +} + +// 删除京粉订单 +export function delOrderrows(orderId) { + return request({ + url: '/jarvis/orderrows/' + orderId, + method: 'delete' + }) +} + +// 获取订单状态下拉数据 +export function getValidCodeSelectData() { + return request({ + url: '/jarvis/orderrows/select/validCode', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/system/superadmin.js b/src/api/system/superadmin.js new file mode 100644 index 0000000..e9bd800 --- /dev/null +++ b/src/api/system/superadmin.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询超级管理员列表 +export function listSuperadmin(query) { + return request({ + url: '/jarvis/superadmin/list', + method: 'get', + params: query + }) +} + +// 查询超级管理员详细 +export function getSuperadmin(id) { + return request({ + url: '/jarvis/superadmin/' + id, + method: 'get' + }) +} + +// 新增超级管理员 +export function addSuperadmin(data) { + return request({ + url: '/jarvis/superadmin', + method: 'post', + data: data + }) +} + +// 修改超级管理员 +export function updateSuperadmin(data) { + return request({ + url: '/jarvis/superadmin', + method: 'put', + data: data + }) +} + +// 删除超级管理员 +export function delSuperadmin(id) { + return request({ + url: '/jarvis/superadmin/' + id, + method: 'delete' + }) +} + +// 获取管理员下拉数据 +export function getAdminSelectData() { + return request({ + url: '/jarvis/superadmin/select/adminUnionId', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/assets/logo/logo.png b/src/assets/logo/logo.png index e263760..e20a5af 100644 Binary files a/src/assets/logo/logo.png and b/src/assets/logo/logo.png differ diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 08ac487..117eedf 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -5,7 +5,7 @@ :current-page.sync="currentPage" :page-size.sync="pageSize" :layout="layout" - :page-sizes="pageSizes" + :page-sizes="[10, 50, 100, 200]" :pager-count="pagerCount" :total="total" v-bind="$attrs" diff --git a/src/router/index.js b/src/router/index.js index bbfd237..1a3013d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -64,13 +64,13 @@ export const constantRoutes = [ { path: '', component: Layout, - redirect: 'index', + redirect: 'order/list', children: [ { - path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } + path: 'order/list', + component: () => import('@/views/system/orderrows/index'), + name: 'OrderList', + meta: { title: '京粉订单', icon: 'order', affix: true } } ] }, @@ -87,6 +87,49 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } } ] + }, + + { + path: '/order', + component: Layout, + redirect: 'list', + name: 'Order', + meta: { title: '京粉订单', icon: 'shopping' }, + children: [ + { + path: 'list', + component: () => import('@/views/system/orderrows/index'), + name: 'OrderList', + meta: { title: '订单列表', icon: 'list' } + }, + { + path: 'statistics', + component: () => import('@/views/system/orderrows/statistics'), + name: 'OrderStatistics', + meta: { title: '订单统计', icon: 'chart' } + }, + { + path: 'settings', + component: () => import('@/views/system/orderrows/settings'), + name: 'OrderSettings', + meta: { title: '订单设置', icon: 'setting' } + } + ] + }, + { + path: '/system', + component: Layout, + redirect: 'noredirect', + name: 'System', + meta: { title: '系统管理', icon: 'system' }, + children: [ + { + path: 'superadmin', + component: () => import('@/views/system/superadmin/index'), + name: 'Superadmin', + meta: { title: '超级管理员', icon: 'user' } + } + ] } ] diff --git a/src/views/index.vue b/src/views/index.vue deleted file mode 100644 index f33d8b7..0000000 --- a/src/views/index.vue +++ /dev/null @@ -1,1136 +0,0 @@ - - - - - - diff --git a/src/views/login.vue b/src/views/login.vue index 5bdda11..5308f04 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -56,7 +56,7 @@ @@ -142,7 +142,7 @@ export default { Cookies.remove('rememberMe') } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(()=>{}) + this.$router.push({ path: this.redirect || "/order/list" }).catch(()=>{}) }).catch(() => { this.loading = false if (this.captchaEnabled) { diff --git a/src/views/system/orderrows/index.vue b/src/views/system/orderrows/index.vue new file mode 100644 index 0000000..858b036 --- /dev/null +++ b/src/views/system/orderrows/index.vue @@ -0,0 +1,536 @@ + + + \ No newline at end of file diff --git a/src/views/system/orderrows/settings.vue b/src/views/system/orderrows/settings.vue new file mode 100644 index 0000000..aa8b1d0 --- /dev/null +++ b/src/views/system/orderrows/settings.vue @@ -0,0 +1,187 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/orderrows/statistics.vue b/src/views/system/orderrows/statistics.vue new file mode 100644 index 0000000..58d0ff8 --- /dev/null +++ b/src/views/system/orderrows/statistics.vue @@ -0,0 +1,271 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/superadmin/index.vue b/src/views/system/superadmin/index.vue new file mode 100644 index 0000000..a62f510 --- /dev/null +++ b/src/views/system/superadmin/index.vue @@ -0,0 +1,305 @@ + + + \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 40e140d..83f55fe 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,9 +7,9 @@ function resolve(dir) { const CompressionPlugin = require('compression-webpack-plugin') -const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 +const name = process.env.VUE_APP_TITLE || 'Jarvis' // 网页标题 -const baseUrl = 'http://localhost:8080' // 后端接口 +const baseUrl = process.env.VUE_APP_BASE_API || 'http://127.0.0.1:30313' // 后端接口 const port = process.env.port || process.env.npm_config_port || 80 // 端口