admin_send_sms.js 659 B

1234567891011121314151617181920
  1. app.controller('AdminSendSMSCtrl', function($rootScope, $scope, $http, $timeout, $state, myConfig, toaster, $q, $stateParams) {
  2. $scope.entity = {message: '测试'
  3. , mobiles: '13297965461'};
  4. $scope.test = {
  5. message1: "【考生服务平台】验证码******,北外招办。"
  6. };
  7. $scope.batchSendSMS = function(){
  8. $scope.myPromise = $http({
  9. url : myConfig.admin + '/sms/batchSend?session=' + $rootScope.session,
  10. method : 'POST',
  11. data : angular.toJson($scope.entity)
  12. }).success(function(data) {
  13. toaster.pop('success', '发送成功');
  14. }).error(function() {
  15. toaster.pop('error', '操作失败');
  16. });
  17. }
  18. });