fmode-parse-test.js 907 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const { ParseObject } = require("./fmode-parse");
  2. async function TestAdd()
  3. {
  4. // let Face=new ParseObject("MagicMirror")
  5. // let list =await Face.findAll()
  6. // console.log(list)
  7. let YCX = new ParseObject("MagicMirror")
  8. YCX.set(
  9. {
  10. face:"晏晨旭",
  11. image:"https://file-cloud.fmode.cn/E4KpGvTEto/20230822/3mkf41033623275.png",
  12. features:"脸型:瓜子脸,眉形:柳叶眉",
  13. }
  14. )
  15. YCX = await YCX.save();
  16. // console.log(YCX);
  17. console.log(YCX.toJson());
  18. }
  19. async function TestUpdate()
  20. {
  21. let YCX= new ParseObject("MagicMirror")
  22. YCX = await YCX.get("4oWCKHL7mE")
  23. console.log(YCX)
  24. YCX.set(
  25. {
  26. face:"罗尚沅",
  27. }
  28. )
  29. }
  30. async function TestFind(){
  31. // 查询测试
  32. let YCX = new ParseObject("MagicMirror")
  33. let list = await YCX.find()
  34. console.log(list)
  35. }
  36. TestUpdate()