Commit e9f485d8 authored by lixiaofang's avatar lixiaofang

add

parent 1caa6669
...@@ -80,8 +80,8 @@ def principal_online_comment1(): ...@@ -80,8 +80,8 @@ def principal_online_comment1():
# 判断是不是编辑标签 # 判断是不是编辑标签
edit_judge = get_pictorial_tag_by_id(i[0]) edit_judge = get_pictorial_tag_by_id(i[0])
if edit_judge: if edit_judge:
rand_tag_id = random.randint(0, len(edit_judge) - 1) # rand_tag_id = random.randint(0, len(edit_judge) - 1)
comment = get_pictorial_comment() comment = judge_pictorial_info_get_comment(edit_judge)
else: else:
comment = get_pictorial_comment() comment = get_pictorial_comment()
if cook is not None: if cook is not None:
......
...@@ -591,11 +591,11 @@ def judge_topic_info_get_comment(topic_id): ...@@ -591,11 +591,11 @@ def judge_topic_info_get_comment(topic_id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
return None return None
def judge_pictorial_info_get_comment(topic_id): def judge_pictorial_info_get_comment(pictorial_id):
try: try:
comment = "" comment = ""
# 先判断是不是编辑标签 # 先判断是不是编辑标签
edit_tag_list = get_pictorial_tag_by_id(topic_id) edit_tag_list = get_pictorial_tag_by_id(pictorial_id)
if len(edit_tag_list) > 0: if len(edit_tag_list) > 0:
# 如果有编辑标签 # 如果有编辑标签
# 去拿他的所属分类 根据分类去拿对应的标签(随机拿一个) # 去拿他的所属分类 根据分类去拿对应的标签(随机拿一个)
......
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