Selaa lähdekoodia

跳转微信小程序

hwb0 3 vuotta sitten
vanhempi
commit
26b64b3ca5
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      public/jump.html

+ 4 - 4
public/jump.html

@@ -97,7 +97,6 @@
     function openWeapp() {
       let req = ajax({
         method: 'POST',
-        async: false,
         url: 'https://test-mp-adm.quanshu123.com/test-api/api/v1/mp/wx/urlschema/generate',
         data: {
           path: '/pages/bills/detail',
@@ -105,9 +104,10 @@
         }
       })
 
-      req.then(res => {
-        if(res.code == 0){
-          location.href = res.data;
+      req.then(data => {
+        console.log('data', data)
+        if(data.code == '0'){
+          window.location.href = data.data;
         }
       })
     }