diff --git a/pages/index/index.vue b/pages/index/index.vue
index a83ec0f1d023e1a441af3abfc290e76d867d697d..fcaa8ec092cd40b3d1d19a1f1fc16c6b59bd9878 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -26,12 +26,12 @@
"value": "smsCode",
"text": "手机验证码"
}, {
- "value": "apple",
- "text": "苹果登录"
- }, {
- "value": "weixinMobile",
- "text": "微信手机号登录"
- }]
+ "value": "apple",
+ "text": "苹果登录"
+ }, {
+ "value": "weixinMobile",
+ "text": "微信手机号登录"
+ }]
}
},
onLoad() {},
diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md
index 5041d4afd29422f7aa79b9061e0ec44e6ca1ecac..054b06318eb7fec93103686fe74723bee3c72638 100644
--- a/uni_modules/uni-id-pages/changelog.md
+++ b/uni_modules/uni-id-pages/changelog.md
@@ -1,3 +1,5 @@
+## 1.0.37(2022-12-09)
+- 优化admin端样式
## 1.0.36(2022-12-08)
- uni-id-co 优化 手机号与邮箱验证规则为空字符串时不校验
- uni-id-co 修复 `updateUser` 接口部分参数为空时数据修改异常
diff --git a/uni_modules/uni-id-pages/common/login-page.mixin.js b/uni_modules/uni-id-pages/common/login-page.mixin.js
index b5164a3510f7b327b03b4bd7cc65702334e9a9aa..26936dba049ffa8db2c1fd05e28aa637d9f8323a 100644
--- a/uni_modules/uni-id-pages/common/login-page.mixin.js
+++ b/uni_modules/uni-id-pages/common/login-page.mixin.js
@@ -36,7 +36,7 @@ let mixin = {
})
}
this.$nextTick(n => {
- console.log(this.$refs.uniFabLogin);
+ // console.log(this.$refs.uniFabLogin);
this.$refs.uniFabLogin.login({
code:e.code
}, 'weixin')
diff --git a/uni_modules/uni-id-pages/common/login-page.scss b/uni_modules/uni-id-pages/common/login-page.scss
index 3f5516681ddcb703e42770857530597a2a6df22a..452b2d8d282d8e3f644ecc0899f88c9014eaae53 100644
--- a/uni_modules/uni-id-pages/common/login-page.scss
+++ b/uni_modules/uni-id-pages/common/login-page.scss
@@ -115,9 +115,10 @@
text-align: center;
height: 40px;
line-height: 40px;
- margin: 15px 0 0 0;
+ margin: 15px 0 10px 0;
color: #FFF !important;
border-radius: 5px;
+ font-size: 16px;
}
.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd{
diff --git a/uni_modules/uni-id-pages/common/store.js b/uni_modules/uni-id-pages/common/store.js
index 071ec268ec85d5980cc9d8e6c88f712b31cfcf54..6676e120ba66d990ebc07aff73b1e4730013341f 100644
--- a/uni_modules/uni-id-pages/common/store.js
+++ b/uni_modules/uni-id-pages/common/store.js
@@ -6,20 +6,20 @@ const db = uniCloud.database();
const usersTable = db.collection('uni-id-users')
let hostUserInfo = uni.getStorageSync('uni-id-pages-userInfo')||{}
-console.log( hostUserInfo);
+// console.log( hostUserInfo);
const data = {
userInfo: hostUserInfo,
hasLogin: Object.keys(hostUserInfo).length != 0
}
-console.log('data', data);
+// console.log('data', data);
// 定义 mutations, 修改属性
export const mutations = {
// data不为空,表示传递要更新的值(注意不是覆盖是合并),什么也不传时,直接查库获取更新
async updateUserInfo(data = false) {
if (data) {
usersTable.where('_id==$env.uid').update(data).then(e => {
- console.log(e);
+ // console.log(e);
if (e.result.updated) {
uni.showToast({
title: "更新成功",
@@ -41,7 +41,7 @@ export const mutations = {
let res = await usersTable.where("'_id' == $cloudEnv_uid")
.field('mobile,nickname,username,email,avatar_file')
.get()
- console.log('fromDbData',res.result.data);
+ // console.log('fromDbData',res.result.data);
this.setUserInfo(res.result.data[0])
} catch (e) {
this.setUserInfo({},{cover:true})
@@ -50,11 +50,11 @@ export const mutations = {
}
},
async setUserInfo(data, {cover}={cover:false}) {
- console.log('set-userInfo', data);
+ // console.log('set-userInfo', data);
let userInfo = cover?data:Object.assign(store.userInfo,data)
store.userInfo = Object.assign({},userInfo)
store.hasLogin = Object.keys(store.userInfo).length != 0
- console.log('store.userInfo', store.userInfo);
+ // console.log('store.userInfo', store.userInfo);
uni.setStorage({
key: "uni-id-pages-userInfo",
data:store.userInfo
@@ -90,7 +90,7 @@ export const mutations = {
}
// #ifdef H5
if (e.loginType == 'weixin') {
- console.log('window.history', window.history);
+ // console.log('window.history', window.history);
return window.history.go(-3)
}
// #endif
@@ -110,10 +110,7 @@ export const mutations = {
const {
showToast = true, toastText = '登录成功', autoBack = true, uniIdRedirectUrl = '', passwordConfirmed
} = e
- console.log({
- toastText,
- autoBack
- });
+ // console.log({toastText,autoBack});
if (showToast) {
uni.showToast({
title: toastText,
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue b/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
index 3f452388b5d1fe1b0e035efd29ca86b5726cc820..e9b3ae1ab285cb8bd3da8333f083c145fc50c00d 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
@@ -48,7 +48,7 @@
async mounted() {
// #ifdef H5
this.isPC = !['ios', 'android'].includes(uni.getSystemInfoSync().platform);
- console.log(' this.isPC', this.isPC, uni.getSystemInfoSync().platform);
+ // console.log(' this.isPC', this.isPC, uni.getSystemInfoSync().platform);
// #endif
},
computed: {
@@ -68,7 +68,7 @@
mutations.updateUserInfo({avatar_file})
},
uploadAvatarImg(res) {
- console.log(this.hasLogin);
+ // console.log(this.hasLogin);
if(!this.hasLogin){
return uni.navigateTo({
url:'/uni_modules/uni-id-pages/pages/login/login-withoutpwd'
@@ -84,7 +84,7 @@
count: 1,
crop,
success: async (res) => {
- console.log(res);
+ // console.log(res);
let tempFile = res.tempFiles[0],
avatar_file = {
// #ifdef H5
@@ -109,13 +109,13 @@
}
},
complete(e) {
- console.log(e);
+ // console.log(e);
}
});
})
}
// #endif
- console.log(this.userInfo);
+ // console.log(this.userInfo);
let cloudPath = this.userInfo._id + '' + Date.now()
avatar_file.name = cloudPath
uni.showLoading({
@@ -131,9 +131,7 @@
});
// console.log(result)
avatar_file.url = fileID
- console.log({
- avatar_file
- });
+ // console.log({avatar_file});
uni.hideLoading()
this.setAvatarFile(avatar_file)
}
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue b/uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
index 770cb74a33958b70686fe2a399de7765c6af1e47..5f0b5f05e1c1af5b315ef3f73e0999bb0412def7 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
@@ -28,12 +28,12 @@
uni.showLoading({ mask: true })
wx.checkSession({
success() {
- console.log('session_key 未过期');
+ // console.log('session_key 未过期');
resolve()
uni.hideLoading()
},
fail() {
- console.log('session_key 已经失效,正在执行更新');
+ // console.log('session_key 已经失效,正在执行更新');
wx.login({
success({
code
@@ -41,13 +41,13 @@
uniCloud.importObject("uni-id-co",{
customUI:true
}).loginByWeixin({code}).then(e=>{
- console.log(e);
+ // console.log(e);
resolve()
}).catch(e=>{
console.log(e);
reject()
}).finally(e=>{
- console.log(e);
+ // console.log(e);
uni.hideLoading()
})
},
@@ -61,13 +61,13 @@
})
},
async bindMobileByMpWeixin(e) {
- console.log(e);
+ // console.log(e);
if (e.detail.errMsg == "getPhoneNumber:ok") {
- console.log(e.detail);
+ // console.log(e.detail);
//检查登录信息是否过期,否则通过重新登录刷新session_key
await this.beforeGetphonenumber()
uniIdCo.bindMobileByMpWeixin(e.detail).then(e => {
- console.log(e);
+ // console.log(e);
this.$emit('success')
}).finally(e => {
this.closeMe()
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue b/uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
index 3a08fe574b862411286a5e455a7898338c26f2b0..ba53d736346cc47c88ea9f83b75b8dfcac31ea98 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
@@ -141,7 +141,7 @@
const uniIdCo = uniCloud.importObject("uni-id-co", {
customUI: true
})
- console.log('uniIdCo', uniIdCo)
+ // console.log('uniIdCo', uniIdCo)
console.log('sendEmailCode',{
"email": this.email,
"scene": this.type,
@@ -152,7 +152,7 @@
"scene": this.type,
"captcha": this.captcha
}).then(result => {
- console.log(result.code);
+ // console.log(result.code);
uni.showToast({
title: "邮箱验证码发送成功",
icon: 'none',
@@ -161,7 +161,7 @@
this.reverseNumber = Number(this.count);
this.getCode();
}).catch(e => {
- console.log(JSON.stringify(e));
+ // console.log(JSON.stringify(e));
if (e.code == "uni-id-invalid-mail-template") {
this.modelValue = "123456"
uni.showToast({
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
index 6410fce253ee82511916bb7399963f8bb8f6bd94..c652a56d150a6df7e06a8e1090e51b2eb72e892d 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
@@ -49,7 +49,7 @@
return this.getParentComponent().agree
},
set(agree) {
- console.log('setAgree', agree);
+ // console.log('setAgree', agree);
return this.getParentComponent().agree = agree
}
}
@@ -294,15 +294,13 @@
}
//判断是否需要弹出隐私协议授权框
- console.log(type, this.agree);
+ // console.log(type, this.agree);
let needAgreements = (config?.agreements?.scope || []).includes('register')
- console.log({
- needAgreements
- });
+ // console.log({needAgreements});
if (type != 'univerify' && needAgreements && !this.agree) {
let agreementsRef = this.getParentComponent().$refs.agreements
return agreementsRef.popup(() => {
- console.log(type, navigateBack);
+ // console.log(type, navigateBack);
this.login_before(type, navigateBack, options)
})
}
@@ -314,7 +312,7 @@
document.domain +
(window.location.href.includes('#')?'/#':'') +
'/uni_modules/uni-id-pages/pages/login/login-withoutpwd?is_weixin_redirect=true&type=weixin'
- console.log('redirectUrl----',redirectUrl);
+ // console.log('redirectUrl----',redirectUrl);
let ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger'){
// console.log('在微信公众号内');
@@ -340,7 +338,7 @@
if (type == 'univerify') {
let univerifyManager = uni.getUniverifyManager()
let onButtonsClickFn = async res => {
- console.log('点击了第三方登录,provider:', res, res.provider, this.univerifyStyle.buttons.list);
+ // console.log('点击了第三方登录,provider:', res, res.provider, this.univerifyStyle.buttons.list);
//同步一键登录弹出层隐私协议框是否打勾
let agree = (await uni.getCheckBoxState())[1].state
//console.log('agree',agree);
@@ -381,7 +379,7 @@
return univerifyManager.login({
"univerifyStyle": this.univerifyStyle,
success: res => {
- console.log('login success', res)
+ // console.log('login success', res)
this.login(res.authResult, 'univerify')
},
fail(err) {
@@ -392,7 +390,7 @@
});
},
complete: async e => {
- console.log(e);
+ // console.log(e);
uni.hideLoading()
//同步一键登录弹出层隐私协议框是否打勾
this.agree = (await uni.getCheckBoxState())[1].state
@@ -415,7 +413,7 @@
"univerifyStyle": this.univerifyStyle,
// #endif
success: async e => {
- console.log(e);
+ // console.log(e);
if (type == 'apple') {
let res = await this.getUserInfo({
provider: "apple"
@@ -434,18 +432,15 @@
})
},
login(params, type) { //联网验证登录
- console.log('执行登录开始----');
- console.log({
- params,
- type
- });
+ // console.log('执行登录开始----');
+ console.log({params,type});
//toLowerCase
let action = 'loginBy' + type.trim().replace(type[0], type[0].toUpperCase())
const uniIdCo = uniCloud.importObject("uni-id-co",{
customUI:true
})
uniIdCo[action](params).then(result => {
- console.log("login-result", result);
+ // console.log("login-result", result);
uni.showToast({
title: '登录成功',
icon: 'none',
@@ -468,7 +463,7 @@
mutations.loginSuccess(result)
})
.catch(e=>{
- console.log(e);
+ // console.log(e);
uni.showModal({
content: e.message,
confirmText:"知道了",
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue b/uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
index 173009a046234b9f0b5e46bd7884ad4387e2dcbd..c5605f16244d2cb01a41dbec178c49787b090f96 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
@@ -146,7 +146,7 @@
"scene": this.type,
"captcha": this.captcha
}).then(result => {
- console.log(result.code);
+ // console.log(result.code);
uni.showToast({
title: "短信验证码发送成功",
icon: 'none',
@@ -155,7 +155,7 @@
this.reverseNumber = Number(this.count);
this.getCode();
}).catch(e => {
- console.log(JSON.stringify(e));
+ // console.log(JSON.stringify(e));
if (e.code == "uni-id-invalid-sms-template-id") {
this.modelValue = "123456"
uni.showToast({
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue b/uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
index 703f4845d1dde3f6c809583f6add63c233840d51..2c7b2e31a0a8c82b49e4b7387b6ca43892701e3c 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
@@ -31,7 +31,7 @@
uni.getUserProfile({
desc: "用于设置账户昵称和头像",
complete: (e) => {
- console.log("getUserProfile:", e);
+ // console.log("getUserProfile:", e);
callBack(e)
}
})
diff --git a/uni_modules/uni-id-pages/config.js b/uni_modules/uni-id-pages/config.js
index b03a2bf94ab8e55b989ec33db81932052dbff939..32c5942c04133465516f83259b774e1d466ae61d 100644
--- a/uni_modules/uni-id-pages/config.js
+++ b/uni_modules/uni-id-pages/config.js
@@ -5,7 +5,7 @@ export default {
登录类型 未列举到的或运行环境不支持的,将被自动隐藏。
如果需要在不同平台有不同的配置,直接用条件编译即可
*/
- "isAdmin": false, // 区分管理端与用户端
+ "isAdmin": true, // 区分管理端与用户端
"loginTypes": [
// "qq",
// "xiaomi",
diff --git a/uni_modules/uni-id-pages/init.js b/uni_modules/uni-id-pages/init.js
index b1b3d1f03c9155697d0fe4f7d7336373658d525b..5572e1c37582221ef11e86095fa3d3980ca54924 100644
--- a/uni_modules/uni-id-pages/init.js
+++ b/uni_modules/uni-id-pages/init.js
@@ -50,7 +50,7 @@ export default async function() {
uni.preLogin({
provider: 'univerify',
complete: e => {
- console.log(e);
+ // console.log(e);
}
})
}
@@ -65,10 +65,7 @@ export default async function() {
code, // 错误码详见https://uniapp.dcloud.net.cn/uniCloud/clientdb?id=returnvalue
message
}) {
- console.error('onDBError', {
- code,
- message
- });
+ // console.error('onDBError', {code,message});
}
// 解绑clientDB错误事件
//db.off('error', onDBError)
@@ -77,17 +74,17 @@ export default async function() {
//4. 同步客户端push_clientid至device表
if (uniCloud.onRefreshToken) {
uniCloud.onRefreshToken(() => {
- console.log('onRefreshToken');
+ // console.log('onRefreshToken');
if (uni.getPushClientId) {
uni.getPushClientId({
success: async function(e) {
- console.log(e)
+ // console.log(e)
let pushClientId = e.cid
- console.log(pushClientId);
+ // console.log(pushClientId);
let res = await uniIdCo.setPushCid({
pushClientId
})
- console.log('getPushClientId', res);
+ // console.log('getPushClientId', res);
},
fail(e) {
console.log(e)
diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json
index aa8b8eeeae514ac24d399e7f3314049c86407da1..358bdd21cd2ca34121926f7ed7bd5fb8de763f9a 100644
--- a/uni_modules/uni-id-pages/package.json
+++ b/uni_modules/uni-id-pages/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-id-pages",
"displayName": "uni-id-pages",
- "version": "1.0.36",
+ "version": "1.0.37",
"description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [
"用户管理",
diff --git a/uni_modules/uni-id-pages/pages/common/webview/webview.vue b/uni_modules/uni-id-pages/pages/common/webview/webview.vue
index 83d07ec7c66b41c98b924e1fe54d036f89333a76..cacf97dba604805916ce5da51a73c065eb75438a 100644
--- a/uni_modules/uni-id-pages/pages/common/webview/webview.vue
+++ b/uni_modules/uni-id-pages/pages/common/webview/webview.vue
@@ -20,7 +20,7 @@
});
title = "页面路径错误"
}else{
- console.log(url,title);
+ // console.log(url,title);
this.url = url;
}
if(title){
diff --git a/uni_modules/uni-id-pages/pages/login/login-smscode.vue b/uni_modules/uni-id-pages/pages/login/login-smscode.vue
index 7e69e1de969c0911f3b879baf4915824c5d904b1..22948258b8cd28fe65523d76daa8e6f96559dae5 100644
--- a/uni_modules/uni-id-pages/pages/login/login-smscode.vue
+++ b/uni_modules/uni-id-pages/pages/login/login-smscode.vue
@@ -38,7 +38,7 @@
this.phone = phoneNumber;
},
onShow() {
- console.log('onShow');
+ // console.log('onShow');
// #ifdef H5
document.onkeydown = event => {
var e = event || window.event;
@@ -68,14 +68,14 @@
"code": this.code,
"captcha": this.captcha
}).then(e => {
- console.log(e);
+ // console.log(e);
this.loginSuccess(e)
}).catch(e => {
if (e.errCode == 'uni-id-captcha-required') {
this.$refs.popup.open()
} else {
console.log(e.errMsg);
- console.log(e.errCode);
+ // console.log(e.errCode);
}
}).finally(e => {
this.captcha = ''
diff --git a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
index fefc036328c267bbaa2dee30cf5931d5e28ae831..85676414d4b15b00a9576e23cea053279689375a 100644
--- a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
+++ b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
@@ -11,8 +11,8 @@
将根据第三方账号服务平台的授权范围获取你的信息
-
-
+
+
@@ -56,7 +56,7 @@
}
},
async onLoad(e) {
- console.log(e);
+ // console.log(e);
//获取通过url传递的参数type设置当前登录方式,如果没传递直接默认以配置的登录
let type = e.type || config.loginTypes[0]
this.type = type
@@ -111,7 +111,7 @@
this.$refs.uniFabLogin.login_before(this.type, true, options)
},
toSmsPage() {
- console.log('toSmsPage',this.agree);
+ // console.log('toSmsPage',this.agree);
if (!this.isPhone) {
this.focusPhone = true
return uni.showToast({
@@ -147,7 +147,13 @@