Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/V0.0.21'
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeHero committed May 31, 2017
2 parents 5d2a08b + 4d1d29f commit 6910171
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
## 更新日志
`新增` 隐藏设置支持屏蔽简介上方活动广告
`修复` 小电视功能不正常的问题
`修复` 礼物包裹功能不正常的问题
`修复` 弹幕增强开启后颜文字以及弹幕热词不正常的问题

## TODO List
Expand Down
21 changes: 10 additions & 11 deletions src/live/FuncGiftPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,24 @@ class FuncGiftPackage {
}

static openSendPanel(target) {
let giftID = target.attr('class').match(/gift-(\d+)/)[1];
let index = target.parent().index();
let bagID = this.gifts[giftID][index].bagID;
this.giftID = target.attr('class').match(/gift-(\d+)/)[1];
this.index = target.parent().index();

this.sendPanelImage.attr('class', 'gift-img float-left gift-' + this.chooseGiftID);
this.sendPanelInfo.text(`您的包裹中还剩 ${this.currentGift.number} 个可用`);
this.sendPanelCount.val(this.currentGift.number);
this.sendPanelButton.off('click').on('click', () => this.sendGift(giftID, this.sendPanelCount.val(), bagID, index));
this.sendPanelImage.attr('class', 'gift-img float-left gift-' + this.giftID);
this.sendPanelInfo.text(`您的包裹中还剩 ${this.gifts[this.giftID][this.index].number} 个可用`);
this.sendPanelCount.val(this.gifts[this.giftID][this.index].number);
this.sendPanelButton.off('click').on('click', () => this.sendGift(this.giftID, this.sendPanelCount.val(), this.gifts[this.giftID][this.index].bagID, this.index));
this.sendPanel.show();
}
static setNumber(target) {
let number = target.text();
if(number == 'MAX') {
number = this.currentGift.number;
number = this.gifts[this.giftID][this.index].number;
} else if(number.endsWith('%')) {
number = Math.round(this.currentGift.number * Number.parseInt(number) * 0.01);
number = Math.round(this.gifts[this.giftID][this.index].number * Number.parseInt(number) * 0.01);
}
if(number > this.currentGift.number || Number.isNaN(number)) {
number = this.currentGift.number;
if(number > this.gifts[this.giftID][this.index].number || Number.isNaN(number)) {
number = this.gifts[this.giftID][this.index].number;
}
if(number < 1) {
number = 1;
Expand Down
1 change: 1 addition & 0 deletions src/options/updatelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ <h1>更新日志</h1>
<h2>V0.0.21</h2>
<p><code>新增</code> 隐藏设置支持屏蔽简介上方活动广告</p>
<p><code>修复</code> 小电视功能不正常的问题</p>
<p><code>修复</code> 礼物包裹功能不正常的问题</p>
<p><code>修复</code> 弹幕增强开启后颜文字以及弹幕热词不正常的问题</p>
<hr>
<h2>V0.0.20</h2>
Expand Down

0 comments on commit 6910171

Please sign in to comment.