oak-general-business/es/components/passport/wechatPublicForWeb/index.js

28 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from "react";
import { Switch, Form, Tag, Input } from 'antd';
import Styles from './web.module.less';
export default function wechatPublicForWeb(props) {
const { passport, appIdStr, t, changeEnabled, updateConfig } = props;
const { id, type, enabled, stateColor } = passport;
const config = passport.config || {};
return (<div className={Styles.item}>
<div className={Styles.title}>
<Tag color={stateColor}>{t(`passport:v.type.${type}`)}</Tag>
{/* <Tooltip title={(publicAppIds && publicAppIds.length > 0) ? '' : '如需启用公众号授权登录请先前往应用管理创建是服务号的公众号application,并完成基础配置'}> */}
<Switch
// disabled={!(publicAppIds && publicAppIds.length > 0)}
checkedChildren="开启" unCheckedChildren="关闭" checked={enabled} onChange={(checked) => {
changeEnabled(checked);
}}/>
{/* </Tooltip> */}
</div>
<Form labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} style={{ maxWidth: 900, marginTop: 16 }}>
<Form.Item label="appId">
<Input value={appIdStr} disabled={true}/>
</Form.Item>
</Form>
</div>);
}