Browse Source

添加获取地区接口

xiaohaizhao 2 years ago
parent
commit
069ff4a1f0
1 changed files with 11 additions and 1 deletions
  1. 11 1
      utils/api.js

+ 11 - 1
utils/api.js

@@ -56,7 +56,17 @@ class ApiModel extends HTTP {
             data
         })
     }
-
+    /* 获取地区code */
+    getLocationCode() {
+        return this.request({
+            url: "/getforward?url=" + encodeURIComponent("http://www.nmc.cn/rest/position"),
+            data: {},
+            method: "GET",
+            header: {
+                "Access-Control-Allow-Origin": "*"
+            }
+        })
+    }
 }
 export {
     ApiModel