修复小程序违规
This commit is contained in:
1 parent
3fdda89833
commit
54c90072fb
8 files changed
+28
-28
No files matched your search
@@ -163,8 +163,8 @@ function navUniLoginCode() {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res) => (res && res.code ? resolve(res.code) : reject(new Error('未获取到微信登录凭证'))),
|
||||
fail: () => reject(new Error('获取微信登录凭证失败'))
|
||||
success: (res) => (res && res.code ? resolve(res.code) : reject(new Error('未获取到登录凭证'))),
|
||||
fail: () => reject(new Error('获取登录凭证失败'))
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -172,7 +172,7 @@ function navUniLoginCode() {
|
||||
async function onGuestPhone(e) {
|
||||
const detail = (e && e.detail) || {}
|
||||
if (String(detail.errMsg || '').indexOf('ok') === -1 || !detail.code) {
|
||||
uni.showToast({ title: '未获取到手机号授权', icon: 'none' })
|
||||
uni.showToast({ title: '未获取到手机号,请重试', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (guestAuthLoading.value) return
|
||||
@@ -194,10 +194,10 @@ async function onGuestPhone(e) {
|
||||
if (!res || !res.token) throw new Error('未返回游客令牌')
|
||||
setGuestToken(res.token)
|
||||
guestAuthVisible.value = false
|
||||
uni.showToast({ title: '授权成功,数据可保存了', icon: 'none' })
|
||||
uni.showToast({ title: '验证成功,数据可保存了', icon: 'none' })
|
||||
} catch (err) {
|
||||
console.error('[nav] guest mini-login failed:', err)
|
||||
uni.showToast({ title: (err && err.message) || '授权失败,请重试', icon: 'none' })
|
||||
uni.showToast({ title: (err && err.message) || '验证失败,请重试', icon: 'none' })
|
||||
} finally {
|
||||
guestAuthLoading.value = false
|
||||
}
|
||||
@@ -441,7 +441,7 @@ function chooseTenant() {
|
||||
async function onCardPhone(e, card = null) {
|
||||
const detail = (e && e.detail) || {}
|
||||
if (String(detail.errMsg || '').indexOf('ok') === -1 || !detail.code) {
|
||||
uni.showToast({ title: '需要授权手机号才能使用', icon: 'none' })
|
||||
uni.showToast({ title: '请先完成手机号验证才能使用', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (phoneBusy.value) return
|
||||
@@ -474,7 +474,7 @@ async function onCardPhone(e, card = null) {
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('[nav] onboarding phone failed:', err)
|
||||
uni.showToast({ title: (err && err.message) || '授权失败,请重试', icon: 'none' })
|
||||
uni.showToast({ title: (err && err.message) || '验证失败,请重试', icon: 'none' })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
phoneBusy.value = false
|
||||
@@ -507,7 +507,7 @@ async function enter(card) {
|
||||
return
|
||||
}
|
||||
if (guest.value) {
|
||||
uni.showToast({ title: '请先授权手机号', icon: 'none' })
|
||||
uni.showToast({ title: '请先完成手机号验证', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (card.needTenant) {
|
||||
|
||||
Reference in new issue
Block a user