.
This commit is contained in:
parent
0b2773e57d
commit
568460dbb7
14
App.vue
14
App.vue
@ -12,10 +12,11 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ijs: null, //全局地块列表管理
|
||||
dc: null, // 设备控制类
|
||||
ijs: new indexUtil(), //全局地块列表管理
|
||||
dc: new deviceControl(2, this.dcEventHandler), // 设备控制类
|
||||
mqtt: null, //Mqtt
|
||||
isFirseLink: true, //Mqtt第一次链接
|
||||
topics: null,
|
||||
mqttFun: {},
|
||||
landFun: {},
|
||||
}
|
||||
@ -33,12 +34,13 @@
|
||||
//监听公司点击
|
||||
uni.$off("notify-add-land");
|
||||
uni.$on("notify-add-land", (data) => {
|
||||
// console.error("notify-add-land:", data);
|
||||
that.getLand(data);
|
||||
});
|
||||
//监听地块选择
|
||||
uni.$off("notify-update-land");
|
||||
uni.$on("notify-update-land", (data) => {
|
||||
// console.error("index监听地块更新:", data)
|
||||
// console.error("notify-update-land:", data)
|
||||
// uni.$emit("index-showLoading", true);
|
||||
uni.showLoading();
|
||||
that.getWoList(data, null);
|
||||
@ -48,9 +50,9 @@
|
||||
console.log('App Hide')
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.ijs = new indexUtil(); //全局地块列表管理
|
||||
this.dc = new deviceControl(2, this.dcEventHandler); // 设备控制类
|
||||
initApp() {
|
||||
// this.ijs = new indexUtil(); //全局地块列表管理
|
||||
// this.dc = new deviceControl(2, this.dcEventHandler); // 设备控制类
|
||||
this.mqtt = new mqttUtil(mqttUrl, this.mqttStateHandler, this.mqttMsgHandler); //Mqtt
|
||||
},
|
||||
// 添加一个消息回调
|
||||
|
@ -49,7 +49,7 @@ export function hasToken() {
|
||||
*/
|
||||
export function getInfo() {
|
||||
//初始化app参数
|
||||
getApp().initData();
|
||||
getApp().initApp();
|
||||
// getUserRoles();
|
||||
//获取用户权限
|
||||
return new Promise((resolve, reject) => {
|
||||
|
Loading…
Reference in New Issue
Block a user