diff --git a/.env.admin b/.env.admin
new file mode 100644
index 0000000..3712c83
--- /dev/null
+++ b/.env.admin
@@ -0,0 +1,6 @@
+VITE_API_URL=http://admin.ceshi.guo123.cn
+VITE_TINYMCE_KEY=agmu6i1c6k7bcp36oenzyz7yi1yplptq7goyx88y1g6ofnqu
+VITE_AES_KEY=st123456654321st
+VITE_WEB_HOST=http://business.ceshi.guo123.cn
+VITE_WEB_MEMBER_HOST=http://member.ceshi.guo123.cn
+VITE_BUILD_MODE=admin
diff --git a/.env.merchant b/.env.merchant
new file mode 100644
index 0000000..154bcc3
--- /dev/null
+++ b/.env.merchant
@@ -0,0 +1,6 @@
+VITE_API_URL=http://admin.ceshi.guo123.cn
+VITE_TINYMCE_KEY=agmu6i1c6k7bcp36oenzyz7yi1yplptq7goyx88y1g6ofnqu
+VITE_AES_KEY=st123456654321st
+VITE_WEB_HOST=http://business.ceshi.guo123.cn
+VITE_WEB_MEMBER_HOST=http://member.ceshi.guo123.cn
+VITE_BUILD_MODE=merchant
diff --git a/package.json b/package.json
index 055e1e3..1e0945c 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,10 @@
"version": "0.0.1",
"type": "module",
"scripts": {
- "dev": "vite --mode=production",
- "build": "vite build --mode=production",
+ "dev:merchant": "vite --mode=merchant --port=9050",
+ "dev:admin": "vite --mode=admin --port=9051",
+ "build:merchant": "vite build --mode=merchant",
+ "build:admin": "vite build --mode=admin",
"preview": "vite preview",
"commit": "git add . && git commit -m 'update' && git push"
},
diff --git a/src/components/Pay/Alipay.vue b/src/components/Pay/Alipay.vue
index 00b8973..443e536 100644
--- a/src/components/Pay/Alipay.vue
+++ b/src/components/Pay/Alipay.vue
@@ -15,6 +15,7 @@ let timer = null;
const visible = ref(false);
const qrInfo = reactive({});
const open = () => {
+ successShow.value = false;
if (!money) {
Message.warning('充值金额需大于0元');
return;
diff --git a/src/pages/login/Login.vue b/src/pages/login/Login.vue
index 2c8b1a0..e106cd2 100644
--- a/src/pages/login/Login.vue
+++ b/src/pages/login/Login.vue
@@ -4,8 +4,11 @@ import {toPath} from "../../utils/index.js";
import VerificationCode from '../../components/VerificationCode/index.vue';
import {useUserStore} from "../../pinia/UserStore/index.js";
import {Message} from "@arco-design/web-vue";
+import {useSystemStore} from "../../pinia/SystemStore/index.js";
+import Api from "../../api/index.js";
const {login} = useUserStore();
+const {BUILD_MODE} = useSystemStore();
const MODE = {
PHONE: 'PHONE',
@@ -13,9 +16,9 @@ const MODE = {
}
const from = reactive({
- mobile: '17502997128',
+ mobile: '15709267061',
code: null,
- password: '654321',
+ password: '123456',
});
const mode = ref(MODE.PHONE);
@@ -52,6 +55,7 @@ const loginSYS = (isRoot, form) => {
@@ -63,8 +67,12 @@ const loginSYS = (isRoot, form) => {
-
登陆商户端
-
登陆管理端
+
+ 登陆商户端
+
+
+ 登陆管理端
+
diff --git a/src/pages/manage-materials/manage-materials.vue b/src/pages/manage-materials/manage-materials.vue
index 1c06d8c..a3ec5e1 100644
--- a/src/pages/manage-materials/manage-materials.vue
+++ b/src/pages/manage-materials/manage-materials.vue
@@ -122,6 +122,7 @@ const success = async () => {
{
{
diff --git a/src/pinia/SystemStore/index.js b/src/pinia/SystemStore/index.js
index f7a27e3..ccc7901 100644
--- a/src/pinia/SystemStore/index.js
+++ b/src/pinia/SystemStore/index.js
@@ -9,6 +9,7 @@ export const useSystemStore = defineStore("SystemStore", () => {
const RoutesTemp = ref([]);
const NOW_ROUTER = ref(null);
const NOW_ROUTER_QUERY = reactive({});
+ const BUILD_MODE = ref(import.meta.env.VITE_BUILD_MODE);
const installRoute = async () => {
const routes = generateRouter(RoutesTemp.value);
@@ -86,6 +87,7 @@ export const useSystemStore = defineStore("SystemStore", () => {
installRoute,
clearRouter,
updateRouterTag,
+ BUILD_MODE,
}
}, {
persist: {
diff --git a/vite.config.js b/vite.config.js
index 653996d..1ad0501 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -44,7 +44,8 @@ export default defineConfig({
'@': '/src'
}
}, server: {
- port: 9050, proxy: {
+ host: '0.0.0.0',
+ proxy: {
'/baseApi': {
target: 'http://192.168.1.105', changeOrigin: true, rewrite: (path) => path.replace(/^\/baseApi/, ''),
}