diff --git a/src/components/storage-cells-summary/index.vue b/src/components/storage-cells-summary/index.vue index b7558c0..1bfd019 100644 --- a/src/components/storage-cells-summary/index.vue +++ b/src/components/storage-cells-summary/index.vue @@ -203,15 +203,23 @@ async function performOpenByPassword(password: string, action: 'deposit' | 'retr transitionTo({ type: 'processing', action }) try { - await openByPassword({ + const res = await openByPassword({ shopId: props.shopId, password: String(password) }) - - uni.showToast({ - title: '格口已打开', - icon: 'success' - }) + if (res.code === 0) { + uni.showToast({ + title: '格口已打开', + icon: 'success' + }) + } else { + console.error('打开格口失败:', res) + uni.showToast({ + title: '密码错误', + icon: 'error', + duration: 5000 + }) + } // 刷新数据 await refresh() @@ -220,7 +228,7 @@ async function performOpenByPassword(password: string, action: 'deposit' | 'retr uni.showToast({ title: (error as any)?.message || '操作失败', icon: 'error', - duration: 3000 + duration: 5000 }) } finally { transitionTo({ type: 'idle' }) diff --git a/src/pages/index/components/product-container.vue b/src/pages/index/components/product-container.vue index ee82199..65c0384 100644 --- a/src/pages/index/components/product-container.vue +++ b/src/pages/index/components/product-container.vue @@ -228,7 +228,8 @@ function handleCheckout() { .product-container { display: flex; // height: 100%; - height: calc(100vh - 150px); + // height: calc(100vh - 150px); + height: 100vh; background: #f7f8fa; position: relative; overflow: hidden; @@ -273,7 +274,8 @@ function handleCheckout() { .product-list { flex: 1; - height: calc(100vh - 150px); + // height: calc(100vh - 150px); + height: 100vh; padding: 10px; background: #ffffff; } diff --git a/src/pages/index/components/renting-cabinet-container.vue b/src/pages/index/components/renting-cabinet-container.vue index c6c59c7..3ad7b0c 100644 --- a/src/pages/index/components/renting-cabinet-container.vue +++ b/src/pages/index/components/renting-cabinet-container.vue @@ -192,7 +192,8 @@ function switchCellImage(cellType: number) {