diff --git a/manifest.json b/manifest.json index 621b041d667b0eb4d63cb97a34bf1967ebee0e81..bb4cd5cbfb931796f37179772bfb6d1b84bbdf97 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 fab190053fc97d1d3ae2ca300c05d7cb0a2f5f07..1e405e784d0a4bbedcecf1338b631a68ad51bbfd 100644 --- a/pages.json +++ b/pages.json @@ -1,83 +1,93 @@ { "pages": [{ - "path": "pages/list/list", - "style": { - "navigationStyle":"custom", - "enablePullDownRefresh":true - } - }, { - "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" + "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" + }] + } } - }, - "navigationBarTitleText": "文章详情" - } + } + }, { + "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": "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, @@ -92,92 +102,72 @@ } } - } - ,{ - "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": "pages/settings/settings", + "style": { + "navigationBarTitleText": "设置" + } + + }, { + "path": "pages/ucenter/edit/edit", + "style": { + "navigationBarTitleText": "编辑资料" } - },{ - "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": "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-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" + }, { + "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", diff --git a/pages/ucenter/ucenter.nvue b/pages/ucenter/ucenter.nvue index 29fe135ec7eed9ce7c7f3a2f141f32fb84eeb182..58e603f6a613356f385c1b7357c0dcd29fc15818 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 814024aba64fb18f94136e941b7de910d6fc4e1c..2e71f92ecdf47557841e4ee55f4eb065f803b9ee 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 64360bb3a713fe68f32831e5f8822703c8eb3823..0000000000000000000000000000000000000000 --- 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 913a9df284057c1de967cf5e3230543c93cc77e4..0000000000000000000000000000000000000000 --- 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 a6709b3cfa2baf602272eddbebfb6fff2b840a02..0000000000000000000000000000000000000000 --- 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 9c37ae263ffc5f212a572db71b7d7567b740ec9d..0000000000000000000000000000000000000000 --- 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 261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64..29f81d812f3e768fa89638d1f72920dbfd1413a8 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 1f6b5d693c3c80b41ec90473834ff3131189c514..ef6a18d6c6bfee95aaea1328f5ca986a4226b6ed 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 dc8ec957524be78035e54bb52d976325bb5d4bc8..5ef1962f37388cd8181ea5bc46e09c9c65741c97 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 b3edd128aee9bb8b87ff5874d29f84b7af34369d..6f7ca9c0ccce76428d52b3eee6714ddd8176bc92 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 5e21c2d9238fe70b2e105905b892f65623cdccf1..59bfd64ae5de91356cee6f84687860da15b660b1 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..1e6da559744a27c47894c8603e5f4314d9e733d4 --- /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 0000000000000000000000000000000000000000..188aae13b668b6e6187356aad3e33094b07cf5c4 --- /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 0000000000000000000000000000000000000000..33b223be3f9bf7e414bec5ac5316701570da5076 --- /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 0000000000000000000000000000000000000000..f52b2416b5a418af55ccd4a4ffe9eee4e6637cc8 --- /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 0000000000000000000000000000000000000000..7e3037fa82ddad8ccaa8db9579840018c4cfb720 --- /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 0000000000000000000000000000000000000000..965bf274cb22107b31b692a78c0e33eaee48e095 --- /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 0000000000000000000000000000000000000000..52bda1ee0c86991669653ab6a24175fbc11c08e5 --- /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" + } +}