update
This commit is contained in:
6
.env.admin
Normal file
6
.env.admin
Normal 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
6
.env.merchant
Normal 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
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) => {
|
||||
<a-input v-model:model-value="from.mobile" placeholder="手机号"></a-input>
|
||||
<VerificationCode
|
||||
:type="2"
|
||||
:api="BUILD_MODE==='merchant'?Api.merchant.sendSms:Api.admin.sendSms"
|
||||
v-if="mode === MODE.PHONE"
|
||||
:mobile="from.mobile"
|
||||
v-model:verification-code="from.code">
|
||||
@@ -63,8 +67,12 @@ const loginSYS = (isRoot, form) => {
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="flex flex-col mt-[50px] gap-[32px]">
|
||||
<a-button @click="loginSYS(false, from)" type="primary">登陆商户端</a-button>
|
||||
<a-button @click="loginSYS(true, from)" type="primary">登陆管理端</a-button>
|
||||
<a-button v-if="BUILD_MODE==='merchant'" @click="loginSYS(false, from)" type="primary">
|
||||
登陆商户端
|
||||
</a-button>
|
||||
<a-button v-if="BUILD_MODE==='admin'" @click="loginSYS(true, from)" type="primary">
|
||||
登陆管理端
|
||||
</a-button>
|
||||
<a-button
|
||||
@click="toPath('/loginSYS/register')"
|
||||
type="text">
|
||||
|
||||
@@ -122,6 +122,7 @@ const success = async () => {
|
||||
<template v-slot:title="{record}">
|
||||
<div class="flex flex-col gap-[12px]">
|
||||
<a-input
|
||||
:max-length="vo.limit.title_limit"
|
||||
:disabled="record.status !== 0 && record.status !== 2"
|
||||
v-for="v in record.childrenMaterial"
|
||||
placeholder="请输入标题"
|
||||
@@ -132,6 +133,7 @@ const success = async () => {
|
||||
<template v-slot:content="{record}">
|
||||
<div class="flex flex-col gap-[12px]">
|
||||
<a-input
|
||||
:max-length="vo.limit.desc_limit"
|
||||
:disabled="record.status !== 0 && record.status !== 2"
|
||||
v-for="v in record.childrenMaterial"
|
||||
placeholder="请输入正文"
|
||||
@@ -143,6 +145,7 @@ const success = async () => {
|
||||
<div class="flex flex-col gap-[12px]">
|
||||
<div class="flex gap-[12px]" v-for="v in record.childrenMaterial">
|
||||
<Talk v-model:model-value="v.tags"
|
||||
:limit="vo.limit.tags_limit"
|
||||
:disabled="record.status !== 0 && record.status !== 2"></Talk>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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/, ''),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user