This commit is contained in:
bb_pan 2025-06-20 16:22:02 +08:00
parent db7a85fe52
commit b075aec5aa
3 changed files with 115 additions and 115 deletions

View File

@ -31,8 +31,9 @@
</uni-forms-item>
</uni-forms>
<div style="width: 92%;height: auto;margin: 10px;">
<uni-table stripe emptyText="暂无更多数据" >
</div>
<uni-table border stripe emptyText="暂无更多数据" >
<!-- 表头行 -->
<uni-tr>
<uni-th width="120px" style="font-size: 24rpx;" align="center">设备编码</uni-th>
@ -59,9 +60,6 @@
</uni-td>
</uni-tr>
</uni-table>
</div>
</div>
<!-- <div class="btn">
<button class="btn-cont">取消</button>

View File

@ -66,7 +66,8 @@
</uni-col>
</uni-row>
</div>
<div class="table-area">
</div>
<uni-table border stripe emptyText="暂无更多数据">
<!-- 表头行 -->
<uni-tr>
@ -135,9 +136,6 @@
</uni-td>
</uni-tr>
</uni-table>
</div>
</div>
<!-- <div class="footer-btn">
<button class="btn-cont" @click="submitNum">确认</button>
</div> -->

View File

@ -179,23 +179,27 @@ const onCameraError = (message) => {
console.log('🚀 ~ onCameraError ~ message:', message)
}
const onCameraSuccess = (file) => {
img.src = file
let signUrl = ''
uni.showModal({
title: '',
content: file,
})
const signUrl = file
// img.src = file
// console.log('🚀 ~ complete ~ img.src:', img.src)
img.onload = () => {
const canvas = document.createElement('canvas')
canvas.width = img.width
canvas.height = img.height
const ctx = canvas.getContext('2d')
ctx.drawImage(img, 0, 0)
// img.onload = () => {
// const canvas = document.createElement('canvas')
// canvas.width = img.width
// canvas.height = img.height
// const ctx = canvas.getContext('2d')
// ctx.drawImage(img, 0, 0)
// WebP 0.8
signUrl = canvas
.toDataURL('image/webp', 0.8)
.replace(/^data:image\/(jpeg|png|webp);base64,/, '')
// // WebP 0.8
// signUrl = canvas
// .toDataURL('image/webp', 0.8)
// .replace(/^data:image\/(jpeg|png|webp);base64,/, '')
// console.log('🚀 ~ WebP base64:', signUrl)
}
// // console.log('🚀 ~ WebP base64:', signUrl)
// }
try {
// const signUrl = webpBase64