From 7e134c206597c80108a890b0d51ae499544586f2 Mon Sep 17 00:00:00 2001 From: linju <8432241+linjuDcloud@user.noreply.gitee.com> Date: Thu, 8 Apr 2021 20:42:20 +0800 Subject: [PATCH] 123 --- manifest.json | 20 +++++++--- pages/list/list.vue | 15 +++++++- .../uni-login-page/pages/index/index.vue | 38 +++++++++++++++++-- .../uniCloud/cloudfunctions/user/index.js | 2 +- 4 files changed, 63 insertions(+), 12 deletions(-) diff --git a/manifest.json b/manifest.json index 785b3c0..2809982 100644 --- a/manifest.json +++ b/manifest.json @@ -16,9 +16,9 @@ "delay" : 0 }, "modules" : { - "OAuth" : {}, "Share" : {}, - "Fingerprint" : {} + "Fingerprint" : {}, + "OAuth" : {} }, "distribute" : { "android" : { @@ -50,7 +50,10 @@ } }, "entitlements" : { - "com.apple.developer.associated-domains" : [ "applinks:uniapp.dcloud.io" ] + "com.apple.developer.associated-domains" : [ + "applinks:uniapp.dcloud.io", + "applinks:static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com" + ] } }, "privacyDescription" : { @@ -63,17 +66,22 @@ "weixin" : { "appid" : "wx0411fa6a39d61297", "appsecret" : "", - "UniversalLinks" : "https://uniapp.dcloud.io/ulink-catgame/" + "UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00" }, "univerify" : {} }, "share" : { "weixin" : { "appid" : "wx0411fa6a39d61297", - "UniversalLinks" : "https://uniapp.dcloud.io/ulink-catgame/" + "UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00", + "_spaceID" : "7827e38b-7f40-4421-bca7-58331dcddc00" + } + }, + "payment" : { + "weixin" : { + "UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00" } }, - "payment" : {}, "ad" : {} } } diff --git a/pages/list/list.vue b/pages/list/list.vue index 021eae0..052a7b8 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -18,7 +18,20 @@ }; }, onShow(options) { - this.searchText = getApp().globalData.searchText; + this.searchText = getApp().globalData.searchText; + + plus.oauth.getServices(services=>{ + console.log(services); + services.forEach(item=>{ + if(item.id=='qq'){ + item.authorize(e=>{ + console.log(e); + },e=>{ + console.log(e); + }) + } + }) + }) }, /** * 下拉刷新回调函数 diff --git a/uni_modules/uni-login-page/pages/index/index.vue b/uni_modules/uni-login-page/pages/index/index.vue index 21b573a..f2f79f6 100644 --- a/uni_modules/uni-login-page/pages/index/index.vue +++ b/uni_modules/uni-login-page/pages/index/index.vue @@ -20,9 +20,9 @@ - - - + + + 未注册的手机号验证通过后将自动注册 @@ -100,7 +100,37 @@ if (!this.canGetShortMsg) return; /** * 发送验证吗 - */ + */ + uni.showLoading(); + uniCloud.callFunction({ + "name": "user", + "data": { + "action": "sendSmsCode", + "params": { + "mobile": this.formData.phone, + "type": "login" + } + }, + success: (e) => { + console.log(e); + uni.showToast({ + title: JSON.stringify(e.result), + icon: 'none' + }); + uni.navigateTo({ + url: '', + success: res => {}, + fail: () => {}, + complete: () => {} + }); + }, + fail: (err) => { + console.log(err); + }, + complete: () => { + uni.hideLoading() + } + }) }, /** * 去密码登录页 diff --git a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js index f52b241..f28594b 100644 --- a/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js +++ b/uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/index.js @@ -16,7 +16,7 @@ class User { data:{ access_token,openid} }); return userinfo_res.data//根据access_token,openid得到userinfo - //检查是否已经注册... + //检查是否已经注册...待续... break; case 'univerify': return uniID.loginByUniverify({access_token,openid}) -- GitLab