暂时去掉请求实际限制 #39

Merged
lyc merged 1 commits from lyc-dev into main 2024-07-18 15:24:51 +08:00
4 changed files with 1 additions and 11 deletions
Showing only changes of commit d702db24c3 - Show all commits

View File

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

View File

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

View File

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

View File

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