Browse Source

特产还原

master
jiazhipeng 8 months ago
parent
commit
7f97576a66
  1. 2
      pages/info/postProductInfo/index.js
  2. 53
      pages/info/postProductInfo/index.wxml
  3. 123
      pages/info/postProductInfo/index.wxss

2
pages/info/postProductInfo/index.js

@ -11,7 +11,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
autoPlay: false, autoPlay: true,
fixed: false, fixed: false,
type: 1, type: 1,
top: 0, top: 0,

53
pages/info/postProductInfo/index.wxml

@ -2,21 +2,11 @@
<wxs src="../../../utils/filter.wxs" module="tool" /> <wxs src="../../../utils/filter.wxs" module="tool" />
<title title="产品详情"></title> <title title="产品详情"></title>
<view class="iconfont icon-fenxiang" bindtap="share"></view> <view class="iconfont icon-fenxiang" bindtap="share"></view>
<view class="swiper-bottom">
<view class="swiper-bottom-item active">1/2</view>
<view class="swiper-bottom-item">视频</view>
<view class="swiper-bottom-item">图片</view>
<view class="swiper-bottom-item">款式</view>
</view>
<image wx:for="{{info.sku}}" style="{{aniSkuIndex==index?('top:'+cartTop+'px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{info.headimg}}" mode="aspectFill"></image> <image wx:for="{{info.sku}}" style="{{aniSkuIndex==index?('top:'+cartTop+'px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{info.headimg}}" mode="aspectFill"></image>
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" interval="{{2000}}" duration="{{300}}"> <swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{autoPlay}}" interval="{{2000}}" duration="{{300}}">
<block wx:if="{{info.videourl}}" wx:key="*this"> <block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item> <swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}" <video bindplay="playVideo" src="{{info.videourl}}" controls></video>
show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}"></video>
<!-- <image src="{{info.headimg}}" mode="aspectFill"></image> --> <!-- <image src="{{info.headimg}}" mode="aspectFill"></image> -->
</swiper-item> </swiper-item>
</block> </block>
@ -34,20 +24,14 @@
<view wx:if="{{info}}"> <view wx:if="{{info}}">
<!-- 酒景套餐 --> <!-- 酒景套餐 -->
<view class="top-info" style="padding: 0;" > <view class="top-info" style="padding: 0;" wx:if="{{info.is_package===1}}">
<view class="wineScene-price-container" > <div class="wineScene-price-container" >
<view class="wineSecne-price">{{info.price/100}}<text class="wineSecne-money">优惠前¥{{info.market_price/100}}</text></view> <div class="wineSecne-price">{{info.price/100}}<span class="wineSecne-money">¥{{info.market_price/100}}</span></div>
<view>已售{{info.sales_number>1000?"1000+":(info.sales_number||0)}}</view> <div>已售{{info.sales_number||0}}份</div>
</view> </div>
<view style="padding: 20rpx 20rpx 20rpx 26rpx;"> <view style="padding: 26rpx 26rpx 0;">
<view class="select-img"> <view class="title" style="font-weight: bold;">{{info.title}}</view>
<image src="{{info.headimg}}"></image> <view class="hotel-custom" style="padding:26rpx 0">
<text class="select-img">款式选择</text>
<image wx:for="{{info.sku}}" wx:key="index" src="{{item.headimg}}"></image>
</view>
<view class="title textOver2">{{info.title}}</view>
<!-- <view class="hotel-custom" style="padding:26rpx 0">
<view class="hotel-custom-detail" wx:for="{{info.product_data}}" wx:key="item"> <view class="hotel-custom-detail" wx:for="{{info.product_data}}" wx:key="item">
<view class="tip-info"> <view class="tip-info">
<view class="tip">{{index}}</view> <view class="tip">{{index}}</view>
@ -63,15 +47,10 @@
</view> </view>
</view> </view>
</view> -->
<view class="tags-box textOver">
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}</view>
</view> </view>
</view> </view>
<view style="width: 100%;background:#f2f2f2;padding-top: 16rpx;margin-bottom: -8rpx;" <view style="width: 100%;background:#f2f2f2;padding-top: 16rpx;margin-bottom: -8rpx;" bindtap="gotolocation">
bindtap="gotolocation" wx:if="{{info.is_package===1}}">
<view class="map-container"> <view class="map-container">
<view> <view>
<view class="textOver" style="font-weight: 500;font-size: 28rpx;color: #000000;width: 600rpx;">{{info.scene_name}}</view> <view class="textOver" style="font-weight: 500;font-size: 28rpx;color: #000000;width: 600rpx;">{{info.scene_name}}</view>
@ -85,7 +64,15 @@
</view> </view>
</view> </view>
</view> </view>
<view class="top-info" wx:else>
<view class="title">{{info.title}}</view>
<view class="subtitle">{{info.subtitle}}</view>
<view class="tags-box textOver">
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view>
</view>
<view class="tags-price"><text>¥</text><text>{{info.price/100}}</text><text>起</text></view>
</view>
</view>
</view> </view>
<!-- 买家评价 --> <!-- 买家评价 -->

123
pages/info/postProductInfo/index.wxss

@ -5,66 +5,92 @@ page {
.swiper { .swiper {
width: 100%; width: 100%;
height: 750rpx; height: 420rpx;
} }
.swiper image,.swiper video {
height: 750rpx; .swiper image,
.swiper video {
height: 420rpx;
display: block; display: block;
width: 100%; width: 100%;
} }
.swiper-bottom{
position: absolute;
/* top: 750rpx; */
margin-top: 694rpx;
right: 0;
width: fit-content;
height: 56rpx;
line-height: 56rpx;
background: rgba(1, 0, 0, 0.6);
border-radius: 13rpx 0 0 13rpx;
display: flex;
font-weight: 500;
font-size: 24rpx;
color: rgba(255,255,255,0.5);
z-index: 10;
padding: 0 5rpx;
overflow: hidden;
}
.swiper-bottom-item{
padding: 0 14rpx;
}
.swiper-bottom-item.active{
color: #fff;
}
.top-info { .top-info {
border-radius: 20rpx 20rpx 0 0;
background: white; background: white;
position: relative; position: relative;
z-index: 1; z-index: 1;
margin-top: -20rpx;
padding: 20rpx 40rpx;
} }
.top-info .title { .top-info .title {
font-weight: bold; font-size: 32rpx;
font-size: 33rpx; font-weight: 500;
color: #000000; color: #000;
}
.top-info .subtitle {
color: #666;
font-size: 27rpx;
margin-top: 20rpx;
} }
.tags-box { .tags-box {
margin-top: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: 500;
font-size: 25rpx;
color: #0B898E; color: #0B898E;
font-size: 27rpx;
height: 50rpx;
} }
.tags-box .tag { .tags-box .tag {
margin-top: 27rpx; position: relative;
height: 40rpx; line-height: 20rpx;
line-height: 40rpx; font-size: 20rpx;
margin-right: 15rpx; font-weight: 500;
padding: 0 14rpx; line-height: 50rpx;
background: rgba(11, 137, 142, 0.1); margin-right: 10rpx;
border-radius: 4rpx; }
.tags-box .tag .line {
content: "1";
display: block;
font-size: 0;
position: absolute;
left: 0;
right: 0;
background: #DAF3E9;
height: 8rpx;
top: 30rpx;
z-index: -1;
}
.tags-price {
flex: 1;
text-align: right;
color: #D62828;
}
.tags-price text:nth-child(1) {
font-size: 27rpx;
}
.tags-price text:nth-child(2) {
font-size: 40rpx;
font-weight: bold;
}
.tags-price text:nth-child(3) {
font-size: 20rpx;
color: #999999;
margin-left: 4rpx;
}
.tags-box .iconfont {
margin-left: 4rpx;
font-size: 24rpx;
} }
.address-box { .address-box {
@ -957,9 +983,8 @@ height: 133rpx;
.wineScene-price-container { .wineScene-price-container {
width: 750rpx; width: 750rpx;
height: 100rpx; height: 100rpx;
/* background: linear-gradient(-90deg,#FF413B, #FFAB2E); */ background: linear-gradient(-90deg,#FF413B, #FFAB2E);
background: #FD3856; border-radius: 20rpx 20rpx 0rpx 0rpx;
/* border-radius: 20rpx 20rpx 0rpx 0rpx; */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -971,13 +996,13 @@ height: 133rpx;
.wineScene-price-container .wineSecne-price { .wineScene-price-container .wineSecne-price {
font-weight: bold; font-weight: bold;
font-size: 48rpx; font-size: 36rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.wineScene-price-container .wineSecne-money { .wineScene-price-container .wineSecne-money {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
/* text-decoration-line: line-through; */ text-decoration-line: line-through;
padding-left: 14rpx; padding-left: 14rpx;
} }
.wineScene-price-container .wineSecne-price::before { .wineScene-price-container .wineSecne-price::before {
@ -1049,13 +1074,3 @@ height: 133rpx;
width: 29rpx; width: 29rpx;
height: 29rpx; height: 29rpx;
} }
.select-img{
display: flex;
}
.select-img image{
width: 80rpx;
height: 80rpx;
border-radius: 13rpx;
margin-right:20rpx;
}
Loading…
Cancel
Save