edu/uniapp/src/pages/customer_service/customer_service.vue

27 lines
641 B
Vue
Raw Normal View History

2022-09-08 08:28:56 +00:00
<template>
<view class="customer-service">
<view v-for="(item, index) in state.pages" :key="index">
<template v-if="item.name == 'customer-service'">
<w-customer-service :content="item.content" :styles="item.styles" />
</template>
</view>
</view>
</template>
<script setup lang="ts">
import { getDecorate } from '@/api/shop'
import { reactive } from 'vue'
const state = reactive<{
pages: any[]
}>({
pages: []
})
const getData = async () => {
const data = await getDecorate({ id: 3 })
state.pages = JSON.parse(data.pages)
}
getData()
</script>
<style></style>