功能:收口小程序前后台安全与防重复提交
This commit is contained in:
@@ -2,6 +2,7 @@ const authApi = require('../../api/auth')
|
||||
const shopApi = require('../../api/shop')
|
||||
const userApi = require('../../api/user')
|
||||
const authStore = require('../../utils/auth')
|
||||
const actionGuard = require('../../utils/action-guard')
|
||||
const navigation = require('../../utils/navigation')
|
||||
const { runWithLoading } = require('../../utils/loading')
|
||||
|
||||
@@ -86,14 +87,14 @@ Page({
|
||||
const systemInfo = wx.getSystemInfoSync()
|
||||
if (systemInfo && systemInfo.platform === 'devtools') {
|
||||
supported = false
|
||||
disabledReason = '开发者工具暂不支持微信手机号一键登录,请使用真机调试或传统登录。'
|
||||
disabledReason = '开发者工具暂不支持一键登录,请用真机或其他方式登录'
|
||||
}
|
||||
} catch (error) {
|
||||
supported = false
|
||||
}
|
||||
|
||||
if (!supported && !disabledReason) {
|
||||
disabledReason = '当前微信环境暂不支持手机号一键登录,请使用账号密码或验证码登录。'
|
||||
disabledReason = '当前环境暂不支持一键登录,请使用其他方式登录'
|
||||
}
|
||||
|
||||
this.setData({
|
||||
@@ -385,7 +386,7 @@ Page({
|
||||
} catch (error) {
|
||||
this.applyLoginShopSelection({
|
||||
allowShoplessLogin: true,
|
||||
message: '当前暂无法预加载可登录门店,可直接尝试登录。',
|
||||
message: '暂时无法加载门店,可直接登录',
|
||||
shops: []
|
||||
})
|
||||
}
|
||||
@@ -398,7 +399,7 @@ Page({
|
||||
} catch (error) {
|
||||
this.applyLoginShopSelection({
|
||||
allowShoplessLogin: true,
|
||||
message: '当前暂无法预加载可登录门店,可直接尝试登录。',
|
||||
message: '暂时无法加载门店,可直接登录',
|
||||
shops: []
|
||||
})
|
||||
}
|
||||
@@ -907,11 +908,11 @@ Page({
|
||||
|
||||
buildAuthHelperText(activeTab, loginType) {
|
||||
if (activeTab === 'register') {
|
||||
return '注册前会检查账号和手机号是否可用,并要求先选择门店。'
|
||||
return '注册前请先选门店'
|
||||
}
|
||||
if (loginType === 'phone') {
|
||||
return '验证码登录时,若手机号未注册,会先选择门店后自动注册。'
|
||||
return '未注册手机号会先选门店'
|
||||
}
|
||||
return '若账号绑定了多家门店,登录前需要先选择本次门店。'
|
||||
return '多门店账号需先选门店'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user