function initMessage() { $('.aliTable').editable({ // url: '/post' //this url will not be used for creating new user, it is // only for update }); $('#save-ali').click(function() { $('.aliTable').editable('submit', { url : 'smsController/updateSmsStrategy',// ajaxOptions : {// dataType : 'json' // assuming json response// }, success : function(data, config) { // if(data && data.id) { //record created, response like {"id": // 2} // //set pk // $(this).editable('option', 'pk', data.id); // //remove unsaved class // $(this).removeClass('editable-unsaved'); // //show messages // var msg = 'New user created! Now editables submit // individually.'; // // // $('#msg').addClass('alert-success').removeClass('alert-error').html(msg).show(); // // $('#save-btn').hide(); // $(this).off('save.newuser'); // } else if(data && data.errors){ // //server-side validation error, response like {"errors": // {"username": "username already exist"} } // config.error.call(this, data.errors); // } alert('1'); }, error : function(errors) { // var msg = ''; // if(errors && errors.responseText) { //ajax error, errors = // xhr object // msg = errors.responseText; // } else { //validation error (client-side or server-side) // $.each(errors, function(k, v) { msg += k+": "+v+""; }); // } // $('#msg').removeClass('alert-success').addClass('alert-error').html(msg).show(); alert(2); } }); });}
策略名称 | 阿里云通讯 |
全路径类 | com.thunisoft.avcp.. |
API URL | https://sms.aliyuncs.com/?Action=SingleSendSms |
AccessKeyId | LTAIO6EKs8J6jIMx |
模板ID | SMS_53200149 |
MapupdateSmsStrategy(@Valid HttpServletRequest request) { Map map = new HashMap (); String id = request.getParameter("AliStrategyName");