diff --git a/banban-mini/src/pages/bind/index.scss b/banban-mini/src/pages/bind/index.scss index b1937ed..674f2a6 100644 --- a/banban-mini/src/pages/bind/index.scss +++ b/banban-mini/src/pages/bind/index.scss @@ -68,6 +68,41 @@ position: relative; } +.pending-device-card { + margin: 0 48px 48px; + background: #FFFFFF; + border-radius: 24px; + padding: 48px 40px; + display: flex; + flex-direction: column; + align-items: center; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); +} + +.pending-device-title { + font-size: 34px; + font-weight: 700; + color: #1A1A1A; + margin-bottom: 14px; +} + +.pending-device-id { + max-width: 100%; + font-size: 28px; + color: #FF8C42; + font-weight: 600; + word-break: break-all; + text-align: center; + margin-bottom: 12px; +} + +.pending-device-desc { + font-size: 26px; + color: #666666; + text-align: center; + line-height: 1.5; +} + .scan-frame { background: #FFFFFF; border-radius: 24px; diff --git a/banban-mini/src/pages/bind/index.tsx b/banban-mini/src/pages/bind/index.tsx index 3c36ad9..b3f9bc8 100644 --- a/banban-mini/src/pages/bind/index.tsx +++ b/banban-mini/src/pages/bind/index.tsx @@ -350,26 +350,37 @@ export default function Bind() { {isPendingBinding ? '补全绑定' : '扫码贴卡绑定设备'} - - + {isPendingBinding ? ( + - - {!canEditDeviceFields ? '请先完成儿童资料' : isScanning ? '正在扫码...' : '点击扫码'} - - - {!canEditDeviceFields ? '先选儿童,再扫设备二维码' : '扫描设备二维码或条码'} - + 关联现有设备 + {pendingDeviceId} + 选择已有孩子,或新建孩子后完成关联 + ) : ( + + + + + + + {!canEditDeviceFields ? '请先完成儿童资料' : isScanning ? '正在扫码...' : '点击扫码'} + + + {!canEditDeviceFields ? '先选儿童,再扫设备二维码' : '扫描设备二维码或条码'} + + - - - - - + + + + + + - + )} @@ -413,12 +424,17 @@ export default function Bind() { - {children.length > 0 - ? '可以选已有儿童,也可以在这里新建一个儿童后再绑定设备' - : '当前还没有儿童资料,请先创建一个儿童资料'} + {isPendingBinding + ? children.length > 0 + ? '可以选已有儿童,也可以新建一个儿童后关联当前设备' + : '当前还没有儿童资料,请先创建一个儿童资料后关联设备' + : children.length > 0 + ? '可以选已有儿童,也可以在这里新建一个儿童后再绑定设备' + : '当前还没有儿童资料,请先创建一个儿童资料'} + {!isPendingBinding && ( 设备信息 @@ -457,6 +473,7 @@ export default function Bind() { )} + )}