|
|
|
|
@@ -147,7 +147,7 @@
|
|
|
|
|
<div style="padding: 16px 18px;">
|
|
|
|
|
<a-descriptions :column="1" size="small">
|
|
|
|
|
<a-descriptions-item label="系统名称">
|
|
|
|
|
{{ siteStore.appName }}
|
|
|
|
|
{{ systemInfo.name }}
|
|
|
|
|
</a-descriptions-item>
|
|
|
|
|
<a-descriptions-item label="版本号">
|
|
|
|
|
{{ systemInfo.version }}
|
|
|
|
|
@@ -156,7 +156,7 @@
|
|
|
|
|
{{ siteStore.statusText || '正常' }}
|
|
|
|
|
</a-descriptions-item>
|
|
|
|
|
<a-descriptions-item label="创建时间">
|
|
|
|
|
{{ siteInfo?.createTime }}
|
|
|
|
|
{{ tenantStore.company?.createTime || '-' }}
|
|
|
|
|
</a-descriptions-item>
|
|
|
|
|
<a-descriptions-item label="到期时间">
|
|
|
|
|
{{ siteInfo?.expirationTime }}
|
|
|
|
|
@@ -193,11 +193,11 @@
|
|
|
|
|
<AppstoreOutlined />
|
|
|
|
|
商品分类
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button block @click="navigateTo('/shop/shopCoupon')">
|
|
|
|
|
<a-button block @click="navigateTo('/market/coupon')">
|
|
|
|
|
<GiftOutlined />
|
|
|
|
|
优惠券管理
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button block @click="navigateTo('/shop/shopUser')">
|
|
|
|
|
<a-button block @click="navigateTo('/system/user')">
|
|
|
|
|
<TeamOutlined />
|
|
|
|
|
会员管理
|
|
|
|
|
</a-button>
|
|
|
|
|
@@ -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<string>('');
|
|
|
|
|
let runDaysTimer: ReturnType<typeof setInterval>;
|
|
|
|
|
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,11 +363,7 @@ const refreshStatistics = async () => {
|
|
|
|
|
// 加载数据
|
|
|
|
|
const loadData = async () => {
|
|
|
|
|
// 独立请求租户信息,不受其他请求失败影响
|
|
|
|
|
getTenantInfo()
|
|
|
|
|
.then((res) => {
|
|
|
|
|
tenantCreateTime.value = res?.createTime || '';
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
tenantStore.fetchTenantInfo().catch((e) => {
|
|
|
|
|
console.warn('获取租户信息失败:', e);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|