商品详情

This commit is contained in:
唐明明
2022-07-15 15:49:01 +08:00
parent c0ac8b8f76
commit 3d03979622
2 changed files with 21 additions and 18 deletions

View File

@@ -4,17 +4,12 @@
<rich-text :nodes="detailsImg"></rich-text> <rich-text :nodes="detailsImg"></rich-text>
</view> </view>
<view class="exhibition-receive"> <view class="exhibition-receive">
<view class="exhibition-receive-btn" @click="popLogin" v-if="!detailsData.hasLogin"> <view class="exhibition-receive-btn exhibition-receive-btn-50" @click="popClick">
参与活动 记录三高
</view> </view>
<block v-else> <view class="exhibition-receive-btn exhibition-receive-btn-50">
<view class="exhibition-receive-btn" @click="popClick" v-if="canSample"> 活动分享
参与活动 </view>
</view>
<view class="exhibition-receive-btn active" v-else>
已参与
</view>
</block>
</view> </view>
<view class="popBack" v-if="popShow"></view> <view class="popBack" v-if="popShow"></view>
@@ -123,8 +118,11 @@
}, },
methods: { methods: {
// 商品详情数据 // 商品详情数据
detailsInfo() { detailsInfo() {
goods(this.$Route.query.id).then(res => { goods(2).then(res => {
console.log(res)
this.detailsData = res this.detailsData = res
this.detailsImg = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"') this.detailsImg = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
this.canSample = res.canSample this.canSample = res.canSample
@@ -314,17 +312,18 @@
} }
.exhibition-receive { .exhibition-receive {
position: fixed; position: fixed;
display: flex;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
padding: 17rpx 30rpx; padding: 17rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
z-index: 9; z-index: 9;
.exhibition-receive-btn { .exhibition-receive-btn {
background-color: #ff8260; background-color: $mian-color;
color: #FFFFFF; color: #FFFFFF;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
@@ -334,7 +333,11 @@
background-color: #d5d5d5; background-color: #d5d5d5;
color: #a9a9a9; color: #a9a9a9;
} }
} }
.exhibition-receive-btn-50{
width: 50%;
margin: 0 10px;
}
} }
.site-btn button[size="mini"] { .site-btn button[size="mini"] {

View File

@@ -200,7 +200,7 @@
.content{ .content{
overflow: hidden; overflow: hidden;
background: #f3f4f6; background: #f3f4f6;
min-height: 100vh; min-height: calc(100vh - 60px);
} }
.tabs{ .tabs{