Browse Source

update lodash

windsome.feng 6 years ago
parent
commit
660a483837
5 changed files with 152 additions and 24 deletions
  1. 4 2
      lib/webservice.js
  2. 0 18
      package-lock.json
  3. 2 2
      package.json
  4. 4 2
      src/lib/webservice.js
  5. 142 0
      yarn.lock

+ 4 - 2
lib/webservice.js

@@ -352,8 +352,10 @@ export var infocode = {
   }
 };
 
-export var getRequest = function getRequest(service, parameters, body) {
-  if (!service) return null;
+export var getRequest = function getRequest(serviceId, parameters, body) {
+  if (!serviceId) return null;
+
+  var service = services[serviceId];
 
   var option = {};
   var name = service.name,

+ 0 - 18
package-lock.json

@@ -1,18 +0,0 @@
-{
-  "name": "react-amap-next",
-  "version": "0.1.0",
-  "lockfileVersion": 1,
-  "requires": true,
-  "dependencies": {
-    "classnames": {
-      "version": "2.2.6",
-      "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
-      "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
-    },
-    "lodash": {
-      "version": "4.17.10",
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
-      "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
-    }
-  }
-}

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "react-amap-next",
-  "version": "1.2.0",
+  "version": "1.2.2",
   "description": "这是高德地图的react版本,相比react-amap更加简单,更加贴合react用户",
   "keywords": [
     "react",
@@ -20,7 +20,7 @@
   },
   "dependencies": {
     "classnames": "^2.2.6",
-    "lodash": "^4.17.10",
+    "lodash": "^4.17.11",
     "react": "^16.4.1",
     "react-dom": "^16.4.1",
     "react-scripts": "2.0.5"

+ 4 - 2
src/lib/webservice.js

@@ -353,8 +353,10 @@ export const infocode = {
   },
 }
 
-export const getRequest = (service, parameters, body) => {
-  if (!service) return null;
+export const getRequest = (serviceId, parameters, body) => {
+  if (!serviceId) return null;
+  
+  let service = services[serviceId];
 
   let option = {};
   let { name, url, method, parameters: dfParameters, body: dfBody } = service;

File diff suppressed because it is too large
+ 142 - 0
yarn.lock


Some files were not shown because too many files changed in this diff