shish 1 год назад
Родитель
Сommit
b2a8f6fd77

+ 4 - 0
ghsPad/src/api/order/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const payOkReport = data => {
+	return https.get("/order/pay-ok-report", data);
+};
+
 export const cancelOrderFn = data => {
 	return https.get("/order/cancel", data);
 };

+ 4 - 1
ghsPad/src/pages/home/components/toPay.vue

@@ -39,7 +39,7 @@
     </view>
 </template>
 <script>
-import { codePay,codePayCheck,cancelOrderFn,getDetail} from "@/api/order";
+import { codePay,codePayCheck,cancelOrderFn,getDetail,payOkReport} from "@/api/order";
 export default {
     name:'toPayWay',
     components:{
@@ -89,10 +89,13 @@ export default {
         },
         checkOrder(){
             let that = this
+            uni.showLoading({mask:true})
             getDetail({id:this.orderId}).then(res=>{
+                uni.hideLoading()
                 if(res.code == 1){
                     if(res.data.payStatus == 1){
                         that.showSuccess = true
+                        payOkReport({id:this.orderId})
                         setTimeout(function(){
                             that.payFinish()
                         },900)

+ 4 - 0
hdPad/src/api/order/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const paySuccessReport = data => {
+	return https.get("/order/pay-success-report", data);
+};
+
 export const cancelOrderFn = data => {
 	return https.get("/order/cancel", data);
 };

+ 4 - 1
hdPad/src/pages/home/components/toPay.vue

@@ -39,7 +39,7 @@
     </view>
 </template>
 <script>
-import { codePay,codePayCheck,cancelOrderFn,getDetail} from "@/api/order";
+import { codePay,codePayCheck,cancelOrderFn,getDetail,paySuccessReport} from "@/api/order";
 export default {
     name:'toPayWay',
     components:{
@@ -89,10 +89,13 @@ export default {
         },
         checkOrder(){
             let that = this
+            uni.showLoading({mask:true})
             getDetail({id:this.orderId}).then(res=>{
+                uni.hideLoading()
                 if(res.code == 1){
                     if(res.data.payStatus == 1){
                         that.showSuccess = true
+                        paySuccessReport({id:this.orderId})
                         setTimeout(function(){
                             that.payFinish()
                         },900)