提交 8f3761f8 编写于 作者: C chenruilong

1.1.15

上级 6362c8b1
## 1.1.14(2023-05-19) ## 1.1.15(2023-07-13)
- 修复 退出登录不会跳转至登录页的问题 - uni-id-co 修复 QQ登录时不存在头像时报错的问题
## 1.1.14(2023-05-19)
- 修复 退出登录不会跳转至登录页的问题
## 1.1.13(2023-05-10) ## 1.1.13(2023-05-10)
- 修复 启用摇树优化 报错的问题 - 修复 启用摇树优化 报错的问题
## 1.1.12(2023-05-05) ## 1.1.12(2023-05-05)
......
{ {
"id": "uni-id-pages", "id": "uni-id-pages",
"displayName": "uni-id-pages", "displayName": "uni-id-pages",
"version": "1.1.14", "version": "1.1.15",
"description": "云端一体简单、统一、可扩展的用户中心页面模版", "description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [ "keywords": [
"用户管理", "用户管理",
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
class="input-box" placeholder="再次输入密码" maxlength="20" type="password" v-model="formData.password2" class="input-box" placeholder="再次输入密码" maxlength="20" type="password" v-model="formData.password2"
trim="both" /> trim="both" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item> <!-- <uni-forms-item>-->
<uni-captcha ref="captcha" scene="register" v-model="formData.captcha" /> <!-- <uni-captcha ref="captcha" scene="register" v-model="formData.captcha" />-->
</uni-forms-item> <!-- </uni-forms-item>-->
<uni-id-pages-agreements scope="register" ref="agreements" ></uni-id-pages-agreements> <uni-id-pages-agreements scope="register" ref="agreements" ></uni-id-pages-agreements>
<button class="uni-btn" type="primary" @click="submit">注册</button> <button class="uni-btn" type="primary" @click="submit">注册</button>
<button @click="navigateBack" class="register-back">返回</button> <button @click="navigateBack" class="register-back">返回</button>
...@@ -85,14 +85,14 @@ ...@@ -85,14 +85,14 @@
*/ */
submit() { submit() {
this.$refs.form.validate().then((res) => { this.$refs.form.validate().then((res) => {
if(this.formData.captcha.length != 4){ // if(this.formData.captcha.length != 4){
this.$refs.captcha.focusCaptchaInput = true // this.$refs.captcha.focusCaptchaInput = true
return uni.showToast({ // return uni.showToast({
title: '请输入验证码', // title: '请输入验证码',
icon: 'none', // icon: 'none',
duration: 3000 // duration: 3000
}); // });
} // }
if (this.needAgreements && !this.agree) { if (this.needAgreements && !this.agree) {
return this.$refs.agreements.popup(()=>{ return this.$refs.agreements.popup(()=>{
this.submitForm(res) this.submitForm(res)
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<style lang="scss"> <style lang="scss">
@import "@/uni_modules/uni-id-pages/common/login-page.scss"; @import "@/uni_modules/uni-id-pages/common/login-page.scss";
@media screen and (max-width: 690px) { @media screen and (max-width: 690px) {
.uni-content{ .uni-content{
margin-top: 15px; margin-top: 15px;
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
padding: 30px 40px 60px; padding: 30px 40px 60px;
max-height: 520px; max-height: 520px;
} }
.link-box { .link-box {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
...@@ -161,12 +161,12 @@ ...@@ -161,12 +161,12 @@
justify-content: space-between; justify-content: space-between;
margin-top: 10px; margin-top: 10px;
} }
.link { .link {
font-size: 12px; font-size: 12px;
} }
} }
.uni-content ::v-deep .uni-forms-item__label { .uni-content ::v-deep .uni-forms-item__label {
position: absolute; position: absolute;
left: -15px; left: -15px;
......
...@@ -67,6 +67,8 @@ module.exports = function () { ...@@ -67,6 +67,8 @@ module.exports = function () {
.join('&') .join('&')
if (isNaN(Number(timestamp)) || (Number(timestamp) + timeout) < Date.now()) { if (isNaN(Number(timestamp)) || (Number(timestamp) + timeout) < Date.now()) {
console.error('[timestamp error], timestamp:', timestamp, 'timeout:', timeout)
throw { throw {
errCode: ERROR.ILLEGAL_REQUEST errCode: ERROR.ILLEGAL_REQUEST
} }
...@@ -75,6 +77,7 @@ module.exports = function () { ...@@ -75,6 +77,7 @@ module.exports = function () {
const reSignature = crypto.createHmac('sha256', `${this.config.requestAuthSecret + nonce}`).update(`${timestamp}${bodyStr}`).digest('hex') const reSignature = crypto.createHmac('sha256', `${this.config.requestAuthSecret + nonce}`).update(`${timestamp}${bodyStr}`).digest('hex')
if (signature !== reSignature.toUpperCase()) { if (signature !== reSignature.toUpperCase()) {
console.error('[signature error], signature:', signature, 'reSignature:', reSignature.toUpperCase(), 'requestAuthSecret:', this.config.requestAuthSecret)
throw { throw {
errCode: ERROR.ILLEGAL_REQUEST errCode: ERROR.ILLEGAL_REQUEST
} }
......
...@@ -119,27 +119,29 @@ module.exports = async function (params = {}) { ...@@ -119,27 +119,29 @@ module.exports = async function (params = {}) {
accessToken, accessToken,
openid openid
}) })
// eslint-disable-next-line n/no-deprecated-api if (avatar) {
const extName = url.parse(avatar).pathname.split('.').pop() // eslint-disable-next-line n/no-deprecated-api
const cloudPath = `user/avatar/${openid.slice(-8) + Date.now()}-avatar.${extName}` const extName = url.parse(avatar).pathname.split('.').pop()
const getAvatarRes = await uniCloud.httpclient.request(avatar) const cloudPath = `user/avatar/${openid.slice(-8) + Date.now()}-avatar.${extName}`
if (getAvatarRes.status >= 400) { const getAvatarRes = await uniCloud.httpclient.request(avatar)
throw { if (getAvatarRes.status >= 400) {
errCode: ERROR.GET_THIRD_PARTY_USER_INFO_FAILED throw {
errCode: ERROR.GET_THIRD_PARTY_USER_INFO_FAILED
}
}
const {
fileID
} = await uniCloud.uploadFile({
cloudPath,
fileContent: getAvatarRes.data
})
extraData.avatar_file = {
name: cloudPath,
extname: extName,
url: fileID
} }
} }
const {
fileID
} = await uniCloud.uploadFile({
cloudPath,
fileContent: getAvatarRes.data
})
extraData.nickname = nickname extraData.nickname = nickname
extraData.avatar_file = {
name: cloudPath,
extname: extName,
url: fileID
}
} }
await saveQQUserKey.call(this, { await saveQQUserKey.call(this, {
openid, openid,
......
{ {
"name": "uni-id-co", "name": "uni-id-co",
"version": "1.1.14", "version": "1.1.15",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"keywords": [], "keywords": [],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册