tangning 2 éve
szülő
commit
bac26c4932
1 módosított fájl, 10 hozzáadás és 4 törlés
  1. 10 4
      src/views/mobile/index.vue

+ 10 - 4
src/views/mobile/index.vue

@@ -7,7 +7,9 @@ import { useRoute } from 'vue-router'
 import { GetRequest, getWeChatCode } from '@/utils/index'
 const payType = ref('0')
 const route = useRoute()
-const orderDetal = ref({})
+const orderDetal = ref({
+  payStatus:0
+})
 const orderSn = ref(route.query.id || GetRequest('id'))
 const userStore = useUserStore();
 const isEur = userStore.isEur
@@ -98,11 +100,15 @@ function getDetial() {
     }
   })
 }
-function handlePayresult(){
+async function handlePayresult(){
   let item = orderDetal.value
+  if(!item.orderType){
+    orderDetal.value = await getOrderInfo(orderSn.value)
+    item = orderDetal.value
+  }
   showConfirm({
-        text: item.payStatus === 2 ? '支付失败' : '支付成功',
-        type: item.payStatus === 2 ? 'err' : 'success',
+        text: item.payStatus == 2 ? '支付失败' : '支付成功',
+        type: item.payStatus == 2 ? 'err' : 'success',
         callback: () => {
         if(item.orderType == 'incrementOrder'){
           location.replace(`/mobile.html#/information`)