You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
897 B
37 lines
897 B
<script setup>
|
|
const route = useRoute();
|
|
|
|
const id = computed(() => {
|
|
if(route.params.id){
|
|
return route.params.id;
|
|
}
|
|
return 0;
|
|
})
|
|
|
|
// 取得產品資料
|
|
const { data: prodRes } = await useMyFetch('/product/getProduct', "GET", { id })
|
|
const prodData = computed(() => prodRes.value.data);
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div class="content">
|
|
<div class="block">
|
|
<div class="bName">{{prodData.name}}</div>
|
|
<div class="bDesc mb-3">{{prodData.description}}</div>
|
|
<div class="imgCnt mb-3" style="width: 33%">
|
|
<img :src="prodData.imageurl" :alt="prodData.name">
|
|
</div>
|
|
<div class="bDesc mb-5 ck-content" v-html="prodData.content">
|
|
</div>
|
|
<div class="d-flex justify-content-end">
|
|
<a class="backBtn" href="javascript:;" @click="$router.back()" >back</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="less">
|
|
|
|
</style>
|