Commit 1dcc0e20 authored by 邱旭's avatar 邱旭

1

parent b98fa211
......@@ -60,6 +60,9 @@ export default class Utils {
* @returns {Object} obj - 拷贝完成的对象
*/
public static deepClone(src, dst = undefined) {
if(src){
return src;
}
let _obj = dst || (src instanceof Array ? [] : {});
for(let key in src) {
let prop = src[key];
......
......@@ -214,6 +214,7 @@ class ScratchItem extends eui.ItemRenderer {
dataChanged() {
this.img.mask = this.mask;
let s = this.data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
this.img.source = this.data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
this.img.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.scratchGetShareCode((success, res) => {
......
{
"success": true,
"code": null,
"desc": null,
"timestamp": 1566199822308,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572318933388,
"data": {
"scratchCardTaskId": 1222,
"scratchCardTaskId": 1,
"taskStatus": 1,
"prizeImage": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg",
"currentTime": 1570673808000,
"endTime": 1570673810000,
"completePercent": "90.50",
"remainPercent": "9.50",
"helpedCount": 4,
"prizeImage": "//yun.dui88.com/images/201910/e6pmpk2pne.png",
"currentTime": 1572318933366,
"endTime": 1572358710000,
"completePercent": "91.0",
"remainPercent": "9.0",
"totalNeedCount": 3,
"helpedCount": 1,
"avatarList": [
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg",
""
null
]
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment