Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuankai committed Mar 14, 2022
1 parent 62a2d57 commit c8f507c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/authorizedAccountManage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function AuthorizedAccountManage() {
<PopConfirm content="从数据库获取 token,非重新生成token,不会导致上一个 token 被刷新而失效" onConfirm={() => createToken(row.appid)}>
<a className="a" style={{ margin: '0 10px' }}>获取token</a>
</PopConfirm>
<a className="a" onClick={() => copyMessage(row.refreshToken)}>复制refresh_toke</a>
<a className="a" onClick={() => copyMessage(row.refreshToken)}>复制refresh_token</a>
</div>
);
},
Expand Down
17 changes: 6 additions & 11 deletions client/src/pages/forwardMessage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ export default function ForwardMessage() {
id: testRuleId,
}
}, () => null)
if (resp.code !== 0 && resp.code !== 1010) {
MessagePlugin.error('系统错误,请稍后重试')
return
}
setTestResp(resp as {
code: number
errorMsg: string
Expand Down Expand Up @@ -455,10 +459,7 @@ export default function ForwardMessage() {
<Input clearable={true} placeholder="请输入MsgType,例如Event、Text" />
</FormItem>
<FormItem name="event" label="Event"
rules={[
{required: true, message: 'Event必填', type: 'error'},
]}
help="按文档填写,区分大小写"
help="当MsgType为Event时必填,按文档填写,区分大小写"
>
<Input clearable={true} placeholder="请输入Event,例如wxa_nickname_audit" />
</FormItem>
Expand Down Expand Up @@ -513,13 +514,7 @@ export default function ForwardMessage() {
&&
<div>
<p>接口返回值:</p>
<pre>
{`{`}<br />
code: {testResp.code}<br />
msg: {testResp.errorMsg}<br />
data: <p style={{ whiteSpace: 'pre-wrap' }}>{testResp.data}</p><br />
{`}`}
</pre>
<p style={{ whiteSpace: 'pre-wrap', margin: 0, padding: '20px', backgroundColor: 'rgba(0,0,0,0.1)' }}>{testResp.data}</p>
</div>
}
</Drawer>
Expand Down

0 comments on commit c8f507c

Please sign in to comment.