Merge branch 'dev' of ssh://git.online.zzfzyc.com:10022/mp/EShop into 电子商城测试版v4

This commit is contained in:
czm 2022-07-06 16:00:46 +08:00
commit bbc485ee3f
2 changed files with 18 additions and 12 deletions

View File

@ -36,7 +36,7 @@ export default () => {
business_license_url: "",
legal_person: "",
legal_person_identity: "",
businessLicense: '',
business_license: '',
legal_person_identity_url: [],
name: ""
});
@ -47,6 +47,9 @@ export default () => {
name: [{
message: "请输入企业名称"
}],
business_license: [{
message: "请输入企业营业执照"
}],
business_license_url: [{
message: "请上传营业执照"
}],
@ -132,7 +135,7 @@ export default () => {
<SelectEnterpriseType ref={selectTypeRef} confirm={handleSelectTypeConfirm} />
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, name: ev.detail.value })} value={formData["name"]} label="企业名称" placeholder="请输入营业执照上的企业名称" required />
{/* <FromListCertification type="select" style={{border: "0"}}label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required showIcon={false}/> */}
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, businessLicense: ev.detail.value })} value={formData["businessLicense"]} style={{ border: "0" }} label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required />
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, business_license: ev.detail.value })} value={formData["business_license"]} style={{ border: "0" }} label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required />
<View onClick={() => handleUploadImage("business_license_url")} className="certification-upload">
{(formData as any)?.business_license_url ?
<>

View File

@ -18,11 +18,11 @@ export default () => {
a2: '',
b2: '',
})
const [colorList, setColorList] = useState({
one: null,
two: null
})
type ColorList = {
one?: any,
two?: any
}
const [colorList, setColorList] = useState<ColorList>()
const { state: colorState, measureAndGetLab } = useBluetooth()
const getLab = async (val) => {
@ -57,25 +57,28 @@ export default () => {
useEffect(() => {
if (colorState.deviceLab) {
if (colorList.one?.constructor === Object) {
const rgb = toRgb([colorList.one.L, colorList.one.a, colorList.one.b])
if ((colorList as any).one?.constructor === Object) {
const rgb = toRgb([(colorList as any).one.L, (colorList as any).one.a, (colorList as any).one.b])
setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
setTime(getNowTime())
setSearchField({ ...searchField, l1: rgb[0], a1: rgb[1], b1: rgb[2] })
}
if (colorList.two?.constructor === Object) {
const rgb = toRgb([colorList.two.L, colorList.two.a, colorList.two.b])
if ((colorList as any).two?.constructor === Object) {
const rgb = toRgb([(colorList as any).two.L, (colorList as any).two.a, (colorList as any).two.b])
setBlueToothColorTwo(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
setTimeTwo(getNowTime())
setSearchField({ ...searchField, l2: rgb[0], a2: rgb[1], b2: rgb[2] })
}
}
}, [colorList])
const reset = () => {
setColorList({})
setBlueToothColor('')
setBlueToothColorTwo('')
setTime('')
setTime('')
setTimeTwo('')
setData('')
setResult('')
}