12123
This commit is contained in:
parent
2b13718cea
commit
a79f1b85da
@ -1,4 +1,4 @@
|
||||
import { request } from '@/api/http.js'
|
||||
import { request } from '@/api-collect-code/http.js'
|
||||
|
||||
export async function offlineQrcodeList(data) {
|
||||
return await request( {
|
||||
|
@ -64,11 +64,11 @@ export function setupHttp() {
|
||||
if (data.status === 1) {
|
||||
message.error(data.msg || i18n.t('http.error.operationFailed'))
|
||||
}
|
||||
|
||||
console.log('拦截响应',data)
|
||||
// 处理登录失效
|
||||
if (data.status === 401) {
|
||||
message.error(i18n.t('http.error.loginExpired'))
|
||||
token.value = '' // 清除 token
|
||||
codeToken.value = '' // 清除 token
|
||||
router.replace('/collectCode/login')
|
||||
}
|
||||
|
||||
|
@ -65,9 +65,7 @@ const getCode = async () => {
|
||||
pane.value = 1
|
||||
await nextTick()
|
||||
vanSwipeRef.value?.swipeTo(pane.value)
|
||||
nextTick(() => {
|
||||
codeInput.value?.focus()
|
||||
})
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取验证码失败:', error)
|
||||
@ -199,7 +197,7 @@ const togglePasswordVisibility = () => {
|
||||
type="tel"
|
||||
maxlength="6"
|
||||
ref="codeInput"
|
||||
class="opacity-0 absolute top-0 left-0 h-full w-full"
|
||||
class="opacity-0 absolute top-0 left-0 h-full w-full z-999"
|
||||
@input="code = $event.target.value.replace(/\D/g, '').slice(0, 6)"
|
||||
@focus="isFocused = true"
|
||||
@blur="isFocused = false"
|
||||
|
@ -81,7 +81,7 @@ const abnormal=ref(false)
|
||||
const abnormalRow=ref({})
|
||||
const inputLotNo=async (data)=>{
|
||||
const res=await offlineQrcodeList({
|
||||
lotNo:createForm.value.lotNo
|
||||
lotNo:createForm.value.lotNo-25000
|
||||
})
|
||||
if (res.status===0){
|
||||
if (res.data.Data?.length>0){
|
||||
|
@ -100,9 +100,6 @@ const getCode =async () => {
|
||||
vanSwipeRef.value?.swipeTo(pane.value)
|
||||
|
||||
startCountdown();
|
||||
nextTick(()=>{
|
||||
codeInput.value.focus()
|
||||
})
|
||||
}
|
||||
const goBack = () => {
|
||||
code.value = ''
|
||||
@ -195,18 +192,18 @@ onUnmounted(() => {
|
||||
<div class="text-[16px] text-[#000]">+{{ selectedZone }} {{ phoneNum }}</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<van-password-input
|
||||
:value="code"
|
||||
:gutter="10"
|
||||
:mask="false"
|
||||
<van-password-input
|
||||
:value="code"
|
||||
:gutter="10"
|
||||
:mask="false"
|
||||
:focused="isFocused"
|
||||
/>
|
||||
<input
|
||||
v-model="code"
|
||||
type="tel"
|
||||
maxlength="6"
|
||||
<input
|
||||
v-model="code"
|
||||
type="tel"
|
||||
maxlength="6"
|
||||
ref="codeInput"
|
||||
class="opacity-0 absolute top-0 left-0 h-full w-full"
|
||||
class="opacity-0 absolute top-0 left-0 h-full w-full"
|
||||
@input="code = $event.target.value.replace(/\D/g, '').slice(0, 6)"
|
||||
@focus="isFocused = true"
|
||||
@blur="isFocused = false"
|
||||
|
Loading…
Reference in New Issue
Block a user