@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user