Commit 05fceded authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 4e2a0cc3
......@@ -137,10 +137,10 @@
},
"_lrot": {
"__type__": "cc.Quat",
"x": -0.24999999999999997,
"y": -0.24999999999999997,
"z": -0.06698729810778065,
"w": 0.9330127018922194
"x": -0.25881904510252074,
"y": -3.537267732114641e-18,
"z": 1.3201262896225777e-17,
"w": 0.9659258262890683
},
"_lscale": {
"__type__": "cc.Vec3",
......@@ -153,7 +153,7 @@
"_euler": {
"__type__": "cc.Vec3",
"x": -30,
"y": -30,
"y": 0,
"z": 1.5661174545922727e-15
},
"_id": "c0y6F5f+pAvI805TdmxIjx"
......@@ -1482,7 +1482,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 374.99999999999994,
"x": 375,
"y": 812,
"z": 0
},
......@@ -1698,7 +1698,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -117.49999999999994,
"x": -117.5,
"y": -110,
"z": 0
},
......@@ -1982,7 +1982,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 154.00000000000006,
"x": 154,
"y": -110,
"z": 0
},
......@@ -2397,7 +2397,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 314.00000000000006,
"x": 314,
"y": -109,
"z": 0
},
......@@ -3391,7 +3391,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -333.99999999999994,
"x": -334,
"y": -109,
"z": 0
},
......@@ -3571,7 +3571,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 0
},
"_anchorPoint": {
......@@ -3645,7 +3645,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 292.00000000000006,
"x": 292,
"y": -404,
"z": 0
},
......@@ -6780,7 +6780,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 1624
},
"_anchorPoint": {
......@@ -7064,7 +7064,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 173.00000000000006,
"x": 173,
"y": -481.5,
"z": 0
},
......@@ -7194,7 +7194,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 1624
},
"_anchorPoint": {
......@@ -7246,7 +7246,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 1624
},
"_anchorPoint": {
......
......@@ -2,6 +2,8 @@ import { _decorator, Node, Label, Button, Sprite, SpriteFrame } from 'cc';
import { ScrollListItem } from '../../ScrollList/ScrollListItem';
import TaskCenter from '../../TaskCenter';
import { _asyncThrottle, strFormat } from '../../Utils/Utils';
import store from "../../../store/store";
import { getWebData, WebNetName } from "../../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -54,6 +56,12 @@ export class TaskItem extends ScrollListItem {
const btnSp = this.btn.getComponent(Sprite);
const {timeStamp} = getWebData(WebNetName.index) || {};
const {activityEndTime} = store.homeInfo;
// 判断是不是同一天
const isSameDay = new Date(timeStamp).toDateString() === new Date(activityEndTime).toDateString();
switch (+taskStatus) {
case 0: {
if (code?.startsWith("it")) {
......@@ -72,10 +80,10 @@ export class TaskItem extends ScrollListItem {
break;
}
case 2: {
if (intervalType == 1) {
btnSp.spriteFrame = this.tomorrowSf;
} else {
if (isSameDay && intervalType != 1) {
btnSp.spriteFrame = this.doneSf;
} else {
btnSp.spriteFrame = this.tomorrowSf;
}
break;
}
......
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