| | |
| | | baseLedId: '', |
| | | baseCrnId: '', |
| | | baseUrl: '', |
| | | apiIp: '178.18.1.203', |
| | | apiPort: '9090', |
| | | apiUrl: 'tlfwcs', |
| | | info: null, |
| | | error: null, |
| | | infoType: 0, |
| | |
| | | }, 500) |
| | | }, |
| | | onLoad() { |
| | | this.getLedInfos() |
| | | |
| | | setInterval(() => { |
| | | this.getDate2() |
| | | this.getUrl() |
| | |
| | | var result = ycqdata.carError |
| | | var res = result.data |
| | | that.carInfoModel(res) |
| | | }, |
| | | getLedInfos() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseHttp + that.apiIp + ":" + that.apiPort + "/" + that.apiUrl + "/console/getLedInfos", |
| | | method: "GET", |
| | | data: {}, |
| | | success(result) { |
| | | var res = result.data |
| | | let data = res.data; |
| | | |
| | | uni.setStorageSync('BaseIp', that.apiIp); |
| | | uni.setStorageSync('BaseLedId', data.staArr); |
| | | uni.setStorageSync('BasePort', that.apiPort); |
| | | uni.setStorageSync('BaseCrnId', data.crnId); |
| | | uni.setStorageSync('UPROJ', that.apiUrl); |
| | | this.getUrl() |
| | | } |
| | | }) |
| | | }, |
| | | carInfoModel(res) { |
| | | let infoList = [] |
| | |
| | | that.infoType = 0 |
| | | } |
| | | }, |
| | | getInfo() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + "/monitor/led", |
| | | method: "GET", |
| | | data: { |
| | | ledId: that.baseLedId |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | that.infoModel(res) |
| | | } |
| | | }) |
| | | // getInfo() { |
| | | // let that = this |
| | | // uni.request({ |
| | | // url: that.commonUrl + "/monitor/led", |
| | | // method: "GET", |
| | | // data: { |
| | | // ledId: that.baseLedId |
| | | // }, |
| | | // success(result) { |
| | | // var res = result.data |
| | | // that.infoModel(res) |
| | | // } |
| | | // }) |
| | | |
| | | }, |
| | | // }, |
| | | getError() { |
| | | let that = this |
| | | uni.request({ |
| | |
| | | } |
| | | uni.request({ |
| | | url: that.commonUrl + "/monitor/loc/rep", |
| | | data: { |
| | | crnId: that.baseCrnId, |
| | | ledId: that.baseLedId, |
| | | }, |
| | | method: 'GET', |
| | | success(result) { |
| | | var res = result.data |