浏览代码

输出请求结果

JXDS18FUJT 1 月之前
父节点
当前提交
17d2fe0d40
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/views/yeNingKC/index.vue

+ 5 - 1
src/views/yeNingKC/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>1</div>
+  <div>{{ msg }}</div>
 </template>
 
 <script setup lang="ts">
@@ -19,6 +19,7 @@ const baseUrl =
     : "https://jsjp-admin1.zzxcx.net/jsjp-admin/";
 const myPhone = new Phone();
 const request = axios.create();
+const msg = ref('')
 //@ts-ignore
 window.iosOrder = (goodsId: string, userInfoStr: string,goodsType:string) => {
   let userInfoObj: iosOrderUserInfo = JSON.parse(userInfoStr);
@@ -75,12 +76,15 @@ window.iosOrder = (goodsId: string, userInfoStr: string,goodsType:string) => {
         }).then((res: any) => {
           if (res.data.code == 200) {
             if (res.data.data.h5_url) {
+              msg.value = JSON.stringify( res.data) 
               window.location.href = res.data.data.h5_url;
             } else {
+              msg.value = JSON.stringify( res.data) 
               console.log(res.data);
             }
           } else {
             console.log("下单错误");
+            msg.value = JSON.stringify( res.data) 
             //数字转字符串
             myPhone.errCallgo(res.data.code + "");
           }