Browse Source

极速驾培的h5支付

JXDS18FUJT 10 months ago
parent
commit
b0d1935fa5
3 changed files with 49 additions and 1 deletions
  1. 1 1
      src/utils/phone.ts
  2. 13 0
      src/views/iosPay/index.vue
  3. 35 0
      src/views/yeNing/index.vue

+ 1 - 1
src/utils/phone.ts

@@ -66,7 +66,7 @@ class Phone {
                     'backView'
                     , { 'param': '返回的方法' }
                     , function (responseData) {
-
+                        
                     }
                 );
 

+ 13 - 0
src/views/iosPay/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <div>
+        
+    </div>
+</template>
+
+<script setup lang="ts">
+
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 35 - 0
src/views/yeNing/index.vue

@@ -0,0 +1,35 @@
+<template>
+  <button @click="h5Pay()">H5支付</button>
+</template>
+
+<script lang="ts">
+import axios from "axios";
+import { defineComponent } from "vue";
+const request = axios.create();
+export default defineComponent({
+  setup() {
+    const h5Pay = () => {
+      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;
+      });
+    };
+
+    return {
+        h5Pay
+    };
+  },
+});
+</script>
+
+<style lang="scss" scoped></style>