|
@@ -41,16 +41,21 @@ angular.module('appMessage').controller('SmsController', ['$scope', '$state', '$
|
|
|
console.log(sendmsg);
|
|
|
console.log(keycode);
|
|
|
console.log($scope.inputMob);
|
|
|
+ if (msg.length !== 0)
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "已输入" + msg.length * 2 + "个字符,本次将产生" + (Math.floor(msg.length / 70) + 1) + "条短信";
|
|
|
+ else if (msg.length == 0)
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "每条短信上限140字符(70个汉字)";
|
|
|
if ($scope.inputMob) {
|
|
|
if (!$scope.checkId)
|
|
|
for (var i = 0; i < $scope.inputMob.length; i++) {
|
|
|
var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-ok"></span></p>' +
|
|
|
'<div class = "well m-l-xs m-t-xs fit-content" >' +
|
|
|
- '<span class = "text-message">' + msg + '</span> </div></div></div>';
|
|
|
+ '<span class = "text-message">' + msg + '  --丽水市人民政府办公室</span> </div></div></div>';
|
|
|
if (msg.length !== 0 && $scope.activeData == '按Enter键发送消息') {
|
|
|
if (!e.ctrlKey && e.which == 13) {
|
|
|
mediamsg.append(html);
|
|
|
sendmsg[0].textContent = "";
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "每条短信上限140字符(70个汉字)";
|
|
|
} else if (e.ctrlKey && e.which == 13) {
|
|
|
sendmsg.append('<br>');
|
|
|
e.keyCode = 13;
|
|
@@ -64,13 +69,14 @@ angular.module('appMessage').controller('SmsController', ['$scope', '$state', '$
|
|
|
}
|
|
|
else if ($scope.checkId && ts2 > ts1)
|
|
|
for (var i = 0; i < $scope.inputMob.length; i++) {
|
|
|
- var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-time"><span>(定时于' + $scope.selectDate + '发送)</span></span></p>' +
|
|
|
+ var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-time"><span>( 定时于' + $scope.selectDate + '发送 )</span></span></p>' +
|
|
|
'<div class = "well m-l-xs m-t-xs fit-content" >' +
|
|
|
- '<span class = "text-message">' + msg + '</span> </div></div></div>';
|
|
|
+ '<span class = "text-message">' + msg + '  --丽水市人民政府办公室</span> </div></div></div>';
|
|
|
if (msg.length !== 0 && $scope.activeData == '按Enter键发送消息') {
|
|
|
if (!e.ctrlKey && e.which == 13) {
|
|
|
mediamsg.append(html);
|
|
|
sendmsg[0].textContent = "";
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "每条短信上限140字符(70个汉字)";
|
|
|
} else if (e.ctrlKey && e.which == 13) {
|
|
|
sendmsg.append('<br>');
|
|
|
e.keyCode = 13;
|
|
@@ -101,20 +107,22 @@ angular.module('appMessage').controller('SmsController', ['$scope', '$state', '$
|
|
|
for (var i = 0; i < $scope.inputMob.length; i++) {
|
|
|
var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-ok"></span></p>' +
|
|
|
'<div class = "well m-l-xs m-t-xs fit-content" >' +
|
|
|
- '<span class = "text-message">' + msg + '</span> </div></div></div>';
|
|
|
+ '<span class = "text-message">' + msg + '  --丽水市人民政府办公室</span> </div></div></div>';
|
|
|
if (msg.length !== 0) {
|
|
|
mediamsg.append(html);
|
|
|
sendmsg[0].textContent = "";
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "每条短信上限140字符(70个汉字)";
|
|
|
}
|
|
|
}
|
|
|
else if ($scope.checkId && ts2 > ts1)
|
|
|
for (var i = 0; i < $scope.inputMob.length; i++) {
|
|
|
- var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-time"><span>(定时于' + $scope.selectDate + '发送)</span></span></p>' +
|
|
|
+ var html = '<div class="feed-element"><div class="media-body "><p><span class="glyphicon glyphicon-menu-right"><span>' + $scope.inputMob[i] + '</span>' + dateTime + '</span><span class="glyphicon glyphicon-time"><span>( 定时于' + $scope.selectDate + '发送 )</span></span></p>' +
|
|
|
'<div class = "well m-l-xs m-t-xs fit-content" >' +
|
|
|
- '<span class = "text-message">' + msg + '</span> </div></div></div>';
|
|
|
+ '<span class = "text-message">' + msg + '  --丽水市人民政府办公室</span> </div></div></div>';
|
|
|
if (msg.length !== 0) {
|
|
|
mediamsg.append(html);
|
|
|
sendmsg[0].textContent = "";
|
|
|
+ sendmsg[0].nextElementSibling.firstElementChild.textContent = "每条短信上限140字符(70个汉字)";
|
|
|
}
|
|
|
}
|
|
|
};
|