feat:增加美食朋友圈接口
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<template>
|
||||
<div class="common-mobile-view food-moment">
|
||||
<moment-card v-for="(item, index) in 4" :key="index"/>
|
||||
<moment-card v-for="(item, index) in foodStore.momentList"
|
||||
:key="index" :item="item"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MomentCard from '@/components/Moment/MomentCard.vue'
|
||||
import { useFoodStore } from '@/store/food'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await foodStore.queryMomentList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -71,13 +71,13 @@ const addClick = () => {
|
||||
|
||||
switch (foodInfo.recordSegment) {
|
||||
case 'recipe':
|
||||
foodStore.foodRecipeApiType = 'ADD'
|
||||
foodStore.currentFoodRecipe = foodStore.getEmptyFoodRecipe()
|
||||
foodStore.recipeApiType = 'ADD'
|
||||
foodStore.currentRecipe = foodStore.getEmptyRecipe()
|
||||
router.push('/record/recipeForm')
|
||||
break
|
||||
case 'daily':
|
||||
foodStore.foodRecordApiType = 'ADD'
|
||||
foodStore.currentFoodRecord = foodStore.getEmptyFoodRecord()
|
||||
foodStore.recordApiType = 'ADD'
|
||||
foodStore.currentRecord = foodStore.getEmptyRecord()
|
||||
router.push('/record/recordForm')
|
||||
break
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user