Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[jx-wiki]select by tips status #261

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/plugins/jx3/wiki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ async def jx3_wiki(state: T_State, event: GroupMessageEvent, args: Message = Com


@jx3_cmd_wiki.got('reference')
async def jx3_next_ques(state: T_State, event: GroupMessageEvent, reference: Message = CommandArg()):
async def jx3_next_ques(state: T_State, event: GroupMessageEvent, reference: Message = Arg()):
'''
提交相关项查询
'''
template = [Jx3Arg(Jx3ArgsType.default)]
[arg_reference] = get_args(
reference.extract_plain_text(), template_args=template)
logger.debug(f'next_ques:{arg_reference}')
if not arg_reference:
return
arg_cmd = arg_reference[0:2].lower()
logger.debug(f'next_ques cmd:{arg_cmd}')
result = state.get('result')
arg_index = get_number(arg_reference[2:])
if arg_cmd == 'xg' or arg_cmd == '相关': # 相关问题
Expand All @@ -41,4 +43,5 @@ async def jx3_next_ques(state: T_State, event: GroupMessageEvent, reference: Mes
arg_keyword = result.question.relateds[arg_index]
else:
return
logger.debug(f'next_ques ({arg_index}) cmd:{arg_keyword}')
return await jx3_wiki(state, event, obMessage(arg_keyword))
2 changes: 1 addition & 1 deletion src/views/jx3/wiki/question.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>
<div>
<span style="color:#999">查看相关问:</span>
<span>XG0/YY0(还没做)</span>
<span>XG0/YY2(表示选 相关0/引用2 的相关项)</span>
</div>
</div>
</el-col>
Expand Down