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