From d79602fcc36944c89d477c9ee0cc0eb424cf2080 Mon Sep 17 00:00:00 2001
From: shaojing <2901156235@qq.com>
Date: Thu, 15 Aug 2024 15:44:35 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=9F=E7=A5=A8=E5=92=8C=E4=BC=98=E6=83=A0?=
=?UTF-8?q?=E5=88=B8=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.js | 2 +-
app.json | 3 +-
pages/index/index.wxml | 10 +-
pages/index/index.wxss | 12 +-
pages/info/sceneProductInfo/index.js | 33 +-
pages/order/components/coupon/index.js | 13 +
pages/order/components/date/index.wxml | 4 +-
pages/order/components/date/index.wxss | 6 +-
pages/order/scene/index.js | 39 +-
pages/order/scene/index.wxml | 6 +-
pages/user/cartlist/list.js | 2 +-
subPackages/gwcOrder/index.js | 756 +++++++++++++++++++++++++
subPackages/gwcOrder/index.json | 8 +
subPackages/gwcOrder/index.wxml | 96 ++++
subPackages/gwcOrder/index.wxss | 343 +++++++++++
15 files changed, 1303 insertions(+), 30 deletions(-)
create mode 100644 subPackages/gwcOrder/index.js
create mode 100644 subPackages/gwcOrder/index.json
create mode 100644 subPackages/gwcOrder/index.wxml
create mode 100644 subPackages/gwcOrder/index.wxss
diff --git a/app.js b/app.js
index 76a5e2e..92156ac 100644
--- a/app.js
+++ b/app.js
@@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
- data.isTest = data.isTest141? true : false;
+ data.isTest = data.isTest142? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件
diff --git a/app.json b/app.json
index 340cb02..11743e3 100644
--- a/app.json
+++ b/app.json
@@ -193,7 +193,8 @@
"techanNew/index",
"techanCart/index",
"feiyiNew/index",
- "postSearch/index"
+ "postSearch/index",
+ "gwcOrder/index"
]
}],
"plugins": {
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 2aa7f66..b1d1eaa 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -172,9 +172,13 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index fff3df6..3e7a495 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -1178,15 +1178,19 @@ page {
bottom: 64rpx;
}
.jqssd {
- background: url("https://static.ticket.sz-trip.com/uploads/20240606/20c06c5bf8d5e498667ebd954a1d95f8.png");
- background-size: 100% 100%;
+ /* background: url("https://static.ticket.sz-trip.com/uploads/20240606/20c06c5bf8d5e498667ebd954a1d95f8.png");
+ background-size: 100% 100%; */
width: 365.33rpx;
height: 166rpx;
flex-shrink: 0;
}
+.jqssd image, .sslk image{
+ width: 100%;
+ height: 100%;
+}
.sslk {
- background: url("https://static.ticket.sz-trip.com/uploads/20240729/c1554fdd645a0d3a47c8e683186e1a73.png");
- background-size: 100% 100%;
+ /* background: url("https://static.ticket.sz-trip.com/uploads/20240729/c1554fdd645a0d3a47c8e683186e1a73.png");
+ background-size: 100% 100%; */
width: 365.33rpx;
height: 166rpx;
flex-shrink: 0;
diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js
index ad008c9..b9cea87 100644
--- a/pages/info/sceneProductInfo/index.js
+++ b/pages/info/sceneProductInfo/index.js
@@ -360,7 +360,9 @@ Page({
app.globalData.list = []
app.globalData.listName = null
if (this.data.skuFlag == 'order') {
- if (e.currentTarget.dataset.disable === 1) return;
+ console.log(app.globalData.sku);
+ if (app.globalData.product.product.flag==0 || app.globalData.product.sku.flag=='off') return;
+ // if (e.currentTarget.dataset.disable === 1) return;
util.pagePoint({
event: 'scene_order',
param: {
@@ -770,7 +772,8 @@ Page({
},
product = {
product: e.currentTarget.dataset.product
- }
+ },
+ ticket_type = e.currentTarget.dataset.sku.ticket_type
console.log(sku,product);
product.productNum = 1
app.globalData.product = {
@@ -778,15 +781,23 @@ Page({
...product
}
console.log(app.globalData.product);
- this.setData({
- showDate: true,
- })
- this.setData({
- product: product,
- showDate2: true,
- skuFlag: 'order',
- showPrice:e.currentTarget.dataset.sku.price
- })
+ console.log(ticket_type);
+ if (ticket_type != 2) {
+ this.setData({
+ showDate: true,
+ })
+ this.setData({
+ product: product,
+ showDate2: true,
+ skuFlag: 'order',
+ showPrice:e.currentTarget.dataset.sku.price
+ })
+ }else {
+ this.setData({
+ skuFlag: 'order'
+ })
+ this.order()
+ }
},
//立即预定
showOrder: function () {
diff --git a/pages/order/components/coupon/index.js b/pages/order/components/coupon/index.js
index 9f79e8f..883a94b 100644
--- a/pages/order/components/coupon/index.js
+++ b/pages/order/components/coupon/index.js
@@ -13,6 +13,19 @@ Component({
sku:{
type:String,
value:""
+ },
+ couponFlag:{
+ type:Boolean,
+ value:false,
+ observer(nv, ov) {
+ console.log(nv,ov)
+ if (nv) {
+ app.globalData.couponInfo = null
+ this.setData({
+ coupon:null
+ })
+ }
+ }
}
},
diff --git a/pages/order/components/date/index.wxml b/pages/order/components/date/index.wxml
index b226792..f94ab02 100644
--- a/pages/order/components/date/index.wxml
+++ b/pages/order/components/date/index.wxml
@@ -24,7 +24,7 @@
{{skuName}}
-
+
使用日期
@@ -55,7 +55,7 @@
-
+
选择时段
diff --git a/pages/order/components/date/index.wxss b/pages/order/components/date/index.wxss
index 0446023..9d7444b 100644
--- a/pages/order/components/date/index.wxss
+++ b/pages/order/components/date/index.wxss
@@ -16,7 +16,9 @@
.dates-boxes {
display: flex;
align-items: center;
- padding: 31rpx 0;
+ padding: 0 0 31rpx;
+ border:none;
+ /* padding: 31rpx 0; */
/* padding: 31rpx 21rpx; */
/* border-top: 1rpx solid #ccc; */
}
@@ -79,7 +81,7 @@
justify-content: space-between;
align-items: center;
margin: 0 21rpx;
- padding-top: 34rpx;
+ /* padding-top: 34rpx; */
padding-bottom: 10rpx;
/* border-top: 1rpx dashed #ccc; */
flex-wrap: wrap;
diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js
index 66efdf5..0592d57 100644
--- a/pages/order/scene/index.js
+++ b/pages/order/scene/index.js
@@ -44,7 +44,8 @@ Page({
bookingInfoTitle: "",
showDate:false,
showDate2:false,
- showYhq:null
+ showYhq:null,
+ couponFlag:false
},
/**
@@ -164,6 +165,26 @@ Page({
})
}
// console.log(this.data.singlePrice);
+ }else {
+ let price
+ if (this.data.coupon) {
+ if (this.data.coupon.discount_type == 'pricebreak') {
+ price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money
+ } else {
+ price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10
+ }
+ } else {
+ price = this.data.singlePrice * this.data.productNum
+ }
+ if (price >0) {
+ this.setData({
+ price:price/100
+ })
+ }else {
+ this.setData({
+ price:0
+ })
+ }
}
// let price = this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
// 多写了一遍
@@ -274,9 +295,11 @@ Page({
}
app.globalData.couponInfo = null;
+ console.log(this.data.couponFlag);
this.setData({
productNum: (this.data.productNum - 1),
- coupon: null
+ coupon: null,
+ couponFlag:true
})
this.data.product.num = this.data.productNum
// this.changePrice()
@@ -389,6 +412,15 @@ Page({
linkmanIds.push(item.id)
})
}
+ if (this.data.is_authentication == 0) { //是否实名:0否1是
+ if (this.data.phone == '') {
+ wx.showToast({
+ title: '请填写手机号',
+ icon: 'none'
+ })
+ return
+ }
+ }
let data = {
coupon_id: this.data.coupon ? this.data.coupon.id : null,
source: "WECHATXCX",
@@ -759,6 +791,9 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
+ this.setData({
+ couponFlag:false
+ })
},
/**
diff --git a/pages/order/scene/index.wxml b/pages/order/scene/index.wxml
index fcb59e6..8fa77b0 100644
--- a/pages/order/scene/index.wxml
+++ b/pages/order/scene/index.wxml
@@ -13,7 +13,7 @@
{{product.product.title}}
-
+
{{date.date}} {{date.week}}
@@ -22,7 +22,7 @@
-
+
修改 >
@@ -71,7 +71,7 @@
+ money="{{singlePrice * productNum}}" sku="{{product.sku.id}}" couponFlag="{{couponFlag}}">
+
+
+
+ {{product.product.title + product.isGroup==1?'(团体预约)':product.sku.sku_name}}
+ 免费
+
+
+
+
+ 团体主体名称:
+
+
+
+
+
+ {{product && product.isGroup!=1?'购票数量':'预约人数'}}
+
+ {{productNum}}
+
+
+
+
+
+
+
+ 惠民补贴
+
+ -¥{{allowance_price / 100}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 合计:¥0
+
+ 合计:
+ ¥{{price}}
+
+ 下一步
+
+
+ 立即预约
+ 立即预约
+
+
+
+
+
+ {{product.product.title}}-{{product.sku.sku_name}}
+ 出行人信息
+
+
+
+ 姓名:
+ {{item.name}}
+
+
+ 证件号:
+ {{item.id_number}}
+
+
+ 手机号:
+ {{item.tel}}
+
+
+
+
+
+ 手机号:
+ {{phone}}
+
+
+
+
+ 取消
+ 无问题,下一步
+
+
+
+
\ No newline at end of file
diff --git a/subPackages/gwcOrder/index.wxss b/subPackages/gwcOrder/index.wxss
new file mode 100644
index 0000000..945fd9b
--- /dev/null
+++ b/subPackages/gwcOrder/index.wxss
@@ -0,0 +1,343 @@
+/* pages/.wxss */
+page {
+ background: #f6f6f6;
+}
+
+.group-order {
+ background: #fff;
+}
+
+.product-info {
+ padding: 20rpx 47rpx;
+ border-bottom: 1rpx solid #ccc;
+}
+
+.product-title {
+ font-size: 33rpx;
+ color: #000;
+ font-weight: 500;
+}
+
+.product-price {
+ color: #D62828;
+ font-size: 27rpx;
+}
+
+.group-order .box-title {
+ margin: 0;
+}
+
+.group-order .box,
+.group-order .date-box {
+ border-bottom: 1rpx solid #D8D8D8;
+ border-radius: 0;
+ margin: 0 25rpx;
+}
+
+.group-order .dates-boxes {
+ border-top: none;
+ padding-top: 0;
+}
+
+.group-order .date-time.disable {
+ background: #CCCCCC;
+ color: #fff;
+}
+
+.box {
+ margin: 30rpx 25rpx;
+ background: white;
+ border-radius: 9rpx;
+}
+
+.box-title {
+ height: 113rpx;
+ margin: 0 20rpx;
+ font-size: 31rpx;
+ color: #000;
+ font-weight: 500;
+ display: flex;
+ align-items: center;
+}
+
+.dates-boxes {
+ display: flex;
+ align-items: center;
+ padding: 31rpx 21rpx;
+ border-top: 1rpx solid #ccc;
+}
+
+.date-item {
+ width: 162rpx;
+ height: 97rpx;
+ border-radius: 10rpx;
+ border: 1rpx solid #333;
+ text-align: center;
+ font-size: 27rpx;
+ color: #000;
+ margin-right: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+
+.date-item.active {
+ border-color: #0B898E;
+ color: #fff;
+ background: #0B898E;
+}
+
+.date-item.disable {
+ border-color: #CCCCCC;
+ color: #666;
+}
+
+.date-item .price {
+ font-size: 25rpx;
+ color: #D62828;
+}
+
+.date-item.active .price {
+ color: #fff;
+}
+
+.date-item.disable .price {
+ color: #666;
+}
+
+.more-item {
+ width: 99rpx;
+ margin-right: 0;
+}
+
+.date-times {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 0 21rpx;
+ padding-top: 34rpx;
+ padding-bottom: 10rpx;
+ border-top: 1rpx dashed #ccc;
+ flex-wrap: wrap;
+}
+
+.date-time {
+ width: 315rpx;
+ line-height: 58rpx;
+ border: 1px solid #333;
+ border-radius: 10rpx;
+ text-align: center;
+ font-size: 25rpx;
+ flex-shrink: 0;
+ margin-bottom: 24rpx;
+ color: #000;
+}
+
+.date-time.disable {
+ border-color: #ccc;
+ color: #666666;
+}
+
+.date-time.active {
+ border-color: #0B898E;
+ background: #0B898E;
+ color: #fff;
+}
+
+.box-title .iconfont {
+ font-size: 28rpx;
+ flex-shrink: 0;
+}
+
+.number-box {
+ font-size: 29rpx;
+ font-weight: 500;
+ color: #000;
+ flex-shrink: 0;
+ width: 67rpx;
+ line-height: 49rpx;
+ background: #F0F0F0;
+ border-radius: 7rpx;
+ text-align: center;
+ margin: 0 20rpx;
+}
+
+.fixed-bottom {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 113rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background: white;
+ z-index: 1;
+ box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
+}
+
+.yuyue-box {
+ height: 138rpx;
+ justify-content: center;
+}
+
+.fixed-btn {
+ width: 320rpx;
+ line-height: 113rpx;
+ background: #D62828;
+ color: #fff;
+ text-align: center;
+ font-size: 36rpx;
+ font-weight: 500;
+}
+
+.fixed-price-box {
+ margin-left: 25rpx;
+ flex-shrink: 0;
+ font-size: 29rpx;
+ color: #333;
+ font-weight: 500;
+}
+
+.fixed-price-box .price {
+ color: #D62828;
+ font-size: 36rpx;
+ margin-left: 10rpx;
+}
+
+.allowance {
+ justify-content: space-between;
+}
+
+.allowance>view:nth-child(2) {
+ display: flex;
+ align-items: center;
+}
+
+.allowance image {
+ width: 40rpx;
+ height: 40rpx;
+ margin-left: 10rpx;
+}
+
+.allowance .border {
+ width: 30rpx;
+ height: 30rpx;
+ border-radius: 50%;
+ border: 4rpx solid #0B98BE;
+ margin-left: 10rpx;
+}
+
+.coupon-btn {
+ width: 138rpx;
+ line-height: 56rpx;
+ border: 1px solid #333333;
+ border-radius: 29rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #000;
+}
+
+.box-title input {
+ flex: 1;
+ display: block;
+ font-size: 31rpx;
+ color: #666;
+ margin-left: 15rpx;
+ font-weight: 400;
+ text-align: right;
+}
+
+.yuyue-btn {
+ width: 657rpx;
+ line-height: 78rpx;
+ border-radius: 39rpx;
+}
+
+.group-order .yuyue-box {
+ height: 100rpx;
+}
+
+.group-order .yuyue-btn {
+ width: 100%;
+ /* height: 100%; */
+ line-height: 100rpx;
+ border-radius: 0;
+}
+
+.mask-allowance .mask-content {
+ margin: auto;
+ top: initial;
+ bottom: initial;
+ padding: 20rpx;
+}
+
+.mask-allowance .mask-content .rule-title {
+ text-align: center;
+ margin-bottom: 20rpx;
+}
+
+.dialog-top {
+ color: #999;
+ font-weight: 500;
+ padding: 40rpx 33.33rpx 0;
+}
+
+.scene-title {
+ font-size: 35rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 32.67rpx;
+}
+
+.people-message {
+ margin-bottom: 26.67rpx;
+ /* padding-bottom: 26.67rpx; */
+ /* border-bottom: 1px solid #F0F0F0; */
+ font-weight: bold;
+ font-size: 32rpx;
+}
+
+.people {
+ border-top: 1rpx solid #F0F0F0;
+ padding: 26.67rpx 0 24rpx;
+}
+
+.flex {
+ display: flex;
+}
+
+.bottom-btn {
+ display: flex;
+ border-top: 1rpx solid #F0F0F0;
+ height: 96rpx;
+ /* padding: 32.67rpx 0; */
+}
+
+.cancle {
+ width: 50%;
+ color: #999;
+ text-align: center;
+ line-height: 96rpx;
+}
+
+.confirm {
+ width: 50%;
+ text-align: center;
+ color: #D62828;
+ line-height: 96rpx;
+ border-left: 1rpx solid #F0F0F0;
+}
+
+.mask-content1 {
+ max-height: 710rpx;
+ position: relative;
+ z-index: 1;
+ width: 80%;
+ background: white;
+ border-radius: 12rpx;
+ /* margin-bottom: 45%; */
+ overflow-y: auto;
+ margin: auto;
+}
\ No newline at end of file