From 635a41b2e4d3ba977779e16460cd72e137775508 Mon Sep 17 00:00:00 2001 From: "Mr.jiang" <714156421@qq.com> Date: Thu, 8 Aug 2024 08:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=20=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my/hongbao/youhuijuanList.vue | 4 + my/order/payModifyQy.vue | 2110 +++++++++++++++++++++++++++++++++ my/order/paydingTc.vue | 155 +-- my/wallet/index.vue | 158 ++- pages.json | 9 + pages/my/newseckill.vue | 3 +- pages/my/orderDetailsList.vue | 42 +- pages/shop/qiyeDatail.vue | 16 +- 8 files changed, 2285 insertions(+), 212 deletions(-) create mode 100644 my/order/payModifyQy.vue diff --git a/my/hongbao/youhuijuanList.vue b/my/hongbao/youhuijuanList.vue index e6169a2..faea08f 100644 --- a/my/hongbao/youhuijuanList.vue +++ b/my/hongbao/youhuijuanList.vue @@ -135,6 +135,10 @@ uni.navigateTo({//返回项目订单 url:'/my/order/payModifyPt' }) + }else if(this.content=='企业'){ + uni.navigateTo({//返回项目订单 + url:'/my/order/payModifyQy' + }) } }, diff --git a/my/order/payModifyQy.vue b/my/order/payModifyQy.vue new file mode 100644 index 0000000..dc4f9d1 --- /dev/null +++ b/my/order/payModifyQy.vue @@ -0,0 +1,2110 @@ + + + + + diff --git a/my/order/paydingTc.vue b/my/order/paydingTc.vue index ba8e732..8792ec9 100644 --- a/my/order/paydingTc.vue +++ b/my/order/paydingTc.vue @@ -7,7 +7,7 @@ - {{orderXm.type=='104'?'服务套餐':orderXm.type=='105'?'项目次卡':'服务疗程'}} + {{orderXm.type=='104'?'服务套餐':orderXm.type=='105'?'项目次卡':orderXm.type=='106'?'服务疗程':'服务项目'}} - + + + {{order.ordersPackageList[0].packagePrice}}/{{order.ordersPackageList[0].num}}次 + + {{order.sumMoney}}/{{orderXm.serviceCount}}{{orderXm.type=='104'?'套':orderXm.type=='105'?'次':'次'}} @@ -50,12 +54,16 @@ 费用明细 - - {{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':'疗程'}}价格 + + 项目价格 + ¥{{order.ordersPackageList[0].packagePrice}} + + + {{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':orderXm.type=='106'?'疗程':'项目'}}价格 ¥{{order.sumMoney}} - {{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':'疗程'}}数量 + {{orderXm.type=='104'?'套餐数量':orderXm.type=='105'?'次卡数量':orderXm.type=='106'?'疗程数量':'项目次数'}} {{order.ordersPackageList[0].num}} @@ -710,9 +718,16 @@ uni.showToast({ title: '支付成功' }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) + if(that.order.ordersPackageList[0].type=='114'){ + uni.redirectTo({ + url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业' + }) + }else{ + uni.redirectTo({ + url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' + }) + } + that.getOrder() } else { uni.showToast({ @@ -723,49 +738,6 @@ }); } else if (that.openWay == 2) { //微信支付 that.$queue.showLoading('支付中...') - // #ifdef MP-WEIXIN - let data = { - ordersId: that.order.ordersId, - type: 3 - } - that.$Request.post('/app/wxPay/payOrder', data).then(ret => { - console.log(ret) - if (ret.code == 0) { - uni.hideLoading(); - uni.requestPayment({ - provider: 'wxpay', - timeStamp: ret.data.timestamp, - nonceStr: ret.data.noncestr, - package: ret.data.package, - signType: ret.data.signType, - paySign: ret.data.sign, - success: function(ret) { - console.log(ret) - uni.showToast({ - title: '支付成功' - }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) - // this.$queue.showToast('支付成功'); - - // uni.switchTab({ - // url: '/pages/my/index' - // }) - }, - fail: function(err) { - // this.$queue.showToast('支付失败'); - uni.showToast({ - title: '支付失败', - icon: 'nones' - }); - that.getOrder() - } - }); - } - }); - // #endif - // #ifdef H5 let ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('micromessenger') != -1) { @@ -773,14 +745,20 @@ ordersId: that.order.ordersId, type: 2 } - that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + that.$Request.post('/app/wxPay/payPackageOrder', data).then(rea => { if (rea.code == 0) { uni.showToast({ title: '支付成功' }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) + if(that.order.ordersPackageList[0].type=='114'){ + uni.redirectTo({ + url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业' + }) + }else{ + uni.redirectTo({ + url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' + }) + } that.callPay(rea.data); } else { uni.showToast({ @@ -795,7 +773,7 @@ type: 4 } // debugger; - that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + that.$Request.post('/app/wxPay/payPackageOrder', data).then(rea => { // const urlArr = window.location.href; // const hostUrl = urlArr.split("/"); // const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; @@ -805,9 +783,15 @@ uni.showToast({ title: '支付成功' }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) + if(that.order.ordersPackageList[0].type=='114'){ + uni.redirectTo({ + url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业' + }) + }else{ + uni.redirectTo({ + url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' + }) + } const urlArr = window.location.href; const hostUrl = urlArr.split("/"); const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; @@ -821,65 +805,34 @@ } }); } - - // #endif - - // #ifdef APP - let data = { - ordersId: that.order.ordersId, - type: 1 - } - that.$Request.post('/app/wxPay/payOrder', data).then(rea => { - console.log(rea) - if (rea.code == 0) { - uni.showToast({ - title: '支付成功' - }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) - that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); - } - }); // #endif } else if (that.openWay == 3) { //支付宝支付 that.$queue.showLoading('支付中...') // #ifdef H5 - let data = { + var data = { ordersId: that.order.ordersId, type: 2 } - that.$Request.post('/app/aliPay/payOrder', data).then( + that.$Request.post('/app/aliPay/payPackageOrder', data).then( rea => { uni.showToast({ title: '支付成功' }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) + if(that.order.ordersPackageList[0].type=='114'){ + uni.redirectTo({ + url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业' + }) + }else{ + uni.redirectTo({ + url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' + }) + } const div = document.createElement('div') div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() }); // #endif - - // #ifdef APP-PLUS - let data = { - ordersId: that.order.ordersId, - type: 1 - } - that.$Request.post('/app/aliPay/payOrder', data).then( - rea => { - uni.showToast({ - title: '支付成功' - }) - uni.redirectTo({ - url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index' - }) - that.setPayment('alipay', rea.data); - }); - // #endif } } else if (re.cancel) { diff --git a/my/wallet/index.vue b/my/wallet/index.vue index 0ef5d68..e702e6d 100644 --- a/my/wallet/index.vue +++ b/my/wallet/index.vue @@ -22,7 +22,7 @@ 只能用于平台消费支付,充值后不可退款 - + 余额充值 为TA充值 @@ -50,24 +50,7 @@ - - - - - - {{item.text}} - - - - - - - - - + - - - - 为TA充值 - x - - - - - - - + + + + + + + + + + {{item.text}} + + + + - - - - - 王丽楠 - - - - - - 0.8km - - - - 春城有约 - - - + - - - - - 取消 - - - 确定 - + + 确认支付 @@ -412,6 +360,18 @@ }, methods: { + change(e) { + console.log('当前模式:' + e.type + ',状态:' + e.show); + }, + closePopup(type){//改价 关闭弹出框 + this.type = type + this.$refs.popup.close('bottom'); + }, + toggle(type) {//改价 弹出框 + this.type = type + // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 + this.$refs.popup.open('bottom') + }, checkboxChange(e){//选择优惠卷 this.couponId=e.detail.value.join(","); @@ -432,18 +392,7 @@ } }); }, - change(e) { - console.log('当前模式:' + e.type + ',状态:' + e.show); - }, - closePopup(type){//改价 关闭弹出框 - this.type = type - this.$refs.popup.close(type); - }, - toggle(type) {//改价 弹出框 - this.type = type - // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 - this.$refs.popup.open(type) - }, + //退保证金 TuiPrice() { @@ -664,6 +613,7 @@ icon: 'success' }) that.getMoney() + that.$refs.popup.close('bottom'); setTimeout(d => { uni.navigateBack(1) }, 1000); @@ -695,9 +645,14 @@ } that.$Request.post('/app/wxPay/payMoney', data).then(res => { if (res.code == 0) { + uni.showToast({ + title: '支付成功!' + }); + that.$refs.popup.close('bottom'); that.callPay(res.data); that.getMoney() } else { + that.$refs.popup.close('bottom'); uni.showToast({ icon: 'none', title: '支付失败!' @@ -718,12 +673,16 @@ } that.$Request.post('/app/wxPay/payMoney', data).then(res => { if (res.code == 0) { + uni.showToast({ + title: '支付成功!' + }); + that.$refs.popup.close('bottom'); + that.getMoney() const urlArr = window.location.href; const hostUrl = urlArr.split("/"); const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/wallet/index'; window.location = res.data.mweb_url + url - that.getMoney() } else { uni.showToast({ icon: 'none', @@ -754,6 +713,7 @@ uni.showToast({ title: '支付成功!' }); + that.$refs.popup.close('bottom'); that.getMoney() // const div = document.createElement('div') // div.innerHTML = res.data //此处form就是后台返回接收到的数据 @@ -964,6 +924,24 @@