|
@@ -60,7 +60,7 @@
|
|
</v-tabs>
|
|
</v-tabs>
|
|
</div>
|
|
</div>
|
|
<describe v-if="describeTab === 0 && state.goodsInfo?.description" :content="state.goodsInfo.description"></describe>
|
|
<describe v-if="describeTab === 0 && state.goodsInfo?.description" :content="state.goodsInfo.description"></describe>
|
|
- <comment v-if="describeTab === 0 && state.goodsId" class="detail-comment-selector" :goodsId="state.goodsId" />
|
|
|
|
|
|
+ <comment v-if="describeTab === 1 && state.goodsId" class="detail-comment-selector" :goodsId="state.goodsId" />
|
|
</div>
|
|
</div>
|
|
</v-card>
|
|
</v-card>
|
|
</div>
|
|
</div>
|
|
@@ -68,10 +68,10 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({name: 'goods-details'})
|
|
defineOptions({name: 'goods-details'})
|
|
-import { getProductDetail } from '@/api/mall'
|
|
|
|
|
|
+import { getProductDetail } from '@/api/mall/product'
|
|
import selectSku from './details/s-select-sku.vue'
|
|
import selectSku from './details/s-select-sku.vue'
|
|
import describe from './details/describe.vue'
|
|
import describe from './details/describe.vue'
|
|
-import comment from './details/comment.vue'
|
|
|
|
|
|
+import comment from './details/detail-comment-card.vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
@@ -79,7 +79,7 @@ import Snackbar from '@/plugins/snackbar'
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const { id } = router.currentRoute.value.params
|
|
const { id } = router.currentRoute.value.params
|
|
|
|
|
|
-const describeTab = ref(0)
|
|
|
|
|
|
+const describeTab = ref(1)
|
|
const selectedSkuPicUrl = ref('')
|
|
const selectedSkuPicUrl = ref('')
|
|
const selectedSkuPrice = ref('')
|
|
const selectedSkuPrice = ref('')
|
|
const selectedSkuMarketPrice = ref('')
|
|
const selectedSkuMarketPrice = ref('')
|
|
@@ -111,7 +111,7 @@ getData()
|
|
const calcPrice = (price) => { return price && (price-0) ? (price-0)/100 : '--' }
|
|
const calcPrice = (price) => { return price && (price-0) ? (price-0)/100 : '--' }
|
|
|
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
- goodsId: 0,
|
|
|
|
|
|
+ goodsId: id || 0,
|
|
skeletonLoading: true, // SPU 加载中
|
|
skeletonLoading: true, // SPU 加载中
|
|
goodsInfo: {}, // SPU 信息
|
|
goodsInfo: {}, // SPU 信息
|
|
showSelectSku: false, // 是否展示 SKU 选择弹窗
|
|
showSelectSku: false, // 是否展示 SKU 选择弹窗
|