choujiang/pagesB/commodityDetails/commodityDetails.vue

453 lines
11 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="content">
<statusNav returnColor="#141414" fontWeight="800" titleColor="#141414" backgroudColor="#ffffff"
navBarTitle="商品详情">
</statusNav>
<view class="head">
<view class="text">
<view class="money-signin">
65.00+100积分
</view>
<view class="money">
125.00
</view>
<view class="sales-volume">
月销5.5
</view>
</view>
</view>
<view class="main">
<view class="title">
SAN BENEDTTO 圣碧涛 自由携带瓶装矿
泉水500ml 4瓶装
</view>
<view class="text">
<view class="tit">
兑换说明
</view>
<view class="text-content">
<view class="li">
1.兑换成功后可获得3.00元抵用券
</view>
<view class="li">
2.券后仅需65.00元即可购买以购买页实时价格为准
</view>
<view class="li">
3.请在适用范围内使用数量有限兑换即止
</view>
</view>
</view>
<view class="brief-introduction">
<view class="brief-introduction-title">
图文详情
</view>
<view class="img">
</view>
</view>
<view class="recommend">
<view class="recommend-title">
推荐商品
</view>
<view class="mall">
<view class="li" v-for="(item,index) in 2">
<image src="" class="img" mode=""></image>
<view class="name">
现金红包666元独宠一人
</view>
<view class="num">
¥30.00+20积分
</view>
</view>
</view>
</view>
</view>
<view class="button" @click="buyButton()">
立即兑换
</view>
<view class="make" @click="buyMakeButton" v-if="isbuy">
</view>
<view class="buy-make" :class="isbuy?'buy-make-b':''">
<view class="one">
<image src="" class="img" mode=""></image>
<view class="text">
<view class="name">
法国品牌兰蔻抗皱精
华水200ml
</view>
<view class="money-signin">
¥1236.00+2000积分
</view>
</view>
</view>
<view class="specification">
<view class="title">
规格
</view>
<view class="money-signin">
200ml+220g
</view>
</view>
<view class="quantity">
<view class="title">
数量 <text class="cor">每个人限购25件</text>
</view>
<view class="btn">
<view class="subtract">
</view>
<input type="text" v-model="inputNum" class="input" value="" />
<view class="add">
</view>
</view>
</view>
<view class="buy-make-button" @click="buyMakeButton()">
</view>
</view>
</view>
</template>
<script>
import statusNav from '../../components/status-nav.vue';
export default {
components: {
statusNav
},
data() {
return {
inputNum: 1,
isbuy:false
}
},
methods: {
buyButton(){
this.isbuy=true
},
buyMakeButton(){
this.isbuy=false
}
}
}
</script>
<style>
.content {
padding-bottom: 180rpx;
}
.head {
width: 100%;
margin-top: 40rpx;
background-color: rgb(232, 232, 232);
height: 518rpx;
position: relative;
}
.head .text {
position: absolute;
bottom: 0rpx;
left: 0rpx;
display: flex;
box-sizing: border-box;
width: 100%;
padding: 20rpx 24rpx;
}
.head .text .money-signin {
color: rgba(244, 47, 47, 100);
font-size: 40rpx;
margin-right: 12rpx;
}
.head .text .money {
position: relative;
color: rgba(208, 208, 208, 100);
font-size: 28rpx;
}
.head .text .money::after {
content: "";
width: 120rpx;
display: block;
position: absolute;
height: 2rpx;
top: 40%;
left: 0rpx;
background-color: rgba(208, 208, 208, 100);
}
.head .text .sales-volume {
position: absolute;
top: 20rpx;
right: 24rpx;
color: rgba(208, 208, 208, 100);
font-size: 28rpx;
}
.main {
padding: 0 24rpx;
}
.main .title {
color: rgba(16, 16, 16, 100);
font-size: 36rpx;
font-weight: 600;
line-height: 60rpx;
padding: 30rpx 0rpx;
border-bottom: 2rpx solid rgba(187, 187, 187, 100);
}
.main .text {
color: rgba(16, 16, 16, 100);
font-size: 30rpx;
padding: 30rpx 0 30rpx;
border-bottom: 2rpx solid rgba(187, 187, 187, 100);
}
.main .text .text-content .li {
color: rgba(16, 16, 16, 100);
font-size: 28rpx;
margin-top: 16rpx;
}
.brief-introduction-title {
margin-top: 30rpx;
color: rgba(16, 16, 16, 100);
font-size: 30rpx;
margin-bottom: 20rpx;
}
.brief-introduction .img {
background-color: rgb(232, 232, 232);
width: 100%;
height: 1106rpx;
}
.recommend-title {
color: rgba(16, 16, 16, 100);
font-size: 36rpx;
font-weight: 600;
margin-top: 40rpx;
margin-bottom: 16rpx;
}
.mall {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.mall .li {
width: 340rpx;
height: 440rpx;
border-radius: 20rpx;
margin-bottom: 22rpx;
box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.1);
}
.mall .li .img {
background-color: rgba(236, 236, 236, 100);
width: 100%;
height: 310rpx;
border-radius: 20rpx 20rpx 0px 0px;
}
.mall .li .name {
color: rgba(16, 16, 16, 100);
font-size: 28rpx;
padding: 14rpx 14rpx;
font-family: PingFangSC-regular;
}
.mall .li .num {
color: rgba(243, 122, 97, 100);
font-size: 28rpx;
padding: 0 14rpx;
font-weight: normal;
}
.button {
width: 694rpx;
height: 110rpx;
border-radius: 20rpx;
background-color: rgba(243, 122, 97, 100);
text-align: center;
line-height: 110rpx;
position: fixed;
bottom: 18rpx;
left: 50%;
color: rgba(255, 255, 255, 100);
font-size: 32rpx;
margin-left: -347rpx;
}
.make {
width: 100%;
z-index: 66;
height: 100%;
position: fixed;
left: 0rpx;
top: 0rpx;
background-color: rgba(0, 0, 0, 0.5)
}
.buy-make {
width: 100%;
height: 476rpx;
border-radius: 40rpx 40rpx 0px 0px;
background-color: #FFFFFF;
position: fixed;
z-index: 100;
left: 0rpx;
transition: 0.5s all;
bottom: -576rpx;
padding-left: 38rpx;
padding-right: 28rpx;
box-sizing: border-box;
}
.buy-make-b{
bottom: 0rpx;
}
.buy-make .one {
display: flex;
}
.buy-make .one .img {
width: 290rpx;
margin-right: 18rpx;
height: 290rpx;
margin-top: -100rpx;
border-radius: 20rpx;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.11);
background-color: #FFFFFF;
}
.buy-make .one .name {
color: rgba(16, 16, 16, 100);
padding-top: 22rpx;
font-size: 36rpx;
width: 324rpx;
font-weight: 600;
line-height: 60rpx;
}
.buy-make .one .money-signin {
color: rgba(249, 70, 70, 100);
font-size: 28rpx;
margin-top: 16rpx;
}
.specification {
display: flex;
margin-top: 26rpx;
justify-content: space-between;
color: rgba(16, 16, 16, 100);
font-size: 28rpx;
}
.quantity {
display: flex;
justify-content: space-between;
margin-top: 36rpx;
}
.quantity .title {
color: rgba(16, 16, 16, 100);
font-size: 28rpx;
}
.quantity .title .cor {
color: rgb(156, 156, 156);
}
.quantity .btn {
display: flex;
}
.quantity .btn .subtract {
width: 52rpx;
position: relative;
height: 52rpx;
line-height: 45rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border: 2rpx solid rgba(187, 187, 187, 100);
}
.quantity .btn .subtract::after {
content: "";
width: 28rpx;
display: block;
height: 4rpx;
background-color: #bbbbbb;
}
.quantity .btn .input {
width: 118rpx;
height: 52rpx;
text-align: center;
border-top: 2rpx solid rgba(187, 187, 187, 100);
border-bottom: 2rpx solid rgba(187, 187, 187, 100);
}
.quantity .btn .add {
width: 52rpx;
height: 52rpx;
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
line-height: 52rpx;
text-align: center;
border: 2rpx solid rgba(187, 187, 187, 100);
}
.quantity .btn .add::after {
content: "";
width: 28rpx;
display: block;
height: 5rpx;
margin-top: -5rpx;
transform: rotateZ(90deg);
background-color: #141414;
}
.quantity .btn .add::before {
content: "";
width: 28rpx;
display: block;
height: 5rpx;
background-color: #141414;
}
.buy-make-button{
width: 686rpx;
height: 92rpx;
line-height: 92rpx;
border-radius: 20rpx;
background-color: rgba(243, 122, 97, 100);
text-align: center;
margin-top: 24rpx;
font-size: 28rpx;
text-align: center;
color: #FFFFFF;
}
</style>