From fb5028829c11ac80e46dc9eb4e641a278ed9cb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Fri, 22 Oct 2021 11:33:52 +0800 Subject: [PATCH] docs: uni-cloud-router --- docs/uniCloud/uni-cloud-router.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/uniCloud/uni-cloud-router.md b/docs/uniCloud/uni-cloud-router.md index 77b1f3c48..96d0ea902 100644 --- a/docs/uniCloud/uni-cloud-router.md +++ b/docs/uniCloud/uni-cloud-router.md @@ -115,13 +115,16 @@ module.exports = class HelloService extends Service { **5.在页面里调用云函数** -在页面中 URL 化访问 hello(controller)下 sayHello: +在页面中通过callFunction访问 hello(controller)下 sayHello: ```js sayHello() { uniCloud.callFunction({ - name: 'hello/sayHello', - data: {} + name: 'hello-uni-cloud-router', + data: { + action: 'hello/sayHello', + data: {} + } }) .then(res => { this.title = res.data @@ -369,7 +372,7 @@ module.exports = (options) => { } ``` -### 客户端使用云函数 +### 客户端使用云函数@use-in-client #### 发送请求 -- GitLab