产品详情页导航栏,图片自适应,尺码大小,去掉单位
Test Runner / hello (push) Successful in 4s

This commit is contained in:
2026-08-25 11:37:02 +08:00
parent 075928124c
commit bd6f7a378e
5 changed files with 28 additions and 27 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
<template>
<!-- 产品详情页 - 接入 /public/goods/{goodId} 接口 -->
<view class="detail-page">
<view class="detail-page" :style="{ paddingTop: statusBarHeight + 'px' }">
<!-- 产品图片轮播 + 指示点 -->
<DetailSwiper :images="productImages" />
@@ -72,6 +72,7 @@ export default {
},
data() {
return {
statusBarHeight: 20,
productId: null,
loading: false,
product: {
@@ -98,6 +99,12 @@ export default {
}
},
onLoad(options) {
try {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight || 20
} catch (e) {
this.statusBarHeight = 20
}
if (options && options.id) {
this.productId = options.id
this.loadDetail(options.id)