main #72

Merged
charles merged 3 commits from main into prod 2026-03-27 10:36:00 +08:00
8 changed files with 405 additions and 4 deletions

View File

@ -0,0 +1,21 @@
async def get_ncmatch_publish_product_to_model(ns={}):
db = DBPools()
async with db.sqlorContext('kboss') as sor:
try:
sql = """SELECT * FROM user_publish_product WHERE listing_status = 'listing' AND del_flg = '0';"""
result = await sor.sqlExe(sql, {})
return {
'status': True,
'msg': 'successfully retrieved published products',
'data': result
}
except Exception as e:
return {
'status': False,
'msg': 'failed to retrieve published products',
'data': e
}
ret = await get_ncmatch_publish_product_to_model(params_kw)
return ret

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
{
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
@ -6,4 +6,4 @@
}
},
"exclude": ["node_modules", "dist"]
}
}

View File

@ -11,7 +11,7 @@ import {getHomePath} from "@/views/setting/tools";
NProgress.configure({showSpinner: false}); // NProgress Configuration
const whiteList = ["/login", "/homePage", "/registrationPage", "/shoppingCart", "/homePageImage","/h5HomePage",'/H5about']; // no redirect whitelist
const whiteList = ["/login", "/homePage", "/registrationPage", "/shoppingCart", "/homePageImage","/h5HomePage",'/H5about','/modelProductDetail']; // no redirect whitelist
// 获取用户代理字符串
const userAgent = window.navigator.userAgent;

View File

@ -56,6 +56,13 @@ export const constantRoutes = [
path: "/redirect/:path(.*)", component: () => import("@/views/redirect/index"),
},],
},
// 模型推荐产品详情
{
path: "/modelProductDetail",
name: 'ProductDetail',
component: () => import('@/views/modelProductDetail/index.vue'),
},
{
path: '/h5HomePage',
name: 'H5HomePage',
@ -285,6 +292,7 @@ export const constantRoutes = [
hidden: true,
meta: { title: "算力供需广场", fullPath: "/ncmatch/supplyAndDemandSquare" },
},
{
path: "search",
component: () => import("@/views/homePage/ncmatch/searchBox/index.vue"),

View File

@ -668,7 +668,7 @@ export default Vue.extend({
// -
goHome() {
if (this.isNcmatchDomain) {
this.$router.push('/ncmatchHome/index');
this.$router.push('/ncmatchHome');
} else {
this.$router.push('/homePage/index');
}

View File

@ -0,0 +1,372 @@
<template>
<main class="product-detail">
<!-- 标题区 -->
<header class="detail-header">
<h1 class="detail-title">英伟达-A8001</h1>
</header>
<!-- 企业信息 -->
<section class="detail-section" aria-labelledby="company-heading">
<h2 id="company-heading" class="section-heading">企业信息</h2>
<div class="info-grid">
<div class="info-item">
<span class="info-label">企业名称</span>
<span class="info-value">开元数智</span>
</div>
<div class="info-item">
<span class="info-label">所属类别</span>
<span class="info-value">热门推荐</span>
</div>
<div class="info-item">
<span class="info-label">企业类别</span>
<span class="info-value">专精特新企业,高新技术企业</span>
</div>
<div class="info-item">
<span class="info-label">联系人</span>
<span class="info-value">张建</span>
</div>
<div class="info-item">
<span class="info-label">手机号</span>
<span class="info-value">136****0912</span>
</div>
<div class="info-item">
<span class="info-label">邮箱</span>
<span class="info-value">--</span>
</div>
<div class="info-item">
<span class="info-label">职务</span>
<span class="info-value">--</span>
</div>
<div class="info-item">
<span class="info-label">发布日期</span>
<span class="info-value">2025-07-31 19:21:45</span>
</div>
</div>
</section>
<!-- 配置数据添加图标和背景 -->
<section class="detail-section" aria-labelledby="config-heading">
<h2 id="config-heading" class="section-heading">配置数据</h2>
<div class="config-grid">
<!-- 第一对CPU / 内存 -->
<div class="config-pair">
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/ssc2x.png"
alt="CPU"
/>
<span class="config-label">CPU</span>
<span class="config-desc">Intel Xeon Platinum 8350C processor 32C 2.6GHz 240W*2</span>
</div>
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/cpu2x.png"
alt="内存"
/>
<span class="config-label">内存</span>
<span class="config-desc">DDR4-3200 64G RDIMM*16</span>
</div>
</div>
<!-- 第二对GPU / 系统盘 -->
<div class="config-pair">
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/sdcard2x.png"
alt="GPU"
/>
<span class="config-label">GPU</span>
<span class="config-desc">Nvidia A800-80G-400Wx8-NvlinkSW*8</span>
</div>
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/ssdr2x.png"
alt="系统盘"
/>
<span class="config-label">系统盘</span>
<span class="config-desc">NVMe-SSD 3.84T*4</span>
</div>
</div>
<!-- 第三对数据盘 / 网卡 -->
<div class="config-pair">
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/servermini2x.png"
alt="数据盘"
/>
<span class="config-label">数据盘</span>
<span class="config-desc">SATA-SSD-480G*1</span>
</div>
<div class="config-cell">
<img
class="config-icon"
src="https://www.opencomputing.cn/idfile?path=firstpagehot/serverpath2x.png"
alt="网卡"
/>
<span class="config-label">网卡</span>
<span class="config-desc">25G 光口双口CX5*1+100G光口双口CX6*4</span>
</div>
</div>
</div>
</section>
<!-- 商品描述 -->
<section class="detail-section" aria-labelledby="desc-heading">
<h2 id="desc-heading" class="section-heading">商品描述</h2>
<p class="description-text">
英伟达推出的一款高性能图形处理单元基于英伟达安培Ampere架构拥有 6912 CUDA 核心和 432 个第三代 Tensor Core 核心
</p>
</section>
<!-- 相关参数 -->
<section class="detail-section" aria-labelledby="params-heading">
<h2 id="params-heading" class="section-heading">相关参数</h2>
<div class="params-placeholder">--</div>
</section>
</main>
</template>
<script>
export default {
name: 'ProductDetail'
}
</script>
<style lang="less" scoped>
/* ===== 设计变量 ===== */
@color-bg-card: #ffffff;
@color-bg-soft: #f8fafc;
@color-border-light: #e6edf4;
@color-text-primary: #1e293b;
@color-text-secondary: #334155;
@color-text-label: #64748b;
@color-text-muted: #94a3b8;
@color-accent: #2563eb;
@border-radius-card: 16px;
@border-radius-inner: 12px;
@spacing-base: 32px;
@spacing-compact: 20px;
@font-size-base: 14px;
@font-size-large: 28px;
@font-size-heading: 18px;
.product-detail {
width: 100%;
min-height: 100vh;
background-color: @color-bg-card;
border-radius: @border-radius-card;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
padding: @spacing-base;
transition: all 0.3s ease;
.detail-header {
margin-bottom: 24px;
border-bottom: 2px solid #f0f2f5;
padding-bottom: 16px;
.detail-title {
font-size: @font-size-large;
font-weight: 600;
color: @color-text-primary;
margin: 0;
letter-spacing: 0.5px;
}
}
.detail-section {
margin-top: 24px;
&:first-of-type {
margin-top: 0;
}
}
.section-heading {
font-size: @font-size-heading;
font-weight: 600;
color: @color-text-secondary;
margin: 0 0 16px 0;
position: relative;
padding-left: 12px;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 18px;
background-color: @color-accent;
border-radius: 2px;
}
}
/* ----- 企业信息网格 ----- */
.info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px 24px;
background-color: @color-bg-soft;
border-radius: @border-radius-inner;
padding: @spacing-compact;
.info-item {
display: flex;
align-items: baseline;
font-size: @font-size-base;
line-height: 1.6;
.info-label {
width: 90px;
color: @color-text-label;
text-align: right;
padding-right: 12px;
flex-shrink: 0;
font-weight: 450;
}
.info-value {
flex: 1;
color: @color-text-primary;
font-weight: 500;
word-break: break-word;
}
}
}
/* ----- 配置数据网格(添加图标和背景)----- */
.config-grid {
background-color: @color-bg-soft;
background-image: url('http://localhost:9527/static/img/liBg.19ca3b95.png'); /* 背景图片 */
background-repeat: repeat;
background-size: auto;
border-radius: @border-radius-inner;
padding: 8px @spacing-compact;
.config-pair {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
padding: 16px 0;
// border-bottom: 1px solid @color-border-light;
&:last-child {
border-bottom: none;
}
}
.config-cell {
display: flex;
align-items: flex-start;
font-size: @font-size-base;
min-width: 0; //
.config-icon {
width: 24px;
height: auto;
margin-right: 4px;
flex-shrink: 0;
object-fit: contain;
}
.config-label {
width: 80px;
color: #475569;
font-weight: 600;
flex-shrink: 0;
padding-right: 8px;
white-space: nowrap;
}
.config-desc {
flex: 1;
color: #0f172a;
line-height: 1.5;
word-break: break-word;
}
}
}
/* ----- 商品描述 ----- */
.description-text {
background-color: @color-bg-soft;
border-radius: @border-radius-inner;
padding: @spacing-compact;
margin: 0;
font-size: @font-size-base;
line-height: 1.7;
color: @color-text-secondary;
}
/* ----- 相关参数占位 ----- */
.params-placeholder {
background-color: @color-bg-soft;
border-radius: @border-radius-inner;
padding: @spacing-compact;
font-size: @font-size-base;
color: @color-text-muted;
font-style: italic;
}
/* ===== 响应式适配 ===== */
@media (max-width: 640px) {
padding: @spacing-compact;
.info-grid {
grid-template-columns: 1fr;
gap: 12px;
}
.config-grid .config-pair {
grid-template-columns: 1fr;
gap: 16px;
}
.info-item .info-label {
width: 80px;
}
}
@media (max-width: 480px) {
.info-item {
flex-wrap: wrap;
.info-label {
width: auto;
text-align: left;
padding-right: 8px;
}
.info-value {
width: 100%;
margin-left: 0;
padding-left: 0;
}
}
.config-cell {
flex-wrap: wrap; /* 小屏时允许图标和标签换行 */
.config-icon {
margin-bottom: 4px;
}
.config-label {
width: auto; /* 取消固定宽度,自然排列 */
padding-right: 8px;
}
.config-desc {
width: 100%;
margin-left: 0;
padding-left: 28px; /* 与图标左侧对齐 */
}
}
}
}
</style>