Browse Source

Merge branch 'participle' of http://192.168.2.236:10080/zhouna/knowledgeMap into participle

zhangxc 5 years ago
parent
commit
2689fd0bfe
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/js/api.js
  2. 1 1
      src/js/schemaMap.js

+ 2 - 1
src/js/api.js

@@ -24,6 +24,7 @@ const post = function (url, data,pId) {
   const securityCode = getUrlArgObject("code");
   const appKeyId = getUrlArgObject("appI");
   const appKeySecret = getUrlArgObject("appS");
+  const productId = getUrlArgObject("productId");
   return new Promise((resolve, reject) => {
     $.ajax({
       method: 'post',
@@ -36,7 +37,7 @@ const post = function (url, data,pId) {
         xmlHttp.setRequestHeader("appKeyId", appKeyId);
         xmlHttp.setRequestHeader("appKeySecret", appKeySecret);
         xmlHttp.setRequestHeader("securityCode", securityCode);
-        xmlHttp.setRequestHeader("productId", pId||146);
+        xmlHttp.setRequestHeader("productId", productId);
       },
       success: function (res) {
         resolve({ data: res });

+ 1 - 1
src/js/schemaMap.js

@@ -5,7 +5,7 @@ function getSchema(val, type){
     post(api.getSchema,{
         "labelName": type,
         "pramNme": val
-    },147).then(res=>{
+    }).then(res=>{
         if(res.data.code == 0) {
             if(res.data.data.length >0){
                 $('.empty').hide()