Compare commits
1 Commits
f2f99ac881
...
123e95a313
Author | SHA1 | Date | |
---|---|---|---|
123e95a313 |
@ -1,3 +1,3 @@
|
|||||||
window.ki = {
|
window.ki = {
|
||||||
apiUrl: 'http://localhost:5000'
|
api_url: 'http://localhost:5000'
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
iconUrl: this.apiUrl,
|
iconUrl: this.api_url,
|
||||||
searchText: "",
|
searchText: "",
|
||||||
contactContent: "",
|
contactContent: "",
|
||||||
searchResults: [],
|
searchResults: [],
|
||||||
@ -122,7 +122,7 @@ export default {
|
|||||||
async search() {
|
async search() {
|
||||||
try {
|
try {
|
||||||
const request = await this.axios.get(
|
const request = await this.axios.get(
|
||||||
`${this.apiUrl}/${this.type}s?search=${this.searchText}`,
|
`${this.api_url}/${this.type}s?search=${this.searchText}`,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
iconUrl: this.apiUrl
|
iconUrl: this.api_url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,6 +12,6 @@ const app = createApp(App)
|
|||||||
app.use(router)
|
app.use(router)
|
||||||
|
|
||||||
app.config.globalProperties.axios=axios
|
app.config.globalProperties.axios=axios
|
||||||
app.config.globalProperties.apiUrl = window.ki.apiUrl
|
app.config.globalProperties.apiUrl = window.ki.api_url
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
@ -80,7 +80,7 @@ export default {
|
|||||||
async submitSearch() {
|
async submitSearch() {
|
||||||
this.showErrorMessage = false;
|
this.showErrorMessage = false;
|
||||||
try {
|
try {
|
||||||
let url = `${this.apiUrl}/users/profiles`;
|
let url = `${this.api_url}/users/profiles`;
|
||||||
if (this.searchText != "") {
|
if (this.searchText != "") {
|
||||||
url += `?nickname=${this.searchText}`;
|
url += `?nickname=${this.searchText}`;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ export default {
|
|||||||
async created() {
|
async created() {
|
||||||
try {
|
try {
|
||||||
const userProfile = await axios.get(
|
const userProfile = await axios.get(
|
||||||
`${this.apiUrl}/users/${localStorage.getItem(
|
`${this.api_url}/users/${localStorage.getItem(
|
||||||
"user_id"
|
"user_id"
|
||||||
)}/profile`,
|
)}/profile`,
|
||||||
{
|
{
|
||||||
@ -198,7 +198,7 @@ export default {
|
|||||||
async submitForm() {
|
async submitForm() {
|
||||||
try {
|
try {
|
||||||
const formSubmitResult = await axios.post(
|
const formSubmitResult = await axios.post(
|
||||||
`${this.apiUrl}/users/${localStorage.getItem(
|
`${this.api_url}/users/${localStorage.getItem(
|
||||||
"user_id"
|
"user_id"
|
||||||
)}/profile`,
|
)}/profile`,
|
||||||
this.profile,
|
this.profile,
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
|||||||
async created() {
|
async created() {
|
||||||
try {
|
try {
|
||||||
const userProfile = await this.axios.get(
|
const userProfile = await this.axios.get(
|
||||||
`${this.apiUrl}/users/${this.$route.params.memberId}/profile`,
|
`${this.api_url}/users/${this.$route.params.memberId}/profile`,
|
||||||
{
|
{
|
||||||
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
|
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user