1
0
forked from dyf/APP
revert Merge branch 'main' of http://47.107.152.87:3000/liubiao/APP

# Conflicts:
#	.gitignore
#	pages/common/index/index.vue
#	unpackage/dist/dev/app-plus/app-config-service.js
#	unpackage/dist/dev/app-plus/app-service.js
#	unpackage/dist/dev/app-plus/app-view.js
#	unpackage/dist/dev/app-plus/manifest.json
#	utils/request.js
This commit is contained in:
2025-07-31 10:59:29 +08:00
parent e5e2aca0c4
commit 70651b81f5
1387 changed files with 102695 additions and 5024 deletions

View File

@ -12,7 +12,7 @@
<view>
<image src="/static/images/bip.6.png" class="bip"></image>
</view>
<text class="device-name">设备名{{deviceId}}</text>
<text class="device-name">设备名CLI</text>
<text class="device-model1">ID:{{deviceId}}</text>
</view>
<view class="connecting-line" v-if="isConnectNo">连接中...</view>
@ -35,21 +35,18 @@
return {
deviceId: '',
isConnecting: false, // 是否正在连接
isConnected: false, // 是否连接成功
isConnectNo: false,
isSuccess: false
isConnected: false ,// 是否连接成功
isConnectNo:false,
isSuccess:false
}
},
methods: {
async handleConnect() {
if (this.isConnecting) {
// 绑定成功,确认按钮跳转到首页并通知刷新数据
uni.$emit('refreshDeviceList'); // 发出刷新事件
// 绑定成功,确认按钮跳转到首页
uni.switchTab({
url: '/pages/common/index/index'
})
} else {
// 开始连接逻辑
uni.showLoading({
@ -57,7 +54,7 @@
title: '加载中....'
})
this.isConnecting = true;
this.isConnectNo = true
this.isConnectNo=true
try {
// 调用绑定设备接口
const res = await deviceBind({
@ -65,10 +62,10 @@
deviceMac: '',
communicationMode: '0', //0是4g,1是蓝牙
})
console.log(this.deviceId, 'deerer ere');
if (res.code == 200) {
this.isConnectNo = false
this.isSuccess = true
console.log(this.deviceId,'deerer ere');
if (res.code == 0) {
this.isConnectNo=false
this.isSuccess =true
uni.hideLoading()
uni.showToast({
title: res.data,
@ -76,7 +73,6 @@
});
this.isConnecting = true;
} else {
this.isConnectNo = false
uni.showToast({
title: res.msg,
});