对tenant的请求地址进行修改
This commit is contained in:
parent
a5ee34e6fb
commit
5a52a58c0c
@ -1,11 +1,8 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
addTenant(tenant) {
|
addTenant(tenant) {
|
||||||
const url='http://localhost:8080/addTenant'
|
const url = '/api/tenant/addTenant'
|
||||||
console.log("hahahhaahhha"+tenant.phone);
|
|
||||||
const data = {
|
const data = {
|
||||||
symbol: tenant.symbol,
|
symbol: tenant.symbol,
|
||||||
contact: tenant.contact,
|
contact: tenant.contact,
|
||||||
@ -25,24 +22,21 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
getAll(){
|
async getAll() {
|
||||||
const url='http://localhost:8080/getAllTenant'
|
const url = '/api/tenant/getAllTenant'
|
||||||
return axios.get(url)
|
const response = await axios.get(url)
|
||||||
.then(response => {
|
|
||||||
return response.data;
|
return response.data;
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
update(tenant) {
|
update(tenant) {
|
||||||
const url='http://localhost:8080/updateTenant';
|
const url = '/api/tenant/updateTenant';
|
||||||
console.log("哈哈哈哈哈哈哈啊哈哈哈哈哈"+tenant);
|
|
||||||
return axios.post(url, tenant)
|
return axios.post(url, tenant)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
delete(tenant) {
|
delete(tenant) {
|
||||||
const url='http://localhost:8080/deleteTenant';
|
const url = '/api/tenant/deleteTenant';
|
||||||
return axios.post(url, tenant)
|
return axios.post(url, tenant)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user