草庐IT

javascript - Prismic - 如何在不暴露访问 token 的情况下进行 API 调用

我正在构建一个vuejs网络应用程序,我想分别调用我的prismic存储库,但我不知道如何在不暴露我的访问token的情况下执行此操作。我正在使用所示的其余api方法here.有任何想法吗?http请求语法如下。我想在不暴露access_token的情况下在我的vue组件中执行此操作。http://your-repository-name.prismic.io/api/v2/documents/search?ref=Your_Ref&access_token=Your_Token在我的API/安全设置中,我还获得了客户端ID和客户端密码。我也不知道如何使用这些。谢谢

angularjs - 使用 uid 而不是 id prismic io 获取 URL

在将prismicio与angular集成时,我试图使用uid而不是id获取我的URL,但我收到此错误:TypeError:Cannotreadproperty'slug'ofundefinedatcontrollers.js:83atwrappedCallback(angular.js:11682)atwrappedCallback(angular.js:11682)atangular.js:11768atScope.$eval(angular.js:12811)atScope.$digest(angular.js:12623)atScope.$apply(angular.js:12