暂时去掉请求实际限制 #39
|
@ -5,8 +5,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
fileName: {
|
||||
type: String,
|
||||
|
|
|
@ -51,7 +51,6 @@ import { ElMessage } from 'element-plus'
|
|||
import { resourceType } from '@/utils/resourceDict'
|
||||
import { getFileSuffix, getFileName } from '@/utils/ruoyi'
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -49,7 +49,6 @@ import { ElMessageBox } from 'element-plus'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const userInfo = userStore.user
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
const isMaxSize = ref(false)
|
||||
const router = useRouter()
|
||||
|
|
|
@ -56,13 +56,7 @@ service.interceptors.request.use(config => {
|
|||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 2000; // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请勿重复提交';
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
return Promise.reject(new Error(message))
|
||||
} else {
|
||||
cache.session.setJSON('sessionObj', requestObj)
|
||||
}
|
||||
cache.session.setJSON('sessionObj', requestObj)
|
||||
}
|
||||
}
|
||||
return config
|
||||
|
|
Loading…
Reference in New Issue