From b83ba3cc4687f21d744e9866e10e30e91229e8a4 Mon Sep 17 00:00:00 2001 From: queenwuli <942534046@qq.com> Date: Thu, 28 Jan 2021 16:23:30 +0800 Subject: [PATCH] gx --- hive-app/pages/workbench/productDetail/index.vue | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hive-app/pages/workbench/productDetail/index.vue b/hive-app/pages/workbench/productDetail/index.vue index 8f4b154..0c2fadd 100644 --- a/hive-app/pages/workbench/productDetail/index.vue +++ b/hive-app/pages/workbench/productDetail/index.vue @@ -1,9 +1,6 @@ <template> <!-- 商品详情 --> <view> - <!-- #ifndef H5 --> - <view class="status_bar"></view> - <!-- #endif --> <navigator open-type="navigateBack" hover-class="none"> <view class="back iconfont iconzuojiantou"></view> </navigator> @@ -13,7 +10,7 @@ duration="1500" @change="swiperChange"> <swiper-item v-for="(item,index) in banner" :key="index"> - <image class="img" :src="item.img?item.img:'../../../static/images/no-img.png'"></image> + <image class="img" :src="item?item:'../../../static/images/no-img.png'"></image> <view class="indicator"> <text>{{swiperIndex+1}}/{{banner.length}}</text> </view> @@ -101,7 +98,11 @@ this.$httpUtils.request('/api/order/findGoodsDetailById/'+id).then((res) => { if(res.status == 200){ this.productInfo = res.mapInfo.goods; - this.banner.push(this.productInfo.img); + this.banner = this.productInfo.img?this.productInfo.img.split(','):[]; + if(this.productInfo.desc){ + this.productInfo.desc = this.productInfo.desc.replace(/\<img/gi, '<img style="max-width:100%;height:auto" '); + } + } }) } @@ -115,7 +116,7 @@ } .back{ position: absolute; - top: 10px; + top: var(--status-bar-height); left: 10px; z-index: 9; font-size: 28px; @@ -163,9 +164,6 @@ padding: 10px; min-height: 500rpx; font-size: 14px; - } - .product-desc img{ - max-width: 100%; } </style> -- Gitblit v1.9.1