This commit is contained in:
王一嘉
2025-07-17 17:17:34 +08:00
parent b4cba3a22d
commit d0342c06a9
8 changed files with 36 additions and 7 deletions

6
.env.admin Normal file
View File

@@ -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

6
.env.merchant Normal file
View File

@@ -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

View File

@@ -4,8 +4,10 @@
"version": "0.0.1", "version": "0.0.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --mode=production", "dev:merchant": "vite --mode=merchant --port=9050",
"build": "vite build --mode=production", "dev:admin": "vite --mode=admin --port=9051",
"build:merchant": "vite build --mode=merchant",
"build:admin": "vite build --mode=admin",
"preview": "vite preview", "preview": "vite preview",
"commit": "git add . && git commit -m 'update' && git push" "commit": "git add . && git commit -m 'update' && git push"
}, },

View File

@@ -15,6 +15,7 @@ let timer = null;
const visible = ref(false); const visible = ref(false);
const qrInfo = reactive({}); const qrInfo = reactive({});
const open = () => { const open = () => {
successShow.value = false;
if (!money) { if (!money) {
Message.warning('充值金额需大于0元'); Message.warning('充值金额需大于0元');
return; return;

View File

@@ -4,8 +4,11 @@ import {toPath} from "../../utils/index.js";
import VerificationCode from '../../components/VerificationCode/index.vue'; import VerificationCode from '../../components/VerificationCode/index.vue';
import {useUserStore} from "../../pinia/UserStore/index.js"; import {useUserStore} from "../../pinia/UserStore/index.js";
import {Message} from "@arco-design/web-vue"; import {Message} from "@arco-design/web-vue";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
import Api from "../../api/index.js";
const {login} = useUserStore(); const {login} = useUserStore();
const {BUILD_MODE} = useSystemStore();
const MODE = { const MODE = {
PHONE: 'PHONE', PHONE: 'PHONE',
@@ -13,9 +16,9 @@ const MODE = {
} }
const from = reactive({ const from = reactive({
mobile: '17502997128', mobile: '15709267061',
code: null, code: null,
password: '654321', password: '123456',
}); });
const mode = ref(MODE.PHONE); const mode = ref(MODE.PHONE);
@@ -52,6 +55,7 @@ const loginSYS = (isRoot, form) => {
<a-input v-model:model-value="from.mobile" placeholder="手机号"></a-input> <a-input v-model:model-value="from.mobile" placeholder="手机号"></a-input>
<VerificationCode <VerificationCode
:type="2" :type="2"
:api="BUILD_MODE==='merchant'?Api.merchant.sendSms:Api.admin.sendSms"
v-if="mode === MODE.PHONE" v-if="mode === MODE.PHONE"
:mobile="from.mobile" :mobile="from.mobile"
v-model:verification-code="from.code"> v-model:verification-code="from.code">
@@ -63,8 +67,12 @@ const loginSYS = (isRoot, form) => {
</a-input> </a-input>
</div> </div>
<div class="flex flex-col mt-[50px] gap-[32px]"> <div class="flex flex-col mt-[50px] gap-[32px]">
<a-button @click="loginSYS(false, from)" type="primary">登陆商户端</a-button> <a-button v-if="BUILD_MODE==='merchant'" @click="loginSYS(false, from)" type="primary">
<a-button @click="loginSYS(true, from)" type="primary">登陆管理端</a-button> 登陆商户端
</a-button>
<a-button v-if="BUILD_MODE==='admin'" @click="loginSYS(true, from)" type="primary">
登陆管理端
</a-button>
<a-button <a-button
@click="toPath('/loginSYS/register')" @click="toPath('/loginSYS/register')"
type="text"> type="text">

View File

@@ -122,6 +122,7 @@ const success = async () => {
<template v-slot:title="{record}"> <template v-slot:title="{record}">
<div class="flex flex-col gap-[12px]"> <div class="flex flex-col gap-[12px]">
<a-input <a-input
:max-length="vo.limit.title_limit"
:disabled="record.status !== 0 && record.status !== 2" :disabled="record.status !== 0 && record.status !== 2"
v-for="v in record.childrenMaterial" v-for="v in record.childrenMaterial"
placeholder="请输入标题" placeholder="请输入标题"
@@ -132,6 +133,7 @@ const success = async () => {
<template v-slot:content="{record}"> <template v-slot:content="{record}">
<div class="flex flex-col gap-[12px]"> <div class="flex flex-col gap-[12px]">
<a-input <a-input
:max-length="vo.limit.desc_limit"
:disabled="record.status !== 0 && record.status !== 2" :disabled="record.status !== 0 && record.status !== 2"
v-for="v in record.childrenMaterial" v-for="v in record.childrenMaterial"
placeholder="请输入正文" placeholder="请输入正文"
@@ -143,6 +145,7 @@ const success = async () => {
<div class="flex flex-col gap-[12px]"> <div class="flex flex-col gap-[12px]">
<div class="flex gap-[12px]" v-for="v in record.childrenMaterial"> <div class="flex gap-[12px]" v-for="v in record.childrenMaterial">
<Talk v-model:model-value="v.tags" <Talk v-model:model-value="v.tags"
:limit="vo.limit.tags_limit"
:disabled="record.status !== 0 && record.status !== 2"></Talk> :disabled="record.status !== 0 && record.status !== 2"></Talk>
</div> </div>
</div> </div>

View File

@@ -9,6 +9,7 @@ export const useSystemStore = defineStore("SystemStore", () => {
const RoutesTemp = ref([]); const RoutesTemp = ref([]);
const NOW_ROUTER = ref(null); const NOW_ROUTER = ref(null);
const NOW_ROUTER_QUERY = reactive({}); const NOW_ROUTER_QUERY = reactive({});
const BUILD_MODE = ref(import.meta.env.VITE_BUILD_MODE);
const installRoute = async () => { const installRoute = async () => {
const routes = generateRouter(RoutesTemp.value); const routes = generateRouter(RoutesTemp.value);
@@ -86,6 +87,7 @@ export const useSystemStore = defineStore("SystemStore", () => {
installRoute, installRoute,
clearRouter, clearRouter,
updateRouterTag, updateRouterTag,
BUILD_MODE,
} }
}, { }, {
persist: { persist: {

View File

@@ -44,7 +44,8 @@ export default defineConfig({
'@': '/src' '@': '/src'
} }
}, server: { }, server: {
port: 9050, proxy: { host: '0.0.0.0',
proxy: {
'/baseApi': { '/baseApi': {
target: 'http://192.168.1.105', changeOrigin: true, rewrite: (path) => path.replace(/^\/baseApi/, ''), target: 'http://192.168.1.105', changeOrigin: true, rewrite: (path) => path.replace(/^\/baseApi/, ''),
} }