所以我有了这个,它将显示出我需要的结果:
if (item.isPrivateToSubOrg == false){
既然添加了它,它将不再起作用:
if (item.isPrivateToSubOrg == false && item.eventStatus == 'Published'){
我使用getJSON拉数据,它看起来像这样:
{
auth_result: true,
is_valid: false,
eventId: "80649f4b-437c-4e96-b79e-e02901f33c17",
orgId: "00000000-0000-0000-0000-000000000000",
subId: "00000000-0000-0000-0000-000000000000",
waiverId: "00000000-0000-0000-0000-000000000000",
waiverIdForThisEvent: "00000000-0000-0000-0000-000000000000",
orgName: "",
subName: "",
eventPIN: "",
eventTitle: "",
eventDescr: "",
eventLocation: "",
startUtc: "2050-01-01T00:00:00",
endUtc: "2050-01-01T00:00:00",
startLocal: "2050-01-01T00:00:00",
endLocal: "2050-01-01T00:00:00",
attendanceGoal: 0,
attendanceActual: 0,
eventBudget: 0,
eventCost: 0,
categoryId: "00000000-0000-0000-0000-000000000000",
categoryDescr: "",
questionCount: 0,
last_error_msg: "",
attendeeList: [ ],
eventStatusId: "33333333-3333-3333-3333-333333333333",
eventStatus: "Published",
canCheckIn: true,
isPrivateToSubOrg: false,
allowsGuestCheckIn: false,
enteredUserId: "00000000-0000-0000-0000-000000000000",
hasImage: false,
twitterID: "",
orgScannerType: "",
rsvpLink: "",
contactPerson: "",
contactEmail: ""
}
关于我在做什么错的想法?谢谢!
不知道为什么它会向您返回“ false”,但对我来说似乎正确并返回“ true”。参见jsfiddle http://jsfiddle.net/ZhM3H/
表达方式:
(item.isPrivateToSubOrg == false && item.eventStatus == 'Published')
当我在样本数据上尝试时返回true。也许故障在其他地方?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句