@x-edu/bcs-components
v0.0.33
Published
```jsx const uc = new UC({ ... }) export default function Demo() { const [userInfo, setUserInfo] = useState(null)
Downloads
18
Keywords
Readme
x-edu/bcs-components
VerifyCodePhone 查看完整手机号
const uc = new UC({
...
})
export default function Demo() {
const [userInfo, setUserInfo] = useState(null)
useEffect(() => {
async function init() {
try {
await uc.login({
...
})
const info = await uc.getInfo() // 伪代码
setUserInfo(info)
} catch (error) {
console.log(error)
}
}
init()
}, [])
if (!userInfo) {
return null
}
return (
<VerifyCodePhone
uc={uc}
userInfo={userInfo}
value={{
phoneNumber: '18766666',
userId: '260182595340',
needtickets: false, //needtickets 是否只查询tickets
tickets: ''
}}
one={one} // 物料one信息
onChange={() => {
/** 修改value */
}}
/>
)
}
SelectUserInput 人员选择
const uc = new UC({
...
})
export default function Demo() {
const [userInfo, setUserInfo] = useState(null)
useEffect(() => {
async function init() {
try {
await uc.login({
...
})
const info = await uc.getInfo() // 伪代码
setUserInfo(info)
} catch (error) {
console.log(error)
}
}
init()
}, [])
if (!userInfo) {
return null
}
return (
<SelectUserInput
uc={uc}
userInfo={userInfo}
value={{
manageUserId: 260182595340,
manageUserMobile: '18*******66',
manageUserName: '用户5056'
}}
one={one} // 物料one信息
onChange={() => {
/** 修改value */
}}
/>
)
}
SelectSchool 选择责任校
const uc = new UC({
...
})
export default function Demo() {
const [userInfo, setUserInfo] = useState(null)
useEffect(() => {
async function init() {
try {
await uc.login({
...
})
const info = await uc.getInfo() // 伪代码
setUserInfo(info)
} catch (error) {
console.log(error)
}
}
init()
}, [])
if (!userInfo) {
return null
}
return (
<SelectSchool
uc={uc}
userInfo={userInfo}
value="c3e9b431-51b6-43cc-85a6-fab0012c6428"
one={one} // 物料one信息
onChange={() => {
/** 修改value */
}}
/>
)
}