提交 afee7ca2 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新依赖的modules版本

上级 5c122dae
## 1.1.14(2023-05-19)
- 修复 退出登录不会跳转至登录页的问题
## 1.1.13(2023-05-10)
- 修复 启用摇树优化 报错的问题
## 1.1.12(2023-05-05)
- uni-id-co 新增 调用 add-user 接口创建用户时允许触发 beforeRegister 钩子方法,beforeRegister 钩子[详见](https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary.html#before-register)
- uni-id-co 新增 自无 unionid 到有 unionid 状态进行登录时为用户补充 unionid 字段
- uni-id-co 修复 i18n 在特定场景下报错的 bug
- uni-id-co 修复 跨平台解绑微信/QQ时无法解绑的 bug
- uni-id-co 修复 微信小程序等平台创建验证码时无法展示的 bug
- uni-id-co 修复 更新 push_clientid 时因 device_id 没有变化导致无法更新
## 1.1.11(2023-03-24) ## 1.1.11(2023-03-24)
- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题 - 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题
## 1.1.10(2023-03-24) ## 1.1.10(2023-03-24)
......
export default function checkIdCard (idCardNumber) { function checkIdCard (idCardNumber) {
if (!idCardNumber || typeof idCardNumber !== 'string' || idCardNumber.length !== 18) return false if (!idCardNumber || typeof idCardNumber !== 'string' || idCardNumber.length !== 18) return false
const coefficient = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] const coefficient = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
...@@ -12,3 +12,5 @@ export default function checkIdCard (idCardNumber) { ...@@ -12,3 +12,5 @@ export default function checkIdCard (idCardNumber) {
return checkCode[sum % 11].toString() === code.toLowerCase() return checkCode[sum % 11].toString() === code.toLowerCase()
} }
export default checkIdCard
...@@ -79,7 +79,7 @@ export const mutations = { ...@@ -79,7 +79,7 @@ export const mutations = {
uni.removeStorageSync('uni_id_token'); uni.removeStorageSync('uni_id_token');
uni.setStorageSync('uni_id_token_expired', 0) uni.setStorageSync('uni_id_token_expired', 0)
uni.redirectTo({ uni.redirectTo({
url: `/${pagesJson.uniIdRouter && pagesJson.uniIdRouter.loginPage ? 'uni_modules/uni-id-pages/pages/login/login-withoutpwd': ''}`, url: `/${pagesJson.uniIdRouter && pagesJson.uniIdRouter.loginPage ? pagesJson.uniIdRouter.loginPage: 'uni_modules/uni-id-pages/pages/login/login-withoutpwd'}`,
}); });
uni.$emit('uni-id-pages-logout') uni.$emit('uni-id-pages-logout')
this.setUserInfo({},{cover:true}) this.setUserInfo({},{cover:true})
......
...@@ -202,7 +202,6 @@ ...@@ -202,7 +202,6 @@
return '/' + pages[pages.length - n].route return '/' + pages[pages.length - n].route
}, },
toPage(path,index = 0) { toPage(path,index = 0) {
let type = ['navigateTo','redirectTo'][index]
//console.log('比较', this.getRoute(1),this.getRoute(2), path) //console.log('比较', this.getRoute(1),this.getRoute(2), path)
if (this.getRoute(1) == path.split('?')[0] && this.getRoute(1) == if (this.getRoute(1) == path.split('?')[0] && this.getRoute(1) ==
'/uni_modules/uni-id-pages/pages/login/login-withoutpwd') { '/uni_modules/uni-id-pages/pages/login/login-withoutpwd') {
...@@ -212,13 +211,23 @@ ...@@ -212,13 +211,23 @@
} else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启 } else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启
uni.navigateBack(); uni.navigateBack();
} else if (this.getRoute(1) != path) { } else if (this.getRoute(1) != path) {
uni[type]({ if(index === 0){
uni.navigateTo({
url: path, url: path,
animationType: 'slide-in-left', animationType: 'slide-in-left',
complete(e) { complete(e) {
// console.log(e); // console.log(e);
} }
}) })
}else{
uni.redirectTo({
url: path,
animationType: 'slide-in-left',
complete(e) {
// console.log(e);
}
})
}
} else { } else {
console.log('出乎意料的情况,path:' + path); console.log('出乎意料的情况,path:' + path);
} }
......
...@@ -17,24 +17,14 @@ export default { ...@@ -17,24 +17,14 @@ export default {
// "douyin", // "douyin",
// #ifdef APP // #ifdef APP
// 'univerify', 'univerify',
// #endif // #endif
// #ifdef MP-WEIXIN
'weixin', 'weixin',
// #endif
// #ifndef MP-WEIXIN
'username', 'username',
// #endif
// #ifdef APP // #ifdef APP
'apple', 'apple',
// #endif // #endif
'smsCode'
// #ifndef MP-WEIXIN
'smsCode',
// #endif
], ],
// 政策协议 // 政策协议
agreements: { agreements: {
...@@ -62,7 +52,7 @@ export default { ...@@ -62,7 +52,7 @@ export default {
* weak(弱:密码必须包含字母和数字,长度范围:6-16位之间) * weak(弱:密码必须包含字母和数字,长度范围:6-16位之间)
* 为空或false则不验证密码强度 * 为空或false则不验证密码强度
*/ */
// passwordStrength: 'medium', passwordStrength: 'medium',
/** /**
* 登录后允许用户设置密码(只针对未设置密码得用户) * 登录后允许用户设置密码(只针对未设置密码得用户)
* 开启此功能将 setPasswordAfterLogin 设置为 true 即可 * 开启此功能将 setPasswordAfterLogin 设置为 true 即可
......
{ {
"id": "uni-id-pages", "id": "uni-id-pages",
"displayName": "uni-id-pages", "displayName": "uni-id-pages",
"version": "1.1.11", "version": "1.1.14",
"description": "云端一体简单、统一、可扩展的用户中心页面模版", "description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [ "keywords": [
"用户管理", "用户管理",
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
@media screen and (min-width: 690px) { @media screen and (min-width: 690px) {
.uni-content { .uni-content {
height: 600px; height: auto;
} }
} }
......
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
</template> </template>
<script> <script>
import checkIdCard from '@/uni_modules/uni-id-pages/common/check-id-card.js' import checkIdCard from '@/uni_modules/uni-id-pages/common/check-id-card.js';
import mixin from '@/uni_modules/uni-id-pages/common/login-page.mixin.js'; import mixin from '@/uni_modules/uni-id-pages/common/login-page.mixin.js';
import { import {
store, store,
mutations mutations
......
...@@ -212,11 +212,16 @@ module.exports = { ...@@ -212,11 +212,16 @@ module.exports = {
} }
// 国际化 // 国际化
const messages = require('./lang/index')
const fallbackLocale = 'zh-Hans'
const i18n = uniCloud.initI18n({ const i18n = uniCloud.initI18n({
locale: clientInfo.locale, locale: clientInfo.locale,
fallbackLocale: 'zh-Hans', fallbackLocale,
messages: require('./lang/index') messages: JSON.parse(JSON.stringify(messages))
}) })
if (!messages[i18n.locale]) {
i18n.setLocale(fallbackLocale)
}
this.t = i18n.t.bind(i18n) this.t = i18n.t.bind(i18n)
this.response = {} this.response = {}
......
...@@ -173,8 +173,8 @@ async function thirdPartyLogin (params = {}) { ...@@ -173,8 +173,8 @@ async function thirdPartyLogin (params = {}) {
user user
} = params } = params
return { return {
mobileComfirmd: user.mobile_comfirmd, mobileConfirmed: !!user.mobile_confirmed,
emailComfirmd: user.email_comfirmd emailConfirmed: !!user.email_confirmed
} }
} }
......
...@@ -113,7 +113,17 @@ module.exports = async function (params = {}) { ...@@ -113,7 +113,17 @@ module.exports = async function (params = {}) {
data.mobile_confirmed = 1 data.mobile_confirmed = 1
} }
await userCollection.add(data) // 触发 beforeRegister 钩子
const beforeRegister = this.hooks.beforeRegister
let userRecord = data
if (beforeRegister) {
userRecord = await beforeRegister({
userRecord,
clientInfo: this.getUniversalClientInfo()
})
}
await userCollection.add(userRecord)
return { return {
errCode: 0, errCode: 0,
errMsg: '' errMsg: ''
......
...@@ -70,6 +70,7 @@ module.exports = async function (params) { ...@@ -70,6 +70,7 @@ module.exports = async function (params) {
status: REAL_NAME_STATUS.CERTIFY_FAILED status: REAL_NAME_STATUS.CERTIFY_FAILED
}) })
console.log(ERROR.FRV_FAIL, 'error: ', res)
throw { throw {
errCode: ERROR.FRV_FAIL errCode: ERROR.FRV_FAIL
} }
......
...@@ -108,7 +108,8 @@ module.exports = async function (params = {}) { ...@@ -108,7 +108,8 @@ module.exports = async function (params = {}) {
const extraData = { const extraData = {
qq_openid: { qq_openid: {
[`${qqPlatform}_${appId}`]: openid [`${qqPlatform}_${appId}`]: openid
} },
qq_unionid: unionid
} }
if (type === 'register' && qqPlatform !== 'mp') { if (type === 'register' && qqPlatform !== 'mp') {
const { const {
......
...@@ -110,7 +110,8 @@ module.exports = async function (params = {}) { ...@@ -110,7 +110,8 @@ module.exports = async function (params = {}) {
const extraData = { const extraData = {
wx_openid: { wx_openid: {
[`${weixinPlatform}_${appId}`]: openid [`${weixinPlatform}_${appId}`]: openid
} },
wx_unionid: unionid
} }
if (type === 'register' && weixinPlatform !== 'mp') { if (type === 'register' && weixinPlatform !== 'mp') {
const { const {
......
...@@ -5,10 +5,6 @@ const { ...@@ -5,10 +5,6 @@ const {
const { const {
LOG_TYPE, dbCmd LOG_TYPE, dbCmd
} = require('../../common/constants') } = require('../../common/constants')
const {
getQQPlatform
} = require('../../lib/utils/qq')
/** /**
* 解绑QQ * 解绑QQ
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq
...@@ -16,20 +12,11 @@ const { ...@@ -16,20 +12,11 @@ const {
*/ */
module.exports = async function () { module.exports = async function () {
const { uid } = this.authInfo const { uid } = this.authInfo
const { appId } = this.getUniversalClientInfo()
const qqPlatform = getQQPlatform.call(this)
await preUnBind.call(this, { await preUnBind.call(this, {
uid, uid,
unBindAccount: { unBindAccount: {
qq_openid: dbCmd.or([ qq_openid: dbCmd.exists(true),
{
[qqPlatform]: dbCmd.exists(true)
},
{
[`${qqPlatform}_${appId}`]: dbCmd.exists(true)
}
]),
qq_unionid: dbCmd.exists(true) qq_unionid: dbCmd.exists(true)
}, },
logType: LOG_TYPE.UNBIND_QQ logType: LOG_TYPE.UNBIND_QQ
......
...@@ -16,14 +16,12 @@ const { ...@@ -16,14 +16,12 @@ const {
*/ */
module.exports = async function () { module.exports = async function () {
const { uid } = this.authInfo const { uid } = this.authInfo
const weixinPlatform = getWeixinPlatform.call(this) // const weixinPlatform = getWeixinPlatform.call(this)
await preUnBind.call(this, { await preUnBind.call(this, {
uid, uid,
unBindAccount: { unBindAccount: {
wx_openid: { wx_openid: dbCmd.exists(true),
[weixinPlatform]: dbCmd.exists(true)
},
wx_unionid: dbCmd.exists(true) wx_unionid: dbCmd.exists(true)
}, },
logType: LOG_TYPE.UNBIND_WEIXIN logType: LOG_TYPE.UNBIND_WEIXIN
......
...@@ -117,11 +117,7 @@ module.exports = async function (params = {}) { ...@@ -117,11 +117,7 @@ module.exports = async function (params = {}) {
errCode: 0 errCode: 0
} }
} }
// 同一用户允许更新token_expired,不同用户在token_expired小于Date.now()时允许更新。搭配逻辑:用户退出登录时将token_expired置0
if (
deviceRecord.user_id === uid ||
(deviceRecord.token_expired < Date.now())
) {
await deviceCollection.where({ await deviceCollection.where({
device_id: deviceId device_id: deviceId
}).update({ }).update({
...@@ -133,9 +129,4 @@ module.exports = async function (params = {}) { ...@@ -133,9 +129,4 @@ module.exports = async function (params = {}) {
return { return {
errCode: 0 errCode: 0
} }
}
return {
errCode: ERROR.SYSTEM_ERROR
}
} }
...@@ -18,7 +18,7 @@ module.exports = async function (params = {}) { ...@@ -18,7 +18,7 @@ module.exports = async function (params = {}) {
} }
this.middleware.validate(params, schema) this.middleware.validate(params, schema)
const deviceId = this.getUniversalClientInfo().deviceId const { deviceId, platform } = this.getUniversalClientInfo()
const { const {
scene scene
} = params } = params
...@@ -29,6 +29,7 @@ module.exports = async function (params = {}) { ...@@ -29,6 +29,7 @@ module.exports = async function (params = {}) {
} }
return this.uniCaptcha.create({ return this.uniCaptcha.create({
deviceId, deviceId,
scene scene,
uniPlatform: platform
}) })
} }
...@@ -18,7 +18,8 @@ module.exports = async function (params = {}) { ...@@ -18,7 +18,8 @@ module.exports = async function (params = {}) {
} }
this.middleware.validate(params, schema) this.middleware.validate(params, schema)
const deviceId = this.getUniversalClientInfo().deviceId const { deviceId, platform } = this.getUniversalClientInfo()
const { const {
scene scene
} = params } = params
...@@ -29,6 +30,7 @@ module.exports = async function (params = {}) { ...@@ -29,6 +30,7 @@ module.exports = async function (params = {}) {
} }
return this.uniCaptcha.refresh({ return this.uniCaptcha.refresh({
deviceId, deviceId,
scene scene,
uniPlatform: platform
}) })
} }
{ {
"name": "uni-id-co", "name": "uni-id-co",
"version": "1.1.10", "version": "1.1.14",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"keywords": [], "keywords": [],
......
## 1.2.0(2023-04-27)
- 优化 微信小程序平台 使用微信新增 API getStableAccessToken 获取 access_token, access_token 有效期内重复调用该接口不会更新 access_token, [详情](https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getStableAccessToken.html)
## 1.1.5(2023-03-27) ## 1.1.5(2023-03-27)
- 修复 微信小程序平台 某些情况下 encrypt_key 插入错误的问题 - 修复 微信小程序平台 某些情况下 encrypt_key 插入错误的问题
## 1.1.4(2023-03-13) ## 1.1.4(2023-03-13)
......
{ {
"id": "uni-open-bridge-common", "id": "uni-open-bridge-common",
"displayName": "uni-open-bridge-common", "displayName": "uni-open-bridge-common",
"version": "1.1.5", "version": "1.2.0",
"description": "统一接管微信等三方平台认证凭据", "description": "统一接管微信等三方平台认证凭据",
"keywords": [ "keywords": [
"uni-open-bridge-common", "uni-open-bridge-common",
......
...@@ -20,8 +20,8 @@ class WeixinServer { ...@@ -20,8 +20,8 @@ class WeixinServer {
getAccessToken() { getAccessToken() {
return uniCloud.httpclient.request(WeixinServer.AccessToken_Url, { return uniCloud.httpclient.request(WeixinServer.AccessToken_Url, {
dataType: 'json', dataType: 'json',
method: 'GET', method: 'POST',
dataAsQueryString: true, contentType: 'json',
data: { data: {
appid: this._appid, appid: this._appid,
secret: this._secret, secret: this._secret,
...@@ -106,7 +106,7 @@ class WeixinServer { ...@@ -106,7 +106,7 @@ class WeixinServer {
} }
} }
WeixinServer.AccessToken_Url = 'https://api.weixin.qq.com/cgi-bin/token' WeixinServer.AccessToken_Url = 'https://api.weixin.qq.com/cgi-bin/stable_token'
WeixinServer.Code2Session_Url = 'https://api.weixin.qq.com/sns/jscode2session' WeixinServer.Code2Session_Url = 'https://api.weixin.qq.com/sns/jscode2session'
WeixinServer.User_Encrypt_Key_Url = 'https://api.weixin.qq.com/wxa/business/getuserencryptkey' WeixinServer.User_Encrypt_Key_Url = 'https://api.weixin.qq.com/wxa/business/getuserencryptkey'
WeixinServer.AccessToken_H5_Url = 'https://api.weixin.qq.com/cgi-bin/token' WeixinServer.AccessToken_H5_Url = 'https://api.weixin.qq.com/cgi-bin/token'
......
## 1.3.2(2023-05-04)
- 修复 NVUE 平台报错的问题
## 1.3.1(2021-11-23) ## 1.3.1(2021-11-23)
- 修复 init 方法初始化问题 - 修复 init 方法初始化问题
## 1.3.0(2021-11-19) ## 1.3.0(2021-11-19)
......
...@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation') ...@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
class MPAnimation { class MPAnimation {
constructor(options, _this) { constructor(options, _this) {
this.options = options this.options = options
this.animation = uni.createAnimation(options) // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
this.animation = uni.createAnimation({
...options
})
this.currentStepAnimates = {} this.currentStepAnimates = {}
this.next = 0 this.next = 0
this.$ = _this this.$ = _this
......
<template> <template>
<!-- #ifndef APP-NVUE -->
<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view> <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
</template> </template>
<script> <script>
...@@ -48,7 +53,11 @@ export default { ...@@ -48,7 +53,11 @@ export default {
customClass:{ customClass:{
type: String, type: String,
default: '' default: ''
} },
onceRender:{
type:Boolean,
default:false
},
}, },
data() { data() {
return { return {
......
{ {
"id": "uni-transition", "id": "uni-transition",
"displayName": "uni-transition 过渡动画", "displayName": "uni-transition 过渡动画",
"version": "1.3.1", "version": "1.3.2",
"description": "元素的简单过渡动画", "description": "元素的简单过渡动画",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -17,11 +17,7 @@ ...@@ -17,11 +17,7 @@
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
...@@ -38,7 +34,8 @@ ...@@ -38,7 +34,8 @@
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-scss"], "dependencies": ["uni-scss"],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册