소스 검색

no message

linwenxin 5 달 전
부모
커밋
025860141c
3개의 변경된 파일15개의 추가작업 그리고 13개의 파일을 삭제
  1. 3 3
      src/components/zhifutanchuan.vue
  2. 6 5
      src/packageMaterial/pages/newSale/pay.vue
  3. 6 5
      src/packageMaterial/pages/sale/pay.vue

+ 3 - 3
src/components/zhifutanchuan.vue

@@ -11,7 +11,7 @@
       <view class="textclass"> 支付成功 </view>
       <view class="textclass" style="margin-top: 20rpx"> ¥{{ detail.totalAmount }} </view>
     </view>
-    <view class="zhuangtaitubiao" v-if="[3].includes(type)">
+    <view class="zhuangtaitubiao" v-if="[3, 4].includes(type)">
       <view class="icon">
         <text class="iconfont icon-shibai false" style="font-size: 100rpx; color: red"></text>
       </view>
@@ -46,7 +46,7 @@
     <view class="anniukuang" v-if="[1].includes(type)">
       <u-button text="取消" @click="back"></u-button>
     </view>
-    <view class="anniukuang" v-if="[1, 3].includes(type)">
+    <view class="anniukuang" v-if="[1, 3, 4].includes(type)">
       <u-button type="primary" text="重新扫描" @click="scan"></u-button>
     </view>
     <view class="anniukuang" v-if="[2].includes(type)">
@@ -71,7 +71,7 @@ export default {
     },
     state: {
       type: [String, Number],
-      default: 3
+      default: 0
     }
   },
   data() {

+ 6 - 5
src/packageMaterial/pages/newSale/pay.vue

@@ -174,14 +174,15 @@ export default {
           if (this.state == 0) {
             this.state = 1
           }
-          // 返回true,则支付成功
-          if (res.data == 1) {
+          if (res.data == 0) {
+            this.getDetail(() => {
+              this.state = 4
+            })
+          } else if (res.data == 1) {
             this.getDetail(() => {
               this.state = 2
             })
-          }
-          // 返回false,轮询3次
-          else {
+          } else {
             this.timeout = setTimeout(() => {
               this.submitData(code)
             }, 1000)

+ 6 - 5
src/packageMaterial/pages/sale/pay.vue

@@ -186,14 +186,15 @@ export default {
           if (this.state == 0) {
             this.state = 1
           }
-          // 返回true,则支付成功
-          if (res.data == 1) {
+          if (res.data == 0) {
+            this.getDetail(() => {
+              this.state = 4
+            })
+          } else if (res.data == 1) {
             this.getDetail(() => {
               this.state = 2
             })
-          }
-          // 返回false,轮询3次
-          else {
+          } else {
             this.timeout = setTimeout(() => {
               this.submitData(code)
             }, 1000)