CommonVarUtils.java
2.33 KB
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
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
package com.wd.common.utils;
import com.wd.foundation.wdkit.utils.SpUtils;
/**
* @Description: 保存全局变量
* @Author: baozhaoxin
* @CreateDate: 2022/9/2 16:13
*/
public class CommonVarUtils {
/**
* 页面彩蛋是否可以展示
* 0-可以
* 1-不可以
* 默认0
*/
public static String easterEggsCanShow = "0";
/**
* 隐私弹窗是否在展示
* 0-未展示
* 1-展示
* 默认0
*/
public static String agreepomentDialogIsShow = "0";
/**
* 升级弹窗是否在展示
* 0-未正在展示
* 1-正在展示
* */
public static String upgradeDialogIsShow = "0";
/**
* 彩蛋是否正在弹窗
* */
public static boolean isShowingEasterEggs;
/**
* 是否正在弹出口令弹窗
* */
public static boolean isShowingClipboardCodePop;
/**
* 首页定位弹窗是否在展示
* */
public static boolean isShowLocation;
/**
* 高德webapi key ,查询行政区划分的
*/
public static final String GD_SDK_WEB_API_KEY = "bb1931dc343a2560b89036e72bdee077";
/**
* 是否显示分享弹出
*/
public static boolean isShowShareDialog;
/**
* 图文详情页音频id
* */
public static String articleDetailMusicObjectId;
/**
* 音频详情页音频id
* */
public static String musicDetailMusicObjectId;
/**
* 首页弹窗管理
* 是否有弹窗正弹出
* from 来源
* 1 口令弹窗
* 2 首页彩蛋
* 3不校验口令弹窗
* */
public static boolean hasPop(int from){
//定位弹窗是否正在展示
if(CommonVarUtils.isShowLocation){
return true;
}
//正在展示彩蛋弹窗
if(CommonVarUtils.isShowingEasterEggs){
return true;
}
//正在展示升级弹窗
if("1".equals(CommonVarUtils.upgradeDialogIsShow)){
return true;
}
//正在展示口令弹窗
if(3 != from && CommonVarUtils.isShowingClipboardCodePop){
return true;
}
//隐私政策弹窗未关闭 或者未同意隐私政策
if ("1".equals(CommonVarUtils.agreepomentDialogIsShow) || SpUtils.isFirstAgreementFlag()) {
return true;
}
return false;
}
}