|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<u-navbar title="商品详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
|
- <view class="detail">
|
|
|
+ <view class="detail" style="margin-bottom: 108rpx;">
|
|
|
<view class="detail-top">
|
|
|
<u-swiper :list="picUrlArr" height="375" radius="0" :indicator="true" :circular="true"></u-swiper>
|
|
|
</view>
|
|
@@ -16,7 +16,17 @@
|
|
|
<view class="detail-description">
|
|
|
<view class="" v-html="description"></view>
|
|
|
</view>
|
|
|
+ <view style="detail-merchant" @click="toCompanyData" v-if="info.merchantInfo?true:false">
|
|
|
+ <view class="detail-merchant-warp">
|
|
|
+ <view class="detail-merchant-warp-one">商家信息</view>
|
|
|
+ <view class="detail-merchant-warp-two">
|
|
|
+ <view style="float: left;">前往查看</view>
|
|
|
+ <u-icon style="float: right;" name="arrow-right" size="18"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+
|
|
|
<view class="footer-fixed">
|
|
|
<view class="flex btn">
|
|
|
<button type="default" @click="exChange">立即兑换</button>
|
|
@@ -131,7 +141,9 @@
|
|
|
this.picUrlArr.push(env.filePublic + item + '?imageView2/2/w/750')
|
|
|
})
|
|
|
// 处理富文本
|
|
|
- const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"").replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"", ".png?imageView2/2/w/750\"");
|
|
|
+ const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
|
|
|
+ .replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
|
|
|
+ ".png?imageView2/2/w/750\"");
|
|
|
this.description = this.formatRichText(description);
|
|
|
this.skuListInit = res.data.skuList
|
|
|
if (res.data.skuList.length) {
|
|
@@ -247,6 +259,12 @@
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ toCompanyData(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:`/pages/goods/company?goodsId=${ this.goodsId }`
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
/**
|
|
|
* 处理富文本里的图片宽度自适应
|
|
@@ -330,6 +348,33 @@
|
|
|
background-color: #FFFFFF;
|
|
|
}
|
|
|
|
|
|
+ &-merchant {
|
|
|
+ height: 88rpx;
|
|
|
+ // text-align: center;
|
|
|
+ line-height: 88rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+
|
|
|
+ &-warp {
|
|
|
+ height: 88rpx;
|
|
|
+ width: 100%;
|
|
|
+ background-color: #ffffff;
|
|
|
+ margin-top: 10rpx;
|
|
|
+
|
|
|
+ &-one {
|
|
|
+ float: left;
|
|
|
+ margin: 20rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-two {
|
|
|
+ float: right;
|
|
|
+ margin: 20rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
&-description {
|
|
|
image {
|
|
|
width: 100%;
|
|
@@ -415,10 +460,6 @@
|
|
|
margin-left: 36rpx;
|
|
|
border: 1px solid $uni-bg-color;
|
|
|
}
|
|
|
-
|
|
|
- // &-item:first-child {
|
|
|
- // margin-left: 0;
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
|