Merge pull request '暂时去掉请求实际限制' (#39) from lyc-dev into main

This commit is contained in:
lyc 2024-07-18 15:24:49 +08:00
commit f77584e849
4 changed files with 1 additions and 11 deletions

View File

@ -5,8 +5,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
const props = defineProps({
fileName: {
type: String,

View File

@ -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,

View File

@ -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()

View File

@ -56,15 +56,9 @@ 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)
}
}
}
return config
}, error => {
console.log(error)