Commit 2708b35b authored by “yiyousong”'s avatar “yiyousong”

fix:修复不能获取设备编号错误

parent 1193c3ca
......@@ -114,19 +114,20 @@ export default {
getInfo() {
let routeQuery = this.urlGet();
if (JSON.stringify(routeQuery) !== "{}") {
let serveinfo = routeQuery["serveinfo"]
? JSON.parse(decodeURIComponent(routeQuery["serveinfo"]))
: {};
let { devicenum } = routeQuery;
this.devicenum = devicenum;
this.SET_deviceCode(devicenum);
local.setLocal("devicenum", devicenum);
// window软件测试
let serveinfo = JSON.parse(decodeURIComponent(routeQuery["serveinfo"]));
if (JSON.stringify(serveinfo) !== "{}") {
let { deviceInfo, serviceInfo } = serveinfo;
let { serverUrl } = serviceInfo;
let siteId = deviceInfo.siteId; //站点id
this.devicenum = devicenum;
local.setLocal("siteId", siteId);
local.setLocal("serverUrl", serverUrl);
local.setLocal("devicenum", devicenum);
local.setLocal("deviceInfo", deviceInfo);
this.SET_deviceCode(devicenum);
}
}
},
// 获取首页信息
......
......@@ -152,6 +152,7 @@ export default {
},
conditions
);
// 心跳上行消息
_this.settimer = setInterval(() => {
let beatObj = {
......@@ -195,8 +196,6 @@ export default {
let deviceInfo = objc.deviceInfo; //设备信息
let serverUrl = serviceInfo.serverUrl; //系统地址
let siteId = deviceInfo.siteId; //站点id
this.devicenum = objc.devicenum;
local.setLocal("devicenum", this.devicenum); // 设备编号
// 保存地址
local.setLocal("serverUrl", serverUrl);
local.setLocal("siteId", siteId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment