GlobalInfo.java 3.47 KB
Newer Older
1
package com.ydl.ydlcommon.bean;
konghaorui committed
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

import java.io.Serializable;
import java.util.List;

//全局信息
public class GlobalInfo implements Serializable{
    public String version;
    public GlobalData info;

    public static class GlobalData implements Serializable{
        public SharAppData app_share;
        public String aboutUs;
        public String helpCenter;
        public String listenHelp;
        public String feedBack;
        public String logo;
        public String contactUs;
        public String tel;
        public String wechatAccount;
        public String work_time;
        public int listen_time;
        public float listen_fee;

        public String wxappid;
        public String wxappsecret;
        public String wxmerchantid;
        public String wxmerchantkey;

        public StartingPage startingPage;

        public int bonus_flag;//是否显示红包,1开启,2关闭
        public List<ComforWords> comfortWords;
        public List<NewYearKeyword> newYearKeywords;
        public int newYearSwitch;

        public List<String> user_home_bgs;//我的页面封面图选择列表

        public String join_doctor_url;//专家入住url
        public String notice_text; //首页公告内容
        public int is_show_notice;//1显示公告,2不显示
        public String notice_url;
        public PayNotice pay_notice;
        public int login_hide_wx;  //1隐藏,0显示
45
        public int protocol_android=2; //华为渠道隐私协议开关,1默认勾选,2默认不勾选
konghaorui committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

        public static class PayNotice implements Serializable{
            public String title;
            public String content;
        }

        public static class StartingPage  implements Serializable{

            public String title;
            public String desc;
            public String link_url;
            public String image_url;
            public String share_url;
            public String link_type;

        }

        public static class ComforWords  implements Serializable{
            public String word;
            public int type;
        }

        public static class NewYearKeyword  implements Serializable{
            public String comfortWord;
            public String direction;
            public String effect;
        }

        public NewYearKeyword getNewYearKeyWordByContent(String content){
            if (content == null){
                return null;
            }
            if (newYearSwitch == 1 && newYearKeywords != null){
                int minIndex =  -1;
                int showIndex = -1;
                for (int j = 0; j < newYearKeywords.size(); j++) {
                    NewYearKeyword c = newYearKeywords.get(j);
                    int tempIndex = content.indexOf(c.comfortWord);
                    if (tempIndex != -1) {
                        if (minIndex  == -1){
                            minIndex = tempIndex;
                            showIndex = j;
                        } else if (minIndex > tempIndex) {
                            minIndex = tempIndex;
                            showIndex = j;
                        }
                    }
                }
                if (showIndex != -1) {
                    return newYearKeywords.get(showIndex);
                }
            }
            return null;
        }
    }



    public static class SharAppData  implements Serializable{
        public String cover_url;
        public String descrip;
        public String dl_url;
        public String title;
    }


}