diff --git a/api/fee/feeApi.js b/api/fee/feeApi.js index 5a3c57d..5231d70 100755 --- a/api/fee/feeApi.js +++ b/api/fee/feeApi.js @@ -442,7 +442,10 @@ export function payFeeApp(_that, _data) { * @param {*} _that * @param {*} _data */ -export function payFeeWechat(_that, _data) { +export function payFeeWechat(_that, _data,_successUrl) { + if(!_successUrl ){ + _successUrl = "/pages/successPage/successPage?msg=支付成功&objType=3003"; + } wx.showLoading({ title: '支付中' }); @@ -464,7 +467,7 @@ export function payFeeWechat(_that, _data) { 'paySign': data.sign, 'success': function(res) { uni.navigateTo({ - url: "/pages/successPage/successPage?msg=支付成功&objType=3003" + url: _successUrl }) }, 'fail': function(res) { @@ -475,7 +478,7 @@ export function payFeeWechat(_that, _data) { // #ifdef H5 WexinPayFactory.wexinPay(data, function() { uni.navigateTo({ - url: "/pages/successPage/successPage?msg=支付成功&objType=3003" + url: _successUrl }) }); // #endif diff --git a/components/reserve/reserve-goods.vue b/components/reserve/reserve-goods.vue index 1ce64d5..8bf5aae 100644 --- a/components/reserve/reserve-goods.vue +++ b/components/reserve/reserve-goods.vue @@ -4,7 +4,7 @@ {{goods.goodsName}} - + @@ -33,7 +33,13 @@ - + + + 金额 + + ¥{{money}} + + @@ -64,11 +70,19 @@ quantity: "1" }, openTimes: [], + money:0, }; }, methods: { reserveGoods: function(_goods) { this.isShow = true; + this.goods = { + hours: [], + quantity: "1" + }, + this.money = 0; + this.openTimes = []; + this._loadGoods(_goods.goodsId); }, _cancle: function() { @@ -83,8 +97,9 @@ goodsId: _goodsId }).then(_data => { _that.goods = _data[0]; - _that.goods.hours = [], - _that.goods.quantity = "1" + _that.goods.hours = []; + _that.goods.quantity = "1" + _that._loadGoodsParams(); }) }, @@ -97,14 +112,22 @@ paramsId: this.goods.paramsId }).then(_data => { _that.openTimes = _data[0].openTimes; + _that.$forceUpdate(); }) }, _changeReserveTime: function(e) { this.goods.hours = e.detail.value; + this._computeMoney(); }, _changeReserveQuantity: function(e, guid, item) { + this._computeMoney(); this.goods.quantity = e.detail.value; }, + _computeMoney:function(){ + let _quantity = this.goods.hours.length * parseFloat(this.goods.quantity); + this.money = (_quantity * parseFloat(this.goods.price)).toFixed(2); + this.goods.money = this.money; + }, _doSummit: function() { if (!this.goods.quantity) { uni.showToast({ @@ -120,7 +143,8 @@ }); return; } - console.log(this.goods); + this.isShow = false; + this.$emit('selectGoods',this.goods); } } } diff --git a/components/reserve/selected-goods.vue b/components/reserve/selected-goods.vue new file mode 100644 index 0000000..d1a3305 --- /dev/null +++ b/components/reserve/selected-goods.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/pages.json b/pages.json index ac4796d..1cfe7a2 100755 --- a/pages.json +++ b/pages.json @@ -663,6 +663,15 @@ "enablePullDownRefresh": false } } + ,{ + "path" : "pages/reserve/reserveOrder", + "style" : + { + "navigationBarTitleText": "确认订单", + "enablePullDownRefresh": false + } + + } ], "tabBar": { "color": "#272636", diff --git a/pages/appointment/appointmentPay.vue b/pages/appointment/appointmentPay.vue index 8807948..87bae3a 100644 --- a/pages/appointment/appointmentPay.vue +++ b/pages/appointment/appointmentPay.vue @@ -30,11 +30,7 @@ - + diff --git a/pages/reserve/reserveDining.vue b/pages/reserve/reserveDining.vue index 69c4a3f..7df849f 100644 --- a/pages/reserve/reserveDining.vue +++ b/pages/reserve/reserveDining.vue @@ -32,7 +32,8 @@ ¥{{item.price}} - x 5 + + @@ -45,26 +46,29 @@ - - {{selectGoods.length}} 件商品 + + 预约 {{selectGoods.length}} 件商品 合计:{{receivableAmount}}元 - + - + + +