feat(recipe detail page): [M] 修复 api 路径错误
[M] 修复 api 路径错误 Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
parent
1fa790a185
commit
8a3a6358d2
@ -33,6 +33,8 @@ import 'element-plus/dist/index.css';
|
|||||||
import router from '@/router/index';
|
import router from '@/router/index';
|
||||||
import input_recipe from '@/components/input_recipe.vue';
|
import input_recipe from '@/components/input_recipe.vue';
|
||||||
import constants from '@/utils/constants.js';
|
import constants from '@/utils/constants.js';
|
||||||
|
import config from '@/config/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RecipeDetail',
|
name: 'RecipeDetail',
|
||||||
components: { input_recipe },
|
components: { input_recipe },
|
||||||
@ -44,7 +46,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
axios
|
axios
|
||||||
.get('//localhost:8000/recipe/recipe/' + this.$route.params.id)
|
.get(config.publicPath + '/recipe/recipe/' + this.$route.params.id)
|
||||||
.then((response) => (this.recipe = response.data));
|
.then((response) => (this.recipe = response.data));
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user