fix: 色彩类型匹配

This commit is contained in:
kenny
2025-10-27 19:35:02 +08:00
parent e4fcbcb273
commit d18c097f54
3 changed files with 31 additions and 15 deletions
+6 -6
View File
@@ -75,26 +75,26 @@
{ {
"path": "pages/base-info/index", "path": "pages/base-info/index",
"style": { "style": {
"navigationBarTitleText": "基础信息收集页", "navigationBarTitleText": "AI美学档案",
"enablePullDownRefresh": true "enablePullDownRefresh": true
}, },
"meta": { "meta": {
"sync": true, "sync": true,
"title": "基础信息收集页", "title": "AI美学档案",
"group": "基础信息收集页" "group": "AI美学档案"
} }
}, },
{ {
"path": "pages/base-info-more/index", "path": "pages/base-info-more/index",
"style": { "style": {
"navigationBarTitleText": "基础信息收集页-更多选项", "navigationBarTitleText": "AI美学档案",
"enablePullDownRefresh": true "enablePullDownRefresh": true
}, },
"meta": { "meta": {
"sync": true, "sync": true,
"title": "基础信息收集页-更多选项", "title": "AI美学档案",
"group": "基础信息收集页-更多选项" "group": "AI美学档案"
} }
}, },
{ {
+2 -2
View File
@@ -2,8 +2,8 @@
<s-layout :bgStyle="{ color: '#FFF' }" title=""> <s-layout :bgStyle="{ color: '#FFF' }" title="">
<view class="base-info"> <view class="base-info">
<view class="title"> <view class="title">
<view>请输入并核对信息</view> <view>Face++ AI美学检测</view>
<view>便于AI算法优化</view> <!-- <view>便于AI算法优化</view> -->
</view> </view>
<view class="sub-title">我们会保障您的个人信息安全请放心填写</view> <view class="sub-title">我们会保障您的个人信息安全请放心填写</view>
+23 -7
View File
@@ -453,6 +453,13 @@
target.gender = target.sex || '女'; target.gender = target.sex || '女';
collect.value = target; 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' // collect.value.avatar = collect.value.avatar || 'https://puton.huimeimeta.com/imgs/default_avatar.png'
console.log('collect.value: ', collect.value); console.log('collect.value: ', collect.value);
@@ -500,12 +507,16 @@
let shegnxiaoImgUrl = ref('wuxingLoading.png'); let shegnxiaoImgUrl = ref('wuxingLoading.png');
let colorTypeInfo = ref([]); let colorTypeInfo = ref([]);
const colorTypeText = ref({}); const colorTypeText = ref({});
let current = ref(0);
const current = ref(2);
const praiseTextList = ref([]); const praiseTextList = ref([]);
const userFaceInfo = ref({ avatar_img_url: '' }); const userFaceInfo = ref({ avatar_img_url: '' });
const faceImgUrl = ref(''); const faceImgUrl = ref('');
const shengxiao = ref(); const shengxiao = ref();
const chageSwiper = (e) => { const chageSwiper = (e) => {
console.log('e: ', e);
current.value = e.detail.current; current.value = e.detail.current;
colorTypeInfo.value = newColorTypeList.value[current.value]; colorTypeInfo.value = newColorTypeList.value[current.value];
}; };
@@ -780,8 +791,9 @@
.then((ress) => { .then((ress) => {
console.log('轮询结果', ress); console.log('轮询结果', ress);
const siteImg = 'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png' const siteImg =
const images = ress.result.map(i => i.url).filter(i => i != 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) { if ([...new Set(images)].length === 3) {
resolve(ress); resolve(ress);
@@ -830,11 +842,15 @@
colorTypeInfo.value = newColorTypeList.value[0]; 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; 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 === '男') { if (userFaceInfo?.value?.gender === '男') {
faceImgUrl.value = faceImgUrl.value =