diff --git a/changelog.md b/changelog.md
index 824b0ad363030bf9fc6e3a09496bae3e7494907e..69e42d5e133497d3cce22ba0380269fd9fb9fb32 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,7 @@
+## 1.0.12(2021-05-28)
+修复拦截器在ios app端会报错:Unhandled promise...的问题
+## 1.0.10(2021-05-27)
+新增callfunction的拦截器废除this.request的写法。为callFunction添加:请求失败是否断网判断并提示、恢复网络自动重新执行、自动处理响应体,目前处理了403为token过期自动跳转到登陆页面,今后会添加更多的自动行为、自动延续token过期时间
## 1.0.9(2021-05-23)
修复变量被重复定义的问题
## 1.0.8(2021-05-22)
diff --git a/common/appInit.js b/common/appInit.js
index 5b55b624b970e01983ac8058a92d86f5d7134d78..95176a8bdd7602d16da2baa1b8e27a32d6f05fdd 100644
--- a/common/appInit.js
+++ b/common/appInit.js
@@ -155,6 +155,7 @@ export default function() {
list.forEach(item => { //用遍历的方式分别为,uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
uni.addInterceptor(item, {
invoke(e) { // 调用前拦截
+ console.log(e);
//获取用户的token
const token = uni.getStorageSync('uni_id_token')
//获取当前页面路径(即url去掉"?"和"?"后的参数)
@@ -180,9 +181,10 @@ export default function() {
title: '请先登录',
icon: 'none'
})
- return uni.navigateTo({
+ uni.navigateTo({
url: "/pages/ucenter/login-page/index/index"
})
+ return false
}
}
},
diff --git a/components/uni-quick-login/uni-quick-login.vue b/components/uni-quick-login/uni-quick-login.vue
index 3ccfcd2b9093418b360df1f1de145468e8cadca1..69406fe32040cf86d0f391ec9fa4f420c205465a 100644
--- a/components/uni-quick-login/uni-quick-login.vue
+++ b/components/uni-quick-login/uni-quick-login.vue
@@ -119,7 +119,7 @@
oauthServices.forEach(({
id
}) => {
- console.log(9527,id);
+ // console.log(9527,id);
if (this.config[id].isChecked&&this.loginConfig.includes(id)) {
this.servicesList.push({
...this.config[id],
diff --git a/package.json b/package.json
index 5424ed06532918fd7cbbdf7b0f67e00f0e438467..921eacb2c54f350969783e18b4d8394bbdf6bc5d 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-starter",
"displayName": "uni-starter",
- "version": "1.0.9",
+ "version": "1.0.12",
"description": "云端一体应用快速开发模版",
"keywords": [
"uni-starter",
@@ -12,7 +12,7 @@
],
"repository": "https://codechina.csdn.net/dcloud/uni-starter.git",
"engines": {
- "HBuilderX": "^3.1.14"
+ "HBuilderX": "^3.1.16"
},
"dcloudext": {
"category": [
diff --git a/pages/ucenter/userinfo/userinfo.vue b/pages/ucenter/userinfo/userinfo.vue
index 5645b3a745baf1bc04551fa8b31cb1ce45c67832..8117e63898040883515e3f1efcf676a3eb496c52 100644
--- a/pages/ucenter/userinfo/userinfo.vue
+++ b/pages/ucenter/userinfo/userinfo.vue
@@ -1,17 +1,23 @@
-
+
- 头像
-
+
+ 头像
+
+
+
-
-
+
+
+
+
-
+
@@ -52,16 +58,16 @@
uni.preLogin({
provider: 'univerify',
success: this.univerify(), //预登录成功
- fail:(res)=> { // 预登录失败
+ fail: (res) => { // 预登录失败
// 不显示一键登录选项(或置灰)
- console.log(res)
+ console.log(res)
this.bindMobileBySmsCode()
}
})
// #endif
// #ifndef APP-PLUS
- this.bindMobileBySmsCode()
- //...去用验证码绑定
+ this.bindMobileBySmsCode()
+ //...去用验证码绑定
// #endif
},
univerify() {
@@ -88,19 +94,23 @@
// });
// }
// }
- // )
- uniCloud.callFunction({
- name:'uni-id-cf',
- data:{
- action:'bind_mobile_by_univerify',
- params:e.authResult,
- },
- success: ({result}) => {
+ // )
+ uniCloud.callFunction({
+ name: 'uni-id-cf',
+ data: {
+ action: 'bind_mobile_by_univerify',
+ params: e.authResult,
+ },
+ success: ({
+ result
+ }) => {
console.log(result);
- if(result.code===0){
- this.setUserInfo({"mobile":result.mobile})
+ if (result.code === 0) {
+ this.setUserInfo({
+ "mobile": result.mobile
+ })
uni.closeAuthView()
- }else{
+ } else {
uni.showModal({
content: JSON.stringify(result.msg),
showCancel: false,
@@ -108,13 +118,13 @@
uni.closeAuthView()
}
});
- }
- }
+ }
+ }
})
},
fail: (err) => {
console.log(err);
- if(err.code=='30002'){
+ if (err.code == '30002') {
this.bindMobileBySmsCode()
}
}
@@ -122,11 +132,11 @@
},
bindMobileBySmsCode() {
uni.navigateTo({
- url:'/pages/ucenter/userinfo/bind-mobile/bind-mobile'
+ url: '/pages/ucenter/userinfo/bind-mobile/bind-mobile'
})
},
setNickname(nickname) {
- console.log(9527,nickname);
+ console.log(9527, nickname);
if (nickname) {
usersTable.where('_id==$env.uid').update({
nickname
@@ -209,9 +219,10 @@
justify-content: space-between;
align-items: center;
}
+
.avatarUrl {
width: 50px;
height: 50px;
border-radius: 6px;
}
-
+
diff --git a/uniCloud-aliyun/database/uni-id-users.schema.json b/uniCloud-aliyun/database/uni-id-users.schema.json
index 9cfec77806e42a1df3f05393e0c56e8eede8ccd9..d0a315d7cf42a00cce6fd34ece6fac3cadce7825 100644
--- a/uniCloud-aliyun/database/uni-id-users.schema.json
+++ b/uniCloud-aliyun/database/uni-id-users.schema.json
@@ -23,6 +23,11 @@
"description": "头像地址",
"title": "头像地址",
"trim": "both"
+ },
+ "avatar_file": {
+ "bsonType": "file",
+ "title": "头像文件",
+ "description": "用file类型方便使用uni-file-picker组件"
},
"comment": {
"bsonType": "string",
diff --git a/uni_modules/uni-file-picker/changelog.md b/uni_modules/uni-file-picker/changelog.md
index 8f89126108297034d255489268480d2a556b56fd..1f3a25ca04d6e9f16052416596c5e1db38bfe340 100644
--- a/uni_modules/uni-file-picker/changelog.md
+++ b/uni_modules/uni-file-picker/changelog.md
@@ -1,9 +1,11 @@
-## 0.0.6(2021-04-09)
-- 修复 选择的文件非 file-extname 字段指定的扩展名报错的Bug
-## 0.0.5(2021-04-09)
-- 优化 更新组件示例
-## 0.0.4(2021-04-09)
-- 优化 file-extname 字段支持字符串写法,多个扩展名需要用逗号分隔
-## 0.0.3(2021-02-05)
-- 调整为uni_modules目录规范
-- 修复 微信小程序不指定 fileExtname 属性选择失败的Bug
+## 0.0.7(2021-05-12)
+- 新增 组件示例地址
+## 0.0.6(2021-04-09)
+- 修复 选择的文件非 file-extname 字段指定的扩展名报错的Bug
+## 0.0.5(2021-04-09)
+- 优化 更新组件示例
+## 0.0.4(2021-04-09)
+- 优化 file-extname 字段支持字符串写法,多个扩展名需要用逗号分隔
+## 0.0.3(2021-02-05)
+- 调整为uni_modules目录规范
+- 修复 微信小程序不指定 fileExtname 属性选择失败的Bug
diff --git a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
index 370d98e4e0da161c4a0aca9e5d78fea5dc446ce3..97ffb5012e37936ba91b8fa6566aef1b4db34950 100644
--- a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
+++ b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
@@ -39,11 +39,15 @@
-