|
|
@@ -0,0 +1,54 @@
|
|
|
+<script setup lang="ts">
|
|
|
+
|
|
|
+import {getStoreById} from "../../api/store.ts";
|
|
|
+import {useRouter} from "vue-router";
|
|
|
+import {ref} from "vue";
|
|
|
+
|
|
|
+const router = useRouter();
|
|
|
+const storeId = router.currentRoute.value.params.storeId;
|
|
|
+let storeVO = ref([]);
|
|
|
+let id = ref('')
|
|
|
+let name = ref('')
|
|
|
+let logoUrl = ref('')
|
|
|
+let rating = ref('')
|
|
|
+let number = ref('')
|
|
|
+let location = ref('')
|
|
|
+
|
|
|
+getStoreDetail();
|
|
|
+
|
|
|
+function getStoreDetail() {
|
|
|
+ getStoreById(storeId).then(res => {
|
|
|
+ storeVO.value = res.result;
|
|
|
+ console.log(storeVO.value);
|
|
|
+ id = storeVO.value.id
|
|
|
+ name = storeVO.value.name
|
|
|
+ logoUrl = storeVO.value.logoUrl
|
|
|
+ rating = storeVO.value.rating
|
|
|
+ number = storeVO.value.number
|
|
|
+ location = storeVO.value.location
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <el-image class="logo-image" :src="logoUrl"/>
|
|
|
+ <el-row style="font-size: 20px">
|
|
|
+ {{ name }}
|
|
|
+ </el-row>
|
|
|
+ <el-row style="font-size: 10px">
|
|
|
+ 评分人数: {{ number }}
|
|
|
+ </el-row>
|
|
|
+ <el-row style="font-size: 10px">
|
|
|
+ 评分: {{ rating }}
|
|
|
+ </el-row>
|
|
|
+ <el-row style="font-size: 10px">
|
|
|
+ 地址: {{ location }}
|
|
|
+ </el-row>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.logo-image {
|
|
|
+ height: 120px;
|
|
|
+}
|
|
|
+</style>
|