From 971addcd102f917ce05994785595379e09dd81f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Wed, 3 Nov 2021 16:29:26 +0800 Subject: [PATCH] docs: clientDB variable --- docs/uniCloud/clientdb.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/uniCloud/clientdb.md b/docs/uniCloud/clientdb.md index bf8551d40..7d1f0e61c 100644 --- a/docs/uniCloud/clientdb.md +++ b/docs/uniCloud/clientdb.md @@ -130,6 +130,16 @@ db.collection('list') `clientDB`目前内置了3个变量可以供客户端使用,客户端并非直接获得这三个变量的值,而是需要传递给云端,云数据库在数据入库时会把变量替换为实际值。 +**HBuilderX 3.1.0及以上版本推荐写法** + +|参数名 |说明 | +|:-: |:-: | +|db.getCloudEnv('$cloudEnv_uid') |用户uid,依赖uni-id| +|db.getCloudEnv('$cloudEnv_now') |服务器时间戳 | +|db.getCloudEnv('$cloudEnv_clientIP') |当前客户端IP | + +**HBuilderX 3.1.0之前版本写法** + |参数名 |说明 | |:-: |:-: | |db.env.uid |用户uid,依赖uni-id| -- GitLab