Commit 7972f2e6 authored by Davve's avatar Davve

增加标签类型过滤和标签图片

parent a67122a3
......@@ -63,6 +63,7 @@ class TagUpdateOrCreateView(APIView):
'down_tags': down_tags,
'up_tags': up_tags,
'tagtypes': tagtypes,
'icon_url': request.POST.get('icon_url', '')[:-2]
}
try:
data = self.rpc['venus/sun/tag/edit'](id=id, data=data).unwrap()
......
var api = require('./api')
//
// const target = 'http://doctor.test.env'
const target = 'http://172.30.8.231:8000'
const target = 'http://172.30.8.131:8000'
// const target = 'http://192.168.1.9:8000'
// 可以修改请求内容
......
......@@ -88,6 +88,13 @@
placeholder="请输入内容"/>
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span>
</el-form-item>
<div style="margin-bottom: 20px">
<el-form-item style="margin-bottom: 40px;" label-width="75px" label="帖子图片:" prop="icon_url">
<span v-model="uploadType"></span>
<Upload v-model="postForm.icon_url" :uploadType="uploadType"/>
</el-form-item>
</div>
</div>
</el-form>
......@@ -95,6 +102,7 @@
</template>
<script>
import Upload from '@/components/Upload/singleImage3'
import MDinput from '@/components/MDinput'
import Sticky from '@/components/Sticky' // 粘性header组件
import {fetchTagDetail, CreateTag} from '@/api/tag'
......@@ -109,11 +117,12 @@
up_tags: [],
down_tags: [],
tagtypes: [],
icon_url: '',
}
export default {
name: 'TagDetail',
components: {MDinput, Sticky},
components: {MDinput, Sticky, Upload},
props: {
isEdit: {
type: Boolean,
......@@ -141,6 +150,7 @@
up_tags: [],
down_tags: [],
tagtypes: [],
uploadType: 25,
rules: {
name: [{validator: validateRequire, trigger: 'blur'}],
},
......
......@@ -86,6 +86,7 @@ export default {
SearchTypeOptions:[
{'key': 'id', 'display_name': 'ID'},
{'key': 'name', 'display_name': '标签名称'},
{'key': 'tagtype_name', 'display_name': '标签类型'},
]
}
},
......
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