route.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. starter.config(function ($stateProvider, $httpProvider) {
  2. $stateProvider.state('audit', {
  3. url: '/index',
  4. templateUrl: 'templates/audit.html',
  5. controller: 'AuditCtrl'
  6. })
  7. .state('audit-filter', {
  8. url: '/filter',
  9. templateUrl: 'templates/filter.html',
  10. controller: 'FilterCtrl'
  11. })
  12. .state('audit-list', {
  13. url: '/list/:QueryID',
  14. templateUrl: 'templates/list.html',
  15. controller: 'ListCtrl'
  16. })
  17. .state('audit-detail', {
  18. url: '/detail/:QueryID&:BIL_ID&:BIL_NO&:BIL_ITM&:IsAuditCall&:CheckInAudit',
  19. templateUrl: 'templates/detailhead.html',
  20. controller: 'DetailHeadCtrl'
  21. })
  22. .state('audit-detail-body', {
  23. url: '/detail-body/',
  24. templateUrl: 'templates/detailbody.html',
  25. controller: 'DetailBodyCtrl'
  26. })
  27. .state('audit-body-data', {
  28. url: '/body-data/',
  29. templateUrl: 'templates/bodydata.html',
  30. controller: 'BodyDataCtrl'
  31. });
  32. $httpProvider.interceptors.push(function ($q, cfg, global) {
  33. return {
  34. 'request': function (config) {
  35. if (config.url.indexOf("ext_erp") != -1) {//分页时自带了请求路径
  36. config.headers['cid'] = JSON.stringify({"linkid": global.user.compno, "langid": "TW", "phone": global.user.cellphone});
  37. }
  38. return config;
  39. }
  40. };
  41. });
  42. });