coldrainc / toutiao Goto Github PK
View Code? Open in Web Editor NEW云开发头条小程序
云开发头条小程序
我看大佬查找资讯详情的数据库 是用云函数的 where API� 根据字段来查找,但是这样有一个问题,就是返回的结果是一个array,读取的时候有点不方便。
然后我现在就是使用的 .doc() 这个API 根据字段来查找详情数据。
但是我现在用 .doc() 遇到的问题:
1、只能根据数据库自动生成的 _id来进行查找, 不能根据自己创建的索引字段来进行查找。比如我在集合创建来一个 索引字段是 new_id, 然后在云函数调用 .doc('new_id'),就会一直报错查不到。
报错错误:
errMsg: document.get:fail document with _id 10002 does not exist; at document.get api; ; at cloud.callFunction api;
大佬有好的解决方案吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.