|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div :class="[{'IndexContainer':true}]" :style="{height:ClentHeight}">
|
|
|
|
|
|
|
+ <div :class="[{'IndexContainer':true}]" :style="{height:clientHeight}">
|
|
|
<keep-alive>
|
|
<keep-alive>
|
|
|
<router-view></router-view>
|
|
<router-view></router-view>
|
|
|
</keep-alive>
|
|
</keep-alive>
|
|
@@ -8,10 +8,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
- QueryVueFramework,
|
|
|
|
|
- DownloadVueFramework,
|
|
|
|
|
- getCheckUpdate,
|
|
|
|
|
- getUserList
|
|
|
|
|
|
|
+ QueryVueFramework
|
|
|
} from '@/api/getApiRes'
|
|
} from '@/api/getApiRes'
|
|
|
|
|
|
|
|
import "../../public/mui.js"
|
|
import "../../public/mui.js"
|
|
@@ -23,19 +20,15 @@ export default {
|
|
|
name: 'Home',
|
|
name: 'Home',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- autoUpdate: false,//自动升级
|
|
|
|
|
- aSideState: false,
|
|
|
|
|
- thisClick: 0,
|
|
|
|
|
- tabwildState: 1,
|
|
|
|
|
handleTabsList: [{
|
|
handleTabsList: [{
|
|
|
title: '系统首页',
|
|
title: '系统首页',
|
|
|
name: '1',
|
|
name: '1',
|
|
|
clmurl: '/',
|
|
clmurl: '/',
|
|
|
}],
|
|
}],
|
|
|
- editableTabsValue: '1',
|
|
|
|
|
|
|
+ autoUpdate: false,
|
|
|
curVersion: '1.0.1',
|
|
curVersion: '1.0.1',
|
|
|
- isPad: true,// pad 展示版本
|
|
|
|
|
- ClentHeight: document.documentElement.clientHeight +'px'
|
|
|
|
|
|
|
+ isPad: true,//pad 展示版本
|
|
|
|
|
+ clientHeight: document.documentElement.clientHeight + 'px'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -45,13 +38,12 @@ export default {
|
|
|
localStorage.eqSn = '30:9C:23:0C:8B:1E';
|
|
localStorage.eqSn = '30:9C:23:0C:8B:1E';
|
|
|
localStorage.version = '1.1.0';
|
|
localStorage.version = '1.1.0';
|
|
|
this.getCurVersion();
|
|
this.getCurVersion();
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 获取当前版本号
|
|
|
|
|
|
|
+ //获取当前版本号
|
|
|
getCurVersion() {
|
|
getCurVersion() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- //浏览器默认的
|
|
|
|
|
|
|
+ //浏览器默认配置信息
|
|
|
localStorage.eqSn = '30:9C:23:0C:8B:1E';
|
|
localStorage.eqSn = '30:9C:23:0C:8B:1E';
|
|
|
localStorage.version = '1.1.0';
|
|
localStorage.version = '1.1.0';
|
|
|
|
|
|
|
@@ -61,26 +53,25 @@ export default {
|
|
|
console.log('mui is not ready');
|
|
console.log('mui is not ready');
|
|
|
// 调试时候关闭
|
|
// 调试时候关闭
|
|
|
this.getServeIpAddress(localStorage.eqSn);
|
|
this.getServeIpAddress(localStorage.eqSn);
|
|
|
- // plusReady();
|
|
|
|
|
document.addEventListener('plusready', plusReady, false);
|
|
document.addEventListener('plusready', plusReady, false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function plusReady() {
|
|
function plusReady() {
|
|
|
if (typeof plus == 'undefined') return false;
|
|
if (typeof plus == 'undefined') return false;
|
|
|
- // 获取本地应用资源版本号
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //获取本地应用资源版本号
|
|
|
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
|
|
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
|
|
|
localStorage.version = inf.version;
|
|
localStorage.version = inf.version;
|
|
|
that.curVersion = inf.version;
|
|
that.curVersion = inf.version;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- // 获取手机UUID
|
|
|
|
|
|
|
+ //获取手机UUID
|
|
|
plus.device.getInfo({
|
|
plus.device.getInfo({
|
|
|
success: function (e) {
|
|
success: function (e) {
|
|
|
let uuid = JSON.stringify(e.uuid).toString().substr(1);
|
|
let uuid = JSON.stringify(e.uuid).toString().substr(1);
|
|
|
uuid = uuid.substring(0, uuid.length - 1);
|
|
uuid = uuid.substring(0, uuid.length - 1);
|
|
|
localStorage.eqSn = uuid;
|
|
localStorage.eqSn = uuid;
|
|
|
- console.log('===== uuid =====:' + uuid);
|
|
|
|
|
- console.log('getDeviceInfo success: ' + JSON.stringify(e.uuid));
|
|
|
|
|
|
|
+ console.log('===== uuid =====:' + uuid + '\ngetDeviceInfo success: ' + JSON.stringify(e.uuid));
|
|
|
// 正式版打开
|
|
// 正式版打开
|
|
|
// 获取转发端口地址
|
|
// 获取转发端口地址
|
|
|
that.getServeIpAddress(e.uuid);
|
|
that.getServeIpAddress(e.uuid);
|
|
@@ -113,10 +104,10 @@ export default {
|
|
|
// 正式版
|
|
// 正式版
|
|
|
//开启自动升级
|
|
//开启自动升级
|
|
|
// 教室版本自动升级,户外版禁用自动升级
|
|
// 教室版本自动升级,户外版禁用自动升级
|
|
|
- if(runVersion == 'outDoor'){
|
|
|
|
|
|
|
+ if (runVersion == 'outDoor') {
|
|
|
console.log('户外版禁用自动升级');
|
|
console.log('户外版禁用自动升级');
|
|
|
return false
|
|
return false
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
that.checkUpdate();
|
|
that.checkUpdate();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -133,7 +124,7 @@ export default {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
let param = {};
|
|
let param = {};
|
|
|
let postdata = qs.stringify(param);
|
|
let postdata = qs.stringify(param);
|
|
|
- const h = this.$createElement;
|
|
|
|
|
|
|
+ const h = that.$createElement;
|
|
|
QueryVueFramework(postdata).then(res => {
|
|
QueryVueFramework(postdata).then(res => {
|
|
|
let json = res;
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
if (json.Code == 0) {
|
|
@@ -203,15 +194,15 @@ export default {
|
|
|
let json = data.data;
|
|
let json = data.data;
|
|
|
if (json.Code == 0) {
|
|
if (json.Code == 0) {
|
|
|
// 户外版使用HotsPotDataServiceIP
|
|
// 户外版使用HotsPotDataServiceIP
|
|
|
- if(runVersion == 'outDoor'){
|
|
|
|
|
|
|
+ if (runVersion == 'outDoor') {
|
|
|
headapi = json.Rs.HotsPotDataServiceIP;
|
|
headapi = json.Rs.HotsPotDataServiceIP;
|
|
|
// 内网测试版
|
|
// 内网测试版
|
|
|
// headapi = 'http://192.168.0.3:19096/v1/Sensors/';
|
|
// headapi = 'http://192.168.0.3:19096/v1/Sensors/';
|
|
|
- if(!json.Rs.HotsPotDataServiceIP){
|
|
|
|
|
|
|
+ if (!json.Rs.HotsPotDataServiceIP) {
|
|
|
that.$message.error("未获取到HotsPotDataServiceIP");
|
|
that.$message.error("未获取到HotsPotDataServiceIP");
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
headapi = json.Rs.DataServiceIP;
|
|
headapi = json.Rs.DataServiceIP;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -224,7 +215,6 @@ export default {
|
|
|
console.info(response);
|
|
console.info(response);
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
components: {}
|
|
components: {}
|
|
|
}
|
|
}
|
|
@@ -375,9 +365,11 @@ ul, li {
|
|
|
padding-bottom: 15px;
|
|
padding-bottom: 15px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#__vconsole {
|
|
#__vconsole {
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#__vconsole.show {
|
|
#__vconsole.show {
|
|
|
display: block;
|
|
display: block;
|
|
|
}
|
|
}
|