diff --git a/.env.production b/.env.production
index c7b8497..61dde96 100644
--- a/.env.production
+++ b/.env.production
@@ -5,7 +5,7 @@ VITE_APP_TITLE = AEO系统
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
-VITE_APP_BASE_API = '/prod-api'
+VITE_APP_BASE_API = 'http://aeo.gdguanhui.com/aeo'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
\ No newline at end of file
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index 4d19693..12502e6 100644
--- a/src/components/ImageUpload/index.vue
+++ b/src/components/ImageUpload/index.vue
@@ -151,7 +151,7 @@ function handleExceed() {
// 上传成功回调
function handleUploadSuccess(res, file) {
if (res.code === 200) {
- uploadList.value.push({ name: res.fileName, url: res.fileName });
+ uploadList.value.push({ name: res.fileName, url: import.meta.env.VITE_APP_BASE_API + res.fileName });
uploadedSuccessfully();
} else {
number.value--;
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index b4a4697..263d4b9 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -88,7 +88,7 @@ function logout() {
type: 'warning'
}).then(() => {
userStore.logOut().then(() => {
- location.href = '/index';
+ location.href = '/';
})
}).catch(() => { });
}
diff --git a/src/router/index.js b/src/router/index.js
index 2c7c3de..bc7185f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,6 +1,6 @@
-import { createWebHistory, createRouter } from 'vue-router'
+import { createWebHistory, createRouter } from "vue-router";
/* Layout */
-import Layout from '@/layout'
+import Layout from "@/layout";
/**
* Note: 路由配置项
@@ -27,147 +27,147 @@ import Layout from '@/layout'
// 公共路由
export const constantRoutes = [
{
- path: '/redirect',
+ path: "/redirect",
component: Layout,
hidden: true,
children: [
{
- path: '/redirect/:path(.*)',
- component: () => import('@/views/redirect/index.vue')
- }
- ]
+ path: "/redirect/:path(.*)",
+ component: () => import("@/views/redirect/index.vue"),
+ },
+ ],
},
{
- path: '/login',
- component: () => import('@/views/login'),
- hidden: true
+ path: "/login",
+ component: () => import("@/views/login"),
+ hidden: true,
},
{
- path: '/register',
- component: () => import('@/views/register'),
- hidden: true
+ path: "/register",
+ component: () => import("@/views/register"),
+ hidden: true,
},
{
path: "/:pathMatch(.*)*",
- component: () => import('@/views/error/404'),
- hidden: true
+ component: () => import("@/views/error/404"),
+ hidden: true,
},
{
- path: '/401',
- component: () => import('@/views/error/401'),
- hidden: true
+ path: "/401",
+ component: () => import("@/views/error/401"),
+ hidden: true,
},
{
- path: '',
+ path: "",
component: Layout,
- redirect: '/index',
+ redirect: "/index",
children: [
{
- path: '/index',
- component: () => import('@/views/index'),
- name: 'Index',
- meta: { title: '首页', icon: 'dashboard', affix: true }
- }
- ]
+ path: "/index",
+ component: () => import("@/views/index"),
+ name: "Index",
+ meta: { title: "首页", icon: "dashboard", affix: true },
+ },
+ ],
},
{
- path: '/user',
+ path: "/user",
component: Layout,
hidden: true,
- redirect: 'noredirect',
+ redirect: "noredirect",
children: [
{
- path: 'profile',
- component: () => import('@/views/system/user/profile/index'),
- name: 'Profile',
- meta: { title: '个人中心', icon: 'user' }
- }
- ]
- }
-]
+ path: "profile",
+ component: () => import("@/views/system/user/profile/index"),
+ name: "Profile",
+ meta: { title: "个人中心", icon: "user" },
+ },
+ ],
+ },
+];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
- path: '/system/user-auth',
+ path: "/system/user-auth",
component: Layout,
hidden: true,
- permissions: ['system:user:edit'],
+ permissions: ["system:user:edit"],
children: [
{
- path: 'role/:userId(\\d+)',
- component: () => import('@/views/system/user/authRole'),
- name: 'AuthRole',
- meta: { title: '分配角色', activeMenu: '/system/user' }
- }
- ]
+ path: "role/:userId(\\d+)",
+ component: () => import("@/views/system/user/authRole"),
+ name: "AuthRole",
+ meta: { title: "分配角色", activeMenu: "/system/user" },
+ },
+ ],
},
{
- path: '/system/role-auth',
+ path: "/system/role-auth",
component: Layout,
hidden: true,
- permissions: ['system:role:edit'],
+ permissions: ["system:role:edit"],
children: [
{
- path: 'user/:roleId(\\d+)',
- component: () => import('@/views/system/role/authUser'),
- name: 'AuthUser',
- meta: { title: '分配用户', activeMenu: '/system/role' }
- }
- ]
+ path: "user/:roleId(\\d+)",
+ component: () => import("@/views/system/role/authUser"),
+ name: "AuthUser",
+ meta: { title: "分配用户", activeMenu: "/system/role" },
+ },
+ ],
},
{
- path: '/system/dict-data',
+ path: "/system/dict-data",
component: Layout,
hidden: true,
- permissions: ['system:dict:list'],
+ permissions: ["system:dict:list"],
children: [
{
- path: 'index/:dictId(\\d+)',
- component: () => import('@/views/system/dict/data'),
- name: 'Data',
- meta: { title: '字典数据', activeMenu: '/system/dict' }
- }
- ]
+ path: "index/:dictId(\\d+)",
+ component: () => import("@/views/system/dict/data"),
+ name: "Data",
+ meta: { title: "字典数据", activeMenu: "/system/dict" },
+ },
+ ],
},
{
- path: '/monitor/job-log',
+ path: "/monitor/job-log",
component: Layout,
hidden: true,
- permissions: ['monitor:job:list'],
+ permissions: ["monitor:job:list"],
children: [
{
- path: 'index/:jobId(\\d+)',
- component: () => import('@/views/monitor/job/log'),
- name: 'JobLog',
- meta: { title: '调度日志', activeMenu: '/monitor/job' }
- }
- ]
+ path: "index/:jobId(\\d+)",
+ component: () => import("@/views/monitor/job/log"),
+ name: "JobLog",
+ meta: { title: "调度日志", activeMenu: "/monitor/job" },
+ },
+ ],
},
{
- path: '/tool/gen-edit',
+ path: "/tool/gen-edit",
component: Layout,
hidden: true,
- permissions: ['tool:gen:edit'],
+ permissions: ["tool:gen:edit"],
children: [
{
- path: 'index/:tableId(\\d+)',
- component: () => import('@/views/tool/gen/editTable'),
- name: 'GenEdit',
- meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
- }
- ]
- }
-]
+ path: "index/:tableId(\\d+)",
+ component: () => import("@/views/tool/gen/editTable"),
+ name: "GenEdit",
+ meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
+ },
+ ],
+ },
+];
const router = createRouter({
history: createWebHistory(),
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
- return savedPosition
+ return savedPosition;
}
- return { top: 0 }
+ return { top: 0 };
},
});
diff --git a/src/views/customer/info/index.vue b/src/views/customer/info/index.vue
index 77f7277..7ffe063 100644
--- a/src/views/customer/info/index.vue
+++ b/src/views/customer/info/index.vue
@@ -71,15 +71,22 @@
-
-
+
+
+
+
+
+
+
+
+
+
修改
{
+ validateForm().then(() => {
if (form.value.id != null) {
updateCustomer(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
diff --git a/src/views/customer/member/index.vue b/src/views/customer/member/index.vue
index 706227d..1ebc58a 100644
--- a/src/views/customer/member/index.vue
+++ b/src/views/customer/member/index.vue
@@ -61,11 +61,15 @@
-
+
+
+
+
+
-
+
-
+
-
+
@@ -274,7 +278,7 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
- validateForm.then(() => {
+ validateForm().then(() => {
if (form.value.id != null) {
updateCustomerStaff(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
diff --git a/src/views/login.vue b/src/views/login.vue
index b133acb..10076b4 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -79,8 +79,8 @@ const systemName = import.meta.env.VITE_APP_TITLE;
const copyright = import.meta.env.VITE_APP_COPYRIGHT;
const loginForm = ref({
- username: "admin",
- password: "admin123",
+ username: import.meta.env.VITE_APP_ENV == 'production' ? "" : 'admin',
+ password: import.meta.env.VITE_APP_ENV == 'production' ? '' : "admin123",
rememberMe: false,
code: "",
uuid: ""
diff --git a/src/views/product/productRecord/index.vue b/src/views/product/productRecord/index.vue
index 076252c..017633d 100644
--- a/src/views/product/productRecord/index.vue
+++ b/src/views/product/productRecord/index.vue
@@ -67,13 +67,17 @@
+
-
+
+
+
+
-
+
@@ -126,6 +130,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+