H5Params.kt 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package com.ydl.webview

import com.ydl.ydlcommon.bean.ShareData
import java.io.Serializable

/**
 * 跳转到h5页面所需参数
 * Created by Administrator on 2017/8/3 0003.
 */
class H5Params : Serializable {

    constructor(url: String, title: String?) : super() {
        this.url = url
        this.title = title
    }

17
    constructor(url: String, backLimit: BackLimit, hasBackLimit: Boolean): super() {
徐健 committed
18
        this.url =url
19
        if (hasBackLimit) {
徐健 committed
20 21 22 23
            this.backLimit = backLimit
        }
    }

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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
    constructor(url: String, title: String?, share: ShareData?) : super() {
        this.url = url
        this.shareData = share
        this.title = title
    }

    constructor(url: String, title: String?, share: ShareData?, showUrlTitle: Boolean, suffix: Boolean) : super() {
        this.url = url
        this.shareData = share
        this.title = title
        this.showUrlTitle = showUrlTitle
        this.suffix = suffix
    }

    var title: String? = null
    var url: String = ""

    /**
     * 分享参数
     */
    var shareData: ShareData? = null

    /**
     * 是否显示右上角菜单
     */
    var isShowMenu = false
    /**
     * 是否加签 默认加签
     */
    var suffix = true
    /**
     * 是否显示title
     */
    var showUrlTitle = true
    /**
     * 是否从启动页进入
     */
    var isSplash = false
    /**
     * 高级题测试题流程:是否要控制物理返回键逻辑
     */
    var isControlBack = false
    /**
     * 倾诉拨打电话
     */
    var phone: String? = null
徐健 committed
70
    /**
71
     * h5页面返回按钮限制
徐健 committed
72
     */
73
    var backLimit: BackLimit? = null
74

75 76
    enum class BackLimit {
        NEW_USER_PAGE  // 新用户引导页面
77 78
    }

79
}