This commit is contained in:
weiwei committed 2025-03-11 11:15:40 +08:00
1 parent 90dad64217
commit e9bedb0960
1 file changed
+5 -4
+5 -4
View File
@@ -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)