diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js
index 6514471..0e26700 100644
--- a/pages/info/sceneProductInfo/index.js
+++ b/pages/info/sceneProductInfo/index.js
@@ -75,6 +75,12 @@ Page({
util.back()
return;
}
+ if(options.id) {
+ let tempUrl = util.detailDomain+`/ScenicDetail?id=${options.id}`
+ wx.navigateTo({
+ url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
+ })
+ }
if (options.retailId) {
this.setData({
retailId: options.retailId
diff --git a/pages/order/WineSceneOrder/index.js b/pages/order/WineSceneOrder/index.js
index b486f69..0f1a429 100644
--- a/pages/order/WineSceneOrder/index.js
+++ b/pages/order/WineSceneOrder/index.js
@@ -45,7 +45,8 @@ Page({
couponFlag:false,
smoothlyTotal: 0,
- maxCouponObject: null
+ maxCouponObject: null,
+ couponCom: null
},
/**
@@ -100,7 +101,11 @@ Page({
},
// 调用子组件清除优惠券方法
callOtherCompMethod: function(e) {
- this.couponCom.setNullCoupon()
+ console.log(this.selectAllComponents("#coupon")[0])
+ this.selectAllComponents("#coupon")[0].setNullCoupon()
+ this.setData({
+ coupon:null
+ })
},
showBookingInfo: function (e) {
this.setData({
@@ -246,11 +251,12 @@ Page({
},
totalPrice(price) {
let allPrice = this.data.singlePrice * this.data.productNum
- let prices = 0
- console.log(this.data.smoothlyTotal,111111)
+ let prices = allPrice
+
// 顺手购价格
- allPrice += this.data.smoothlyTotal || 0;
- prices = allPrice
+ if (!this.data.coupon) {
+ allPrice += this.data.smoothlyTotal || 0;
+ }
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
diff --git a/pages/order/WineSceneOrder/index.wxml b/pages/order/WineSceneOrder/index.wxml
index 7be6e64..254ec69 100644
--- a/pages/order/WineSceneOrder/index.wxml
+++ b/pages/order/WineSceneOrder/index.wxml
@@ -42,13 +42,13 @@
-
+
合计:
¥{{price}}
@@ -58,4 +58,8 @@
+
\ No newline at end of file
diff --git a/pages/order/WineSceneOrder/index.wxss b/pages/order/WineSceneOrder/index.wxss
index 91703eb..6676d7b 100644
--- a/pages/order/WineSceneOrder/index.wxss
+++ b/pages/order/WineSceneOrder/index.wxss
@@ -451,4 +451,23 @@ page {
.s-price::before {
content: "¥";
font-size: 24rpx;
+ }
+
+ .tishi {
+ width: 100%;
+ height: 67rpx;
+ background: #FFDEDE;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #D62828;
+ display: flex;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 113rpx;
+ }
+ .tishi image {
+ width: 26.67rpx;
+ height: 26.67rpx;
+ margin: 0 12rpx 0 26rpx;
}
\ No newline at end of file
diff --git a/pages/order/components/coupon/index.wxml b/pages/order/components/coupon/index.wxml
index c4cf7d2..e37cf14 100644
--- a/pages/order/components/coupon/index.wxml
+++ b/pages/order/components/coupon/index.wxml
@@ -2,9 +2,9 @@
优惠券
-
+
-¥{{coupon.activity.money/100}}
diff --git a/pages/order/components/smoothlyOrder/index.js b/pages/order/components/smoothlyOrder/index.js
index 879ec6d..1441696 100644
--- a/pages/order/components/smoothlyOrder/index.js
+++ b/pages/order/components/smoothlyOrder/index.js
@@ -32,6 +32,11 @@ Component({
sommthlyIndex: 0
})
this.getList()
+
+ // 组件初始化时,通知父组件重置价格为 0
+ this.triggerEvent('updateTotalPrice', {
+ total: 0
+ });
}
},
observers: {
@@ -67,10 +72,11 @@ Component({
methods: {
// 查看规格信息
showSkuInfo(e) {
+ console.log(e)
this.setData({
showItem: e.currentTarget.dataset.item,
showSkuPopup: true,
- content: '




'
+ content: e.currentTarget.dataset.item.content
})
console.log(this.data.showItem)
},
diff --git a/pages/order/components/smoothlyOrder/index.wxml b/pages/order/components/smoothlyOrder/index.wxml
index 476dbf4..3a6c7d6 100644
--- a/pages/order/components/smoothlyOrder/index.wxml
+++ b/pages/order/components/smoothlyOrder/index.wxml
@@ -53,13 +53,13 @@
wx:if="{{item.postMoney > 0}}">(另需运费¥{{item.postMoney / 100}})
+ catchtap="decreaseSkuNum" data-item="{{item}}" wx:if="{{item.buyNum > 0}}" mode="widthFix" />
{{item.buyNum}}
+ catchtap="increaseSkuNum" data-item="{{item}}" mode="widthFix" />
diff --git a/pages/order/food/index.js b/pages/order/food/index.js
index d22db10..003669e 100644
--- a/pages/order/food/index.js
+++ b/pages/order/food/index.js
@@ -17,7 +17,8 @@ Page({
coupon:null,
price: 0,
smoothlyTotal: 0,
- maxCouponObject: null
+ maxCouponObject: null,
+ couponCom: null
},
/**
@@ -50,6 +51,9 @@ Page({
// 调用子组件清除优惠券方法
callOtherCompMethod: function(e) {
this.couponCom.setNullCoupon()
+ this.setData({
+ coupon:null
+ })
},
showNotice:function(){
this.setData({
@@ -75,10 +79,13 @@ Page({
let price = this.data.product.sku.price * this.data.productNum
let allPrice = 0
- // 顺手购价格
- price += this.data.smoothlyTotal || 0;
allPrice = price
+ // 顺手购价格
+ if (!this.data.coupon) {
+ price += this.data.smoothlyTotal || 0;
+ }
+
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
price = price - this.data.coupon.activity.money
@@ -153,7 +160,6 @@ Page({
},
order:function(){
const smoothlyComp = this.selectComponent("#smoothlyOrderComp");
- console.log(smoothlyComp,smoothlyComp.emitOrder())
if(smoothlyComp) {
// 检查是否有选中的顺手购商品
const hasSelected = smoothlyComp.hasSelectedGoods();
diff --git a/pages/order/food/index.wxml b/pages/order/food/index.wxml
index 814418d..4e2da04 100644
--- a/pages/order/food/index.wxml
+++ b/pages/order/food/index.wxml
@@ -32,18 +32,23 @@
-
+
订单金额:¥{{price}}
提交订单
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/pages/order/food/index.wxss b/pages/order/food/index.wxss
index f9ec664..33525e4 100644
--- a/pages/order/food/index.wxss
+++ b/pages/order/food/index.wxss
@@ -132,4 +132,23 @@ margin-top: 30rpx;
color: #D62828;
font-size: 36rpx;
margin-left: 10rpx;
+}
+
+.tishi {
+ width: 100%;
+ height: 67rpx;
+ background: #FFDEDE;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #D62828;
+ display: flex;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 113rpx;
+}
+.tishi image {
+ width: 26.67rpx;
+ height: 26.67rpx;
+ margin: 0 12rpx 0 26rpx;
}
\ No newline at end of file
diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js
index c1b21ad..a13f797 100644
--- a/pages/order/postOrder/index.js
+++ b/pages/order/postOrder/index.js
@@ -57,12 +57,16 @@ Page({
this.setData({
smoothlyTotal: e.detail.total
});
+ console.log(123456)
// 重新计算总价
this.changePrice();
},
// 调用子组件清除优惠券方法
callOtherCompMethod: function(e) {
this.couponCom.setNullCoupon()
+ this.setData({
+ coupon: null
+ })
},
handleProduct () {
app.globalData.postProduct.forEach((item,index) => {
@@ -212,6 +216,15 @@ Page({
},
minus: function (e) {
+ if(this.data.coupon){
+ wx.showToast({
+ title: '订单价格发生变化,请重新选择优惠券',
+ icon: 'none'
+ })
+ }
+ this.couponCom.setNullCoupon()
+ app.globalData.couponInfo = null;
+
let index = e.currentTarget.dataset.index, product = this.data.product;
let productNum = product[index].productNum;
if (productNum <= 1) return;
@@ -237,10 +250,6 @@ Page({
changePrice: function () {
let product = this.data.product, price = 0, allPrice = 0;
- // 顺手购价格
- price += this.data.smoothlyTotal || 0;
- allPrice = price
-
product.map(item => {
price = price + item.sku.price * item.productNum;
if (this.data.allowance_data && this.data.select_allowance && this.data.allowance_price) {
@@ -248,19 +257,27 @@ Page({
price -= this.data.allowance_price * item.productNum < spread_price ? this.data.allowance_price * item.productNum : spread_price
}
})
- if (this.data.coupon && this.data.showPrice != price) {
- wx.showToast({
- title: '订单价格发生变化,请重新选择优惠券',
- icon: 'none'
- })
- app.globalData.couponInfo = null;
- if (!this.data.kjId && !this.data.gp_id) {
- this.couponCom.setNullCoupon()
- }
- this.setData({
- coupon: null
- })
- }
+
+ allPrice = price
+
+ // 顺手购价格
+ if (!this.data.coupon) {
+ price += this.data.smoothlyTotal || 0;
+ }
+
+ // if (this.data.coupon && this.data.showPrice != price) {
+ // wx.showToast({
+ // title: '订单价格发生变化,请重新选择优惠券',
+ // icon: 'none'
+ // })
+ // app.globalData.couponInfo = null;
+ // if (!this.data.kjId && !this.data.gp_id) {
+ // this.couponCom.setNullCoupon()
+ // }
+ // this.setData({
+ // coupon: null
+ // })
+ // }
this.setData({
showPrice: app.globalData.kjId ? 0 : price
})
@@ -568,6 +585,8 @@ Page({
this.setData({
coupon:e.detail
})
+
+ this.changePrice()
},
/**
diff --git a/pages/order/postOrder/index.wxml b/pages/order/postOrder/index.wxml
index 2f51bb5..00ed078 100644
--- a/pages/order/postOrder/index.wxml
+++ b/pages/order/postOrder/index.wxml
@@ -118,7 +118,7 @@
-
+
@@ -155,4 +155,9 @@ postId="{{address.id}}"
{{allowance_data.title}}
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/pages/order/postOrder/index.wxss b/pages/order/postOrder/index.wxss
index f82157b..aea3156 100644
--- a/pages/order/postOrder/index.wxss
+++ b/pages/order/postOrder/index.wxss
@@ -312,4 +312,22 @@ page {
width: 26.67rpx;
height: 26.67rpx;
margin-right: 12rpx;
+}
+.tishi {
+ width: 100%;
+ height: 67rpx;
+ background: #FFDEDE;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #D62828;
+ display: flex;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 113rpx;
+}
+.tishi image {
+ width: 26.67rpx;
+ height: 26.67rpx;
+ margin: 0 12rpx 0 26rpx;
}
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.js b/pages/order/roadOrder/index.js
index 118d93f..e81d26c 100644
--- a/pages/order/roadOrder/index.js
+++ b/pages/order/roadOrder/index.js
@@ -70,14 +70,18 @@ Page({
// 调用子组件清除优惠券方法
callOtherCompMethod: function(e) {
this.couponCom.setNullCoupon()
+ this.setData({
+ coupon: null,
+ })
},
showAllPrice() {
let price = app.globalData.product.price
- let allPrice = 0
+ let allPrice = price
// 顺手购价格
- price += this.data.smoothlyTotal || 0;
- allPrice = price
+ if (!this.data.coupon) {
+ price += this.data.smoothlyTotal || 0;
+ }
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
diff --git a/pages/order/roadOrder/index.wxml b/pages/order/roadOrder/index.wxml
index 0b7f40f..193d220 100644
--- a/pages/order/roadOrder/index.wxml
+++ b/pages/order/roadOrder/index.wxml
@@ -33,7 +33,7 @@
设为默认出行人
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/pages/order/roadOrder/index.wxss b/pages/order/roadOrder/index.wxss
index 301c4a0..b5e17e3 100644
--- a/pages/order/roadOrder/index.wxss
+++ b/pages/order/roadOrder/index.wxss
@@ -185,4 +185,23 @@ page {
padding-left: 25rpx;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
z-index: 1;
+}
+
+.tishi {
+ width: 100%;
+ height: 67rpx;
+ background: #FFDEDE;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #D62828;
+ display: flex;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 113rpx;
+}
+.tishi image {
+ width: 26.67rpx;
+ height: 26.67rpx;
+ margin: 0 12rpx 0 26rpx;
}
\ No newline at end of file
diff --git a/pages/order/showOrderNew/index.js b/pages/order/showOrderNew/index.js
index 2552622..abf846d 100644
--- a/pages/order/showOrderNew/index.js
+++ b/pages/order/showOrderNew/index.js
@@ -127,7 +127,10 @@ Page({
},
// 调用子组件清除优惠券方法
callOtherCompMethod: function(e) {
- this.couponCom.setNullCoupon()
+ this.selectAllComponents("#coupon")[0].setNullCoupon()
+ this.setData({
+ coupon: null,
+ })
},
hideDate: function () {
this.setData({
@@ -296,11 +299,11 @@ Page({
},
totalPrice(price) {
let allPrice = this.data.singlePrice * this.data.productNum
- let prices = 0
- console.log(this.data.smoothlyTotal,111111)
+ let prices = allPrice
// 顺手购价格
- allPrice += this.data.smoothlyTotal || 0;
- prices = allPrice
+ if (!this.data.coupon) {
+ allPrice += this.data.smoothlyTotal || 0;
+ }
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
allPrice = allPrice - this.data.coupon.activity.money
@@ -338,7 +341,7 @@ Page({
this.setData({
maxCouponObject: {
price: prices,
- skuIds: skuIds.toString()
+ skuIds: skuIds.toString()
}
})
},
diff --git a/pages/order/showOrderNew/index.wxml b/pages/order/showOrderNew/index.wxml
index 9d0a16c..6ff55d1 100644
--- a/pages/order/showOrderNew/index.wxml
+++ b/pages/order/showOrderNew/index.wxml
@@ -50,7 +50,7 @@
+
+
+
+
合计:¥0
合计:
diff --git a/pages/order/showOrderNew/index.wxss b/pages/order/showOrderNew/index.wxss
index 478a9a6..baf7582 100644
--- a/pages/order/showOrderNew/index.wxss
+++ b/pages/order/showOrderNew/index.wxss
@@ -455,4 +455,23 @@ text-align: center;
.s-price::before {
content: "¥";
font-size: 24rpx;
+}
+
+.tishi {
+ width: 100%;
+ height: 67rpx;
+ background: #FFDEDE;
+ font-weight: bold;
+ font-size: 27rpx;
+ color: #D62828;
+ display: flex;
+ align-items: center;
+ position: fixed;
+ left: 0;
+ bottom: 113rpx;
+}
+.tishi image {
+ width: 26.67rpx;
+ height: 26.67rpx;
+ margin: 0 12rpx 0 26rpx;
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index d508dad..cecb42b 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -9,7 +9,7 @@
{
"name": "pages/info/postProductInfo/index",
"pathName": "pages/info/postProductInfo/index",
- "query": "id=464888",
+ "query": "id=464726",
"scene": null,
"launchMode": "default"
},
@@ -20,6 +20,13 @@
"launchMode": "default",
"scene": null
},
+ {
+ "name": "pages/info/roadInfo/index",
+ "pathName": "pages/info/roadInfo/index",
+ "query": "id=463608",
+ "launchMode": "default",
+ "scene": null
+ },
{
"name": "pages/info/showInfo/index",
"pathName": "pages/info/showInfo/index",
diff --git a/utils/util.js b/utils/util.js
index 8620a24..5f6b883 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -207,7 +207,7 @@ const gotoDetail = (item,isPagePoint,queryStr="") =>{
}
console.log(item)
-
+ let tempUrl = ''
switch(item.type){
case "tenscenic":
@@ -221,7 +221,9 @@ const gotoDetail = (item,isPagePoint,queryStr="") =>{
pagePointData.event='ticket_detail_click'
pagePoint(pagePointData,1)
}
+ // tempUrl = detailDomain+`/ScenicDetail?id=${item.scene_id || item.id}`
wx.navigateTo({
+ // url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)+queryStr
})
break;
@@ -310,7 +312,7 @@ const gotoDetail = (item,isPagePoint,queryStr="") =>{
break;
case "movie":
// 产品 电影票
- let tempUrl = 'https://m.cloud.sz-trip.com'+`/MovieInfo?id=${item.third_id || item.id}`+'&title='+item.title+queryStr
+ tempUrl = 'https://m.cloud.sz-trip.com'+`/MovieInfo?id=${item.third_id || item.id}`+'&title='+item.title+queryStr
wx.navigateTo({
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
// url: '/pages/list/movieticket/list/info/index?id='+(item.third_id || item.id)+'&title='+item.title
@@ -328,7 +330,9 @@ const gotoDetail = (item,isPagePoint,queryStr="") =>{
pagePointData.event='ticket_detail_click'
pagePoint(pagePointData,1)
}
+ // tempUrl = detailDomain+`/ScenicDetail?id=${item.scene_id || item.id}`
wx.navigateTo({
+ // url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)+queryStr
})
break;