修复请求超时问题

dev
RogerWork 4 months ago
parent 4d80aae9ad
commit 53d21d7b31
  1. 1
      command.txt
  2. 9
      src/components/ec_api/TabArea.vue
  3. 2
      src/request/config.js

@ -0,0 +1 @@
yarn dev --host 0.0.0.0 --port 10086

@ -292,6 +292,7 @@ async function get_suggest(options = {sale_type: saleType.value, pay_type: payTy
}) })
}) })
UserApiData.value.api[activeTab.value].reload = !result UserApiData.value.api[activeTab.value].reload = !result
markIsChecked()
} }
).catch((err) => { ).catch((err) => {
console.log(err) console.log(err)
@ -428,8 +429,9 @@ function test() {
console.log('UserApiData.value', UserApiData.value) console.log('UserApiData.value', UserApiData.value)
console.log('activeTab.value', activeTab.value) console.log('activeTab.value', activeTab.value)
console.log('ApiTableRef.value', ApiTableRef.value) console.log('ApiTableRef.value', ApiTableRef.value)
console.log('ApiTableRef.value', ApiTableRef.value[0].$parent.label)
// store.state.ecApiModule.ec_api_data.api = [] // store.state.ecApiModule.ec_api_data.api = []
store.state.ecApiModule.show_tab_area = false // store.state.ecApiModule.show_tab_area = false
} }
// //
@ -538,6 +540,7 @@ const levelList = computed(() => {
// ec_select_api // ec_select_api
watch(() => store.state.ecApiModule.ec_api_data.api, (oldValue, newValue) => { watch(() => store.state.ecApiModule.ec_api_data.api, (oldValue, newValue) => {
console.log('watch.store.state.ecApiModule.ec_api_data.api')
// //
initApiData() initApiData()
// //
@ -550,6 +553,7 @@ watch(() => store.state.ecApiModule.ec_api_data.api, (oldValue, newValue) => {
// activeTab // activeTab
watch(activeTab, () => { watch(activeTab, () => {
console.log('watch.activeTab')
markIsChecked() markIsChecked()
get_timestamp() get_timestamp()
get_suggest() get_suggest()
@ -679,6 +683,9 @@ const ace_options = {
<el-button type="primary" @click="send_request" :loading="req_loading" :disabled="req_loading"> <el-button type="primary" @click="send_request" :loading="req_loading" :disabled="req_loading">
{{ send_btn }} {{ send_btn }}
</el-button> </el-button>
<!-- <el-button @click="test" >-->
<!-- 测试-->
<!-- </el-button>-->
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
</el-col> </el-col>

@ -10,7 +10,7 @@ export default {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
'Authorization': 'token 4e63b8854974c1fdac9deb891fd74dc145b53f85' 'Authorization': 'token 4e63b8854974c1fdac9deb891fd74dc145b53f85'
}, },
timeout: 10000, timeout: 60000,
withCredentials: true, withCredentials: true,
responseType: 'json', responseType: 'json',
} }

Loading…
Cancel
Save