体征检测优化

This commit is contained in:
2024-02-22 17:01:16 +08:00
parent 94778fca51
commit 17b0c42d31

View File

@ -89,24 +89,38 @@
return z.y + '-' + z.M + '-' + z.d + ' ' + z.h + ':' + z.m + ':' + z.s return z.y + '-' + z.M + '-' + z.d + ' ' + z.h + ':' + z.m + ':' + z.s
}, },
submit() { submit() {
binding(this.data).then(res => { if (this.data.sn) {
if (res.code == 200) { if (this.data.deviceType) {
this.$refs.uToast.show({ binding(this.data).then(res => {
title: '绑定成功', if (res.code == 200) {
type: 'success', this.$refs.uToast.show({
title: '绑定成功',
type: 'success',
})
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
} else {
this.$refs.uToast.show({
title: res.msg,
type: 'error',
})
}
}) })
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, title: '请选择设备类型',
type: 'error', type: 'error',
}) })
} }
}) } else {
this.$refs.uToast.show({
title: '请输入设备序列号',
type: 'error',
})
}
} }
} }
} }