Skip to content

Commit

Permalink
⚡ 修改组件api
Browse files Browse the repository at this point in the history
  • Loading branch information
12ain committed Nov 5, 2019
1 parent 2396f13 commit 72bb3fe
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 39 deletions.
11 changes: 10 additions & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ export default {
user:{
login: "/user/login",
register: "/user/register",
update: "/user/update",
update: "/user/update"
},
test:{
updateTest: "/test/updateTest",
deleteTest:"/test/deleteTest",
insertTest:"/test/insertTest",
checkcollege: "/test/checkcollege",
insertTest :"/test/insertTest"

},
testtell:{
updateTell: "/testtell/updateTell",
checkTell: "/testtell/checkTell",
deleteTell:"/testtell/deleteTell",
insertTell:"/testtell/insertTell",
updateTell:"/testtell/updateTell"

},
lf:{
Expand All @@ -24,6 +27,8 @@ export default {
testDeleteTo:"/lf/testDeleteTo",
testAllThing:"/lf/testAllThing",
testDeleteTo:"/lf/testDeleteTo",
testInsertTo :"/lf/testInsertTo",
testUpdateTo :"/lf/testUpdateTo"
},
record:{
wwmessmy:"/record/wwmessmy",
Expand All @@ -32,12 +37,16 @@ export default {
delByW:"/record/delByW",
rmess:"/record/rmess",
rmessmy:"/record/rmessmy",
insertTo: "/record/insertTo",
updateTo: "/record/updateTo"
},
trade:{
rmess:"/trade/rmess",
deleteTo:"/trade/deleteTo",
rmessmy:"/trade/rmessmy",
deleteTo:"/trade/deleteTo",
insertTo :"/trade/insertTo",
updateTo:"trade/updateTo"
}
}
}
2 changes: 1 addition & 1 deletion src/components/admin/changeInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
return {
testList: [],
usertest: {},
usersrc: 'http://47.94.10.228/testtell/updateTell',
usersrc: this.http.BASE_URL + this.ports.api.testtell.updateTell,
isAdmin:false,
isRepair:false,
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/manageEntrance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
},
data() {
return {
src:'http://47.94.10.228/test/insertTest',
src:this.http.BASE_URL + this.ports.api.test.insertTest,
popupVisible:false, // 显示添加组件
testList:[], // 所有考试信息列表
tid:'',
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/manageInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
},
data() {
return {
src:'http://47.94.10.228/testtell/insertTell',
src:this.http.BASE_URL + this.ports.api.testtell.insertTell,
popupVisible:false, // 显示添加组件
testList:[], // 所有考试信息列表
testItem:[],
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/manageLost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
if (action == "confirm") {
this.$router.push({ name:'changelost', params: { lostList: this.lostitem }})
} else {
console.log("取消");
// console.log("取消");
}
})
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/manageRepair.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ created() {
if(action == 'confirm'){
this.$router.push({ name:'changerepair', params: { repairList: this.repairitem }})
}else{
console.log('取消')
// console.log('取消')
}
})
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/lost/changelost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
return {
lostList: [],
userLost: {},
usersrc: 'http://47.94.10.228/lf/testUpdateTo',
usersrc: this.http.BASE_URL + this.ports.api.lf.testUpdateTo,
isAdmin:false,
isRepair:false,
};
Expand All @@ -40,7 +40,7 @@ export default {
...mapState(["userInformation"]),
},
created() {
this.give(),
this.give()
this.decide()
},
mounted() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/lost/lost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
},
data() {
return {
src: 'http://47.94.10.228/lf/testInsertTo',
src: this.http.BASE_URL + this.ports.api.lf.testInsertTo,
active : 'tab-container1',
actives : 'lost-container',
lostList:{
Expand Down
4 changes: 2 additions & 2 deletions src/components/repair/changerepair.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export default {
repairList: [],
userRepair: {},
repairRepair:{},
usersrc: 'http://47.94.10.228/record/updateTo',
repairsrc: 'http://47.94.10.228/record/delByW',
usersrc: this.http.BASE_URL + this.ports.api.record.updateTo,
repairsrc: this.http.BASE_URL + this.ports.api.record.delByW,
isAdmin:false,
isRepair:false,
};
Expand Down
24 changes: 1 addition & 23 deletions src/components/repair/repair.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
props: {},
data() {
return {
src: 'http://47.94.10.228/record/insertTo',
src: this.http.BASE_URL + this.ports.api.record.insertTo,
active: "tab-container2",
repairList: {
ruid: window.localStorage.getItem("uid"),
Expand All @@ -77,28 +77,6 @@ export default {
mounted() {},
watch: {},
methods: {
submitRepairList() {
let formData = new FormData();
formData.append("ruid", this.repairList.ruid);
formData.append("rdate", this.repairList.rdate);
formData.append("radr", this.repairList.radr);
formData.append("rtype", this.repairList.rtype);
formData.append("rdes", this.repairList.rdes);
formData.append("wstatic", this.repairList.wstatic);
formData.append("image", );
// console.log(this.repairList.image)
let config = {
headers: {
"Content-Type": "multipart/form-data"
}
};
axios.post("/record/insertTo", formData, config)
.then(res => {
if (res.status === 200) {
// console.log(res);
}
});
},
getRepairLists(){
this.http.post(this.ports.api.record.rmess,
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/second/changesecond.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
return {
secondList: [],
usersecond: {},
usersrc: 'http://47.94.10.228/trade/updateTo',
usersrc: this.http.BASE_URL + this.ports.api.trade.updateTo,
isAdmin:false,
isRepair:false,
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/second/second.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
props: {},
data() {
return {
src: 'http://47.94.10.228/trade/insertTo',
src: this.http.BASE_URL + this.ports.api.trade.insertTo,
active : 'tab-container1',
thingList:{
udept: window.localStorage.getItem("udept"),
Expand Down
2 changes: 1 addition & 1 deletion src/components/second/seconddetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
},
created() {
console.log(this.secondList);
// console.log(this.secondList);
},
mounted() {
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/setting/apps/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ props: {
},
data() {
return {
src: 'http://47.94.10.228//user/update',
src: this.http.BASE_URL + this.ports.api.user.update,
}
},
computed: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/setting/apps/myLost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ created() {
// console.log(this.id)
this.delList(this.id)
}else{
console.log('取消')
// console.log('取消')
}
})
},
Expand Down
1 change: 1 addition & 0 deletions src/utils/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
* @param response 请求成功时的回调函数
* @param exception 异常的回调函数
*/
BASE_URL,
post(url, data, response, exception) {
axios({
method: 'post',
Expand Down

0 comments on commit 72bb3fe

Please sign in to comment.