Browse Source

Merge branch 'master' into sh

shish 2 weeks ago
parent
commit
bb8f0ed80e

+ 6 - 6
ghsApp/src/admin/billing/toPay.vue

@@ -67,7 +67,7 @@
  */
 import { mapGetters } from "vuex";
 import { IMGHOST } from '@/config'
-import { cancel,debtPay,getDetail,codePay,codePayCheck} from "@/api/order";
+import { cancel,debtPay,getDetail,codePay,codePayCheck,codePayVerify} from "@/api/order";
 export default {
   name: "toPay",
   components: {
@@ -246,7 +246,7 @@ export default {
                     that.returnCode = res.data.returnCode ? res.data.returnCode : ''
                     that.goPay = 2
                     
-                    // 11105(用户输入密码中) 或 10000(其它密码状态),启动4秒一次、最多5次(20秒)的自动复查定时器
+                    // 11105(用户输入密码中) 或 10000(其它密码状态),启动4秒一次、最多4次(16秒)的自动复查定时器
                     if (that.returnCode == 'BBS11105' || that.returnCode == 'BBS10000') {
                         that.startPolling()
                     } else {
@@ -268,7 +268,7 @@ export default {
     },
     /**
      * 启动低频后台付款复查定时器
-     * 4秒轮询一次,限查5次,极大地减轻服务器压力的同时保证业务流闭环
+     * 4秒轮询一次,限查4次,极大地减轻服务器压力的同时保证业务流闭环
      */
     startPolling(){
         this.clearPolling()
@@ -279,7 +279,7 @@ export default {
         let that = this;
         this.pollingTimer = setInterval(() => {
             that.pollingCount++
-            if (that.pollingCount > 5) {
+            if (that.pollingCount > 4) {
                 that.clearPolling()
                 that.isPaymentProcessing = false
                 that.goPay = 2
@@ -287,9 +287,9 @@ export default {
                 return
             }
 
-            that.remindText = `正在自动复查支付结果 (${that.pollingCount}/5)...`
+            that.remindText = `正在自动复查支付结果 (${that.pollingCount}/4)...`
 
-            codePayCheck({id:that.orderId}).then(res=>{
+            codePayVerify({id:that.orderId}).then(res=>{
                 if(res.code == 1){
                     if(res.data && res.data.returnStatus == 'SUCCESS'){
                         that.clearPolling()

+ 3 - 0
ghsApp/src/api/order/index.js

@@ -268,6 +268,9 @@ export const codePay = data => https.get("/order/code-pay", data);
 //微信和支付宝付款码支付复查
 export const codePayCheck = data => https.get("/order/code-pay-check", data);
 
+//微信和支付宝付款码支付验证
+export const codePayVerify = data => https.get("/order/code-pay-verify", data);
+
 //收款语音播报
 export const getPayVoice = data => https.get("/order/get-pay-voice", data);
 

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

@@ -198,6 +198,9 @@ export const codePay = data => https.get("/order/code-pay", data);
 //微信和支付宝付款码支付复查
 export const codePayCheck = data => https.get("/order/code-pay-check", data);
 
+//微信和支付宝付款码支付验证
+export const codePayVerify = data => https.get("/order/code-pay-verify", data);
+
 //收款语音播报
 export const getPayVoice = data => https.get("/order/get-pay-voice", data);
 

+ 7 - 7
ghsPad/src/pages/home/components/toPay.vue

@@ -58,7 +58,7 @@
  * 扫码支付组件(供货商收银机端)
  * 解决客户扫码后转圈状态被卡住、钱未到账的问题,支持网络异常降级和自动后台复查
  */
-import { codePay,codePayCheck,cancelOrderFn,getDetail} from "@/api/order";
+import { codePay,codePayCheck,codePayVerify,cancelOrderFn,getDetail} from "@/api/order";
 export default {
     name:'toPayWay',
     components:{
@@ -164,7 +164,7 @@ export default {
             this.remindText = ''
             this.returnCode = ''
             this.clearPolling() // 每次开始扫码前,确保清除旧的定时器
-            
+
             codePay({id:this.orderId,authCode:authCode}).then(res=>{
                 if(res.code == 1){
                     if(res.data.returnStatus == 'SUCCESS'){
@@ -201,7 +201,7 @@ export default {
         },
         /**
          * 启动自动后台付款复查定时器
-         * 职责:降低轮询频率至4秒,且将次数限为5次(总计20秒),极大地减轻服务器压力的同时保证业务完整
+         * 职责:降低轮询频率至4秒,且将次数限为4次(总计16秒),极大地减轻服务器压力的同时保证业务完整
          */
         startPolling(){
             this.clearPolling()
@@ -212,7 +212,7 @@ export default {
             let that = this
             this.pollingTimer = setInterval(() => {
                 that.pollingCount++
-                if (that.pollingCount > 5) {
+                if (that.pollingCount > 4) {
                     // 超时未确认,停止轮询,允许商户手动操作或重新扫码
                     that.clearPolling()
                     that.isPaymentProcessing = false
@@ -222,9 +222,9 @@ export default {
                 }
                 
                 // 界面上展示当前自动复查的进度,提升收银员体验
-                that.remindText = `正在自动复查支付结果 (第 ${that.pollingCount}/5 次)...`
-                
-                codePayCheck({id:that.orderId}).then(res=>{
+                that.remindText = `正在自动复查支付结果 (第 ${that.pollingCount}/4 次)...`
+
+                codePayVerify({id:that.orderId}).then(res=>{
                     if(res.code == 1){
                         if(res.data && res.data.returnStatus == 'SUCCESS'){
                             // 复查确认成功,停止轮询并显示成功界面

+ 6 - 6
hdApp/src/admin/billing/toPay.vue

@@ -54,7 +54,7 @@
  * 扫码支付组件(零售花店App/微信端)
  * 优化转圈状态锁死问题,支持低频自动复查及网络异常优雅降级
  */
-import { cancelOrder,debtPay,getDetail,codePay,codePayCheck} from "@/api/order";
+import { cancelOrder,debtPay,getDetail,codePay,codePayCheck,codePayVerify} from "@/api/order";
 export default {
   name: "toPay",
   components: {
@@ -174,7 +174,7 @@ export default {
                     that.returnCode = res.data.returnCode ? res.data.returnCode : ''
                     that.goPay = 2
                     
-                    // 11105(用户输入密码中) 或 10000(其它密码状态),启动4秒一次、最多5次(20秒)的自动复查定时器
+                    // 11105(用户输入密码中) 或 10000(其它密码状态),启动4秒一次、最多4次(16秒)的自动复查定时器
                     if (that.returnCode == 'BBS11105' || that.returnCode == 'BBS10000') {
                         that.startPolling()
                     } else {
@@ -196,7 +196,7 @@ export default {
     },
     /**
      * 启动低频后台付款复查定时器
-     * 4秒轮询一次,限查5次,极大地减轻服务器压力的同时保证业务流闭环
+     * 4秒轮询一次,限查4次,极大地减轻服务器压力的同时保证业务流闭环
      */
     startPolling(){
         this.clearPolling()
@@ -207,7 +207,7 @@ export default {
         let that = this
         this.pollingTimer = setInterval(() => {
             that.pollingCount++
-            if (that.pollingCount > 5) {
+            if (that.pollingCount > 4) {
                 that.clearPolling()
                 that.isPaymentProcessing = false
                 that.goPay = 2
@@ -215,9 +215,9 @@ export default {
                 return
             }
 
-            that.remindText = `正在自动复查支付结果 (${that.pollingCount}/5)...`
+            that.remindText = `正在自动复查支付结果 (${that.pollingCount}/4)...`
 
-            codePayCheck({id:that.orderId}).then(res=>{
+            codePayVerify({id:that.orderId}).then(res=>{
                 if(res.code == 1){
                     if(res.data && res.data.returnStatus == 'SUCCESS'){
                         that.clearPolling()

+ 3 - 0
hdApp/src/api/order/index.js

@@ -10,6 +10,9 @@ export const codePay = data => https.get("/order/code-pay", data);
 //微信和支付宝付款码支付复查
 export const codePayCheck = data => https.get("/order/code-pay-check", data);
 
+//微信和支付宝付款码支付验证
+export const codePayVerify = data => https.get("/order/code-pay-verify", data);
+
 export const updateOrder = data => {
 	return https.post("/order/update", data);
 };

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

@@ -198,6 +198,9 @@ export const codePay = data => https.get("/order/code-pay", data);
 //微信和支付宝付款码支付复查
 export const codePayCheck = data => https.get("/order/code-pay-check", data);
 
+//微信和支付宝付款码支付验证
+export const codePayVerify = data => https.get("/order/code-pay-verify", data);
+
 //收款语音播报
 export const getPayVoice = data => https.get("/order/get-pay-voice", data);
 

+ 7 - 7
hdPad/src/pages/home/components/toPay.vue

@@ -47,7 +47,7 @@
  * 扫码支付组件(零售花店收银机端)
  * 解决扫码时转圈状态被卡住、钱未到账的问题,支持网络异常降级和后台复查
  */
-import { codePay,codePayCheck,cancelOrderFn,getDetail} from "@/api/order";
+import { codePay,codePayCheck,codePayVerify,cancelOrderFn,getDetail} from "@/api/order";
 export default {
     name:'toPayWay',
     components:{
@@ -145,7 +145,7 @@ export default {
             this.remindText = ''
             this.returnCode = ''
             this.clearPolling() // 每次开始扫码前,确保清除旧的定时器
-            
+
             codePay({id:this.orderId,authCode:authCode,version:2}).then(res=>{
                 if(res.code == 1){
                     if(res.data.returnStatus == 'SUCCESS'){
@@ -182,7 +182,7 @@ export default {
         },
         /**
          * 启动自动后台付款复查定时器
-         * 职责:降低轮询频率至4秒,且将次数限为5次(总计20秒),极大地减轻服务器压力的同时保证业务完整
+         * 职责:降低轮询频率至4秒,且将次数限为4次(总计16秒),极大地减轻服务器压力的同时保证业务完整
          */
         startPolling(){
             this.clearPolling()
@@ -193,7 +193,7 @@ export default {
             let that = this
             this.pollingTimer = setInterval(() => {
                 that.pollingCount++
-                if (that.pollingCount > 5) {
+                if (that.pollingCount > 4) {
                     // 超时未确认,停止轮询,允许商户手动操作或重新扫码
                     that.clearPolling()
                     that.isPaymentProcessing = false
@@ -203,9 +203,9 @@ export default {
                 }
                 
                 // 界面展示当前自动复查的进度,提升收银员体验
-                that.remindText = `正在自动复查支付结果 (第 ${that.pollingCount}/5 次)...`
-                
-                codePayCheck({id:that.orderId}).then(res=>{
+                that.remindText = `正在自动复查支付结果 (第 ${that.pollingCount}/4 次)...`
+
+                codePayVerify({id:that.orderId}).then(res=>{
                     if(res.code == 1){
                         if(res.data && res.data.returnStatus == 'SUCCESS'){
                             // 复查确认成功,停止轮询并显示成功界面