diff --git a/README.md b/README.md
index 15b54e2f2ffc49df0ede0f7770d047492e72ed0c..536d6062ac476f35aa47bb2f850c9346895bd755 100644
--- a/README.md
+++ b/README.md
@@ -95,7 +95,7 @@ uni-starter + uniCloud admin,应用开发从未如此简单快捷!
- 短信登陆:
+ 使用本功能需要在[DCloud开发者中心](https://dev.dcloud.net.cn/uniSms)开通并充值
+ 教程参考[短信服务开通指南](https://ask.dcloud.net.cn/article/37534)
- + 修改短信注册/登陆发生验证码的模板id,在文件`/uniCloud-aliyun/cloudfunctions/user-center/index.js` 搜索 `const templateId = '11753'` 替换为自己申请的模板id
+ + 修改短信注册/登陆发生验证码的模板id,在文件`/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js` 搜索 `const templateId = '11753'` 替换为自己申请的模板id
- 一键登录:
+ [开通配置](https://dev.dcloud.net.cn/uniLogin)
+ [使用指南](https://uniapp.dcloud.io/univerify)
@@ -301,7 +301,7 @@ uni-starter
│ │ | | └─file.cert uni-id依赖的配置文件,假如你使用微信发红包功能,需要的证书文件就是放到这里
│ | | └───uni-id uni-id用户体系 详情
│ | ├─uni-analyse-searchhot 云端一体搜索模板依赖的云函数 详情
-│ | └─user-center 用户中心云函数,实现用户注册、修改密码、发送验证码、快捷登录(微信、短信、账户、一键登录)
+│ | └─uni-id-cf 用户中心云函数,实现用户注册、修改密码、发送验证码、快捷登录(微信、短信、账户、一键登录)
│ └──database 云数据目录
│ ├─db_init.json db_init.json初始化数据库文件,其中不再包含schema 详情
│ ├─opendb-app-versions.schema.json 应用版本,表结构文件
diff --git a/changelog.md b/changelog.md
index 69614f48ea36022f36a38cfd856ebf43027cd913..6d6ac858ca7d84bac06cb92afa2dfb0f6f7f7b61 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,6 @@
+## 1.0.2(2021-05-17)
+添加 uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json 文件
## 1.0.1(2021-05-17)
manifest.json 在小程序平台增加了一个配置项 betterScopedSlots,启用新的作用域插槽编译,用于支持作用域插槽内使用复杂表达式。
## 1.0.0(2021-05-17)
-第一版
+第一版
\ No newline at end of file
diff --git a/components/uni-quick-login/uni-quick-login.vue b/components/uni-quick-login/uni-quick-login.vue
index cba3b49ef6087954bec85ed67fd99b54d22d700d..6937252b4b5e9dcaefe99dc78e792567c2b259e9 100644
--- a/components/uni-quick-login/uni-quick-login.vue
+++ b/components/uni-quick-login/uni-quick-login.vue
@@ -265,7 +265,7 @@
params,
type
});
- this.request('user-center/login_by_' + type, params, result => {
+ this.request('uni-id-cf/login_by_' + type, params, result => {
console.log(result);
if (result.code === 0) {
if (type == 'univerify') {
diff --git a/components/uni-send-sms-code/uni-send-sms-code.vue b/components/uni-send-sms-code/uni-send-sms-code.vue
index 3b4bcebe0788c1f3b8c51ee1482d9504d394f3d4..ee7046dbad202863e016cc6164acafec878711be 100644
--- a/components/uni-send-sms-code/uni-send-sms-code.vue
+++ b/components/uni-send-sms-code/uni-send-sms-code.vue
@@ -75,7 +75,7 @@
icon: 'none'
});
- this.request('user-center/sendSmsCode',
+ this.request('uni-id-cf/sendSmsCode',
{
"mobile": this.phone,
"type": this.codeType
diff --git a/package.json b/package.json
index 9ebd794ee256eb66eb13324c0781b63ebe3a1098..f696263ae0976f730209c96a7c20d6c8a1cf4da4 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
{
"id": "uni-starter",
"displayName": "uni-starter",
- "version": "1.0.1",
- "description": "集成了商用项目开发常见功能的项目模板",
+ "version": "1.0.2",
+ "description": "一个集成了商用项目开发常见功能的项目模板",
"keywords": [
"uni-starter",
"login",
diff --git a/pages/ucenter/login-page/phone-code/phone-code.vue b/pages/ucenter/login-page/phone-code/phone-code.vue
index ec66c3708d883077fdd1ab8eb5e7d25fcb0c547f..f25be35f602f7969c929e1a0bbd39bac73e7c9a3 100644
--- a/pages/ucenter/login-page/phone-code/phone-code.vue
+++ b/pages/ucenter/login-page/phone-code/phone-code.vue
@@ -42,7 +42,7 @@
},
methods: {
submit(){ //完成并提交
- this.request('user-center/loginBySms',
+ this.request('uni-id-cf/loginBySms',
{
"mobile":this.phone,
"code":this.code
diff --git a/pages/ucenter/login-page/pwd-login/pwd-login.vue b/pages/ucenter/login-page/pwd-login/pwd-login.vue
index 2093122f58c7293a551b2cfe8498393e01f9edc7..f68e99e936613deb9f5c54f7246d92990a4c2edb 100644
--- a/pages/ucenter/login-page/pwd-login/pwd-login.vue
+++ b/pages/ucenter/login-page/pwd-login/pwd-login.vue
@@ -5,10 +5,10 @@
-
-
-
-
+
+
+
+
@@ -28,8 +28,8 @@
return {
"password": "",
"username": "",
- "agree": false,
- "captchaBase64":"",
+ "agree": false,
+ "captchaBase64":"",
"captcha":""
}
},
@@ -63,9 +63,9 @@
});
}
// 下边是可以登录
- this.request('user-center/login', {
+ this.request('uni-id-cf/login', {
"username": this.username,
- "password": this.password,
+ "password": this.password,
"captcha":this.captcha
}, result => {
console.log(result);
@@ -73,32 +73,32 @@
this.loginSuccess(result)
} else {
if (result.needCaptcha) {
- uni.showToast({
- title: result.msg,
- icon: 'none'
- });
+ uni.showToast({
+ title: result.msg,
+ icon: 'none'
+ });
this.createCaptcha()
- }else{
- uni.showModal({
- title: '错误',
- content: result.msg,
- showCancel: false,
- confirmText: '知道了'
- });
+ }else{
+ uni.showModal({
+ title: '错误',
+ content: result.msg,
+ showCancel: false,
+ confirmText: '知道了'
+ });
}
}
})
- },
- createCaptcha(){
- this.request(
- 'user-center/createCaptcha', {
- scene: "login"
- },
- result => {
- if (result.code === 0) {
- this.captchaBase64 = result.captchaBase64
- }
- })
+ },
+ createCaptcha(){
+ this.request(
+ 'uni-id-cf/createCaptcha', {
+ scene: "login"
+ },
+ result => {
+ if (result.code === 0) {
+ this.captchaBase64 = result.captchaBase64
+ }
+ })
},
/* 前往注册 */
toRegister(e) {
@@ -131,17 +131,17 @@
.toRegister {
margin-top: 80px;
width: 600rpx;
- }
- .captcha-box{
- flex-direction: row;
- align-items: center;
- justify-content: flex-end;
- }
- .captcha-img{
- margin:15px 15px 0 0;
- width: 250rpx;
- }
- .captcha{
- width: 350rpx;
}
-
+ .captcha-box{
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-end;
+ }
+ .captcha-img{
+ margin:15px 15px 0 0;
+ width: 250rpx;
+ }
+ .captcha{
+ width: 350rpx;
+ }
+
diff --git a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
index 465e069ae439b92f17a71618f8eafdb1684a66e7..f2fc7695cd519f479b6d7bf7ec6ff18539d55058 100644
--- a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
+++ b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
@@ -95,7 +95,7 @@
}
]
}
- }
+ }
}
},
computed: {
@@ -120,7 +120,7 @@
},
onLoad(event) {
if (event && event.phoneNumber) {
- this.formData.phone = event.phoneNumber;
+ this.formData.phone = event.phoneNumber;
}
},
onReady() {
@@ -135,7 +135,7 @@
submit() {
this.$refs.form.submit()
.then(res => {
- this.request('user-center/resetPwdBySmsCode', {
+ this.request('uni-id-cf/resetPwdBySmsCode', {
"mobile": this.formData.phone,
"code": this.formData.code,
"password": this.formData.pwd
@@ -159,6 +159,6 @@
@import url("../common/login-page.css");
.content{
- padding-top: 36rpx;
+ padding-top: 36rpx;
}
diff --git a/pages/ucenter/login-page/register/register.vue b/pages/ucenter/login-page/register/register.vue
index 092f1c59a882e683b75dfd71dc2a6c35558fa528..90445c3e01e38879faab4685a2c221dcdafea4ee 100644
--- a/pages/ucenter/login-page/register/register.vue
+++ b/pages/ucenter/login-page/register/register.vue
@@ -32,7 +32,7 @@ import mixin from '../common/login-page.mixin.js';
'password':'',
'pwd2':''
},
- rules,
+ rules,
agree:false
}
},
@@ -43,12 +43,12 @@ import mixin from '../common/login-page.mixin.js';
/**
* 触发表单提交
*/
- submit() {
- if(!this.agree){
- return uni.showToast({
- title: '你未同意隐私政策协议',
- icon: 'none'
- });
+ submit() {
+ if(!this.agree){
+ return uni.showToast({
+ title: '你未同意隐私政策协议',
+ icon: 'none'
+ });
}
uni.showLoading({
mask: true
@@ -63,7 +63,7 @@ import mixin from '../common/login-page.mixin.js';
})
},
submitForm(value) {
- this.request('user-center/register',value,result=>{
+ this.request('uni-id-cf/register',value,result=>{
console.log(result);
if(result.code === 0){
this.loginSuccess(result)
diff --git a/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue b/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
index 66ec7ae9a1d30712436576bafab417f163cd4663..1469894167e25e8cb293c9cc936f55ce0750b0af 100644
--- a/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
+++ b/pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
@@ -48,7 +48,7 @@
*/
submit() {
console.log(this.formData);
- this.request('user-center/bind_mobile_by_sms', {
+ this.request('uni-id-cf/bind_mobile_by_sms', {
"mobile": this.formData.phone,
"code": this.formData.code
}, result=> {
@@ -79,7 +79,7 @@
height: 50px;
}
- .input-box {
+ .input-box {
width: 100%;
margin-top: 16px;
background-color: #f9f9f9;
diff --git a/pages/ucenter/userinfo/userinfo.vue b/pages/ucenter/userinfo/userinfo.vue
index 364dc544700980340df5941d981e218d223639f9..c63e1fddc454cf5693e5c5ab078f158556e0e9bd 100644
--- a/pages/ucenter/userinfo/userinfo.vue
+++ b/pages/ucenter/userinfo/userinfo.vue
@@ -69,7 +69,7 @@
"univerifyStyle": this.univerifyStyle,
success: async e => {
console.log(e.authResult);
- this.request('user-center/bind_mobile_by_univerify',
+ this.request('uni-id-cf/bind_mobile_by_univerify',
e.authResult,
result=>
{
diff --git a/uniCloud-aliyun/cloudfunctions/user-center/index.js b/uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js
similarity index 100%
rename from uniCloud-aliyun/cloudfunctions/user-center/index.js
rename to uniCloud-aliyun/cloudfunctions/uni-id-cf/index.js
diff --git a/uniCloud-aliyun/cloudfunctions/user-center/package-lock.json b/uniCloud-aliyun/cloudfunctions/uni-id-cf/package-lock.json
similarity index 98%
rename from uniCloud-aliyun/cloudfunctions/user-center/package-lock.json
rename to uniCloud-aliyun/cloudfunctions/uni-id-cf/package-lock.json
index bcc23fb807bfa545cdf5b4049d7918cf3114a1b6..df152b55570eebb2011a923f91ecf93c8dc75ef1 100644
--- a/uniCloud-aliyun/cloudfunctions/user-center/package-lock.json
+++ b/uniCloud-aliyun/cloudfunctions/uni-id-cf/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "user-center",
+ "name": "uni-id-cf",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
diff --git a/uniCloud-aliyun/cloudfunctions/user-center/package.json b/uniCloud-aliyun/cloudfunctions/uni-id-cf/package.json
similarity index 95%
rename from uniCloud-aliyun/cloudfunctions/user-center/package.json
rename to uniCloud-aliyun/cloudfunctions/uni-id-cf/package.json
index 927edab70d05b8494a745a16a70144f613b2859f..d3c8e6de716c471d8554c5aeb3a6257dce93e750 100644
--- a/uniCloud-aliyun/cloudfunctions/user-center/package.json
+++ b/uniCloud-aliyun/cloudfunctions/uni-id-cf/package.json
@@ -1,5 +1,5 @@
{
- "name": "user-center",
+ "name": "uni-id-cf",
"version": "1.0.0",
"description": "",
"main": "index.js",