diff --git a/src/i18n/lang/zh_CN/layout.ts b/src/i18n/lang/zh_CN/layout.ts
index 623c3bc..124434f 100644
--- a/src/i18n/lang/zh_CN/layout.ts
+++ b/src/i18n/lang/zh_CN/layout.ts
@@ -1,7 +1,7 @@
const storeName = localStorage.getItem('StoreName') || 'WebSoft Inc';
/* 主框架 */
export default {
- system: '小程序开发',
+ system: '小程序商城',
home: '主页',
header: {
profile: '个人资料',
diff --git a/src/views/cms/cmsStatistics/index.vue b/src/views/cms/cmsStatistics/index.vue
index 00eba76..bf79e1e 100644
--- a/src/views/cms/cmsStatistics/index.vue
+++ b/src/views/cms/cmsStatistics/index.vue
@@ -87,7 +87,7 @@
// 系统信息
const systemInfo = ref({
- name: '小程序开发',
+ name: '小程序商城',
description:
'基于Spring、SpringBoot、SpringMVC等技术栈构建的前后端分离开发平台',
version: '2.0.0',
diff --git a/src/views/cms/dashboard/index.vue b/src/views/cms/dashboard/index.vue
index 8562bb8..2ac6584 100644
--- a/src/views/cms/dashboard/index.vue
+++ b/src/views/cms/dashboard/index.vue
@@ -228,7 +228,7 @@
// 系统信息
const systemInfo = ref({
- name: '小程序开发',
+ name: '小程序商城',
description:
'基于Spring、SpringBoot、SpringMVC等技术栈构建的前后端分离开发平台',
version: '2.0.0',
diff --git a/src/views/shop/dashboard/index.vue b/src/views/shop/dashboard/index.vue
index 7cdaa99..79ca4da 100644
--- a/src/views/shop/dashboard/index.vue
+++ b/src/views/shop/dashboard/index.vue
@@ -147,7 +147,7 @@
- {{ siteStore.appName }}
+ {{ systemInfo.name }}
{{ systemInfo.version }}
@@ -156,7 +156,7 @@
{{ siteStore.statusText || '正常' }}
- {{ siteInfo?.createTime }}
+ {{ tenantStore.company?.createTime || '-' }}
{{ siteInfo?.expirationTime }}
@@ -193,11 +193,11 @@
商品分类
-
+
优惠券管理
-
+
会员管理
@@ -237,8 +237,8 @@ import { message } from 'ant-design-vue/es';
import { useSiteStore } from '@/store/modules/site';
import { useStatisticsStore } from '@/store/modules/statistics';
import { useUserStore } from '@/store/modules/user';
+import { useTenantStore } from '@/store/modules/tenant';
import { pageShopOrder } from '@/api/shop/shopOrder';
-import { getTenantInfo } from '@/api/layout';
import { storeToRefs } from 'pinia';
import { removeSiteInfoCache } from '@/api/cms/cmsWebsite';
@@ -246,6 +246,7 @@ import { removeSiteInfoCache } from '@/api/cms/cmsWebsite';
const siteStore = useSiteStore();
const statisticsStore = useStatisticsStore();
const userStore = useUserStore();
+const tenantStore = useTenantStore();
const router = useRouter();
// 从 store 中获取响应式数据
@@ -263,11 +264,11 @@ const systemInfo = reactive({
// 计算属性
const now = ref(Date.now());
-const tenantCreateTime = ref('');
let runDaysTimer: ReturnType;
const runDays = computed(() => {
- if (!tenantCreateTime.value) return 0;
- return Math.floor((now.value - new Date(tenantCreateTime.value).getTime()) / (24 * 60 * 60 * 1000));
+ const createTime = tenantStore.company?.createTime;
+ if (!createTime) return 0;
+ return Math.floor((now.value - new Date(createTime).getTime()) / (24 * 60 * 60 * 1000));
});
const userCount = computed(() => statisticsStore.userCount);
const orderCount = computed(() => statisticsStore.orderCount);
@@ -311,11 +312,11 @@ const todayStats = computed(() => ({
// 快速入口
const quickLinks = [
- { to: '/shop/shopOrder', icon: '📦', label: '订单管理', bg: '#f0fdf4' },
+ { to: '/shop/shopOrder?tab=all', icon: '📦', label: '订单管理', bg: '#f0fdf4' },
{ to: '/shop/shopGoods', icon: '🏸', label: '商品管理', bg: '#ecfdf5' },
{ to: '/shop/shopGoodsCategory', icon: '🗂️', label: '商品分类', bg: '#eff6ff' },
- { to: '/shop/shopCoupon', icon: '🎁', label: '优惠券', bg: '#fff7ed' },
- { to: '/shop/shopUser', icon: '👥', label: '会员管理', bg: '#faf5ff' },
+ { to: '/market/coupon', icon: '🎁', label: '优惠券', bg: '#fff7ed' },
+ { to: '/system/user', icon: '👥', label: '会员管理', bg: '#faf5ff' },
{ to: '/shop/shopSetting', icon: '⚙️', label: '商城设置', bg: '#fefce8' },
];
@@ -362,13 +363,9 @@ const refreshStatistics = async () => {
// 加载数据
const loadData = async () => {
// 独立请求租户信息,不受其他请求失败影响
- getTenantInfo()
- .then((res) => {
- tenantCreateTime.value = res?.createTime || '';
- })
- .catch((e) => {
- console.warn('获取租户信息失败:', e);
- });
+ tenantStore.fetchTenantInfo().catch((e) => {
+ console.warn('获取租户信息失败:', e);
+ });
try {
await Promise.all([