private fun getOrderData(){
// Query.Direction.DESCENDING 由高至低排序
db.collection("personalData").orderBy("score",Query.Direction.DESCENDING).limit(3).get()
.addOnSuccessListener {
for (eachData in it) {
Log.v("test__", "${eachData.data}")
}
Toast.makeText(this,"讀取成功",Toast.LENGTH_SHORT).show()
}
.addOnFailureListener {
Toast.makeText(this,"讀取失敗",Toast.LENGTH_SHORT).show()
}
}