#
zhou zhou
1 天以前 c8751bab03209de5528ed253b5542b1d3c5ff169
#
2个文件已修改
45 ■■■■■ 已修改文件
common/request.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/listing/matnrPalletising.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/request.js
@@ -26,14 +26,21 @@
            },
            method: method, //'GET','POST'
            dataType: 'json',
            timeout: 30000, // 30秒超时
            success: (res) => {
                !hideLoading && uni.hideLoading()
                resolve(res.data)
            },
            fail: (res) => {
                // !hideLoading && toast("网络不给力,请稍后再试~")
                //wx.hideLoading()
                !hideLoading && uni.hideLoading()
                // 判断是否为超时错误
                const isTimeout = res.errMsg && (res.errMsg.includes('timeout') || res.errMsg.includes('超时'))
                uni.showToast({
                    title: isTimeout ? '网络请求超时,请检查网络连接' : '网络请求失败,请稍后重试',
                    icon: 'none',
                    duration: 3000
                })
                reject(res)
            }
        })
pages/listing/matnrPalletising.vue
@@ -475,8 +475,9 @@
                this.submitConfirm(this.agvStationInput);
            },
        // 提交组托请求
        async submitConfirm(agvStation) {
            this.repeatClick = true
    async submitConfirm(agvStation) {
        this.repeatClick = true
        try {
            const newArr = this.list.map(item => {
                
                return {
@@ -519,21 +520,24 @@
                    position: 'top'
                })
            }
        } finally {
            // 无论请求成功还是失败,都释放按钮锁定
            this.repeatClick = false
        },
        }
    },
        async getRece() {
            const {
                code,
                data,
                msg
            } = await request('/areas/receipt', {}, 'get')
            if (code === 200) {
                this.range = data.map(item => ({
                    value: item.id,
                    text: item.warehouseId$ + "-- " + item.name
                }));
            }
        },
        const {
            code,
            data,
            msg
        } = await request('/areas/receipt', {}, 'get')
        if (code === 200) {
            this.range = data.map(item => ({
                value: item.id,
                text: item.warehouseId$ + "-- " + item.name
            }));
        }
    },
        }
    }
</script>