Bladeren bron

二维码管理

qymljy 3 maanden geleden
bovenliggende
commit
764d971d8e
2 gewijzigde bestanden met toevoegingen van 21 en 16 verwijderingen
  1. 12 8
      public/codeToFile.html
  2. 9 8
      src/HDrpManagement/codeManage/index.vue

+ 12 - 8
public/codeToFile.html

@@ -4,15 +4,19 @@
         <meta charset="UTF-8">
         <title>商品资料页</title>
         <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
+        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+
     </head>
     <body>
         <img src="./img/bnBag.png" width="85%" height="180px" style="margin: 60pt 0 30pt 30pt">
         <div style="width:100%;height:50px;margin:0 0 20pt 30pt">
             <div style="font-size: 40pt;height:50px;line-height: 50px;vertical-align: auto;text-align: left;color: #333333;font-weight: bold" >产品技术资料</div>
         </div>
-        <div></div>
+        <div style="margin:0 0 20pt 30pt">
+            <div style="width: 100%;height: 100px;border-radius: 8pt;border: #cccccc solid 0.5pt">
+            </div>
+        </div>
         <script>
-            const dataList = []
             window.onload = async function(){
                 var loc=location.href;
                 var n1=loc.length;
@@ -26,13 +30,13 @@
                         "code": code
                     },
                 }
-                $.ajax({
-                    url:'http://61.164.207.46:8000/yos/rest/index',
-                    data:param,
-                    type:"POST"
-                }).done(function (res){
-                    alert(res)
+                axios.post('http://61.164.207.46:8000/yos/rest/index', param)
+                .then(function (response) {
+                    console.log(response)
                 })
+                .catch(function (error) {
+                    console.log(error);
+                });
             }
         </script>
     </body>

+ 9 - 8
src/HDrpManagement/codeManage/index.vue

@@ -45,7 +45,8 @@ export default {
   data(){
     return {
       dialogVisible:false,
-      url:'http://61.164.207.46:8000/yosweb/codeToFile.html',
+      // url:'http://61.164.207.46:8000/yosweb/codeToFile.html',
+      url:'http://192.168.3.146:8000/yosweb/codeToFile.html',
       bigUrl:''
     }
   },
@@ -57,13 +58,13 @@ export default {
       console.log(code,'code')
       this.dialogVisible = true
       this.bigUrl = this.url + '?code=' + code
-      // const res = await this.$api.requested({
-      //   "id": 2025082515112802,
-      //   "content": {
-      //     "code": code
-      //   },
-      // })
-      // console.log(res.data)
+      const res = await this.$api.requested({
+        "id": 2025082515112802,
+        "content": {
+          "code": code
+        },
+      })
+      console.log(res.data)
       // this.bigUrl = this.url + '?data=' + res.data
     },
     callback(){