`
This commit is contained in:
1 parent
90dad64217
commit
e9bedb0960
1 file changed
+5
-4
@@ -197,13 +197,14 @@ const getmerchantInfoData = async (id: string) => {
|
||||
try {
|
||||
const res = await getObj(id)
|
||||
if (res.code === 0) {
|
||||
const resJobTime = res.data.jobTime ? res.data.jobTime.split(",") : []
|
||||
const regex = /^.*?,.*?,.*?$/
|
||||
const resJobTime = res.data.jobTime && regex.test(res.data.jobTime) ? res.data.jobTime.split(",") : []
|
||||
Object.assign(form, res.data, {
|
||||
merchantType: res.data.types,
|
||||
})
|
||||
jobTime.morning = resJobTime[0]?.split("-")
|
||||
jobTime.noon = resJobTime[1]?.split("-")
|
||||
jobTime.evening = resJobTime[2]?.split("-")
|
||||
jobTime.morning = resJobTime[0]?.split("-") ?? []
|
||||
jobTime.noon = resJobTime[1]?.split("-") ?? []
|
||||
jobTime.evening = resJobTime[2]?.split("-") ?? []
|
||||
}
|
||||
} catch (error: any) {
|
||||
useMessage().error(error.msg)
|
||||
|
||||
Reference in new issue
Block a user