app网络请求封装修改
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {deviceBind} from "@/api/common/qrcode.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -36,21 +37,25 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleConnect() {
|
||||
async handleConnect() {
|
||||
if (this.isConnecting) {
|
||||
|
||||
} else {
|
||||
console.log('这里了么');
|
||||
// 开始连接逻辑
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中....'
|
||||
})
|
||||
this.isConnecting = true;
|
||||
//这里可以添加实际的连接操作
|
||||
setTimeout(() => {
|
||||
this.connectSuccess();
|
||||
}, 2000);
|
||||
try {
|
||||
// 调用绑定设备接口
|
||||
await deviceBind({
|
||||
//deviceImei: this.deviceId,
|
||||
deviceIMEI: 'FYS-YF-082-SB',
|
||||
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
},
|
||||
connectSuccess() {
|
||||
|
Reference in New Issue
Block a user