您的位置:首页 > 数据库 > MySQL

20180224.mysql数据库编码格式调整,微博发布功能完善

2018-03-15 11:18 507 查看

20180224.mysql数据库编码格式调整,微博发布功能完善

作者: chenhaoting 
时间: 2018-02-24 
分类: 科研项目日志 
评论
数据库无法保存中文格式的问题,需要通过数据库管理工具编辑连接方式,更改编码格式utf8。改完以后就可以保存中文内容了。
微博发布功能需要实时更新提示,所以需要添加methods:
send:function(){
if(sessionStorage.getItem('login_user')!=null&&this.context!=null){
this.$http.post('/api/UserManager/addEssay?user_name='+sessionStorage.getItem('login_user')+'&context='+this.context)
.then((response)=>{
this.context=null;
this.remnant=150;
this.hint="发送成功!!!如果需要再次发送,请在这里输入发表内容,限150字"
})
.catch(function(err){
console.log(err);
});

}else if(sessionStorage.getItem('login_user')==null){
this.isModalVisible = true;
}else if(this.context==null){
this.hint="发送失败,内容为空。如果需要再次发送,请在这里输入发表内容,限150字"
}
},
vue组件中html部分,需要增加一个data进行双向绑定,比较简单不贴代码了。
目前用户更改密码的BUG,和关注,粉丝显示的BUG,以及前端提交中文的BUG还没有修复。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: