use async load
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { axios } from "timi-web-api";
|
import { axios } from "timi-web-api/api/BaseAPI";
|
||||||
import type { Page, PageResult } from "timi-web-api";
|
import type { Page, PageResult } from "timi-web-api";
|
||||||
import type { Store, StoreBusinessDay } from "@/types/Store";
|
import type { Store, StoreBusinessDay } from "@/types/Store";
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import AppNavBar from "@/components/navbar/index.vue";
|
|||||||
import PageTransition from "@/components/PageTransition.vue";
|
import PageTransition from "@/components/PageTransition.vue";
|
||||||
import { useTabBarStore } from "@/store/tabBarStore";
|
import { useTabBarStore } from "@/store/tabBarStore";
|
||||||
import { permissionCodes } from "@/utils/permission";
|
import { permissionCodes } from "@/utils/permission";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
+12
-9
@@ -4,18 +4,20 @@ import router from "@/router";
|
|||||||
import Root from "@/Root.vue";
|
import Root from "@/Root.vue";
|
||||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||||
|
|
||||||
import "tdesign-mobile-vue/es/style/index.css";
|
import { configureUserStore, useUserStore } from "timi-web-api/store";
|
||||||
import "timi-web/style.css";
|
import Network from "timi-web-api/utils/Network";
|
||||||
import "timi-tdesign-mobile/style.css";
|
import { VCan, VRole } from "timi-web-api/utils/directives/Access";
|
||||||
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
||||||
import "@/assets/styles/tdesign-custom.css";
|
|
||||||
import "@/assets/styles/global.less";
|
|
||||||
import TimiWebUI from "timi-web";
|
|
||||||
import { configureUserStore, Network, useUserStore, VCan, VRole } from "timi-web-api";
|
|
||||||
import type { ApiResponse } from "timi-web-api";
|
import type { ApiResponse } from "timi-web-api";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import vEntranceTransition from "@/directives/entranceTransition";
|
import vEntranceTransition from "@/directives/entranceTransition";
|
||||||
|
|
||||||
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||||
|
import "tdesign-mobile-vue/es/style/index.css";
|
||||||
|
import "timi-web/style.css";
|
||||||
|
import "timi-tdesign-mobile/style.css";
|
||||||
|
import "@/assets/styles/tdesign-custom.css";
|
||||||
|
import "@/assets/styles/global.less";
|
||||||
|
|
||||||
export const pinia = createPinia();
|
export const pinia = createPinia();
|
||||||
const apiBaseURL = import.meta.env.VITE_API_BASE_URL as string | undefined;
|
const apiBaseURL = import.meta.env.VITE_API_BASE_URL as string | undefined;
|
||||||
|
|
||||||
@@ -47,7 +49,6 @@ Network.setGlobalRequestInterceptor((config: any) => {
|
|||||||
async function bootstrap(): Promise<void> {
|
async function bootstrap(): Promise<void> {
|
||||||
const app = createApp(Root);
|
const app = createApp(Root);
|
||||||
app.use(pinia);
|
app.use(pinia);
|
||||||
app.use(TimiWebUI);
|
|
||||||
app.directive("can", VCan);
|
app.directive("can", VCan);
|
||||||
app.directive("role", VRole);
|
app.directive("role", VRole);
|
||||||
app.directive("entrance-transition", vEntranceTransition);
|
app.directive("entrance-transition", vEntranceTransition);
|
||||||
@@ -64,6 +65,8 @@ async function bootstrap(): Promise<void> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
await router.isReady();
|
||||||
|
await import("timi-tdesign-mobile");
|
||||||
app.mount("#root");
|
app.mount("#root");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ const {
|
|||||||
} = useStoreChartWindow(dateTextList);
|
} = useStoreChartWindow(dateTextList);
|
||||||
const chartOption = computed<EChartsOption>(() => ({
|
const chartOption = computed<EChartsOption>(() => ({
|
||||||
...buildStoreBaseChartOption(visibleDateTextList.value),
|
...buildStoreBaseChartOption(visibleDateTextList.value),
|
||||||
|
grid: {
|
||||||
|
top: 48,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
@@ -76,6 +83,7 @@ const chartOption = computed<EChartsOption>(() => ({
|
|||||||
type: "line",
|
type: "line",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
showSymbol: false,
|
||||||
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0)
|
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -183,7 +191,7 @@ function getDateEnd(dateText: string): Date {
|
|||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
color: #0f172a;
|
color: #0f172a;
|
||||||
margin: 0 0 .875rem 0;
|
margin: 0 0 .5rem 0;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ export function buildStoreBaseChartOption(dateTextList: string[]): EChartsOption
|
|||||||
return {
|
return {
|
||||||
color: ["#2563eb", "#0f766e", "#d97706", "#db2777", "#7c3aed"],
|
color: ["#2563eb", "#0f766e", "#d97706", "#db2777", "#7c3aed"],
|
||||||
grid: {
|
grid: {
|
||||||
top: 48,
|
top: 0,
|
||||||
left: 12,
|
left: 0,
|
||||||
right: 12,
|
right: 0,
|
||||||
bottom: 12,
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
|||||||
+4
-7
@@ -1,8 +1,5 @@
|
|||||||
import { createRouter, createWebHistory, type RouteLocationNormalized } from "vue-router";
|
import { createRouter, createWebHistory, type RouteLocationNormalized } from "vue-router";
|
||||||
import RootLayout from "@/layout/RootLayout.vue";
|
import RootLayout from "@/layout/RootLayout.vue";
|
||||||
import MainLayout from "@/layout/MainLayout.vue";
|
|
||||||
import Login from "@/pages/user/LoginIndex.vue";
|
|
||||||
import InviteRegister from "@/pages/user/InviteRegister.vue";
|
|
||||||
import chartRoutes from "@/router/routes/chartRoutes";
|
import chartRoutes from "@/router/routes/chartRoutes";
|
||||||
import customerRoutes from "@/router/routes/customerRoutes";
|
import customerRoutes from "@/router/routes/customerRoutes";
|
||||||
import { managementAccountRoutes, managementSettingRoutes, storeRoutes } from "@/router/routes/managementRoutes";
|
import { managementAccountRoutes, managementSettingRoutes, storeRoutes } from "@/router/routes/managementRoutes";
|
||||||
@@ -19,7 +16,7 @@ import fulfillmentRoutes from "@/router/routes/fulfillmentRoutes";
|
|||||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||||
import { useGlobalUIStore } from "@/store/globalUI";
|
import { useGlobalUIStore } from "@/store/globalUI";
|
||||||
import { gaoRoleCodes } from "@/utils/permission";
|
import { gaoRoleCodes } from "@/utils/permission";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
const detailRoutes = [
|
const detailRoutes = [
|
||||||
...customerRoutes,
|
...customerRoutes,
|
||||||
@@ -62,7 +59,7 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "login",
|
path: "login",
|
||||||
name: "Login",
|
name: "Login",
|
||||||
component: Login,
|
component: () => import("@/pages/user/LoginIndex.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
@@ -74,7 +71,7 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "gao/invite/register",
|
path: "gao/invite/register",
|
||||||
name: "InviteRegister",
|
name: "InviteRegister",
|
||||||
component: InviteRegister,
|
component: () => import("@/pages/user/InviteRegister.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
@@ -85,7 +82,7 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: MainLayout,
|
component: () => import("@/layout/MainLayout.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import QuickSignInPage from "@/pages/home/QuickSignInPage.vue";
|
|
||||||
import EventRecordEdit from "@/pages/event/EventRecordEdit.vue";
|
|
||||||
import CustomerList from "@/pages/customer/CustomerList.vue";
|
|
||||||
import CustomerInviteRank from "@/pages/customer/CustomerInviteRank.vue";
|
|
||||||
import CustomerInviteRelation from "@/pages/customer/CustomerInviteRelation.vue";
|
|
||||||
import CustomerDetail from "@/pages/customer/CustomerDetail.vue";
|
|
||||||
import CustomerInviteeList from "@/pages/customer/CustomerInviteeList.vue";
|
|
||||||
import CustomerEdit from "@/pages/customer/CustomerEdit.vue";
|
|
||||||
|
|
||||||
const customerRoutes: RouteRecordRaw[] = [
|
const customerRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/customer/quick-sign-in",
|
path: "/customer/quick-sign-in",
|
||||||
name: "QuickSignInPage",
|
name: "QuickSignInPage",
|
||||||
component: QuickSignInPage,
|
component: () => import("@/pages/home/QuickSignInPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -26,7 +18,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/customer/registration",
|
path: "/customer/registration",
|
||||||
name: "CustomerEventRecordCreate",
|
name: "CustomerEventRecordCreate",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -40,7 +32,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers",
|
path: "/management/customers",
|
||||||
name: "CustomerList",
|
name: "CustomerList",
|
||||||
component: CustomerList,
|
component: () => import("@/pages/customer/CustomerList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -54,7 +46,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customer-invite-rank",
|
path: "/management/customer-invite-rank",
|
||||||
name: "CustomerInviteRank",
|
name: "CustomerInviteRank",
|
||||||
component: CustomerInviteRank,
|
component: () => import("@/pages/customer/CustomerInviteRank.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -68,7 +60,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customer-invite-relation",
|
path: "/management/customer-invite-relation",
|
||||||
name: "CustomerInviteRelation",
|
name: "CustomerInviteRelation",
|
||||||
component: CustomerInviteRelation,
|
component: () => import("@/pages/customer/CustomerInviteRelation.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -82,7 +74,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/create",
|
path: "/management/customers/create",
|
||||||
name: "CustomerCreate",
|
name: "CustomerCreate",
|
||||||
component: CustomerEdit,
|
component: () => import("@/pages/customer/CustomerEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -96,7 +88,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id",
|
path: "/management/customers/:id",
|
||||||
name: "CustomerDetail",
|
name: "CustomerDetail",
|
||||||
component: CustomerDetail,
|
component: () => import("@/pages/customer/CustomerDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -110,7 +102,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id/invitees",
|
path: "/management/customers/:id/invitees",
|
||||||
name: "CustomerInviteeList",
|
name: "CustomerInviteeList",
|
||||||
component: CustomerInviteeList,
|
component: () => import("@/pages/customer/CustomerInviteeList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -124,7 +116,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id/edit",
|
path: "/management/customers/:id/edit",
|
||||||
name: "CustomerEdit",
|
name: "CustomerEdit",
|
||||||
component: CustomerEdit,
|
component: () => import("@/pages/customer/CustomerEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import OrderFulfillmentList from "@/pages/fulfillment/OrderFulfillmentList.vue";
|
|
||||||
import OrderFulfillmentCreate from "@/pages/fulfillment/OrderFulfillmentCreate.vue";
|
|
||||||
import OrderFulfillmentDetail from "@/pages/fulfillment/OrderFulfillmentDetail.vue";
|
|
||||||
|
|
||||||
function meta(title: string, depth = 3): RouteRecordRaw["meta"] {
|
function meta(title: string, depth = 3): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: "#F5F5F8", darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: "#F5F5F8", darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/order-fulfillments", name: "OrderFulfillmentList", component: OrderFulfillmentList, meta: meta("统一履约") },
|
{ path: "/management/order-fulfillments", name: "OrderFulfillmentList", component: () => import("@/pages/fulfillment/OrderFulfillmentList.vue"), meta: meta("统一履约") },
|
||||||
{ path: "/management/order-fulfillments/create", name: "OrderFulfillmentCreate", component: OrderFulfillmentCreate, meta: meta("创建履约单", 4) },
|
{ path: "/management/order-fulfillments/create", name: "OrderFulfillmentCreate", component: () => import("@/pages/fulfillment/OrderFulfillmentCreate.vue"), meta: meta("创建履约单", 4) },
|
||||||
{ path: "/management/order-fulfillments/:id", name: "OrderFulfillmentDetail", component: OrderFulfillmentDetail, meta: meta("履约单详情", 4) }
|
{ path: "/management/order-fulfillments/:id", name: "OrderFulfillmentDetail", component: () => import("@/pages/fulfillment/OrderFulfillmentDetail.vue"), meta: meta("履约单详情", 4) }
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,28 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import About from "@/pages/setting/About.vue";
|
|
||||||
import Agreement from "@/pages/setting/Agreement.vue";
|
|
||||||
import AppSettings from "@/pages/setting/AppSettings.vue";
|
|
||||||
import NotifyList from "@/pages/notify/NotifyList.vue";
|
|
||||||
import NotifyCreate from "@/pages/notify/NotifyCreate.vue";
|
|
||||||
import NotifyDetail from "@/pages/notify/NotifyDetail.vue";
|
|
||||||
import NotifyRecipientList from "@/pages/notify/NotifyRecipientList.vue";
|
|
||||||
import UserProfile from "@/pages/user/UserProfile.vue";
|
|
||||||
import UserPassword from "@/pages/user/UserPassword.vue";
|
|
||||||
import CustomerQrCode from "@/pages/customer/CustomerQrCode.vue";
|
|
||||||
import StoreBusinessDayCalendar from "@/pages/store/StoreBusinessDayCalendar.vue";
|
|
||||||
import StoreEdit from "@/pages/store/StoreEdit.vue";
|
|
||||||
import StoreList from "@/pages/store/StoreList.vue";
|
|
||||||
import StoreSort from "@/pages/store/StoreSort.vue";
|
|
||||||
import StoreDiaryDetail from "@/pages/store/StoreDiaryDetail.vue";
|
|
||||||
import StoreDiaryEdit from "@/pages/store/StoreDiaryEdit.vue";
|
|
||||||
import StoreDiaryList from "@/pages/store/StoreDiaryList.vue";
|
|
||||||
import TagList from "@/pages/tag/TagList.vue";
|
|
||||||
|
|
||||||
export const storeRoutes: RouteRecordRaw[] = [
|
export const storeRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/stores",
|
path: "/management/stores",
|
||||||
name: "StoreList",
|
name: "StoreList",
|
||||||
component: StoreList,
|
component: () => import("@/pages/store/StoreList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -36,7 +18,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/create",
|
path: "/management/stores/create",
|
||||||
name: "StoreCreate",
|
name: "StoreCreate",
|
||||||
component: StoreEdit,
|
component: () => import("@/pages/store/StoreEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -50,7 +32,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/sort",
|
path: "/management/stores/sort",
|
||||||
name: "StoreSort",
|
name: "StoreSort",
|
||||||
component: StoreSort,
|
component: () => import("@/pages/store/StoreSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -64,7 +46,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/:id",
|
path: "/management/stores/:id",
|
||||||
name: "StoreEdit",
|
name: "StoreEdit",
|
||||||
component: StoreEdit,
|
component: () => import("@/pages/store/StoreEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -78,7 +60,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/:id/business-days",
|
path: "/management/stores/:id/business-days",
|
||||||
name: "StoreBusinessDayCalendar",
|
name: "StoreBusinessDayCalendar",
|
||||||
component: StoreBusinessDayCalendar,
|
component: () => import("@/pages/store/StoreBusinessDayCalendar.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -92,7 +74,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries",
|
path: "/management/store-diaries",
|
||||||
name: "StoreDiaryList",
|
name: "StoreDiaryList",
|
||||||
component: StoreDiaryList,
|
component: () => import("@/pages/store/StoreDiaryList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -106,7 +88,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/create",
|
path: "/management/store-diaries/create",
|
||||||
name: "StoreDiaryCreate",
|
name: "StoreDiaryCreate",
|
||||||
component: StoreDiaryEdit,
|
component: () => import("@/pages/store/StoreDiaryEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -120,7 +102,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/:id",
|
path: "/management/store-diaries/:id",
|
||||||
name: "StoreDiaryDetail",
|
name: "StoreDiaryDetail",
|
||||||
component: StoreDiaryDetail,
|
component: () => import("@/pages/store/StoreDiaryDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -134,7 +116,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/:id/edit",
|
path: "/management/store-diaries/:id/edit",
|
||||||
name: "StoreDiaryEdit",
|
name: "StoreDiaryEdit",
|
||||||
component: StoreDiaryEdit,
|
component: () => import("@/pages/store/StoreDiaryEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -151,7 +133,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about",
|
path: "/management/about",
|
||||||
name: "About",
|
name: "About",
|
||||||
component: About,
|
component: () => import("@/pages/setting/About.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -165,7 +147,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/service-agreement/:id",
|
path: "/management/about/service-agreement/:id",
|
||||||
name: "ServiceAgreement",
|
name: "ServiceAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -179,7 +161,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/privacy-agreement/:id",
|
path: "/management/about/privacy-agreement/:id",
|
||||||
name: "PrivacyAgreement",
|
name: "PrivacyAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -193,7 +175,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/open-source-agreement/:id",
|
path: "/management/about/open-source-agreement/:id",
|
||||||
name: "OpenSourceAgreement",
|
name: "OpenSourceAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -207,7 +189,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/settings",
|
path: "/management/settings",
|
||||||
name: "AppSettings",
|
name: "AppSettings",
|
||||||
component: AppSettings,
|
component: () => import("@/pages/setting/AppSettings.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -221,7 +203,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications",
|
path: "/management/notifications",
|
||||||
name: "NotifyList",
|
name: "NotifyList",
|
||||||
component: NotifyList,
|
component: () => import("@/pages/notify/NotifyList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -235,7 +217,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/create",
|
path: "/management/notifications/create",
|
||||||
name: "NotifyCreate",
|
name: "NotifyCreate",
|
||||||
component: NotifyCreate,
|
component: () => import("@/pages/notify/NotifyCreate.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -249,7 +231,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/:id",
|
path: "/management/notifications/:id",
|
||||||
name: "NotifyDetail",
|
name: "NotifyDetail",
|
||||||
component: NotifyDetail,
|
component: () => import("@/pages/notify/NotifyDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -263,7 +245,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/:id/recipients",
|
path: "/management/notifications/:id/recipients",
|
||||||
name: "NotifyRecipientList",
|
name: "NotifyRecipientList",
|
||||||
component: NotifyRecipientList,
|
component: () => import("@/pages/notify/NotifyRecipientList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -277,7 +259,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/tags",
|
path: "/management/tags",
|
||||||
name: "TagList",
|
name: "TagList",
|
||||||
component: TagList,
|
component: () => import("@/pages/tag/TagList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -294,7 +276,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/profile",
|
path: "/management/profile",
|
||||||
name: "UserProfile",
|
name: "UserProfile",
|
||||||
component: UserProfile,
|
component: () => import("@/pages/user/UserProfile.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -308,7 +290,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/profile/password",
|
path: "/management/profile/password",
|
||||||
name: "UserPassword",
|
name: "UserPassword",
|
||||||
component: UserPassword,
|
component: () => import("@/pages/user/UserPassword.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -322,7 +304,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/qr-code",
|
path: "/management/qr-code",
|
||||||
name: "CustomerQrCode",
|
name: "CustomerQrCode",
|
||||||
component: CustomerQrCode,
|
component: () => import("@/pages/customer/CustomerQrCode.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import UserNotifyDetail from "@/pages/notify/UserNotifyDetail.vue";
|
|
||||||
import UserNotifyList from "@/pages/notify/UserNotifyList.vue";
|
|
||||||
|
|
||||||
const notifyRoutes: RouteRecordRaw[] = [
|
const notifyRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/notify",
|
path: "/notify",
|
||||||
name: "UserNotifyList",
|
name: "UserNotifyList",
|
||||||
component: UserNotifyList,
|
component: () => import("@/pages/notify/UserNotifyList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -20,7 +18,7 @@ const notifyRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/notify/:id",
|
path: "/notify/:id",
|
||||||
name: "UserNotifyDetail",
|
name: "UserNotifyDetail",
|
||||||
component: UserNotifyDetail,
|
component: () => import("@/pages/notify/UserNotifyDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PackageConfigList from "@/pages/package/PackageConfigList.vue";
|
|
||||||
import PackageConfigEdit from "@/pages/package/PackageConfigEdit.vue";
|
|
||||||
import PackageConfigDetail from "@/pages/package/PackageConfigDetail.vue";
|
|
||||||
import PackagePurchase from "@/pages/package/PackagePurchase.vue";
|
|
||||||
|
|
||||||
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/package-configs", name: "PackageConfigList", component: PackageConfigList, meta: pageMeta("套餐配置") },
|
{ path: "/management/package-configs", name: "PackageConfigList", component: () => import("@/pages/package/PackageConfigList.vue"), meta: pageMeta("套餐配置") },
|
||||||
{ path: "/management/package-configs/create", name: "PackageConfigCreate", component: PackageConfigEdit, meta: pageMeta("新增套餐配置", 4) },
|
{ path: "/management/package-configs/create", name: "PackageConfigCreate", component: () => import("@/pages/package/PackageConfigEdit.vue"), meta: pageMeta("新增套餐配置", 4) },
|
||||||
{ path: "/management/package-configs/:id", name: "PackageConfigDetail", component: PackageConfigDetail, meta: pageMeta("套餐配置详情", 4) },
|
{ path: "/management/package-configs/:id", name: "PackageConfigDetail", component: () => import("@/pages/package/PackageConfigDetail.vue"), meta: pageMeta("套餐配置详情", 4) },
|
||||||
{ path: "/management/package-configs/:id/edit", name: "PackageConfigEdit", component: PackageConfigEdit, meta: pageMeta("编辑套餐配置", 5) },
|
{ path: "/management/package-configs/:id/edit", name: "PackageConfigEdit", component: () => import("@/pages/package/PackageConfigEdit.vue"), meta: pageMeta("编辑套餐配置", 5) },
|
||||||
{ path: "/management/package-configs/:id/purchase", name: "PackagePurchase", component: PackagePurchase, meta: pageMeta("购买套餐", 5) },
|
{ path: "/management/package-configs/:id/purchase", name: "PackagePurchase", component: () => import("@/pages/package/PackagePurchase.vue"), meta: pageMeta("购买套餐", 5) },
|
||||||
{ path: "/management/customer-packages/create", name: "CustomerPackageCreate", component: PackagePurchase, meta: pageMeta("创建客户套餐", 4) }
|
{ path: "/management/customer-packages/create", name: "CustomerPackageCreate", component: () => import("@/pages/package/PackagePurchase.vue"), meta: pageMeta("创建客户套餐", 4) }
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PermissionSettings from "@/pages/permission/PermissionSettings.vue";
|
|
||||||
import RoleList from "@/pages/permission/RoleList.vue";
|
|
||||||
import RoleEdit from "@/pages/permission/RoleEdit.vue";
|
|
||||||
import PermissionList from "@/pages/permission/PermissionList.vue";
|
|
||||||
import RolePermissionAssign from "@/pages/permission/RolePermissionAssign.vue";
|
|
||||||
import RoleDelegationPermissionAssign from "@/pages/permission/RoleDelegationPermissionAssign.vue";
|
|
||||||
import UserRoleAssign from "@/pages/user/UserRoleAssign.vue";
|
|
||||||
|
|
||||||
const permissionRoutes: RouteRecordRaw[] = [
|
const permissionRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/permissions",
|
path: "/management/permissions",
|
||||||
name: "PermissionSettings",
|
name: "PermissionSettings",
|
||||||
component: PermissionSettings,
|
component: () => import("@/pages/permission/PermissionSettings.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -25,7 +18,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles",
|
path: "/management/permissions/roles",
|
||||||
name: "RoleList",
|
name: "RoleList",
|
||||||
component: RoleList,
|
component: () => import("@/pages/permission/RoleList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -39,7 +32,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/create",
|
path: "/management/permissions/roles/create",
|
||||||
name: "RoleCreate",
|
name: "RoleCreate",
|
||||||
component: RoleEdit,
|
component: () => import("@/pages/permission/RoleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -53,7 +46,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id",
|
path: "/management/permissions/roles/:id",
|
||||||
name: "RoleEdit",
|
name: "RoleEdit",
|
||||||
component: RoleEdit,
|
component: () => import("@/pages/permission/RoleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -67,7 +60,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id/assign/p",
|
path: "/management/permissions/roles/:id/assign/p",
|
||||||
name: "RolePermissionAssignFromRole",
|
name: "RolePermissionAssignFromRole",
|
||||||
component: RolePermissionAssign,
|
component: () => import("@/pages/permission/RolePermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 6,
|
depth: 6,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -81,7 +74,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id/assign/d",
|
path: "/management/permissions/roles/:id/assign/d",
|
||||||
name: "RoleDelegationPermissionAssignFromRole",
|
name: "RoleDelegationPermissionAssignFromRole",
|
||||||
component: RoleDelegationPermissionAssign,
|
component: () => import("@/pages/permission/RoleDelegationPermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 6,
|
depth: 6,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -95,7 +88,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/items",
|
path: "/management/permissions/items",
|
||||||
name: "PermissionList",
|
name: "PermissionList",
|
||||||
component: PermissionList,
|
component: () => import("@/pages/permission/PermissionList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -113,7 +106,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/assign/p",
|
path: "/management/permissions/assign/p",
|
||||||
name: "RolePermissionAssign",
|
name: "RolePermissionAssign",
|
||||||
component: RolePermissionAssign,
|
component: () => import("@/pages/permission/RolePermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -127,7 +120,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/assign/d",
|
path: "/management/permissions/assign/d",
|
||||||
name: "RoleDelegationPermissionAssign",
|
name: "RoleDelegationPermissionAssign",
|
||||||
component: RoleDelegationPermissionAssign,
|
component: () => import("@/pages/permission/RoleDelegationPermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -141,7 +134,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/user-roles",
|
path: "/management/permissions/user-roles",
|
||||||
name: "UserRoleAssign",
|
name: "UserRoleAssign",
|
||||||
component: UserRoleAssign,
|
component: () => import("@/pages/user/UserRoleAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,19 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PointAccountDetail from "@/pages/point/PointAccountDetail.vue";
|
|
||||||
import PointAccountList from "@/pages/point/PointAccountList.vue";
|
|
||||||
import PointAdjust from "@/pages/point/PointAdjust.vue";
|
|
||||||
import PointLedgerDetail from "@/pages/point/PointLedgerDetail.vue";
|
|
||||||
import PointLedgerList from "@/pages/point/PointLedgerList.vue";
|
|
||||||
import PointRuleDetail from "@/pages/point/PointRuleDetail.vue";
|
|
||||||
import PointRuleEdit from "@/pages/point/PointRuleEdit.vue";
|
|
||||||
import PointRuleList from "@/pages/point/PointRuleList.vue";
|
|
||||||
import PointRuleSort from "@/pages/point/PointRuleSort.vue";
|
|
||||||
|
|
||||||
const pointRoutes: RouteRecordRaw[] = [
|
const pointRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/points/account",
|
path: "/management/points/account",
|
||||||
name: "PointAccountList",
|
name: "PointAccountList",
|
||||||
component: PointAccountList,
|
component: () => import("@/pages/point/PointAccountList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -27,7 +18,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/account/:id",
|
path: "/management/points/account/:id",
|
||||||
name: "PointAccountDetail",
|
name: "PointAccountDetail",
|
||||||
component: PointAccountDetail,
|
component: () => import("@/pages/point/PointAccountDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -41,7 +32,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/sort",
|
path: "/management/points/rules/sort",
|
||||||
name: "PointRuleSort",
|
name: "PointRuleSort",
|
||||||
component: PointRuleSort,
|
component: () => import("@/pages/point/PointRuleSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -55,7 +46,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/ledger",
|
path: "/management/points/ledger",
|
||||||
name: "PointLedgerList",
|
name: "PointLedgerList",
|
||||||
component: PointLedgerList,
|
component: () => import("@/pages/point/PointLedgerList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -69,7 +60,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/ledger/:id",
|
path: "/management/points/ledger/:id",
|
||||||
name: "PointLedgerDetail",
|
name: "PointLedgerDetail",
|
||||||
component: PointLedgerDetail,
|
component: () => import("@/pages/point/PointLedgerDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -83,7 +74,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/adjust",
|
path: "/management/points/adjust",
|
||||||
name: "PointAdjust",
|
name: "PointAdjust",
|
||||||
component: PointAdjust,
|
component: () => import("@/pages/point/PointAdjust.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -97,7 +88,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules",
|
path: "/management/points/rules",
|
||||||
name: "PointRuleList",
|
name: "PointRuleList",
|
||||||
component: PointRuleList,
|
component: () => import("@/pages/point/PointRuleList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -111,7 +102,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/create",
|
path: "/management/points/rules/create",
|
||||||
name: "PointRuleCreate",
|
name: "PointRuleCreate",
|
||||||
component: PointRuleEdit,
|
component: () => import("@/pages/point/PointRuleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -125,7 +116,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/:id",
|
path: "/management/points/rules/:id",
|
||||||
name: "PointRuleDetail",
|
name: "PointRuleDetail",
|
||||||
component: PointRuleDetail,
|
component: () => import("@/pages/point/PointRuleDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -139,7 +130,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/:id/edit",
|
path: "/management/points/rules/:id/edit",
|
||||||
name: "PointRuleEdit",
|
name: "PointRuleEdit",
|
||||||
component: PointRuleEdit,
|
component: () => import("@/pages/point/PointRuleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import ProductCategoryList from "@/pages/product/ProductCategoryList.vue";
|
|
||||||
import ProductCategoryRank from "@/pages/product/ProductCategoryRank.vue";
|
|
||||||
import ProductDetail from "@/pages/product/ProductDetail.vue";
|
|
||||||
import ProductEdit from "@/pages/product/ProductEdit.vue";
|
|
||||||
import ProductList from "@/pages/product/ProductList.vue";
|
|
||||||
import ProductStockDetail from "@/pages/product/ProductStockDetail.vue";
|
|
||||||
import ProductStockList from "@/pages/product/ProductStockList.vue";
|
|
||||||
import ProductStockSkuList from "@/pages/product/ProductStockSkuList.vue";
|
|
||||||
import ProductStockRecordDetail from "@/pages/product/ProductStockRecordDetail.vue";
|
|
||||||
import ProductStockRecordList from "@/pages/product/ProductStockRecordList.vue";
|
|
||||||
|
|
||||||
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return {
|
return {
|
||||||
@@ -26,67 +16,67 @@ const productRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/product-categories",
|
path: "/management/product-categories",
|
||||||
name: "ProductCategoryList",
|
name: "ProductCategoryList",
|
||||||
component: ProductCategoryList,
|
component: () => import("@/pages/product/ProductCategoryList.vue"),
|
||||||
meta: pageMeta("产品分类")
|
meta: pageMeta("产品分类")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-categories/rank",
|
path: "/management/product-categories/rank",
|
||||||
name: "ProductCategoryRank",
|
name: "ProductCategoryRank",
|
||||||
component: ProductCategoryRank,
|
component: () => import("@/pages/product/ProductCategoryRank.vue"),
|
||||||
meta: pageMeta("产品分类排序", 4)
|
meta: pageMeta("产品分类排序", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products",
|
path: "/management/products",
|
||||||
name: "ProductList",
|
name: "ProductList",
|
||||||
component: ProductList,
|
component: () => import("@/pages/product/ProductList.vue"),
|
||||||
meta: pageMeta("产品库")
|
meta: pageMeta("产品库")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/create",
|
path: "/management/products/create",
|
||||||
name: "ProductCreate",
|
name: "ProductCreate",
|
||||||
component: ProductEdit,
|
component: () => import("@/pages/product/ProductEdit.vue"),
|
||||||
meta: pageMeta("新增产品", 4)
|
meta: pageMeta("新增产品", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/:id",
|
path: "/management/products/:id",
|
||||||
name: "ProductDetail",
|
name: "ProductDetail",
|
||||||
component: ProductDetail,
|
component: () => import("@/pages/product/ProductDetail.vue"),
|
||||||
meta: pageMeta("产品详情", 4)
|
meta: pageMeta("产品详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/:id/edit",
|
path: "/management/products/:id/edit",
|
||||||
name: "ProductEdit",
|
name: "ProductEdit",
|
||||||
component: ProductEdit,
|
component: () => import("@/pages/product/ProductEdit.vue"),
|
||||||
meta: pageMeta("编辑产品", 5)
|
meta: pageMeta("编辑产品", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks",
|
path: "/management/product-stocks",
|
||||||
name: "ProductStockList",
|
name: "ProductStockList",
|
||||||
component: ProductStockList,
|
component: () => import("@/pages/product/ProductStockList.vue"),
|
||||||
meta: pageMeta("选择产品")
|
meta: pageMeta("选择产品")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks/:productId/skus",
|
path: "/management/product-stocks/:productId/skus",
|
||||||
name: "ProductStockSkuList",
|
name: "ProductStockSkuList",
|
||||||
component: ProductStockSkuList,
|
component: () => import("@/pages/product/ProductStockSkuList.vue"),
|
||||||
meta: pageMeta("选择 SKU", 4)
|
meta: pageMeta("选择 SKU", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stock-records",
|
path: "/management/product-stock-records",
|
||||||
name: "ProductStockRecordList",
|
name: "ProductStockRecordList",
|
||||||
component: ProductStockRecordList,
|
component: () => import("@/pages/product/ProductStockRecordList.vue"),
|
||||||
meta: pageMeta("库存流水")
|
meta: pageMeta("库存流水")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stock-records/:id",
|
path: "/management/product-stock-records/:id",
|
||||||
name: "ProductStockRecordDetail",
|
name: "ProductStockRecordDetail",
|
||||||
component: ProductStockRecordDetail,
|
component: () => import("@/pages/product/ProductStockRecordDetail.vue"),
|
||||||
meta: pageMeta("库存流水详情", 4)
|
meta: pageMeta("库存流水详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks/:skuId",
|
path: "/management/product-stocks/:skuId",
|
||||||
name: "ProductStockDetail",
|
name: "ProductStockDetail",
|
||||||
component: ProductStockDetail,
|
component: () => import("@/pages/product/ProductStockDetail.vue"),
|
||||||
meta: pageMeta("库存详情", 5)
|
meta: pageMeta("库存详情", 5)
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import EventDetail from "@/pages/event/EventDetail.vue";
|
|
||||||
import EventEdit from "@/pages/event/EventEdit.vue";
|
|
||||||
import eventList from "@/pages/event/EventList.vue";
|
|
||||||
import EventSort from "@/pages/event/EventSort.vue";
|
|
||||||
import EventRecordDetail from "@/pages/event/EventRecordDetail.vue";
|
|
||||||
import EventRecordEdit from "@/pages/event/EventRecordEdit.vue";
|
|
||||||
import EventRecordList from "@/pages/event/EventRecordList.vue";
|
|
||||||
import EventRecordRank from "@/pages/event/EventRecordRank.vue";
|
|
||||||
|
|
||||||
const registrationRoutes: RouteRecordRaw[] = [
|
const registrationRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/registration-events",
|
path: "/management/registration-events",
|
||||||
name: "eventList",
|
name: "eventList",
|
||||||
component: eventList,
|
component: () => import("@/pages/event/EventList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -26,7 +18,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/sort",
|
path: "/management/registration-events/sort",
|
||||||
name: "EventSort",
|
name: "EventSort",
|
||||||
component: EventSort,
|
component: () => import("@/pages/event/EventSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -40,7 +32,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/create",
|
path: "/management/registration-events/create",
|
||||||
name: "EventCreate",
|
name: "EventCreate",
|
||||||
component: EventEdit,
|
component: () => import("@/pages/event/EventEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -54,7 +46,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/:id",
|
path: "/management/registration-events/:id",
|
||||||
name: "EventDetail",
|
name: "EventDetail",
|
||||||
component: EventDetail,
|
component: () => import("@/pages/event/EventDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -68,7 +60,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/:id/edit",
|
path: "/management/registration-events/:id/edit",
|
||||||
name: "EventEdit",
|
name: "EventEdit",
|
||||||
component: EventEdit,
|
component: () => import("@/pages/event/EventEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -82,7 +74,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records",
|
path: "/management/registration-event-records",
|
||||||
name: "EventRecordList",
|
name: "EventRecordList",
|
||||||
component: EventRecordList,
|
component: () => import("@/pages/event/EventRecordList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -96,7 +88,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-record-rank",
|
path: "/management/registration-event-record-rank",
|
||||||
name: "EventRecordRank",
|
name: "EventRecordRank",
|
||||||
component: EventRecordRank,
|
component: () => import("@/pages/event/EventRecordRank.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -110,7 +102,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/create",
|
path: "/management/registration-event-records/create",
|
||||||
name: "EventRecordCreate",
|
name: "EventRecordCreate",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -124,7 +116,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/:id",
|
path: "/management/registration-event-records/:id",
|
||||||
name: "EventRecordDetail",
|
name: "EventRecordDetail",
|
||||||
component: EventRecordDetail,
|
component: () => import("@/pages/event/EventRecordDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -138,7 +130,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/:id/edit",
|
path: "/management/registration-event-records/:id/edit",
|
||||||
name: "EventRecordEdit",
|
name: "EventRecordEdit",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,70 +1,59 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import SalesOrderList from "@/pages/salesOrder/SalesOrderList.vue";
|
|
||||||
import SalesOrderCreate from "@/pages/salesOrder/SalesOrderCreate.vue";
|
|
||||||
import SalesOrderDetail from "@/pages/salesOrder/SalesOrderDetail.vue";
|
|
||||||
import SalesOrderPayment from "@/pages/salesOrder/SalesOrderPayment.vue";
|
|
||||||
import SalesOrderRefund from "@/pages/salesOrder/SalesOrderRefund.vue";
|
|
||||||
import SalesOrderNoRefund from "@/pages/salesOrder/SalesOrderNoRefund.vue";
|
|
||||||
import SalesOrderCancel from "@/pages/salesOrder/SalesOrderCancel.vue";
|
|
||||||
import FundRecordList from "@/pages/salesOrder/FundRecordList.vue";
|
|
||||||
import FundRecordDetail from "@/pages/salesOrder/FundRecordDetail.vue";
|
|
||||||
import FundRecordRevoke from "@/pages/salesOrder/FundRecordRevoke.vue";
|
|
||||||
import ConsumptionRecordList from "@/pages/salesOrder/ConsumptionRecordList.vue";
|
|
||||||
|
|
||||||
function meta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function meta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/sales-orders", name: "SalesOrderList", component: SalesOrderList, meta: meta("销售订单") },
|
{ path: "/management/sales-orders", name: "SalesOrderList", component: () => import("@/pages/salesOrder/SalesOrderList.vue"), meta: meta("销售订单") },
|
||||||
{ path: "/management/consumption-records", name: "ConsumptionRecordList", component: ConsumptionRecordList, meta: meta("消费记录") },
|
{ path: "/management/consumption-records", name: "ConsumptionRecordList", component: () => import("@/pages/salesOrder/ConsumptionRecordList.vue"), meta: meta("消费记录") },
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/create",
|
path: "/management/sales-orders/create",
|
||||||
name: "SalesOrderCreate",
|
name: "SalesOrderCreate",
|
||||||
component: SalesOrderCreate,
|
component: () => import("@/pages/salesOrder/SalesOrderCreate.vue"),
|
||||||
meta: meta("直接产品下单", 4)
|
meta: meta("直接产品下单", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id",
|
path: "/management/sales-orders/:id",
|
||||||
name: "SalesOrderDetail",
|
name: "SalesOrderDetail",
|
||||||
component: SalesOrderDetail,
|
component: () => import("@/pages/salesOrder/SalesOrderDetail.vue"),
|
||||||
meta: meta("销售订单详情", 4)
|
meta: meta("销售订单详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/payment",
|
path: "/management/sales-orders/:id/payment",
|
||||||
name: "SalesOrderPayment",
|
name: "SalesOrderPayment",
|
||||||
component: SalesOrderPayment,
|
component: () => import("@/pages/salesOrder/SalesOrderPayment.vue"),
|
||||||
meta: meta("登记收款", 5)
|
meta: meta("登记收款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/refund",
|
path: "/management/sales-orders/:id/refund",
|
||||||
name: "SalesOrderRefund",
|
name: "SalesOrderRefund",
|
||||||
component: SalesOrderRefund,
|
component: () => import("@/pages/salesOrder/SalesOrderRefund.vue"),
|
||||||
meta: meta("登记退款", 5)
|
meta: meta("登记退款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/no-refund",
|
path: "/management/sales-orders/:id/no-refund",
|
||||||
name: "SalesOrderNoRefund",
|
name: "SalesOrderNoRefund",
|
||||||
component: SalesOrderNoRefund,
|
component: () => import("@/pages/salesOrder/SalesOrderNoRefund.vue"),
|
||||||
meta: meta("确认无需退款", 5)
|
meta: meta("确认无需退款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/cancel",
|
path: "/management/sales-orders/:id/cancel",
|
||||||
name: "SalesOrderCancel",
|
name: "SalesOrderCancel",
|
||||||
component: SalesOrderCancel,
|
component: () => import("@/pages/salesOrder/SalesOrderCancel.vue"),
|
||||||
meta: meta("取消销售订单", 5)
|
meta: meta("取消销售订单", 5)
|
||||||
},
|
},
|
||||||
{ path: "/management/fund-records", name: "FundRecordList", component: FundRecordList, meta: meta("资金流水") },
|
{ path: "/management/fund-records", name: "FundRecordList", component: () => import("@/pages/salesOrder/FundRecordList.vue"), meta: meta("资金流水") },
|
||||||
{
|
{
|
||||||
path: "/management/fund-records/:id",
|
path: "/management/fund-records/:id",
|
||||||
name: "FundRecordDetail",
|
name: "FundRecordDetail",
|
||||||
component: FundRecordDetail,
|
component: () => import("@/pages/salesOrder/FundRecordDetail.vue"),
|
||||||
meta: meta("资金记录详情", 4)
|
meta: meta("资金记录详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/fund-records/:id/revoke",
|
path: "/management/fund-records/:id/revoke",
|
||||||
name: "FundRecordRevoke",
|
name: "FundRecordRevoke",
|
||||||
component: FundRecordRevoke,
|
component: () => import("@/pages/salesOrder/FundRecordRevoke.vue"),
|
||||||
meta: meta("资金冲正", 5)
|
meta: meta("资金冲正", 5)
|
||||||
}
|
}
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import HomeTab from "@/pages/tabs/HomeTab.vue";
|
|
||||||
import ProductTab from "@/pages/tabs/ProductTab.vue";
|
|
||||||
import SettingTab from "@/pages/tabs/SettingTab.vue";
|
|
||||||
import StoreTab from "@/pages/tabs/StoreTab.vue";
|
|
||||||
|
|
||||||
const tabRoutes: RouteRecordRaw[] = [
|
const tabRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/customers",
|
path: "/customers",
|
||||||
name: "HomeTab",
|
name: "HomeTab",
|
||||||
component: HomeTab,
|
component: () => import("@/pages/tabs/HomeTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -22,7 +18,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/store",
|
path: "/store",
|
||||||
name: "StoreTab",
|
name: "StoreTab",
|
||||||
component: StoreTab,
|
component: () => import("@/pages/tabs/StoreTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -36,7 +32,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/product",
|
path: "/product",
|
||||||
name: "ProductTab",
|
name: "ProductTab",
|
||||||
component: ProductTab,
|
component: () => import("@/pages/tabs/ProductTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -50,7 +46,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management",
|
path: "/management",
|
||||||
name: "SettingTab",
|
name: "SettingTab",
|
||||||
component: SettingTab,
|
component: () => import("@/pages/tabs/SettingTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import UserList from "@/pages/user/UserList.vue";
|
|
||||||
import UserDetail from "@/pages/user/UserDetail.vue";
|
|
||||||
import UserEdit from "@/pages/user/UserEdit.vue";
|
|
||||||
import UserRoleAssign from "@/pages/user/UserRoleAssign.vue";
|
|
||||||
import UserInvitePoster from "@/pages/user/UserInvitePoster.vue";
|
|
||||||
|
|
||||||
const userRoutes: RouteRecordRaw[] = [
|
const userRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/users/invite/poster",
|
path: "/management/users/invite/poster",
|
||||||
name: "UserInvitePoster",
|
name: "UserInvitePoster",
|
||||||
component: UserInvitePoster,
|
component: () => import("@/pages/user/UserInvitePoster.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -23,7 +18,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users",
|
path: "/management/users",
|
||||||
name: "UserList",
|
name: "UserList",
|
||||||
component: UserList,
|
component: () => import("@/pages/user/UserList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -37,7 +32,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/create",
|
path: "/management/users/create",
|
||||||
name: "UserCreatePage",
|
name: "UserCreatePage",
|
||||||
component: UserEdit,
|
component: () => import("@/pages/user/UserEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -51,7 +46,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id",
|
path: "/management/users/:id",
|
||||||
name: "UserDetail",
|
name: "UserDetail",
|
||||||
component: UserDetail,
|
component: () => import("@/pages/user/UserDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -65,7 +60,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id/edit",
|
path: "/management/users/:id/edit",
|
||||||
name: "UserEdit",
|
name: "UserEdit",
|
||||||
component: UserEdit,
|
component: () => import("@/pages/user/UserEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -79,7 +74,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id/roles",
|
path: "/management/users/:id/roles",
|
||||||
name: "UserRoleAssignFromUser",
|
name: "UserRoleAssignFromUser",
|
||||||
component: UserRoleAssign,
|
component: () => import("@/pages/user/UserRoleAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
import StoreAPI from "@/api/StoreAPI";
|
import StoreAPI from "@/api/StoreAPI";
|
||||||
import type { Store } from "@/types/Store";
|
import type { Store } from "@/types/Store";
|
||||||
import { gaoRoleCodes, gaoStoreScopePermissionCodes } from "@/utils/permission";
|
import { gaoRoleCodes, gaoStoreScopePermissionCodes } from "@/utils/permission";
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import {
|
import { PermissionAPI } from "timi-web-api/api/PermissionAPI";
|
||||||
PermissionAPI,
|
import { RoleAPI } from "timi-web-api/api/RoleAPI";
|
||||||
RoleAPI,
|
import type { ModuleCode, PermissionPayload, Role as UserRole } from "timi-web-api/types";
|
||||||
type ModuleCode,
|
|
||||||
type PermissionPayload,
|
|
||||||
type Role as UserRole
|
|
||||||
} from "timi-web-api";
|
|
||||||
import type {
|
import type {
|
||||||
Permission,
|
Permission,
|
||||||
PermissionDraft,
|
PermissionDraft,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MessagePlugin as TDesignMessage } from "tdesign-mobile-vue";
|
import { MessagePlugin as TDesignMessage } from "tdesign-mobile-vue/es/message";
|
||||||
import type { MessagePluginOptions } from "tdesign-mobile-vue/es/message/message";
|
import type { MessagePluginOptions } from "tdesign-mobile-vue/es/message/message";
|
||||||
|
|
||||||
/** Message 支持的调用参数。 */
|
/** Message 支持的调用参数。 */
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
import type { StoreBusinessDayStatus, StoreStatus } from "@/types/Store";
|
import type { StoreBusinessDayStatus, StoreStatus } from "@/types/Store";
|
||||||
import { permissionCodes } from "@/utils/permission";
|
import { permissionCodes } from "@/utils/permission";
|
||||||
import { type Page, useUserStore } from "timi-web-api";
|
import type { Page } from "timi-web-api/types";
|
||||||
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
|
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
|
||||||
export const loginStoreIdStorageKey = "gao-customer-h5:login-store-id";
|
export const loginStoreIdStorageKey = "gao-customer-h5:login-store-id";
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 客户端实际使用的 timi-web 能力出口。
|
||||||
|
*
|
||||||
|
* 不从 timi-web 根入口导入,避免把编辑器、弹窗和未使用组件带入公共包。
|
||||||
|
*/
|
||||||
|
export { default as Captcha } from "../../../timi-web/src/components/captcha";
|
||||||
|
export { default as ContactNumber } from "../../../timi-web/src/components/contact-number";
|
||||||
|
export { default as Copyright } from "../../../timi-web/src/components/copyright";
|
||||||
|
export { default as MarkdownEditor } from "../../../timi-web/src/components/markdown-editor";
|
||||||
|
export { default as MarkdownView } from "../../../timi-web/src/components/markdown-view";
|
||||||
|
export { default as PassTimeLabel } from "../../../timi-web/src/components/passtime-label";
|
||||||
|
|
||||||
|
export { default as Cooker } from "../../../timi-web/src/utils/Cooker";
|
||||||
|
export { default as Storage } from "../../../timi-web/src/utils/Storage";
|
||||||
|
export { default as WebToolkit } from "../../../timi-web/src/utils/WebToolkit";
|
||||||
|
|
||||||
|
export { Text, Time, Toolkit } from "../../../timi-ts/src/index";
|
||||||
+10
-1
@@ -6,11 +6,12 @@ import Components from "unplugin-vue-components/vite";
|
|||||||
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
||||||
|
|
||||||
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
||||||
const localTimiWebModule = fileURLToPath(new URL("../timi-web/dist/timi-web.mjs", import.meta.url));
|
const localTimiWebModule = fileURLToPath(new URL("./src/utils/timiWeb.ts", import.meta.url));
|
||||||
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
||||||
const localTimiWebEditor = fileURLToPath(new URL("../timi-web/src/editor/index.ts", import.meta.url));
|
const localTimiWebEditor = fileURLToPath(new URL("../timi-web/src/editor/index.ts", import.meta.url));
|
||||||
const localTimiWebApiRoot = fileURLToPath(new URL("../timi-web-api", import.meta.url));
|
const localTimiWebApiRoot = fileURLToPath(new URL("../timi-web-api", import.meta.url));
|
||||||
const localTimiWebApiModule = fileURLToPath(new URL("../timi-web-api/dist/index.js", import.meta.url));
|
const localTimiWebApiModule = fileURLToPath(new URL("../timi-web-api/dist/index.js", import.meta.url));
|
||||||
|
const localTimiTsModule = fileURLToPath(new URL("../timi-ts/src/index.ts", import.meta.url));
|
||||||
const localTimiTDesignMobileRoot = fileURLToPath(new URL("../timi-tdesign-mobile", import.meta.url));
|
const localTimiTDesignMobileRoot = fileURLToPath(new URL("../timi-tdesign-mobile", import.meta.url));
|
||||||
const localTimiTDesignMobileModule = fileURLToPath(new URL("../timi-tdesign-mobile/src/index.ts", import.meta.url));
|
const localTimiTDesignMobileModule = fileURLToPath(new URL("../timi-tdesign-mobile/src/index.ts", import.meta.url));
|
||||||
const localTimiTDesignMobileStyle = fileURLToPath(new URL("../timi-tdesign-mobile/dist/timi-tdesign-mobile.css", import.meta.url));
|
const localTimiTDesignMobileStyle = fileURLToPath(new URL("../timi-tdesign-mobile/dist/timi-tdesign-mobile.css", import.meta.url));
|
||||||
@@ -52,6 +53,14 @@ export default defineConfig(({ mode }) => {
|
|||||||
find: /^timi-web-api\//,
|
find: /^timi-web-api\//,
|
||||||
replacement: `${localTimiWebApiRoot}/dist/`
|
replacement: `${localTimiWebApiRoot}/dist/`
|
||||||
},
|
},
|
||||||
|
...(useLocalTimiWeb
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
find: /^timi-ts$/,
|
||||||
|
replacement: localTimiTsModule
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: []),
|
||||||
...(useLocalTimiTDesignMobile
|
...(useLocalTimiTDesignMobile
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user