You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
983 B
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="network-print-page">
<!-- <button type="primary" @tap="linkPrint"></button>
<button type="warn" @tap="unlinkPrint"></button> -->
</view>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
onLoad(() => {
// uni.requireNativePlugin('hy-print')
})
// uni.onSocketOpen(function (res) {
// console.log('WebSocket连接已打开');
// });
// uni.onSocketClose(() => {
// console.log('websocket 已关闭')
// })
// uni.onSocketError((error) => {
// console.log('websocket 报错', error)
// })
// function linkPrint () {
// uni.connectSocket({
// url: 'ws://192.168.1.15:9100',
// success: (res) => {
// console.log('连接打印机成功', res)
// uni.getDeviceInfo({
// })
// },
// fail: (error) => {
// console.log('连接打印机失败', error)
// }
// })
// }
// function unlinkPrint() {
// uni.closeSocket()
// }
</script>
<style lang="scss">
</style>