改造文章管理系统

This commit is contained in:
2024-08-27 07:22:22 +08:00
parent 13832d9de0
commit 31ec8e057a
41 changed files with 4041 additions and 525 deletions

View File

@@ -24,9 +24,12 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'goodsName'">
<a @click="openUrl(`${domain}/product/${record.goodsId}`)">{{
record.goodsName
}}</a>
<a
@click="
openSpmUrl(`/product/${record.goodsId}.html`, record, record.goodsId)
"
>{{ record.goodsName }}</a
>
</template>
<template v-if="column.key === 'type'">
<a-tag v-if="record.type === 0">虚拟商品</a-tag>
@@ -105,7 +108,7 @@
import type { Goods, GoodsParam } from '@/api/shop/goods/model';
import { formatNumber } from 'ele-admin-pro/es';
import router from '@/router';
import { openUrl } from '@/utils/common';
import { openSpmUrl, openUrl } from '@/utils/common';
import { getSiteDomain } from '@/utils/domain';
// 表格实例

View File

@@ -9,6 +9,7 @@
@update:visible="updateVisible"
@ok="save"
>
{{ form }}
<a-form
ref="formRef"
:model="form"

View File

@@ -51,7 +51,11 @@
style="margin-right: 10px"
v-if="record.image"
/>
{{ record.title }}
<a
:href="`${domain}/product/${record.categoryId}`"
target="_blank"
>{{ record.title }}</a
>
</template>
<template v-if="column.key === 'showIndex'">
<a-space @click="onShowIndex(record)">
@@ -148,10 +152,11 @@
GoodsCategory,
GoodsCategoryParam
} from '@/api/shop/goodsCategory/model';
import { openNew, openPreview } from '@/utils/common';
import { openNew, openPreview, openUrl } from '@/utils/common';
import { getSiteInfo } from '@/api/layout';
import router from '@/router';
import Search from './components/search.vue';
import { getSiteDomain } from '@/utils/domain';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -247,12 +252,12 @@
const expandedRowKeys = ref<number[]>([]);
const searchText = ref('');
const tenantId = ref<number>();
const domain = ref<string>();
const merchantId = ref<number>();
// 网站域名
const domain = getSiteDomain();
getSiteInfo().then((data) => {
tenantId.value = data.tenantId;
domain.value = data.domain;
});
// 表格数据源