@ -8,6 +8,7 @@ const instance = axios.create({
adapter(config) {
const { url, method, data, params, headers, baseURL, paramsSerializer } =
config
config.timeout = 300000
return new Promise((resolve, reject) => {
uni.request({
method: method!.toUpperCase() as any,
@ -171,7 +171,7 @@ const getfocus = () => {
nextTick((r) => {
boxfocus.value = true
})
hide()
// hide()
}
const losefocus = () => {
@ -88,14 +88,14 @@ const itemCode = ref('')
const comMessageRef = ref()
onMounted(() => {
uni.hideKeyboard()
// uni.hideKeyboard()
// #ifdef H5
if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none')
// #endif
placeholderValue.value = `请扫描${props.placeholder}`
watch(
@ -136,25 +136,10 @@ onHide(() => {
onShow(() => {
if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) {
uni.showModal({
title: '未登录',
content: '您未登录 , 需要登录后才能继续', // 如果需要强制登录,不显示取消按钮
showCancel: !forcedLogin.value,
success: (res) => {
if (res.confirm) {
// 如果需要强制登录,使用reLanch方式
if (forcedLogin.value) {
// uni.showModal({
uni.reLaunch({
url: '../login/index'
} else {
uni.navigateTo({
timerRefresh()
@ -384,6 +384,7 @@ const commit = () => {
submitJob()
subitem.scaned = true