|
|
@@ -478,9 +478,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
fail(res){
|
|
|
- uni.showToast({title:'已取消', duration: 3000, icon:'none'})
|
|
|
//关闭一键登录弹出窗口
|
|
|
uni.closeAuthView()
|
|
|
+ uni.showModal({
|
|
|
+ title: '登录失败',
|
|
|
+ content: '一键登录失败或已取消,是否使用短信验证码登录?',
|
|
|
+ success: (confirmRes) => {
|
|
|
+ if (confirmRes.confirm) {
|
|
|
+ that.useSms()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
console.log(res)
|
|
|
},
|
|
|
complete: (res) => {
|
|
|
@@ -493,18 +501,38 @@ export default {
|
|
|
//如果手机没有插入有效的sim卡,或者手机蜂窝数据网络关闭,都有可能造成预登录校验失败
|
|
|
if (res.code == 30005) {
|
|
|
uni.hideLoading()
|
|
|
- that.$util.confirmModal({content:'登录失败,请看视频操作后再试'},() => {
|
|
|
- that.pageTo({url: '/admin/home/appLoginRemind'})
|
|
|
+ uni.showModal({
|
|
|
+ title: '一键登录失败',
|
|
|
+ content: '无法获取本机号码,是否使用短信验证码登录?',
|
|
|
+ success: (confirmRes) => {
|
|
|
+ if (confirmRes.confirm) {
|
|
|
+ that.useSms()
|
|
|
+ } else {
|
|
|
+ that.$util.confirmModal({content:'请看视频操作后再试'},() => {
|
|
|
+ that.pageTo({url: '/admin/home/appLoginRemind'})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
- } else if(res.code == 1000) {
|
|
|
- uni.showToast({title: '即将开通', duration: 3000, icon:'none'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let msg = '登录失败...'
|
|
|
+ if(res.code == 1000) {
|
|
|
+ msg = '即将开通'
|
|
|
} else if(res.code == 40004) {
|
|
|
- uni.showToast({title: '即将开通...', duration: 3000, icon:'none'})
|
|
|
- } else {
|
|
|
- uni.showToast({title: '登录失败...', duration: 3000, icon:'none'})
|
|
|
+ msg = '即将开通...'
|
|
|
}
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
+ uni.showModal({
|
|
|
+ title: '一键登录失败',
|
|
|
+ content: msg + ',是否使用短信验证码登录?',
|
|
|
+ success: (confirmRes) => {
|
|
|
+ if (confirmRes.confirm) {
|
|
|
+ that.useSms()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
},
|