Compare commits

...

282 Commits

Author SHA1 Message Date
18401019693
c20312b982 6.5.4礼物冠名 2023-08-18 18:43:47 +08:00
18401019693
643568f63b 6.5.4礼物冠名 2023-08-18 18:08:15 +08:00
18401019693
f03ba293b5 6.5.4礼物冠名 2023-08-18 17:43:13 +08:00
a2f954b28a Merge remote-tracking branch 'origin/master' 2023-08-18 14:48:41 +08:00
d4549793d1 调整头像相关 2023-08-18 14:48:33 +08:00
18401019693
5da8855948 6.5.4礼物冠名 2023-08-18 14:17:46 +08:00
18401019693
348dca8474 6.5.4礼物冠名 2023-08-18 13:49:20 +08:00
18401019693
5afed0ee43 6.5.4礼物冠名 2023-08-18 11:04:21 +08:00
18401019693
d065726274 6.5.4礼物冠名 2023-08-17 18:20:53 +08:00
18401019693
8f9d558043 6.5.4礼物冠名 2023-08-17 18:15:25 +08:00
c594364574 调整关注逻辑 2023-08-17 17:17:06 +08:00
18401019693
68140c8a3a 6.5.4礼物冠名 2023-08-17 15:38:59 +08:00
5a4001c858 调整退出粉丝团逻辑 2023-08-17 13:45:40 +08:00
18401019693
d5953bd651 6.5.4礼物冠名 2023-08-17 13:19:04 +08:00
18401019693
17a2f5e091 6.5.4礼物冠名 2023-08-16 20:01:46 +08:00
18401019693
b2297b062e 6.5.4礼物冠名 2023-08-16 18:17:26 +08:00
b53472de28 調整文案 2023-08-16 17:32:29 +08:00
18401019693
9bce235817 6.5.4礼物冠名 2023-08-16 16:23:28 +08:00
18401019693
60ce5572cf 6.5.4礼物冠名 2023-08-16 15:37:07 +08:00
18401019693
3761cad653 6.5.4礼物冠名 2023-08-16 14:50:50 +08:00
18401019693
2a276503b5 6.5.4礼物冠名 2023-08-16 13:31:56 +08:00
fd0ad36a58 补充英文 2023-08-15 14:07:33 +08:00
41c8783b53 调整一处英文UI下字数过长问题 2023-08-15 14:00:36 +08:00
18401019693
7226add482 6.5.4礼物冠名 2023-08-15 11:29:39 +08:00
09e5f9b984 Merge remote-tracking branch 'origin/master' 2023-08-15 10:37:25 +08:00
83ee1f94df 修复一处闪退bug 2023-08-15 10:37:06 +08:00
18401019693
7e1b054a98 6.5.4礼物冠名 2023-08-14 21:05:15 +08:00
18401019693
9e0c437af5 6.5.4礼物冠名 2023-08-14 19:55:58 +08:00
18401019693
ad26ae7db8 6.5.4礼物冠名 2023-08-14 19:16:02 +08:00
18401019693
84230e517e 6.5.4礼物冠名 2023-08-14 18:40:25 +08:00
9818a1af74 新增关注的code提示 2023-08-14 18:05:55 +08:00
f91ba79c5c 新增关注的code提示 2023-08-14 17:54:27 +08:00
18401019693
0ea9ffc2e8 6.5.4礼物冠名 2023-08-14 17:40:52 +08:00
18401019693
defb5fdd02 6.5.4礼物冠名 2023-08-14 15:50:35 +08:00
b443fdd683 调整页面英文UI 2023-08-14 14:58:13 +08:00
18401019693
c11c66f56f 6.5.4礼物冠名 2023-08-14 13:47:09 +08:00
18401019693
a618bee6b7 6.5.4礼物冠名 2023-08-14 11:18:33 +08:00
399bedb874 调整购买守护页面英文UI 2023-08-14 10:57:38 +08:00
18401019693
3b6e2d47f4 6.5.4礼物冠名 2023-08-14 10:31:01 +08:00
18401019693
96daf73a5c 6.5.4礼物冠名 2023-08-14 10:16:06 +08:00
18401019693
55cbd0ff5b 6.5.4礼物冠名 2023-08-11 14:37:35 +08:00
18401019693
a3ab9ff03e 6.5.4礼物冠名 2023-08-11 14:19:15 +08:00
18401019693
92ed82ea2a 6.5.4礼物冠名 2023-08-11 13:59:54 +08:00
18401019693
6d262d0c94 6.5.4礼物冠名 2023-08-11 09:42:18 +08:00
18401019693
ce1174a88c 6.5.4礼物冠名 2023-08-10 17:40:57 +08:00
18401019693
2406e9bede 6.5.4礼物冠名 2023-08-10 17:38:06 +08:00
9b3a011499 修复英文say hi下格式问题#131 2023-08-10 17:25:53 +08:00
18401019693
7859e7cb29 6.5.4礼物冠名 2023-08-10 17:16:14 +08:00
18401019693
1fd36e3ba0 6.5.4礼物冠名 2023-08-10 17:04:26 +08:00
ec3722b7d0 新增粉丝团任务红点提示 2023-08-10 16:53:00 +08:00
18401019693
35917a5848 6.5.4礼物冠名 2023-08-10 15:40:13 +08:00
18401019693
7ea6bb570d 6.5.4礼物冠名 2023-08-10 14:20:40 +08:00
18401019693
43f95260e6 6.5.4礼物冠名 2023-08-10 13:51:49 +08:00
18142669586
54a4c0b590 Merge remote-tracking branch 'origin/master' 2023-08-10 11:15:31 +08:00
18142669586
2057a3575f 修改融云结束连麦还有对方画面的问题 2023-08-10 11:15:06 +08:00
18401019693
aa809ebaf4 6.5.4礼物冠名 2023-08-10 10:03:01 +08:00
18401019693
dffa71e346 6.5.4礼物冠名 2023-08-09 18:11:42 +08:00
18401019693
fea46aab1f 6.5.4礼物冠名 2023-08-09 17:05:51 +08:00
18401019693
e032e0807b 6.5.4礼物冠名 2023-08-09 14:38:33 +08:00
18401019693
24ed313f60 6.5.4礼物冠名 2023-08-09 14:15:03 +08:00
18142669586
02b70d559d Merge remote-tracking branch 'origin/master' 2023-08-09 14:14:11 +08:00
18142669586
7a26e81f67 修改融云合流不成功的问题,退出画面有问题 2023-08-09 14:13:52 +08:00
d07439efcf update 主播端点礼物墙按钮置灰 2023-08-09 13:53:16 +08:00
18401019693
7bca817633 6.5.4礼物冠名 2023-08-09 13:31:31 +08:00
18401019693
bad2b3689a 6.5.4礼物冠名 2023-08-09 11:01:28 +08:00
3cc9b90151 update 简繁 2023-08-09 10:24:13 +08:00
18401019693
e32e6f95b0 6.5.4礼物冠名 2023-08-08 17:09:35 +08:00
18401019693
2162645da1 6.5.4礼物冠名 2023-08-08 16:12:07 +08:00
18401019693
af17c85366 6.5.4礼物冠名 2023-08-08 16:08:43 +08:00
18401019693
20c00e2896 6.5.4礼物冠名 2023-08-08 15:37:11 +08:00
18401019693
44b95cb1c6 6.5.4礼物冠名 2023-08-08 14:50:13 +08:00
40e744a533 修复粉丝团包裹为空时会关掉对话框的情况 2023-08-08 13:32:42 +08:00
18401019693
82ccd2d89c 6.5.4礼物冠名 2023-08-08 11:37:19 +08:00
18401019693
994bd2a3aa 6.5.4礼物冠名 2023-08-08 09:34:15 +08:00
3ab91a74d1 修复礼物栏自定义数量过长导致的闪退问题 2023-08-07 18:26:45 +08:00
18142669586
d899975495 修改融云合流不成功的问题 2023-08-07 18:06:46 +08:00
dbbe753492 调整【围观】为繁体 2023-08-07 17:05:33 +08:00
18401019693
017320ac09 6.5.4礼物冠名 2023-08-07 16:29:02 +08:00
7ce0bb3a7c 修复#93测试问题 2023-08-07 15:18:34 +08:00
18401019693
a78d5b4aba 6.5.4礼物冠名 2023-08-07 14:50:29 +08:00
37fd1e9f47 调整粉丝团入场英文翻译 2023-08-07 14:39:35 +08:00
18401019693
97ad28ba62 6.5.4礼物冠名 2023-08-07 13:36:59 +08:00
3304e8f673 update 粉丝团 2023-08-05 18:04:36 +08:00
e7daabe588 Merge branch 'dev_6.5.4' 2023-08-05 16:53:13 +08:00
d912ad6119 update 粉丝团 2023-08-05 16:52:48 +08:00
18401019693
dfeb1c246b 6.5.4礼物冠名 2023-08-05 15:22:49 +08:00
18401019693
9588619b73 6.5.4礼物冠名 2023-08-04 16:54:28 +08:00
18401019693
6ba71508ca 6.5.4礼物冠名 2023-08-04 16:28:43 +08:00
c8f443c105 Merge branch 'master' into dev_6.5.4_tmp 2023-08-04 16:15:25 +08:00
18401019693
ebcfddf450 6.5.4礼物冠名 2023-08-04 16:14:36 +08:00
e43fb5e479 Merge branch 'master' into dev_6.5.4_tmp 2023-08-04 16:13:14 +08:00
18401019693
0c096dcafc 6.5.4礼物冠名 2023-08-04 15:59:20 +08:00
18401019693
545c69ff8b 6.5.4礼物冠名 2023-08-04 15:50:32 +08:00
bf8d88608d Merge branch 'master' into dev_6.5.4_tmp
# Conflicts:
#	common/src/main/java/com/yunbao/common/http/PDLiveApi.java
#	common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java
#	common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java
#	common/src/main/res/values-en-rUS/string.xml
#	common/src/main/res/values-zh-rHK/strings.xml
#	common/src/main/res/values-zh-rTW/strings.xml
#	common/src/main/res/values-zh/strings.xml
#	common/src/main/res/values/strings.xml
#	live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
2023-08-04 15:41:11 +08:00
18401019693
45c256cbbb 6.5.4礼物冠名 2023-08-04 15:18:06 +08:00
18401019693
fb1d6c0688 6.5.4礼物冠名 2023-08-04 14:58:26 +08:00
fe921e25bb update 粉丝团 2023-08-04 14:25:49 +08:00
18401019693
d5ca010ec7 6.5.4礼物冠名 2023-08-04 13:57:36 +08:00
18401019693
04259472a1 Merge remote-tracking branch 'origin/dev_gift_6.5.4' 2023-08-04 10:19:18 +08:00
18401019693
d6032a0a0a 6.5.4礼物冠名 2023-08-04 10:18:05 +08:00
18401019693
4a7790d968 6.5.4礼物冠名 2023-08-04 10:11:03 +08:00
18401019693
49810407ce 6.5.4礼物冠名 2023-08-04 09:47:42 +08:00
18401019693
fa086dc5cb 6.5.4礼物冠名 2023-08-03 17:54:14 +08:00
18401019693
3f8d6ed4af 6.5.4礼物冠名 2023-08-03 16:08:43 +08:00
18401019693
986902886a 6.5.4礼物冠名 2023-08-03 14:29:04 +08:00
18401019693
8ed7595aec 6.5.4礼物冠名 2023-08-02 17:47:00 +08:00
18401019693
b78fef6adc 6.5.4礼物冠名 2023-08-02 16:55:36 +08:00
fae0d01dc2 update 粉丝团 2023-08-02 15:48:51 +08:00
9a8bc0505d 修复#248问题 2023-08-02 15:08:11 +08:00
e31fa0310c 修复#250问题 2023-08-02 14:43:20 +08:00
2705342e18 修复#249问题 2023-08-02 14:39:56 +08:00
1bdf3a2ba3 修复#246问题 2023-08-02 14:20:47 +08:00
18401019693
5afa3bd30b 6.5.4礼物冠名 2023-08-02 13:23:37 +08:00
18401019693
54458bd0c0 6.5.4礼物冠名 2023-07-31 18:25:32 +08:00
c53b9a6064 update 粉丝团相关 2023-07-31 16:28:42 +08:00
92d4130c45 update 粉丝团相关 2023-07-28 10:01:41 +08:00
18401019693
a353e51ba8 6.5.4礼物栏优化 2023-07-25 15:25:01 +08:00
18401019693
0646f245b6 6.5.4礼物栏优化 2023-07-25 14:08:52 +08:00
7e3ca79a01 调整随机PK弹框UI 2023-07-21 14:19:20 +08:00
dfeb3a78c1 修复英文模式下,购买是守护文案超长问题 2023-07-21 13:34:31 +08:00
e32d450ca1 修复随机PK文案在英文模式下过长问题 2023-07-21 09:45:11 +08:00
f29766731c 修复#232问题 2023-07-20 18:12:09 +08:00
736592b4e1 新增头像选择界面 2023-07-19 18:30:32 +08:00
3108c898c2 Merge branch 'dev_6.5.4_头像优化' into dev_6.5.4_联系方式 2023-07-19 15:35:48 +08:00
dd2f3db16a 新增头像选择界面 2023-07-19 15:35:30 +08:00
8af231e526 新增头像选择界面 2023-07-19 13:07:27 +08:00
fdbbc3b224 修復紅點檢測 2023-07-19 10:25:11 +08:00
1e4b0bb536 补充信箱角标点亮和防抖 2023-07-18 18:09:27 +08:00
4729f93515 新增获取联系方式的弹框新样式 2023-07-18 15:40:15 +08:00
18401019693
3376a57f9d 6.5.4版本更新-“@”功能优化 2023-07-18 13:48:37 +08:00
18401019693
410fcb5895 修改json的版本号 2023-07-17 16:56:29 +08:00
18401019693
9b62ab6011 修改json的版本号 2023-07-17 16:42:51 +08:00
18401019693
62aa1d63df 修改json的版本号 2023-07-17 16:15:04 +08:00
18142669586
034f2dba5d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	app/src/main/AndroidManifest.xml
#	config.gradle
2023-07-17 16:11:17 +08:00
18142669586
aee1d6cad4 修改上架 2023-07-17 16:10:29 +08:00
9b01ae4d82 修改用户协议地址 2023-07-17 15:18:47 +08:00
16f23519b1 移除百度语言残留内容 2023-07-17 13:35:59 +08:00
9bfed0bc7b 移除腾讯地图残留配置和代码 2023-07-17 10:16:24 +08:00
18401019693
bc0ed26377 修复 2023-07-14 13:13:25 +08:00
18401019693
0d14ce5aee 修复 2023-07-14 11:14:10 +08:00
18142669586
4a7423a5b9 修改全服 2023-07-14 10:43:14 +08:00
18401019693
0a4425d705 修复 2023-07-14 10:18:50 +08:00
d4c2ef71cb 新增主播可导出日志功能 2023-07-13 10:39:33 +08:00
18401019693
7184b147d9 修复 2023-07-12 15:32:44 +08:00
39e9670cff 6.5.3 432 2023-07-12 15:05:39 +08:00
18401019693
7d7535935a 修复 2023-07-12 14:58:34 +08:00
18401019693
dd657e9918 修复 2023-07-12 13:50:00 +08:00
09cef4ade6 6.5.3 更新发送红包说明图片 2023-07-12 13:11:19 +08:00
7038681f8c 6.5.3 2023-07-11 17:57:55 +08:00
6cf68838f8 修改红包样式和文案 2023-07-11 17:25:51 +08:00
c3a08974d1 修改发红包样式 2023-07-11 14:14:33 +08:00
18401019693
20c25a51ef 修复 2023-07-11 11:44:02 +08:00
18401019693
9dfb772224 修复 2023-07-11 11:43:12 +08:00
18401019693
f5f68f16b7 Merge remote-tracking branch 'origin/master' 2023-07-11 11:34:47 +08:00
18401019693
7672cea263 修复 2023-07-11 11:34:40 +08:00
0a02b39c12 根据产品需求修改英文翻译
根据产品需求修改UI样式
2023-07-11 10:51:03 +08:00
18401019693
e786ae16c2 修复 2023-07-11 10:13:29 +08:00
18401019693
1d447b0a90 修复 2023-07-10 16:36:48 +08:00
18401019693
4918f9ba20 修复 2023-07-08 15:52:18 +08:00
18401019693
124b18dcb0 修复 2023-07-08 15:15:40 +08:00
18401019693
f55e9c0cfe 修复 2023-07-08 13:40:50 +08:00
18401019693
84c43f74bc 修复 2023-07-07 16:14:28 +08:00
18401019693
674346b6de 修复 2023-07-07 16:01:29 +08:00
18401019693
64f40d52da 修复 2023-07-07 10:34:25 +08:00
18401019693
75e342975c 修复 2023-07-07 10:15:11 +08:00
18401019693
dd4172fc3d 修复 2023-07-07 09:51:29 +08:00
6b7a98dbc3 修复#220问题 2023-07-06 17:59:00 +08:00
640dea5c53 修复#218问题 2023-07-06 17:47:03 +08:00
a907897239 修复#217问题 2023-07-06 17:45:23 +08:00
3807ff8916 修复红包出现在联系方式选项里 2023-07-06 17:00:02 +08:00
36b85c15f5 修复飘屏弹幕被禁言没提示问题 2023-07-06 16:44:07 +08:00
3e91068866 按测试反馈修改红包详情UI逻辑和新增礼物显示 2023-07-06 15:13:33 +08:00
18401019693
4d61c7e176 添加翻译 2023-07-06 10:17:14 +08:00
18401019693
c6d9dbc118 添加翻译 2023-07-06 10:02:18 +08:00
6743ec3cf6 调整红包查看手气的UI 2023-07-06 10:02:04 +08:00
18401019693
addab80997 添加翻译 2023-07-05 18:15:18 +08:00
18401019693
9081ba4cd6 添加翻译 2023-07-05 17:47:50 +08:00
18401019693
12bedd630e 修复问题 2023-07-05 17:07:11 +08:00
18401019693
003c7f9e12 修复问题 2023-07-05 16:19:30 +08:00
18401019693
9089e96856 修复问题 2023-07-05 13:29:46 +08:00
60c14f720d 修复【钻石不够的情况下,也成功发起红包】 2023-07-04 17:15:25 +08:00
18401019693
c139b03417 修复问题 2023-07-04 17:02:05 +08:00
b3fb6e62ae Merge remote-tracking branch 'origin/master' 2023-07-04 16:37:34 +08:00
613185db40 修复红包记录样式问题 2023-07-04 16:36:46 +08:00
18401019693
291492f2d0 修复问题 2023-07-04 16:29:34 +08:00
18401019693
cbe91c84e9 红包全服通知 2023-07-04 16:02:45 +08:00
f417e4ead8 修复部分机型开播异常问题 2023-07-04 13:03:19 +08:00
18401019693
08bc6d554a Merge remote-tracking branch 'origin/dev_red_packet'
# Conflicts:
#	common/src/main/java/com/yunbao/common/http/PDLiveApi.java
#	common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java
#	common/src/main/res/values/strings.xml
2023-07-03 17:57:35 +08:00
18401019693
895a1c6951 红包中奖列表 2023-07-03 17:48:02 +08:00
b9f1474362 【绑定账号】和【忘记密码】页面手机号码栏新增国家名字提示 2023-07-03 16:43:55 +08:00
18401019693
58508ca0ae 红包中奖列表 2023-07-03 13:05:29 +08:00
18401019693
5736265388 展示红包,领取红包接口逻辑对接 2023-06-30 16:03:37 +08:00
18401019693
e68d20252a 创建接口,红包展示接口 2023-06-30 10:17:33 +08:00
44b4b06592 退出直播间时移除加载错误的提示 2023-06-29 15:09:46 +08:00
fb7551f7d0 Merge branch 'master' into 6.5.3 2023-06-29 14:09:33 +08:00
18401019693
40455fffc9 红包打开创建领取的样式逻辑构建 2023-06-29 10:15:24 +08:00
195035c456 update 更换插件包下载地址 2023-06-28 18:22:30 +08:00
492003ff01 update 调整禁言对话框的文案 2023-06-28 17:37:30 +08:00
17c2e7f795 update 插件化判断代码 2023-06-28 17:37:10 +08:00
1a3d66553c 修复【直播间-多次点击用户名称,弹出多个主页资料框窗口】问题 2023-06-28 17:36:22 +08:00
710cddd3a7 Merge branch 'dev_6.5.3_红包' into 6.5.3 2023-06-28 16:49:23 +08:00
da7ebb2663 add 新增红包专区
add 新增红包专区进去是只有发放红包的直播间
add 新增首页红包浮窗
add 新增红包记录
2023-06-28 16:44:42 +08:00
6a6696f355 fix 修复测试服ios发消息安卓端收不到问题 2023-06-28 16:43:26 +08:00
368b002db6 update 直播间超时进入的提示 2023-06-27 14:19:34 +08:00
501a7b482b update 红包专区 2023-06-27 13:54:18 +08:00
18401019693
279575d80b 红包直播间展示样式构建 2023-06-26 18:04:58 +08:00
3bf594d0b5 update 红包记录列表 2023-06-26 14:57:11 +08:00
5f33fa38f6 update 禁言弹框ui标题 2023-06-26 10:24:19 +08:00
e0312eedd1 update 禁言弹框ui标题 2023-06-26 10:17:45 +08:00
69d8feb9a9 update 红包 2023-06-26 10:12:38 +08:00
500588c842 update 红包 2023-06-26 10:09:37 +08:00
0a70da82f0 Merge branch '6.5.3' into dev_6.5.3_红包 2023-06-25 17:02:33 +08:00
abbb8c524c 新增被禁言的提示 2023-06-25 16:19:55 +08:00
1334d173cf update 红包详情入口 2023-06-25 16:09:47 +08:00
f3ff37aea7 Merge branch 'fix_webview' into 6.5.3 2023-06-25 15:50:04 +08:00
9741be743c 新增直播播放器报错时提示
新增观众端看异常下播直播间提示
2023-06-25 14:18:40 +08:00
f54054283c 调整混淆清单 2023-06-25 13:50:48 +08:00
fd06243c22 优化下载直播插件流程 2023-06-25 11:31:19 +08:00
cef94a248e Merge branch 'dev_proguard' into 6.5.3 2023-06-25 09:53:43 +08:00
beb566b294 新增期间禁言功能 2023-06-25 09:51:29 +08:00
18401019693
6889828c00 消息中心新增【系统消息】类型 2023-06-20 17:46:31 +08:00
9c57f0bd96 修复webView显示问题 2023-06-17 17:22:11 +08:00
a1c96cfd0f 调整直播间分享链接 2023-06-16 15:30:21 +08:00
18401019693
1198a8f1d8 送礼交互优化 2023-06-15 15:27:46 +08:00
a255d1f2b5 update 2023-06-15 13:41:57 +08:00
53ce1c703e update 2023-06-14 17:59:08 +08:00
3f9e95ce7d 新增插件模块管理 2023-06-14 13:41:12 +08:00
18401019693
8e07d4523f 修改完善资料和礼物点击 2023-06-12 13:25:59 +08:00
29ddc54303 Merge branch 'master' into dev_proguard 2023-06-12 10:50:27 +08:00
ae9c050ae6 Merge remote-tracking branch 'origin/master' 2023-06-08 17:02:32 +08:00
7b61e8c562 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 17:02:20 +08:00
18142669586
23a396864f 修改全服 2023-06-08 17:02:11 +08:00
af8052f65b 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 15:21:24 +08:00
6603a2dbb5 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 14:33:44 +08:00
f3a0b4d145 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 14:20:15 +08:00
0c99324904 Merge remote-tracking branch 'origin/master' 2023-06-08 11:13:55 +08:00
8d077e8062 修复PK结束时会隐藏投票问题 2023-06-08 11:13:38 +08:00
18401019693
3aaafdbbbe 修改完善资料和礼物点击 2023-06-08 10:12:37 +08:00
18401019693
f4016089a1 修改完善资料和礼物点击 2023-06-06 15:28:00 +08:00
c53757c64b 调整WebView 2023-06-06 14:41:53 +08:00
c8c4352284 Merge branch 'master' into dev_proguard 2023-06-05 16:42:18 +08:00
18401019693
cd2e176f0a Merge branch 'dev_6.5.3' 2023-06-05 14:09:42 +08:00
e6d92ffc86 调整投票ui 2023-06-05 13:24:13 +08:00
ea0a3375e4 修复非粉丝通过送礼打开的粉丝团url不正确问题 2023-06-05 11:42:56 +08:00
18401019693
06357088c1 修改礼物类型 2023-06-05 10:36:27 +08:00
18401019693
fa24d226ee 6.5.2 2023-06-03 18:30:08 +08:00
18401019693
7eb8153744 6.5.2 2023-06-03 18:02:49 +08:00
18401019693
35f16bdcae 修改盲盒问题 2023-06-03 15:20:18 +08:00
18401019693
aacd8b8735 修改盲盒问题 2023-06-03 14:35:39 +08:00
9926997fd7 Merge remote-tracking branch 'origin/master' 2023-06-03 14:13:47 +08:00
b02cbd7831 Home.getConfig接口新增对1000错误码的处理 2023-06-03 14:13:29 +08:00
18401019693
4150eeed64 修改盲盒问题 2023-06-03 13:51:19 +08:00
18142669586
6e595ff1e4 Merge remote-tracking branch 'origin/master' 2023-06-03 11:48:37 +08:00
18142669586
fbc50229e8 修改关播页面英文显示问题 2023-06-03 11:45:57 +08:00
1edb07d76c 调整投票主播二次点击关闭按钮后直接关闭浮窗 2023-06-03 11:45:23 +08:00
9641d90f32 Merge remote-tracking branch 'origin/master' 2023-06-03 11:33:13 +08:00
3095438a5c 调整排行榜榜单样式
调整排行榜神秘人隐藏关注按钮导致整体UI下降
2023-06-03 11:08:17 +08:00
18401019693
067bbc70c5 修改盲盒问题 2023-06-03 10:35:52 +08:00
7201fd37f3 修复排行榜神秘人ui错乱问题 2023-06-02 18:00:28 +08:00
18401019693
0bab58d507 修改盲盒问题 2023-06-02 13:52:29 +08:00
18401019693
f1ac21fe87 Merge remote-tracking branch 'origin/master' 2023-06-02 13:13:14 +08:00
18401019693
f4b5cdfed3 修改直播间展示ID 2023-06-02 13:13:07 +08:00
9021659770 修复在进入直播间瞬间关播的“抱歉出错了”提示 2023-06-02 11:31:25 +08:00
e04d277560 修复修改投票中英文导致的界面语言混乱问题 2023-06-02 11:17:08 +08:00
18142669586
a7a9a28c09 Merge remote-tracking branch 'origin/master' 2023-06-02 10:27:48 +08:00
18142669586
bbd394044f 修改关播页面英文显示问题 2023-06-02 10:27:36 +08:00
18401019693
49df393781 Merge remote-tracking branch 'origin/master' 2023-06-02 10:04:40 +08:00
18401019693
f0a8c17401 修改盲盒连宋 2023-06-02 10:04:32 +08:00
a01ddd310b 新增投票观众端的中英文切换 2023-06-02 09:56:24 +08:00
18401019693
26ec74932f 修改盲盒蒙版 2023-06-01 18:16:58 +08:00
18401019693
3aa85ca9bb 直播间房间号加ID 2023-06-01 15:56:06 +08:00
18401019693
a67c2b4009 修改榜单头像框问题 2023-06-01 15:39:24 +08:00
9486a1a572 修复下播页面关注按钮在英文状态下自动换行问题 2023-06-01 15:12:17 +08:00
c1aa8188ce 修复机器人自动打招呼条数超过20条问题 #74 2023-06-01 14:58:42 +08:00
18401019693
a83e3e0511 添加中英文翻译 2023-06-01 13:56:05 +08:00
18401019693
3488da27f0 盲盒加判断是不是本人 2023-06-01 10:26:08 +08:00
56845de59d 修复在线客服页面输入法会挡住输入框的问题 2023-05-31 16:51:00 +08:00
18401019693
282790ead5 Merge remote-tracking branch 'origin/master' 2023-05-31 13:59:28 +08:00
49313ca326 修复PK滑动直播间可能画面错乱问题 2023-05-29 15:25:15 +08:00
34c569ecb5 update config 2023-05-09 14:40:38 +08:00
a041450766 update config 2023-05-09 10:09:03 +08:00
e9488df780 update 2023-05-08 13:29:24 +08:00
639 changed files with 22716 additions and 1833 deletions

View File

@@ -55,8 +55,8 @@ public class FURenderer extends IFURenderer {
private FURenderKit mFURenderKit;
/* AI道具*/
private String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
private String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
/* GL 线程 ID */
private Long mGlThreadId = 0L;

View File

@@ -314,6 +314,35 @@ public class FileUtils {
return null;
}
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
File fileDir = new File(saveFileDir);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
File file = new File(fileDir, fileName);
if (file.exists()) {
return file.getAbsolutePath();
}
try {
InputStream inputStream = context.getAssets().open(assetsPath);
FileOutputStream fos = new FileOutputStream(file);
BufferedInputStream bis = new BufferedInputStream(inputStream);
BufferedOutputStream bos = new BufferedOutputStream(fos);
byte[] byteArray = new byte[1024];
int bytes = bis.read(byteArray);
while (bytes > 0) {
bos.write(byteArray, 0, bytes);
bos.flush();
bytes = bis.read(byteArray);
}
bos.close();
fos.close();
return file.getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/**
* 获取Uri文件绝对路径
@@ -522,6 +551,7 @@ public class FileUtils {
/**
* 遍历一个文件夹获取改文件夹下所有文件名
*
* @param path
* @return
*/
@@ -563,7 +593,7 @@ public class FileUtils {
* @param path String
* @return Boolean
*/
public static Boolean checkIsVideo(Context context,String path) {
public static Boolean checkIsVideo(Context context, String path) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
retriever.setDataSource(context, Uri.fromFile(new File(path)));

View File

@@ -1,8 +1,5 @@
package com.yunbao.faceunity;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
@@ -10,8 +7,5 @@ import static org.junit.Assert.*;
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -30,18 +30,12 @@ public class ShareBuilder {
private String anchorAvatar;
public static String createLiveShareLink(String shareUid, String anchorId, String anchorName, String anchorAvatar) {
try {
return String.format(CommonAppConfig.HOST +
"/h5/activity/FriendInvitation/liveShare.html?user_id=%s&anchor_id=%s&anchor_name=%s&anchor_avatar=%s&isGoogle=%s",
shareUid,
anchorId,
URLEncoder.encode(anchorName, "UTF-8"),
URLEncoder.encode(anchorAvatar, "UTF-8"),
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
) ;
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return String.format(CommonAppConfig.HOST +
"/index.php?g=Appapi&m=home&a=share&uid=%s&user_id=%s&isGoogle=%s",
anchorId,
shareUid,
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
) ;
}
public static String createInviteLink(String shareUid) {

View File

@@ -6,6 +6,9 @@ apply plugin: 'com.alibaba.arouter'
android {
dexOptions {
jumboMode = true
}
project.tasks.getByName("tasks").doFirst {
}
/* applicationVariants.all { variant ->
variant.mergeAssetsProvider.configure {
@@ -92,6 +95,13 @@ android {
exclude 'lib/armeabi-v7a/libmmlic.so'
exclude 'lib/armeabi-v7a/libMNN_CL.so'
exclude 'lib/armeabi-v7a/libMNN_Express.so'
//美颜
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
exclude 'lib/armeabi-v7a/libCNamaSDK.so'
exclude 'lib/arm64-v8a/libCNamaSDK.so'
exclude 'lib/armeabi-v7a/libfuai.so'
exclude 'lib/arm64-v8a/libfuai.so'
}
}
compileOptions {
@@ -99,6 +109,11 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
println "清空build文件夹";
for (final def project in rootProject.getAllprojects()) {
delete project.buildDir
println project.buildDir
}
String variantName = variant.name.capitalize()
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
processManifestTask.doLast { pm ->
@@ -139,9 +154,36 @@ android {
'Asset/*',
'image_effect_shaders/*',
'internal/*'
//美颜基础组件
]))
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
delete(fileTree(dir: outputDir, includes: [
'model/ai_face_processor_lite.bundle',
'graphics/face_beautification.bundle'
]))
} else {
println "不删除bundle"
}
}
}
variant.outputs.all {
def isGoogle = "link"
if (rootProject.ext.manifestPlaceholders.isGooglePlay) {
isGoogle = "Google"
}
def isPlugin = "all"
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
isPlugin = "plugin"
}
def isTest = "测试服"
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
isTest = "正式服"
}
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
}
}
signingConfigs {
release {
@@ -193,12 +235,17 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
shrinkResources false
zipAlignEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

170
app/proguard-rules.pro vendored
View File

@@ -12,17 +12,40 @@
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
# Uncomment this to preserve the groupLast number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
-keepattributes SourceFile,LineNumberTable
# If you keep the groupLast number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-renamesourcefileattribute SourceFile
-keep class com.yunbao.**{
public <methods>;
protected <methods>;
}
-keep class * implements com.yunbao.common.bean.BaseModel {
*;
}
-keep class com.yunbao.common.bean.** {
*;
}
-keep class com.yunbao.common.views.weight.VerticalViewPager$LayoutParams{
*;
}
-keep class android.**{
*;
}
-keep class **.R$* {
public static <fields>;
}
-keep class com.tencent.** { *; }
-keep class com.adjust.sdk.**{ *; }
-keep class com.google.android.gms.common.ConnectionResult {
int SUCCESS;
@@ -48,6 +71,13 @@
-keep class okhttp3.internal.**{*;}
-dontwarn okio.**
#okhttp
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
#okio
-dontwarn okio.**
-keep class okio.**{*;}
# Retrofit
@@ -55,9 +85,10 @@
-keep class retrofit2.** { *; }
-keepattributes Signature-keepattributes Exceptions
-keepattributes Signature-keepattributes,Exceptions
# RxJava RxAndroid
-dontwarn java.util.concurrent.Flow*
-dontwarn sun.misc.**
@@ -69,20 +100,139 @@ long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef* {
rx.internal.util.atomic.LinkedQueueNode producerNode;
rx.internal.util.atomic.LinkedQueueNode* producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef* {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
rx.internal.util.atomic.LinkedQueueNode* consumerNode;
}
# Gson
-keep class com.google.gson.stream.** { *; }
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { <fields>; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
##---------------End: proguard configuration for Gson ----------
-keepattributes EnclosingMethod
#--------融云
-keepattributes Exceptions,InnerClasses
-keepattributes Signature
-keep class io.rong.** {*;}
-keep class cn.rongcloud.** {*;}
-keep class * implements io.rong.imlib.model.MessageContent {*;}
-dontwarn io.rong.push.**
-dontnote com.xiaomi.**
-dontnote com.google.android.gms.gcm.**
-dontnote io.rong.**
# 下方混淆使用了融云 IMKit 提供的 locationKit 位置插件时才需要配置,可参考高德官网的混淆方式:https://lbs.amap.com/api/android-sdk/guide/create-project/dev-attention
-keep class com.amap.api.maps.**{*;}
-keep class com.autonavi.**{*;}
-keep class com.amap.api.trace.**{*;}
-keep class com.amap.api.location.**{*;}
-keep class com.amap.api.fence.**{*;}
-keep class com.loc.**{*;}
-keep class com.autonavi.aps.amapapi.model.**{*;}
-keep class com.amap.api.services.**{*;}
-ignorewarnings
#--------科大讯飞
-keep class com.iflytek.**{*;}
-keepattributes Signature
#EvenBus
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# If using AsyncExecutord, keep required constructor of default event used.
# Adjust the class name if a custom failure event type is used.
-keepclassmembers class org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
# Accessed via reflection, avoid renaming or removal
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
#--------ARouter
-keep public class com.alibaba.android.arouter.routes.**{*;}
-keep public class com.alibaba.android.arouter.facade.**{*;}
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
# If you use the byType method to obtain Service, add the following rules to protect the interface:
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
#----retrofit2
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement*
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions*
-dontwarn retrofit2.KotlinExtensions$*
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface * extends <1>
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
#-----glide
-keep public class com.bumptech.glide.** {*;}
-keep public class jp.co.cyberagent.** {*;}
-dontwarn jp.co.cyberagent.android.gpuimage.**
-printconfiguration tmp/full-r8-config.txt
#---美颜模块需要暴露出来的参数名
-keep class com.yunbao.faceunity.utils.FURenderer{
public static java.lang.String BUNDLE_AI_FACE;
}
-keep class com.yunbao.faceunity.utils.FaceUnityConfig{
public static java.lang.String BUNDLE_FACE_BEAUTIFICATION;
}
-keep class com.faceunity.wrapper.faceunity$LoadConfig*{
private static boolean sLoadedLibrary;
}

View File

@@ -99,7 +99,6 @@
android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="theme,label,icon,allowBackup">
<!-- <service-->
<!-- android:name="com.shayu.phonelive.utils.MyNotificationService">-->
@@ -133,20 +132,7 @@
<data android:scheme="smvslm" />
</intent-filter>
</activity> <!-- keytool -exportcert -alias androiddebugkey -keystore feixiong.jks | openssl sha1 -binary | openssl base64 -->
<meta-data
android:name="TencentMapSDK"
android:value="${txMapAppKey}" />
<!-- 百度语音识别 -->
<meta-data
android:name="com.baidu.speech.APP_ID"
android:value="${baiduAppId}" />
<meta-data
android:name="com.baidu.speech.API_KEY"
android:value="${baiduAppKey}" />
<meta-data
android:name="com.baidu.speech.SECRET_KEY"
android:value="${baiduAppSecretKey}" />
</activity>
<!-- 服务器地址 -->
<meta-data
@@ -159,6 +145,9 @@
<meta-data
android:name="IS_UPLOAD_ERROR_LOG"
android:value="${isUploadLog}" />
<meta-data
android:name="IS_PLUGIN_MODEL"
android:value="${isPluginModel}" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${isUploadLog}" />
@@ -197,12 +186,12 @@
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="106936673"/>
<meta-data
android:name="com.huawei.hms.client.cpid"
android:value="30086000612391734"/>
<!-- <meta-data-->
<!-- android:name="com.huawei.hms.client.appid"-->
<!-- android:value="106936673"/>-->
<!-- <meta-data-->
<!-- android:name="com.huawei.hms.client.cpid"-->
<!-- android:value="30086000612391734"/>-->
</application>
</manifest>

View File

@@ -11,14 +11,16 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;
import android.os.Process;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.Utils;
import com.facebook.appevents.AppEventsLogger;
import com.fm.openinstall.OpenInstall;
@@ -34,6 +36,7 @@ import com.yunbao.common.BuildConfig;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.AnchorStartLiveBean;
import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
@@ -44,6 +47,7 @@ import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.socket.SocketReceiveBean;
import com.yunbao.live.socket.SocketRyClient;
import com.yunbao.live.utils.LiveImDeletUtil;
import com.yunbao.live.views.PortraitLiveManager;
@@ -131,12 +135,6 @@ public class AppContext extends CommonAppContext {
if (!isMainProcess()) {
return;
}
AppManager.runDebugCode(new Runnable() {
@Override
public void run() {
ToastUtil.show("Debug代码");
}
});
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
//注册全局异常捕获
registerError();
@@ -201,11 +199,16 @@ public class AppContext extends CommonAppContext {
&& (TextUtils.equals("__system__", message.getTargetId())
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
SocketRyClient.mSocketHandler.sendMessage(msg);
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
JSONObject map = received.getMsg().getJSONObject(0);
sendStartAnchorLive(map);
}
//主播页面
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
SocketRyClient.mSocketHandler.sendMessage(msg);
}
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
EventBus.getDefault().post(message);
}
@@ -215,6 +218,14 @@ public class AppContext extends CommonAppContext {
}
return false;
}
private void sendStartAnchorLive(JSONObject map) {
AnchorStartLiveBean bean = new AnchorStartLiveBean();
bean.setAnchorName(map.getString("anchorName"));
bean.setRoomId(map.getString("roomid"));
bean.setAvatar(map.getString("avatar"));
EventBus.getDefault().post(bean);
}
});
@@ -248,6 +259,7 @@ public class AppContext extends CommonAppContext {
configSPApp();
//初始化美颜SDK
// FaceManager.initFaceUnity(this);
}
/**
@@ -289,7 +301,7 @@ public class AppContext extends CommonAppContext {
.setMainCrashHandler((t, e) -> {
Log.e("ApplicationError", "主线程异常");//此处log只是展示当debug为true时主类内部log会打印异常信息
e.printStackTrace();
AppManager.runDebugCode(()->{
AppManager.runDebugCode(() -> {
//闪退后finish所有Activity并且杀死进程
for (WeakReference<Activity> activity : activities) {
if (activity != null && activity.get() != null) {
@@ -321,7 +333,7 @@ public class AppContext extends CommonAppContext {
}
private void setFirebaseCrashData() {
public static void setFirebaseCrashData() {
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
return;
}

View File

@@ -8,11 +8,13 @@ import android.os.Looper;
import android.util.Log;
import android.widget.Toast;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.yunbao.common.BuildConfig;
import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.FileUtil;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import java.io.File;
import java.io.PrintWriter;
@@ -105,7 +107,8 @@ public class NeverCrashUtils {
Log.e(TAG, "未捕获的主线程异常行为", e);
}
e.printStackTrace();
AppContext.setFirebaseCrashData();
FirebaseCrashlytics.getInstance().recordException(e);
AppManager.runDebugCode(() -> Toast.makeText(application, "发生闪退:" + e.getMessage(), Toast.LENGTH_SHORT).show());
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);

View File

@@ -116,8 +116,8 @@ dependencies {
api rootProject.ext.dependencies["ucrop"]
//腾讯定位地图sdk
api files('libs/TencentLocationSdk_v6.2.5.3.jar')
api files('libs/TencentMapSDK_1.2.8.1.jar')
// api files('libs/TencentLocationSdk_v6.2.5.3.jar')
// api files('libs/TencentMapSDK_1.2.8.1.jar')
//下拉刷新上拉加载
api rootProject.ext.dependencies["smartRefreshLayout"]
@@ -174,8 +174,8 @@ dependencies {
api 'com.squareup.retrofit2:retrofit:2.3.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
//gson解析
api 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
api 'com.squareup.retrofit2:converter-gson:2.3.0'//混淆
implementation "io.reactivex.rxjava2:rxjava:2.2.3"//混淆
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
api 'com.jakewharton.rxbinding3:rxbinding:3.1.0'
//loading样式库
@@ -191,4 +191,9 @@ dependencies {
api 'com.github.li-xiaojun:XPopup:2.9.1'
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
//选择器
api 'com.github.gzu-liyujiang.AndroidPicker:Common:4.1.11'
api 'com.github.gzu-liyujiang.AndroidPicker:WheelView:4.1.11'
//自定义圆角图片
api 'com.makeramen:roundedimageview:2.3.0'
}

Binary file not shown.

View File

@@ -35,6 +35,8 @@ public class CommonAppConfig {
public static final boolean IS_GOOGLE_PLAY = getMetaDataBoolean("IS_GOOGLE_PLAY");
//是否开启上报错误日志功能
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
//是否为插件包模式
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
//外部sd卡
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();

View File

@@ -179,10 +179,12 @@ public class Constants {
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
public static final String XYD_COMPLETE = "XydComplete";//心愿单完成通知
public static final String WISH_LIST_PROGRESS = "wishListProgress";//心愿单进度通知
public static final String LIVE_VOTE_CREATE="createVote";
public static final String LIVE_VOTE_UPDATE="updateVote";
public static final String LIVE_VOTE_END="endVote";
public static final String LIVE_PK_END="endPK";//结束PK以这个PK获取到的参数为准
public static final String LIVE_VOTE_CREATE = "createVote";
public static final String LIVE_VOTE_UPDATE = "updateVote";
public static final String LIVE_VOTE_END = "endVote";
public static final String LIVE_PK_END = "endPK";//结束PK以这个PK获取到的参数为准
public static final String RED_PACKET = "RedPacket";//红包通知
public static final String RED_PACKET_SUPER_JACKPOT = "RedPacketSuperJackpot";//超级红包通知
//游戏socket
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花

View File

@@ -8,7 +8,7 @@ public class HtmlConfig {
//登录即代表同意服务和隐私条款
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/portal/page/index/id/59";
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=Portal&m=Page&a=index&id=59";
//注册用户协议
public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=2";

View File

@@ -23,12 +23,16 @@ import android.widget.ProgressBar;
import androidx.annotation.RequiresApi;
import com.alibaba.fastjson.JSON;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
@@ -39,10 +43,13 @@ import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.JavascriptInterfaceUtils;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.HintCustomPopup;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -82,7 +89,6 @@ public class WebViewActivity extends AbsActivity {
ft_title = (FrameLayout) findViewById(R.id.ft_title);
v_spacing = (View) findViewById(R.id.v_spacing);
mWebView = findViewById(R.id.webView);
AndroidBug5497Workaround.assistActivity(this);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
@@ -110,6 +116,7 @@ public class WebViewActivity extends AbsActivity {
mWebView.loadUrl("javascript:goAnchorTab()");
}
//真实屏幕高度-(ft_title的高度+导航栏高度)
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
if (!navigationGestureEnabled(mContext)) {
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
@@ -171,6 +178,7 @@ public class WebViewActivity extends AbsActivity {
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
mWebView.loadUrl(url);
AndroidBug5497Workaround.assistActivity(this);
if (Constants.myIntoIndex == 2) {
ft_title.setVisibility(View.GONE);
@@ -252,7 +260,8 @@ public class WebViewActivity extends AbsActivity {
}
public static void forward(Context context, String url) {
forward(context, url, true); }
forward(context, url, true);
}
@Override
@@ -373,6 +382,44 @@ public class WebViewActivity extends AbsActivity {
}
}))
.show();
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
//看直播
gotoLive(event.getLiveId());
}
}
private void gotoLive(final String live_id) {
LiveHttpUtil.getLiveInfo(live_id, new com.yunbao.common.http.HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
if (liveBean == null) {
return;
}
if (MicStatusManager.getInstance().isMic(liveUid)) {
MicStatusManager.getInstance().showDownMicDialog(mContext);
return;
}
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
finish();
}
@Override
public void onCheckError(String contextError) {
}
});
} else {
RouteUtil.forwardUserHome(mContext, live_id, 0);
}
}
});
}
}

View File

@@ -0,0 +1,41 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalModel;
import com.yunbao.common.views.AchievementDetailsViewHolder;
import java.util.ArrayList;
import java.util.List;
public class AchievementDetailsAdapter extends RecyclerView.Adapter {
private List<UserMedalModel> dressInfo = new ArrayList<>();
public AchievementDetailsAdapter(List<UserMedalModel> dressInfo) {
this.dressInfo = dressInfo;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_achievement_details, parent, false);
return new AchievementDetailsViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
AchievementDetailsViewHolder achievementDetailsViewHolder = (AchievementDetailsViewHolder) holder;
achievementDetailsViewHolder.showData(dressInfo.get(position));
}
@Override
public int getItemCount() {
return dressInfo.size();
}
}

View File

@@ -0,0 +1,48 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.GiftAlreadyWallViewHolder;
import java.util.ArrayList;
import java.util.List;
public class GiftAlreadyWallAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
private boolean sbWy;//是否正在直播
public GiftAlreadyWallAdapter(boolean sbWy) {
this.sbWy = sbWy;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_already_wall, parent, false);
return new GiftAlreadyWallViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftAlreadyWallViewHolder withoutWallViewHolder = (GiftAlreadyWallViewHolder) holder;
withoutWallViewHolder.showData(giftWall.get(position), sbWy);
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -0,0 +1,40 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.views.GiftNumber;
import java.util.List;
public class GiftNumberAdapter extends RecyclerView.Adapter {
private List<GiftQuantityModel> giftQuantityModels;
public GiftNumberAdapter(List<GiftQuantityModel> giftQuantityModels) {
this.giftQuantityModels = giftQuantityModels;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_gift_number, parent, false);
return new GiftNumber(robotSayHelloView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftNumber giftNumber = (GiftNumber) holder;
giftNumber.showData(giftQuantityModels.get(position));
}
@Override
public int getItemCount() {
return giftQuantityModels.size();
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.GiftWithoutWallViewHolder;
import java.util.ArrayList;
import java.util.List;
public class GiftWithoutWallAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_without_wall, parent, false);
return new GiftWithoutWallViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftWithoutWallViewHolder withoutWallViewHolder = (GiftWithoutWallViewHolder) holder;
withoutWallViewHolder.showData(giftWall.get(position));
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -1,5 +1,6 @@
package com.yunbao.common.adapter;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -11,6 +12,7 @@ import com.yunbao.common.R;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.event.LiveNewWishListCloseEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.DayWishItemViewHolder;
import com.yunbao.common.views.LunarWishItemViewHolder;
import com.yunbao.common.views.SeasonalWishItemViewHolder;
@@ -46,8 +48,20 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(true));
break;
}
boolean isAdd = false;
for (int i = 0; i < wishList.size(); i++) {
if (wishList.get(i)!=null){
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid())
&& TextUtils.equals(wishList.get(i).getLid(), model.getLid())) {
ToastUtil.show(R.string.too_many_gifts);
isAdd = true;
}
}
wishList.add(0, model);
}
if (!isAdd) {
wishList.add(0, model);
}
notifyDataSetChanged();
}

View File

@@ -0,0 +1,44 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalListModel;
import com.yunbao.common.views.MedalAchievementViewHolder;
import java.util.ArrayList;
import java.util.List;
public class MedalAchievementAdapter extends RecyclerView.Adapter {
private List<UserMedalListModel> medalData = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_medal_achievement, parent, false);
return new MedalAchievementViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
MedalAchievementViewHolder achievementViewHolder = (MedalAchievementViewHolder) holder;
achievementViewHolder.showData(medalData.get(position));
}
@Override
public int getItemCount() {
return medalData.size();
}
public void addAllData(List<UserMedalListModel> mGiftWall) {
medalData.clear();
medalData.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.MonthGiftNamingViewHolder;
import java.util.ArrayList;
import java.util.List;
public class MonthGiftNamingAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_month_gift_naming, parent, false);
return new MonthGiftNamingViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
MonthGiftNamingViewHolder monthGiftNamingViewHolder = (MonthGiftNamingViewHolder) holder;
monthGiftNamingViewHolder.showData(giftWall.get(position));
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -17,6 +17,8 @@ public class AnchorRecommendModel extends BaseModel {
//是否展示0=不展示1=展示
@SerializedName("list_show")
private int listShow = 0;
@SerializedName("red_packet_show")
private int showRedPacket = 0;//是否显示首页红包浮窗
//是否支持换一批0=不支持 1=支持
@SerializedName("up_show")
private int upShow = 0;
@@ -24,6 +26,10 @@ public class AnchorRecommendModel extends BaseModel {
private List<AnchorRecommendItemModel> list = new ArrayList<>();
@SerializedName("slide")
private List<SlideInfoModel> slide = new ArrayList<>();
@SerializedName("red_packet_total")
private int redPacketTotal = 100;
@SerializedName("red_packet_day_create_num")
private int redPacketNum = 0;
public List<SlideInfoModel> getSlide() {
return slide;
@@ -52,6 +58,30 @@ public class AnchorRecommendModel extends BaseModel {
return this;
}
public int getShowRedPacket() {
return showRedPacket;
}
public void setShowRedPacket(int showRedPacket) {
this.showRedPacket = showRedPacket;
}
public int getRedPacketTotal() {
return redPacketTotal;
}
public void setRedPacketTotal(int redPacketTotal) {
this.redPacketTotal = redPacketTotal;
}
public int getRedPacketNum() {
return redPacketNum;
}
public void setRedPacketNum(int redPacketNum) {
this.redPacketNum = redPacketNum;
}
public List<AnchorRecommendItemModel> getList() {
return list;
}

View File

@@ -0,0 +1,31 @@
package com.yunbao.common.bean;
public class AnchorStartLiveBean extends BaseModel{
private String anchorName;
private String avatar;
private String roomId;
public String getAnchorName() {
return anchorName;
}
public void setAnchorName(String anchorName) {
this.anchorName = anchorName;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
}

View File

@@ -103,9 +103,43 @@ public class EnterRoomInfoModel extends BaseModel {
@SerializedName("anchor_goodnum")
private String anchorGoodnum;
@SerializedName("jackpot_level")
private String jackpotLevel="-1";
private String jackpotLevel = "-1";
@SerializedName("live_vote")
private LiveRoomVoteModel voteModel;
@SerializedName("red_packet")
private RedPacketModel redPacketModel;
@SerializedName("gift_wall_lighten_number")
private String giftWallLightenNumber;
@SerializedName("gift_wall_lighten_total")
private String giftWallLightenTotal;
public String getGiftWallLightenNumber() {
return giftWallLightenNumber;
}
public EnterRoomInfoModel setGiftWallLightenNumber(String giftWallLightenNumber) {
this.giftWallLightenNumber = giftWallLightenNumber;
return this;
}
public String getGiftWallLightenTotal() {
return giftWallLightenTotal;
}
public EnterRoomInfoModel setGiftWallLightenTotal(String giftWallLightenTotal) {
this.giftWallLightenTotal = giftWallLightenTotal;
return this;
}
public RedPacketModel getRedPacketModel() {
return redPacketModel;
}
public EnterRoomInfoModel setRedPacketModel(RedPacketModel redPacketModel) {
this.redPacketModel = redPacketModel;
return this;
}
public String getJackpotLevel() {
@@ -486,8 +520,8 @@ public class EnterRoomInfoModel extends BaseModel {
}
public String getIsconnection() {
if(StringUtil.isEmpty(isconnection)){
isconnection="0";
if (StringUtil.isEmpty(isconnection)) {
isconnection = "0";
}
return isconnection;
}
@@ -498,6 +532,9 @@ public class EnterRoomInfoModel extends BaseModel {
}
public String getIsleave() {
if (StringUtil.isEmpty(isleave)) {
isleave = "0";
}
return isleave;
}

View File

@@ -0,0 +1,19 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansCheckRed extends BaseModel{
@SerializedName("fans_level_upgrade_status")
private int status;
public FansCheckRed() {
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}

View File

@@ -0,0 +1,81 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansGroupGiftPack extends BaseModel{
@SerializedName("id")
private int id;
@SerializedName("quantity")
private int quantity;
@SerializedName("end_time")
private String endTime;
@SerializedName("giftname")
private String giftName;
@SerializedName("needcoin")
private String needCoin;
@SerializedName("gifticon")
private String icon;
public FansGroupGiftPack() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getGiftName() {
return giftName;
}
public void setGiftName(String giftName) {
this.giftName = giftName;
}
public String getNeedCoin() {
return needCoin;
}
public void setNeedCoin(String needCoin) {
this.needCoin = needCoin;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
@Override
public String toString() {
return "FansGroupGiftPack{" +
"id=" + id +
", quantity=" + quantity +
", endTime='" + endTime + '\'' +
", giftName='" + giftName + '\'' +
", needCoin='" + needCoin + '\'' +
", icon='" + icon + '\'' +
'}';
}
}

View File

@@ -0,0 +1,161 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class FansGroupGiftPackInfo extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("pack_name")
private String packName;
@SerializedName("description")
private String description;
@SerializedName("coin")
private String coin;
@SerializedName("data")
private List<Gift> data;
public FansGroupGiftPackInfo() {
}
public String getPackName() {
return packName;
}
public void setPackName(String packName) {
this.packName = packName;
}
public int getId() {
return id;
}
public String getCoin() {
return coin;
}
public void setCoin(String coin) {
this.coin = coin;
}
public void setId(int id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<Gift> getData() {
return data;
}
public void setData(List<Gift> data) {
this.data = data;
}
@Override
public String toString() {
return "FansGroupGiftPackInfo{" +
"id=" + id +
", packName='" + packName + '\'' +
", description='" + description + '\'' +
", coin='" + coin + '\'' +
", data=" + data +
'}';
}
public static class Gift {
@SerializedName("id")
private int id;
@SerializedName("name")
private String giftName;
@SerializedName("needcoin")
private String needCoin;
@SerializedName("src")
private String giftIcon;
@SerializedName("quantity")
private String quantity;
@SerializedName("restrict")
private int restrict;
@SerializedName("type")
private int type;
public Gift() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getGiftName() {
return giftName;
}
public void setGiftName(String giftName) {
this.giftName = giftName;
}
public String getNeedCoin() {
return needCoin;
}
public void setNeedCoin(String needCoin) {
this.needCoin = needCoin;
}
public String getGiftIcon() {
return giftIcon;
}
public void setGiftIcon(String giftIcon) {
this.giftIcon = giftIcon;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public int getRestrict() {
return restrict;
}
public void setRestrict(int restrict) {
this.restrict = restrict;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
@Override
public String toString() {
return "Gift{" +
"id=" + id +
", giftName='" + giftName + '\'' +
", needCoin='" + needCoin + '\'' +
", giftIcon='" + giftIcon + '\'' +
", quantity='" + quantity + '\'' +
", restrict='" + restrict + '\'' +
", type=" + type +
'}';
}
}
}

View File

@@ -0,0 +1,57 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansModel extends BaseModel {
@SerializedName("levelid")
private int levelid;
@SerializedName("thumb")
private String thumb;
@SerializedName("colour")
private String colour;
@SerializedName("thumb_mark")
private String thumbMark;
@SerializedName("bg")
private String bg;
public int getLevelid() {
return levelid;
}
public void setLevelid(int levelid) {
this.levelid = levelid;
}
public String getThumb() {
return thumb;
}
public void setThumb(String thumb) {
this.thumb = thumb;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
public String getThumbMark() {
return thumbMark;
}
public void setThumbMark(String thumbMark) {
this.thumbMark = thumbMark;
}
public String getBg() {
return bg;
}
public void setBg(String bg) {
this.bg = bg;
}
}

View File

@@ -0,0 +1,44 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* 礼物墙已点亮
*/
public class GiftAlreadyWallModel extends BaseModel {
@SerializedName("gift_wall")
private List<GiftWallModel> giftWall;
@SerializedName("gift_wall_lighten_number")
private String giftWallLightenNumber;
@SerializedName("gift_wall_lighten_total")
private String giftWallLightenTotal;
public List<GiftWallModel> getGiftWall() {
return giftWall;
}
public GiftAlreadyWallModel setGiftWall(List<GiftWallModel> giftWall) {
this.giftWall = giftWall;
return this;
}
public String getGiftWallLightenNumber() {
return giftWallLightenNumber;
}
public GiftAlreadyWallModel setGiftWallLightenNumber(String giftWallLightenNumber) {
this.giftWallLightenNumber = giftWallLightenNumber;
return this;
}
public String getGiftWallLightenTotal() {
return giftWallLightenTotal;
}
public GiftAlreadyWallModel setGiftWallLightenTotal(String giftWallLightenTotal) {
this.giftWallLightenTotal = giftWallLightenTotal;
return this;
}
}

View File

@@ -0,0 +1,119 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class GiftGuideModel extends BaseModel {
@SerializedName("guide_name")
private String guideName;
@SerializedName("illuminate_count")
private int illuminateCount;
@SerializedName("already_font")
private String alreadyFont;
@SerializedName("without_font")
private String withoutFont;
@SerializedName("number")
private String number;
@SerializedName("illuminate_total")
private int illuminateTotal;
@SerializedName("week_number")
private String weekNumber;
@SerializedName("guide_name_img_path")
private String guideNameImgPath;
@SerializedName("guide_background_picture_path")
private String guideBackgroundPicturePath;
@SerializedName("gift_data")
private List<GiftWallModel> giftData;
public String getAlreadyFont() {
return alreadyFont;
}
public GiftGuideModel setAlreadyFont(String alreadyFont) {
this.alreadyFont = alreadyFont;
return this;
}
public String getWithoutFont() {
return withoutFont;
}
public GiftGuideModel setWithoutFont(String withoutFont) {
this.withoutFont = withoutFont;
return this;
}
public String getNumber() {
return number;
}
public GiftGuideModel setNumber(String number) {
this.number = number;
return this;
}
public int getIlluminateTotal() {
return illuminateTotal;
}
public GiftGuideModel setIlluminateTotal(int illuminateTotal) {
this.illuminateTotal = illuminateTotal;
return this;
}
public String getWeekNumber() {
return weekNumber;
}
public GiftGuideModel setWeekNumber(String weekNumber) {
this.weekNumber = weekNumber;
return this;
}
public String getGuideNameImgPath() {
return guideNameImgPath;
}
public GiftGuideModel setGuideNameImgPath(String guideNameImgPath) {
this.guideNameImgPath = guideNameImgPath;
return this;
}
public String getGuideBackgroundPicturePath() {
return guideBackgroundPicturePath;
}
public GiftGuideModel setGuideBackgroundPicturePath(String guideBackgroundPicturePath) {
this.guideBackgroundPicturePath = guideBackgroundPicturePath;
return this;
}
public String getGuideName() {
return guideName;
}
public GiftGuideModel setGuideName(String guideName) {
this.guideName = guideName;
return this;
}
public int getIlluminateCount() {
return illuminateCount;
}
public GiftGuideModel setIlluminateCount(int illuminateCount) {
this.illuminateCount = illuminateCount;
return this;
}
public List<GiftWallModel> getGiftData() {
return giftData;
}
public GiftGuideModel setGiftData(List<GiftWallModel> giftData) {
this.giftData = giftData;
return this;
}
}

View File

@@ -0,0 +1,359 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftNamingInfoModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("sendtype")
private String sendtype;
@SerializedName("type")
private String type;
@SerializedName("name")
private String name;
@SerializedName("release_status")
private String releaseStatus;
@SerializedName("type_sort")
private String typeSort;
@SerializedName("operate_image")
private String operateImage;
@SerializedName("operate_url")
private String operateUrl;
@SerializedName("mark")
private String mark;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_description")
private String giftDescription;
@SerializedName("corner_mark")
private String cornerMark;
@SerializedName("swf")
private String swf;
@SerializedName("gift_uid")
private String giftUid;
@SerializedName("type_start_time")
private String typeStartTime;
@SerializedName("type_end_time")
private String typeEndTime;
@SerializedName("gift_start_time")
private String giftStartTime;
@SerializedName("gift_end_time")
private String giftEndTime;
@SerializedName("naming_liveuid")
private String namingLiveuid;
@SerializedName("naming_uid")
private String namingUid;
@SerializedName("naming_live_name")
private String namingLiveName;
@SerializedName("naming_user_name")
private String namingUserName;
@SerializedName("naming_live_avatar")
private String namingLiveAvatar;
@SerializedName("naming_user_avatar")
private String namingUserAvatar;
@SerializedName("naming_status")
private String namingStatus;
@SerializedName("naming_coin")
private String namingCoin;
@SerializedName("fans_level")
private String fansLevel;
@SerializedName("naming_user_coin")
private String namingUserCoin;
@SerializedName("naming_live_coin")
private String namingLiveCoin;
@SerializedName("isweek")
private String isweek;
public String getId() {
return id;
}
public GiftNamingInfoModel setId(String id) {
this.id = id;
return this;
}
public String getSendtype() {
return sendtype;
}
public GiftNamingInfoModel setSendtype(String sendtype) {
this.sendtype = sendtype;
return this;
}
public String getType() {
return type;
}
public GiftNamingInfoModel setType(String type) {
this.type = type;
return this;
}
public String getName() {
return name;
}
public GiftNamingInfoModel setName(String name) {
this.name = name;
return this;
}
public String getReleaseStatus() {
return releaseStatus;
}
public GiftNamingInfoModel setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
return this;
}
public String getTypeSort() {
return typeSort;
}
public GiftNamingInfoModel setTypeSort(String typeSort) {
this.typeSort = typeSort;
return this;
}
public String getOperateImage() {
return operateImage;
}
public GiftNamingInfoModel setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public GiftNamingInfoModel setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getMark() {
return mark;
}
public GiftNamingInfoModel setMark(String mark) {
this.mark = mark;
return this;
}
public String getGiftname() {
return giftname;
}
public GiftNamingInfoModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public GiftNamingInfoModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public GiftNamingInfoModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public GiftNamingInfoModel setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public GiftNamingInfoModel setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
public String getSwf() {
return swf;
}
public GiftNamingInfoModel setSwf(String swf) {
this.swf = swf;
return this;
}
public String getGiftUid() {
return giftUid;
}
public GiftNamingInfoModel setGiftUid(String giftUid) {
this.giftUid = giftUid;
return this;
}
public String getTypeStartTime() {
return typeStartTime;
}
public GiftNamingInfoModel setTypeStartTime(String typeStartTime) {
this.typeStartTime = typeStartTime;
return this;
}
public String getTypeEndTime() {
return typeEndTime;
}
public GiftNamingInfoModel setTypeEndTime(String typeEndTime) {
this.typeEndTime = typeEndTime;
return this;
}
public String getGiftStartTime() {
return giftStartTime;
}
public GiftNamingInfoModel setGiftStartTime(String giftStartTime) {
this.giftStartTime = giftStartTime;
return this;
}
public String getGiftEndTime() {
return giftEndTime;
}
public GiftNamingInfoModel setGiftEndTime(String giftEndTime) {
this.giftEndTime = giftEndTime;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public GiftNamingInfoModel setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public GiftNamingInfoModel setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public GiftNamingInfoModel setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public GiftNamingInfoModel setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public GiftNamingInfoModel setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public GiftNamingInfoModel setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public GiftNamingInfoModel setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftNamingInfoModel setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getFansLevel() {
return fansLevel;
}
public GiftNamingInfoModel setFansLevel(String fansLevel) {
this.fansLevel = fansLevel;
return this;
}
public String getNamingUserCoin() {
return namingUserCoin;
}
public GiftNamingInfoModel setNamingUserCoin(String namingUserCoin) {
this.namingUserCoin = namingUserCoin;
return this;
}
public String getNamingLiveCoin() {
return namingLiveCoin;
}
public GiftNamingInfoModel setNamingLiveCoin(String namingLiveCoin) {
this.namingLiveCoin = namingLiveCoin;
return this;
}
public String getIsweek() {
return isweek;
}
public GiftNamingInfoModel setIsweek(String isweek) {
this.isweek = isweek;
return this;
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
/**
* 礼物选择数量
*/
public class GiftQuantityModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("gift_quantity")
private String giftQuantity;
@SerializedName("font_colour")
private String fontColour;
public String getId() {
return id;
}
public GiftQuantityModel setId(String id) {
this.id = id;
return this;
}
public String getGiftQuantity() {
return giftQuantity;
}
public GiftQuantityModel setGiftQuantity(String giftQuantity) {
this.giftQuantity = giftQuantity;
return this;
}
public String getFontColour() {
return fontColour;
}
public GiftQuantityModel setFontColour(String fontColour) {
this.fontColour = fontColour;
return this;
}
}

View File

@@ -0,0 +1,54 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftWallGiftDetail extends BaseModel {
@SerializedName("uid")
private int uid;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("naming_coin")
private String namingCoin;
public int getUid() {
return uid;
}
public GiftWallGiftDetail setUid(int uid) {
this.uid = uid;
return this;
}
public String getUserNicename() {
if (userNicename.length() > 5) {
userNicename = userNicename.substring(0, 5) + "...";
}
return userNicename;
}
public GiftWallGiftDetail setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public GiftWallGiftDetail setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftWallGiftDetail setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
}

View File

@@ -0,0 +1,392 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftWallModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("sendtype")
private String sendtype;
@SerializedName("type")
private String type;
@SerializedName("name")
private String name;
@SerializedName("release_status")
private String releaseStatus;
@SerializedName("type_sort")
private String typeSort;
@SerializedName("operate_image")
private String operateImage;
@SerializedName("operate_url")
private String operateUrl;
@SerializedName("mark")
private String mark;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_description")
private String giftDescription;
@SerializedName("corner_mark")
private String cornerMark;
@SerializedName("swf")
private String swf;
@SerializedName("gift_uid")
private String giftUid;
@SerializedName("type_start_time")
private String typeStartTime;
@SerializedName("type_end_time")
private String typeEndTime;
@SerializedName("gift_start_time")
private String giftStartTime;
@SerializedName("gift_end_time")
private String giftEndTime;
@SerializedName("naming_liveuid")
private String namingLiveuid;
@SerializedName("naming_uid")
private String namingUid;
@SerializedName("naming_live_name")
private String namingLiveName;
@SerializedName("naming_user_name")
private String namingUserName;
@SerializedName("naming_live_avatar")
private String namingLiveAvatar;
@SerializedName("naming_user_avatar")
private String namingUserAvatar;
@SerializedName("naming_status")
private String namingStatus;
@SerializedName("naming_coin")
private String namingCoin;
@SerializedName("gifticon_total")
private String gifticonTotal;
@SerializedName("gift_count_number")
private String giftCountNumber;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("naming_coin_max")
private String namingCoinMax;
@SerializedName("illuminate_status")
private int illuminateStatus;
@SerializedName("font_color")
private String fontColor;
public String getFontColor() {
return fontColor;
}
public GiftWallModel setFontColor(String fontColor) {
this.fontColor = fontColor;
return this;
}
public int getIlluminateStatus() {
return illuminateStatus;
}
public GiftWallModel setIlluminateStatus(int illuminateStatus) {
this.illuminateStatus = illuminateStatus;
return this;
}
public String getNamingCoinMax() {
return namingCoinMax;
}
public GiftWallModel setNamingCoinMax(String namingCoinMax) {
this.namingCoinMax = namingCoinMax;
return this;
}
public String getAvatar() {
return avatar;
}
public GiftWallModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getUserNicename() {
return userNicename;
}
public GiftWallModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getId() {
return id;
}
public GiftWallModel setId(String id) {
this.id = id;
return this;
}
public String getSendtype() {
return sendtype;
}
public GiftWallModel setSendtype(String sendtype) {
this.sendtype = sendtype;
return this;
}
public String getType() {
return type;
}
public GiftWallModel setType(String type) {
this.type = type;
return this;
}
public String getName() {
return name;
}
public GiftWallModel setName(String name) {
this.name = name;
return this;
}
public String getReleaseStatus() {
return releaseStatus;
}
public GiftWallModel setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
return this;
}
public String getTypeSort() {
return typeSort;
}
public GiftWallModel setTypeSort(String typeSort) {
this.typeSort = typeSort;
return this;
}
public String getOperateImage() {
return operateImage;
}
public GiftWallModel setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public GiftWallModel setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getMark() {
return mark;
}
public GiftWallModel setMark(String mark) {
this.mark = mark;
return this;
}
public String getGiftname() {
return giftname;
}
public GiftWallModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public GiftWallModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public GiftWallModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public GiftWallModel setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public GiftWallModel setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
public String getSwf() {
return swf;
}
public GiftWallModel setSwf(String swf) {
this.swf = swf;
return this;
}
public String getGiftUid() {
return giftUid;
}
public GiftWallModel setGiftUid(String giftUid) {
this.giftUid = giftUid;
return this;
}
public String getTypeStartTime() {
return typeStartTime;
}
public GiftWallModel setTypeStartTime(String typeStartTime) {
this.typeStartTime = typeStartTime;
return this;
}
public String getTypeEndTime() {
return typeEndTime;
}
public GiftWallModel setTypeEndTime(String typeEndTime) {
this.typeEndTime = typeEndTime;
return this;
}
public String getGiftStartTime() {
return giftStartTime;
}
public GiftWallModel setGiftStartTime(String giftStartTime) {
this.giftStartTime = giftStartTime;
return this;
}
public String getGiftEndTime() {
return giftEndTime;
}
public GiftWallModel setGiftEndTime(String giftEndTime) {
this.giftEndTime = giftEndTime;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public GiftWallModel setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public GiftWallModel setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public GiftWallModel setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public GiftWallModel setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public GiftWallModel setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public GiftWallModel setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public GiftWallModel setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftWallModel setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getGifticonTotal() {
return gifticonTotal;
}
public GiftWallModel setGifticonTotal(String gifticonTotal) {
this.gifticonTotal = gifticonTotal;
return this;
}
public String getGiftCountNumber() {
return giftCountNumber;
}
public GiftWallModel setGiftCountNumber(String giftCountNumber) {
this.giftCountNumber = giftCountNumber;
return this;
}
}

View File

@@ -5,6 +5,7 @@ import android.os.Parcelable;
import android.text.TextUtils;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
@@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
private String recommendCardtype = "";
private String recommendCardIconSizeTwo = "";
private String recommendCardIconSizeThree = "";
@SerializedName("red_packet_status")
private int redPacketStatus;
private Map<String,String> params;//用于跳转Activity时扩展参数从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
@@ -382,6 +385,14 @@ public class LiveBean implements Parcelable {
this.islive = islive;
}
public int getRedPacketStatus() {
return redPacketStatus;
}
public void setRedPacketStatus(int redPacketStatus) {
this.redPacketStatus = redPacketStatus;
}
/**
* 显示靓号
*/
@@ -529,6 +540,7 @@ public class LiveBean implements Parcelable {
", recommendCardtype='" + recommendCardtype + '\'' +
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
", redPacketStatus=" + redPacketStatus +
", params=" + params +
", mWeekList=" + mWeekList +
'}';

View File

@@ -23,7 +23,7 @@ public class LiveGiftBean {
private String name;
private String price;
private String icon;
private boolean checked;
private boolean checked = false;
private int page;
private View mView;
private String sendType;//支付是金币还是钻石
@@ -36,6 +36,181 @@ public class LiveGiftBean {
private String tag;
@JSONField(name = "blind_box_type")
private int blind_box_type = 0;
//礼物角标
@JSONField(name = "corner_mark")
private String cornerMark;
@JSONField(name = "gift_description")
private String giftDescription;
@JSONField(name = "operate_image")
private String operateImage;
@JSONField(name = "operate_url")
private String operateUrl;
@JSONField(name = "naming_liveuid")
private String namingLiveuid;
@JSONField(name = "naming_uid")
private String namingUid;
@JSONField(name = "naming_live_name")
private String namingLiveName;
@JSONField(name = "naming_user_name")
private String namingUserName;
@JSONField(name = "naming_live_avatar")
private String namingLiveAvatar;
@JSONField(name = "naming_user_avatar")
private String namingUserAvatar;
@JSONField(name = "naming_status")
private String namingStatus;
@JSONField(name = "naming_coin")
private String namingCoin;
@JSONField(name = "naming_user_coin")
private String namingUserCoin;
public String getNamingUserCoin() {
return namingUserCoin;
}
public LiveGiftBean setNamingUserCoin(String namingUserCoin) {
this.namingUserCoin = namingUserCoin;
return this;
}
public View getmView() {
return mView;
}
public LiveGiftBean setmView(View mView) {
this.mView = mView;
return this;
}
public String getmGiftNum() {
return mGiftNum;
}
public LiveGiftBean setmGiftNum(String mGiftNum) {
this.mGiftNum = mGiftNum;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public LiveGiftBean setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public LiveGiftBean setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public LiveGiftBean setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public LiveGiftBean setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public LiveGiftBean setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public LiveGiftBean setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public LiveGiftBean setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public LiveGiftBean setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getOperateImage() {
return operateImage;
}
public LiveGiftBean setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public LiveGiftBean setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public LiveGiftBean setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public LiveGiftBean setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
private int fansGiftLevel=0;//粉丝团礼物等级要求
public int getFansGiftLevel() {
return fansGiftLevel;
}
public void setFansGiftLevel(int fansGiftLevel) {
this.fansGiftLevel = fansGiftLevel;
}
public int getBlind_box_type() {
return blind_box_type;

View File

@@ -1,8 +1,8 @@
package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.WordUtil;
import java.util.List;
@@ -36,8 +36,10 @@ public class LiveRoomVoteModel extends BaseModel {
private String answer1;
@SerializedName("option_content_second")
private String answer2;
@SerializedName("result")
private String result;
@SerializedName("result_zh")
private String resultZh;
@SerializedName("result_en")
private String resultEn;
@SerializedName("option_text")
private String optionText;
@SerializedName("option_content_key")
@@ -126,11 +128,23 @@ public class LiveRoomVoteModel extends BaseModel {
}
public String getResult() {
return result;
return WordUtil.isNewZh() ? resultZh : resultEn;
}
public void setResult(String result) {
this.result = result;
public String getResultZh() {
return resultZh;
}
public void setResultZh(String resultZh) {
this.resultZh = resultZh;
}
public String getResultEn() {
return resultEn;
}
public void setResultEn(String resultEn) {
this.resultEn = resultEn;
}
public String getOptionText() {
@@ -153,7 +167,8 @@ public class LiveRoomVoteModel extends BaseModel {
", userIds=" + userIds +
", answer1='" + answer1 + '\'' +
", answer2='" + answer2 + '\'' +
", result='" + result + '\'' +
", resultZh='" + resultZh + '\'' +
", resultEn='" + resultEn + '\'' +
", optionText='" + optionText + '\'' +
", vote='" + vote + '\'' +
", liveUid='" + liveUid + '\'' +

View File

@@ -68,7 +68,7 @@ public class LiveTaskModel extends BaseModel {
'}';
}
public static class NewUser {
public static class NewUser implements Serializable{
@SerializedName("isNew")
private int isNew;
@SerializedName("endTime")

View File

@@ -0,0 +1,42 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class MedalAchievementModel extends BaseModel {
@SerializedName("medal_total_number")
private String medalTotalNumber;
@SerializedName("medal_light_number")
private String medalLightNumber;
@SerializedName("medal_data")
private List<UserMedalListModel> medalData;
public String getMedalTotalNumber() {
return medalTotalNumber;
}
public MedalAchievementModel setMedalTotalNumber(String medalTotalNumber) {
this.medalTotalNumber = medalTotalNumber;
return this;
}
public String getMedalLightNumber() {
return medalLightNumber;
}
public MedalAchievementModel setMedalLightNumber(String medalLightNumber) {
this.medalLightNumber = medalLightNumber;
return this;
}
public List<UserMedalListModel> getMedalData() {
return medalData;
}
public MedalAchievementModel setMedalData(List<UserMedalListModel> medalData) {
this.medalData = medalData;
return this;
}
}

View File

@@ -357,4 +357,8 @@ public class MsgModel extends BaseModel {
public void setSystem_bubble(String system_bubble) {
this.system_bubble = system_bubble;
}
/**
* 红包
*/
}

View File

@@ -0,0 +1,187 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.CommonAppConfig;
import java.util.List;
public class RedPacketDetailsBean extends BaseModel {
@SerializedName("u_nicename")
private String niceName;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("avatar")
private String avatar;
@SerializedName("red_packet_money")
private long money;// 红包金豆总数量
@SerializedName("amount_diamond")
private long diamond;// 红包价值钻石
@SerializedName("red_packet_quantity")
private int quantity; // 领取的红包总数量
@SerializedName("red_packet_quantity_already")
private int already; // 领取的红包总数量
@SerializedName("red_packet_record_details")
private List<Detail> details;
public String getNiceName() {
return niceName;
}
public void setNiceName(String niceName) {
this.niceName=niceName;
}
public String getAvatarThumb() {
avatarThumb=avatarThumb.replace("\\","");
if(!avatarThumb.startsWith("http")){
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
}
return avatarThumb;
}
public void setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public long getMoney() {
return money;
}
public void setMoney(long money) {
this.money = money;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public int getAlready() {
return already;
}
public void setAlready(int already) {
this.already = already;
}
public List<Detail> getDetails() {
return details;
}
public void setDetails(List<Detail> details) {
this.details = details;
}
public long getDiamond() {
return diamond;
}
public void setDiamond(long diamond) {
this.diamond = diamond;
}
@Override
public String toString() {
return "RedPacketDetailsBean{" +
"niceName='" + niceName + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", avatar='" + avatar + '\'' +
", money=" + money +
", diamond=" + diamond +
", quantity=" + quantity +
", already=" + already +
", details=" + details +
'}';
}
public static class Detail extends BaseModel {
@SerializedName("receive_money")
private long money;
@SerializedName("user_nicename")
private String niceName;
@SerializedName("receive_time")
private String time;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("avatar")
private String avatar;
@SerializedName("gifticon")
private String gifticon;
public long getMoney() {
return money;
}
public void setMoney(long money) {
this.money = money;
}
public String getNiceName() {
return niceName;
}
public void setNiceName(String niceName) {
this.niceName=niceName;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getAvatarThumb() {
avatarThumb=avatarThumb.replace("\\","");
if(!avatarThumb.startsWith("http")){
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
}
return avatarThumb;
}
public void setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getGifticon() {
return gifticon;
}
public void setGifticon(String gifticon) {
this.gifticon = gifticon;
}
@Override
public String toString() {
return "Detail{" +
"money=" + money +
", niceName='" + niceName + '\'' +
", time='" + time + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", avatar='" + avatar + '\'' +
", gifticon='" + gifticon + '\'' +
'}';
}
}
}

View File

@@ -0,0 +1,94 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
/**
* 红包随机礼物
*/
public class RedPacketGiftModel extends BaseModel {
/**
* {
* "id": 210,
* "giftname": "玫瑰",
* "needcoin": 20,
* "gifticon": "https://downs.yaoulive.com/603f25d9aa969.png"
* }
*/
@SerializedName("id")
private String id;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_num")
private String giftNum;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
public String getId() {
return id;
}
public RedPacketGiftModel setId(String id) {
this.id = id;
return this;
}
public String getGiftname() {
return giftname;
}
public RedPacketGiftModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public RedPacketGiftModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public RedPacketGiftModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftNum() {
return giftNum;
}
public RedPacketGiftModel setGiftNum(String giftNum) {
this.giftNum = giftNum;
return this;
}
public String getUserNicename() {
return userNicename;
}
public RedPacketGiftModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public RedPacketGiftModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
}

View File

@@ -0,0 +1,273 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* 红包信息
*/
public class RedPacketInfoModel extends BaseModel {
@SerializedName("liveuid")
private String liveuid;
@SerializedName("uid")
private String uid;
@SerializedName("amount_diamond")
private String amountDiamond;
@SerializedName("red_packet_money")
private String redPacketMoney;
@SerializedName("red_packet_quantity")
private String redPacketQuantity;
@SerializedName("conditions")
private String conditions;
@SerializedName("create_time")
private String createTime;
@SerializedName("start_time")
private String startTime;
@SerializedName("end_time")
private String endTime;
@SerializedName("user_id")
private String userId;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("id")
private String id;
@SerializedName("user_exists")
private String userExists;
@SerializedName("is_attention")
private String isAttention;
//0.未领取到 1.领取但是没抢过东西 2.已经领抢到东西
@SerializedName("receive_status")
private String receiveStatus;
//超级红包ID
@SerializedName("super_jackpot_id")
private String superJackpotId;
public String getSuperJackpotId() {
return superJackpotId;
}
public RedPacketInfoModel setSuperJackpotId(String superJackpotId) {
this.superJackpotId = superJackpotId;
return this;
}
//是否超级红包
private boolean isSuperJackpot = false;
public boolean isSuperJackpot() {
return isSuperJackpot;
}
//红包id
@SerializedName("red_packet_id")
private String redPacketId;
public String getRedPacketId() {
return redPacketId;
}
public RedPacketInfoModel setRedPacketId(String redPacketId) {
this.redPacketId = redPacketId;
return this;
}
public RedPacketInfoModel setSuperJackpot(boolean superJackpot) {
isSuperJackpot = superJackpot;
return this;
}
public String getIsAttention() {
return isAttention;
}
public RedPacketInfoModel setIsAttention(String isAttention) {
this.isAttention = isAttention;
return this;
}
@SerializedName("user_golden_bean")
private String userGoldenBean;
@SerializedName("red_packet_gift")
private List<RedPacketGiftModel> packetGiftModels;
@SerializedName("gift")
private List<RedPacketGiftModel> giftModels;
public String getReceiveStatus() {
return receiveStatus;
}
public RedPacketInfoModel setReceiveStatus(String receiveStatus) {
this.receiveStatus = receiveStatus;
return this;
}
public List<RedPacketGiftModel> getGiftModels() {
return giftModels;
}
public RedPacketInfoModel setGiftModels(List<RedPacketGiftModel> giftModels) {
this.giftModels = giftModels;
return this;
}
public List<RedPacketGiftModel> getPacketGiftModels() {
return packetGiftModels;
}
public RedPacketInfoModel setPacketGiftModels(List<RedPacketGiftModel> packetGiftModels) {
this.packetGiftModels = packetGiftModels;
return this;
}
public String getLiveuid() {
return liveuid;
}
public RedPacketInfoModel setLiveuid(String liveuid) {
this.liveuid = liveuid;
return this;
}
public String getUid() {
return uid;
}
public RedPacketInfoModel setUid(String uid) {
this.uid = uid;
return this;
}
public String getAmountDiamond() {
return amountDiamond;
}
public RedPacketInfoModel setAmountDiamond(String amountDiamond) {
this.amountDiamond = amountDiamond;
return this;
}
public String getRedPacketMoney() {
return redPacketMoney;
}
public RedPacketInfoModel setRedPacketMoney(String redPacketMoney) {
this.redPacketMoney = redPacketMoney;
return this;
}
public String getRedPacketQuantity() {
return redPacketQuantity;
}
public RedPacketInfoModel setRedPacketQuantity(String redPacketQuantity) {
this.redPacketQuantity = redPacketQuantity;
return this;
}
public String getConditions() {
return conditions;
}
public RedPacketInfoModel setConditions(String conditions) {
this.conditions = conditions;
return this;
}
public String getCreateTime() {
return createTime;
}
public RedPacketInfoModel setCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
public String getStartTime() {
return startTime;
}
public RedPacketInfoModel setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
public String getEndTime() {
return endTime;
}
public RedPacketInfoModel setEndTime(String endTime) {
this.endTime = endTime;
return this;
}
public String getUserId() {
return userId;
}
public RedPacketInfoModel setUserId(String userId) {
this.userId = userId;
return this;
}
public String getUserNicename() {
return userNicename;
}
public RedPacketInfoModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public RedPacketInfoModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getAvatarThumb() {
return avatarThumb;
}
public RedPacketInfoModel setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
return this;
}
public String getId() {
return id;
}
public RedPacketInfoModel setId(String id) {
this.id = id;
return this;
}
public String getUserExists() {
return userExists;
}
public RedPacketInfoModel setUserExists(String userExists) {
this.userExists = userExists;
return this;
}
public String getUserGoldenBean() {
return userGoldenBean;
}
public RedPacketInfoModel setUserGoldenBean(String userGoldenBean) {
this.userGoldenBean = userGoldenBean;
return this;
}
}

View File

@@ -0,0 +1,117 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class RedPacketListBean extends BaseModel {
public static final int RED_PACKET_STATUS_SUCCESS=1;//红包消费
public static final int RED_PACKET_STATUS_BACK=2;//红包退回
public static final int RED_PACKET_CURRENT_STATUS_SUCCESS=1;//红包已生效
public static final int RED_PACKET_CURRENT_STATUS_TIMEOUT=2;//红包已过期
@SerializedName("id")
private int id;
@SerializedName("live_nicename")
private String liveNicename;
@SerializedName("create_time")
private String createTime;
@SerializedName("red_packet_money")
private long redPacketMoney;
@SerializedName("red_packet_status")
private int redPacketStatus;
@SerializedName("current_status")
private int currentStatus;
@SerializedName("uid")
private long uid;
@SerializedName("amount_diamond")
private long amountDiamond;
@SerializedName("amount_refund")
private long amountRefund;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getLiveNicename() {
return liveNicename;
}
public void setLiveNicename(String liveNicename) {
this.liveNicename = liveNicename;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public long getRedPacketMoney() {
return redPacketMoney;
}
public void setRedPacketMoney(long redPacketMoney) {
this.redPacketMoney = redPacketMoney;
}
public int getRedPacketStatus() {
return redPacketStatus;
}
public void setRedPacketStatus(int redPacketStatus) {
this.redPacketStatus = redPacketStatus;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public int getCurrentStatus() {
return currentStatus;
}
public void setCurrentStatus(int currentStatus) {
this.currentStatus = currentStatus;
}
public long getAmountDiamond() {
return amountDiamond;
}
public void setAmountDiamond(long amountDiamond) {
this.amountDiamond = amountDiamond;
}
public long getAmountRefund() {
return amountRefund;
}
public void setAmountRefund(long amountRefund) {
this.amountRefund = amountRefund;
}
@Override
public String toString() {
return "RedPacketListBean{" +
"id=" + id +
", liveNicename='" + liveNicename + '\'' +
", createTime='" + createTime + '\'' +
", redPacketMoney=" + redPacketMoney +
", redPacketStatus=" + redPacketStatus +
", currentStatus=" + currentStatus +
", uid=" + uid +
", amountDiamond=" + amountDiamond +
", amountRefund=" + amountRefund +
'}';
}
}

View File

@@ -0,0 +1,92 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class RedPacketModel extends BaseModel {
//是否展示
@SerializedName("is_show")
private int isShow;
//正在进行的红包数量
@SerializedName("red_packet_count")
private int redPacketCount;
//正在进行的红包总数量
@SerializedName("red_packet_quantity")
private int redPacketQuantity;
//当前红包剩余数量
@SerializedName("red_packet_remain")
private int redPacketRemain;
//红包倒计时
@SerializedName("countdown")
private int countdown;
//红包id
@SerializedName("red_packet_id")
private String redPacketId;
//红包领取条件
@SerializedName("conditions")
private int conditions;
public int getIsShow() {
return isShow;
}
public RedPacketModel setIsShow(int isShow) {
this.isShow = isShow;
return this;
}
public int getRedPacketCount() {
return redPacketCount;
}
public RedPacketModel setRedPacketCount(int redPacketCount) {
this.redPacketCount = redPacketCount;
return this;
}
public int getRedPacketQuantity() {
return redPacketQuantity;
}
public RedPacketModel setRedPacketQuantity(int redPacketQuantity) {
this.redPacketQuantity = redPacketQuantity;
return this;
}
public int getRedPacketRemain() {
return redPacketRemain;
}
public RedPacketModel setRedPacketRemain(int redPacketRemain) {
this.redPacketRemain = redPacketRemain;
return this;
}
public int getCountdown() {
return countdown;
}
public RedPacketModel setCountdown(int countdown) {
this.countdown = countdown;
return this;
}
public String getRedPacketId() {
return redPacketId;
}
public RedPacketModel setRedPacketId(String redPacketId) {
this.redPacketId = redPacketId;
return this;
}
public int getConditions() {
return conditions;
}
public RedPacketModel setConditions(int conditions) {
this.conditions = conditions;
return this;
}
}

View File

@@ -0,0 +1,46 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class UserAvatarSelectBean extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("name")
private String name;
@SerializedName("path")
private String path;
@SerializedName("checked")
private int checked;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public int getChecked() {
return checked;
}
public void setChecked(int checked) {
this.checked = checked;
}
}

View File

@@ -68,6 +68,10 @@ public class UserBean implements Parcelable {
private String mRankPkImgUrl;
//是否填写完整资料
private int user_info_complete;
//粉丝团等级
private int fansLevel;
//粉丝团进场皮肤
private String fansEnterRoomUrl;
public int getUserInfoComplete() {
return user_info_complete;
@@ -78,6 +82,22 @@ public class UserBean implements Parcelable {
return this;
}
public int getFansLevel() {
return fansLevel;
}
public void setFansLevel(int fansLevel) {
this.fansLevel = fansLevel;
}
public String getFansEnterRoomUrl() {
return fansEnterRoomUrl;
}
public void setFansEnterRoomUrl(String fansEnterRoomUrl) {
this.fansEnterRoomUrl = fansEnterRoomUrl;
}
public boolean isRandomPk() {
return randomPk;
}

View File

@@ -0,0 +1,76 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
public class UserMedalListModel extends BaseModel {
@SerializedName("dress_name")
private String dressName;
@SerializedName("dress_info")
private List<UserMedalModel> dressInfo = new ArrayList<>();
@SerializedName("display_src")
private String displaySrc;
@SerializedName("dress_description")
private String dressDescription;
@SerializedName("display_src_second")
private String displaySrcSecond;
@SerializedName("dress_status")//1Hd2whd
private String dressStatus;
public String getDressDescription() {
return dressDescription;
}
public UserMedalListModel setDressDescription(String dressDescription) {
this.dressDescription = dressDescription;
return this;
}
public String getDisplaySrcSecond() {
return displaySrcSecond;
}
public UserMedalListModel setDisplaySrcSecond(String displaySrcSecond) {
this.displaySrcSecond = displaySrcSecond;
return this;
}
public String getDressStatus() {
return dressStatus;
}
public UserMedalListModel setDressStatus(String dressStatus) {
this.dressStatus = dressStatus;
return this;
}
public String getDressName() {
return dressName;
}
public UserMedalListModel setDressName(String dressName) {
this.dressName = dressName;
return this;
}
public List<UserMedalModel> getDressInfo() {
return dressInfo;
}
public UserMedalListModel setDressInfo(List<UserMedalModel> dressInfo) {
this.dressInfo = dressInfo;
return this;
}
public String getDisplaySrc() {
return displaySrc;
}
public UserMedalListModel setDisplaySrc(String displaySrc) {
this.displaySrc = displaySrc;
return this;
}
}

View File

@@ -0,0 +1,72 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class UserMedalModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("display_src")
private String displaySrc;
@SerializedName("dress_name")
private String dressName;
@SerializedName("dress_description")
private String dressDescription;
@SerializedName("sort")
private String sort;
@SerializedName("dress_status")
private String dressStatus;
public String getId() {
return id;
}
public UserMedalModel setId(String id) {
this.id = id;
return this;
}
public String getDisplaySrc() {
return displaySrc;
}
public UserMedalModel setDisplaySrc(String displaySrc) {
this.displaySrc = displaySrc;
return this;
}
public String getDressName() {
return dressName;
}
public UserMedalModel setDressName(String dressName) {
this.dressName = dressName;
return this;
}
public String getDressDescription() {
return dressDescription;
}
public UserMedalModel setDressDescription(String dressDescription) {
this.dressDescription = dressDescription;
return this;
}
public String getSort() {
return sort;
}
public UserMedalModel setSort(String sort) {
this.sort = sort;
return this;
}
public String getDressStatus() {
return dressStatus;
}
public UserMedalModel setDressStatus(String dressStatus) {
this.dressStatus = dressStatus;
return this;
}
}

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.CenterPopupView;
/**
* 居中弹窗
*/
public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
public final Context mContext;
public AbsDialogCenterPopupWindow(@NonNull Context context) {
super(context);
this.mContext = context;
}
/**
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
*/
public abstract void buildDialog(XPopup.Builder builder);
public abstract int bindLayoutId();
@Override
protected int getImplLayoutId() {
return bindLayoutId();
}
public void showDialog() {
XPopup.Builder builder = new XPopup.Builder(mContext);
builder.isDestroyOnDismiss(true);
builder.enableDrag(false);
buildDialog(builder);
builder.asCustom(this).show();
}
}

View File

@@ -80,7 +80,9 @@ public abstract class AbsDialogFragment extends DialogFragment {
@Override
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
try {
super.show(manager, tag);
if (manager.findFragmentByTag(tag) == null) {
super.show(manager, tag);
}
} catch (Exception e) {
e.printStackTrace();
}

View File

@@ -7,9 +7,11 @@ import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
/**
* 底部弹窗
*/
public abstract class AbsDialogPopupWindow extends BottomPopupView {
private final Context mContext;
public final Context mContext;
public AbsDialogPopupWindow(@NonNull Context context) {
super(context);

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.PositionPopupView;
/**
* 自定义位置弹窗
*/
public abstract class AbsDialogPositionPopupWindow extends PositionPopupView {
public final Context mContext;
public AbsDialogPositionPopupWindow(@NonNull Context context) {
super(context);
this.mContext = context;
}
/**
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
*/
public abstract void buildDialog(XPopup.Builder builder);
public abstract int bindLayoutId();
@Override
protected int getImplLayoutId() {
return bindLayoutId();
}
public void showDialog() {
XPopup.Builder builder = new XPopup.Builder(mContext);
builder.isDestroyOnDismiss(true);
builder.enableDrag(false);
buildDialog(builder);
builder.asCustom(this).show();
}
}

View File

@@ -0,0 +1,93 @@
package com.yunbao.common.dialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.AchievementDetailsAdapter;
import com.yunbao.common.bean.UserMedalListModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class AchievementDetailsPopup extends CenterPopupView {
private UserMedalListModel userMedalListModel;
private ImageView achievementImg;
private TextView dressName, dressDescription;
private View havaDataList, havaData;
private AchievementDetailsAdapter achievementDetailsAdapter;
private RecyclerView achievementImgList;
public AchievementDetailsPopup(@NonNull Context context, UserMedalListModel userMedalListModel) {
super(context);
this.userMedalListModel = userMedalListModel;
}
@Override
protected int getImplLayoutId() {
return R.layout.popup_achievement_details;
}
@Override
protected void onCreate() {
super.onCreate();
havaDataList = findViewById(R.id.hava_data_list);
havaData = findViewById(R.id.hava_data);
if (userMedalListModel.getDressInfo().size() > 0) {
havaDataList.setVisibility(GONE);
havaData.setVisibility(VISIBLE);
achievementDetailsAdapter = new AchievementDetailsAdapter(userMedalListModel.getDressInfo());
achievementImg = findViewById(R.id.achievement_img2);
dressName = findViewById(R.id.dress_name2);
dressDescription = findViewById(R.id.dress_description2);
achievementImgList = findViewById(R.id.achievement_img_list);
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
} else {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
}
dressName.setText(userMedalListModel.getDressName());
dressDescription.setText(userMedalListModel.getDressDescription());
achievementImgList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
achievementImgList.setAdapter(achievementDetailsAdapter);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn2), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dialog.dismiss();
}
});
} else {
havaDataList.setVisibility(VISIBLE);
havaData.setVisibility(GONE);
achievementImg = findViewById(R.id.achievement_img);
dressName = findViewById(R.id.dress_name);
dressDescription = findViewById(R.id.dress_description);
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
} else {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
}
dressName.setText(userMedalListModel.getDressName());
dressDescription.setText(userMedalListModel.getDressDescription());
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dialog.dismiss();
}
});
}
}
}

View File

@@ -34,6 +34,17 @@ public class AllServerNotifyEvent extends BaseModel {
//主播名字
@SerializedName("ancherName")
private String anchorName;
// 是否是红包
private boolean isRedPacket = false;
public boolean isRedPacket() {
return isRedPacket;
}
public AllServerNotifyEvent setRedPacket(boolean redPacket) {
isRedPacket = redPacket;
return this;
}
public String getAnchorName() {
return anchorName;
@@ -137,6 +148,6 @@ public class AllServerNotifyEvent extends BaseModel {
", blindBoxId='" + blindBoxId + '\'' + "\n" +
", boxType='" + boxType + '\'' + "\n" +
", displaySrc='" + displaySrc + '\'' + "\n" +
'}' + "\n" ;
'}' + "\n";
}
}

View File

@@ -0,0 +1,6 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class CodexEvent extends BaseModel {
}

View File

@@ -0,0 +1,16 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class GiftNumberEvent extends BaseModel {
private String mCount;
public String getmCount() {
return mCount;
}
public GiftNumberEvent setmCount(String mCount) {
this.mCount = mCount;
return this;
}
}

View File

@@ -0,0 +1,52 @@
package com.yunbao.common.event;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.bean.BaseModel;
public class GiftWallIlluminateEvent extends BaseModel {
@SerializedName("_method_")
private String method;
@SerializedName("action")
private String action;
@SerializedName("max_number")
private int maxNumber;
@SerializedName("new_number")
private int newNumber;
public String getMethod() {
return method;
}
public GiftWallIlluminateEvent setMethod(String method) {
this.method = method;
return this;
}
public String getAction() {
return action;
}
public GiftWallIlluminateEvent setAction(String action) {
this.action = action;
return this;
}
public int getMaxNumber() {
return maxNumber;
}
public GiftWallIlluminateEvent setMaxNumber(int maxNumber) {
this.maxNumber = maxNumber;
return this;
}
public int getNewNumber() {
return newNumber;
}
public GiftWallIlluminateEvent setNewNumber(int newNumber) {
this.newNumber = newNumber;
return this;
}
}

View File

@@ -0,0 +1,28 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.GiftWallModel;
public class GiftWallItemEvent extends BaseModel {
private GiftWallModel giftWallModel;
private boolean unlit;
public GiftWallModel getGiftWallModel() {
return giftWallModel;
}
public GiftWallItemEvent setGiftWallModel(GiftWallModel giftWallModel) {
this.giftWallModel = giftWallModel;
return this;
}
public boolean isUnlit() {
return unlit;
}
public GiftWallItemEvent setUnlit(boolean unlit) {
this.unlit = unlit;
return this;
}
}

View File

@@ -0,0 +1,6 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class LiveErrorEvent extends BaseModel {
}

View File

@@ -0,0 +1,4 @@
package com.yunbao.common.event;
public class LiveGiftDialogEvent {
}

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.event;
package com.yunbao.common.event;
import com.yunbao.common.bean.LiveBean;

View File

@@ -48,7 +48,7 @@ public class SendBlindGiftEvent extends BaseModel {
@SerializedName("ispk")
private String ispk;
@SerializedName("pkuid")
private boolean pkuid;
private String pkuid;
@SerializedName("pkuid1")
private String pkuid1;
@SerializedName("pkuid2")
@@ -60,7 +60,7 @@ public class SendBlindGiftEvent extends BaseModel {
@SerializedName("active_total")
private String activeTotal;
@SerializedName("blind_box_status")
private boolean blindBoxStatus;
private String blindBoxStatus;
@SerializedName("gift_id")
private String giftId;
@SerializedName("gift_type")
@@ -78,7 +78,7 @@ public class SendBlindGiftEvent extends BaseModel {
@SerializedName("action")
private String action;
@SerializedName("dress_notification")
private boolean dressNotification;
private String dressNotification;
@SerializedName("dress_type")
private Object dressType;
@SerializedName("dress_id")
@@ -313,11 +313,11 @@ public class SendBlindGiftEvent extends BaseModel {
return this;
}
public boolean isPkuid() {
public String isPkuid() {
return pkuid;
}
public SendBlindGiftEvent setPkuid(boolean pkuid) {
public SendBlindGiftEvent setPkuid(String pkuid) {
this.pkuid = pkuid;
return this;
}
@@ -367,11 +367,11 @@ public class SendBlindGiftEvent extends BaseModel {
return this;
}
public boolean isBlindBoxStatus() {
public String isBlindBoxStatus() {
return blindBoxStatus;
}
public SendBlindGiftEvent setBlindBoxStatus(boolean blindBoxStatus) {
public SendBlindGiftEvent setBlindBoxStatus(String blindBoxStatus) {
this.blindBoxStatus = blindBoxStatus;
return this;
}
@@ -449,11 +449,11 @@ public class SendBlindGiftEvent extends BaseModel {
return this;
}
public boolean isDressNotification() {
public String isDressNotification() {
return dressNotification;
}
public SendBlindGiftEvent setDressNotification(boolean dressNotification) {
public SendBlindGiftEvent setDressNotification(String dressNotification) {
this.dressNotification = dressNotification;
return this;
}

View File

@@ -0,0 +1,73 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.FragmentTransaction;
import com.yunbao.common.R;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class AllServiceChampionFragment extends BaseFragment {
private TextView winnerOfTheMonth, lastMonthWinner;
private String mStream, mLiveUid;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_all_service_champion, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
winnerOfTheMonth = contentView.findViewById(R.id.winner_of_the_month);
lastMonthWinner = contentView.findViewById(R.id.last_month_winner);
winnerOfTheMonth.setSelected(true);
lastMonthWinner.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
ViewClicksAntiShake.clicksAntiShake(winnerOfTheMonth, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
winnerOfTheMonth.setSelected(true);
lastMonthWinner.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
}
});
ViewClicksAntiShake.clicksAntiShake(lastMonthWinner, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
lastMonthWinner.setSelected(true);
winnerOfTheMonth.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, LastMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
}
});
}
@Override
protected void loadData() {
}
public static AllServiceChampionFragment newInstance(String mStream, String mLiveUid) {
AllServiceChampionFragment allServiceChampionFragment = new AllServiceChampionFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
allServiceChampionFragment.setArguments(bundle);
return allServiceChampionFragment;
}
}

View File

@@ -0,0 +1,79 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
public class CurrentMonthGiftNamingFragment extends BaseFragment {
private String mStream, mLiveUid;
private RecyclerView giftList;
private MonthGiftNamingAdapter monthGiftNamingAdapter;
private View noData;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_current_month_gift_naming, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
giftList = contentView.findViewById(R.id.gift_list);
noData = contentView.findViewById(R.id.no_data);
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
giftList.setAdapter(monthGiftNamingAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getContext()).
currentMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
@Override
public void onSuccess(List<GiftWallModel> data) {
if (data.size() > 0) {
giftList.setVisibility(View.VISIBLE);
noData.setVisibility(View.GONE);
monthGiftNamingAdapter.addAllData(data);
} else {
giftList.setVisibility(View.GONE);
noData.setVisibility(View.VISIBLE);
}
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
public static CurrentMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
CurrentMonthGiftNamingFragment currentMonthGiftNamingFragment = new CurrentMonthGiftNamingFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
currentMonthGiftNamingFragment.setArguments(bundle);
return currentMonthGiftNamingFragment;
}
}

View File

@@ -0,0 +1,81 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftWithoutWallAdapter;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
/**
* wei点亮礼物墙
*/
public class GiftWithoutWallFragment extends BaseFragment {
private String mStream, mLiveUid, toUid;
private RecyclerView withoutList;
private LinearLayout giftWallNoData;
private GiftWithoutWallAdapter withoutWallAdapter;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_gift_without_wall, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
toUid = bundle.getString("toUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
withoutList = contentView.findViewById(R.id.without_list);
giftWallNoData = contentView.findViewById(R.id.gift_wall_no_data);
withoutWallAdapter = new GiftWithoutWallAdapter();
withoutList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
withoutList.setAdapter(withoutWallAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getActivity()).
giftWithoutWall(mLiveUid, toUid, new HttpCallback<GiftAlreadyWallModel>() {
@Override
public void onSuccess(GiftAlreadyWallModel data) {
if (data.getGiftWall().size() > 0) {
giftWallNoData.setVisibility(View.GONE);
withoutList.setVisibility(View.VISIBLE);
withoutWallAdapter.addAllData(data.getGiftWall());
} else {
giftWallNoData.setVisibility(View.VISIBLE);
withoutList.setVisibility(View.GONE);
}
}
@Override
public void onError(String error) {
}
});
}
public static GiftWithoutWallFragment newInstance(String mStream, String mLiveUid, String toUid) {
GiftWithoutWallFragment liveGiftFragment = new GiftWithoutWallFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
bundle.putString("toUid", toUid);
liveGiftFragment.setArguments(bundle);
return liveGiftFragment;
}
}

View File

@@ -0,0 +1,79 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
public class LastMonthGiftNamingFragment extends BaseFragment {
private String mStream, mLiveUid;
private RecyclerView giftList;
private MonthGiftNamingAdapter monthGiftNamingAdapter;
private View noData;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_last_month_gift_naming, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
giftList = contentView.findViewById(R.id.gift_list);
noData = contentView.findViewById(R.id.no_data);
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
giftList.setAdapter(monthGiftNamingAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getContext()).
lastMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
@Override
public void onSuccess(List<GiftWallModel> data) {
if (data.size() > 0) {
giftList.setVisibility(View.VISIBLE);
noData.setVisibility(View.GONE);
monthGiftNamingAdapter.addAllData(data);
} else {
giftList.setVisibility(View.GONE);
noData.setVisibility(View.VISIBLE);
}
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
public static LastMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
LastMonthGiftNamingFragment lastMonthGiftNamingFragment = new LastMonthGiftNamingFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
lastMonthGiftNamingFragment.setArguments(bundle);
return lastMonthGiftNamingFragment;
}
}

View File

@@ -17,11 +17,11 @@ import com.yunbao.common.bean.WishListModel;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.bean.WishModel2;
import com.yunbao.common.event.LiveNewWishListCloseEvent;
import com.yunbao.common.event.PopupViewDismissEvent;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.HintCustomPopup;
import com.yunbao.common.views.LiveNewWishGiftPopup;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@@ -66,7 +66,7 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override
public void onViewClicks() {
saveWish();
Bus.get().post(new PopupViewDismissEvent());
}
});
}
@@ -105,29 +105,51 @@ public class LiveNewWishListFragment extends BaseFragment {
liveNewWishAdapter.addData(wishList, type);
}
public void saveWish() {
public int liveNewWishAdapterWishList() {
List<WishModel> wishList = liveNewWishAdapter.getWishList();
List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson();
for (WishModel model : wishList) {
if (model!=null){
if (model != null) {
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
wishList2.add(model2);
}
}
if (wishList2.size() == 0) {
Bus.get().post(new PopupViewDismissEvent());
} else {
if (wishList2.size()>10){
ToastUtil.show(R.string.must_hint);
return;
return wishList2.size();
}
public void saveWish() {
List<WishModel> wishList = liveNewWishAdapter.getWishList();
List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson();
for (WishModel model : wishList) {
if (model != null) {
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
wishList2.add(model2);
}
}
switch (type) {
case 1:
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
break;
case 2:
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
break;
case 3:
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
break;
case 4:
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
break;
}
if (wishList2.size() == 0) {
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
@@ -135,22 +157,58 @@ public class LiveNewWishListFragment extends BaseFragment {
ToastUtil.show(R.string.net_error);
}
});
switch (type) {
case 1:
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
break;
case 2:
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
break;
case 3:
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
break;
case 4:
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
break;
} else if (wishList2.size() == 1) {
new XPopup.Builder(getContext())
.asCustom(new HintCustomPopup(getContext(),
getContext().getString(R.string.dialog_tip),
getContext().getString(R.string.sett_rigger))
.setLiveOpenOk(getContext().getString(R.string.settings_ser))
.setLiveOpenCancel(getContext().getString(R.string.cancel_ca))
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
@Override
public void onSure() {
}
@Override
public void onCancel() {
if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint);
return;
}
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
public void onError(String error) {
ToastUtil.show(R.string.net_error);
}
});
}
})).show();
} else {
if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint);
return;
}
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
public void onError(String error) {
ToastUtil.show(R.string.net_error);
}
});
}
}
}

View File

@@ -336,6 +336,18 @@ public class ImgLoader {
builder.into(imageView);
}
public static void displayBlurLive(Context context, int url, ImageView imageView) {
if (!contextIsExist(context)) {
return;
}
RequestBuilder<Drawable> builder = Glide.with(context)
.load(url)
.thumbnail(thumbnail)
.apply(RequestOptions.bitmapTransform(new BlurTransformation(20)))
.placeholder(R.mipmap.live_bg);
builder.into(imageView);
}
private static boolean contextIsExist(Context context) {
if (context == null) {
return false;

View File

@@ -1,5 +1,6 @@
package com.yunbao.common.http;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.util.Log;
@@ -18,11 +19,13 @@ import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.event.FollowEvent;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.APKManager;
import com.yunbao.common.manager.GiftQuantityManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.LiveClassManager;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.VersionUtil;
@@ -62,7 +65,7 @@ public class CommonHttpUtil {
* @param poi 是否要查询POI
*/
public static void getAddressInfoByTxLocaitonSdk(final double lng, final double lat, final int poi, int pageIndex, String tag, final HttpCallback commonCallback) {
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
/*String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
String s = "/ws/geocoder/v1/?get_poi=" + poi + "&key=" + txMapAppKey + "&location=" + lat + "," + lng
+ "&poi_options=address_format=short;radius=1000;page_size=20;page_index=" + pageIndex + ";policy=5" + CommonAppConfig.getInstance().getTxMapAppSecret();
String sign = MD5Util.getMD5(s);
@@ -98,7 +101,7 @@ public class CommonHttpUtil {
commonCallback.onFinish();
}
}
});
});*/
}
/**
@@ -109,7 +112,7 @@ public class CommonHttpUtil {
*/
public static void searchAddressInfoByTxLocaitonSdk(final double lng, final double lat, String keyword, int pageIndex, final HttpCallback commonCallback) {
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
/* String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
String s = "/ws/place/v1/search?boundary=nearby(" + lat + "," + lng + ",1000)&key=" + txMapAppKey + "&keyword=" + keyword + "&orderby=_distance&page_index=" + pageIndex +
"&page_size=20" + CommonAppConfig.getInstance().getTxMapAppSecret();
String sign = MD5Util.getMD5(s);
@@ -143,7 +146,7 @@ public class CommonHttpUtil {
commonCallback.onFinish();
}
}
});
});*/
}
@@ -195,6 +198,10 @@ public class CommonHttpUtil {
if (obj.containsKey("is_chat")) {
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
}
if (obj.containsKey("levelfans")) {
JSONArray levelArray = obj.getJSONArray("levelfans");
new NewLevelManager(context).upDataFansLevel(levelArray.toJSONString());
}
if (obj.containsKey("level_new")) {//缓存等级数据
JSONArray levelArray = obj.getJSONArray("level_new");
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
@@ -224,14 +231,35 @@ public class CommonHttpUtil {
}
if (obj.containsKey("clarity")) {
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
} if (obj.containsKey("defaultBubbleUrl")) {
}
if (obj.containsKey("defaultBubbleUrl")) {
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
}
if (obj.containsKey("gift_quantity")) {
JSONArray giftQuantity = obj.getJSONArray("gift_quantity");
new GiftQuantityManager(context).UpGiftQuantity(giftQuantity.toJSONString());
}
} catch (Exception e) {
e.printStackTrace();
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
ErrorActivity.forward("GetConfig接口返回数据异常", error);
}
} else if (code == 1000) {
new DialogUitl
.Builder(context)
.setContent(msg)
.setCancelable(false)
.setClickCallback3(new DialogUitl.SimpleCallback3() {
@Override
public void onConfirmClick(Dialog dialog) {
AppManager.getInstance().AppExit();
}
@Override
public void onCancel() {
AppManager.getInstance().AppExit();
}
}).build().show();
}
}
@@ -286,8 +314,15 @@ public class CommonHttpUtil {
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
if (code == 0 && info.length > 0 || code == 1001) {
int isAttention = JSON.parseObject(info[0]).getIntValue("isattent");//1是 关注 0是未关注
/* if (code == 1001) {
if (WordUtil.isNewZh()) {
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
} else {
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
}
}*/
EventBus.getDefault().post(new FollowEvent(touid, isAttention));
if (callback != null) {
callback.callback(isAttention);

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.http;
package com.yunbao.common.http;
/**
* Created by cxf on 2019/3/21.

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.http;
package com.yunbao.common.http;
import android.text.TextUtils;
@@ -13,6 +13,7 @@ import com.yunbao.common.http.JsonBean;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.VersionUtil;
import java.io.File;
@@ -285,17 +286,24 @@ public class LiveHttpUtil {
.execute(callback);
}
public static void setShutUp(String liveUid, String stream, int type, String touid, HttpCallback callback) {
setShutUp(liveUid, stream, type, touid, null, callback);
}
/**
* 主播或管理员禁言
* @param time 禁言时间
*/
public static void setShutUp(String liveUid, String stream, int type, String touid, HttpCallback callback) {
HttpClient.getInstance().get("Live.setShutUp", LiveHttpConsts.SET_SHUT_UP)
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
GetRequest<JsonBean> request = HttpClient.getInstance().get("Live.setShutUp", LiveHttpConsts.SET_SHUT_UP)
.params("liveuid", liveUid)
.params("stream", stream)
.params("type", type)
.params("touid", touid)
.execute(callback);
.params("touid", touid);
if (!StringUtil.isEmpty(time)) {
request.params("minute", time);
}
request.execute(callback);
}
@@ -611,15 +619,17 @@ public class LiveHttpUtil {
* 观众给主播送礼物
*/
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
sendGift(by, liveUid, stream, giftId, giftCount, 0, callback);
sendGift(by, liveUid, stream, giftId, giftCount, 0, false,callback);
}
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false,callback);
}
/**
* 观众给主播送礼物
*
* @param isContactGift 是否为联系方式礼物
*/
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift,HttpCallback callback) {
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
.params("liveuid", liveUid)
.params("stream", stream)
@@ -627,6 +637,7 @@ public class LiveHttpUtil {
.params("isContactGift", isContactGift)
.params("giftcount", giftCount)
.params("isprank", by)
.params("fans_exclusive_pack",isFansGroupGift?"1":"0")
.params("appVersion", CommonAppConfig.getInstance().getVersion())
.execute(callback);
}

View File

@@ -2,6 +2,7 @@ package com.yunbao.common.http;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BlindBoxInfoModel;
@@ -11,6 +12,14 @@ import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.FansGroupGiftPack;
import com.yunbao.common.bean.FansGroupGiftPackInfo;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
import com.yunbao.common.bean.GiftNamingInfoModel;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.bean.HourRank;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.IMLoginModel;
@@ -26,6 +35,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MedalAchievementModel;
import com.yunbao.common.bean.MsgSwitchDetailModel;
import com.yunbao.common.bean.NewPeopleInfo;
import com.yunbao.common.bean.NobleRankHideUserListModel;
@@ -35,11 +45,16 @@ import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
import com.yunbao.common.bean.RedPacketGiftModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.SearchModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.SlideInBannerModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.bean.WishListGiftConfModel;
import com.yunbao.common.bean.WishListModel;
@@ -400,7 +415,7 @@ public interface PDLiveApi {
* 自由PK开始后调用接口扣掉次数
*/
@GET("/api/public/?service=Livepk.setActivePkNum")
Observable<ResponseModel<BaseModel>> setFreePkNum();
Observable<ResponseModel<List<BaseModel>>> setFreePkNum();
/**
* 随机PK搜索用户
@@ -730,4 +745,227 @@ public interface PDLiveApi {
*/
@GET("/api/public/?service=Live.getBlindBoxInfo")
Observable<ResponseModel<List<BlindBoxInfoModel>>> getBlindBoxInfo();
/**
* 获取红包记录列表
*/
@GET("/api/public/?service=Live.redPacketRecord")
Observable<ResponseModel<List<RedPacketListBean>>> getRedPacketList();
/**
* 获取红包詳情
*/
@GET("/api/public/?service=Live.redPacketRecordDetails")
Observable<ResponseModel<RedPacketDetailsBean>> getRedPacketDetails(@Query("red_packet_id") int id);
/**
* 获取直播间上下滑动红包集合
*/
@GET("/api/public/?service=Home.getRedPacket")
Observable<ResponseModel<List<AnchorRecommendItemModel>>> getRedPacket();
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.createRedPacket")
Observable<ResponseModel<Object>> createRedPacket(
@Query("liveuid") String liveUid,
@Query("red_packet_money") String redPacketMoney,
@Query("red_packet_quantity") String redPacketQuantity,
@Query("conditions") String conditions
);
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.redPacketInfo")
Observable<ResponseModel<RedPacketInfoModel>> redPacketInfo(
@Query("liveuid") String liveUid,
@Query("red_packet_id") String redPacketId
);
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.getRedPacket")
Observable<ResponseModel<RedPacketInfoModel>> getRedPacket(
@Query("liveuid") String liveUid,
@Query("stream") String stream,
@Query("red_packet_id") String redPacketId
);
/**
* 超级红包打开接口
*/
@GET("/api/public/?service=Live.getRedPacketSuperPrize")
Observable<ResponseModel<RedPacketInfoModel>> getRedPacketSuperPrize(
@Query("liveuid") String liveUid,
@Query("super_jackpot_id") String superJackpotId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.getRedPacketReceive")
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketReceive(
@Query("red_packet_id") String redPacketId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.getRedPacketSuperPrizeReceive")
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketSuperPrizeReceive(
@Query("super_jackpot_id") String superJackpotId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.endRedPacket")
Observable<ResponseModel<Object>> endRedPacket(
@Query("liveuid") String liveUid,
@Query("red_packet_id") String redPacketId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.startRedPacketRobot")
Observable<ResponseModel<Object>> startRedPacketRobot(
@Query("liveuid") String liveUid,
@Query("stream") String stream,
@Query("red_packet_id") String redPacketId
);
/**
* 获取系统默认头像列表
*/
@GET("/api/public/?service=Userhome.getDefaultAvatarList")
Observable<ResponseModel<List<UserAvatarSelectBean>>> getSystemUserAvatar();
/**
* 设置系统默认头像
*
* @param id 头像id
*/
@GET("/api/public/?service=Userhome.setAvatar")
Observable<ResponseModel<Object>> setSystemUserAvatar(
@Query("avatar_id") int id
);
/**
* 礼物墙已点亮
*/
@GET("/api/public/?service=Gift.giftAlreadyWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftAlreadyWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙已点亮
*/
@GET("/api/public/?service=Gift.giftUserSendWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftUserSendWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙未点亮
*/
@GET("/api/public/?service=Gift.giftWithoutWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftWithoutWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙选中礼物详情
*/
@GET("/api/public/?service=Gift.giftDetail")
Observable<ResponseModel<GiftWallGiftDetail>> giftDetail(
@Query("liveuid") String liveUid,
@Query("gift_id") String giftId
);
/**
* 礼物墙本月冠名礼物
*
* @return
*/
@GET("/api/public/?service=Gift.currentMonthGiftNaming")
Observable<ResponseModel<List<GiftWallModel>>> currentMonthGiftNaming();
/**
* 礼物墙上月冠名
*
* @return
*/
@GET("/api/public/?service=Gift.lastMonthGiftNaming")
Observable<ResponseModel<List<GiftWallModel>>> lastMonthGiftNaming();
/**
* 礼物墙上月冠名
*
* @return
*/
@GET("/api/public/?service=Gift.getGiftGuide")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getGiftGuideHistory")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getUserMedalList")
Observable<ResponseModel<MedalAchievementModel>> getUserMedalList(@Query("to_uid") String toUid);
@GET("/api/public/?service=Gift.getLiveMedalList")
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList(@Query("liveuid") String liveUid);
/**
* 获取粉丝团礼物信息
*
* @param packId 礼包id
*/
@GET("/api/public/?service=Fans.getFansExclusivePack")
Observable<ResponseModel<FansGroupGiftPackInfo>> getFansExclusivePack(@Query("liveuid") String liveUid,
@Query("pack_id") String packId
);
/**
* 购买粉丝团礼包
*
* @param packId 礼包id
*/
@GET("/api/public/?service=Fans.buyFansExclusivePack")
Observable<ResponseModel<HttpCallbackModel>> buyFansExclusivePack(@Query("liveuid") String liveUid,
@Query("pack_id") String packId,
@Query("stream") String stream
);
/**
* 获取粉丝团礼物包裹
*/
@GET("/api/public/?service=Fans.userFansExclusivePackList")
Observable<ResponseModel<List<FansGroupGiftPack>>> userFansExclusivePackList(@Query("liveuid") String liveUid);
/**
* 获取粉丝团礼物包裹
*/
@GET("/api/public/?service=Fans.getCheckFansLevelUpgrade")
Observable<ResponseModel<FansCheckRed>> getCheckFansLevelUpgrade(@Query("liveuid") String liveUid);
@GET("/api/public/?service=gift.getGiftNamingInfo")
Observable<ResponseModel<GiftNamingInfoModel>> getGiftNamingInfo(@Query("gift_id") String giftId);
}

View File

@@ -13,6 +13,14 @@ import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.FansGroupGiftPack;
import com.yunbao.common.bean.FansGroupGiftPackInfo;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
import com.yunbao.common.bean.GiftNamingInfoModel;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LinkMicUserBeanV2;
@@ -21,12 +29,14 @@ import com.yunbao.common.bean.LiveAiRobotBean;
import com.yunbao.common.bean.LiveAnchorCallMeModel;
import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.bean.LiveDataInfoModel;
import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MedalAchievementModel;
import com.yunbao.common.bean.NobleRankHideUserListModel;
import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.PkRankBean;
@@ -34,9 +44,14 @@ import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
import com.yunbao.common.bean.RedPacketGiftModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.bean.WishListGiftConfModel;
import com.yunbao.common.bean.WishListModel;
@@ -163,8 +178,16 @@ public class LiveNetManager {
.subscribe(listResponseModel -> {
List<SetAttentsModel> setAttentsModels = listResponseModel.getData().getInfo();
if (setAttentsModels.size() > 0) {
if (callback != null)
if (callback != null) {
/* if (listResponseModel.getData().getCode() == 1001) {
if (WordUtil.isNewZh()) {
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
} else {
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
}
}*/
callback.onSuccess(setAttentsModels.get(0));
}
} else {
if (callback != null)
callback.onError("操作失效");
@@ -639,9 +662,9 @@ public class LiveNetManager {
.setFreePkNum()
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
}
}, new Consumer<Throwable>() {
@@ -1264,6 +1287,7 @@ public class LiveNetManager {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
throwable.printStackTrace();
if (callback != null) {
callback.onError(throwable.getMessage());
}
@@ -1550,6 +1574,625 @@ public class LiveNetManager {
}).isDisposed();
}
/**
* 获取红包记录列表
*/
public void getRedPacketList(HttpCallback<List<RedPacketListBean>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketList()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketListBean>>>() {
@Override
public void accept(ResponseModel<List<RedPacketListBean>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/**
* 获取红包记录列表
*/
public void getRedPacketUserList(int id, HttpCallback<RedPacketDetailsBean> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketDetails(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<RedPacketDetailsBean>>() {
@Override
public void accept(ResponseModel<RedPacketDetailsBean> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/**
* 创建红包
*
* @param liveUid 直播间id
* @param redPacketMoney 红包金额
* @param redPacketQuantity 红包数量
* @param conditions 红包领取条件 0.无 1.关注主播
*/
public void createRedPacket(String liveUid, String redPacketMoney, String redPacketQuantity, String conditions, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.createRedPacket(liveUid, redPacketMoney, redPacketQuantity, conditions)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (callback != null) {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getMsg());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/**
* 红包信息
*
* @param liveUid 直播间id
* @param redPacketId 红包id
*/
public void redPacketInfo(String liveUid, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.redPacketInfo(liveUid, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(redPacketInfoModelResponseModel -> {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}).isDisposed();
}
/**
* 领取红包
*
* @param liveUid 直播间id
* @param redPacketId 红包id
*/
public void getRedPacket(String liveUid, String stream, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getRedPacket(liveUid, stream, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(redPacketInfoModelResponseModel -> {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}).isDisposed();
}
public void getRedPacketSuperPrize(String liveUid, String superJackpotId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketSuperPrize(liveUid, superJackpotId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<RedPacketInfoModel>>() {
@Override
public void accept(ResponseModel<RedPacketInfoModel> redPacketInfoModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getRedPacketReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketReceive(redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
@Override
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getRedPacketSuperPrizeReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketSuperPrizeReceive(redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
@Override
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void endRedPacket(String liveUid, String redPacketId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.endRedPacket(liveUid, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess("");
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void startRedPacketRobot(String liveUid, String stream, String redPacketId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.startRedPacketRobot(liveUid, stream, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getMsg());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getSystemUserAvatar(HttpCallback<List<UserAvatarSelectBean>> callback) {
API.get().pdLiveApi(mContext)
.getSystemUserAvatar()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<UserAvatarSelectBean>>>() {
@Override
public void accept(ResponseModel<List<UserAvatarSelectBean>> objectResponseModel) throws Exception {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getInfo());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void setSystemUserAvatar(int id, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.setSystemUserAvatar(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getMsg());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftAlreadyWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftAlreadyWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftUserSendWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftUserSendWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftWithoutWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftWithoutWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftDetail(String liveUid, String giftId, HttpCallback<GiftWallGiftDetail> callback) {
API.get().pdLiveApi(mContext)
.giftDetail(liveUid, giftId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftWallGiftDetail>>() {
@Override
public void accept(ResponseModel<GiftWallGiftDetail> giftWallGiftDetailResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftWallGiftDetailResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void currentMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
API.get().pdLiveApi(mContext)
.currentMonthGiftNaming()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
@Override
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void lastMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
API.get().pdLiveApi(mContext)
.lastMonthGiftNaming()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
@Override
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftGuide(String liveUid, String toUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuide(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@Override
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftGuideHistory(String toUid, String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuideHistory(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@Override
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getUserMedalList(String toUid, HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getUserMedalList(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
@Override
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getLiveMedalList(String liveUid, HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getLiveMedalList(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
@Override
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getFansExclusivePack(String liveUid, String packId, HttpCallback<FansGroupGiftPackInfo> callback) {
API.get().pdLiveApi(mContext)
.getFansExclusivePack(liveUid, packId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<FansGroupGiftPackInfo>>() {
@Override
public void accept(ResponseModel<FansGroupGiftPackInfo> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void buyFansExclusivePack(String liveUid, String packId, String stream, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.buyFansExclusivePack(liveUid, packId, stream)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<HttpCallbackModel>>() {
@Override
public void accept(ResponseModel<HttpCallbackModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void userFansExclusivePackList(String liveUid, HttpCallback<List<FansGroupGiftPack>> callback) {
API.get().pdLiveApi(mContext)
.userFansExclusivePackList(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<FansGroupGiftPack>>>() {
@Override
public void accept(ResponseModel<List<FansGroupGiftPack>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getCheckFansLevelUpgrade(String liveUid, HttpCallback<FansCheckRed> callback) {
API.get().pdLiveApi(mContext)
.getCheckFansLevelUpgrade(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<FansCheckRed>>() {
@Override
public void accept(ResponseModel<FansCheckRed> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftNamingInfo(String giftId,HttpCallback<GiftNamingInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getGiftNamingInfo(giftId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftNamingInfoModel>>() {
@Override
public void accept(ResponseModel<GiftNamingInfoModel> liveGiftBeanResponseModel) throws Exception {
if (callback!=null){
callback.onSuccess(liveGiftBeanResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/**
* 直播间取消网络请求
*/

View File

@@ -2,8 +2,8 @@ package com.yunbao.common.http.main;
import android.app.Activity;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.MsgSwitchDetailModel;
@@ -13,7 +13,6 @@ import com.yunbao.common.http.API;
import com.yunbao.common.http.ResponseData;
import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
@@ -207,13 +206,14 @@ public class MainNetManager {
/**
* 获取推送关注的设置和关注列表
*
* @param callback
*/
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(msgSwitchDetailModelResponseModel -> {
.subscribe(msgSwitchDetailModelResponseModel -> {
if (callback != null) {
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
callback.onSuccess(msgSwitchDetailModel);
@@ -227,13 +227,14 @@ public class MainNetManager {
/**
* 推送开关设置
*
* @param callback
*/
public void setMsgMasterSwitch(String status,String type,HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status,type)
public void setMsgMasterSwitch(String status, String type, HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status, type)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseModel -> {
.subscribe(BaseModel -> {
if (callback != null) {
ResponseData responseData = BaseModel.getData();
callback.onSuccess(responseData);
@@ -247,13 +248,14 @@ public class MainNetManager {
/**
* 主播开播推送开关设置
*
* @param callback
*/
public void setBeginShowMsgSwitch(String status,String isAll,String liveuid,HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status,isAll,liveuid)
public void setBeginShowMsgSwitch(String status, String isAll, String liveuid, HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status, isAll, liveuid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseModel -> {
.subscribe(BaseModel -> {
if (callback != null) {
ResponseData responseData = BaseModel.getData();
callback.onSuccess(responseData);
@@ -264,5 +266,22 @@ public class MainNetManager {
}
}).isDisposed();
}
/**
* 获取直播间上下滑动红包集合
*/
public void getRedPacket(HttpCallback<List<AnchorRecommendItemModel>> callback) {
API.get().pdLiveApi(mContext).getRedPacket()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(msgSwitchDetailModelResponseModel -> {
if (callback != null) {
callback.onSuccess(msgSwitchDetailModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
}

View File

@@ -0,0 +1,53 @@
package com.yunbao.common.manager;
import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.bean.LiveClassBean;
import com.yunbao.common.manager.base.BaseCacheManager;
import java.util.List;
public class GiftQuantityManager extends BaseCacheManager {
private final static String KEY_GIFT_QUANTITY = "GiftQuantity";
private static GiftQuantityManager manager;
private Context context;
private List<GiftQuantityModel> giftQuantityModels;
public GiftQuantityManager(Context context) {
super(context);
}
/**
* 获取指导员备注信息
*
* @return
*/
public List<GiftQuantityModel> getGiftQuantity() {
List<GiftQuantityModel> giftQuantityModels = getList(KEY_GIFT_QUANTITY, new TypeToken<List<GiftQuantityModel>>() {
}.getType());
if (giftQuantityModels == null || giftQuantityModels.size() == 0) {
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1314").setFontColour("#05F3EC"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("520").setFontColour("#65BFFB"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("100").setFontColour("#9B62FF"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("88").setFontColour("#FA62A1"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("66").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("10").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1").setFontColour("#ffffff"));
}
return giftQuantityModels;
}
/**
* 缓存等级图标
*
* @param json
*/
public void UpGiftQuantity(String json) {
giftQuantityModels = new Gson().fromJson(json, new TypeToken<List<GiftQuantityModel>>() {
}.getType());
put(KEY_GIFT_QUANTITY, giftQuantityModels);
}
}

View File

@@ -47,6 +47,7 @@ public class IMLoginManager extends BaseCacheManager {
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
private final String STATUS_ANCHOR_SAY = "anchorSay";
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
private final String LIVE_NOTIFY_SETTINGS = "liveNotifySettings";//开播通知
private final String KEY_LANGUAGE = "language";
@@ -280,6 +281,10 @@ public class IMLoginManager extends BaseCacheManager {
return userInfo;
}
public void setMedalName(String medalName) {
userInfo.setMedalName(medalName);
}
/**
* 判断是否已登录
*
@@ -354,6 +359,14 @@ public class IMLoginManager extends BaseCacheManager {
return getBoolean(GiftEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
}
public void setLiveNotifySettings(boolean isTrue) {
put(LIVE_NOTIFY_SETTINGS, isTrue);
}
public boolean isLiveNotifySettings() {
return getBoolean(LIVE_NOTIFY_SETTINGS, true);
}
/**
* 重新请求管理员身份信息
*/

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.FansModel;
import com.yunbao.common.bean.NewLevelModel;
import com.yunbao.common.manager.base.BaseCacheManager;
@@ -17,9 +18,11 @@ public class NewLevelManager extends BaseCacheManager {
private final String KEY_USER_LEVEL = "keyUserLevel";
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
private final String KEY_FANS_LEVEL = "keyFansLevel";
private List<NewLevelModel> newLevelModels = new ArrayList<>();
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
private List<FansModel> fansModels = new ArrayList<>();
public NewLevelManager(Context context) {
super(context);
@@ -36,6 +39,29 @@ public class NewLevelManager extends BaseCacheManager {
put(KEY_USER_LEVEL, newLevelModels);
}
public void upDataFansLevel(String json) {
fansModels = new Gson().fromJson(json, new TypeToken<List<FansModel>>() {
}.getType());
put(KEY_FANS_LEVEL, fansModels);
}
public List<FansModel> getFansLevel() {
fansModels = getList(KEY_FANS_LEVEL, new TypeToken<List<FansModel>>() {
}.getType());
return fansModels;
}
public FansModel getFansModel(int level) {
getFansLevel();
FansModel fansModel = null;
for (FansModel model : fansModels) {
if (model.getLevelid() == level) {
fansModel = model;
}
}
return fansModel;
}
/**
* 获取等级数据
*
@@ -45,6 +71,7 @@ public class NewLevelManager extends BaseCacheManager {
return getList(KEY_USER_LEVEL, new TypeToken<List<NewLevelModel>>() {
}.getType());
}
/**
* 缓存等级图标
*

View File

@@ -401,7 +401,7 @@ public class RandomPkManager {
* 清空状态,下播时调用
*/
public void release() {
status = PK_STATUS_REQUEST;
status = PK_STATUS_DEFAULT;
if (task != null) {
task.cancel();
}

View File

@@ -6,6 +6,10 @@ import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
/**
* 修复全屏WebView输入法遮挡输入框的问题
* <a href="https://github.com/madebycm/AndroidBug5497Workaround/tree/master">GitHub</a>
*/
public class AndroidBug5497Workaround {
// For more information, see https://issuetracker.google.com/issues/36911528

View File

@@ -0,0 +1,56 @@
package com.yunbao.common.utils;
import android.content.Context;
import android.graphics.Bitmap;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
/**
* Created by L on 2017/10/12.
*/
public class BlurBitmapUtil {
/**
* 图片缩放比例
*/
private static final float BITMAP_SCALE = 0.4f;
/**
* 最大模糊度(在0.0到25.0之间)
*/
private static final float BLUR_RADIUS = 25f;
/**
* 模糊图片的具体方法
*
* @param context 上下文对象
* @param image 需要模糊的图片
* @return 模糊处理后的图片
*/
public static Bitmap blur(Context context, Bitmap image) {
// 计算图片缩小后的长宽
int width = Math.round(image.getWidth() * BITMAP_SCALE);
int height = Math.round(image.getHeight() * BITMAP_SCALE);
// 将缩小后的图片做为预渲染的图片。
Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false);
// 创建一张渲染后的输出图片。
Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);
// 创建RenderScript内核对象
RenderScript rs = RenderScript.create(context);
// 创建一个模糊效果的RenderScript的工具对象
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
// 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。
// 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。
Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
// 设置渲染的模糊程度, 25f是最大模糊度
blurScript.setRadius(BLUR_RADIUS);
// 设置blurScript对象的输入内存
blurScript.setInput(tmpIn);
// 将输出数据保存到输出内存中
blurScript.forEach(tmpOut);
// 将数据填充到Allocation中
tmpOut.copyTo(outputBitmap);
return outputBitmap;
}
}

View File

@@ -22,6 +22,8 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.VideoBean;
import com.yunbao.common.bean.VideoListBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
@@ -542,9 +544,52 @@ public class JavascriptInterfaceUtils {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("closeLiveRoom"));
}
@JavascriptInterface
public void clickLogOffAccount() {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("clickLogOffAccount"));
}
@JavascriptInterface
public void androidFansGroupBuy(String id){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupBuy").setUserId(id));
}
@JavascriptInterface
public void androidFansGroupPack(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupPack"));
}
@JavascriptInterface
public void androidFansGroupInfo(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupInfo"));
}
@JavascriptInterface
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0,isAnchor==1);
}
@JavascriptInterface
public void wearOrCancelFanMedal(){
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
IMLoginManager.get(mContext).upDataUserInfo(info[0]);
JSONObject obj = JSON.parseObject(info[0]);
UserBean bean = JSON.toJavaObject(obj, UserBean.class);
CommonAppConfig.getInstance().setUserBean(bean);
}
}
});
}
@JavascriptInterface
public void androidCancelAnchorAttention(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidCancelAnchorAttention"));
}
}

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.presenter;
package com.yunbao.common.utils;
import android.app.Activity;
import android.app.Dialog;
@@ -10,19 +10,15 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.LiveErrorEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.base.CheckLiveCallBack;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil;
/**
* Created by cxf on 2017/9/29.
@@ -111,8 +107,7 @@ public class LiveRoomCheckLivePresenter {
@Override
public void onError(String error) {
Log.e("直播间异常", "onError: " + error);
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
Bus.get().post(new LiveErrorEvent());
ToastUtil.show(error);
}
});
@@ -162,8 +157,7 @@ public class LiveRoomCheckLivePresenter {
}
} else {
Log.e("直播间异常", "Error: " + msg);
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
Bus.get().post(new LiveErrorEvent());
ToastUtil.show(msg);
}
}

View File

@@ -2,10 +2,10 @@ package com.yunbao.common.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentLocationListener;
import com.tencent.map.geolocation.TencentLocationManager;
import com.tencent.map.geolocation.TencentLocationRequest;
//import com.tencent.map.geolocation.TencentLocation;
//import com.tencent.map.geolocation.TencentLocationListener;
//import com.tencent.map.geolocation.TencentLocationManager;
//import com.tencent.map.geolocation.TencentLocationRequest;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.bean.TxLocationBean;
@@ -23,12 +23,12 @@ import java.util.List;
public class LocationUtil {
private static final String TAG = "定位";
private static LocationUtil sInstance;
private TencentLocationManager mLocationManager;
// private TencentLocationManager mLocationManager;
private boolean mLocationStarted;
private boolean mNeedPostLocationEvent;//是否需要发送定位成功事件
private LocationUtil() {
mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
// mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
}
public static LocationUtil getInstance() {
@@ -42,26 +42,26 @@ public class LocationUtil {
return sInstance;
}
private TencentLocationListener mLocationListener = new TencentLocationListener() {
@Override
public void onLocationChanged(TencentLocation location, int code, String reason) {
if (code == TencentLocation.ERROR_OK) {
double lng = location.getLongitude();//经度
double lat = location.getLatitude();//纬度
L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
if (mNeedPostLocationEvent) {
EventBus.getDefault().post(new LocationEvent(lng, lat));
}
}
}
@Override
public void onStatusUpdate(String s, int i, String s1) {
}
};
//
// private TencentLocationListener mLocationListener = new TencentLocationListener() {
// @Override
// public void onLocationChanged(TencentLocation location, int code, String reason) {
// if (code == TencentLocation.ERROR_OK) {
// double lng = location.getLongitude();//经度
// double lat = location.getLatitude();//纬度
// L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
// CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
// if (mNeedPostLocationEvent) {
// EventBus.getDefault().post(new LocationEvent(lng, lat));
// }
// }
// }
//
// @Override
// public void onStatusUpdate(String s, int i, String s1) {
//
// }
// };
private HttpCallback mCallback = new HttpCallback() {
@Override
@@ -86,29 +86,29 @@ public class LocationUtil {
//启动定位
public void startLocation() {
if (!mLocationStarted && mLocationManager != null) {
mLocationStarted = true;
L.e(TAG, "开启定位");
TencentLocationRequest request = TencentLocationRequest
.create()
.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
.setInterval(60 * 60 * 1000);//1小时定一次位
//当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
// 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
// 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
mLocationManager.requestLocationUpdates(request, mLocationListener);
}
// if (!mLocationStarted && mLocationManager != null) {
// mLocationStarted = true;
// L.e(TAG, "开启定位");
// TencentLocationRequest request = TencentLocationRequest
// .create()
// .setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
// .setInterval(60 * 60 * 1000);//1小时定一次位
//
// //当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
// // 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
// // 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
// mLocationManager.requestLocationUpdates(request, mLocationListener);
// }
}
//停止定位
public void stopLocation() {
CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
if (mLocationStarted && mLocationManager != null) {
L.e(TAG, "关闭定位");
mLocationManager.removeUpdates(mLocationListener);
mLocationStarted = false;
}
// CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
// if (mLocationStarted && mLocationManager != null) {
// L.e(TAG, "关闭定位");
// mLocationManager.removeUpdates(mLocationListener);
// mLocationStarted = false;
// }
}
public void setNeedPostLocationEvent(boolean needPostLocationEvent) {

View File

@@ -25,6 +25,8 @@ import com.lzy.okserver.OkUpload;
import com.lzy.okserver.upload.UploadListener;
import com.lzy.okserver.upload.UploadTask;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.manager.IMLoginManager;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -157,7 +159,13 @@ public class LogUtil {
public static void shareFile(Context context) {
try {
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()) {
IMLoginModel bean = IMLoginManager.get(context).getUserInfo();
boolean isAnchor=false;
if(bean!=null){
isAnchor=bean.anchorUserType();
}
//有debug文件或主播才允许
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()&&!isAnchor) {
return;
}
} catch (Exception e) {
@@ -258,8 +266,7 @@ public class LogUtil {
.connectTimeout(3, TimeUnit.SECONDS)
.build();
Request request = new Request.Builder()
//.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
.url("https://tools.yutou233.cn/public/file/request.do")//临时上报地址,可接受文件
.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
.post(requestBody)
.build();
client.newCall(request)

View File

@@ -23,6 +23,9 @@ public class NobleUtil {
return -1;
}
public static String nobleIdToStringName(int id){
if(!WordUtil.isNewZh()){
return nobleIdToStringNameForEn(id);
}
switch (id){
case 1:return "男爵";
case 2:return "子爵";
@@ -34,6 +37,18 @@ public class NobleUtil {
}
return "未开通";
}
public static String nobleIdToStringNameForEn(int id){
switch (id){
case 1:return "baron";
case 2:return "viscount";
case 3:return "marquis";
case 4:return "duke";
case 5:return "king";
case 6:return "emperor";
case 7:return "SuperEmperor";
}
return "Not Opened";
}
public static int getNobleBackgroundId(int id){
switch (id){
case 1:return R.mipmap.img_aristocrat_nanjue;

View File

@@ -0,0 +1,262 @@
package com.yunbao.common.utils;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
* 插件加载器
*/
public class PluginManager {
private static PluginManager manager;
private static final String TAG = "插件管理器";
private String anchorPluginDownloadUrl = "https://downs.yaoulive.com/pluginsForAnchor-release.apk";
private PluginManager() {
}
public static PluginManager getInstance() {
if (manager == null) {
manager = new PluginManager();
}
return manager;
}
/**
* 设置主播插件下载地址
*/
public void setAnchorPluginDownloadUrl(String anchorPluginDownloadUrl) {
this.anchorPluginDownloadUrl = anchorPluginDownloadUrl;
}
public boolean isDownloadApk() {
if(!CommonAppConfig.IS_PLUGIN_MODEL){
return true;
}
return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk").exists();
}
/**
* 加载主播插件
*/
public void loadAnchorPlugin(DialogInterface.OnDismissListener dismissListener) {
if(!CommonAppConfig.IS_PLUGIN_MODEL){
dismissListener.onDismiss(null);
return;
}
new Thread(() -> {
try {
if (Arrays.asList(CommonAppContext.sInstance.getAssets().list("")).contains("anchorPlugin.apk")) {
copyAssetsFile(CommonAppContext.sInstance, "anchorPlugin.apk", "anchorPlugin.apk", CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download");
Log.d(TAG, "解压assets下的文件");
}
} catch (IOException e) {
e.printStackTrace();
}
File sdk = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk");
if (!sdk.exists()) {
if (StringUtil.isEmpty(anchorPluginDownloadUrl)) {
Log.e(TAG, "主播下载地址为空");
return;
}
downloadAnchorSdk(dismissListener);
return;
}
String outDir = CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin";
loadFaceSo(sdk, outDir);
loadFaceBundle(sdk, outDir);
new Handler(Looper.getMainLooper()).post(() -> {
dismissListener.onDismiss(null);
});
}).start();
}
/**
* 加载美颜so文件
*
* @param plugin 插件apk文件
* @param outDir 解压路径
*/
private void loadFaceSo(File plugin, String outDir) {
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"lib").exists()) {
unzip(plugin.getAbsolutePath(), outDir, ".so");
}
String[] abis = Build.SUPPORTED_ABIS;
String abi = Arrays.asList(abis).contains("arm64-v8a") ? "arm64-v8a" : "armeabi-v7a";
File plugins = new File(outDir + File.separator + "lib" + File.separator + abi);
loadSo(plugins, "libfuai");
loadSo(plugins, "libCNamaSDK");
try {
Field field = Class.forName("com.faceunity.wrapper.faceunity$LoadConfig").getDeclaredField("sLoadedLibrary");
field.setAccessible(true);
field.set(null,true);
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 设置美颜Bundle文件
*
* @param plugin 插件apk文件
* @param outDir 解压路径
*/
private void loadFaceBundle(File plugin, String outDir) {
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"assets").exists()) {
unzip(plugin.getAbsolutePath(), outDir, ".bundle");
}
try {
Object BUNDLE_AI_FACE = Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").get(null);
Object BUNDLE_FACE_BEAUTIFICATION = Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").get(null);
Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_AI_FACE);
Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_FACE_BEAUTIFICATION);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 加载指定so
*
* @param dir so文件路径
* @param file so文件名字
*/
private void loadSo(File dir, String file) {
file += ".so";
if (new File(dir.getAbsolutePath() + File.separator + file).exists()) {
System.load(dir + File.separator + file);
Log.d(TAG, "加载成功 " + dir + File.separator + file);
} else {
Log.e(TAG, "不存在 " + dir + File.separator + file);
}
}
/**
* 下载主播插件包
*/
private void downloadAnchorSdk(DialogInterface.OnDismissListener dismissListener) {
String downloadDir = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download").getAbsolutePath();
new DownloadUtil().download("plugin", downloadDir, "anchorPlugin.apk", anchorPluginDownloadUrl, new DownloadUtil.Callback() {
@Override
public void onSuccess(File file) {
Log.d(TAG, "下载成功 " + file);
loadAnchorPlugin(dismissListener);
}
@Override
public void onProgress(int progress) {
}
@Override
public void onError(Throwable e) {
}
});
}
/**
* 解压zip文件
*
* @param zip zip文件
* @param outDir 解压路径
* @param suffix 过滤
*/
private boolean unzip(String zip, String outDir, String suffix) {
FileOutputStream out;
byte buffer[] = new byte[1024];
try {
ZipInputStream zis = new ZipInputStream(new FileInputStream(zip));
ZipEntry entry = zis.getNextEntry();
while (entry != null) {
String name = entry.getName();
if (entry.isDirectory()) {
File newDir = new File(outDir + entry.getName());
newDir.mkdir();
} else if (name.endsWith(suffix)) {
File outputFile = new File(outDir + File.separator + name);
String outputPath = outputFile.getCanonicalPath();
name = outputPath
.substring(outputPath.lastIndexOf("/") + 1);
outputPath = outputPath.substring(0, outputPath
.lastIndexOf("/"));
File outputDir = new File(outputPath);
outputDir.mkdirs();
outputFile = new File(outputPath, name);
outputFile.createNewFile();
out = new FileOutputStream(outputFile);
int tmp = 0;
while ((tmp = zis.read(buffer)) > 0) {
out.write(buffer, 0, tmp);
}
/* do {
tmp = zis.read(buffer);
if (tmp <= 0) {
break;
} else {
out.write(buffer, 0, tmp);
}
} while (true);*/
out.close();
}
entry = zis.getNextEntry();
}
zis.close();
return true;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
File fileDir = new File(saveFileDir);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
File file = new File(fileDir, fileName);
if (file.exists()) {
return file.getAbsolutePath();
}
try {
InputStream inputStream = context.getAssets().open(assetsPath);
FileOutputStream fos = new FileOutputStream(file);
BufferedInputStream bis = new BufferedInputStream(inputStream);
BufferedOutputStream bos = new BufferedOutputStream(fos);
byte[] byteArray = new byte[1024];
int bytes = bis.read(byteArray);
while (bytes > 0) {
bos.write(byteArray, 0, bytes);
bos.flush();
bytes = bis.read(byteArray);
}
bos.close();
fos.close();
return file.getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}

View File

@@ -10,6 +10,7 @@ import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.manager.IMLoginManager;
import java.util.Locale;
@@ -34,10 +35,16 @@ public class RouteUtil {
public static final String PATH_MAIN = "/main/MainActivity";
public static final String PATH_ENTRY = "/main/EntryActivity";
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
public static final String PATH_GIFT_WALL = "/live/GiftWallActivity";
public static final String PATH_SETTING = "/main/SettingActivity";
public static final String PATH_FANSACTIVITY = "/main/FansActivity";
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
public static final String PATH_LOGIN = "/main/LoginActivity";
public static final String PATH_CS = "/main/CustomerServiceWebViewActivity";
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
public static void forwardFansActivity(String uid) {
ARouter.getInstance().build(PATH_FANSACTIVITY)
@@ -79,6 +86,7 @@ public class RouteUtil {
.withBoolean("forwardEntry", true)
.navigation();
}
/**
* 只回到登录页,不提示东西
*/
@@ -187,6 +195,7 @@ public class RouteUtil {
ARouter.getInstance().build(PATH_EDITPROFILE)
.navigation();
}
/**
* 修改个人资料
*/
@@ -225,6 +234,16 @@ public class RouteUtil {
postcard.navigation();
}
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
ARouter.getInstance().build(PATH_GIFT_WALL)
.withString(Constants.LIVE_UID, mLiveUid)
.withString(Constants.STREAM, mStream)
.withString("mAnchorName", mAnchorName)
.withString("mAvatarUrl", mAvatarUrl)
.withInt("isAttention", isAttention)
.withBoolean("isLive",isLive)
.navigation();
}
/**
* 举报个人
@@ -251,4 +270,49 @@ public class RouteUtil {
ARouter.getInstance().build(PATH_FACEBOOKACTIVITY)
.navigation();
}
/**
* 客服页面
*/
public static void forwardCustomerService(String url) {
ARouter.getInstance().build(PATH_CS)
.withString(Constants.URL, url)
.navigation();
}
/**
* 红包记录列表
*/
public static void forwardRedPacketList() {
ARouter.getInstance().build(PATH_RED_PACKET_LIST)
.navigation();
}
/**
* 红包详情
*/
public static void forwardRedPacketInfo(RedPacketListBean bean) {
ARouter.getInstance().build(PATH_RED_PACKET_INFO)
.withSerializable("bean", bean)
.navigation();
}
/**
* 红包发放情况
*
* @param id 发放者uid
*/
public static void forwardRedPacketUser(int id) {
ARouter.getInstance().build(PATH_RED_PACKET_USER)
.withInt("id", id)
.navigation();
}
/**
* 系统头像选择
*/
public static void forwardUserAvatarSelect(){
ARouter.getInstance().build(PATH_SELECT_AVATAR)
.navigation();
}
}

View File

@@ -6,6 +6,7 @@ package com.yunbao.common.utils;
public class TimeUtils {
/**
* 毫秒转秒
*
* @param duration 毫秒数
* @return
*/
@@ -17,4 +18,53 @@ public class TimeUtils {
toSecond = ((minute * 60) + second);
return toSecond;
}
//根据秒数转化为时分秒 00:00:00
public static String getTime(int second) {
if (second < 10) {
return "" + second;
}
if (second < 60) {
return "" + second;
}
if (second < 3600) {
int minute = second / 60;
second = second - minute * 60;
if (minute < 10) {
if (second < 10) {
return "0" + minute + ":0" + second;
}
return "0" + minute + ":" + second;
}
if (second < 10) {
return minute + ":0" + second;
}
return minute + ":" + second;
}
int hour = second / 3600;
int minute = (second - hour * 3600) / 60;
second = second - hour * 3600 - minute * 60;
if (hour < 10) {
if (minute < 10) {
if (second < 10) {
return "0" + hour + ":0" + minute + ":0" + second;
}
return "0" + hour + ":0" + minute + ":" + second;
}
if (second < 10) {
return "0" + hour + minute + ":0" + second;
}
return "0" + hour + minute + ":" + second;
}
if (minute < 10) {
if (second < 10) {
return hour + ":0" + minute + ":0" + second;
}
return hour + ":0" + minute + ":" + second;
}
if (second < 10) {
return hour + minute + ":0" + second;
}
return hour + minute + ":" + second;
}
}

View File

@@ -3,6 +3,7 @@ package com.yunbao.common.utils;
import android.content.res.Resources;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.manager.IMLoginManager;
import java.util.Locale;
import java.util.regex.Matcher;
@@ -30,6 +31,9 @@ public class WordUtil {
String language = locale.getLanguage();
return language.endsWith("zh");
}
public static boolean isNewZh(){
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
}
/**
* 是否包含特殊字符

View File

@@ -0,0 +1,22 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalModel;
import com.yunbao.common.glide.ImgLoader;
public class AchievementDetailsViewHolder extends RecyclerView.ViewHolder {
private ImageView achievementImg;
public AchievementDetailsViewHolder(@NonNull View itemView) {
super(itemView);
achievementImg = itemView.findViewById(R.id.achievement_img);
}
public void showData(UserMedalModel userMedalModel){
ImgLoader.display(itemView.getContext(), userMedalModel.getDisplaySrc(), achievementImg);
}
}

View File

@@ -0,0 +1,52 @@
package com.yunbao.common.views;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.style.ImageSpan;
import org.jetbrains.annotations.NotNull;
public class CenterImageSpan extends ImageSpan {
public CenterImageSpan(Drawable arg1) {
super(arg1);
}
public int getSize(@NotNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
Drawable d = getDrawable();
Rect rect = d.getBounds();
if (fm != null) {
Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt();
int fontHeight = fmPaint.bottom - fmPaint.top;
int drHeight = rect.bottom - rect.top;
int top = drHeight / 2 - fontHeight / 4;
int bottom = drHeight / 2 + fontHeight / 4;
fm.ascent = -bottom;
fm.top = -bottom;
fm.bottom = top;
fm.descent = top;
}
return rect.right;
}
@Override
public void draw(@NotNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, @NotNull Paint paint) {
Drawable b = getDrawable();
canvas.save();
int transY = 0;
transY = ((bottom - top) - b.getBounds().bottom) / 2 + top;
canvas.translate(x, transY);
b.draw(canvas);
canvas.restore();
}
}

View File

@@ -80,10 +80,13 @@ public class DayWishItemViewHolder extends RecyclerView.ViewHolder {
@Override
public void onViewClicks() {
int number = model.wishProgress();
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
if (number>1){
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
}
}
}
});
} else {

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.event.GiftWallItemEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle, giftNumber;
public GiftAlreadyWallViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
giftTitle = itemView.findViewById(R.id.gift_title);
giftNumber = itemView.findViewById(R.id.gift_number);
}
public void showData(GiftWallModel giftWallModel,boolean sbWy) {
giftTitle.setText(giftWallModel.getGiftname());
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(true));
}
});
}
}

View File

@@ -0,0 +1,34 @@
package com.yunbao.common.views;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftNumber extends RecyclerView.ViewHolder {
private TextView customQuantity;
public GiftNumber(@NonNull View itemView) {
super(itemView);
customQuantity = itemView.findViewById(R.id.custom_quantity);
}
public void showData(GiftQuantityModel quantityModel) {
customQuantity.setText(quantityModel.getGiftQuantity());
customQuantity.setTextColor(Color.parseColor(quantityModel.getFontColour()));
ViewClicksAntiShake.clicksAntiShake(customQuantity, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftNumberEvent().setmCount(quantityModel.getGiftQuantity()));
}
});
}
}

View File

@@ -0,0 +1,94 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftNumberAdapter;
import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.manager.GiftQuantityManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
public class GiftNumberPopup extends BottomPopupView {
public GiftNumberPopup(@NonNull Context context) {
super(context);
}
// 返回自定义弹窗的布局
@Override
protected int getImplLayoutId() {
return R.layout.view_live_gift_number;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
Bus.getOn(this);
super.onCreate();
RecyclerView giftList = findViewById(R.id.gift_list);
giftList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
GiftNumberAdapter giftNumberAdapter = new GiftNumberAdapter(new GiftQuantityManager(getContext()).getGiftQuantity());
giftList.setAdapter(giftNumberAdapter);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_can), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dismiss();
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.custom_quantity), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dismiss();
new XPopup.Builder(getContext())
.asCustom(new InputCustomPopup(getContext(),
getContext().getString(R.string.the_title_financier3),
R.string.custom_quantity, true)
.setMaxValue(4)
.setListener(new InputCustomPopup.InputCustomListener() {
@Override
public void onConfirm(String text) {
if (!TextUtils.isEmpty(text)) {
int number = Integer.parseInt(text);
if (1 <= number && number <= 9999) {
Bus.get().post(new GiftNumberEvent().setmCount(text));
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
}
})).show();
}
});
}
@Override
protected void onDismiss() {
super.onDismiss();
Bus.getOff(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGiftNumberEvent(GiftNumberEvent event) {
dismiss();
}
}

View File

@@ -0,0 +1,37 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.event.GiftWallItemEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftWithoutWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle;
public GiftWithoutWallViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
giftTitle = itemView.findViewById(R.id.gift_title);
}
public void showData(GiftWallModel giftWallModel) {
giftTitle.setText(giftWallModel.getGiftname());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(false));
}
});
}
}

Some files were not shown because too many files have changed in this diff Show More