lgq
3 天以前 081f12a52906abe6c2d139fdc144135978681009
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
import dxui from '../../dxmodules/dxUi.js'
import std from '../../dxmodules/dxStd.js'
import viewUtils from "./viewUtils.js"
import topView from './topView.js'
import mainView from './mainView.js'
import screen from '../screen.js'
import i18n from './i18n.js'
const appView = {}
appView.init = function () {
    /**************************************************创建屏幕*****************************************************/
    const screenMain = dxui.View.build('appView', dxui.Utils.LAYER.MAIN)
    appView.screenMain = screenMain
    screenMain.scroll(false)
    screenMain.bgColor(0xffffff)
    screenMain.on(dxui.Utils.ENUM.LV_EVENT_SCREEN_LOADED, () => {
        topView.changeTheme(true)
        appQrcode.source(screen.resourcePath.imagePath + '/app_qrcode.png')
        // 无操作10秒自动返回
        if (appView.timer) {
            std.clearInterval(appView.timer)
        }
        appView.timer = std.setInterval(() => {
            let count = dxui.Utils.GG.NativeDisp.lvDispGetInactiveTime()
            if (count > 10 * 1000) {
                std.clearInterval(appView.timer)
                appView.timer = null
                mainView.load()
            }
        }, 1000)
 
    })
 
    const appQrcode = dxui.Image.build('appQrcode', screenMain)
    appQrcode.source(screen.resourcePath.imagePath + '/app_qrcode.png')
    appQrcode.align(dxui.Utils.ALIGN.TOP_MID, 0, screen.screenSize.height * (206 / 1024))
 
    const knowedBtn = viewUtils.bottomBtn(screenMain, 'knowedBtn', 'appView.knowed', () => {
        mainView.load()
    })
    knowedBtn.align(dxui.Utils.ALIGN.BOTTOM_MID, 0, -screen.screenSize.height * (124 / 1024))
 
    const appQrcodeLbl = dxui.Label.build('appQrcodeLbl', screenMain)
    appQrcodeLbl.text('使用小程序便捷管理')
    appQrcodeLbl.textFont(viewUtils.font(30))
    appQrcodeLbl.align(dxui.Utils.ALIGN.BOTTOM_MID, 0, -screen.screenSize.height * (403 / 1024))
    appQrcodeLbl.dataI18n = 'appView.appQrcodeLbl'
}
 
export default appView