Browse Source

支付参数

xiaomei 1 year ago
parent
commit
a2c0dcb2c2

+ 1 - 1
src/pages/szw-order-details/index.vue

@@ -172,7 +172,7 @@ export default {
         },
         // 立即支付
         toPay(id) {
-            let type = "H5";
+            let type = "jsapi";
             // #ifdef  H5
             type = "H5";
             // #endif

+ 1 - 1
src/pages/szw-order-list/index.vue

@@ -183,7 +183,7 @@ export default {
 
         // 立即支付
         toPay(e) {
-            let type = "H5";
+            let type = "jsapi";
             // #ifdef  H5
             type = "H5";
             // #endif

+ 5 - 5
src/pages/to-pay-list/index.vue

@@ -436,15 +436,15 @@ export default {
             }
         },
         Pay() {
-            let type = "jsapi";
+            let trade_type = "jsapi";
             // #ifdef  H5
-            type = "H5";
+            trade_type = "H5";
             // #endif
             // #ifdef  APP
-            type = "app";
+            trade_type = "app";
             // #endif
             // #ifdef  MP-WEIXIN
-            type = "jsapi";
+            trade_type = "jsapi";
             // #endif
 
             let that = this
@@ -453,7 +453,7 @@ export default {
                 ...that.Data,
                 address_id: that.DefaultAddress.id || '',
                 regional_code: that.DefaultAddress.regional_code || '',
-                trade_type: type,
+                trade_type: trade_type,
                 prom_type: that.prom_type,
                 price: that.goodsInfo.cost_price,
             }).then((res) => {

+ 11 - 1
src/pages/top-up/index.vue

@@ -72,9 +72,19 @@ export default {
                 this.$toast("请阅读并同意相关协议");
                 return;
             } else {
+                let trade_type = "";
+                // #ifdef  H5
+                trade_type = "H5";
+                // #endif
+                // #ifdef  APP
+                trade_type = "app";
+                // #endif
+                // #ifdef  MP-WEIXIN
+                trade_type = "jsapi";
+                // #endif
                 let data = {
                     type: this.type == "local" ? 2 : 1,
-                    trade_type: "jsapi",
+                    trade_type: trade_type,
                     amount: this.price,
                 };
 

+ 12 - 1
src/pagesB/cinema/cinemaTicket.vue

@@ -160,7 +160,18 @@ export default {
             })
         },
         pay() {
-            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            
+            post("local/goOrderPay", { trade_no: this.order.trade_no,trade_type: type }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                         if (!rea) {

+ 12 - 1
src/pagesB/cinema/confirmOrder.vue

@@ -108,13 +108,24 @@ export default {
                     seatName: it.seatNo
                 })
             }
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
             let da = {
                 cinemaId: this.cinemaInfo.restaurant_id,
                 showId: this.OrderDa.s.showId,
                 phone: this.userinfo.mobile,
                 showInfor: JSON.stringify(ar),
                 movieName: this.OrderDa.m.movieName,
-                posterUrl: this.OrderDa.m.posterUrl
+                posterUrl: this.OrderDa.m.posterUrl,
+                trade_type: type,
             }
             post("local/cinemaOrder", da).then(res => {
                 if (res.code == 0 && res.data.prepayid) {

+ 11 - 0
src/pagesB/directCharge/coupon.vue

@@ -155,11 +155,22 @@ export default {
             }else this.payok();
         },
         payok(){
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
             let da = {
                 type: 3,
                 count: this.count,
                 phone: this.mobile,
                 product_no: this.selectitem.product_no,
+                trade_type: type,
             }
             post("local/coupon/addOrder", da).then(res => {
                 if (res.code == 0 && res.data.prepayid) {

+ 12 - 1
src/pagesB/directCharge/orderDetail.vue

@@ -101,7 +101,18 @@ export default {
             })
         },
         pay() {
-            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            
+            post("local/goOrderPay", { trade_no: this.order.trade_no,trade_type: type }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                         if (!rea) {

+ 11 - 0
src/pagesB/directCharge/payment.vue

@@ -134,11 +134,22 @@ export default {
             }else this.payok();
         },
         payok(){
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
             let da = {
                 type: 2,
                 count: 1,
                 phone: this.phone,
                 product_no: this.selectitem.product_no,
+                trade_type: type,
             }
             post("local/coupon/addOrder", da).then(res => {
                 if (res.code == 0 && res.data.prepayid) {

+ 12 - 0
src/pagesB/hotel/hotelDetail.vue

@@ -191,6 +191,17 @@ export default {
         },
         payok(){
             let RI = Object.assign({},this.roomInfo)
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+
             let da = {
                 ...this.qda,
                 hotelID: RI.hotelID,
@@ -199,6 +210,7 @@ export default {
                 checkOutDate: RI.checkOutDate,
                 guestNames: this.guestNames,
                 // orderAmount: this.actuallypaid
+                trade_type: type,
             }
             delete RI.ratePlans;
             delete RI.ratePlanId;

+ 11 - 1
src/pagesB/hotel/orderDetail.vue

@@ -169,7 +169,17 @@ export default {
             })
         },
         pay() {
-            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            post("local/goOrderPay", { trade_no: this.order.trade_no,trade_type: type }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                         if (!rea) {

+ 12 - 1
src/pagesB/orderingfood/detail.vue

@@ -222,7 +222,18 @@ export default {
             });
         },
         paypalPrderTap(trade_no) {
-            post("local/goOrderPay", {trade_no}).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            
+            post("local/goOrderPay", {trade_no,trade_type: type}).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                       if (!rea) {

+ 12 - 1
src/pagesB/orderingfood/payTheBill.vue

@@ -155,13 +155,24 @@ export default {
                     product_details
                 })
             }
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
             let product_detail = JSON.stringify(Arr)
             let da = {
                 brand_id: this.Merchant.brand_id,
                 restaurant_id: this.Merchant.restaurant_id,
                 phone: this.userinfo.mobile,
                 total_amount: this.actuallypaid,
-                product_detail
+                product_detail,
+                trade_type: type,
             }
             post("local/merchantOrder", da).then(res => {
                 if (res.code == 0 && res.data.prepayid) {

+ 11 - 0
src/pagesB/prepaidRefill/index.vue

@@ -136,6 +136,17 @@ export default {
             }else this.payok();
         },
         payok(){
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            this.qda.trade_type = type
             post("local/ofpay/onlineorde", this.qda).then((res) => {
                 if (res.code == 0 && res.data.prepayid) {
                     toPayOpre.toPay(res.data, (rea) => {

+ 11 - 1
src/pagesB/prepaidRefill/orderDetail.vue

@@ -76,7 +76,17 @@ export default {
         //     })
         // },
         pay() {
-            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            post("local/goOrderPay", { trade_no: this.order.trade_no,trade_type: type }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                         if (!rea) {

+ 11 - 1
src/pagesB/scenicSpotTicket/orderDetail.vue

@@ -77,7 +77,17 @@ export default {
             })
         },
         pay() {
-            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            post("local/goOrderPay", { trade_no: this.order.trade_no,trade_type: type }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {
                     toPayOpre.toPay(res.data.data, (rea) => {
                         if (!rea) {

+ 13 - 1
src/pagesB/scenicSpotTicket/scenicDetail.vue

@@ -184,13 +184,25 @@ export default {
             }else this.payok();
         },
         payok(){
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+
             let da = {
                 ...this.qda,
                 travelDate: this.selectDay.date,
                 contact: JSON.stringify(this.users[0]),
                 tourists: JSON.stringify(this.users),
                 productID: this.qda.productId,
-                ...this.users[0]
+                ...this.users[0],
+                trade_type: type,
             }
             post("local/ticket/addOrder", da).then(res => {
                 if (res.code == 0 && res.data.prepayid) {

+ 11 - 0
src/pagesB/topUp/Local.vue

@@ -90,6 +90,17 @@ export default {
         },
         payok() {
             let that = this
+            let type = "";
+            // #ifdef  H5
+			type = "H5";
+			// #endif
+			// #ifdef  APP
+			type = "app";
+			// #endif
+			// #ifdef  MP-WEIXIN
+			type = "jsapi";
+			// #endif
+            this.qda.trade_type = type
             post("v1/user/recharge", this.qda).then((res) => {
                 if (res.code == 0 && res.data?.data?.paySign) {
                     toPayOpre.toPay(res.data?.data, (rea) => {

+ 11 - 0
src/pagesC/settledMerchant/pay.vue

@@ -150,6 +150,17 @@ export default {
             });
         },
         pay(){
+            let type = "";
+            // #ifdef  H5
+            type = "H5";
+            // #endif
+            // #ifdef  APP
+            type = "app";
+            // #endif
+            // #ifdef  MP-WEIXIN
+            type = "jsapi";
+            // #endif
+            this.Body.trade_type = type
             post("v1/merchant/orders",this.Body).then(res=>{
                 let data = JSON.parse(res.data)
                 console.log(data,data.prepayid);