具体案例如下
$.ajax({ url: context.state.IpccSendIm, method: 'POST', data: JSON.stringify(val), headers:{'Content-Type':'application/json;charset=utf8'}, dataType:"json", success: function (data) { console.log(data); imStore.addChatMsgDemo({ msg: { role: 'sys', contentType: 'text', content: '-----会话结束-----', showTime: true } }); } });