From 08b1f418b3a12174460459ea99a9b5f148bbf775 Mon Sep 17 00:00:00 2001 From: linju <8432241+linjuDcloud@user.noreply.gitee.com> Date: Wed, 7 Apr 2021 16:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BF=AB=E6=8D=B7=E7=99=BB?= =?UTF-8?q?=E9=99=86=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 60 ++- pages.json | 393 +++++++++-------- pages/ucenter/ucenter.nvue | 2 +- .../cloudfunctions/user-center/index.js | 3 - uniCloud-aliyun/cloudfunctions/user/index.js | 188 -------- .../cloudfunctions/user/package-lock.json | 58 --- .../cloudfunctions/user/package.json | 16 - .../cloudfunctions/user/user.param.json | 14 - .../common/uni-captcha/LICENSE.md | 402 +++++++++--------- .../cloudfunctions/common/uni-id/config.json | 7 +- .../common/uni-id/package-lock.json | 34 +- .../uni-login-page/pages/index/index.nvue | 168 +++++--- .../pages/index/phone-login.nvue | 3 +- uni_modules/uni-quick-login/changelog.md | 0 .../uni-quick-login/uni-quick-login.vue | 158 +++++++ uni_modules/uni-quick-login/package.json | 76 ++++ uni_modules/uni-quick-login/readme.md | 1 + .../uniCloud/cloudfunctions/user/index.js | 82 ++++ .../cloudfunctions/user/package-lock.json | 58 +++ .../uniCloud/cloudfunctions/user/package.json | 16 + .../cloudfunctions/user/user.param.json | 9 + 21 files changed, 963 insertions(+), 785 deletions(-) delete mode 100644 uniCloud-aliyun/cloudfunctions/user/index.js delete mode 100644 uniCloud-aliyun/cloudfunctions/user/package-lock.json delete mode 100644 uniCloud-aliyun/cloudfunctions/user/package.json delete mode 100644 uniCloud-aliyun/cloudfunctions/user/user.param.json create mode 100644 uni_modules/uni-quick-login/changelog.md create mode 100644 uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue create mode 100644 uni_modules/uni-quick-login/package.json create mode 100644 uni_modules/uni-quick-login/readme.md create mode 100644 uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js create mode 100644 uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json create mode 100644 uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package.json create mode 100644 uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/user.param.json diff --git a/manifest.json b/manifest.json index 621b041..bb4cd5c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "云端一体搜索模板", + "name" : "base-app", "appid" : "__UNI__BC54A00", "description" : "", "versionName" : "1.0.0", @@ -15,29 +15,63 @@ "autoclose" : true, "delay" : 0 }, - "modules" : {}, + "modules" : { + "OAuth" : {}, + "Share" : {} + }, "distribute" : { "android" : { "permissions" : [ - "", - "", - "", - "", - "", + "", "", "", + "", "", - "", - "", + "", "", - "", "", - "", + "", + "", + "", + "", + "", + "", "" ] }, - "ios" : {}, - "sdkConfigs" : {} + /* ios打包配置 */ + "ios" : { + "capabilities" : { + "plists" : { + "DCloudConfig" : { + "miniServer" : true + } + }, + "entitlements" : { + "com.apple.developer.associated-domains" : [ "applinks:uniapp.dcloud.io" ] + } + }, + "privacyDescription" : { + "NSLocalNetworkUsageDescription" : "展示游戏页面" + } + }, + "sdkConfigs" : { + "oauth" : { + "apple" : {}, + "weixin" : { + "appid" : "wx0411fa6a39d61297", + "appsecret" : "", + "UniversalLinks" : "https://uniapp.dcloud.io/ulink-catgame/" + } + }, + "share" : { + "weixin" : { + "appid" : "wx0411fa6a39d61297", + "UniversalLinks" : "https://uniapp.dcloud.io/ulink-catgame/" + } + }, + "payment" : {} + } } }, "quickapp" : {}, diff --git a/pages.json b/pages.json index 046f872..47d04c4 100644 --- a/pages.json +++ b/pages.json @@ -1,202 +1,193 @@ -{ - "pages": [{ - "path": "pages/list/list", - "style": { - "navigationStyle":"custom" - } - }, { - "path":"pages/grid/grid", - "style":{ - "navigationStyle":"custom" - } - }, { - "path": "pages/search/search", - "style": { - "navigationBarTitleText": "" - } - }, { - "path": "pages/list/detail", - "style": { - "app-plus": { - "titleNView": { - "buttons": [{ - "type": "share" - }], - "type": "transparent" - } - }, - "h5": { - "titleNView": { - "buttons": [], - "type": "transparent" - } - }, - "navigationBarTitleText": "文章详情" - } - - }, { - "path": "pages/ucenter/ucenter", - "style":{ - "navigationBarTitleText": "个人中心", - "navigationBarBackgroundColor":"#2F85FC", - "navigationBarTextStyle":"white" - } - },{ - "path":"pages/uni-feedback/uni-feedback", - "style":{ - "navigationBarTitleText":"问题反馈" - } - } ,{ - "path" : "pages/about/about", - "style" : - { - "navigationBarTitleText": "关于" - } - - },{ - "path" : "pages/agree-list/agree-list", - "style" : - { - "navigationBarTitleText": "政策与协议" - } - - } - ,{ - "path" : "pages/agree-list/privacy/privacy", - "style" : - { - "navigationBarTitleText": "隐私政策" - } - - } - ,{ - "path" : "pages/agree-list/service/service", - "style" : - { - "navigationBarTitleText": "服务协议" - } - - },{ - "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", - "style": { - "disableScroll": true, - "app-plus": { - "backgroundColorTop": "transparent", - "background": "transparent", - "titleNView": false, - "scrollIndicator": false, - "popGesture": "none", - "animationType": "fade-in", - "animationDuration": 200 - - } - } - } - ,{ - "path" : "pages/settings/settings", - "style" : - { - "navigationBarTitleText": "设置" - } - - } - ,{ - "path" : "pages/ucenter/edit/edit", - "style" : - { - "navigationBarTitleText": "编辑资料" - } - },{ - "path":"pages/ucenter/edit/uploadCutImageToUnicloud", - "style":{ - "navigationStyle":"custom" - } - },{ - "path":"uni_modules/uni-login-page/pages/index/index", - "style":{ - "navigationBarTitleText":"", - "navigationBarBackgroundColor":"#FFFFFF", - "app-plus":{ - "titleNView":{ - "buttons":[{ - "text":"帮助", - "type":"none", - "fontSize":"16px", - "width":"60px" - }] - } - } - } - },{ - "path":"uni_modules/uni-login-page/pages/index/phone-login", - "style":{ - "navigationBarTitleText":"", - "navigationBarBackgroundColor":"#FFFFFF", - "app-plus":{ - "titleNView":{ - "buttons":[{ - "text":"帮助", - "type":"none", - "fontSize":"16px", - "width":"60px" - }] - } - } - } - },{ - "path":"uni_modules/uni-login-page/pages/index/pwd-login", - "style":{ - "navigationBarTitleText":"", - "navigationBarBackgroundColor":"#FFFFFF", - "app-plus":{ - "titleNView":{ - "buttons":[{ - "text":"帮助", - "type":"none", - "fontSize":"16px", - "width":"60px" - }] - } - } - } - },{ - "path":"uni_modules/uni-login-page/pages/index/pwd-retrieve", - "style":{ - "navigationBarTitleText":"", - "navigationBarBackgroundColor":"#FFFFFF", - "app-plus":{ - "titleNView":{ - "buttons":[{ - "text":"帮助", - "type":"none", - "fontSize":"16px", - "width":"60px" - }] - } - } - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "base-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" - }, - "tabBar": { - "color": "#7A7E83", - "selectedColor": "#007AFF", - "borderStyle": "black", - "backgroundColor": "#F8F8F8", - "list": [{ - "pagePath": "pages/list/list", - "text": "列表" - }, { - "pagePath": "pages/grid/grid", - "text": "宫格" - }, { - "pagePath": "pages/ucenter/ucenter", - "text": "我的" - }] - } +{ + "pages": [{ + "path": "pages/list/list", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/grid/grid", + "style": { + "navigationStyle": "custom" + } + }, { + "path": "uni_modules/uni-login-page/pages/index/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#FFFFFF", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "帮助", + "type": "none", + "fontSize": "16px", + "width": "60px" + }] + } + } + } + }, { + "path": "pages/search/search", + "style": { + "navigationBarTitleText": "" + } + }, { + "path": "pages/list/detail", + "style": { + "app-plus": { + "titleNView": { + "buttons": [{ + "type": "share" + }], + "type": "transparent" + } + }, + "h5": { + "titleNView": { + "buttons": [], + "type": "transparent" + } + }, + "navigationBarTitleText": "文章详情" + } + + }, { + "path": "pages/ucenter/ucenter", + "style": { + "navigationBarTitleText": "个人中心", + "navigationBarBackgroundColor": "#2F85FC", + "navigationBarTextStyle": "white" + } + }, { + "path": "pages/uni-feedback/uni-feedback", + "style": { + "navigationBarTitleText": "问题反馈" + } + }, { + "path": "pages/about/about", + "style": { + "navigationBarTitleText": "关于" + } + + }, { + "path": "pages/agree-list/agree-list", + "style": { + "navigationBarTitleText": "政策与协议" + } + + }, { + "path": "pages/agree-list/privacy/privacy", + "style": { + "navigationBarTitleText": "隐私政策" + } + + }, { + "path": "pages/agree-list/service/service", + "style": { + "navigationBarTitleText": "服务协议" + } + + }, { + "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", + "style": { + "disableScroll": true, + "app-plus": { + "backgroundColorTop": "transparent", + "background": "transparent", + "titleNView": false, + "scrollIndicator": false, + "popGesture": "none", + "animationType": "fade-in", + "animationDuration": 200 + + } + } + }, { + "path": "pages/settings/settings", + "style": { + "navigationBarTitleText": "设置" + } + + }, { + "path": "pages/ucenter/edit/edit", + "style": { + "navigationBarTitleText": "编辑资料" + } + }, { + "path": "pages/ucenter/edit/uploadCutImageToUnicloud", + "style": { + "navigationStyle": "custom" + } + }, { + "path": "uni_modules/uni-login-page/pages/index/phone-login", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#FFFFFF", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "帮助", + "type": "none", + "fontSize": "16px", + "width": "60px" + }] + } + } + } + }, { + "path": "uni_modules/uni-login-page/pages/index/pwd-login", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#FFFFFF", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "帮助", + "type": "none", + "fontSize": "16px", + "width": "60px" + }] + } + } + } + }, { + "path": "uni_modules/uni-login-page/pages/index/pwd-retrieve", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#FFFFFF", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "帮助", + "type": "none", + "fontSize": "16px", + "width": "60px" + }] + } + } + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "base-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#7A7E83", + "selectedColor": "#007AFF", + "borderStyle": "black", + "backgroundColor": "#F8F8F8", + "list": [{ + "pagePath": "pages/list/list", + "text": "列表" + }, { + "pagePath": "pages/grid/grid", + "text": "宫格" + }, { + "pagePath": "pages/ucenter/ucenter", + "text": "我的" + }] + } } diff --git a/pages/ucenter/ucenter.nvue b/pages/ucenter/ucenter.nvue index 29fe135..58e603f 100644 --- a/pages/ucenter/ucenter.nvue +++ b/pages/ucenter/ucenter.nvue @@ -96,7 +96,7 @@ if (!this.login) { console.log('点击前往登录'); uni.navigateTo({ - url: '/uni_modules/login-page/pages/index/index' + url: '/uni_modules/uni-login-page/pages/index/index' }); } else { diff --git a/uniCloud-aliyun/cloudfunctions/user-center/index.js b/uniCloud-aliyun/cloudfunctions/user-center/index.js index 814024a..2e71f92 100644 --- a/uniCloud-aliyun/cloudfunctions/user-center/index.js +++ b/uniCloud-aliyun/cloudfunctions/user-center/index.js @@ -1,13 +1,10 @@ 'use strict'; - const uniID = require('uni-id') const uniCaptcha = require('uni-captcha') const db = uniCloud.database() const dbCmd = db.command - exports.main = async (event, context) => { let params = event.params || {} - // 登录记录 const loginLog = async (res = {}, type = 'login') => { const now = Date.now() diff --git a/uniCloud-aliyun/cloudfunctions/user/index.js b/uniCloud-aliyun/cloudfunctions/user/index.js deleted file mode 100644 index 64360bb..0000000 --- a/uniCloud-aliyun/cloudfunctions/user/index.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict'; -const uniID = require('uni-id') -const uniCaptcha = require('uni-captcha') -const db = uniCloud.database() -const dbCmd = db.command -let params,context,res; -class User { - async quickLogin(){ - let {access_token,openid,type} = params - switch (type){ - case 'weixin': - let userinfo_res = await uniCloud.httpclient.request('https://api.weixin.qq.com/sns/userinfo', - { - method: 'GET', - dataType:"json", - data:{ access_token,openid} - }); - return userinfo_res.data//根据access_token,openid得到userinfo - //检查是否已经注册... - break; - case 'univerify': - return uniID.loginByUniverify({access_token,openid}) - break; - default: - break; - } - } - /* - - async loginLog(){ - const now = Date.now() - const uniIdLogCollection = db.collection('uni-id-log') - let logData = { - deviceId: params.deviceId || context.DEVICEID, - ip: params.ip || context.CLIENTIP, - type:"login", - ua: context.CLIENTUA, - create_date: now - }; - Object.assign(logData, - res.code === 0 ? { - user_id: res.uid, - state: 1 - } : { - state: 0 - }) - return await uniIdLogCollection.add(logData) - } - async register(){ - return await uniID.register(params); - } - async login(){ - let passed = false; - let needCaptcha = await getNeedCaptcha(); - - if (needCaptcha) { - res = await uniCaptcha.verify(params) - if (res.code === 0) passed = true; - } - - if (!needCaptcha || passed) { - res = await uniID.login(params); - await loginLog(res); - needCaptcha = await getNeedCaptcha(); - } - - res.needCaptcha = needCaptcha; - } - async loginByWeixin(){ - } - async checkToken(){ - return uniID.checkToken(event.uniIdToken); - } - async logout(){ - return await uniID.logout(event.uniIdToken) - } - async sendSmsCode(){ - // 简单限制一下客户端调用频率 - const ipLimit = await db.collection('uni-verify').where({ - ip: context.CLIENTIP, - created_at: dbCmd.gt(Date.now() - 60000) - }).get() - if (ipLimit.data.length > 0) { - return { - code: 429, - msg: '请求过于频繁' - } - } - const templateId = '' // 替换为自己申请的模板id - if (!templateId) { - return { - code: 500, - msg: 'sendSmsCode需要传入自己的templateId,参考https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=sendsmscode' - } - } - const randomStr = '00000' + Math.floor(Math.random() * 1000000) - const code = randomStr.substring(randomStr.length - 6) - return await uniID.sendSmsCode({ - mobile: params.mobile, - code, - type: params.type, - templateId - }) - } - async loginBySms(){ - if (!params.code) { - return { - code: 500, - msg: '请填写验证码' - } - } - if (!/^1\d{10}$/.test(params.mobile)) { - return { - code: 500, - msg: '手机号码填写错误' - } - } - res = await uniID.loginBySms(params) - loginLog(res) - } - async inviteLogin(){ - if (!params.code) { - return { - code: 500, - msg: '请填写验证码' - } - } - res = await uniID.loginBySms({ - ...params, - type: 'register' - }) - } - async getInviteCode(){ - let res = await uniID.getUserInfo({ - uid: params.uid, - field: ['my_invite_code'] - }) - if (res.code === 0) { - res.myInviteCode = res.userInfo.my_invite_code - delete res.userInfo - } - } - async getInvitedUser(){ - return uniID.getInvitedUser(params) - } - async loginByUniverify(){ - return await uniID.loginByUniverify(params) - } - async loginByApple(){ - res = await uniID.loginByApple(params) - loginLog(res) - } - async updatePwd(){ - return await uniID.updatePwd({ - uid: params.uid, - ...params - }) - } - async createCaptcha(){ - return await uniCaptcha.create(params) - } - async refreshCaptcha(){ - return await uniCaptcha.refresh(params) - } -*/ -} -const userClass = new User(); -exports.main = async (event, ctx) => { - [{params},context] = [event,ctx] - //1.判断需要token的action是否有token - /*let noCheckAction = ['register', 'loginByWeixin', 'checkToken','login', 'logout', 'sendSmsCode','loginBySms', 'inviteLogin', 'loginByUniverify','loginByApple', 'createCaptcha', 'verifyCaptcha','refreshCaptcha'] - if(!noCheckAction.includes(event.action)) { - if (!event.uniIdToken) { - return {"code":403,"msg":"缺少token"} - } - let payload = {} - payload = await uniID.checkToken(event.uniIdToken) - if (payload.code && payload.code > 0) { - return payload - } - params.uid = payload.uid - }*/ - try{ - return await userClass[event.action]()||res; - }catch(err){ - return {"code":404,"msg":err} - } -} \ No newline at end of file diff --git a/uniCloud-aliyun/cloudfunctions/user/package-lock.json b/uniCloud-aliyun/cloudfunctions/user/package-lock.json deleted file mode 100644 index 913a9df..0000000 --- a/uniCloud-aliyun/cloudfunctions/user/package-lock.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "user", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "uni-captcha": "file:../../../uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", - "uni-config-center": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "uni-id": "file:../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id" - } - }, - "../../../uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha": { - "version": "0.1.0", - "license": "Apache-2.0" - }, - "../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center": { - "version": "0.0.1", - "license": "Apache-2.0" - }, - "../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id": { - "version": "3.0.8", - "license": "Apache-2.0", - "dependencies": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } - }, - "node_modules/uni-captcha": { - "resolved": "../../../uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", - "link": true - }, - "node_modules/uni-config-center": { - "resolved": "../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "link": true - }, - "node_modules/uni-id": { - "resolved": "../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id", - "link": true - } - }, - "dependencies": { - "uni-captcha": { - "version": "file:../../../uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha" - }, - "uni-config-center": { - "version": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "uni-id": { - "version": "file:../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id", - "requires": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } - } - } -} diff --git a/uniCloud-aliyun/cloudfunctions/user/package.json b/uniCloud-aliyun/cloudfunctions/user/package.json deleted file mode 100644 index a6709b3..0000000 --- a/uniCloud-aliyun/cloudfunctions/user/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "user", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "uni-captcha": "file:../../../uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", - "uni-config-center": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "uni-id": "file:../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id" - } -} diff --git a/uniCloud-aliyun/cloudfunctions/user/user.param.json b/uniCloud-aliyun/cloudfunctions/user/user.param.json deleted file mode 100644 index 9c37ae2..0000000 --- a/uniCloud-aliyun/cloudfunctions/user/user.param.json +++ /dev/null @@ -1,14 +0,0 @@ -// 本文件中的json内容将在云函数【运行】时作为参数传给云函数。 -// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam -{ - "action": "quickLogin", - "params": { - "access_token": "43_Ga0tBbkdkFxu746Ub2njRpyR49M7kf4XxtV9InxFoCWOjyR9m7a43akiQyzuqverhi1qCfKj2j6SOOvDHwfyphSYcvIC7tUXe4bJRLZ7n7g", - "expires_in": 7200, - "refresh_token": "43_B7KJlMrcAnr2Hq6hMUgBVGSO8pgJpnAaFAANu7wP17FJC2chJ1tqdaeBrLDrDN1osRAf0RNBjv0yIp2muUOl9bqzrKeIp0TL4AfOcY1mdMM", - "openid": "oRrdQty-Zb6VwWjru6RV81_HwW4k", - "scope": "snsapi_userinfo", - "unionid": "oU5Yyt4zSdenNh8ZcwSNtzoXgAkM", - "type": "weixin" - } -} diff --git a/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/LICENSE.md b/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/LICENSE.md index 261eeb9..29f81d8 100644 --- a/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/LICENSE.md +++ b/uni_modules/uni-captcha/uniCloud/cloudfunctions/common/uni-captcha/LICENSE.md @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/config.json b/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/config.json index 1f6b5d6..ef6a18d 100644 --- a/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/config.json +++ b/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/config.json @@ -14,6 +14,9 @@ "weixin" : { "appid": "wx0411fa6a39d61297", "appsecret": "fdc6251421d3d688a563b4f00dd540e7" + }, + "apple": { + "bundleId": "io.dcloud.game.cat" } } }, @@ -37,8 +40,8 @@ "sms": { "name": "DCloud", "codeExpiresIn": 300, - "smsKey": "your sms key", - "smsSecret": "your sms secret" + "smsKey": "71a19f38c954f7d768d68a050486bf15", + "smsSecret": "d6c424b702d73baa3b6e1a1452469213" }, "univerify":{ "appid": "__UNI__GameCat", diff --git a/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json b/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json index dc8ec95..5ef1962 100644 --- a/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json +++ b/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json @@ -1,28 +1,12 @@ { - "name": "uni-id", - "version": "3.0.8", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "version": "3.0.8", - "license": "Apache-2.0", - "dependencies": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } - }, - "../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center": { - "version": "0.0.1", - "license": "Apache-2.0" - }, - "node_modules/uni-config-center": { - "resolved": "../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "link": true + "name": "uni-id", + "version": "3.0.8", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "version": "3.0.8", + "license": "Apache-2.0" + } } - }, - "dependencies": { - "uni-config-center": { - "version": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - } - } } diff --git a/uni_modules/uni-login-page/pages/index/index.nvue b/uni_modules/uni-login-page/pages/index/index.nvue index b3edd12..6f7ca9c 100644 --- a/uni_modules/uni-login-page/pages/index/index.nvue +++ b/uni_modules/uni-login-page/pages/index/index.nvue @@ -1,79 +1,123 @@ - + \ No newline at end of file diff --git a/uni_modules/uni-login-page/pages/index/phone-login.nvue b/uni_modules/uni-login-page/pages/index/phone-login.nvue index 5e21c2d..59bfd64 100644 --- a/uni_modules/uni-login-page/pages/index/phone-login.nvue +++ b/uni_modules/uni-login-page/pages/index/phone-login.nvue @@ -32,7 +32,8 @@ - + + diff --git a/uni_modules/uni-quick-login/changelog.md b/uni_modules/uni-quick-login/changelog.md new file mode 100644 index 0000000..e69de29 diff --git a/uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue b/uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue new file mode 100644 index 0000000..1e6da55 --- /dev/null +++ b/uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue @@ -0,0 +1,158 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/uni-quick-login/package.json b/uni_modules/uni-quick-login/package.json new file mode 100644 index 0000000..188aae1 --- /dev/null +++ b/uni_modules/uni-quick-login/package.json @@ -0,0 +1,76 @@ +{ + "id": "quick-login", + "displayName": "quick-login", + "version": "1.0.0", + "description": "quick-login", + "keywords": [ + "quick-login" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "uniCloud", + "云端一体页面模板" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "", + "data": "", + "permissions": "" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "u", + "aliyun": "u" + }, + "client": { + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-quick-login/readme.md b/uni_modules/uni-quick-login/readme.md new file mode 100644 index 0000000..33b223b --- /dev/null +++ b/uni_modules/uni-quick-login/readme.md @@ -0,0 +1 @@ +# uni-quick-login \ No newline at end of file diff --git a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js new file mode 100644 index 0000000..f52b241 --- /dev/null +++ b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js @@ -0,0 +1,82 @@ +'use strict'; +const uniID = require('uni-id') +const uniCaptcha = require('uni-captcha') +const db = uniCloud.database() +const dbCmd = db.command +let params,context,res; +class User { + async quickLogin(){ + let {access_token,openid,type} = params + switch (type){ + case 'weixin': + let userinfo_res = await uniCloud.httpclient.request('https://api.weixin.qq.com/sns/userinfo', + { + method: 'GET', + dataType:"json", + data:{ access_token,openid} + }); + return userinfo_res.data//根据access_token,openid得到userinfo + //检查是否已经注册... + break; + case 'univerify': + return uniID.loginByUniverify({access_token,openid}) + break; + case 'apple': + return await uniID.loginByApple(params) + break; + default: + return {"code":100,"msg":"暂不提供"+type+"登陆的云端接口演示"} + break; + } + } + async sendSmsCode(){ + // 简单限制一下客户端调用频率 + const ipLimit = await db.collection('uni-verify').where({ + ip: context.CLIENTIP, + created_at: dbCmd.gt(Date.now() - 60000) + }).get() + if (ipLimit.data.length > 0) { + return { + code: 429, + msg: '请求过于频繁' + } + } + const templateId = '11753' // 替换为自己申请的模板id + if (!templateId) { + return { + code: 500, + msg: 'sendSmsCode需要传入自己的templateId,参考https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=sendsmscode' + } + } + const randomStr = '00000' + Math.floor(Math.random() * 1000000) + const code = randomStr.substring(randomStr.length - 6) + return await uniID.sendSmsCode({ + mobile: params.mobile, + code, + type: params.type, + templateId + }) + } +} +const userClass = new User(); +exports.main = async (event, ctx) => { + [{params},context] = [event,ctx] + //1.判断需要token的action是否有token + /*let noCheckAction = ['register', 'loginByWeixin', 'checkToken','login', 'logout', 'sendSmsCode','loginBySms', 'inviteLogin', 'loginByUniverify','loginByApple', 'createCaptcha', 'verifyCaptcha','refreshCaptcha'] + if(!noCheckAction.includes(event.action)) { + if (!event.uniIdToken) { + return {"code":403,"msg":"缺少token"} + } + let payload = {} + payload = await uniID.checkToken(event.uniIdToken) + if (payload.code && payload.code > 0) { + return payload + } + params.uid = payload.uid + }*/ + try{ + return await userClass[event.action]()||res; + }catch(err){ + return {"code":404,"msg":err} + } +} \ No newline at end of file diff --git a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json new file mode 100644 index 0000000..7e3037f --- /dev/null +++ b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json @@ -0,0 +1,58 @@ +{ + "name": "user", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "uni-captcha": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", + "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", + "uni-id": "file:../../../../uni-id/uniCloud/cloudfunctions/common/uni-id" + } + }, + "../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha": { + "version": "0.1.0", + "license": "Apache-2.0" + }, + "../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center": { + "version": "0.0.1", + "license": "Apache-2.0" + }, + "../../../../uni-id/uniCloud/cloudfunctions/common/uni-id": { + "version": "3.0.8", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + }, + "node_modules/uni-captcha": { + "resolved": "../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", + "link": true + }, + "node_modules/uni-config-center": { + "resolved": "../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", + "link": true + }, + "node_modules/uni-id": { + "resolved": "../../../../uni-id/uniCloud/cloudfunctions/common/uni-id", + "link": true + } + }, + "dependencies": { + "uni-captcha": { + "version": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha" + }, + "uni-config-center": { + "version": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + }, + "uni-id": { + "version": "file:../../../../uni-id/uniCloud/cloudfunctions/common/uni-id", + "requires": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + } + } +} diff --git a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package.json b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package.json new file mode 100644 index 0000000..965bf27 --- /dev/null +++ b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package.json @@ -0,0 +1,16 @@ +{ + "name": "user", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "uni-captcha": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", + "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", + "uni-id": "file:../../../../uni-id/uniCloud/cloudfunctions/common/uni-id" + } +} diff --git a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/user.param.json b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/user.param.json new file mode 100644 index 0000000..52bda1e --- /dev/null +++ b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/user.param.json @@ -0,0 +1,9 @@ +// 本文件中的json内容将在云函数【运行】时作为参数传给云函数。 +// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam +{ + "action": "sendSmsCode", + "params": { + "mobile":"17769516081", + "type":"register" + } +} -- GitLab