This commit is contained in:
aihe 2024-05-10 21:37:12 +08:00
parent e1dab7106b
commit fef2b299ff

View File

@ -91,10 +91,12 @@
</view> </view>
</template> </template>
</view> </view>
<canvas canvas-id="shareCanvas" :style="{width:canvas_width+'px', height: canvas_height+'px'}"></canvas>
</view> </view>
</template> </template>
</tpx-layout> </tpx-layout>
<canvas canvas-id="shareCanvas" :style="{width:canvas_width+'px', height: canvas_height+'px'}"></canvas>
</tpx-page> </tpx-page>
</template> </template>
@ -196,6 +198,7 @@ export default {
await this.connect() await this.connect()
if(this.serverList?.length > 0) { if(this.serverList?.length > 0) {
this.curTab = 1 this.curTab = 1
this.stopDiscoveryPrinter()
} else { } else {
showToast('该设备无服务,请检查配置或换一个设备连接') showToast('该设备无服务,请检查配置或换一个设备连接')
} }
@ -410,7 +413,7 @@ export default {
}, },
renderPic() { renderPic() {
let filePath = 'http://oss-emis.tanex56.com/sapp/sdg/hdbg.png' // TODO let filePath = 'http://image-c.weimobwmc.com/ol-6NoQb/c2a90db027fa4cd19d2300f21fd8e593.jpg' // TODO
let that = this let that = this
return new Promise((resolve, reject)=> { return new Promise((resolve, reject)=> {
const cxt = uni.createCanvasContext(that.canvasId, that); const cxt = uni.createCanvasContext(that.canvasId, that);
@ -482,7 +485,7 @@ export default {
} }
/*二维码隐藏到窗口外*/ /*二维码隐藏到窗口外*/
canvas { canvas {
position: absolute; // position: absolute;
top: -999rpx // top: -999rpx
} }
</style> </style>