This commit is contained in:
Iruka 2025-02-08 10:34:14 +08:00
parent 0b2773e57d
commit 568460dbb7
2 changed files with 9 additions and 7 deletions

14
App.vue
View File

@ -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
},
//

View File

@ -49,7 +49,7 @@ export function hasToken() {
*/
export function getInfo() {
//初始化app参数
getApp().initData();
getApp().initApp();
// getUserRoles();
//获取用户权限
return new Promise((resolve, reject) => {