|
@@ -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>
|