master
wangning 7 years ago
parent 2323459f31
commit 9b8b9639c0

@ -16,7 +16,7 @@ public class Message {
public String title; public String title;
@NotEmpty(message = "content can not be null") @NotEmpty(message = "content can not be null")
public String content; public String content;
public String client_type;
public JSONObject insertObject() { public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this); JSONObject res = (JSONObject) JSON.toJSON(this);
return res; return res;
@ -53,4 +53,12 @@ public class Message {
public void setContent(String content) { public void setContent(String content) {
this.content = content; this.content = content;
} }
public String getClient_type() {
return client_type;
}
public void setClient_type(String client_type) {
this.client_type = client_type;
}
} }

@ -216,7 +216,6 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
app.controller('devSendMessageCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) { app.controller('devSendMessageCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {
$scope.params = {type:'Merchant'}; $scope.params = {type:'Merchant'};
alert($scope.params.client_type);
$scope.sendMessage = function () { $scope.sendMessage = function () {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
$http.put('/dev/send_message',params).then(function (resp) { $http.put('/dev/send_message',params).then(function (resp) {

@ -34,8 +34,8 @@
<div class="form-group" ng-if="params.type=='Personal'"> <div class="form-group" ng-if="params.type=='Personal'">
<label>Client Type</label> <label>Client Type</label>
<select ng-model="params.client_type"> <select ng-model="params.client_type">
<option value="iphone"></option> <option value="iphone">iphone</option>
<option value="android"></option> <option value="android">android</option>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save