Commit d7efad0c authored by Davve's avatar Davve

细节问题

parent 20d3df11
......@@ -60,9 +60,7 @@ class TagUpdateOrCreateView(APIView):
'up_tags': up_tags,
}
try:
self.rpc['venus/sun/tag/edit'](id=id, data=data).unwrap()
data = self.rpc['venus/sun/tag/edit'](id=id, data=data).unwrap()
except Exception as e:
raise e
return {
'message': '操作成功'
}
\ No newline at end of file
return data
\ No newline at end of file
......@@ -180,7 +180,6 @@
this.loading = false;
return false;
}
console.log(typeof response.data.data.code)
this.$notify({
title: '成功',
message: response.data.data.message,
......
......@@ -143,15 +143,15 @@
</div>
<div style="margin-bottom:50px;">
<div class="filter-container">
<el-select v-model="celebrity_id" :remote-method="getRemoteCelebrityList" filterable remote clearable
value-key="id"
placeholder="添加明星" style="width: 220px">
<el-option v-for="(item,index) in celebrityListOptions" :key="item+index"
:label="item" :value="item"/>
</el-select>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加
</el-button>
<!--<el-select v-model="celebrity_id" :remote-method="getRemoteCelebrityList" filterable remote clearable-->
<!--value-key="id"-->
<!--placeholder="添加明星" style="width: 220px">-->
<!--<el-option v-for="(item,index) in celebrityListOptions" :key="item+index"-->
<!--:label="item" :value="item"/>-->
<!--</el-select>-->
<!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加-->
<!--</el-button>-->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除
</el-button>
</div>
......@@ -215,15 +215,15 @@
</div>
<div style="margin-bottom:50px;">
<div class="filter-container">
<el-select v-model="topic_id" :remote-method="getRemoteTopicList" filterable remote clearable
value-key="id"
placeholder="添加帖子" style="width: 220px">
<el-option v-for="(item, index) in topicListOptions" :key="item+index"
:label="item" :value="item"/>
</el-select>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加
</el-button>
<!--<el-select v-model="topic_id" :remote-method="getRemoteTopicList" filterable remote clearable-->
<!--value-key="id"-->
<!--placeholder="添加帖子" style="width: 220px">-->
<!--<el-option v-for="(item, index) in topicListOptions" :key="item+index"-->
<!--:label="item" :value="item"/>-->
<!--</el-select>-->
<!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加-->
<!--</el-button>-->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除
</el-button>
</div>
......
......@@ -131,6 +131,7 @@
},
data() {
const validateRequire = (rule, value, callback) => {
value = value.trim()
if (value === '') {
this.$message({
message: rule.field + '为必传项',
......@@ -209,6 +210,17 @@
this.postForm.up_tags = JSON.stringify(this.up_tags)
this.postForm.down_tags = JSON.stringify(this.down_tags);
CreateTag(this.postForm).then(response => {
console.log()
if (response.data.data.code == 500) {
this.$notify({
title: '失败',
message: response.data.data.message,
type: 'error',
duration: 2000
})
this.loading = false
return false
}
this.$notify({
title: '成功',
message: response.data.data.message,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment