| | |
| | | <script>
|
| | | import DB from 'db.js'
|
| | | export default {
|
| | | onLaunch: function() { |
| | | globalData: {
|
| | | resourseUrl: '1.119.197.90:60106',
|
| | | // resourseUrl: 'bsic.asuscomm.com:60106',
|
| | | // resourseUrl: '192.168.20.10:7009',
|
| | | // mqUrl: 'bsic.asuscomm.com:15675',
|
| | | mqUrl: '1.119.197.90:15675',
|
| | | // mqUrl: '192.168.20.189:15675',
|
| | | requestVideoUrl: '1.119.197.90:9000',
|
| | | // requestVideoUrl: 'bsic.asuscomm.com:9000',
|
| | | // requestVideoUrl: '192.168.20.10:9000',
|
| | | curPageDetail: null
|
| | | },
|
| | | onLaunch: function() {
|
| | | console.log('App Launch')
|
| | | if(DB.isOpen() == false){
|
| | | if (DB.isOpen() == false) {
|
| | | DB.openSqlite()
|
| | | }
|
| | | // DB.dropTable("warning_list")
|
| | | DB.createTable('warning_list','id text UNIQUE, time text, date text, pos text, name text, warningLevel text, imgUrl text, unixTime INTEGER, isRead integer');
|
| | | DB.createTable('warning_list',
|
| | | 'id text UNIQUE, time text, date text, pos text, name text, warningLevel text, imgUrl text, unixTime INTEGER, isRead integer'
|
| | | );
|
| | | const resourseUrl=uni.getStorageSync("resourseUrl")
|
| | | if(resourseUrl){
|
| | | getApp().globalData.resourseUrl =resourseUrl
|
| | | }
|
| | | const mqUrl=uni.getStorageSync("mqUrl")
|
| | | if(mqUrl){
|
| | | getApp().globalData.mqUrl =mqUrl
|
| | | }
|
| | | const requestVideoUrl=uni.getStorageSync("requestVideoUrl")
|
| | | if(requestVideoUrl){
|
| | | getApp().globalData.requestVideoUrl =requestVideoUrl
|
| | | }
|
| | | },
|
| | | onShow: function() {
|
| | | console.log('App Show')
|