From 5cedc5757a58b2831b97a2b48346ce21397db04a Mon Sep 17 00:00:00 2001 From: linju-json Date: Wed, 12 May 2021 21:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E6=A1=A3=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E7=9F=AD=E4=BF=A1=E6=A8=A1=E6=9D=BFid=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- README.md | 10 ++++++++-- pages.json | 18 ------------------ uniCloud-aliyun/cloudfunctions/test/index.js | 8 -------- .../cloudfunctions/user-center/index.js | 3 ++- .../uniCloud/cloudfunctions/test2/index.js | 8 -------- 6 files changed, 13 insertions(+), 38 deletions(-) delete mode 100644 uniCloud-aliyun/cloudfunctions/test/index.js delete mode 100644 uni_modules/uni-feedback/uniCloud/cloudfunctions/test2/index.js diff --git a/.gitignore b/.gitignore index b0aefc00..9bf8055e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,7 @@ unpackage/ .hbuilderx node_modules .DS_Store +uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json pages/grid/banner.json -pages/list/list.json \ No newline at end of file +pages/list/list.json +manifest.json \ No newline at end of file diff --git a/README.md b/README.md index bce1f44c..abc55d55 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,15 @@ img{ - 生效策略:未列举到的或设备环境不支持的登录方式将被隐藏。 - 配置: - + 服务端:uni-starter服务端使用[uni-config-center](https://ext.dcloud.net.cn/plugin?id=4425)统一管理这些配置,详情下文[目录结构](#id=catalogue) + + 服务端:uni-starter服务端使用[uni-config-center](https://ext.dcloud.net.cn/plugin?id=4425)统一管理这些配置,文件路径`/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json`详情下文[目录结构](#id=catalogue) [配置说明](https://uniapp.dcloud.io/uniCloud/uni-id?id=configjson%e7%9a%84%e8%af%b4%e6%98%8e) + 应用模块:`manifest.json` App模块配置 --> OAuth(登录鉴权)--> 勾选并配置你所需要的模块 - +- 短信登陆: + + 使用本功能需要在[DCloud开发者中心](https://dev.dcloud.net.cn/uniSms)开通并充值 + + 教程参考[短信服务开通指南](https://ask.dcloud.net.cn/article/37534) + + 修改短信注册/登陆发生验证码的模板id,在文件`/uniCloud-aliyun/cloudfunctions/user-center/index.js` 搜索 `const templateId = '11753'` 替换为自己申请的模板id +- 一键登录: + + [开通配置](https://dev.dcloud.net.cn/uniLogin) + + [使用指南](https://uniapp.dcloud.io/univerify) #### 3.h5版在页面顶部引导用户`点击下载App` - 把h5端用户引流到APP端是一个非常常用的功能,相对于h5,APP端有更高的用户留存和更好的产品体验。 - 这同时也是一个演示开发者如何在h5端做全局悬浮块的例子。你可以在`/common/openApp.js`中修改他的样式等代码等,注意他只支持普通js语法。 diff --git a/pages.json b/pages.json index 80581b85..4d362dff 100644 --- a/pages.json +++ b/pages.json @@ -81,24 +81,6 @@ } }, - // { - // "path": "pages/ucenter/agree-list/agree-list", - // "style": { - // "navigationBarTitleText": "政策与协议" - // } - - // }, { - // "path": "pages/ucenter/agree-list/privacy/privacy", - // "style": { - // "navigationBarTitleText": "隐私政策" - // } - - // }, { - // "path": "pages/ucenter/agree-list/service/service", - // "style": { - // "navigationBarTitleText": "服务协议" - // } - // }, { "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", "style": { diff --git a/uniCloud-aliyun/cloudfunctions/test/index.js b/uniCloud-aliyun/cloudfunctions/test/index.js deleted file mode 100644 index a31cb5c5..00000000 --- a/uniCloud-aliyun/cloudfunctions/test/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - //event为客户端上传的参数 - - //返回数据给客户端 - return uniCloud.database().collection('opendb-news-articles').field({'_id':false}).get() - -}; diff --git a/uniCloud-aliyun/cloudfunctions/user-center/index.js b/uniCloud-aliyun/cloudfunctions/user-center/index.js index dab3f0ff..9e959310 100644 --- a/uniCloud-aliyun/cloudfunctions/user-center/index.js +++ b/uniCloud-aliyun/cloudfunctions/user-center/index.js @@ -200,7 +200,8 @@ exports.main = async (event, context) => { res = await uniID.logout(event.uniIdToken) break; case 'sendSmsCode': - + + // 测试期间短信统一用 123456 正式项目删除即可 return uniID.setVerifyCode({ mobile: params.mobile, code:'123456', diff --git a/uni_modules/uni-feedback/uniCloud/cloudfunctions/test2/index.js b/uni_modules/uni-feedback/uniCloud/cloudfunctions/test2/index.js deleted file mode 100644 index aad1aeaa..00000000 --- a/uni_modules/uni-feedback/uniCloud/cloudfunctions/test2/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - //event为客户端上传的参数 - console.log('event : ', event) - - //返回数据给客户端 - return event -}; -- GitLab