Browse Source

邮寄改版、组合下单

master
jiazhipeng 8 months ago
parent
commit
f0f9b0e8fd
  1. 46
      pages/info/postProductInfo/index.wxml
  2. 108
      pages/info/postProductInfo/index.wxss
  3. 16
      pages/info/roadInfo/index.js
  4. 15
      pages/info/sceneProductInfo/index.js
  5. 6
      pages/order/scene/index.wxml
  6. 23
      project.config.json
  7. 4
      subPackages/gwcOrder/index.wxml
  8. 1
      utils/util.js

46
pages/info/postProductInfo/index.wxml

@ -2,12 +2,21 @@
<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" 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}}" autoplay="{{true}}" muted="{{true}}"
play-btn-position="center" enable-play-gesture="{{true}}"></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>
@ -25,14 +34,16 @@
<view wx:if="{{info}}"> <view wx:if="{{info}}">
<!-- 酒景套餐 --> <!-- 酒景套餐 -->
<view class="top-info" style="padding: 0;" wx:if="{{info.is_package===1}}"> <view class="top-info" style="padding: 0;" >
<div class="wineScene-price-container" > <view class="wineScene-price-container" >
<div class="wineSecne-price">{{info.price/100}}<span class="wineSecne-money">¥{{info.market_price/100}}</span></div> <view class="wineSecne-price">{{info.price/100}}<text class="wineSecne-money">优惠前¥{{info.market_price/100}}</text></view>
<div>已售{{info.sales_number||0}}份</div> <view>已售{{info.sales_number>1000?"1000+":(info.sales_number||0)}}</view>
</div> </view>
<view style="padding: 26rpx 26rpx 0;"> <view style="padding: 20rpx 20rpx 20rpx 26rpx;">
<view class="title" style="font-weight: bold;">{{info.title}}</view> <view class="flex"></view>
<view class="hotel-custom" style="padding:26rpx 0">
<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>
@ -48,10 +59,15 @@
</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;" bindtap="gotolocation"> <view style="width: 100%;background:#f2f2f2;padding-top: 16rpx;margin-bottom: -8rpx;"
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>
@ -65,15 +81,7 @@
</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>
<!-- 买家评价 --> <!-- 买家评价 -->

108
pages/info/postProductInfo/index.wxss

@ -7,89 +7,64 @@ page {
width: 100%; width: 100%;
height: 750rpx; height: 750rpx;
} }
.swiper image,.swiper video {
.swiper image,
.swiper video {
height: 750rpx; height: 750rpx;
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;
padding: 20rpx 40rpx;
} }
.top-info .title { .top-info .title {
font-size: 32rpx; font-weight: bold;
font-weight: 500; font-size: 33rpx;
color: #000; color: #000000;
}
.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 {
position: relative; margin-top: 27rpx;
line-height: 20rpx; height: 40rpx;
font-size: 20rpx; line-height: 40rpx;
font-weight: 500; margin-right: 15rpx;
line-height: 50rpx; padding: 0 14rpx;
margin-right: 10rpx; background: rgba(11, 137, 142, 0.1);
} 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 {
@ -982,8 +957,9 @@ 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); */
border-radius: 20rpx 20rpx 0rpx 0rpx; background: #FD3856;
/* border-radius: 20rpx 20rpx 0rpx 0rpx; */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -995,13 +971,13 @@ height: 133rpx;
.wineScene-price-container .wineSecne-price { .wineScene-price-container .wineSecne-price {
font-weight: bold; font-weight: bold;
font-size: 36rpx; font-size: 48rpx;
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 {

16
pages/info/roadInfo/index.js

@ -165,11 +165,11 @@ Page({
order: function () { order: function () {
// todo 判断组合产品 // todo 判断组合产品
// if (this.data.info.is_compose == 1) { // if (this.data.info.is_compose == 1) {
// if (true) { if (true) {
// // 打开规格弹窗 // 打开规格弹窗
// this.setData({skuFlag: true}) this.setData({skuFlag: true})
// return return
// } }
commonApi.user_post('wx/get_user_keep', { commonApi.user_post('wx/get_user_keep', {
@ -213,11 +213,13 @@ Page({
// 组合产品获取购买的sku // 组合产品获取购买的sku
getComposeSku () { getComposeSku () {
commonApi.user_post("product/get_sku_compose_list", { commonApi.user_post("product/get_sku_compose_list", {
sku_id: "190720" // sku_id: "190720"
sku_id: "190740"
}).then(res => { }).then(res => {
if (res&&Array.isArray(res.data)&&res.data.length>0) { if (res&&Array.isArray(res.data)&&res.data.length>0) {
res.data.forEach(v => { res.data.forEach(v => {
v.sku.is_compose = 1 v.sku.is_compose = 1;
v.num = this.data.producNum;
}); });
util.orderByShoppingCart(res.data,app) util.orderByShoppingCart(res.data,app)
} }

15
pages/info/sceneProductInfo/index.js

@ -827,10 +827,6 @@ Page({
console.log(app.globalData.product); console.log(app.globalData.product);
console.log(ticket_type); console.log(ticket_type);
// todo 判断是否组合产品
// this.getComposeSku()
// return
if (ticket_type != 2) { if (ticket_type != 2) {
let today = util.formatDate(new Date()), let today = util.formatDate(new Date()),
@ -1035,17 +1031,6 @@ Page({
}) })
}, },
// 组合产品获取购买的sku
getComposeSku () {
commonApi.user_post("product/get_sku_compose_list", {
sku_id: "190720"
}).then(res => {
if (res&&Array.isArray(res.data)&&res.data.length>0) {
util.orderByShoppingCart(res.data,app)
}
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

6
pages/order/scene/index.wxml

@ -40,10 +40,10 @@
<view class="s-price"> <view class="s-price">
{{product.sku.price/100}} {{product.sku.price/100}}
</view> </view>
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum==1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d2dce6169a5e8332ccd54579afddf8bc.png" mode=""/> <image wx:if="{{!kjId && !gp_id && type!='activity' && productNum==1 && !product.sku.is_compose}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d2dce6169a5e8332ccd54579afddf8bc.png" mode=""/>
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum>1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d8699afa39e73bcc7f50ed617c93bb54.png" mode=""/> <image wx:if="{{!kjId && !gp_id && type!='activity' && productNum>1 && !product.sku.is_compose}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d8699afa39e73bcc7f50ed617c93bb54.png" mode=""/>
<view class="number-box">{{productNum}}</view> <view class="number-box">{{productNum}}</view>
<image wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/cdb68a174f17b7036374580a8aa46641.png" mode=""/> <image wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="add" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/cdb68a174f17b7036374580a8aa46641.png" mode=""/>
<!-- <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> --> <!-- <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> -->
</view> </view>
<view class="text1"> <view class="text1">

23
project.config.json

@ -54,60 +54,39 @@
"ignoreUploadUnusedFiles": true "ignoreUploadUnusedFiles": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.14.0", "libVersion": "3.8.9",
"appid": "wx4bb7b6050831f585", "appid": "wx4bb7b6050831f585",
"projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85", "projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85",
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"id": 0,
"name": "pages/user/bindtel/index", "name": "pages/user/bindtel/index",
"pathName": "pages/user/bindtel/index", "pathName": "pages/user/bindtel/index",
"query": "id=0000000000LINELINEINFO18082257199008", "query": "id=0000000000LINELINEINFO18082257199008",
"scene": null "scene": null
}, },
{ {
"id": 1,
"name": "好行", "name": "好行",
"pathName": "pages/list/haoxing/index", "pathName": "pages/list/haoxing/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": 2,
"name": "pages/list/activitynew/index", "name": "pages/list/activitynew/index",
"pathName": "pages/list/activitynew/index", "pathName": "pages/list/activitynew/index",
"query": "id=0000000000LINELINEINFO18082257199008", "query": "id=0000000000LINELINEINFO18082257199008",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "微旅行", "name": "微旅行",
"pathName": "pages/list/minitrip/index", "pathName": "pages/list/minitrip/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "一日游", "name": "一日游",
"pathName": "pages/list/oneday/index", "pathName": "pages/list/oneday/index",
"query": "", "query": "",

4
subPackages/gwcOrder/index.wxml

@ -16,9 +16,9 @@
<view class="box"> <view class="box">
<view class="box-title"> <view class="box-title">
<view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view> <view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view>
<view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></view> <view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="minus"></view>
<view class="number-box">{{productNum}}</view> <view class="number-box">{{productNum}}</view>
<view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="add"></view>
</view> </view>
</view> </view>
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}" is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact> <contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}" is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact>

1
utils/util.js

@ -578,6 +578,7 @@ const orderByShoppingCart = function (listData, app) {
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
let list = listData, product = [], product1 = [] let list = listData, product = [], product1 = []
list.map(item => { list.map(item => {
item.num = item.num || 1;
// item.product.type="post"; // item.product.type="post";
if (item.product.type == 'post') { if (item.product.type == 'post') {
product.push({ product.push({

Loading…
Cancel
Save