fix: 色彩类型匹配
This commit is contained in:
+23
-7
@@ -453,6 +453,13 @@
|
||||
target.gender = target.sex || '女';
|
||||
collect.value = target;
|
||||
|
||||
// colorTypeInfo.typeName + '型' === collect.sj_color_type ? '最佳颜色' : '不匹配'
|
||||
|
||||
// const index = newColorTypeList.value.findIndex((item) => item.typeName + '型' === sj_color_type);
|
||||
// console.log('index: vvvvvvvvvvnnnnnnnnnnmmmmmmmmmmmmmm', index);
|
||||
|
||||
// current.value = index
|
||||
|
||||
// collect.value.avatar = collect.value.avatar || 'https://puton.huimeimeta.com/imgs/default_avatar.png'
|
||||
|
||||
console.log('collect.value: ', collect.value);
|
||||
@@ -500,12 +507,16 @@
|
||||
let shegnxiaoImgUrl = ref('wuxingLoading.png');
|
||||
let colorTypeInfo = ref([]);
|
||||
const colorTypeText = ref({});
|
||||
let current = ref(0);
|
||||
|
||||
const current = ref(2);
|
||||
|
||||
const praiseTextList = ref([]);
|
||||
const userFaceInfo = ref({ avatar_img_url: '' });
|
||||
const faceImgUrl = ref('');
|
||||
const shengxiao = ref();
|
||||
|
||||
const chageSwiper = (e) => {
|
||||
console.log('e: ', e);
|
||||
current.value = e.detail.current;
|
||||
colorTypeInfo.value = newColorTypeList.value[current.value];
|
||||
};
|
||||
@@ -780,8 +791,9 @@
|
||||
.then((ress) => {
|
||||
console.log('轮询结果', ress);
|
||||
|
||||
const siteImg = 'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png'
|
||||
const images = ress.result.map(i => i.url).filter(i => i != siteImg)
|
||||
const siteImg =
|
||||
'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png';
|
||||
const images = ress.result.map((i) => i.url).filter((i) => i != siteImg);
|
||||
|
||||
if ([...new Set(images)].length === 3) {
|
||||
resolve(ress);
|
||||
@@ -830,11 +842,15 @@
|
||||
|
||||
colorTypeInfo.value = newColorTypeList.value[0];
|
||||
|
||||
// userFaceInfo.value = res.data || {};
|
||||
const findIndex = newColorTypeList.value.findIndex((i) =>
|
||||
collect.value.sj_color_type.includes(i.typeName),
|
||||
);
|
||||
|
||||
current.value = findIndex;
|
||||
|
||||
colorTypeInfo.value = newColorTypeList.value[current.value];
|
||||
|
||||
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 =
|
||||
|
||||
Reference in New Issue
Block a user