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