This commit is contained in:
2025-09-30 00:03:43 +08:00
parent 19117de6c8
commit 8885fb766a
39 changed files with 517 additions and 159 deletions

View File

@@ -54,7 +54,9 @@
<text v-else-if="it.sourceSubmissionId" class="tag-custom">我的提交</text>
</view>
<view class="meta">{{ it.brand || '-' }} {{ it.model || '' }} {{ it.spec || '' }}</view>
<!-- 隐藏库存与价格展示按需求仅展示基础信息 -->
<view class="card-params" v-if="it.cardParams && Object.keys(it.cardParams).length">
<view class="param" v-for="(v,k) in it.cardParams" :key="k">{{ k }}{{ v }}</view>
</view>
</view>
</view>
</block>
@@ -235,6 +237,8 @@ export default {
.tag-custom { font-size: 22rpx; color:#fff; background:#67c23a; padding: 4rpx 10rpx; border-radius: 8rpx; }
.tag-deleted { font-size: 22rpx; color:#fff; background:#909399; padding: 4rpx 10rpx; border-radius: 8rpx; }
.meta { color:$uni-text-color-grey; font-size: 24rpx; }
.card-params { display:flex; flex-wrap:wrap; gap: 8rpx 16rpx; margin-top: 8rpx; }
.card-params .param { color:$uni-text-color-grey; font-size: 22rpx; background:$uni-bg-color-grey; padding: 2rpx 6rpx; border-radius: 8rpx; }
.price { margin-left: 20rpx; color:$uni-color-primary; }
.empty { height: 60vh; display:flex; align-items:center; justify-content:center; color:$uni-text-color-grey; }
.fab { position: fixed; right: 30rpx; bottom: 120rpx; width: 100rpx; height: 100rpx; background:$uni-color-primary; color:#fff; border-radius: 50rpx; text-align:center; line-height: 100rpx; font-size: 48rpx; box-shadow: 0 8rpx 20rpx rgba(0,0,0,0.15); }

View File

@@ -132,8 +132,9 @@ export default {
.block-title { font-size: 28rpx; font-weight: 600; color: #2d3a4a; margin-bottom: 12rpx; }
.placeholder { font-size: 26rpx; color: #7a8899; }
.params { display: flex; flex-direction: column; gap: 12rpx; }
.param { display: flex; justify-content: space-between; font-size: 26rpx; color: #2d3a4a; }
.param { display: flex; justify-content: flex-start; align-items: center; gap: 16rpx; font-size: 26rpx; color: #2d3a4a; }
.param-key { color: #7a8899; }
.param-val { text-align: left; }
.images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12rpx; }
.image { width: 100%; height: 200rpx; border-radius: 16rpx; background: #f0f2f5; }
.footer { display: flex; justify-content: flex-end; gap: 20rpx; }

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2176,7 +2176,29 @@ if (uni.restoreGlobal) {
1
/* TEXT */
),
vue.createCommentVNode(" 隐藏库存与价格展示,按需求仅展示基础信息 ")
it.cardParams && Object.keys(it.cardParams).length ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "card-params"
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(it.cardParams, (v, k) => {
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: "param",
key: k
},
vue.toDisplayString(k) + "" + vue.toDisplayString(v),
1
/* TEXT */
);
}),
128
/* KEYED_FRAGMENT */
))
])) : vue.createCommentVNode("v-if", true)
])
], 8, ["onClick"]);
}),

View File

@@ -136,6 +136,19 @@
color: #444;
font-size: 0.75rem;
}
.card-params {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 0.5rem;
margin-top: 0.25rem;
}
.card-params .param {
color: #444;
font-size: 0.6875rem;
background: #ffffff;
padding: 0.0625rem 0.1875rem;
border-radius: 0.25rem;
}
.price {
margin-left: 0.625rem;
color: #4C8DFF;

View File

@@ -92,13 +92,18 @@
}
.param {
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
gap: 0.5rem;
font-size: 0.8125rem;
color: #2d3a4a;
}
.param-key {
color: #7a8899;
}
.param-val {
text-align: left;
}
.images {
display: grid;
grid-template-columns: repeat(3, 1fr);

View File

@@ -266,8 +266,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
g: common_vendor.t(it.brand || "-"),
h: common_vendor.t(it.model || ""),
i: common_vendor.t(it.spec || ""),
j: it.id,
k: common_vendor.o(($event) => $options.openDetail(it.id), it.id)
j: it.cardParams && Object.keys(it.cardParams).length
}, it.cardParams && Object.keys(it.cardParams).length ? {
k: common_vendor.f(it.cardParams, (v, k, i1) => {
return {
a: common_vendor.t(k),
b: common_vendor.t(v),
c: k
};
})
} : {}, {
l: it.id,
m: common_vendor.o(($event) => $options.openDetail(it.id), it.id)
});
})
} : {}, {

View File

@@ -1 +1 @@
<view class="page"><view class="tabs"><view class="{{['tab', a && 'active']}}" bindtap="{{b}}">全部</view><view class="{{['tab', c && 'active']}}" bindtap="{{d}}">查询</view><view class="tab extra" bindtap="{{e}}">我的提交</view></view><view wx:if="{{f}}" class="{{['search', x && 'template-mode']}}"><view class="mode"><picker mode="selector" range="{{h}}" bindchange="{{i}}"><view class="picker">{{g}}</view></picker></view><block wx:if="{{j}}"><input placeholder="输入名称/条码/规格查询" bindconfirm="{{k}}" value="{{l}}" bindinput="{{m}}"/></block><block wx:if="{{n}}"><view class="picker-row"><picker mode="selector" range="{{p}}" bindchange="{{q}}"><view class="picker">{{o}}</view></picker><picker mode="selector" range="{{s}}" bindchange="{{t}}"><view class="picker">{{r}}</view></picker></view><view class="params-wrap"><view wx:for="{{v}}" wx:for-item="p" wx:key="w" class="param-row"><input wx:if="{{p.a}}" placeholder="{{p.b}}" value="{{p.c}}" bindinput="{{p.d}}"/><input wx:elif="{{p.e}}" type="number" placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/><switch wx:elif="{{p.i}}" checked="{{p.j}}" bindchange="{{p.k}}"/><picker wx:elif="{{p.l}}" mode="selector" range="{{p.n}}" bindchange="{{p.o}}"><view class="picker">{{p.m}}</view></picker><picker wx:elif="{{p.p}}" mode="date" bindchange="{{p.r}}"><view class="picker">{{p.q}}</view></picker><input wx:else placeholder="{{p.s}}" value="{{p.t}}" bindinput="{{p.v}}"/></view></view></block><button size="mini" bindtap="{{w}}">查询</button></view><scroll-view scroll-y class="list" bindscrolltolower="{{A}}"><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="it" wx:key="j" class="item" bindtap="{{it.k}}"><image wx:if="{{it.a}}" src="{{it.b}}" class="thumb" mode="aspectFill"/><view class="content"><view class="name"><text>{{it.c}}</text><text wx:if="{{it.d}}" class="tag-deleted">已删除</text><text wx:if="{{it.e}}" class="tag-platform">平台推荐</text><text wx:elif="{{it.f}}" class="tag-custom">我的提交</text></view><view class="meta">{{it.g}} {{it.h}} {{it.i}}</view></view></view></block><view wx:else class="empty"><text>暂无数据,点击右上角“+”新增</text></view></scroll-view></view>
<view class="page"><view class="tabs"><view class="{{['tab', a && 'active']}}" bindtap="{{b}}">全部</view><view class="{{['tab', c && 'active']}}" bindtap="{{d}}">查询</view><view class="tab extra" bindtap="{{e}}">我的提交</view></view><view wx:if="{{f}}" class="{{['search', x && 'template-mode']}}"><view class="mode"><picker mode="selector" range="{{h}}" bindchange="{{i}}"><view class="picker">{{g}}</view></picker></view><block wx:if="{{j}}"><input placeholder="输入名称/条码/规格查询" bindconfirm="{{k}}" value="{{l}}" bindinput="{{m}}"/></block><block wx:if="{{n}}"><view class="picker-row"><picker mode="selector" range="{{p}}" bindchange="{{q}}"><view class="picker">{{o}}</view></picker><picker mode="selector" range="{{s}}" bindchange="{{t}}"><view class="picker">{{r}}</view></picker></view><view class="params-wrap"><view wx:for="{{v}}" wx:for-item="p" wx:key="w" class="param-row"><input wx:if="{{p.a}}" placeholder="{{p.b}}" value="{{p.c}}" bindinput="{{p.d}}"/><input wx:elif="{{p.e}}" type="number" placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/><switch wx:elif="{{p.i}}" checked="{{p.j}}" bindchange="{{p.k}}"/><picker wx:elif="{{p.l}}" mode="selector" range="{{p.n}}" bindchange="{{p.o}}"><view class="picker">{{p.m}}</view></picker><picker wx:elif="{{p.p}}" mode="date" bindchange="{{p.r}}"><view class="picker">{{p.q}}</view></picker><input wx:else placeholder="{{p.s}}" value="{{p.t}}" bindinput="{{p.v}}"/></view></view></block><button size="mini" bindtap="{{w}}">查询</button></view><scroll-view scroll-y class="list" bindscrolltolower="{{A}}"><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="it" wx:key="l" class="item" bindtap="{{it.m}}"><image wx:if="{{it.a}}" src="{{it.b}}" class="thumb" mode="aspectFill"/><view class="content"><view class="name"><text>{{it.c}}</text><text wx:if="{{it.d}}" class="tag-deleted">已删除</text><text wx:if="{{it.e}}" class="tag-platform">平台推荐</text><text wx:elif="{{it.f}}" class="tag-custom">我的提交</text></view><view class="meta">{{it.g}} {{it.h}} {{it.i}}</view><view wx:if="{{it.j}}" class="card-params"><view wx:for="{{it.k}}" wx:for-item="v" wx:key="c" class="param">{{v.a}}{{v.b}}</view></view></view></view></block><view wx:else class="empty"><text>暂无数据,点击右上角“+”新增</text></view></scroll-view></view>

View File

@@ -136,6 +136,19 @@
color: #444;
font-size: 24rpx;
}
.card-params {
display: flex;
flex-wrap: wrap;
gap: 8rpx 16rpx;
margin-top: 8rpx;
}
.card-params .param {
color: #444;
font-size: 22rpx;
background: #ffffff;
padding: 2rpx 6rpx;
border-radius: 8rpx;
}
.price {
margin-left: 20rpx;
color: #4C8DFF;

View File

@@ -92,13 +92,18 @@
}
.param {
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
gap: 16rpx;
font-size: 26rpx;
color: #2d3a4a;
}
.param-key {
color: #7a8899;
}
.param-val {
text-align: left;
}
.images {
display: grid;
grid-template-columns: repeat(3, 1fr);