Skip to content

Commit

Permalink
fix-param tansfer exception
Browse files Browse the repository at this point in the history
Signed-off-by: linjianshan <[email protected]>
  • Loading branch information
lbw-san committed Nov 17, 2022
1 parent 2a374f5 commit 7b83b2c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ yarn-error.log*
*.sln

package-lock.json
https.env.js
https.env.js
config/review.env.js
24 changes: 24 additions & 0 deletions config/review.env_demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import axios from "axios";
// export { default } from "axios"
// axios.defaults.baseURL = "http://{Server-IP}}/api/v1";
// axios.defaults.baseURL = "";
const ax = axios.create({
baseURL:"http://{Server-IP}:port",
timeout:5000,
headers:{
'Content-Type': "application/json; charset=utf-8"
}
})
ax.interceptors.response.use(
config => {
if (config.status === 200) {

return config.data;
}
},
error => {
error.message = '请求超时或服务器异常,请检查网络或联系管理员!'
return Promise.reject(error)
}
)
export default ax
5 changes: 3 additions & 2 deletions src/components/Inspect/inspectDataSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ export default {
this.currentData
]
}
data.pending_review_list[0].size = data.pending_review_list[0].size +this.sizeOptionsValue
requestService.saveTempReviewData(data).then(param => {
this.currentData.size=this.currentData.size+""+this.sizeOptionsValue;
// this.currentData.size=this.currentData.size+""+this.sizeOptionsValue;
this.tableData[this.index] = this.currentData
this.reloadTable = !this.reloadTable
this.successMess('Staging succeeded')
Expand All @@ -342,6 +342,7 @@ export default {
this.currentData
]
}
data.pending_review_list[0].size = data.pending_review_list[0].size +this.sizeOptionsValue
requestService.submitReviewData(data).then(param => {
this.successMess('submit success')
this.tableAllData.splice(this.index, 1)
Expand Down
5 changes: 3 additions & 2 deletions src/components/Review/reviewUploadByFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default {
data(){
return{
fileList:[],
userId:sessionStorage.getItem("userId")
}
},
created() {
Expand All @@ -51,8 +52,8 @@ export default {
console.log("click:",this.$refs.upload)
console.log("click fileList:",this.fileList)
const data = {
user_id:33,
dataset_review_list:this.fileList[0].raw
"user_id": this.userId,
"dataset_review_list":this.fileList[0].raw
}
requestService.uploadFiles(data).then( res => {
Message(
Expand Down

0 comments on commit 7b83b2c

Please sign in to comment.