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

1

parent b98fa211
...@@ -60,6 +60,9 @@ export default class Utils { ...@@ -60,6 +60,9 @@ export default class Utils {
* @returns {Object} obj - 拷贝完成的对象 * @returns {Object} obj - 拷贝完成的对象
*/ */
public static deepClone(src, dst = undefined) { public static deepClone(src, dst = undefined) {
if(src){
return src;
}
let _obj = dst || (src instanceof Array ? [] : {}); let _obj = dst || (src instanceof Array ? [] : {});
for(let key in src) { for(let key in src) {
let prop = src[key]; let prop = src[key];
......
...@@ -214,6 +214,7 @@ class ScratchItem extends eui.ItemRenderer { ...@@ -214,6 +214,7 @@ class ScratchItem extends eui.ItemRenderer {
dataChanged() { dataChanged() {
this.img.mask = this.mask; 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.source = this.data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
this.img.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this.img.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.scratchGetShareCode((success, res) => { NetManager.ins.scratchGetShareCode((success, res) => {
......
{ {
"success": true, "success": true,
"code": null, "code": "0000000000",
"desc": null, "desc": "OK",
"timestamp": 1566199822308, "timestamp": 1572318933388,
"data": { "data": {
"scratchCardTaskId": 1222, "scratchCardTaskId": 1,
"taskStatus": 1, "taskStatus": 1,
"prizeImage": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg", "prizeImage": "//yun.dui88.com/images/201910/e6pmpk2pne.png",
"currentTime": 1570673808000, "currentTime": 1572318933366,
"endTime": 1570673810000, "endTime": 1572358710000,
"completePercent": "90.50", "completePercent": "91.0",
"remainPercent": "9.50", "remainPercent": "9.0",
"helpedCount": 4, "totalNeedCount": 3,
"helpedCount": 1,
"avatarList": [ "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