.
This commit is contained in:
+13
-6
@@ -8,7 +8,12 @@
|
||||
:navbarStyle="template.navigationBar"
|
||||
onShareAppMessage
|
||||
>
|
||||
<userAvatarCard :userFormData="userFormData" />
|
||||
<userAvatarCard
|
||||
:userFormData="userFormData"
|
||||
:userFaceInfo="userFaceInfo"
|
||||
:detectionTime="detectionTime"
|
||||
v-if="userFaceInfo"
|
||||
/>
|
||||
|
||||
<s-block
|
||||
v-for="(item, index) in template.components"
|
||||
@@ -76,19 +81,21 @@
|
||||
async function getPersonalInfo() {
|
||||
const { data } = await UserApi.getInfoByUser();
|
||||
try {
|
||||
const { dataJson } = data;
|
||||
userFormData.value = dataJson ? JSON.parse(dataJson) : {};
|
||||
userFormData.value = data?.dataJson ? JSON.parse(data?.dataJson) : {};
|
||||
} catch (err) {
|
||||
userFormData.value = {};
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
const userFaceInfo = ref();
|
||||
const detectionTime = ref('');
|
||||
async function getFaceInfo() {
|
||||
await UserApi.getFaceInfo({ dataScope: '0' });
|
||||
const { result } = await UserApi.getFaceInfo({ dataScope: '0' });
|
||||
try {
|
||||
// const { dataJson } = data;
|
||||
// userFormData.value = dataJson ? JSON.parse(dataJson) : {};
|
||||
const dataObj = result?.length ? JSON.parse(result[0].thridResp) : null;
|
||||
userFaceInfo.value = dataObj?.data?.face_figure || null;
|
||||
detectionTime.value = result[0]?.time || '';
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user