angular.module('push') .factory('resourceLibraryModel', function () { // 控制是否刷新页面:false不刷新 true刷新 var flag = true; // 权限 var authority = {}; // 选择的群组列表 var grouplist = []; // 选择的成员列表 var userlist = []; // 设置群组时选择的成员列表 var tempuserlist = []; // 群组信息 var groupDetail= {}; // 群组下的列表信息 var mailDatas= {}; return { getFlag: function () { return flag; }, setFlag: function (temp) { flag = temp; }, getAuthority: function () { return authority; }, setAuthority: function (tempobj) { authority = tempobj; }, getGroupList: function () { return grouplist; }, setGroupList: function (templist) { grouplist = templist; }, getUserList: function () { return userlist; }, setUserList: function (templist) { userlist = templist; }, getTempUserList: function () { return tempuserlist; }, setTempUserList: function (templist) { tempuserlist = templist; }, getGroupDetail: function () { return groupDetail; }, setGroupDetail: function (tempobj) { groupDetail = tempobj; }, getMailDatas: function () { return mailDatas; }, setMailDatas: function (tempobj) { mailDatas = tempobj; }, resetResourceLibraryData: function () { // 控制是否刷新页面 flag = true; grouplist = []; userlist = []; // 群组信息 groupDetail= {}; // 群组下的列表信息 mailDatas= {}; } }; });