style:修改设备、关键件、备件、产品物料传参

master
黄伟杰 1 month ago
parent 207ff2ce3b
commit f8082bd587

@ -45,7 +45,7 @@ function handleBack() {
.header-section {
--status-top: var(--status-bar-height, 0px);
background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%);
padding: calc(20rpx + var(--status-top)) 24rpx 28rpx;
padding: calc(14rpx + var(--status-top)) 24rpx 20rpx;
position: relative;
}
@ -78,7 +78,7 @@ function handleBack() {
}
.header-title {
font-size: 36rpx;
font-size: 34rpx;
font-weight: 700;
color: #ffffff;
}

@ -71,12 +71,12 @@ function startScan() {
onlyFromCamera: true,
scanType: ['qrCode', 'barCode'],
success: (res) => {
const code = String(res?.result || res?.code || res?.qrCode || res?.barCode || '').trim()
if (!code) {
const info = JSON.parse(res.result)
if (!info || !info.id) {
uni.showToast({ title: '未获取到扫码结果', icon: 'none' })
return
}
navigateToDetail(code)
navigateToDetail(info.id)
},
fail: (err) => {
const msg = String(err?.errMsg || '')

@ -71,12 +71,12 @@ function startScan() {
onlyFromCamera: true,
scanType: ['qrCode', 'barCode'],
success: (res) => {
const id = String(res?.result || res?.code || res?.qrCode || res?.barCode || '').trim()
if (!id) {
const info = JSON.parse(res.result)
if (!info || !info.id) {
uni.showToast({ title: '未获取到扫码结果', icon: 'none' })
return
}
navigateToDetail(id)
navigateToDetail(info.id)
},
fail: (err) => {
const msg = String(err?.errMsg || '')

@ -68,18 +68,12 @@ function startScan() {
onlyFromCamera: true,
scanType: ['qrCode', 'barCode'],
success: (res) => {
let parsed
try {
parsed = res && res.result ? JSON.parse(res.result) : undefined
} catch (e) {
parsed = undefined
}
const id = parsed && parsed.id !== undefined ? parsed.id : (res ? res.result : undefined)
if (!id) {
const info = JSON.parse(res.result)
if (!info || !info.id) {
uni.showToast({ title: '未获取到扫码结果', icon: 'none' })
return
}
navigateToDetail(id)
navigateToDetail(info.id)
},
fail: (err) => {
const msg = String(err?.errMsg || '')

@ -71,18 +71,12 @@ function startScan() {
onlyFromCamera: true,
scanType: ['qrCode', 'barCode'],
success: (res) => {
let info;
try {
info = res && res.result ? JSON.parse(res.result) : undefined;
} catch (e) {
info = undefined;
}
const id = info && info.id !== undefined ? info.id : (res ? res.result : undefined);
if (!id) {
const info = JSON.parse(res.result)
if (!info || !info.id) {
uni.showToast({ title: '未获取到扫码结果', icon: 'none' })
return
}
navigateToDetail(id);
navigateToDetail(info.id);
},
fail: (err) => {
const msg = String(err?.errMsg || '')

Loading…
Cancel
Save