✨ feat:添加接口
This commit is contained in:
parent
83be95aff8
commit
55619df6f2
|
@ -95,7 +95,8 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { posttListAPI } from '../api/index'
|
||||
const data = ref([
|
||||
{
|
||||
text: '全部'
|
||||
|
@ -113,10 +114,17 @@ const data = ref([
|
|||
text: '生活服务'
|
||||
}
|
||||
])
|
||||
const posttList = async () => {
|
||||
const arr = await posttListAPI({ id: '', category: '', name: '', tags: '', status: '' })
|
||||
console.log(arr)
|
||||
}
|
||||
const dataIndex = ref(0)
|
||||
function click (index) {
|
||||
dataIndex.value = index
|
||||
}
|
||||
onMounted(() => {
|
||||
posttList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -120,7 +120,7 @@ const block = () => {
|
|||
router.push('/about')
|
||||
}
|
||||
onMounted(() => {
|
||||
posttListAPI({ id: '', category: '', name: '', tags: '', status: '' })
|
||||
// posttListAPI({ id: '', category: '', name: '', tags: '', status: '' })
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user