index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 'use strict';
  2. var app = angular.module('app', [
  3. 'angularUtils.directives.dirPagination'
  4. ]);
  5. app.controller("indexCtrl", ["$http", "$scope", "$timeout", function ($http, $scope, $timeout) {
  6. var self = this;
  7. self.webApiUrl2 = "";
  8. self.get_userid = $.cookie("GlWorkPlatform-userid");
  9. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  10. self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno") || 1; ///接收传过来的第几页
  11. var postCfgJson = {
  12. headers: {
  13. 'Content-Type': 'application/json',
  14. 'Authorization': "Bearer " + self.get_AccessToken
  15. }
  16. };
  17. self.search = {
  18. USERREALNAME: "",
  19. IDNO: ""
  20. };
  21. //筛选确认
  22. self.btnSearchTrue = function () {
  23. if (spngvld.submit("#divSearchPart")) {
  24. if (self.search.IDNO.length < 6) {
  25. sp.dialog("身份证号查询长度至少为6位");
  26. } else {
  27. window.location.href = "index-real.html?name=" + self.search.USERREALNAME + "&idno=" + self.search.IDNO;
  28. }
  29. }
  30. };
  31. //筛选重置
  32. self.btnSearchCancel = function () {
  33. self.search = {
  34. USERREALNAME: "",
  35. IDNO: ""
  36. };
  37. spngvld.clear("#divSearchPart");
  38. };
  39. }]);