Переглянути джерело

hasPermission方法补充。

tomatozq 4 роки тому
батько
коміт
a7c12b2364
2 змінених файлів з 11 додано та 3 видалено
  1. 2 2
      .env.development
  2. 9 1
      src/api/sys/permission.js

+ 2 - 2
.env.development

@@ -1,9 +1,9 @@
 OUT_PUT_DIR=dist/jp-housekeeper-portal
 
 #VUE_APP_BACKEND_URL=http://127.0.0.1:7070/xpgj
-VUE_APP_BACKEND_URL=http://127.0.0.1:8086/jp-housekeeper-server
+#VUE_APP_BACKEND_URL=http://127.0.0.1:8086/jp-housekeeper-server
 #VUE_APP_BACKEND_URL=http://ykt-test.xiaoxinda.com/jp-housekeeper-server
-#VUE_APP_BACKEND_URL=http://xpgjapi.xiaoxinda.com
+VUE_APP_BACKEND_URL=http://xpgjapi.xiaoxinda.com
 #VUE_APP_BACKEND_URL=http://mirror.xiaoxinda.com/xpgjapi/
 
 #手机企业版

+ 9 - 1
src/api/sys/permission.js

@@ -53,6 +53,14 @@ function batchRemove(idList){
   });
 }
 
+function hasPermission(method,path){
+  var formData = new FormData();
+  formData.append("method",method);
+  formData.append("path",path);
+
+  return request.post(constant.serverUrl + "/sys/permission/hasPermission", formData);
+}
+
 export default {
-  pageList,create,edit,add,update,remove,batchRemove,selectAll,batchImport
+  pageList,create,edit,add,update,remove,batchRemove,selectAll,batchImport,hasPermission
 }