<template>
|
<view class="box">
|
<view class="box_title">
|
<view class="title">海耶斯谷(浓缩)</view>
|
<view class="info">Hayes Valley (concentrated)</view>
|
<view class="banner">
|
<view class="banner_left" @click="left">
|
<uni-icons type="back" size="30" color="#999999"></uni-icons>
|
</view>
|
<view class="banner_box">
|
<swiper class="swiper" circular :indicator-dots="false" :autoplay="false" :interval="2000" id="swiper" :current="current" :duration="500">
|
<swiper-item v-for="(item,index) in info" :key="index">
|
<view class="swiper-item">
|
<image src="@/static/uni.png" mode="heightFix"></image>
|
</view>
|
</swiper-item>
|
</swiper>
|
</view>
|
<view class="banner_right" @click="right">
|
<uni-icons type="forward" size="30" color="#999999"></uni-icons>
|
</view>
|
</view>
|
<view class="tags">
|
<text>黑巧克力 · 橙皮 · 红糖</text>
|
</view>
|
<view class="parameter">
|
<view class="parameter_item">
|
<text>巧克力风味</text>
|
<view class="parameter_item_list">
|
<view class="parameter_item_list_item">
|
<view class="yuan active1"></view>
|
<view class="xian active"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan active1"></view>
|
<view class="xian active"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan active1"></view>
|
<view class="xian"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan"></view>
|
</view>
|
</view>
|
<text>花香风味</text>
|
</view>
|
<view class="parameter_item">
|
<text>浅烘培</text>
|
<view class="parameter_item_list">
|
<view class="parameter_item_list_item">
|
<view class="yuan active1"></view>
|
<view class="xian active"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan active1"></view>
|
<view class="xian"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan"></view>
|
<view class="xian"></view>
|
</view>
|
<view class="parameter_item_list_item">
|
<view class="yuan"></view>
|
</view>
|
</view>
|
<text>深烘培</text>
|
</view>
|
</view>
|
</view>
|
<view class="box_appraise">
|
<view class="title">
|
<text class="title_wz">商品评价</text>
|
<view class="title_right" @click="toAll">
|
<text>查看全部</text>
|
<uni-icons type="forward" size="18" color="#999999"></uni-icons>
|
</view>
|
</view>
|
<view class="list">
|
<view class="list_item">
|
<view class="list_item_img">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<text>木**王</text>
|
</view>
|
<view class="list_item_fen">
|
<uni-rate size="18" :value="5" color="#bbb" active-color="red" />
|
</view>
|
<view class="list_item_info">
|
<text>好好看,质量也棒棒哒!</text>
|
</view>
|
</view>
|
<view class="list_item">
|
<view class="list_item_img">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<text>木**王</text>
|
</view>
|
<view class="list_item_fen">
|
<uni-rate size="18" :value="5" color="#bbb" active-color="red" />
|
</view>
|
<view class="list_item_info">
|
<text>好好看,质量也棒棒哒!好好看,质量也棒棒哒好好看,质量也棒棒哒好好看,质量也棒棒哒好好看,质量也棒棒哒好好看,质量也棒棒哒</text>
|
<view class="list_item_info_img">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<view class="num">4</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="box_desc">
|
<view class="label">商品详情</view>
|
<view class="content">富文本</view>
|
</view>
|
<view class="box_zw"></view>
|
<view class="shop_operate">
|
<view class="shop_operate_list">
|
<view class="shop_operate_list_item">
|
<image src="@/static/icon/ic_kefu@2x.png" mode="widthFix"></image>
|
<text>客服</text>
|
</view>
|
<view class="shop_operate_list_item">
|
<image src="@/static/icon/ic_fenxiang@2x.png" mode="widthFix"></image>
|
<text>分享</text>
|
</view>
|
</view>
|
<view class="shop_operate_ipt" @click="open">加入订阅</view>
|
</view>
|
<!-- 加入订阅弹框 -->
|
<uni-popup ref="popup" background-color="#fff">
|
<view class="popup">
|
<view class="popup_close" @click="close">
|
<uni-icons type="closeempty" size="25"></uni-icons>
|
</view>
|
<view class="popup_box">
|
<swiper class="swiper" circular :indicator-dots="false" :autoplay="false" :interval="2000" id="swiper" :current="current" :duration="500">
|
<swiper-item v-for="(item,index) in info" :key="index">
|
<view class="swiper-item">
|
<image src="@/static/uni.png" mode="heightFix"></image>
|
</view>
|
</swiper-item>
|
</swiper>
|
</view>
|
<view class="popup_info">
|
<text>海耶斯谷(浓缩)</text>
|
<text>Hayes Valley (concentrated)</text>
|
</view>
|
<view class="popup_list">
|
<view class="popup_list_item">
|
<view class="label">规格</view>
|
<scroll-view scroll-x class="popup_list_item_list">
|
<view class="popup_list_item_list_item active">
|
100g
|
</view>
|
<view class="popup_list_item_list_item">
|
200g
|
</view>
|
<view class="popup_list_item_list_item">
|
200g
|
</view>
|
<view class="popup_list_item_list_item">
|
200g
|
</view>
|
<view class="popup_list_item_list_item">
|
200g
|
</view>
|
<view class="popup_list_item_list_item">
|
200g
|
</view>
|
</scroll-view>
|
</view>
|
<view class="popup_list_item">
|
<view class="label">支付周期</view>
|
<scroll-view scroll-x class="popup_list_item_list">
|
<view class="popup_list_item_list_item active" v-for="(item, index) in 4" :key="index">
|
<text class="y">1个月</text>
|
<view class="price">
|
<text>¥</text>
|
<text>99</text>
|
</view>
|
<text class="priceNum">¥180</text>
|
</view>
|
</scroll-view>
|
</view>
|
</view>
|
<view class="popup_zw"></view>
|
<view class="popup_footer">
|
<view class="popup_footer_btn">
|
<view class="popup_footer_btn_left">
|
<view class="left_price">
|
<text>¥</text>
|
<text>99</text>
|
</view>
|
<view class="left_x"></view>
|
</view>
|
<view class="popup_footer_btn_right" @click="add">加入订阅</view>
|
</view>
|
</view>
|
</view>
|
</uni-popup>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
info: [{
|
content: '内容 A'
|
}, {
|
content: '内容 B'
|
}, {
|
content: '内容 C'
|
}],
|
current: 0
|
}
|
},
|
methods: {
|
add() {
|
uni.navigateTo({
|
url: '/pages/subscriptionConfirmation/index'
|
});
|
},
|
open() {
|
this.$refs.popup.open('bottom')
|
},
|
close() {
|
this.$refs.popup.close()
|
},
|
change(e) {
|
this.current = e.detail.current;
|
},
|
left() {
|
let current = this.current;
|
let ncurrent = current > 0 ? current - 1 : this.info.length - 1;
|
this.current = ncurrent
|
},
|
right() {
|
let current = this.current;
|
let ncurrent = current < (this.info.length - 1) ? current + 1 : 0;
|
this.current = ncurrent
|
},
|
toAll() {
|
uni.navigateTo({
|
url: '/pages/allEvaluations/index'
|
});
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_title {
|
width: 100%;
|
padding: 16rpx 32rpx 46rpx 32rpx;
|
box-sizing: border-box;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
background-color: #ffffff;
|
.title {
|
font-size: 40rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
.info {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
margin-top: 12rpx;
|
}
|
.banner /deep/ {
|
width: 100%;
|
height: 274rpx;
|
margin-top: 52rpx;
|
display: flex;
|
align-items: center;
|
.banner_left {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
.banner_right {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
.banner_box {
|
width: 314rpx;
|
height: 100%;
|
.swiper {
|
width: 100%;
|
height: 100%;
|
.swiper-item {
|
width: 100%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
}
|
}
|
}
|
.tags {
|
width: 100%;
|
text-align: center;
|
margin-top: 60rpx;
|
text {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
}
|
.parameter {
|
width: 100%;
|
margin-top: 48rpx;
|
display: flex;
|
flex-direction: column;
|
.parameter_item {
|
display: flex;
|
align-items: center;
|
margin-top: 36rpx;
|
&:first-child {
|
margin-top: 0 !important;
|
}
|
.parameter_item_list {
|
flex: 1;
|
margin: 0 34rpx;
|
display: flex;
|
align-items: center;
|
.parameter_item_list_item {
|
display: flex;
|
align-items: center;
|
.active {
|
background: #D20A0A !important;
|
}
|
.active1 {
|
border: 2rpx solid #D20A0A !important;
|
}
|
.yuan {
|
width: 12rpx;
|
height: 12rpx;
|
background: #ffffff;
|
border-radius: 50%;
|
border: 2rpx solid #EBEBEB;
|
}
|
.xian {
|
width: 108rpx;
|
height: 2rpx;
|
background-color: #EBEBEB;
|
}
|
}
|
}
|
text {
|
flex-shrink: 0;
|
font-size: 24rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
}
|
}
|
|
}
|
.box_appraise {
|
margin-top: 16rpx;
|
padding: 28rpx 32rpx;
|
background-color: #ffffff;
|
box-sizing: border-box;
|
.title {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
margin-bottom: 24rpx;
|
.title_wz {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
.title_right {
|
display: flex;
|
align-items: center;
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
margin-right: 8rpx;
|
}
|
}
|
}
|
.list {
|
width: 100%;
|
.list_item {
|
display: flex;
|
flex-direction: column;
|
padding-bottom: 24rpx;
|
box-sizing: border-box;
|
margin-top: 24rpx;
|
border-bottom: 2rpx solid #F4F5F4;
|
&:first-child {
|
margin-top: 0 !important;
|
}
|
&:last-child {
|
border: none !important;
|
padding-bottom: 0 !important;
|
}
|
.list_item_img {
|
display: flex;
|
align-items: center;
|
image {
|
width: 44rpx;
|
height: 44rpx;
|
border-radius: 50%;
|
margin-right: 12rpx;
|
}
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
}
|
.list_item_fen {
|
width: 100%;
|
margin: 14rpx 0 20rpx 0;
|
}
|
.list_item_info {
|
width: 100%;
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
.list_item_info_img {
|
flex-shrink: 0;
|
width: 130rpx;
|
height: 130rpx;
|
position: relative;
|
margin-left: 32rpx;
|
image {
|
width: 100%;
|
height: 100%;
|
border-radius: 10rpx;
|
}
|
.num {
|
position: absolute;
|
right: 8rpx;
|
bottom: 8rpx;
|
width: 32rpx;
|
height: 32rpx;
|
line-height: 32rpx;
|
text-align: center;
|
background: rgba(0,0,0,0.4);
|
border-radius: 50%;
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #FFFFFF;
|
}
|
}
|
.text {
|
flex: 1;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
-webkit-line-clamp: 2;
|
display: -webkit-box;
|
-webkit-box-orient: vertical;
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
}
|
}
|
}
|
}
|
.box_desc {
|
margin-top: 16rpx;
|
background-color: #FFFFFF;
|
padding: 28rpx 34rpx;
|
.label {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
.content {
|
margin-top: 20rpx;
|
}
|
}
|
.box_zw {
|
width: 100%;
|
height: calc(96rpx + env(safe-area-inset-bottom));
|
}
|
.shop_operate {
|
width: 100%;
|
padding: 16rpx 32rpx calc(env(safe-area-inset-bottom) + 16rpx) 0;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
border: 2rpx solid #F4F5F4;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.shop_operate_ipt {
|
width: 522rpx;
|
height: 64rpx;
|
line-height: 64rpx;
|
text-align: center;
|
background: linear-gradient(90deg, #D95A5A 0%, #D20A0A 100%);
|
border-radius: 32rpx 32rpx 32rpx 32rpx;
|
box-sizing: border-box;
|
font-size: 32rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #FFFFFF;
|
margin-left: 20rpx;
|
}
|
.shop_operate_list {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
.shop_operate_list_item {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
flex-direction: column;
|
image {
|
width: 30rpx !important;
|
height: 30rpx !important;
|
margin-bottom: 8rpx;
|
}
|
text {
|
font-size: 16rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
}
|
}
|
}
|
}
|
.popup {
|
padding: 44rpx 32rpx 0 32rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
.popup_close {
|
width: 100%;
|
text-align: right;
|
}
|
.popup_box /deep/ {
|
width: 314rpx;
|
height: 274rpx;
|
display: flex;
|
align-items: center;
|
margin-top: 36rpx;
|
.swiper {
|
width: 100%;
|
height: 100%;
|
.swiper-item {
|
width: 100%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
}
|
}
|
.popup_info {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
margin-top: 32rpx;
|
text {
|
&:first-child {
|
font-size: 40rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
&:last-child {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
margin-top: 12rpx;
|
}
|
}
|
}
|
.popup_list {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
margin-top: 60rpx;
|
.popup_list_item {
|
display: flex;
|
flex-direction: column;
|
margin-bottom: 60rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.label {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
margin-bottom: 24rpx;
|
}
|
.popup_list_item_list {
|
width: 100%;
|
white-space: nowrap;
|
.active {
|
background: rgba(210,10,10,0.08) !important;
|
border-radius: 16rpx !important;
|
border: 2rpx solid #D20A0A !important;
|
color: #D20A0A !important;
|
.price {
|
text {
|
color: #D20A0A !important;
|
}
|
}
|
}
|
.popup_list_item_list_item {
|
display: inline-block;
|
padding: 24rpx 42rpx;
|
background: #F5F5F5;
|
border-radius: 16rpx;
|
box-sizing: border-box;
|
margin-right: 34rpx;
|
&:last-child {
|
margin-right: 0 !important;
|
}
|
.y {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
.price {
|
display: flex;
|
align-items: center;
|
margin: 20rpx 0;
|
text {
|
&:first-child {
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
margin-top: 15rpx;
|
}
|
&:last-child {
|
font-size: 48rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
}
|
}
|
.priceNum {
|
text-decoration: line-through;
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
}
|
}
|
}
|
}
|
.popup_zw {
|
width: 100%;
|
height: calc(92rpx + env(safe-area-inset-bottom));
|
}
|
.popup_footer {
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
width: 100%;
|
padding: 10rpx 56rpx calc(10rpx + env(safe-area-inset-bottom)) 56rpx;
|
box-sizing: border-box;
|
border-top: 2rpx solid #F4F5F4;
|
background-color: #FFFFFF;
|
.popup_footer_btn {
|
width: 100%;
|
padding: 12rpx 44rpx;
|
box-sizing: border-box;
|
background: linear-gradient(270deg, #D20A0A 0%, #D95A5A 100%);
|
border-radius: 36rpx;
|
display: flex;
|
align-items: center;
|
.popup_footer_btn_left {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.left_price {
|
display: flex;
|
align-items: center;
|
text {
|
&:first-child {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #FFFFFF;
|
margin-top: 15rpx;
|
}
|
&:last-child {
|
font-size: 48rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #FFFFFF;
|
}
|
}
|
}
|
.left_x {
|
width: 0rpx;
|
height: 28rpx;
|
border: 2rpx solid #FFFFFF;
|
}
|
}
|
.popup_footer_btn_right {
|
flex-shrink: 0;
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #FFFFFF;
|
margin-left: 28rpx;
|
}
|
}
|
}
|
}
|
}
|
</style>
|