This commit is contained in:
parent
db7a85fe52
commit
b075aec5aa
|
|
@ -31,8 +31,9 @@
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
|
|
||||||
<div style="width: 92%;height: auto;margin: 10px;">
|
</div>
|
||||||
<uni-table stripe emptyText="暂无更多数据" >
|
|
||||||
|
<uni-table border stripe emptyText="暂无更多数据" >
|
||||||
<!-- 表头行 -->
|
<!-- 表头行 -->
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th width="120px" style="font-size: 24rpx;" align="center">设备编码</uni-th>
|
<uni-th width="120px" style="font-size: 24rpx;" align="center">设备编码</uni-th>
|
||||||
|
|
@ -59,9 +60,6 @@
|
||||||
</uni-td>
|
</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="btn">
|
<!-- <div class="btn">
|
||||||
<button class="btn-cont">取消</button>
|
<button class="btn-cont">取消</button>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,8 @@
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-area">
|
</div>
|
||||||
|
|
||||||
<uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<!-- 表头行 -->
|
<!-- 表头行 -->
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
|
|
@ -135,9 +136,6 @@
|
||||||
</uni-td>
|
</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div class="footer-btn">
|
<!-- <div class="footer-btn">
|
||||||
<button class="btn-cont" @click="submitNum">确认</button>
|
<button class="btn-cont" @click="submitNum">确认</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
|
||||||
|
|
@ -179,23 +179,27 @@ const onCameraError = (message) => {
|
||||||
console.log('🚀 ~ onCameraError ~ message:', message)
|
console.log('🚀 ~ onCameraError ~ message:', message)
|
||||||
}
|
}
|
||||||
const onCameraSuccess = (file) => {
|
const onCameraSuccess = (file) => {
|
||||||
img.src = file
|
uni.showModal({
|
||||||
let signUrl = ''
|
title: '',
|
||||||
|
content: file,
|
||||||
|
})
|
||||||
|
const signUrl = file
|
||||||
|
// img.src = file
|
||||||
// console.log('🚀 ~ complete ~ img.src:', img.src)
|
// console.log('🚀 ~ complete ~ img.src:', img.src)
|
||||||
img.onload = () => {
|
// img.onload = () => {
|
||||||
const canvas = document.createElement('canvas')
|
// const canvas = document.createElement('canvas')
|
||||||
canvas.width = img.width
|
// canvas.width = img.width
|
||||||
canvas.height = img.height
|
// canvas.height = img.height
|
||||||
const ctx = canvas.getContext('2d')
|
// const ctx = canvas.getContext('2d')
|
||||||
ctx.drawImage(img, 0, 0)
|
// ctx.drawImage(img, 0, 0)
|
||||||
|
|
||||||
// 转换为 WebP 格式,质量 0.8
|
// // 转换为 WebP 格式,质量 0.8
|
||||||
signUrl = canvas
|
// signUrl = canvas
|
||||||
.toDataURL('image/webp', 0.8)
|
// .toDataURL('image/webp', 0.8)
|
||||||
.replace(/^data:image\/(jpeg|png|webp);base64,/, '')
|
// .replace(/^data:image\/(jpeg|png|webp);base64,/, '')
|
||||||
|
|
||||||
// console.log('🚀 ~ WebP base64:', signUrl)
|
// // console.log('🚀 ~ WebP base64:', signUrl)
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// const signUrl = webpBase64
|
// const signUrl = webpBase64
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue