feat: fix

This commit is contained in:
kenny
2025-10-17 19:09:24 +08:00
parent bd280864af
commit 5297bd4d70
4 changed files with 107 additions and 145 deletions
+56 -27
View File
@@ -29,14 +29,23 @@
2type字段还未给
-->
<genetic-style
<!-- <genetic-style
:gender="collect?.sex"
:pic-list="[
collect?.eye_img_url ?? '',
collect?.triangular_area_img_url ?? '',
collect?.full_face_img_url ?? '',
]"
:styleType="collect?.基因风格"
:styleType="collect?.type"
/> -->
<genetic-style
:gender="collect?.sex"
:pic-list="[
collect?.firstImageUrl ?? '',
collect?.secondImageUrl ?? '',
collect?.thirdImageUrl ?? '',
]"
:styleType="collect?.type"
/>
<!-- 肤色-->
@@ -166,7 +175,7 @@
</view>
<!-- 搭配趋势 -->
<CustomSwiper :items="items" />
<!-- <CustomSwiper :items="items" /> -->
<view class="padding-top20">{{ colorTypeInfo.typeName }}人穿衣搭配全方案</view>
<view class="padding-top20">
<rich-text :nodes="colorTypeText.scheme"></rich-text>
@@ -196,11 +205,17 @@
</view>
<view class="rich-text-content">
<rich-text :nodes="praiseTextList[0]"></rich-text>
<view
<!-- <view
class="face-img-box"
:style="{
height: userFaceInfo?.gender === '男' ? '150px' : '328px',
}"
> -->
<view
class="face-img-box"
:style="{
height: collect?.gender === '男' ? '150px' : '328px',
}"
>
<img style="object-fit: cover" :src="faceImgUrl" alt="" srcset="" />
</view>
@@ -348,7 +363,7 @@
import StyleDiagnosticReport from './component/FirstStyleType/StyleDiagnosticReport.vue';
import BodyType from './component/FirstStyleType/BodyType.vue';
import FacialColorLatitude from './component/FirstStyleType/FacialColorLatitude.vue';
import CustomSwiper from './component/CustomSwiper/CustomSwiper';
// import CustomSwiper from './component/CustomSwiper/CustomSwiper';
import SensoryTypes from './component/FirstStyleType/SensoryTypes.vue';
import TypeOfMass from './component/FirstStyleType/TypeOfMass.vue';
import Movementtype from './component/FirstStyleType/Movementtype.vue';
@@ -378,6 +393,7 @@
getUserInfo,
getUserAvatar,
sendMail,
getImage
} = ReportApi;
const collect = ref(null);
@@ -386,14 +402,18 @@
uni.setStorageSync('token', options?.token ?? '92d2805a85ca422e90dd7d50eef49a85');
console.log('🚀 ~ URL上的token ~ options?.token: ', options?.token);
Promise.all([getUserInfo(), getAiFaceResult(), getUserAvatar()]).then((result) => {
const [res1, res2, res3] = result;
console.log('res3: zzzzzzzzzzzzz', res3.data);
Promise.all([getUserInfo(), getAiFaceResult(), getUserAvatar(), getImage()]).then((result) => {
const [res1, res2, res3, res4] = result;
console.log('res4: zzzzzzzzzzzzz', res4.data.list);
const [{firstImageUrl, secondImageUrl, thirdImageUrl}] =res4.data.list
const { data } = JSON.parse(res2.result[0].thridResp);
const target = Object.assign({}, JSON.parse(res1.data.dataJson), data.face_figure, {
avatar_img_url: res3.data.avatar,
firstImageUrl,
secondImageUrl,
thirdImageUrl
});
target.gender = target.sex;
@@ -633,8 +653,11 @@
params.text = styleText(customKey);
}
console.log('lllllllllllllllllllllll')
praiseTextApi(params).then((res) => {
console.log('res: vvvvvvvvvvvvvvvvvvvv', res);
console.log('res: vvvvvvvvvvvvvvvvvvvv-----------oooooooooooo', res);
// tabType
if (callWord === 'one') {
// console.log("数据是什么1", res.data);
@@ -714,7 +737,7 @@
});
};
getHairstyleList();
// getHairstyleList();
const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
let tries = 0;
@@ -770,10 +793,11 @@
colorTypeInfo.value = newColorTypeList.value[0];
userFaceInfo.value = res.data || {};
if (!userFaceInfo.value.avatar_img_url) {
userFaceInfo.value.avatar_img_url = 'https://llshop.zglvling.com/shop/img/jpg/avatar.jpg';
}
// userFaceInfo.value = res.data || {};
userFaceInfo.value = collect.value
// if (!userFaceInfo.value.avatar_img_url) {
// userFaceInfo.value.avatar_img_url = 'https://llshop.zglvling.com/shop/img/jpg/avatar.jpg';
// }
if (userFaceInfo?.value?.gender === '男') {
faceImgUrl.value =
@@ -795,7 +819,9 @@
getPraiseText('four');
getPraiseText('five');
getColorTypeText(res?.detail?.sj_color_type || '');
// getColorTypeText(res?.detail?.sj_color_type || '');
getColorTypeText(collect.value.sj_color_type || '');
let blob = await downloadFile(userFaceInfo?.value?.avatar_img_url);
let formData = new FormData();
formData.append('phone', '17600222111');
@@ -812,10 +838,10 @@
if (enterType === 'weixin') {
ress = await getHair();
} else {
ress = await pollExchangeHairHistory(taskInfo.requestId);
await addHair(ress);
// ress = await pollExchangeHairHistory(taskInfo.requestId);
// await addHair(ress);
}
avatarList.value = ress.result;
// avatarList.value = ress.result;
});
};
@@ -858,9 +884,9 @@
onUnmounted(() => {
window.removeEventListener('scroll', onPageScroll);
});
getStyleApi({ openId }).then((res) => {
styleType.value = res.data;
});
// getStyleApi({ openId }).then((res) => {
// styleType.value = res.data;
// });
// .then(() => {
// getUserFaceInfo();
// });
@@ -900,17 +926,20 @@
return;
}
const res = await sendMail({
const data = {
timeout: 100 * 1000,
pageUrl: window.location.href,
url: window.location.href,
email: emailVal
});
}
console.log('data: xxxxxxxxxx', data);
const res = await sendMail(data);
if (res.data.code == 0) {
dialog.value.visible = false;
email.value = '';
uni.showToast({ title: '已经进入发送队列,稍后请查收邮件', icon: 'none' });
} else {
uni.showToast({ title: '报错,请重新发送', icon: 'error' });
}
// dialog.value.visible = true;