Ver Fonte

商品详情显示优化

hwb0 há 3 anos atrás
pai
commit
7558e37aeb
2 ficheiros alterados com 4 adições e 4 exclusões
  1. 2 2
      packageGoods/goods/detail.vue
  2. 2 2
      packagePrize/goods/detail.vue

+ 2 - 2
packageGoods/goods/detail.vue

@@ -14,7 +14,7 @@
 			</view>
 			<view class="detail-goods">商品详情</view>
 			<view class="detail-description">
-				<view class="" v-html="description"></view>
+				<u-parse :content="description" :selectable="true"></u-parse>
 			</view>
 			<view style="detail-merchant" @click="toCompanyData" v-if="info.merchantInfo?true:false">
 				<view class="detail-merchant-warp">
@@ -289,7 +289,7 @@
 				});
 				newContent = newContent.replace(/<br[^>]*\/>/gi, '');
 				newContent = newContent.replace(/\<img/gi,
-					'<img style="max-width:100%;height:auto;margin:10rpx auto;"');
+					'<img style="max-width:100%;height:auto;font-size: 0;margin-top: -5px;"');
 				return newContent;
 			},
 		}

+ 2 - 2
packagePrize/goods/detail.vue

@@ -10,7 +10,7 @@
 			</view>
 			<view class="detail-title">商品详情</view>
 			<view class="detail-description">
-				<view class="" v-html="description"></view>
+				<u-parse :content="description" :selectable="true"></u-parse>
 			</view>
 			<view style="detail-merchant" @click="toCompanyData" v-if="info.merchantInfo?true:false">
 				<view class="detail-merchant-warp">
@@ -127,7 +127,7 @@
 				});
 				newContent = newContent.replace(/<br[^>]*\/>/gi, '');
 				newContent = newContent.replace(/\<img/gi,
-					'<img style="max-width:100%;height:auto;margin:10rpx auto;"');
+					'<img style="max-width:100%;height:auto;font-size: 0;margin-top: -5px;"');
 				return newContent;
 			},
 		}