diff --git a/es/components/mobile/upsert/index.xml b/es/components/mobile/upsert/index.xml index 5ed8ea9aa..f482587f6 100644 --- a/es/components/mobile/upsert/index.xml +++ b/es/components/mobile/upsert/index.xml @@ -63,38 +63,40 @@ - - - - {{t('common::action.add')}}{{t('mobile:name')}} - - - - - {{t('common::action.confirm')}} - - - - - - - \ No newline at end of file + + + + + {{t('common::action.add')}}{{t('mobile:name')}} + + + + + {{t('common::action.confirm')}} + + + + + + + + \ No newline at end of file diff --git a/es/components/user/info/index.js b/es/components/user/info/index.js index ad0314134..c26a3f0cd 100644 --- a/es/components/user/info/index.js +++ b/es/components/user/info/index.js @@ -93,7 +93,18 @@ export default OakComponent({ }); const avatar = extraFiles?.[0]; const avatarUrl = features.extraFile.getUrl(avatar); + const mobiles = user && this.select('mobile', { + data: { + id: 1, + mobile: 1, + userId: 1, + }, + filter: { + userId: user.id, + }, + }); const { mobile } = (user?.mobile$user && user?.mobile$user[0]) || + mobiles?.[0] || (user?.user$ref && user?.user$ref[0] && user?.user$ref[0].mobile$user && diff --git a/src/components/mobile/upsert/index.xml b/src/components/mobile/upsert/index.xml index 5ed8ea9aa..f482587f6 100644 --- a/src/components/mobile/upsert/index.xml +++ b/src/components/mobile/upsert/index.xml @@ -63,38 +63,40 @@ - - - - {{t('common::action.add')}}{{t('mobile:name')}} - - - - - {{t('common::action.confirm')}} - - - - - - - \ No newline at end of file + + + + + {{t('common::action.add')}}{{t('mobile:name')}} + + + + + {{t('common::action.confirm')}} + + + + + + + + \ No newline at end of file diff --git a/src/components/user/info/index.ts b/src/components/user/info/index.ts index 427018c95..c423031d8 100644 --- a/src/components/user/info/index.ts +++ b/src/components/user/info/index.ts @@ -95,8 +95,20 @@ export default OakComponent({ }); const avatar = extraFiles?.[0]; const avatarUrl = features.extraFile.getUrl(avatar); + const mobiles = user && this.select('mobile', { + data: { + id: 1, + mobile: 1, + userId: 1, + }, + filter: { + userId: user.id, + }, + }); + const { mobile } = (user?.mobile$user && user?.mobile$user[0]) || + mobiles?.[0] || (user?.user$ref && user?.user$ref[0] && user?.user$ref[0].mobile$user &&