|
|
@@ -16,7 +16,7 @@ export default class RedBagCodeItem extends cc.Component {
|
|
|
@property({ displayName: 'lbl毛币', type: cc.Label })
|
|
|
private lbl_rmb: cc.Label = null;
|
|
|
|
|
|
-
|
|
|
+ private item_data: TCashList = null;
|
|
|
/**
|
|
|
* 初始化数据
|
|
|
*/
|
|
|
@@ -28,6 +28,7 @@ export default class RedBagCodeItem extends cc.Component {
|
|
|
* 初始化样式
|
|
|
*/
|
|
|
private initItem(item_data: TCashList) {
|
|
|
+ this.item_data = item_data;
|
|
|
this.lbl_rmb.string = item_data.amount + '元';
|
|
|
this.lbl_time.string = mk.time.getNowDayString(item_data.applyTime * 1000);
|
|
|
this.lbl_code.string = item_data.withdrawalCode ? '红包码:' + item_data.withdrawalCode : '';
|
|
|
@@ -37,7 +38,8 @@ export default class RedBagCodeItem extends cc.Component {
|
|
|
* 复制按钮
|
|
|
*/
|
|
|
private clickCopy() {
|
|
|
- JsbSystem.setClipboard('AABBAA')
|
|
|
+ JsbSystem.setClipboard(this.item_data.withdrawalCode)
|
|
|
+ mk.tip.pop('复制成功')
|
|
|
}
|
|
|
// update (dt) {}
|
|
|
}
|