123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591 |
- // Ionic Starter App
- // angular.module is a global place for creating, registering and retrieving Angular modules
- // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
- // the 2nd parameter is an array of 'requires'
- // TODO
- var app = angular.module('push', ['ionic', 'ngCordova', 'oc.lazyLoad', 'ionic.service.core', 'ionic.service.deploy','ionic-datepicker'])
- // var app = angular.module('push', ['ionic', 'oc.lazyLoad', 'ionic.service.core', 'ionic.service.deploy','ionic-datepicker'])
- .run(function ($ionicPlatform) {
- $ionicPlatform.ready(function () {
- // ionic.Platform.fullScreen();
- if (window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
- cordova.plugins.Keyboard.disableScroll(true);
- }
- if (window.StatusBar) {
- StatusBar.styleLightContent();
- }
- });
- })
- .config(['$stateProvider', '$urlRouterProvider', '$ionicConfigProvider','ionicDatePickerProvider', function ($stateProvider, $urlRouterProvider, $ionicConfigProvider,ionicDatePickerProvider) {
- $ionicConfigProvider.views.swipeBackEnabled(false);
- $ionicConfigProvider.views.transition('none');
- $ionicConfigProvider.scrolling.jsScrolling(true);
- $ionicConfigProvider.platform.ios.tabs.style('standard');
- $ionicConfigProvider.platform.ios.tabs.position('bottom');
- $ionicConfigProvider.platform.android.tabs.style('standard');
- $ionicConfigProvider.platform.android.tabs.position('standard');
- $ionicConfigProvider.platform.ios.navBar.alignTitle('center');
- $ionicConfigProvider.platform.android.navBar.alignTitle('center');
- $ionicConfigProvider.platform.ios.views.transition('ios');
- $ionicConfigProvider.platform.android.views.transition('android');
- $stateProvider
- /*TAB*/
- .state('tab', {
- url: '/tab', abstract: true,
- templateUrl: 'modules/common/views/tabs.html'
- })
- /*资讯首页*/
- .state('tab.home', {
- cache: true,
- url: '/home',
- views: {
- 'tab-home': {
- templateUrl: 'modules/home/views/home.html',
- controller: 'HomeCtrl',
- resolve: {
- home: function (LoadJsService) {
- return LoadJsService.loadSequence("HomeArgs");
- }
- }
- }
- }
- })
- /*资源库*/
- .state('tab.resourceLibrary', {
- cache: false,
- url: '/resourceLibrary',
- views: {
- 'tab-resourceLibrary': {
- templateUrl: 'modules/resourceLibrary/views/resourceLibraryHome.html',
- controller: 'resourceLibraryHomeCtrl',
- resolve: {
- resourceLibrary: function (LoadJsService) {
- return LoadJsService.loadSequence("ResourceLibraryArgs");
- }
- }
- }
- }
- })
- /*科技圈*/
- .state('tab.scienceCircle', {
- cache: false,
- url: '/scienceCircle',
- views: {
- 'tab-scienceCircle': {
- templateUrl: 'modules/scienceCircle/views/scienceCircleHome.html',
- controller: 'scienceCircleHomeCtrl',
- resolve: {
- scienceCircleHomeCtrl: function (LoadJsService) {
- return LoadJsService.loadSequence("scienceCircleHomeArgs");
- }
- }
- }
- }
- })
- /*活动首页*/
- .state('tab.activityIndex', {
- cache: false,
- url: '/activityIndex',
- views: {
- 'tab-activityIndex': {
- templateUrl: 'modules/activityEntrance/views/activityIndex.html',
- controller: 'activityIndexCtrl',
- resolve: {
- activityIndex: function (LoadJsService) {
- return LoadJsService.loadSequence("activityIndexArgs");
- }
- },
- }
- }
- })
- /*我的*/
- .state('tab.account', {
- cache: false,
- url: '/account',
- views: {
- 'tab-account': {
- templateUrl: 'modules/account/views/account.html',
- controller: 'AccountCtrl',
- resolve: {
- account: function (LoadJsService) {
- return LoadJsService.loadSequence("AccountArgs");
- }
- }
- }
- }
- })
- /*详情*/
- .state('detail', {
- cache: false,
- url: '/detail',
- templateUrl: 'modules/home/views/details.html',
- controller: 'DetailsCtrl',
- resolve: {
- detail: function (LoadJsService) {
- return LoadJsService.loadSequence("DetailsArgs");
- }
- },
- params: {
- url: "",
- creatorId: "",
- id: "",
- type: "",
- title: "",
- siteName: "",
- time: "",
- content: "",
- moduleId: "",
- favourCount: ""
- }
- })
- /*引导页*/
- .state('guide', {
- cache: false,
- url: '/guide',
- templateUrl: 'modules/guidepage/views/guide.html',
- controller: 'GuideCtrl',
- resolve: {
- guide: function (LoadJsService) {
- return LoadJsService.loadSequence("GuideCtrl");
- }
- }
- })
- /*登录*/
- .state('login', {
- cache: false,
- url: '/login',
- templateUrl: 'modules/login/views/login.html',
- controller: 'LoginCtrl',
- resolve: {
- login: function (LoadJsService) {
- return LoadJsService.loadSequence("LoginCtrl");
- }
- }
- })
- /*注冊*/
- .state('register', {
- cache: false,
- url: '/register',
- templateUrl: 'modules/register/views/register.html',
- controller: 'RegisterCtrl',
- resolve: {
- register: function (LoadJsService) {
- return LoadJsService.loadSequence("RegisterArgs");
- }
- }
- })
- //忘记密码
- .state('FortPasd', {
- cache: false,
- url: '/FortPasd',
- templateUrl: 'modules/register/views/FortPasd.html',
- controller: 'FortPasdCtrl',
- resolve: {
- FortPasd: function (LoadJsService) {
- return LoadJsService.loadSequence("FortPasdArgs");
- }
- }
- })
- /*用户协议*/
- .state('userAgreement', {
- cache: false,
- url: '/userAgreement',
- templateUrl: 'modules/register/views/userAgreement.html',
- controller: 'userAgreementCtrl',
- resolve: {
- userAgreement: function (LoadJsService) {
- return LoadJsService.loadSequence("userAgreementArgs");
- }
- }
- })
- /*搜索*/
- .state('mysearch', {
- cache: false,
- url: '/mysearch',
- templateUrl: 'modules/home/views/mySearch.html',
- controller: 'MySearchCtrl',
- resolve: {
- mysearch: function (LoadJsService) {
- return LoadJsService.loadSequence("MySearchCtrl");
- }
- }
- })
- /*找回密码*/
- .state('findpsw', {
- cache: false,
- url: '/findpsw',
- templateUrl: 'modules/login/views/findpsw.html',
- controller: 'FindPswCtrl',
- resolve: {
- findpsw: function (LoadJsService) {
- return LoadJsService.loadSequence("FindPswCtrl");
- }
- }
- })
- .state('guidePage', {
- cache: false,abstract: true,
- url: '/guidePage',
- templateUrl: 'modules/login/views/guidePage.html',
- controller: 'guidePageCtrl',
- resolve: {
- guidePage: function (LoadJsService) {
- return LoadJsService.loadSequence("guidePageCtrl");
- }
- }
- })
- /*搜索结果页面*/
- .state('SearchResult', {
- cache: false,
- url: '/SearchResult',
- templateUrl: 'modules/home/views/SearchResult.html',
- controller: 'SearchResultCtrl',
- resolve: {
- SearchResult: function (LoadJsService) {
- return LoadJsService.loadSequence("SearchResultArgs");
- }
- },
- params: {key: "", actype: true}
- })
- /*评论回复详情页*/
- .state('Reply', {
- cache: false,
- url: '/Reply',
- params: {"comment": null, "infotype": null, "infoid": null, "siteName": "",comfrom:''},
- templateUrl: 'modules/home/views/Reply.html',
- controller: 'ReplyCtrl',
- resolve: {
- Reply: function (LoadJsService) {
- return LoadJsService.loadSequence("ReplyArgs");
- }
- }
- })
- /*云权限主页页面*/
- .state('cloudHome', {
- cache: false,
- url: '/cloudHome',
- templateUrl: 'modules/cloudAuthority/views/cloudHome.html',
- controller: 'cloudHomeCtrl',
- resolve: {
- cloudHome: function (LoadJsService) {
- return LoadJsService.loadSequence("cloudHomeArgs");
- }
- }
- })
- /*创建组页面*/
- .state('groupCreate', {
- cache: false,
- url: '/groupCreate',
- templateUrl: 'modules/cloudAuthority/views/groupCreate.html',
- controller: 'groupCreateCtrl',
- resolve: {
- groupCreate: function (LoadJsService) {
- return LoadJsService.loadSequence("groupCreateArgs");
- }
- }
- })
- /*添加组成员页面*/
- .state('groupAddMember', {
- cache: false,
- url: '/groupAddMember',
- templateUrl: 'modules/cloudAuthority/views/groupAddMember.html',
- controller: 'groupAddMemberCtrl',
- resolve: {
- groupAddMember: function (LoadJsService) {
- return LoadJsService.loadSequence("groupAddMemberCtrl");
- }
- },
- params: {type: 0}
- })
- /*显示组成员页面*/
- .state('groupMember', {
- cache: false,
- url: '/groupMember',
- templateUrl: 'modules/cloudAuthority/views/groupMember.html',
- controller: 'groupMemberCtrl',
- resolve: {
- groupMember: function (LoadJsService) {
- return LoadJsService.loadSequence("groupMemberCtrl");
- }
- }
- })
- /*编辑权限页面*/
- .state('editAuthority', {
- cache: false,
- url: '/editAuthority',
- templateUrl: 'modules/cloudAuthority/views/editAuthority.html',
- controller: 'editAuthorityCtrl',
- resolve: {
- editAuthority: function (LoadJsService) {
- return LoadJsService.loadSequence("editAuthorityArgs");
- }
- }
- })
- /*添加成员页面*/
- .state('addMember', {
- cache: false,
- url: '/addMember',
- templateUrl: 'modules/cloudAuthority/views/addMember.html',
- controller: 'addMemberCtrl',
- resolve: {
- addMember: function (LoadJsService) {
- return LoadJsService.loadSequence("addMemberArgs");
- }
- },
- params: {type: null}
- })
- /*权限成员介绍页面*/
- .state('authorityName', {
- cache: false,
- url: '/authorityName',
- templateUrl: 'modules/cloudAuthority/views/authorityName.html',
- controller: 'authorityNameCtrl',
- resolve: {
- authorityName: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityNameArgs");
- }
- },
- params: {authorityid: null, ccomefrom: null, invite_url: null}
- })
- /*绑定手机号码*/
- .state('bindPhone', {
- cache: false,
- url: '/bindPhone',
- templateUrl: 'modules/login/views/bindPhone.html',
- controller: 'bindPhoneCtrl',
- resolve: {
- bindPhone: function (LoadJsService) {
- return LoadJsService.loadSequence("bindPhoneCtrl");
- }
- },
- params: {tokeninfo: null, type: 1,comfrom:'',params:'',url:''}
- })
- .state('privacyPolicy', {
- cache: false,
- url: '/privacyPolicy',
- templateUrl: 'modules/login/views/privacyPolicy.html',
- controller: 'privacyPolicyCtrl',
- resolve: {
- privacyPolicy: function (LoadJsService) {
- return LoadJsService.loadSequence("privacyPolicyCtrl");
- }
- }
- })
- .state('registePolicy', {
- cache: false,
- url: '/registePolicy',
- templateUrl: 'modules/login/views/registePolicy.html',
- controller: 'registePolicyCtrl',
- resolve: {
- registePolicy: function (LoadJsService) {
- return LoadJsService.loadSequence("registePolicyCtrl");
- }
- }
- })
- /*创建标准权限(文件夹)*/
- .state('authorityCreate', {
- cache: false,
- url: '/authorityCreate',
- templateUrl: 'modules/cloudAuthority/views/authorityCreate.html',
- controller: 'authorityCreateCtrl',
- resolve: {
- authorityCreate: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityCreateCtrl");
- }
- },
- params: {localparentid: "0", authorityid: 0, authoritycomefrom: "", parentid: 0, level: -1, templettype:1}
- })
- /*创建标准权限(文件夹)*/
- .state('authorityResourceCreate', {
- cache: false,
- url: '/authorityResourceCreate',
- templateUrl: 'modules/cloudAuthority/views/authorityResourceCreate.html',
- controller: 'authorityResourceCreateCtrl',
- resolve: {
- authorityResourceCreate: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityResourceCreateCtrl");
- }
- },
- params: {authoritydata: {}}
- })
- /*设置标准权限(记录/资源)*/
- .state('authorityRecordSet', {
- cache: false,
- url: '/authorityRecordSet',
- templateUrl: 'modules/cloudAuthority/views/authorityRecordSet.html',
- controller: 'authorityRecordSetCtrl',
- resolve: {
- authorityRecordSet: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityRecordSetCtrl");
- }
- },
- params: {authoritydata: {}}
- })
- /*设置标准权限(文件夹/资源库)*/
- .state('authoritySet', {
- cache: false,
- url: '/authoritySet',
- templateUrl: 'modules/cloudAuthority/views/authoritySet.html',
- controller: 'authoritySetCtrl',
- resolve: {
- authoritySet: function (LoadJsService) {
- return LoadJsService.loadSequence("authoritySetCtrl");
- }
- },
- params: {
- reclibid: 0,
- authorityid: 0,
- authoritycomefrom: "",
- name: "",
- content: "",
- sort: 0,
- goflg: 0,
- type: 1,
- parentid: 0
- }
- })
- /*设置文件夹/资源库(有可能涉及权限)*/
- .state('authorityLocalSet', {
- cache: false,
- url: '/authorityLocalSet',
- templateUrl: 'modules/cloudAuthority/views/authorityLocalSet.html',
- controller: 'authorityLocalSetCtrl',
- resolve: {
- authorityLocalSet: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityLocalSetCtrl");
- }
- },
- params: {authoritydata: {}, type: 0, goflg: 0}
- })
- /*标准权限组成员列表(文件夹)*/
- .state('authorityFolderMember', {
- cache: true,
- url: '/authorityFolderMember',
- templateUrl: 'modules/cloudAuthority/views/authorityFolderMember.html',
- controller: 'authorityFolderMemberCtrl',
- resolve: {
- authorityFolderMember: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityFolderMemberCtrl");
- }
- },
- params: {identity: 0, authid: 0, authcomefrom: 0}
- })
- /*标准权限组成员列表*/
- .state('authorityMember', {
- cache: true,
- url: '/authorityMember',
- templateUrl: 'modules/cloudAuthority/views/authorityMember.html',
- controller: 'authorityMemberCtrl',
- resolve: {
- authorityMember: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityMemberCtrl");
- }
- },
- params: {identity: 0, authid: 0, authcomefrom: 0}
- })
- /*标准权限组添加成员页面*/
- .state('authorityAddMember', {
- cache: false,
- url: '/authorityAddMember',
- templateUrl: 'modules/cloudAuthority/views/authorityAddMember.html',
- controller: 'authorityAddMemberCtrl',
- resolve: {
- authorityAddMember: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityAddMemberArgs");
- }
- },
- params: {authid: 0, authcomefrom: 0}
- })
- /*标准权限组设置管理员*/
- .state('authoritySetManger', {
- cache: false,
- url: '/authoritySetManger',
- templateUrl: 'modules/cloudAuthority/views/authoritySetManger.html',
- controller: 'authoritySetMangerCtrl',
- resolve: {
- authoritySetManger: function (LoadJsService) {
- return LoadJsService.loadSequence("authoritySetMangerCtrl");
- }
- },
- params: {identity: 0, adminlist: [], memberlist: []}
- })
- /*标准权限组转让所有权*/
- .state('authoritySetOwner', {
- cache: false,
- url: '/authoritySetOwner',
- templateUrl: 'modules/cloudAuthority/views/authoritySetOwner.html',
- controller: 'authoritySetOwnerCtrl',
- resolve: {
- authoritySetOwner: function (LoadJsService) {
- return LoadJsService.loadSequence("authoritySetOwnerCtrl");
- }
- },
- params: {identity: 0}
- })
- /*用户搜索*/
- .state('userSearch', {
- cache: false,
- url: '/userSearch',
- templateUrl: 'modules/cloudAuthority/views/userSearch.html',
- controller: 'userSearchCtrl',
- resolve: {
- userSearch: function (LoadJsService) {
- return LoadJsService.loadSequence("userSearchArgs");
- }
- },
- params: {searchtype: 0, isset: 0, authorityid: 0, authoritycomefrom: 0, modeltype: 0}
- })
- /*标准权限组成员列表*/
- .state('authorityAddSuperAdmin', {
- cache: false,
- url: '/authorityAddSuperAdmin',
- templateUrl: 'modules/cloudAuthority/views/authorityAddSuperAdmin.html',
- controller: 'authorityAddSuperAdminCtrl',
- resolve: {
- authorityAddSuperAdmin: function (LoadJsService) {
- return LoadJsService.loadSequence("authorityAddSuperAdminCtrl");
- }
- }
- })
- // 其他首页入口
- $urlRouterProvider.otherwise('/tab/activityIndex');
- //溧水网站
- // $urlRouterProvider.otherwise('/homepageOfNode');
- var datePickerObj = {
- inputDate: new Date(),
- titleLabel: '选择日期',
- setLabel: '确定',
- todayLabel: '今天',
- closeLabel: '关闭',
- mondayFirst: false,
- weeksList: ["日", "一", "二", "三", "四", "五", "六"],
- monthsList: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
- templateType: 'popup',
- from: new Date(1970, 1, 1),
- to: new Date(2050, 8, 1),
- showTodayButton: true,
- dateFormat: 'yyyy-MM-dd',
- closeOnSelect: false,
- disableWeekdays: []
- };
- ionicDatePickerProvider.configDatePicker(datePickerObj);
- }])
- .run(function($rootScope, $templateCache) {
- $rootScope.$on('$routeChangeStart', function(event, next, current) {
- if (typeof(current) !== 'undefined'){
- $templateCache.remove(current.templateUrl);
- }
- });
- });
|