Browse Source

ios支付页面6

JXDS18FUJT 10 months ago
parent
commit
26a70ad9e6
1 changed files with 16 additions and 1 deletions
  1. 16 1
      src/views/yeNing/index.vue

+ 16 - 1
src/views/yeNing/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <button @click="h5Pay()">H5支付</button>
+  <!-- <button @click="h5Pay()">H5支付</button> -->
 </template>
 
 <script lang="ts">
@@ -44,6 +44,21 @@ window.iosOrder = (dictCode: string, userInfoStr: string) => {
     window.setTimeout(() => {
       myPhone.ipyCallgo();
     }, 2500);
+  } else {
+    request({
+      url: "https://jsjp-admin1.zzxcx.net/jsjp-admin/open-api/wxjs/h5PrepareOrder",
+      method: "POST",
+      headers: {
+        Referer: "https://jsjp-admin1.zzxcx.net/",
+      },
+      data: {
+        dictCode: "121",
+        phoneType: 1,
+        userId: "1756024",
+      },
+    }).then((res: any) => {
+      window.location.href = res.data.data.h5_url;
+    });
   }
   //open-api/wxjs/prepareOrder
   // alert('调用了iosOrder')