Commit 98774e8a authored by 李小芳's avatar 李小芳

show_by_index

parent 79934903
......@@ -99,7 +99,6 @@ def get_answers(pks):
item['operators_add_tags'] = get_tag_v3_operators_tags(content_id=answer.id, content_type="answer")
item['anecdote_tags'] = get_tag_v3_anecdote_tags(content_id=answer.id, content_type="answer")
item['anecdote_tag_ids'] = get_tag_v3_anecdote_tag_ids(content_id=answer.id, content_type="answer")
item['show_by_index'] = answer.get_answer_show_by_index(answer.id)
(need_refresh_data, second_demands_list, second_solutions_list, second_positions_list,
second_demands_ids_list,
......@@ -237,6 +236,27 @@ def get_answers(pks):
if 3315 in item['operators_add_tags']:
item['new_smr'] = answer.get_answer_newuser_smr(answer_id=answer.id)
tractate_all_tag_names = []
filter_tags_names = ["假体隆胸", "自体脂肪隆胸", "胶原蛋白填充隆胸", "玻尿酸填充隆胸", "胸部假体取出",
"胸部失败修复", "胸部下垂矫正", "胸部修复", "胸形美化", "丰胸(隆胸)", "胸部塑身", "玻尿酸隆胸", "假体隆胸", "胶原蛋白隆胸",
"埋线隆胸", "自体脂肪隆胸", "胸部注射物取出", "胸部假体取出", "胸部假体取出", "胸部修复", "脂肪胶隆胸", "胸部整形", "隆胸", "胸部美化",
"缩胸", "胸部提升", "生胸毛", "胸部护理", "综合隆胸", "植胸毛", "胸部修复", "隆胸修复", "胸部护理", "硅胶隆胸", "胸部护理",
"胸部修复", "胸部手术", "胸部提升", "生胸毛", "美胸", "胸毛", "胸部", "胸形", "胸部假体", "胸部kyc"]
operators_add_tags_names = list()
operators_add_tags_names = get_tag_v3_names_by_tag_v3_ids(item['operators_add_tags'])
tractate_all_tag_names.extend(
item["tractate_tag_name"] + + item["tags_v3"] + item["first_demands"] + item["second_demands"] + item[
"first_solutions"] + item[
"second_solutions"] + item["positions"] + item["second_positions"]
+ item['tag_name'] + item['fresh_tag_name'] + item["operators_add_tags"] + item["anecdote_tags"] + item[
"portrait_tag_name"] + item['gossip_tags'] + operators_add_tags_names)
tags_inter = list(set(tractate_all_tag_names).intersection(set(filter_tags_names)))
if tags_inter:
item['show_by_index'] = 2 # 2 标签中含有过滤列表中的标签
else:
item['show_by_index'] = answer.get_answer_show_by_index(answer.id)
data.append(item)
except (Answer.DoesNotExist, Question.DoesNotExist):
pass
......
......@@ -203,7 +203,11 @@ def get_tractate(pks):
# item["is_need_guarantee"] = False
# 过滤标签
filter_tags_names = ["斩男心机妆", "今日look打卡", "少女心未泯", "颜值高光时刻", "美妆", "Get漫画迷人眼", "最显白口红推荐", "口红试色", "穿搭技巧",
"眼妆教程", "腮红", "氧气笑容练成记", "口红试色"]
"眼妆教程", "腮红", "氧气笑容练成记", "口红试色", "假体隆胸", "自体脂肪隆胸", "胶原蛋白填充隆胸", "玻尿酸填充隆胸", "胸部假体取出",
"胸部失败修复", "胸部下垂矫正", "胸部修复", "胸形美化", "丰胸(隆胸)", "胸部塑身", "玻尿酸隆胸", "假体隆胸", "胶原蛋白隆胸",
"埋线隆胸", "自体脂肪隆胸", "胸部注射物取出", "胸部假体取出", "胸部假体取出", "胸部修复", "脂肪胶隆胸", "胸部整形", "隆胸", "胸部美化",
"缩胸", "胸部提升", "生胸毛", "胸部护理", "综合隆胸", "植胸毛", "胸部修复", "隆胸修复", "胸部护理", "硅胶隆胸", "胸部护理",
"胸部修复", "胸部手术", "胸部提升", "生胸毛", "美胸", "胸毛", "胸部", "胸形", "胸部假体", "胸部kyc"]
operators_add_tags_names = list()
operators_add_tags_names = get_tag_v3_names_by_tag_v3_ids(item['operators_add_tags'])
tractate_all_tag_names.extend(
......@@ -219,6 +223,7 @@ def get_tractate(pks):
item['show_by_index'] = 2 # 2 标签中含有过滤列表中的标签
else:
item['show_by_index'] = tractate.get_show_by_index(tractate.id)
item["has_video"] = TractateService.has_video(tractate.id)
item["is_gif"] = tractate.cover_is_dynamic # 是否是动图
# 判断是否有八卦标签
......
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