您好, 我在Firebase中的查询中遇到此问题。 orderbykey()和orderbychild()不起作用。我如何查询这个?
欢呼,先谢谢。代码段:
memorySlot1 = "one"
memorySlot2 = "two"
AssignSlot = function (memorySlot){
return(
{
Slot : memorySlot,
Content : (
function(){
return (
window[
memorySlot
]
)
}
)
}
)
}
ChangeSlotContent = function (obj,newContent){
window[obj.Slot] = newContent
}
console.log("______________")
var1 = AssignSlot("memorySlot1")
var2 = AssignSlot("memorySlot2")
var3 = AssignSlot("memorySlot2")
console.log(var1.Content() +" / "+ var2.Content() +" / "+ var3.Content()) // one / two / two
console.log("______________")
ChangeSlotContent(var2,"twotwo")
console.log(var1.Content() +" / "+ var2.Content() +" / "+ var3.Content()) // one / twotwo / twotwo
console.log("______________")
var1 = AssignSlot("memorySlot2")
console.log(var1.Content() +" / "+ var2.Content() +" / "+ var3.Content()) // twotwo / twotwo / twotwo