设备扫码注册以及我的二维码修改

This commit is contained in:
仲么了
2023-08-31 11:15:58 +08:00
parent a105006e0f
commit 34b4061053
4 changed files with 37 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
<template>
<Cn-page :loading="loading" noPadding beforeRender>
<Cn-page :loading="loading" noPadding>
<view slot="body">
<view class="detail" :style="{ opacity: domLoading ? '0' : '1' }" style="overflow: hidden">
<view class="detail-header">
@@ -321,7 +321,7 @@ export default {
this.client = mqtt.connect('wx://' + MQTT_IP, MQTT_OPTIONS)
// #endif
// #ifdef H5
this.client = mqtt.connect('ws://' + MQTT_IP, MQTT_OPTIONS)
this.client = mqtt.connect('wss://' + MQTT_IP, MQTT_OPTIONS)
// #endif
this.client
.on('connect', () => {

View File

@@ -271,7 +271,7 @@ export default {
queryTopologyDiagramPage({
projectId: this.formData.projectId,
}).then((res) => {
this.imageList = res.data.records.map(item=>{
this.imageList = res.data.records.map(item => {
return {
...item,
filePath: this.$config.static + item.filePath
@@ -297,12 +297,13 @@ export default {
},
scanCode() {
uni.scanCode({
success(res) {
success: (res) => {
console.log('条码类型:' + res.scanType)
console.log('条码内容:' + res.result)
let content = JSON.parse(res.result)
console.log(content)
if (content.type === 'NDID') {
this.formData.nDid = content.nDid
this.formData.nDid = content.data
this.register()
}
},