diff --git a/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue b/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue index 1399e194a45674592053324125713068ee8719e6..0dc066afdda28646f2481b1baa17806b3eb0684c 100644 --- a/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue +++ b/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue @@ -62,7 +62,7 @@ } else { uni.showToast({ title: 'scene不能为空', - icon: 'none' + icon: 'none' }); } }, @@ -88,7 +88,7 @@ .catch(e => { uni.showToast({ title: e.message, - icon: 'none' + icon: 'none' }); }).finally(e => { this.loging = false diff --git a/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue b/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue index 349ee7012350798a177b7ec94a5b9be3bfd4ef42..e31b4887fd8bb72a3b66013d9fea385d6d00056d 100644 --- a/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue +++ b/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue @@ -275,7 +275,7 @@ if (errShowType === 'toast') { uni.showToast({ title: result.errorMessage || '校验错误', - icon: 'none' + icon: 'none' }); } if (errShowType === 'modal') { diff --git a/uni_modules/uni-id-pages/common/store.js b/uni_modules/uni-id-pages/common/store.js index 3a43b1aa7a7db7912fb2bf696356f15597e83a2b..f3eacfffb18e5fc9dadd90be4aba47946ed8a2a8 100644 --- a/uni_modules/uni-id-pages/common/store.js +++ b/uni_modules/uni-id-pages/common/store.js @@ -5,13 +5,11 @@ const uniIdCo = uniCloud.importObject("uni-id-co") const db = uniCloud.database(); const usersTable = db.collection('uni-id-users') - - let hostUserInfo = uni.getStorageSync('uni-id-pages-userInfo')||{} console.log( hostUserInfo); const data = { userInfo: hostUserInfo, - hasLogin: Object.keys(hostUserInfo).length != 0 + hasLogin: getUniIdTokenExpired() > Date.now() } console.log('data', data); @@ -25,13 +23,15 @@ export const mutations = { if (e.result.updated) { uni.showToast({ title: "更新成功", - icon: 'none' + icon: 'none', + duration: 3000 }); this.setUserInfo(data) } else { uni.showToast({ title: "没有改变", - icon: 'none' + icon: 'none', + duration: 3000 }); } }) @@ -117,7 +117,8 @@ export const mutations = { if (showToast) { uni.showToast({ title: toastText, - icon: 'none' + icon: 'none', + duration: 3000 }); } this.updateUserInfo() 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 e95652b57e83e489920e14bc5c4a1bfaa27ba896..3a08fe574b862411286a5e455a7898338c26f2b0 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 @@ -123,17 +123,20 @@ this.$refs.captcha.focusCaptchaInput = true return uni.showToast({ title: '请先输入图形验证码', - icon: 'none' + icon: 'none', + duration: 3000 }); } if(!this.email) return uni.showToast({ title: "请输入邮箱", - icon: 'none' + icon: 'none', + duration: 3000 }); let reg_email = /@/; if (!reg_email.test(this.email)) return uni.showToast({ title: "邮箱格式错误", - icon: 'none' + icon: 'none', + duration: 3000 }); const uniIdCo = uniCloud.importObject("uni-id-co", { customUI: true @@ -152,7 +155,8 @@ console.log(result.code); uni.showToast({ title: "邮箱验证码发送成功", - icon: 'none' + icon: 'none', + duration: 3000 }); this.reverseNumber = Number(this.count); this.getCode(); @@ -171,7 +175,8 @@ this.captcha = "" uni.showToast({ title: e.message, - icon: 'none' + icon: 'none', + duration: 3000 }); } }) 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 19ef876b4a214a74bda75fe515faa12c3a35df8c..6410fce253ee82511916bb7399963f8bb8f6bd94 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 @@ -248,7 +248,8 @@ ].includes(type)) { return uni.showToast({ title: '该登录方式暂未实现,欢迎提交pr', - icon: 'none' + icon: 'none', + duration: 3000 }); } @@ -264,7 +265,8 @@ }else{ return uni.showToast({ title: '当前设备不支持此登录,请选择其他登录方式', - icon: 'none' + icon: 'none', + duration: 3000 }); } }, err => { @@ -286,7 +288,8 @@ ) { return uni.showToast({ title: '当前设备不支持此登录,请选择其他登录方式', - icon: 'none' + icon: 'none', + duration: 3000 }); } @@ -359,7 +362,8 @@ //console.log("你未同意隐私政策协议"); uni.showToast({ title: "你未同意隐私政策协议", - icon: 'none' + icon: 'none', + duration: 3000 }); } } @@ -383,7 +387,8 @@ fail(err) { uni.showToast({ title: JSON.stringify(err), - icon: 'none' + icon: 'none', + duration: 3000 }); }, complete: async e => { @@ -443,7 +448,8 @@ console.log("login-result", result); uni.showToast({ title: '登录成功', - icon: 'none' + icon: 'none', + duration: 2000 }); // #ifdef MP-WEIXIN //如果是微信小程序端的微信登录,且为首次登录,就弹出获取微信昵称+头像用于绑定资料 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 7dc73e6941c086587bd3a0f3b75b9fdd20102caa..173009a046234b9f0b5e46bd7884ad4387e2dcbd 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 @@ -123,13 +123,15 @@ this.$refs.captcha.focusCaptchaInput = true return uni.showToast({ title: '请先输入图形验证码', - icon: 'none' + icon: 'none', + duration: 3000 }); } let reg_phone = /^1\d{10}$/; if (!reg_phone.test(this.phone)) return uni.showToast({ title: "手机号格式错误", - icon: 'none' + icon: 'none', + duration: 3000 }); const uniIdCo = uniCloud.importObject("uni-id-co", { customUI: true @@ -147,7 +149,8 @@ console.log(result.code); uni.showToast({ title: "短信验证码发送成功", - icon: 'none' + icon: 'none', + duration: 3000 }); this.reverseNumber = Number(this.count); this.getCode(); @@ -166,7 +169,8 @@ this.captcha = "" uni.showToast({ title: e.message, - icon: 'none' + icon: 'none', + duration: 3000 }); } }) 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 df67bc4877542c47c0ca6314b77d163187a403df..7e69e1de969c0911f3b879baf4915824c5d904b1 100644 --- a/uni_modules/uni-id-pages/pages/login/login-smscode.vue +++ b/uni_modules/uni-id-pages/pages/login/login-smscode.vue @@ -59,7 +59,8 @@ this.$refs.smsCode.focusSmsCodeInput = true return uni.showToast({ title: '验证码不能为空', - icon: 'none' + icon: 'none', + duration: 3000 }); } uniIdCo.loginBySms({ 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 868776c0bfb00a01537d7fd62e54ec3c1e7caffd..fefc036328c267bbaa2dee30cf5931d5e28ae831 100644 --- a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue +++ b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue @@ -116,7 +116,8 @@ this.focusPhone = true return uni.showToast({ title: "手机号码格式不正确", - icon: 'none' + icon: 'none', + duration: 3000 }); } if (this.needAgreements && !this.agree) { @@ -136,7 +137,8 @@ chooseArea() { uni.showToast({ title: '暂不支持其他国家', - icon: 'none' + icon: 'none', + duration: 3000 }); }, } diff --git a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue index 7978c1e6aae3a18d13eb9b7735b7a6c7a20ba9bf..cd35d5b472724acd17408fb9e07284b0438c1de1 100644 --- a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue +++ b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue @@ -84,21 +84,24 @@ this.focusPassword = true return uni.showToast({ title: '请输入密码', - icon: 'none' + icon: 'none', + duration: 3000 }); } if (!this.username.length) { this.focusUsername = true return uni.showToast({ title: '请输入手机号/用户名/邮箱', - icon: 'none' + icon: 'none', + duration: 3000 }); } if (this.needCaptcha && this.captcha.length != 4) { this.$refs.captcha.getImageCaptcha() return uni.showToast({ title: '请输入验证码', - icon: 'none' + icon: 'none', + duration: 3000 }); } diff --git a/uni_modules/uni-id-pages/pages/register/register-admin.vue b/uni_modules/uni-id-pages/pages/register/register-admin.vue index 71690d95ce7940278769a666522b152f58d5141c..1fc81ebcdf25db0e730973a6b8b312adf8229c49 100644 --- a/uni_modules/uni-id-pages/pages/register/register-admin.vue +++ b/uni_modules/uni-id-pages/pages/register/register-admin.vue @@ -89,7 +89,8 @@ this.$refs.captcha.focusCaptchaInput = true return uni.showToast({ title: '请输入验证码', - icon: 'none' + icon: 'none', + duration: 3000 }); } if (this.needAgreements && !this.agree) { diff --git a/uni_modules/uni-id-pages/pages/register/register.vue b/uni_modules/uni-id-pages/pages/register/register.vue index e769f3462297fe5a3d5bd6dde418871d37c0bf6f..04f85b7d7dba0fd6dc5d13c19849e963252d646c 100644 --- a/uni_modules/uni-id-pages/pages/register/register.vue +++ b/uni_modules/uni-id-pages/pages/register/register.vue @@ -96,7 +96,8 @@ this.$refs.captcha.focusCaptchaInput = true return uni.showToast({ title: '请输入验证码', - icon: 'none' + icon: 'none', + duration: 3000 }); } if (this.needAgreements && !this.agree) { diff --git a/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue b/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue index 15d68ebfff5b87fa8c02d0684190f400490ade4c..264964cc8142d4ff6b688a6e22438c751e6348f0 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue @@ -52,14 +52,16 @@ this.focusMobile = true return uni.showToast({ title: '手机号码格式不正确', - icon: 'none' + icon: 'none', + duration: 3000 }); } if(! /^\d{6}$/.test(this.formData.code)){ this.$refs.smsForm.focusSmsCodeInput = true return uni.showToast({ title: '验证码格式不正确', - icon: 'none' + icon: 'none', + duration: 3000 }); } @@ -69,7 +71,8 @@ console.log(e); uni.showToast({ title: e.errMsg, - icon: 'none' + icon: 'none', + duration: 3000 }); // #ifdef APP-NVUE const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE diff --git a/uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue b/uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue index 8ae9389b655174fcf744973098210d8382cc946e..4fc62b3e3746ab2317a821b4351695f8de153bbf 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue @@ -506,7 +506,8 @@ export default { if (!this.image) { uni.showToast({ title: '请选择图片', - icon: 'none' + icon: 'none', + duration: 3000 }); return; } @@ -536,7 +537,8 @@ export default { if (!this.image) { uni.showToast({ title: '请选择图片', - icon: 'none' + icon: 'none', + duration: 3000 }); return; } @@ -721,7 +723,8 @@ export default { if (!this.image) { uni.showToast({ title: '请选择图片', - icon: 'none' + icon: 'none', + duration: 3000 }); return; } @@ -739,7 +742,8 @@ export default { if (!this.image) { uni.showToast({ title: '请选择图片', - icon: 'none' + icon: 'none', + duration: 3000 }); return; } diff --git a/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue b/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue index 160a4b62ff0b962d316af786597e009b81dc9510..0ae7b796ea63cb5dd860d90b7052e24894021db2 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue @@ -45,7 +45,8 @@ uniIdco.closeAccount().then((e) => { console.log(e); uni.showToast({ - title: '注销成功' + title: '注销成功', + duration: 3000 }); uni.removeStorageSync('uni_id_token'); uni.setStorageSync('uni_id_token_expired', 0) diff --git a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue index 9fb17c91b0cbf04a5f62f13372eb6f22cf6b10af..e0e8178aa42330502c8c4ef674aab281c666c4f4 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue @@ -183,7 +183,8 @@ }) if (res.errCode) { uni.showToast({ - title: res.errMsg || '绑定失败' + title: res.errMsg || '绑定失败', + duration: 3000 }) } await mutations.updateUserInfo()