heyujie
2021-06-07 e7d93ffbf1afeaf167af36ea4835935be967f900
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<script>
    import DB from 'db.js'
    export default {
        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) {
                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'
            );
            const resourseUrl=uni.getStorageSync("resourseUrl")
            console.log("haefa")
            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')
        },
        onHide: function() {
            console.log('App Hide')
        }
    }
</script>
 
<style>
 
</style>