Commit f65120cd authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 369f0122
...@@ -28,6 +28,7 @@ export class TaskItem extends ScrollListItem { ...@@ -28,6 +28,7 @@ export class TaskItem extends ScrollListItem {
@property({type: SpriteFrame, displayName: "明日再来"}) tomorrowSf: SpriteFrame = null; @property({type: SpriteFrame, displayName: "明日再来"}) tomorrowSf: SpriteFrame = null;
@property({type: SpriteFrame, displayName: "领取奖励"}) receiveSf: SpriteFrame = null; @property({type: SpriteFrame, displayName: "领取奖励"}) receiveSf: SpriteFrame = null;
@property({type: SpriteFrame, displayName: "去报名"}) signUpSf: SpriteFrame = null; @property({type: SpriteFrame, displayName: "去报名"}) signUpSf: SpriteFrame = null;
@property({type: SpriteFrame, displayName: "暂未完成"}) noJumpSf: SpriteFrame = null;
start() { start() {
...@@ -73,10 +74,16 @@ export class TaskItem extends ScrollListItem { ...@@ -73,10 +74,16 @@ export class TaskItem extends ScrollListItem {
// 判断是不是同一天 // 判断是不是同一天
const isSameDay = new Date(timeStamp).toDateString() === new Date(activityEndTime).toDateString(); const isSameDay = new Date(timeStamp).toDateString() === new Date(activityEndTime).toDateString();
const haveUrl = (jumpUrl && jumpUrl != '/'); const haveJump = (jumpUrl && jumpUrl != '/');
switch (+taskStatus) { switch (+taskStatus) {
case 0: { case 0: {
if(!haveJump){
btnSp.spriteFrame = this.noJumpSf;
break;
}
if (code?.startsWith("it")) { if (code?.startsWith("it")) {
btnSp.spriteFrame = this.inviteSf; btnSp.spriteFrame = this.inviteSf;
} else if (code?.startsWith("tt") && (extra == 0 || !!!extra)) { } else if (code?.startsWith("tt") && (extra == 0 || !!!extra)) {
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "32eb639f-01fe-4e16-a305-541cc8a853a1",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "32eb639f-01fe-4e16-a305-541cc8a853a1@6c48a",
"displayName": "暂未完成",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "32eb639f-01fe-4e16-a305-541cc8a853a1",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "32eb639f-01fe-4e16-a305-541cc8a853a1@f9941",
"displayName": "暂未完成",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 149,
"height": 55,
"rawWidth": 149,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-74.5,
-27.5,
0,
74.5,
-27.5,
0,
-74.5,
27.5,
0,
74.5,
27.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
55,
149,
55,
0,
0,
149,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-74.5,
-27.5,
0
],
"maxPos": [
74.5,
27.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "32eb639f-01fe-4e16-a305-541cc8a853a1@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "32eb639f-01fe-4e16-a305-541cc8a853a1@6c48a"
}
}
...@@ -798,6 +798,10 @@ ...@@ -798,6 +798,10 @@
"__uuid__": "d085b05f-9984-48aa-9308-9f4d3700a230@f9941", "__uuid__": "d085b05f-9984-48aa-9308-9f4d3700a230@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"noJumpSf": {
"__uuid__": "32eb639f-01fe-4e16-a305-541cc8a853a1@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_id": "" "_id": ""
}, },
{ {
......
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