UNPKG

unserver-unify

Version:

33 lines (29 loc) 935 B
'use strict'; angular.module('bamboo') .controller('SendSMSDlgCtrl', function($scope, sendTo, ApiService, CommonService, $translate) { var self = this; this.newmessage=""; this.sendTo = sendTo; console.log(sendTo); this.sendmessage=function(){ var info={ action:"sendsms", mobile:self.sendTo, message:self.newmessage, } ApiService.post('/messages' ,info).then(function(result) { console.log(result); if (result.data.success) { CommonService.showNoBlockInfo($translate.instant('Send Successful!')); $scope.$close(); } }); /* var sendurl="http://gthome.asuscomm.com:2080/index.php?md=smsapi&num="+self.sendTo+"&msg="+self.newmessage+"&pass=Notify" console.log(sendurl); ApiService.extGet(sendurl).then(function(result) { console.log(result); $scope.$close(); }); $scope.$close();*/ } });