Ext.define('saas.view.sys.feedback.FormPanelController', { extend: 'Ext.app.ViewController', alias: 'controller.sys-feedback-formpanel', init: function (form) { var me = this; this.control({ }); }, onSubmit:function(){ let form = this.getView(), values = form.getValues(), name = values.name, content = values.content, qq = values.qq, wechat = values.wechat, mobile = values.mobile; saas.util.BaseUtil.request({ url: '/api/operation/customerFeedBack/save', params: JSON.stringify({ cf_content: content, cf_name: name, cf_qq: qq, cf_wechat: wechat, cf_mobile: mobile }), method: 'POST' }).then(function(res) { saas.util.BaseUtil.showSuccessToast('提交成功!'); Ext.destroy(Ext.getCmp("feedbackWin")); }).catch(function(e) { saas.util.BaseUtil.showErrorToast('提交失败: ' + e.message); }); }, onClose:function(){ Ext.destroy(Ext.getCmp("feedbackWin")); } });