diff --git a/README.md b/README.md
index ecb2024bcfb22494e257a33dff132e560b19f27b..f0751c7253d1e72a965c0aab04b37080737f978b 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
地址:[https://codechina.csdn.net/dcloud/uni-starter.git](https://codechina.csdn.net/dcloud/uni-starter.git)
#### 项目背景
-我们一直想出一个结合uni-app、uniCloud和openDB以及uni-id和uniCloud admin等,uni全家桶的项目模板;
+在过去我们会收集到开发者,咨询的各种问题,其中我们总结了高频。我们一直想出一个结合uni-app、uniCloud和openDB以及uni-id和uniCloud admin等,uni全家桶的项目模板;
为了照顾各类应用的开发者,我们取交集最终罗列了如下功能,发现这些就是除业务逻辑外的项目基本功能并把它命名为`uni-starter`。
uni-starter将节省开发者大量的时间,让开发者集中精力在自己的特色业务上。
有了uni-starter,再加上schema2code生成前端页面,一个简单应用就可以快速完成。
diff --git a/common/appInit.js b/common/appInit.js
index 9dc4b6ead5ae9bd38dbbd42bee922a3334a8a16e..3153514f47f858486c3f46fde948d004cded5516 100644
--- a/common/appInit.js
+++ b/common/appInit.js
@@ -34,9 +34,9 @@ export default function() {
const url = e.url.split('?')[0]
//拦截强制登陆页面
if (needLogin.includes(url) && token == '') {
- console.log('该页面需要登陆,即将跳转到login页面');
+ console.log('该页面需要登陆才能访问,请先登陆');
uni.showToast({
- title: '该页面需要登陆,即将跳转到login页面',
+ title: '该页面需要登陆才能访问,请先登陆',
icon: 'none'
})
uni.navigateTo({
diff --git a/components/uni-quick-login/uni-quick-login.vue b/components/uni-quick-login/uni-quick-login.vue
index 4278203f17af917ae96dc82e245b37d9dcbdf09e..1d6fd7653bda024ec9eb7a5a1bb3e1b73a0dee92 100644
--- a/components/uni-quick-login/uni-quick-login.vue
+++ b/components/uni-quick-login/uni-quick-login.vue
@@ -170,17 +170,17 @@
})
}
},
- login_before(type, navigateBack = true) {
+ login_before(type, navigateBack = true) {
if(!this.agree){
return uni.showToast({
title: '你未同意隐私政策协议',
icon: 'none'
});
}
-
- console.log(arguments);
+ uni.showLoading()
+ // console.log(arguments);
let oauthService = this.oauthServices.find((service) => service.id == type)
- console.log(type);
+ // console.log(type);
// #ifdef APP-PLUS
//请勿直接使用前端获取的unionid或openid直接用于登陆,前端的数据都是不可靠的
@@ -211,11 +211,12 @@
if (type == 'apple') {
let res = await this.getUserInfo({
provider: "apple"
- })
+ })
+ uni.hideLoading()
Object.assign(e.authResult, res.userInfo)
}
// #ifdef MP-WEIXIN
- if (type == 'weixin') {
+ if (type == 'weixin') {
return this.login({
code: e.code
}, type)
@@ -275,8 +276,6 @@
delete result.userInfo.token
this.setUserInfo(result.userInfo)
}
- }, {
- showLoading: true
})
},
async getUserInfo(e) {
diff --git a/pages/ucenter/ucenter.vue b/pages/ucenter/ucenter.vue
index 06de281900709f5d7c9e2d42360d867c553446a1..a0ed33e925ae3f27f51cc387d2b317c5d86009f7 100644
--- a/pages/ucenter/ucenter.vue
+++ b/pages/ucenter/ucenter.vue
@@ -6,9 +6,9 @@
{{userInfo.nickname||userInfo.username||userInfo.mobile||'未登录'}}
-
+
-
+
{{item.text}}
@@ -57,10 +57,6 @@
{
"text": "文字4",
"icon": "download"
- },
- {
- "text": "文字5",
- "icon": "paperplane"
}
],
ucenterList: [
diff --git a/static/uni-center/defaultAvatarUrl.png b/static/uni-center/defaultAvatarUrl.png
index ed018bff3aacf48696d06378acc0c8acfc37b860..c3d33188b94e4843e0311836ffb0fd843195ae4e 100644
Binary files a/static/uni-center/defaultAvatarUrl.png and b/static/uni-center/defaultAvatarUrl.png differ
diff --git a/uni-starter.config.js b/uni-starter.config.js
index 75fb53610eab8f67eafdd9c8cc951bbdd2fd36cf..47d4343fb5af9a38cd6db53240951dc0f7293413 100644
--- a/uni-starter.config.js
+++ b/uni-starter.config.js
@@ -23,7 +23,8 @@ module.exports = {
"needLogin": [
"/pages/ucenter/userinfo/userinfo",
"/uni_modules/uni-news-favorite/pages/uni-news-favorite/list",
- "/pages/ucenter/userinfo/uploadCutImageToUnicloud"
+ "/pages/ucenter/userinfo/uploadCutImageToUnicloud",
+ "/uni_modules/opendb-feedback/pages/opendb-feedback/add"
],
"login": ["smsCode","univerify", "username", "weixin", "apple"],
/*
diff --git a/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json b/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
index 0f29d0d2da6d19fa6d2147dfd4ef13e62e80210d..7ed1749716b77e669a198d8d8ea401d7c961505e 100644
--- a/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
+++ b/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
@@ -1,52 +1,52 @@
-{
- "passwordSecret": "passwordSecret-demo",
- "tokenSecret": "tokenSecret-demo",
- "tokenExpiresIn": 7200,
- "tokenExpiresThreshold": 600,
- "passwordErrorLimit": 6,
- "bindTokenToDevice": true,
- "passwordErrorRetryTime": 3600,
- "autoSetInviteCode": false,
- "forceInviteCode": false,
- "app-plus": {
- "tokenExpiresIn": 2592000,
- "oauth": {
- "weixin": {
- "appid": "",
- "appsecret": ""
- },
- "apple": {
- "bundleId": ""
- }
- }
- },
- "mp-weixin": {
- "oauth": {
- "weixin": {
- "appid": "",
- "appsecret": ""
- }
- }
- },
- "mp-alipay": {
- "oauth": {
- "alipay": {
- "appid": "alipay appid",
- "privateKey": "alipay privateKey"
- }
- }
- },
- "service": {
- "sms": {
- "name": "DCloud",
- "codeExpiresIn": 300,
- "smsKey": "",
- "smsSecret": ""
- },
- "univerify": {
- "appid": "",
- "apiKey": "",
- "apiSecret": ""
- }
- }
-}
+{
+ "passwordSecret": "passwordSecret-demo",
+ "tokenSecret": "tokenSecret-demo",
+ "tokenExpiresIn": 7200,
+ "tokenExpiresThreshold": 600,
+ "passwordErrorLimit": 6,
+ "bindTokenToDevice": true,
+ "passwordErrorRetryTime": 3600,
+ "autoSetInviteCode": false,
+ "forceInviteCode": false,
+ "app-plus": {
+ "tokenExpiresIn": 2592000,
+ "oauth": {
+ "weixin": {
+ "appid": "wxffdd8fa6ec4ef2a0",
+ "appsecret": "6c9119430d7be0a147bcbbb73ef33acf"
+ },
+ "apple": {
+ "bundleId": "io.dcloud.hellouniapp"
+ }
+ }
+ },
+ "mp-weixin": {
+ "oauth": {
+ "weixin": {
+ "appid": "wx81dbb061d2258234",
+ "appsecret": "73be6e8b8b31b7b0783fe448cc1fe820"
+ }
+ }
+ },
+ "mp-alipay": {
+ "oauth": {
+ "alipay": {
+ "appid": "alipay appid",
+ "privateKey": "alipay privateKey"
+ }
+ }
+ },
+ "service": {
+ "sms": {
+ "name": "DCloud",
+ "codeExpiresIn": 300,
+ "smsKey": "71a19f38c954f7d768d68a050486bf15",
+ "smsSecret": "d6c424b702d73baa3b6e1a1452469213"
+ },
+ "univerify": {
+ "appid": "__UNI__03B096E",
+ "apiKey": "3fc28519d90d74173bcecf2daf4ffcc4",
+ "apiSecret": "dd793e5bc4b372ce932f35bbb4c5d61b"
+ }
+ }
+}
\ No newline at end of file