mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
[fix] GiftSend Closes #35
This commit is contained in:
parent
c1481438c9
commit
9f0353244f
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,6 +1,18 @@
|
||||
# Release Notes
|
||||
# 本项目Log
|
||||
|
||||
## v0.4.0.200428 alpha (2020-04-28)
|
||||
|
||||
### Added
|
||||
-
|
||||
|
||||
### Changed
|
||||
-
|
||||
|
||||
### Fixed
|
||||
- 修复赠送礼物逻辑
|
||||
-
|
||||
|
||||
## v0.4.0.200426 alpha (2020-04-26)
|
||||
|
||||
### Added
|
||||
|
||||
@ -186,14 +186,21 @@ class GiftSend
|
||||
}
|
||||
Log::info('勋章列表获取成功!');
|
||||
if (isset($data['data']['fansMedalList'])) {
|
||||
$fans_medals = [];
|
||||
foreach ($data['data']['fansMedalList'] as $vo) {
|
||||
if (!isset($vo['roomid'])) continue;
|
||||
if (in_array($vo['roomid'], self::$room_list) && ($vo['day_limit'] - $vo['today_feed'])) {
|
||||
$fans_medals[(string)$vo['roomid']] = $vo;
|
||||
}
|
||||
// 基于配置
|
||||
foreach (self::$room_list as $room_id ){
|
||||
// 配置是否存在获取
|
||||
if (!array_key_exists((string)$room_id ,$fans_medals)){
|
||||
continue;
|
||||
}
|
||||
$vo = $fans_medals[(string)$room_id];
|
||||
// 是否还需要投喂
|
||||
if ($vo['day_limit'] - $vo['today_feed']){
|
||||
self::$medal_list[(string)$vo['roomid']] = ($vo['day_limit'] - $vo['today_feed']);
|
||||
// $data = [
|
||||
// $vo['roomid'] => ($vo['day_limit'] - $vo['today_feed'])
|
||||
// ];
|
||||
// array_push(self::$medal_list, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,6 @@ class Match
|
||||
}
|
||||
$status = self::getSignTask($room['type_id'], $room['room_id'], $room['short_room_id']);
|
||||
if ($status) {
|
||||
echo "aaa" . PHP_EOL;
|
||||
self::$room_infos[$title]['sign'] = true;
|
||||
} else {
|
||||
self::$room_infos[$title]['sign'] = false;
|
||||
@ -99,7 +98,6 @@ class Match
|
||||
}
|
||||
$status = self::getShareTask($room['type_id'], $room['room_id'], $room['short_room_id']);
|
||||
if ($status) {
|
||||
echo "aaa" . PHP_EOL;
|
||||
self::$room_infos[$title]['share'] = true;
|
||||
} else {
|
||||
self::$room_infos[$title]['share'] = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user