feat: fix
This commit is contained in:
+4
-8
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export const hairText = (customKey) => {
|
export const hairText = (customKey) => {
|
||||||
return `你是个人形象美学顾问,请输出详细的发型风格诊断报告 。
|
return `你是个人形象美学顾问,请输出详细的发型风格诊断报告 。
|
||||||
|
|
||||||
@@ -101,11 +100,12 @@ export const hairText = (customKey) => {
|
|||||||
+ 适度蓬松 + 垂坠质感」,与穿搭、场景协同最大化个人魅力。</p>
|
+ 适度蓬松 + 垂坠质感」,与穿搭、场景协同最大化个人魅力。</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
强调: 不需要外面的大括号,不需要外面的大括号,不需要外面的大括号!
|
||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const shengxiaoText = (checkTime, gender, work) => {
|
export const shengxiaoText = (checkTime, gender, work) => {
|
||||||
return `用户生日是阳历${checkTime},性别:${gender},职业: ${work}, 计算这个生日对应的年柱、月柱、日柱的五行属性个数,不计算时柱,不计算藏干。以v-html格式生成,只能以div、p、ul、li、ol、span标签,输出适合颜色报告,需要提到五行的个数。 报告结构严格按照以下内容:一.五行主属性分析(需要提到五行的个数) 二、五行命理与易学幸运色推导 三、场景化搭配建议 四、动态调整建议",最后以字符串格式返回。返回一个名称为arr的数组,第一个参数“属相”,用用户年龄推算,参数有鼠、牛、虎、兔、龙、蛇、马、羊、猴、鸡、狗、猪),第2到第6个数为用“年柱”, “月柱”,“日柱”,“年柱属性”, “月柱属性”,“日柱属性”,等属性推算出的五行个数,最后以数组的形式返回[“属相”, ”金属性个数“,木属性个数“,”水属性个数”,“火属性个数”,”土属性个数“]的形式返回
|
return `用户生日是阳历${checkTime},性别:${gender},职业: ${work}, 计算这个生日对应的年柱、月柱、日柱的五行属性个数,不计算时柱,不计算藏干。以v-html格式生成,只能以div、p、ul、li、ol、span标签,输出适合颜色报告,需要提到五行的个数。 报告结构严格按照以下内容:一.五行主属性分析(需要提到五行的个数) 二、五行命理与易学幸运色推导 三、场景化搭配建议 四、动态调整建议",最后以字符串格式返回。返回一个名称为arr的数组,第一个参数“属相”,用用户年龄推算,参数有鼠、牛、虎、兔、龙、蛇、马、羊、猴、鸡、狗、猪),第2到第6个数为用“年柱”, “月柱”,“日柱”,“年柱属性”, “月柱属性”,“日柱属性”,等属性推算出的五行个数,最后以数组的形式返回[“属相”, ”金属性个数“,木属性个数“,”水属性个数”,“火属性个数”,”土属性个数“]的形式返回
|
||||||
特别注意:
|
特别注意:
|
||||||
@@ -117,7 +117,6 @@ export const shengxiaoText = (checkTime, gender, work) => {
|
|||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export const shengxiaoSystem_prompt = `五行八卦中年柱、月柱、日柱的计算规则详解
|
export const shengxiaoSystem_prompt = `五行八卦中年柱、月柱、日柱的计算规则详解
|
||||||
|
|
||||||
在五行八卦的命理学体系中,年柱、月柱、日柱与每个人息息相关,它们共同构成了八字,被认为能够揭示一个人的命运轨迹和性格特点。下面,让我们一起来深入了解它们的计算规则。
|
在五行八卦的命理学体系中,年柱、月柱、日柱与每个人息息相关,它们共同构成了八字,被认为能够揭示一个人的命运轨迹和性格特点。下面,让我们一起来深入了解它们的计算规则。
|
||||||
@@ -174,7 +173,6 @@ export const shengxiaoSystem_prompt = `五行八卦中年柱、月柱、日柱
|
|||||||
|
|
||||||
年柱、月柱和日柱的计算规则虽然复杂,但它们蕴含着古人对时间和命运的深刻理解,是五行八卦命理学的重要基础 。`;
|
年柱、月柱和日柱的计算规则虽然复杂,但它们蕴含着古人对时间和命运的深刻理解,是五行八卦命理学的重要基础 。`;
|
||||||
|
|
||||||
|
|
||||||
export const statureText = (
|
export const statureText = (
|
||||||
customKey,
|
customKey,
|
||||||
straight_total_score_t,
|
straight_total_score_t,
|
||||||
@@ -214,8 +212,6 @@ export const statureText = (
|
|||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const styleText = (customKey) => {
|
export const styleText = (customKey) => {
|
||||||
return `你是个人形象美学顾问,你擅长通过客户身材特征分析出用户的风格诊断报告。
|
return `你是个人形象美学顾问,你擅长通过客户身材特征分析出用户的风格诊断报告。
|
||||||
${customKey}
|
${customKey}
|
||||||
@@ -305,4 +301,4 @@ export const styleText = (customKey) => {
|
|||||||
|
|
||||||
|
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -122,20 +122,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
tip: '您更喜欢以下哪种量感类型的服装?',
|
tip: '您更喜欢以下哪种量感类型的服装?',
|
||||||
key: 'feeling_of_quantity',
|
key: 'total_sense_of_quantity_t',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '成熟大气款',
|
label: '大量感',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272634205753.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272634205753.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287774865899.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287774865899.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '适中',
|
label: '中量感',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272667530388.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272667530388.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287797613307.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287797613307.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '轻盈活力款',
|
label: '小量感',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272732987598.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272732987598.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287823232319.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287823232319.png',
|
||||||
},
|
},
|
||||||
@@ -165,20 +165,20 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
tip: '您更喜欢以下哪种轮廓类型的服装?',
|
tip: '您更喜欢以下哪种轮廓类型的服装?',
|
||||||
key: 'right_and_wrong',
|
key: 'straight_total_score_t',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '突显女人味',
|
label: '轮廓偏曲',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272769798751.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272769798751.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287860949325.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287860949325.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '适中',
|
label: '轮廓适中',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272798749257.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272798749257.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287885715958.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287885715958.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '突显干练利落',
|
label: '轮廓偏直',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272825106455.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272825106455.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287910169893.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287910169893.png',
|
||||||
},
|
},
|
||||||
@@ -187,15 +187,15 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
tip: '您更喜欢哪种设计类型的服装?',
|
tip: '您更喜欢哪种设计类型的服装?',
|
||||||
key: 'dynamic_and_static',
|
key: 'dynamic_static_t',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '简约经典',
|
label: '静态型',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272863674867.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272863674867.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287959334463.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287959334463.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设计感较强的',
|
label: '动态型',
|
||||||
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272895680965.png',
|
female: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754272895680965.png',
|
||||||
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287984354873.png',
|
male: 'https://oss.yz.zglvling.com/user/image/2025-08-04/1754287984354873.png',
|
||||||
},
|
},
|
||||||
@@ -382,11 +382,12 @@
|
|||||||
// purpose: 显瘦,勾勒腰线,隐藏肚腩,
|
// purpose: 显瘦,勾勒腰线,隐藏肚腩,
|
||||||
// occasion_dressing: 商务职场,隆重社交
|
// occasion_dressing: 商务职场,隆重社交
|
||||||
// })
|
// })
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
color: '',
|
color: '',
|
||||||
feeling_of_quantity: '',
|
total_sense_of_quantity_t: '',
|
||||||
right_and_wrong: '',
|
straight_total_score_t: '',
|
||||||
dynamic_and_static: '',
|
dynamic_static_t: '',
|
||||||
somatotype: '',
|
somatotype: '',
|
||||||
question: [],
|
question: [],
|
||||||
purpose: [],
|
purpose: [],
|
||||||
@@ -423,15 +424,15 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.feeling_of_quantity) {
|
if (!form.value.total_sense_of_quantity_t) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.right_and_wrong) {
|
if (!form.value.straight_total_score_t) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.dynamic_and_static) {
|
if (!form.value.dynamic_static_t) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,6 +465,10 @@
|
|||||||
|
|
||||||
const userInfo = await getUserInfo();
|
const userInfo = await getUserInfo();
|
||||||
|
|
||||||
|
console.log('userInfo: -----------', userInfo);
|
||||||
|
|
||||||
|
console.log('form.value: ', form.value);
|
||||||
|
|
||||||
await saveUserInfo({
|
await saveUserInfo({
|
||||||
...JSON.parse(userInfo.data.dataJson),
|
...JSON.parse(userInfo.data.dataJson),
|
||||||
...form.value,
|
...form.value,
|
||||||
@@ -471,10 +476,12 @@
|
|||||||
purpose: form.value.purpose.toString(),
|
purpose: form.value.purpose.toString(),
|
||||||
occasion_dressing: form.value.occasion_dressing.toString(),
|
occasion_dressing: form.value.occasion_dressing.toString(),
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
icon: 'loading',
|
icon: 'loading',
|
||||||
title: '',
|
title: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: 'https://puton.huimeimeta.com/app-api/cloth/uploadFace',
|
url: 'https://puton.huimeimeta.com/app-api/cloth/uploadFace',
|
||||||
filePath: e.tempFilePaths[0],
|
filePath: e.tempFilePaths[0],
|
||||||
@@ -512,7 +519,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.feeling_of_quantity) {
|
if (!form.value.total_sense_of_quantity_t) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择量感类型服饰',
|
title: '请选择量感类型服饰',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -520,7 +527,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.right_and_wrong) {
|
if (!form.value.straight_total_score_t) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择轮廓类型服饰',
|
title: '请选择轮廓类型服饰',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -528,7 +535,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.value.dynamic_and_static) {
|
if (!form.value.dynamic_static_t) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择设计类型服饰',
|
title: '请选择设计类型服饰',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -568,59 +575,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const userInfo = await getUserInfo();
|
|
||||||
console.log('userInfo: ', userInfo.data.dataJson);
|
|
||||||
|
|
||||||
await saveUserInfo({
|
|
||||||
...JSON.parse(userInfo.data.dataJson),
|
|
||||||
...form.value,
|
|
||||||
question: form.value.question.toString(),
|
|
||||||
purpose: form.value.purpose.toString(),
|
|
||||||
occasion_dressing: form.value.occasion_dressing.toString(),
|
|
||||||
}).then(() => {
|
|
||||||
uni.chooseImage({
|
|
||||||
count: 1, //默认9
|
|
||||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
||||||
sourceType: ['album', 'camera'], //从相册选择
|
|
||||||
success: function (res) {
|
|
||||||
console.log(JSON.stringify(res.tempFilePaths));
|
|
||||||
|
|
||||||
uni.showLoading({
|
|
||||||
icon: 'loading',
|
|
||||||
title: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.uploadFile({
|
|
||||||
url: 'https://puton.huimeimeta.com/app-api/cloth/uploadFace',
|
|
||||||
filePath: res.tempFilePaths[0],
|
|
||||||
name: 'file',
|
|
||||||
formData: {},
|
|
||||||
header: {
|
|
||||||
Authorization: getAccessToken(),
|
|
||||||
},
|
|
||||||
success: (res) => {
|
|
||||||
console.log('上传成功', typeof res.data);
|
|
||||||
console.log('res.data.code: ', JSON.parse(res.data));
|
|
||||||
|
|
||||||
if (JSON.parse(res.data).code === 200) {
|
|
||||||
window.location.href = `https://face-canvas.huimeimeta.com/?img=${
|
|
||||||
JSON.parse(res.data).result.fileUrl
|
|
||||||
}&token=${getAccessToken()}`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
complete: () => {
|
|
||||||
uni.hideLoading();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
fail: (fail) => {
|
|
||||||
console.log('fail: ', fail);
|
|
||||||
uni.showToast('上传图片报错了');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
+56
-27
@@ -29,14 +29,23 @@
|
|||||||
2、type字段还未给
|
2、type字段还未给
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<genetic-style
|
<!-- <genetic-style
|
||||||
:gender="collect?.sex"
|
:gender="collect?.sex"
|
||||||
:pic-list="[
|
:pic-list="[
|
||||||
collect?.eye_img_url ?? '',
|
collect?.eye_img_url ?? '',
|
||||||
collect?.triangular_area_img_url ?? '',
|
collect?.triangular_area_img_url ?? '',
|
||||||
collect?.full_face_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>
|
</view>
|
||||||
|
|
||||||
<!-- 搭配趋势 -->
|
<!-- 搭配趋势 -->
|
||||||
<CustomSwiper :items="items" />
|
<!-- <CustomSwiper :items="items" /> -->
|
||||||
<view class="padding-top20">{{ colorTypeInfo.typeName }}人穿衣搭配全方案</view>
|
<view class="padding-top20">{{ colorTypeInfo.typeName }}人穿衣搭配全方案</view>
|
||||||
<view class="padding-top20">
|
<view class="padding-top20">
|
||||||
<rich-text :nodes="colorTypeText.scheme"></rich-text>
|
<rich-text :nodes="colorTypeText.scheme"></rich-text>
|
||||||
@@ -196,11 +205,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="rich-text-content">
|
<view class="rich-text-content">
|
||||||
<rich-text :nodes="praiseTextList[0]"></rich-text>
|
<rich-text :nodes="praiseTextList[0]"></rich-text>
|
||||||
<view
|
<!-- <view
|
||||||
class="face-img-box"
|
class="face-img-box"
|
||||||
:style="{
|
:style="{
|
||||||
height: userFaceInfo?.gender === '男' ? '150px' : '328px',
|
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="" />
|
<img style="object-fit: cover" :src="faceImgUrl" alt="" srcset="" />
|
||||||
</view>
|
</view>
|
||||||
@@ -348,7 +363,7 @@
|
|||||||
import StyleDiagnosticReport from './component/FirstStyleType/StyleDiagnosticReport.vue';
|
import StyleDiagnosticReport from './component/FirstStyleType/StyleDiagnosticReport.vue';
|
||||||
import BodyType from './component/FirstStyleType/BodyType.vue';
|
import BodyType from './component/FirstStyleType/BodyType.vue';
|
||||||
import FacialColorLatitude from './component/FirstStyleType/FacialColorLatitude.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 SensoryTypes from './component/FirstStyleType/SensoryTypes.vue';
|
||||||
import TypeOfMass from './component/FirstStyleType/TypeOfMass.vue';
|
import TypeOfMass from './component/FirstStyleType/TypeOfMass.vue';
|
||||||
import Movementtype from './component/FirstStyleType/Movementtype.vue';
|
import Movementtype from './component/FirstStyleType/Movementtype.vue';
|
||||||
@@ -378,6 +393,7 @@
|
|||||||
getUserInfo,
|
getUserInfo,
|
||||||
getUserAvatar,
|
getUserAvatar,
|
||||||
sendMail,
|
sendMail,
|
||||||
|
getImage
|
||||||
} = ReportApi;
|
} = ReportApi;
|
||||||
|
|
||||||
const collect = ref(null);
|
const collect = ref(null);
|
||||||
@@ -386,14 +402,18 @@
|
|||||||
uni.setStorageSync('token', options?.token ?? '92d2805a85ca422e90dd7d50eef49a85');
|
uni.setStorageSync('token', options?.token ?? '92d2805a85ca422e90dd7d50eef49a85');
|
||||||
console.log('🚀 ~ URL上的token ~ options?.token: ', options?.token);
|
console.log('🚀 ~ URL上的token ~ options?.token: ', options?.token);
|
||||||
|
|
||||||
Promise.all([getUserInfo(), getAiFaceResult(), getUserAvatar()]).then((result) => {
|
Promise.all([getUserInfo(), getAiFaceResult(), getUserAvatar(), getImage()]).then((result) => {
|
||||||
const [res1, res2, res3] = result;
|
const [res1, res2, res3, res4] = result;
|
||||||
console.log('res3: zzzzzzzzzzzzz', res3.data);
|
console.log('res4: zzzzzzzzzzzzz', res4.data.list);
|
||||||
|
const [{firstImageUrl, secondImageUrl, thirdImageUrl}] =res4.data.list
|
||||||
|
|
||||||
const { data } = JSON.parse(res2.result[0].thridResp);
|
const { data } = JSON.parse(res2.result[0].thridResp);
|
||||||
|
|
||||||
const target = Object.assign({}, JSON.parse(res1.data.dataJson), data.face_figure, {
|
const target = Object.assign({}, JSON.parse(res1.data.dataJson), data.face_figure, {
|
||||||
avatar_img_url: res3.data.avatar,
|
avatar_img_url: res3.data.avatar,
|
||||||
|
firstImageUrl,
|
||||||
|
secondImageUrl,
|
||||||
|
thirdImageUrl
|
||||||
});
|
});
|
||||||
|
|
||||||
target.gender = target.sex;
|
target.gender = target.sex;
|
||||||
@@ -633,8 +653,11 @@
|
|||||||
params.text = styleText(customKey);
|
params.text = styleText(customKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
console.log('lllllllllllllllllllllll')
|
||||||
|
|
||||||
praiseTextApi(params).then((res) => {
|
praiseTextApi(params).then((res) => {
|
||||||
console.log('res: vvvvvvvvvvvvvvvvvvvv', res);
|
console.log('res: vvvvvvvvvvvvvvvvvvvv-----------oooooooooooo', res);
|
||||||
// tabType
|
// tabType
|
||||||
if (callWord === 'one') {
|
if (callWord === 'one') {
|
||||||
// console.log("数据是什么1", res.data);
|
// console.log("数据是什么1", res.data);
|
||||||
@@ -714,7 +737,7 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
getHairstyleList();
|
// getHairstyleList();
|
||||||
|
|
||||||
const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
||||||
let tries = 0;
|
let tries = 0;
|
||||||
@@ -770,10 +793,11 @@
|
|||||||
|
|
||||||
colorTypeInfo.value = newColorTypeList.value[0];
|
colorTypeInfo.value = newColorTypeList.value[0];
|
||||||
|
|
||||||
userFaceInfo.value = res.data || {};
|
// userFaceInfo.value = res.data || {};
|
||||||
if (!userFaceInfo.value.avatar_img_url) {
|
userFaceInfo.value = collect.value
|
||||||
userFaceInfo.value.avatar_img_url = 'https://llshop.zglvling.com/shop/img/jpg/avatar.jpg';
|
// 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 =
|
||||||
@@ -795,7 +819,9 @@
|
|||||||
getPraiseText('four');
|
getPraiseText('four');
|
||||||
getPraiseText('five');
|
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 blob = await downloadFile(userFaceInfo?.value?.avatar_img_url);
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append('phone', '17600222111');
|
formData.append('phone', '17600222111');
|
||||||
@@ -812,10 +838,10 @@
|
|||||||
if (enterType === 'weixin') {
|
if (enterType === 'weixin') {
|
||||||
ress = await getHair();
|
ress = await getHair();
|
||||||
} else {
|
} else {
|
||||||
ress = await pollExchangeHairHistory(taskInfo.requestId);
|
// ress = await pollExchangeHairHistory(taskInfo.requestId);
|
||||||
await addHair(ress);
|
// await addHair(ress);
|
||||||
}
|
}
|
||||||
avatarList.value = ress.result;
|
// avatarList.value = ress.result;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -858,9 +884,9 @@
|
|||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
window.removeEventListener('scroll', onPageScroll);
|
window.removeEventListener('scroll', onPageScroll);
|
||||||
});
|
});
|
||||||
getStyleApi({ openId }).then((res) => {
|
// getStyleApi({ openId }).then((res) => {
|
||||||
styleType.value = res.data;
|
// styleType.value = res.data;
|
||||||
});
|
// });
|
||||||
// .then(() => {
|
// .then(() => {
|
||||||
// getUserFaceInfo();
|
// getUserFaceInfo();
|
||||||
// });
|
// });
|
||||||
@@ -900,17 +926,20 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await sendMail({
|
const data = {
|
||||||
timeout: 100 * 1000,
|
timeout: 100 * 1000,
|
||||||
pageUrl: window.location.href,
|
url: window.location.href,
|
||||||
email: emailVal
|
email: emailVal
|
||||||
});
|
}
|
||||||
|
|
||||||
|
console.log('data: xxxxxxxxxx', data);
|
||||||
|
|
||||||
|
const res = await sendMail(data);
|
||||||
|
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
dialog.value.visible = false;
|
|
||||||
email.value = '';
|
|
||||||
|
|
||||||
uni.showToast({ title: '已经进入发送队列,稍后请查收邮件', icon: 'none' });
|
uni.showToast({ title: '已经进入发送队列,稍后请查收邮件', icon: 'none' });
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: '报错,请重新发送', icon: 'error' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// dialog.value.visible = true;
|
// dialog.value.visible = true;
|
||||||
|
|||||||
+19
-36
@@ -17,11 +17,13 @@ const ReportApi = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getStyleApi: (data) => {
|
getStyleApi: (data) => {
|
||||||
return request({
|
// return request({
|
||||||
url: '/userinfo/get_user_face_info',
|
// url: '/userinfo/get_user_face_info',
|
||||||
method: 'POST',
|
// method: 'POST',
|
||||||
data: data,
|
// data: data,
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
return Promise.resolve({data: {}})
|
||||||
},
|
},
|
||||||
praiseTextApi: (data) => {
|
praiseTextApi: (data) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -50,6 +52,8 @@ const ReportApi = {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// return Promise.resolve()
|
||||||
},
|
},
|
||||||
hairStyleListApi: (data) => {
|
hairStyleListApi: (data) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -82,40 +86,12 @@ const ReportApi = {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// sendMail: () =>
|
|
||||||
// request({
|
|
||||||
// url: '/sendMail',
|
|
||||||
// method: 'post',
|
|
||||||
// }),
|
|
||||||
|
|
||||||
sendMail: (data) => {
|
sendMail: (data) => {
|
||||||
// const init = () => {
|
|
||||||
// const http = new Request({
|
|
||||||
// baseURL: 'http://42.193.102.139:4000/api/pdf',
|
|
||||||
// timeout: 100 * 1000,
|
|
||||||
// method: 'POST',
|
|
||||||
// header: {
|
|
||||||
// Accept: 'text/json',
|
|
||||||
// 'Content-Type': 'application/json;charset=UTF-8',
|
|
||||||
// },
|
|
||||||
// // #ifdef H5
|
|
||||||
// // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
|
|
||||||
// withCredentials: false,
|
|
||||||
// // #endif
|
|
||||||
// });
|
|
||||||
|
|
||||||
// return http;
|
|
||||||
// };
|
|
||||||
|
|
||||||
const http = new Request({
|
const http = new Request({
|
||||||
baseURL: 'http://42.193.102.139:4000/api/pdf',
|
// baseURL: 'https://fitting-room.huimeimeta.com/api/pdf',
|
||||||
|
baseURL: 'https://nestjs.huimeimeta.com/api/sendMail',
|
||||||
timeout: 100 * 1000,
|
timeout: 100 * 1000,
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
header: {
|
|
||||||
Accept: 'text/json',
|
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
|
||||||
Authorization: 'Bearer 14fc0280-fc65-462d-ac2d-50178c0212e3',
|
|
||||||
},
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
|
// 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
@@ -129,6 +105,13 @@ const ReportApi = {
|
|||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getImage: () =>
|
||||||
|
request({
|
||||||
|
url: '/digital/triple-image/page ',
|
||||||
|
method: 'get',
|
||||||
|
}),
|
||||||
|
|
||||||
// https://puton.huimeimeta.com/app-api/cloth/getFaceList
|
// https://puton.huimeimeta.com/app-api/cloth/getFaceList
|
||||||
};
|
};
|
||||||
export default ReportApi;
|
export default ReportApi;
|
||||||
|
|||||||
Reference in New Issue
Block a user