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