发表于: 2020-02-15 22:41:16
1 1636
今天完成的事情:
1.推进任务
明天计划的事情:
1.推进任务
遇到的问题和收获:
1.
if (this.article.title !== ''
&& this.article.content !== ''
&& this.article.url !== ''
&& this.article.industry !== ''
&& this.article.type !== ''
&& this.file !== '') {
this.$http({
method: 'post',
url: '/api/a/u/article',
data: this.$qs.stringify(this.article),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).then(res => {
console.log(res);
if (res.data.code === 0) {
console.log(res);
this.$message.success('添加成功!');
// await this.$router.push({
this.$router.push({
path: '/home/admin'
})
this.article = {}
}
})
验证字符段是否为空,这样么
还有就是新增页面
第一次新增过后。再点击新增,原有的填写的信息会保存。编辑时是否还是进入此界面。新增时呢
评论