准备上传

This commit is contained in:
2025-10-08 19:15:20 +08:00
parent 0aa7d55a23
commit 0e14a5fa1c
193 changed files with 14697 additions and 2461 deletions

View File

@@ -68,6 +68,12 @@
</swiper>
</view>
<!-- 配件查询按钮 -->
<view class="parts-search-btn" @click="onPartsSearchTap" hover-class="parts-search-btn-active" hover-stay-time="80">
<image src="/static/icons/product.png" class="parts-search-icon" mode="aspectFit"></image>
<text class="parts-search-text">配件查询</text>
</view>
<!-- 分割标题产品与功能 -->
<view class="section-title">
<text class="section-text">常用功能</text>
@@ -268,6 +274,20 @@
})
},
onPartsSearchTap() {
// 设置标志,让货品列表页打开时自动切换到"查询"Tab并选择"按模板参数查询"
try {
uni.setStorageSync('PRODUCT_SEARCH_CONFIG', JSON.stringify({
openTab: 'search',
mode: 'template'
}))
} catch(e) {
console.error('[index] 设置存储标志失败:', e)
}
// 跳转到货品列表页tabBar页面使用switchTab
uni.switchTab({ url: '/pages/product/list' })
},
onIconError(item) {
item.img = ''
}
@@ -324,6 +344,34 @@ page {
.notice-text { color: $uni-text-color; font-size: 28rpx; line-height: 36rpx; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-tag { color: $uni-color-primary; font-size: 22rpx; padding: 4rpx 10rpx; border-radius: 999rpx; background: rgba(76,141,255,0.18); }
/* 配件查询按钮 */
.parts-search-btn {
margin: 0 24rpx 20rpx;
padding: 24rpx 32rpx;
border-radius: 20rpx;
background: linear-gradient(135deg, #4C8DFF 0%, #3d73e6 100%);
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
box-shadow: 0 8rpx 20rpx rgba(76,141,255,0.25);
transition: all 0.2s ease;
}
.parts-search-btn-active {
opacity: 0.85;
transform: scale(0.98);
}
.parts-search-icon {
width: 52rpx;
height: 52rpx;
filter: brightness(0) invert(1);
}
.parts-search-text {
color: #fff;
font-size: 34rpx;
font-weight: 800;
letter-spacing: 2rpx;
}
/* 分割标题 */
.section-title { display: flex; align-items: center; gap: 16rpx; padding: 10rpx 28rpx 0; flex: 0 0 auto; }

View File

@@ -155,6 +155,15 @@ export default {
this.shopName = storeName
const phone = profile?.phone || uni.getStorageSync('USER_MOBILE') || ''
this.mobile = phone
// 保存邮箱到本地存储
const email = profile?.email || ''
try {
if (email) {
uni.setStorageSync('USER_EMAIL', email)
} else {
uni.removeStorageSync('USER_EMAIL')
}
} catch(_){}
} catch(e) {
try {
const storeName = uni.getStorageSync('SHOP_NAME') || ''

View File

@@ -65,7 +65,8 @@
</view>
</scroll-view>
<!-- 保留我的提交页的此处不显示 -->
<!-- 右下角的"+"按钮 -->
<view class="fab" @click="goSubmit"></view>
</view>
</template>
@@ -99,6 +100,27 @@ export default {
onShow() {
const hasToken = (() => { try { return !!uni.getStorageSync('TOKEN') } catch(e){ return false } })()
if (!hasToken) return
// 检查是否需要打开查询Tab并设置查询模式从首页"配件查询"按钮进入)
try {
const configStr = uni.getStorageSync('PRODUCT_SEARCH_CONFIG')
if (configStr) {
const config = JSON.parse(configStr)
// 切换到指定Tab
if (config.openTab) {
this.tab = config.openTab
}
// 设置查询模式
if (config.mode) {
this.query.mode = config.mode
}
// 清除标志,避免下次进入时再次切换
uni.removeStorageSync('PRODUCT_SEARCH_CONFIG')
}
} catch(e) {
console.error('[list] 处理查询配置失败:', e)
}
// 从创建/编辑页返回时,确保刷新最新列表
this.reload()
},
@@ -211,7 +233,10 @@ export default {
} catch (e) {
uni.showToast({ title: '删除失败', icon: 'none' })
}
}
},
goSubmit() {
uni.navigateTo({ url: '/pages/product/submit' })
}
}
}
</script>
@@ -241,7 +266,7 @@ export default {
.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); }
.fab { position: fixed; right: 30rpx; bottom: 120rpx; width: 100rpx; height: 100rpx; background: linear-gradient(135deg, #4c8dff, #6ab7ff); color: #fff; border-radius: 50rpx; display: flex; align-items: center; justify-content: center; font-size: 48rpx; box-shadow: 0 20rpx 40rpx rgba(0,0,0,0.2); }
</style>

View File

@@ -120,24 +120,134 @@ export default {
</script>
<style lang="scss">
.page { padding: 24rpx 24rpx 160rpx; background: #f6f7fb; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20rpx; }
.model { font-size: 36rpx; font-weight: 700; color: #2d3a4a; }
.status.deleted { font-size: 24rpx; padding: 6rpx 18rpx; border-radius: 999rpx; background: #c0c4cc; color: #fff; }
.section { background: #fff; border-radius: 16rpx; padding: 20rpx 22rpx; margin-bottom: 24rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.04); }
.row { display: flex; justify-content: space-between; padding: 12rpx 0; border-bottom: 1rpx solid #f1f2f5; }
.page {
min-height: 100vh;
padding: 20rpx 24rpx 160rpx;
background: #f6f7fb;
box-sizing: border-box;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
gap: 16rpx;
flex-wrap: wrap;
}
.model {
font-size: 36rpx;
font-weight: 700;
color: #2d3a4a;
word-break: break-word;
overflow-wrap: break-word;
flex: 1;
min-width: 0;
}
.status.deleted {
font-size: 24rpx;
padding: 6rpx 18rpx;
border-radius: 999rpx;
background: #c0c4cc;
color: #fff;
white-space: nowrap;
}
.section {
background: #fff;
border-radius: 16rpx;
padding: 20rpx 22rpx;
margin-bottom: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.04);
}
.row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16rpx;
padding: 12rpx 0;
border-bottom: 1rpx solid #f1f2f5;
}
.row:last-child { border-bottom: none; }
.label { width: 160rpx; font-size: 26rpx; color: #7a8899; }
.value { flex: 1; text-align: right; font-size: 26rpx; color: #2d3a4a; word-break: break-all; }
.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: 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; }
.loading { height: 100vh; display: flex; align-items: center; justify-content: center; color: #7a8899; }
.label {
flex-shrink: 0;
width: 140rpx;
font-size: 26rpx;
color: #7a8899;
}
.value {
flex: 1;
min-width: 0;
text-align: right;
font-size: 26rpx;
color: #2d3a4a;
word-break: break-word;
overflow-wrap: break-word;
}
.block-title {
font-size: 28rpx;
font-weight: 600;
color: #2d3a4a;
margin-bottom: 12rpx;
}
.placeholder {
font-size: 26rpx;
color: #7a8899;
word-break: break-word;
}
.params {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.param {
display: flex;
justify-content: flex-start;
align-items: flex-start;
gap: 16rpx;
font-size: 26rpx;
color: #2d3a4a;
}
.param-key {
flex-shrink: 0;
color: #7a8899;
min-width: 160rpx;
}
.param-val {
flex: 1;
min-width: 0;
text-align: left;
word-break: break-word;
overflow-wrap: break-word;
}
.images {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.image {
width: 100%;
height: 200rpx;
border-radius: 16rpx;
background: #f0f2f5;
}
.footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: flex-end;
gap: 20rpx;
padding: 20rpx 24rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
background: rgba(255,255,255,0.96);
box-shadow: 0 -6rpx 20rpx rgba(0,0,0,0.08);
}
.loading {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: #7a8899;
}
</style>

View File

@@ -1,10 +1,5 @@
<template>
<scroll-view scroll-y class="page">
<view class="hero">
<text class="title">提交配件</text>
<text class="desc">填写型号名称参数与图片提交后进入待审核状态</text>
</view>
<view class="section">
<view class="row required">
<text class="label">型号</text>
@@ -332,11 +327,13 @@ export default {
</script>
<style lang="scss">
.page { padding: 24rpx 24rpx 120rpx; background: #f6f7fb; }
.hero { padding: 24rpx; background: linear-gradient(135deg, #4c8dff, #6ab7ff); border-radius: 20rpx; color: #fff; margin-bottom: 24rpx; }
.title { font-size: 36rpx; font-weight: 700; }
.desc { font-size: 26rpx; margin-top: 8rpx; opacity: 0.9; }
.section { background: #fff; border-radius: 16rpx; padding: 20rpx 22rpx; margin-bottom: 24rpx; box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.04); }
.page {
height: 100vh;
padding: 16rpx 24rpx 120rpx;
background: #f6f7fb;
box-sizing: border-box;
}
.section { background: #fff; border-radius: 16rpx; padding: 20rpx 22rpx; margin-bottom: 16rpx; box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.04); }
.row { display: flex; align-items: center; gap: 16rpx; padding: 16rpx 0; border-bottom: 1rpx solid #f1f2f5; }
.row:last-child { border-bottom: none; }
.row.required .label::after { content: '*'; color: #ff5b5b; margin-left: 6rpx; }

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAy2naNb+5Yh1KV29z8KgtpIOLX1ftUgujyXnFQkJ+RdfiBfor
7dQoSkqrJxBsXRpdsIpXaGHf9iJ87liAp6UuRi7ZceIA/sbXRjUnxYeb4GB/LH/i
clZ3EORjRsw43TFBqPWqlY+8srn1X9pn+/Mt3RnBWDEvKC7XIJDYHiZYs++bUl7i
uxpeTZiw7Ec53iHqiG1Q43yfA5Jq0Y4tI2dtK8TLr41p+/Ft9Ky60pX2jqgUZIfp
YkkZHcKEQsRurknUsKpG//adP5GV7bdLr4fBbEwWMetzK+4pISPvHw1exgsFsQs+
WEOjFrLRacFFIjmMXi6NKwJdBGJf/JhSiljjDwIDAQABAoIBAQCyG7VdasrABjWZ
6ZTzG88bRbM7gJnkRRzcxSrboa0/KpBV+3+Ld0DwDAFg6xh3TSbL9dYjJ9AajIgn
iobcQ94IxezPsrx8WU8VwmVYqCzsgpHYPQHia6NFvzTOQPNpej+r2a/L1Ve8huc7
TtnN2lhGSM7qkeZgoOLtOOaDP8Bbi9kG3SuafEDQBzr4qYKNy8p3ajbUo7MHhc0w
dH5InzUYJkUYBrxMBHZpJk+lF/uMJAwV5OL1AznmkTMsLcqV2+XPjcMTfgxYkbzN
E/bVKX33YpDDhtsRrG8bvQXzln781CXKlJg03NVlY/o3E07/fCk30KlystR4+VYd
2G9A0RuBAoGBAPYrBkWJsDMIWxYseGrac/wR/EFm4nUUVbJ+uiu614TEK6tTYli+
qeRDpqD3fdtlMxX8i/Mlrb4sCJs1G5Y8wfIOtzQ6YQSiQNWf9aGZOem7usSfBh9E
WMdW87x9ipyawPnkJIKYMx64SiQsYzDWGNHKT5rVVoYxLaL1E7ComjEJAoGBANOJ
ra/Ax5bRtsGv1a6u0UNIM/fUbCligp1QgDZiZilTmNpqmvhQ3pmnwlvm1m9Mk8HM
BGqcgymmMZGyik0GQVi/xRf6FBR/oWKf1rQlgZ0nu250fXpW+OqM/4usVyuUqoC5
ecLhsncnXqZWiiDrQLQQfWbhlxt5dPu9QUODc7FXAoGBAO4jKvsEOs7zi2JE/Oyp
jcBRCc2fIP2QAWMeUy1Qn4MRXwlrLd2Z/LIUe9KF+VvPZ38ig6RhU9V/tYen9Zr+
BcULVVGSFB6uc7f0+WMt3qds8z2YdQy0Son0ZO94JypeTsavXF51rCZQs3CQ/BfX
VcVFSIMJVJ2WX4agPT8Nq7Q5AoGAEFAnwsv9GFZn35vtwKDepm+lAlGxXaepJvSU
Tp1b/4fg28co2El0QSk8xdWRZ9fh9SoElSwouUeFvxSjsbjvxSZUzrqMXeBR08c7
yXyy+CmePLBjFNIsM/pXoq/RsRyv4WlsSGkbWDEDDZTS5iL+RGSZJxvyiT3elaNM
qyYx/9UCgYEAxWUdUH3Ql8h8xkebKUStiD073U/5TZHvNAiAhojDPaf7jp0dpvgH
ijQSLFMJ15ht4wuc6YxJLgkMXk40+ua+CwKZDIZJ+bTNrI9K8MEbM4nnx2j1n/Yk
0nCW+ImolOjXxJ/UPX2SxIcKwEuYR+B9bFglG6KpHix5nTvu16snYVE=
-----END RSA PRIVATE KEY-----

View File

@@ -1 +1 @@
{"version":3,"file":"assets.js","sources":["static/icons/icons8-shopping-cart-100.png","static/icons/icons8-login-50.png","static/logo.png","static/icons/icons8-vip-48 (1).png","static/icons/icons8-close-48.png"],"sourcesContent":["export default \"__VITE_ASSET__c6fa5b3f__\"","export default \"__VITE_ASSET__1aee3610__\"","export default \"__VITE_ASSET__46719607__\"","export default \"__VITE_ASSET__ec48be62__\"","export default \"__VITE_ASSET__ff6c5e80__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;;;;;;"}
{"version":3,"file":"assets.js","sources":["static/icons/product.png","static/icons/icons8-shopping-cart-100.png","static/icons/icons8-login-50.png","static/logo.png","static/icons/icons8-vip-48 (1).png","static/icons/icons8-close-48.png"],"sourcesContent":["export default \"__VITE_ASSET__04d06497__\"","export default \"__VITE_ASSET__c6fa5b3f__\"","export default \"__VITE_ASSET__1aee3610__\"","export default \"__VITE_ASSET__46719607__\"","export default \"__VITE_ASSET__ec48be62__\"","export default \"__VITE_ASSET__ff6c5e80__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;;;;;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -250,6 +250,7 @@ if (uni.restoreGlobal) {
monthProfit: "本月利润",
stockCount: "库存量"
};
const _imports_0$5 = "/static/icons/product.png";
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
@@ -443,7 +444,7 @@ if (uni.restoreGlobal) {
},
goDetail() {
try {
formatAppLog("log", "at pages/index/index.vue:259", "[index] goDetail → /pages/detail/index");
formatAppLog("log", "at pages/index/index.vue:265", "[index] goDetail → /pages/detail/index");
} catch (e) {
}
uni.switchTab({ url: "/pages/detail/index" });
@@ -458,6 +459,17 @@ if (uni.restoreGlobal) {
showCancel: false
});
},
onPartsSearchTap() {
try {
uni.setStorageSync("PRODUCT_SEARCH_CONFIG", JSON.stringify({
openTab: "search",
mode: "template"
}));
} catch (e) {
formatAppLog("error", "at pages/index/index.vue:285", "[index] 设置存储标志失败:", e);
}
uni.switchTab({ url: "/pages/product/list" });
},
onIconError(item) {
item.img = "";
}
@@ -686,6 +698,20 @@ if (uni.restoreGlobal) {
))
]))
]),
vue.createCommentVNode(" 配件查询按钮 "),
vue.createElementVNode("view", {
class: "parts-search-btn",
onClick: _cache[6] || (_cache[6] = (...args) => $options.onPartsSearchTap && $options.onPartsSearchTap(...args)),
"hover-class": "parts-search-btn-active",
"hover-stay-time": "80"
}, [
vue.createElementVNode("image", {
src: _imports_0$5,
class: "parts-search-icon",
mode: "aspectFit"
}),
vue.createElementVNode("text", { class: "parts-search-text" }, "配件查询")
]),
vue.createCommentVNode(" 分割标题:产品与功能 "),
vue.createElementVNode("view", { class: "section-title" }, [
vue.createElementVNode("text", { class: "section-text" }, "常用功能")
@@ -1790,6 +1816,21 @@ if (uni.restoreGlobal) {
})();
if (!hasToken)
return;
try {
const configStr = uni.getStorageSync("PRODUCT_SEARCH_CONFIG");
if (configStr) {
const config = JSON.parse(configStr);
if (config.openTab) {
this.tab = config.openTab;
}
if (config.mode) {
this.query.mode = config.mode;
}
uni.removeStorageSync("PRODUCT_SEARCH_CONFIG");
}
} catch (e) {
formatAppLog("error", "at pages/product/list.vue:121", "[list] 处理查询配置失败:", e);
}
this.reload();
},
computed: {
@@ -1924,6 +1965,9 @@ if (uni.restoreGlobal) {
} catch (e) {
uni.showToast({ title: "删除失败", icon: "none" });
}
},
goSubmit() {
uni.navigateTo({ url: "/pages/product/submit" });
}
}
};
@@ -2214,7 +2258,11 @@ if (uni.restoreGlobal) {
32
/* NEED_HYDRATION */
),
vue.createCommentVNode(" 保留“我的提交”页的+,此处不显示 ")
vue.createCommentVNode(' 右下角的"+"按钮 '),
vue.createElementVNode("view", {
class: "fab",
onClick: _cache[10] || (_cache[10] = (...args) => $options.goSubmit && $options.goSubmit(...args))
}, "")
]);
}
const PagesProductList = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "C:/Users/21826/Desktop/Wj/PartsInquiry/frontend/pages/product/list.vue"]]);
@@ -2646,10 +2694,6 @@ if (uni.restoreGlobal) {
"scroll-y": "",
class: "page"
}, [
vue.createElementVNode("view", { class: "hero" }, [
vue.createElementVNode("text", { class: "title" }, "提交配件"),
vue.createElementVNode("text", { class: "desc" }, "填写型号、名称、参数与图片,提交后进入待审核状态")
]),
vue.createElementVNode("view", { class: "section" }, [
vue.createElementVNode("view", { class: "row required" }, [
vue.createElementVNode("text", { class: "label" }, "型号"),
@@ -7212,6 +7256,15 @@ if (uni.restoreGlobal) {
this.shopName = storeName;
const phone = (profile == null ? void 0 : profile.phone) || uni.getStorageSync("USER_MOBILE") || "";
this.mobile = phone;
const email = (profile == null ? void 0 : profile.email) || "";
try {
if (email) {
uni.setStorageSync("USER_EMAIL", email);
} else {
uni.removeStorageSync("USER_EMAIL");
}
} catch (_) {
}
} catch (e) {
try {
const storeName = uni.getStorageSync("SHOP_NAME") || "";

View File

@@ -96,6 +96,35 @@ body {
background: rgba(76, 141, 255, 0.18);
}
/* 配件查询按钮 */
.parts-search-btn {
margin: 0 0.75rem 0.625rem;
padding: 0.75rem 1rem;
border-radius: 0.625rem;
background: linear-gradient(135deg, #4C8DFF 0%, #3d73e6 100%);
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
box-shadow: 0 0.25rem 0.625rem rgba(76, 141, 255, 0.25);
transition: all 0.2s ease;
}
.parts-search-btn-active {
opacity: 0.85;
transform: scale(0.98);
}
.parts-search-icon {
width: 1.625rem;
height: 1.625rem;
filter: brightness(0) invert(1);
}
.parts-search-text {
color: #fff;
font-size: 1.0625rem;
font-weight: 800;
letter-spacing: 0.0625rem;
}
/* 分割标题 */
.section-title {
display: flex;

View File

@@ -166,11 +166,12 @@
bottom: 3.75rem;
width: 3.125rem;
height: 3.125rem;
background: #4C8DFF;
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
color: #fff;
border-radius: 1.5625rem;
text-align: center;
line-height: 3.125rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.15);
box-shadow: 0 0.625rem 1.25rem rgba(0, 0, 0, 0.2);
}

View File

@@ -26,19 +26,27 @@
/* 文章场景相关 */
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
.page {
padding: 0.75rem 0.75rem 5rem;
min-height: 100vh;
padding: 0.625rem 0.75rem 5rem;
background: #f6f7fb;
box-sizing: border-box;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.625rem;
gap: 0.5rem;
flex-wrap: wrap;
}
.model {
font-size: 1.125rem;
font-weight: 700;
color: #2d3a4a;
word-break: break-word;
overflow-wrap: break-word;
flex: 1;
min-width: 0;
}
.status.deleted {
font-size: 0.75rem;
@@ -46,17 +54,20 @@
border-radius: 31.21875rem;
background: #c0c4cc;
color: #fff;
white-space: nowrap;
}
.section {
background: #fff;
border-radius: 0.5rem;
padding: 0.625rem 0.6875rem;
margin-bottom: 0.75rem;
margin-bottom: 0.625rem;
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.04);
}
.row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 0.5rem;
padding: 0.375rem 0;
border-bottom: 0.03125rem solid #f1f2f5;
}
@@ -64,16 +75,19 @@
border-bottom: none;
}
.label {
width: 5rem;
flex-shrink: 0;
width: 4.375rem;
font-size: 0.8125rem;
color: #7a8899;
}
.value {
flex: 1;
min-width: 0;
text-align: right;
font-size: 0.8125rem;
color: #2d3a4a;
word-break: break-all;
word-break: break-word;
overflow-wrap: break-word;
}
.block-title {
font-size: 0.875rem;
@@ -84,6 +98,7 @@
.placeholder {
font-size: 0.8125rem;
color: #7a8899;
word-break: break-word;
}
.params {
display: flex;
@@ -93,16 +108,22 @@
.param {
display: flex;
justify-content: flex-start;
align-items: center;
align-items: flex-start;
gap: 0.5rem;
font-size: 0.8125rem;
color: #2d3a4a;
}
.param-key {
flex-shrink: 0;
color: #7a8899;
min-width: 5rem;
}
.param-val {
flex: 1;
min-width: 0;
text-align: left;
word-break: break-word;
overflow-wrap: break-word;
}
.images {
display: grid;
@@ -116,9 +137,17 @@
background: #f0f2f5;
}
.footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: flex-end;
gap: 0.625rem;
padding: 0.625rem 0.75rem;
padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 -0.1875rem 0.625rem rgba(0, 0, 0, 0.08);
}
.loading {
height: 100vh;

View File

@@ -42,30 +42,16 @@
/* 文章场景相关 */
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
.page {
padding: 0.75rem 0.75rem 3.75rem;
height: 100vh;
padding: 0.5rem 0.75rem 3.75rem;
background: #f6f7fb;
}
.hero {
padding: 0.75rem;
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
border-radius: 0.625rem;
color: #fff;
margin-bottom: 0.75rem;
}
.title {
font-size: 1.125rem;
font-weight: 700;
}
.desc {
font-size: 0.8125rem;
margin-top: 0.25rem;
opacity: 0.9;
box-sizing: border-box;
}
.section {
background: #fff;
border-radius: 0.5rem;
padding: 0.625rem 0.6875rem;
margin-bottom: 0.75rem;
margin-bottom: 0.5rem;
box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.04);
}
.row {

View File

@@ -1,12 +1,14 @@
"use strict";
const _imports_0$5 = "/static/icons/product.png";
const _imports_0$4 = "/static/icons/icons8-shopping-cart-100.png";
const _imports_0$3 = "/static/icons/icons8-login-50.png";
const _imports_0$2 = "/static/logo.png";
const _imports_0$1 = "/static/icons/icons8-vip-48 (1).png";
const _imports_0 = "/static/icons/icons8-close-48.png";
exports._imports_0 = _imports_0$4;
exports._imports_0$1 = _imports_0$3;
exports._imports_0$2 = _imports_0$2;
exports._imports_0$3 = _imports_0$1;
exports._imports_0$4 = _imports_0;
exports._imports_0 = _imports_0$5;
exports._imports_0$1 = _imports_0$4;
exports._imports_0$2 = _imports_0$3;
exports._imports_0$3 = _imports_0$2;
exports._imports_0$4 = _imports_0$1;
exports._imports_0$5 = _imports_0;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map

View File

@@ -7074,7 +7074,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "198.18.0.1,192.168.31.192,127.0.0.1";
const port = "8090";
const id = "mp-weixin_kiZSAl";
const id = "mp-weixin_DCMtn7";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();

View File

@@ -149,7 +149,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
i: common_vendor.o(($event) => $options.onMoveEnd(index), img.uid)
};
}),
b: common_assets._imports_0$4,
b: common_assets._imports_0$5,
c: $data.innerList.length < $props.max
}, $data.innerList.length < $props.max ? {
d: common_vendor.s($options.adderStyle),

View File

@@ -3,6 +3,7 @@ const common_vendor = require("../../common/vendor.js");
const common_http = require("../../common/http.js");
const common_constants = require("../../common/constants.js");
const common_config = require("../../common/config.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
data() {
return {
@@ -189,7 +190,7 @@ const _sfc_main = {
},
goDetail() {
try {
common_vendor.index.__f__("log", "at pages/index/index.vue:259", "[index] goDetail → /pages/detail/index");
common_vendor.index.__f__("log", "at pages/index/index.vue:265", "[index] goDetail → /pages/detail/index");
} catch (e) {
}
common_vendor.index.switchTab({ url: "/pages/detail/index" });
@@ -204,6 +205,17 @@ const _sfc_main = {
showCancel: false
});
},
onPartsSearchTap() {
try {
common_vendor.index.setStorageSync("PRODUCT_SEARCH_CONFIG", JSON.stringify({
openTab: "search",
mode: "template"
}));
} catch (e) {
common_vendor.index.__f__("error", "at pages/index/index.vue:285", "[index] 设置存储标志失败:", e);
}
common_vendor.index.switchTab({ url: "/pages/product/list" });
},
onIconError(item) {
item.img = "";
}
@@ -254,7 +266,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}, {
x: $data.noticeError,
z: !$data.notices.length,
B: common_vendor.f($data.features, (item, k0, i0) => {
B: common_assets._imports_0,
C: common_vendor.o((...args) => $options.onPartsSearchTap && $options.onPartsSearchTap(...args)),
D: common_vendor.f($data.features, (item, k0, i0) => {
return common_vendor.e({
a: item.img
}, item.img ? {

View File

@@ -1 +1 @@
<view class="home"><view class="hero"><view class="hero-top"><text class="brand">五金配件管家</text><view class="cta" bindtap="{{b}}" hover-class="cta-active" hover-stay-time="80"><text class="cta-text">{{a}}</text></view></view><view class="kpi kpi-grid"><view class="kpi-item kpi-card"><image src="{{c}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{d}}</text><text class="kpi-value">{{e}}</text></view></view><view class="kpi-item kpi-card"><image src="{{f}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{g}}</text><text class="kpi-value">{{h}}</text></view></view><view class="kpi-item kpi-card"><image src="{{i}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{j}}</text><text class="kpi-value">{{k}}</text></view></view><view class="kpi-item kpi-card"><image src="{{l}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{m}}</text><text class="kpi-value">{{n}}</text></view></view></view></view><view wx:if="{{o}}" class="dialog-mask" catchtouchmove="{{t}}" catchtap="{{v}}"><view class="dialog"><view class="dialog-title">咨询</view><block wx:if="{{r0}}"><textarea class="dialog-textarea" placeholder="请输入咨询内容..." maxlength="500" value="{{p}}" bindinput="{{q}}"></textarea></block><view class="dialog-actions"><view class="btn" bindtap="{{r}}">取消</view><view class="btn primary" bindtap="{{s}}">提交</view></view></view></view><view class="notice"><view class="notice-left">公告</view><view wx:if="{{w}}" class="notice-swiper" style="display:flex;align-items:center;color:#6b5a2a">加载中...</view><view wx:elif="{{x}}" class="notice-swiper" style="display:flex;align-items:center;color:#dd524d">{{y}}</view><view wx:elif="{{z}}" class="notice-swiper" style="display:flex;align-items:center;color:#6b5a2a">暂无公告</view><swiper wx:else class="notice-swiper" circular autoplay interval="4000" duration="400" vertical><swiper-item wx:for="{{A}}" wx:for-item="n" wx:key="e"><view class="notice-item" bindtap="{{n.d}}"><text class="notice-text">{{n.a}}</text><text wx:if="{{n.b}}" class="notice-tag">{{n.c}}</text></view></swiper-item></swiper></view><view class="section-title"><text class="section-text">常用功能</text></view><view class="grid-wrap"><view class="feature-grid"><view wx:for="{{B}}" wx:for-item="item" wx:key="g" class="feature-card" bindtap="{{item.h}}"><view class="fc-icon"><image wx:if="{{item.a}}" src="{{item.b}}" class="fc-img" mode="aspectFit" binderror="{{item.c}}"></image><text wx:elif="{{item.d}}" class="fc-emoji">{{item.e}}</text><view wx:else class="fc-placeholder"></view></view><view class="fc-title">{{item.f}}</view></view></view></view></view>
<view class="home"><view class="hero"><view class="hero-top"><text class="brand">五金配件管家</text><view class="cta" bindtap="{{b}}" hover-class="cta-active" hover-stay-time="80"><text class="cta-text">{{a}}</text></view></view><view class="kpi kpi-grid"><view class="kpi-item kpi-card"><image src="{{c}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{d}}</text><text class="kpi-value">{{e}}</text></view></view><view class="kpi-item kpi-card"><image src="{{f}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{g}}</text><text class="kpi-value">{{h}}</text></view></view><view class="kpi-item kpi-card"><image src="{{i}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{j}}</text><text class="kpi-value">{{k}}</text></view></view><view class="kpi-item kpi-card"><image src="{{l}}" class="kpi-icon" mode="aspectFit"></image><view class="kpi-content"><text class="kpi-label">{{m}}</text><text class="kpi-value">{{n}}</text></view></view></view></view><view wx:if="{{o}}" class="dialog-mask" catchtouchmove="{{t}}" catchtap="{{v}}"><view class="dialog"><view class="dialog-title">咨询</view><block wx:if="{{r0}}"><textarea class="dialog-textarea" placeholder="请输入咨询内容..." maxlength="500" value="{{p}}" bindinput="{{q}}"></textarea></block><view class="dialog-actions"><view class="btn" bindtap="{{r}}">取消</view><view class="btn primary" bindtap="{{s}}">提交</view></view></view></view><view class="notice"><view class="notice-left">公告</view><view wx:if="{{w}}" class="notice-swiper" style="display:flex;align-items:center;color:#6b5a2a">加载中...</view><view wx:elif="{{x}}" class="notice-swiper" style="display:flex;align-items:center;color:#dd524d">{{y}}</view><view wx:elif="{{z}}" class="notice-swiper" style="display:flex;align-items:center;color:#6b5a2a">暂无公告</view><swiper wx:else class="notice-swiper" circular autoplay interval="4000" duration="400" vertical><swiper-item wx:for="{{A}}" wx:for-item="n" wx:key="e"><view class="notice-item" bindtap="{{n.d}}"><text class="notice-text">{{n.a}}</text><text wx:if="{{n.b}}" class="notice-tag">{{n.c}}</text></view></swiper-item></swiper></view><view class="parts-search-btn" bindtap="{{C}}" hover-class="parts-search-btn-active" hover-stay-time="80"><image src="{{B}}" class="parts-search-icon" mode="aspectFit"></image><text class="parts-search-text">配件查询</text></view><view class="section-title"><text class="section-text">常用功能</text></view><view class="grid-wrap"><view class="feature-grid"><view wx:for="{{D}}" wx:for-item="item" wx:key="g" class="feature-card" bindtap="{{item.h}}"><view class="fc-icon"><image wx:if="{{item.a}}" src="{{item.b}}" class="fc-img" mode="aspectFit" binderror="{{item.c}}"></image><text wx:elif="{{item.d}}" class="fc-emoji">{{item.e}}</text><view wx:else class="fc-placeholder"></view></view><view class="fc-title">{{item.f}}</view></view></view></view></view>

View File

@@ -96,6 +96,35 @@ page {
background: rgba(76, 141, 255, 0.18);
}
/* 配件查询按钮 */
.parts-search-btn {
margin: 0 24rpx 20rpx;
padding: 24rpx 32rpx;
border-radius: 20rpx;
background: linear-gradient(135deg, #4C8DFF 0%, #3d73e6 100%);
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
box-shadow: 0 8rpx 20rpx rgba(76, 141, 255, 0.25);
transition: all 0.2s ease;
}
.parts-search-btn-active {
opacity: 0.85;
transform: scale(0.98);
}
.parts-search-icon {
width: 52rpx;
height: 52rpx;
filter: brightness(0) invert(1);
}
.parts-search-text {
color: #fff;
font-size: 34rpx;
font-weight: 800;
letter-spacing: 2rpx;
}
/* 分割标题 */
.section-title {
display: flex;

View File

@@ -16,7 +16,7 @@ const _sfc_main = {
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_assets._imports_0$2,
a: common_assets._imports_0$3,
b: common_vendor.o((...args) => $options.openPolicy && $options.openPolicy(...args)),
c: common_vendor.o((...args) => $options.openTerms && $options.openTerms(...args)),
d: common_vendor.o((...args) => $options.openComplaint && $options.openComplaint(...args))

View File

@@ -105,6 +105,15 @@ const _sfc_main = {
this.shopName = storeName;
const phone = (profile == null ? void 0 : profile.phone) || common_vendor.index.getStorageSync("USER_MOBILE") || "";
this.mobile = phone;
const email = (profile == null ? void 0 : profile.email) || "";
try {
if (email) {
common_vendor.index.setStorageSync("USER_EMAIL", email);
} else {
common_vendor.index.removeStorageSync("USER_EMAIL");
}
} catch (_) {
}
} catch (e) {
try {
const storeName = common_vendor.index.getStorageSync("SHOP_NAME") || "";
@@ -306,7 +315,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.t($data.shopName),
e: common_vendor.t($options.emailDisplay)
} : {
f: common_assets._imports_0$1,
f: common_assets._imports_0$2,
g: common_vendor.o((...args) => $options.goLogin && $options.goLogin(...args))
}, {
h: $options.isLoggedIn

View File

@@ -128,7 +128,7 @@ const _sfc_main = {
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_assets._imports_0$3,
a: common_assets._imports_0$4,
b: common_vendor.t($data.isVip ? "VIP会员" : "升级 VIP 会员"),
c: common_vendor.t($data.isVip ? "尊享完整数据与高效体验" : "开通后可查看全部历史数据并解锁高级功能"),
d: common_vendor.t($data.isVip ? "已开通" : "普通用户"),

View File

@@ -381,7 +381,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
ak: common_vendor.t($data.order.orderTime),
al: $data.order.orderTime,
am: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args)),
an: common_assets._imports_0,
an: common_assets._imports_0$1,
ao: common_vendor.o((...args) => $options.chooseProduct && $options.chooseProduct(...args)),
ap: common_vendor.t($options.totalQuantity),
aq: common_vendor.t($options.totalAmount.toFixed(2)),

View File

@@ -41,6 +41,21 @@ const _sfc_main = {
})();
if (!hasToken)
return;
try {
const configStr = common_vendor.index.getStorageSync("PRODUCT_SEARCH_CONFIG");
if (configStr) {
const config = JSON.parse(configStr);
if (config.openTab) {
this.tab = config.openTab;
}
if (config.mode) {
this.query.mode = config.mode;
}
common_vendor.index.removeStorageSync("PRODUCT_SEARCH_CONFIG");
}
} catch (e) {
common_vendor.index.__f__("error", "at pages/product/list.vue:121", "[list] 处理查询配置失败:", e);
}
this.reload();
},
computed: {
@@ -175,6 +190,9 @@ const _sfc_main = {
} catch (e) {
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
}
},
goSubmit() {
common_vendor.index.navigateTo({ url: "/pages/product/submit" });
}
}
};
@@ -281,7 +299,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
});
})
} : {}, {
A: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args))
A: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
B: common_vendor.o((...args) => $options.goSubmit && $options.goSubmit(...args))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

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="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 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 class="fab" bindtap="{{B}}"></view></view>

View File

@@ -166,11 +166,12 @@
bottom: 120rpx;
width: 100rpx;
height: 100rpx;
background: #4C8DFF;
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
color: #fff;
border-radius: 50rpx;
text-align: center;
line-height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 48rpx;
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.15);
box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.2);
}

View File

@@ -26,19 +26,27 @@
/* 文章场景相关 */
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
.page {
padding: 24rpx 24rpx 160rpx;
min-height: 100vh;
padding: 20rpx 24rpx 160rpx;
background: #f6f7fb;
box-sizing: border-box;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
gap: 16rpx;
flex-wrap: wrap;
}
.model {
font-size: 36rpx;
font-weight: 700;
color: #2d3a4a;
word-break: break-word;
overflow-wrap: break-word;
flex: 1;
min-width: 0;
}
.status.deleted {
font-size: 24rpx;
@@ -46,17 +54,20 @@
border-radius: 999rpx;
background: #c0c4cc;
color: #fff;
white-space: nowrap;
}
.section {
background: #fff;
border-radius: 16rpx;
padding: 20rpx 22rpx;
margin-bottom: 24rpx;
margin-bottom: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
}
.row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16rpx;
padding: 12rpx 0;
border-bottom: 1rpx solid #f1f2f5;
}
@@ -64,16 +75,19 @@
border-bottom: none;
}
.label {
width: 160rpx;
flex-shrink: 0;
width: 140rpx;
font-size: 26rpx;
color: #7a8899;
}
.value {
flex: 1;
min-width: 0;
text-align: right;
font-size: 26rpx;
color: #2d3a4a;
word-break: break-all;
word-break: break-word;
overflow-wrap: break-word;
}
.block-title {
font-size: 28rpx;
@@ -84,6 +98,7 @@
.placeholder {
font-size: 26rpx;
color: #7a8899;
word-break: break-word;
}
.params {
display: flex;
@@ -93,16 +108,22 @@
.param {
display: flex;
justify-content: flex-start;
align-items: center;
align-items: flex-start;
gap: 16rpx;
font-size: 26rpx;
color: #2d3a4a;
}
.param-key {
flex-shrink: 0;
color: #7a8899;
min-width: 160rpx;
}
.param-val {
flex: 1;
min-width: 0;
text-align: left;
word-break: break-word;
overflow-wrap: break-word;
}
.images {
display: grid;
@@ -116,9 +137,17 @@
background: #f0f2f5;
}
.footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: flex-end;
gap: 20rpx;
padding: 20rpx 24rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 -6rpx 20rpx rgba(0, 0, 0, 0.08);
}
.loading {
height: 100vh;

View File

@@ -1 +1 @@
<scroll-view scroll-y class="page"><view class="hero"><text class="title">提交配件</text><text class="desc">填写型号、名称、参数与图片,提交后进入待审核状态</text></view><view class="section"><view class="row required"><text class="label">型号</text><input placeholder="请输入型号(必填)" value="{{a}}" bindinput="{{b}}"/></view><view class="row"><text class="label">品牌</text><input placeholder="品牌/厂商" value="{{c}}" bindinput="{{d}}"/></view><view class="row"><text class="label">条码</text><input placeholder="可选,建议扫码录入" value="{{e}}" bindinput="{{f}}"/><button size="mini" class="picker-btn" bindtap="{{g}}">识码</button></view></view><view class="section"><view class="row"><text class="label">类别</text><picker mode="selector" range="{{i}}" bindchange="{{j}}"><view class="picker">{{h}}</view></picker></view></view><view class="section"><view class="row"><text class="label">编号</text><input placeholder="内部/外部编号(可选)" value="{{k}}" bindinput="{{l}}"/></view></view><view class="section"><view class="row"><text class="label">模板</text></view><view class="row"><picker mode="selector" range="{{n}}" bindchange="{{o}}"><view class="picker">{{m}}</view></picker></view></view><view wx:if="{{p}}" class="section"><view class="row"><text class="label">参数</text></view><view class="param-list"><view wx:for="{{q}}" wx:for-item="p" wx:key="A" class="row"><text class="label">{{p.a}}<text wx:if="{{p.b}}">{{p.c}}</text><text wx:if="{{p.d}}" style="color:#ff5b5b">*</text></text><block wx:if="{{p.e}}"><input placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/></block><block wx:elif="{{p.i}}"><input type="number" placeholder="{{p.j}}" value="{{p.k}}" bindinput="{{p.l}}"/></block><block wx:elif="{{p.m}}"><switch checked="{{p.n}}" bindchange="{{p.o}}"/></block><block wx:elif="{{p.p}}"><picker mode="selector" range="{{p.r}}" bindchange="{{p.s}}"><view class="picker">{{p.q}}</view></picker></block><block wx:elif="{{p.t}}"><picker mode="date" bindchange="{{p.w}}"><view class="picker">{{p.v}}</view></picker></block><block wx:else><input placeholder="{{p.x}}" value="{{p.y}}" bindinput="{{p.z}}"/></block></view></view></view><view class="section"><view class="row"><text class="label">图片</text></view><image-uploader wx:if="{{s}}" u-i="7f3a3bde-0" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"/></view><view class="section"><view class="row"><text class="label">备注</text></view><block wx:if="{{r0}}"><textarea class="textarea" placeholder="选填:补充说明" value="{{t}}" bindinput="{{v}}"/></block></view><view class="section"><view class="row"><text class="label">安全库存</text></view><view class="row triple"><input type="number" placeholder="下限" value="{{w}}" bindinput="{{x}}"/><input type="number" placeholder="上限" value="{{y}}" bindinput="{{z}}"/></view></view><view class="fixed"><button class="primary" loading="{{A}}" bindtap="{{B}}">提交审核</button><button class="primary" style="margin-top:16rpx;background:#7aa9ff" loading="{{C}}" bindtap="{{D}}">查重</button></view></scroll-view>
<scroll-view scroll-y class="page"><view class="section"><view class="row required"><text class="label">型号</text><input placeholder="请输入型号(必填)" value="{{a}}" bindinput="{{b}}"/></view><view class="row"><text class="label">品牌</text><input placeholder="品牌/厂商" value="{{c}}" bindinput="{{d}}"/></view><view class="row"><text class="label">条码</text><input placeholder="可选,建议扫码录入" value="{{e}}" bindinput="{{f}}"/><button size="mini" class="picker-btn" bindtap="{{g}}">识码</button></view></view><view class="section"><view class="row"><text class="label">类别</text><picker mode="selector" range="{{i}}" bindchange="{{j}}"><view class="picker">{{h}}</view></picker></view></view><view class="section"><view class="row"><text class="label">编号</text><input placeholder="内部/外部编号(可选)" value="{{k}}" bindinput="{{l}}"/></view></view><view class="section"><view class="row"><text class="label">模板</text></view><view class="row"><picker mode="selector" range="{{n}}" bindchange="{{o}}"><view class="picker">{{m}}</view></picker></view></view><view wx:if="{{p}}" class="section"><view class="row"><text class="label">参数</text></view><view class="param-list"><view wx:for="{{q}}" wx:for-item="p" wx:key="A" class="row"><text class="label">{{p.a}}<text wx:if="{{p.b}}">{{p.c}}</text><text wx:if="{{p.d}}" style="color:#ff5b5b">*</text></text><block wx:if="{{p.e}}"><input placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/></block><block wx:elif="{{p.i}}"><input type="number" placeholder="{{p.j}}" value="{{p.k}}" bindinput="{{p.l}}"/></block><block wx:elif="{{p.m}}"><switch checked="{{p.n}}" bindchange="{{p.o}}"/></block><block wx:elif="{{p.p}}"><picker mode="selector" range="{{p.r}}" bindchange="{{p.s}}"><view class="picker">{{p.q}}</view></picker></block><block wx:elif="{{p.t}}"><picker mode="date" bindchange="{{p.w}}"><view class="picker">{{p.v}}</view></picker></block><block wx:else><input placeholder="{{p.x}}" value="{{p.y}}" bindinput="{{p.z}}"/></block></view></view></view><view class="section"><view class="row"><text class="label">图片</text></view><image-uploader wx:if="{{s}}" u-i="7f3a3bde-0" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"/></view><view class="section"><view class="row"><text class="label">备注</text></view><block wx:if="{{r0}}"><textarea class="textarea" placeholder="选填:补充说明" value="{{t}}" bindinput="{{v}}"/></block></view><view class="section"><view class="row"><text class="label">安全库存</text></view><view class="row triple"><input type="number" placeholder="下限" value="{{w}}" bindinput="{{x}}"/><input type="number" placeholder="上限" value="{{y}}" bindinput="{{z}}"/></view></view><view class="fixed"><button class="primary" loading="{{A}}" bindtap="{{B}}">提交审核</button><button class="primary" style="margin-top:16rpx;background:#7aa9ff" loading="{{C}}" bindtap="{{D}}">查重</button></view></scroll-view>

View File

@@ -26,30 +26,16 @@
/* 文章场景相关 */
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
.page {
padding: 24rpx 24rpx 120rpx;
height: 100vh;
padding: 16rpx 24rpx 120rpx;
background: #f6f7fb;
}
.hero {
padding: 24rpx;
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
border-radius: 20rpx;
color: #fff;
margin-bottom: 24rpx;
}
.title {
font-size: 36rpx;
font-weight: 700;
}
.desc {
font-size: 26rpx;
margin-top: 8rpx;
opacity: 0.9;
box-sizing: border-box;
}
.section {
background: #fff;
border-radius: 16rpx;
padding: 20rpx 22rpx;
margin-bottom: 24rpx;
margin-bottom: 16rpx;
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.04);
}
.row {