feat: 提交一下
This commit is contained in:
+176
-287
@@ -10,12 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view :class="classFixed" style="width: 100%">
|
<view :class="classFixed" style="width: 100%">
|
||||||
<Tabs
|
<Tabs :tabs="tabsList" :activeTab="activeTab" @update:activeTab="onTabChange"> </Tabs>
|
||||||
:tabs="tabsList"
|
|
||||||
:activeTab="activeTab"
|
|
||||||
@update:activeTab="onTabChange"
|
|
||||||
>
|
|
||||||
</Tabs>
|
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="content"
|
class="content"
|
||||||
@@ -25,9 +20,7 @@
|
|||||||
}"
|
}"
|
||||||
v-if="collect"
|
v-if="collect"
|
||||||
>
|
>
|
||||||
|
|
||||||
<view v-if="activeTab === 0">
|
<view v-if="activeTab === 0">
|
||||||
|
|
||||||
<view class="style-type">
|
<view class="style-type">
|
||||||
<!--
|
<!--
|
||||||
基因风格
|
基因风格
|
||||||
@@ -56,11 +49,8 @@
|
|||||||
:luminance="collect?.luminance ?? 0"
|
:luminance="collect?.luminance ?? 0"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 轮廓类型-->
|
<!-- 轮廓类型-->
|
||||||
<template v-if="customFigure">
|
<template v-if="customFigure">
|
||||||
|
|
||||||
<SensoryTypes
|
<SensoryTypes
|
||||||
:type="collect.straight_total_score_t"
|
:type="collect.straight_total_score_t"
|
||||||
:ai-desc="customFigure?.sensory?.desc"
|
:ai-desc="customFigure?.sensory?.desc"
|
||||||
@@ -78,11 +68,7 @@
|
|||||||
:ai-desc="customFigure?.movement?.desc"
|
:ai-desc="customFigure?.movement?.desc"
|
||||||
/>
|
/>
|
||||||
<!-- 体型-->
|
<!-- 体型-->
|
||||||
<BodyType
|
<BodyType :body-type="collect?.somatotype" :gender="collect?.gender" />
|
||||||
:body-type="collect?.somatotype"
|
|
||||||
:gender="collect?.gender"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="true">
|
<template v-if="true">
|
||||||
@@ -99,7 +85,6 @@
|
|||||||
:gender="collect.sex"
|
:gender="collect.sex"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="activeTab === 1">
|
<view v-else-if="activeTab === 1">
|
||||||
@@ -115,20 +100,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<swiper class="swiper" @change="chageSwiper" :current="current">
|
<swiper class="swiper" @change="chageSwiper" :current="current">
|
||||||
<swiper-item
|
<swiper-item v-for="(item, index) in newColorTypeList" :key="index">
|
||||||
v-for="(item, index) in newColorTypeList"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<view class="img-box">
|
<view class="img-box">
|
||||||
<view
|
<view style="width: 235px; height: 235px; position: absolute; z-index: 99">
|
||||||
style="
|
|
||||||
width: 235px;
|
|
||||||
height: 235px;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 99;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
style="width: 235px; height: 235px"
|
style="width: 235px; height: 235px"
|
||||||
:src="item.avatarFrameImgUrl"
|
:src="item.avatarFrameImgUrl"
|
||||||
@@ -137,11 +112,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<img
|
<img :src="collect?.avatar_img_url" alt="" srcset="" />
|
||||||
:src="userFaceInfo?.avatar_img_url"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -153,9 +124,7 @@
|
|||||||
<view class="swiper-type-name-en">{{ colorTypeInfo.enName }}</view>
|
<view class="swiper-type-name-en">{{ colorTypeInfo.enName }}</view>
|
||||||
<view class="swiper-type-text">
|
<view class="swiper-type-text">
|
||||||
{{
|
{{
|
||||||
colorTypeInfo.typeName + "型" === userFaceInfo.sj_color_type
|
colorTypeInfo.typeName + '型' === collect.sj_color_type ? '最佳颜色' : '不匹配'
|
||||||
? "最佳颜色"
|
|
||||||
: "不匹配"
|
|
||||||
}}
|
}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -200,41 +169,22 @@
|
|||||||
|
|
||||||
<!-- 搭配趋势 -->
|
<!-- 搭配趋势 -->
|
||||||
<CustomSwiper :items="items" />
|
<CustomSwiper :items="items" />
|
||||||
<view class="padding-top20"
|
<view class="padding-top20">{{ colorTypeInfo.typeName }}人穿衣搭配全方案</view>
|
||||||
>{{ 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>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="userFaceInfo?.gender === '女'" style="padding: 0 20px">
|
|
||||||
<!-- <view class="reference-title">
|
<view v-if="collect?.gender === '女'" style="padding: 0 20px">
|
||||||
<img
|
|
||||||
src="https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/reference.png"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/>
|
|
||||||
</view> -->
|
|
||||||
<view class="reference-img-box">
|
<view class="reference-img-box">
|
||||||
<img
|
<img
|
||||||
class="reference-img1"
|
class="reference-img1"
|
||||||
:src="colorTypeInfo.useReferenceImgUrl"
|
:src="colorTypeInfo.useReferenceImgUrl"
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/>
|
/>
|
||||||
<!-- <img
|
|
||||||
class="reference-img2"
|
|
||||||
src="https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/test2.png"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding-left: 20px">
|
<view style="padding-left: 20px"> 注:人工智能大模型在计算中可能存在0.5%的误差。 </view>
|
||||||
注:人工智能大模型在计算中可能存在0.5%的误差。
|
<view class="reference-complate"> ------ 色彩类型报告完 ------ </view>
|
||||||
</view>
|
|
||||||
<view class="reference-complate">
|
|
||||||
------ 色彩类型报告完 ------
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -247,12 +197,7 @@
|
|||||||
v-for="(item, index) in avatarList"
|
v-for="(item, index) in avatarList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img
|
<img :src="item.url" alt="" srcset="" @click="previewImage(item.url)" />
|
||||||
:src="item.url"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
@click="previewImage(item.url)"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rich-text-content">
|
<view class="rich-text-content">
|
||||||
@@ -263,23 +208,11 @@
|
|||||||
height: userFaceInfo?.gender === '男' ? '150px' : '328px',
|
height: userFaceInfo?.gender === '男' ? '150px' : '328px',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<img
|
<img style="object-fit: cover" :src="faceImgUrl" alt="" srcset="" />
|
||||||
style="object-fit: cover"
|
|
||||||
:src="faceImgUrl"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<rich-text :nodes="praiseTextList[1]"></rich-text>
|
<rich-text :nodes="praiseTextList[1]"></rich-text>
|
||||||
<view class="more-hairstyle">
|
<view class="more-hairstyle">
|
||||||
<view
|
<view class="" style="display: flex; justify-content: center; margin-bottom: 16px">
|
||||||
class=""
|
|
||||||
style="
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<view>更多发型一键试戴</view>
|
<view>更多发型一键试戴</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="scroll-box">
|
<view class="scroll-box">
|
||||||
@@ -290,23 +223,13 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
style="height: 103px; margin-right: 8px"
|
style="height: 103px; margin-right: 8px"
|
||||||
>
|
>
|
||||||
<img
|
<img style="width: 76px; height: 100%" :src="item.fileUrl" alt="" srcset="" />
|
||||||
style="width: 76px; height: 100%"
|
|
||||||
:src="item.fileUrl"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<rich-text :nodes="praiseTextList[2]"></rich-text>
|
<rich-text :nodes="praiseTextList[2]"></rich-text>
|
||||||
<view style="margin-top: 56px">
|
<view style="margin-top: 56px"> 注:人工智能大模型在计算中可能存在0.5%的误差。 </view>
|
||||||
注:人工智能大模型在计算中可能存在0.5%的误差。
|
<view class="reference-complate" style="margin-bottom: 0; margin-top: 10px">
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="reference-complate"
|
|
||||||
style="margin-bottom: 0; margin-top: 10px"
|
|
||||||
>
|
|
||||||
------ 发型报告完 ------
|
------ 发型报告完 ------
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -326,7 +249,7 @@
|
|||||||
@click="
|
@click="
|
||||||
previewImage(
|
previewImage(
|
||||||
`https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/chineseZodiac/` +
|
`https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/chineseZodiac/` +
|
||||||
shegnxiaoImgUrl
|
shegnxiaoImgUrl,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -335,43 +258,25 @@
|
|||||||
<view class="five-attribute-box">
|
<view class="five-attribute-box">
|
||||||
<view
|
<view
|
||||||
class="numblock"
|
class="numblock"
|
||||||
style="
|
style="background-color: rgba(193, 156, 45, 1); top: 286px; left: 40px"
|
||||||
background-color: rgba(193, 156, 45, 1);
|
|
||||||
top: 286px;
|
|
||||||
left: 40px;
|
|
||||||
"
|
|
||||||
>{{ numToChinese(shengxiaoNumList[0]) }}</view
|
>{{ numToChinese(shengxiaoNumList[0]) }}</view
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="numblock"
|
class="numblock"
|
||||||
style="
|
style="background-color: rgba(62, 166, 123, 1); top: 32px; left: 119px"
|
||||||
background-color: rgba(62, 166, 123, 1);
|
|
||||||
top: 32px;
|
|
||||||
left: 119px;
|
|
||||||
"
|
|
||||||
>{{ numToChinese(shengxiaoNumList[1]) }}</view
|
>{{ numToChinese(shengxiaoNumList[1]) }}</view
|
||||||
>
|
>
|
||||||
|
<view class="numblock" style="background-color: rgba(61, 146, 168, 1); top: 136px">{{
|
||||||
|
numToChinese(shengxiaoNumList[2])
|
||||||
|
}}</view>
|
||||||
<view
|
<view
|
||||||
class="numblock"
|
class="numblock"
|
||||||
style="background-color: rgba(61, 146, 168, 1); top: 136px"
|
style="background-color: rgba(195, 52, 55, 1); top: 150px; right: 10px"
|
||||||
>{{ numToChinese(shengxiaoNumList[2]) }}</view
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="numblock"
|
|
||||||
style="
|
|
||||||
background-color: rgba(195, 52, 55, 1);
|
|
||||||
top: 150px;
|
|
||||||
right: 10px;
|
|
||||||
"
|
|
||||||
>{{ numToChinese(shengxiaoNumList[3]) }}</view
|
>{{ numToChinese(shengxiaoNumList[3]) }}</view
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="numblock"
|
class="numblock"
|
||||||
style="
|
style="background-color: rgba(253, 231, 73, 1); top: 293px; right: 70px"
|
||||||
background-color: rgba(253, 231, 73, 1);
|
|
||||||
top: 293px;
|
|
||||||
right: 70px;
|
|
||||||
"
|
|
||||||
>{{ numToChinese(shengxiaoNumList[4]) }}</view
|
>{{ numToChinese(shengxiaoNumList[4]) }}</view
|
||||||
>
|
>
|
||||||
<view class="five-attribute">
|
<view class="five-attribute">
|
||||||
@@ -389,9 +294,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<rich-text :nodes="luckyTxtList[1]"></rich-text>
|
<rich-text :nodes="luckyTxtList[1]"></rich-text>
|
||||||
<view style="margin-top: 56px">
|
<view style="margin-top: 56px"> 注:人工智能大模型在计算中可能存在0.5%的误差。 </view>
|
||||||
注:人工智能大模型在计算中可能存在0.5%的误差。
|
|
||||||
</view>
|
|
||||||
<view class="reference-complate" style="margin-bottom: 0">
|
<view class="reference-complate" style="margin-bottom: 0">
|
||||||
------ 幸运色分析完 ------
|
------ 幸运色分析完 ------
|
||||||
</view>
|
</view>
|
||||||
@@ -414,37 +317,38 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, onUnmounted, watchEffect } from "vue";
|
import { ref, onMounted, onUnmounted, watchEffect } from 'vue';
|
||||||
import Header from "./component/Header/index.vue";
|
import Header from './component/Header/index.vue';
|
||||||
import Tabs from "./component/Tabs/index.vue";
|
import Tabs from './component/Tabs/index.vue';
|
||||||
import {
|
import { fashionNeutrals, colorTypeList, faceList, shengxiaoImgList } from './database';
|
||||||
fashionNeutrals,
|
|
||||||
colorTypeList,
|
|
||||||
faceList,
|
|
||||||
shengxiaoImgList,
|
|
||||||
} from "./database";
|
|
||||||
import {
|
import {
|
||||||
uploadFormData,
|
uploadFormData,
|
||||||
downloadFile,
|
downloadFile,
|
||||||
numToChinese,
|
numToChinese,
|
||||||
getMaxElement,
|
getMaxElement,
|
||||||
reorderByValue,
|
reorderByValue,
|
||||||
} from "../../utils/index";
|
} from '../../utils/index';
|
||||||
import GeneticStyle from "./component/FirstStyleType/geneticStyle.vue";
|
import GeneticStyle from './component/FirstStyleType/geneticStyle.vue';
|
||||||
import SkinColor from "./component/FirstStyleType/SkinColor.vue";
|
import SkinColor from './component/FirstStyleType/SkinColor.vue';
|
||||||
import BottomPic from "./component/FirstStyleType/BottomPic.vue";
|
import BottomPic from './component/FirstStyleType/BottomPic.vue';
|
||||||
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';
|
||||||
import ReportApi from "../../sheep/api/report";
|
import ReportApi from '../../sheep/api/report';
|
||||||
|
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import {hairText, shengxiaoText, shengxiaoSystem_prompt, statureText, styleText} from '@/constant/aiText'
|
import {
|
||||||
import { praiseTextApi } from '@/sheep/api/doubao'
|
hairText,
|
||||||
|
shengxiaoText,
|
||||||
|
shengxiaoSystem_prompt,
|
||||||
|
statureText,
|
||||||
|
styleText,
|
||||||
|
} from '@/constant/aiText';
|
||||||
|
import { praiseTextApi } from '@/sheep/api/doubao';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
// praiseTextApi,
|
// praiseTextApi,
|
||||||
@@ -455,42 +359,40 @@ const {
|
|||||||
addHairApi,
|
addHairApi,
|
||||||
getHairApi,
|
getHairApi,
|
||||||
getAiFaceResult,
|
getAiFaceResult,
|
||||||
getUserInfo
|
getUserInfo,
|
||||||
|
getUserAvatar,
|
||||||
} = ReportApi;
|
} = ReportApi;
|
||||||
|
|
||||||
|
const collect = ref(null);
|
||||||
const collect = ref(null)
|
|
||||||
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
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()]).then(result => {
|
Promise.all([getUserInfo(), getAiFaceResult(), getUserAvatar()]).then((result) => {
|
||||||
const [res1, res2] = result
|
const [res1, res2, res3] = result;
|
||||||
|
console.log('res3: zzzzzzzzzzzzz', res3.data);
|
||||||
const {data} = JSON.parse(res2.result[0].thridResp)
|
|
||||||
|
|
||||||
const target = Object.assign({}, JSON.parse(res1.data.dataJson), data.face_figure)
|
|
||||||
|
|
||||||
target.gender = target.sex
|
|
||||||
collect.value = target
|
|
||||||
|
|
||||||
console.log('collect.value: ', collect.value);
|
|
||||||
})
|
|
||||||
|
|
||||||
|
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,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
target.gender = target.sex;
|
||||||
|
collect.value = target;
|
||||||
|
|
||||||
|
console.log('collect.value: ', collect.value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// if (
|
// if (
|
||||||
// typeof window !== "undefined" &&
|
// typeof window !== "undefined" &&
|
||||||
// /MicroMessenger/i.test(navigator.userAgent)
|
// /MicroMessenger/i.test(navigator.userAgent)
|
||||||
// ) {
|
// ) {
|
||||||
const pngImgUrl = ref("https://llshop.zglvling.com/shop/img/png/h5/");
|
const pngImgUrl = ref('https://llshop.zglvling.com/shop/img/png/h5/');
|
||||||
const showPreview = ref(false);
|
const showPreview = ref(false);
|
||||||
const currentPreviewImage = ref("");
|
const currentPreviewImage = ref('');
|
||||||
let hairStyleList = ref([]);
|
let hairStyleList = ref([]);
|
||||||
const previewImage = (imageUrl) => {
|
const previewImage = (imageUrl) => {
|
||||||
currentPreviewImage.value = imageUrl;
|
currentPreviewImage.value = imageUrl;
|
||||||
@@ -501,46 +403,43 @@ const closePreview = (e) => {
|
|||||||
// 阻止事件冒泡
|
// 阻止事件冒泡
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
showPreview.value = false;
|
showPreview.value = false;
|
||||||
currentPreviewImage.value = "";
|
currentPreviewImage.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const gifAddress = "https://llshop.zglvling.com/shop/img/gif/";
|
const gifAddress = 'https://llshop.zglvling.com/shop/img/gif/';
|
||||||
const routes = new URLSearchParams(window.location.search);
|
const routes = new URLSearchParams(window.location.search);
|
||||||
const classFixed = ref("");
|
const classFixed = ref('');
|
||||||
const openId = routes.get("openId");
|
const openId = routes.get('openId');
|
||||||
const enterType = routes.get("enterType"); // 1: 个人诊断报告 2: 发型试戴
|
const enterType = routes.get('enterType'); // 1: 个人诊断报告 2: 发型试戴
|
||||||
// const occupation = routes.get("occupation"); // 职业
|
// const occupation = routes.get("occupation"); // 职业
|
||||||
// const forWhom = routes.get("forWhom");
|
// const forWhom = routes.get("forWhom");
|
||||||
|
|
||||||
let scrollHeight = ref(0);
|
let scrollHeight = ref(0);
|
||||||
const activeTab = ref(0);
|
const activeTab = ref(0);
|
||||||
|
|
||||||
|
|
||||||
const tabsList = ref([
|
const tabsList = ref([
|
||||||
{ name: "风格类型", icon: "icon-style" },
|
{ name: '风格类型', icon: 'icon-style' },
|
||||||
{ name: "色彩类型", icon: "icon-color" },
|
{ name: '色彩类型', icon: 'icon-color' },
|
||||||
{ name: "发型发色", icon: "icon-body" },
|
{ name: '发型发色', icon: 'icon-body' },
|
||||||
{ name: "幸运色", icon: "icon-face" },
|
{ name: '幸运色', icon: 'icon-face' },
|
||||||
]);
|
]);
|
||||||
const newColorTypeList = ref([]);
|
const newColorTypeList = ref([]);
|
||||||
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);
|
let current = ref(0);
|
||||||
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) => {
|
||||||
current.value = e.detail.current;
|
current.value = e.detail.current;
|
||||||
colorTypeInfo.value = newColorTypeList.value[current.value];
|
colorTypeInfo.value = newColorTypeList.value[current.value];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const clothesList = ref([]);
|
const clothesList = ref([]);
|
||||||
const styleType = ref({});
|
const styleType = ref({});
|
||||||
|
|
||||||
|
|
||||||
const chageSwiperBtn = (x) => {
|
const chageSwiperBtn = (x) => {
|
||||||
if (x === -1 && current.value !== 0) {
|
if (x === -1 && current.value !== 0) {
|
||||||
current.value--;
|
current.value--;
|
||||||
@@ -554,81 +453,81 @@ const hairIds = ref([]);
|
|||||||
const avatarList = ref([
|
const avatarList = ref([
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
url: "https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png",
|
url: 'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
url: "https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png",
|
url: 'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
url: "https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png",
|
url: 'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
let luckyTxtList = ref([]);
|
let luckyTxtList = ref([]);
|
||||||
const shengxiaoNumList = ref([1, 2, 3, 4, 5]);
|
const shengxiaoNumList = ref([1, 2, 3, 4, 5]);
|
||||||
const formatText = (text) => {
|
const formatText = (text) => {
|
||||||
text = text.replace(/[\u0000-\u001F]/g, (c) => {
|
text = text.replace(/[\u0000-\u001F]/g, (c) => {
|
||||||
if (c === "\n") return "\\n";
|
if (c === '\n') return '\\n';
|
||||||
if (c === "\r") return "\\r";
|
if (c === '\r') return '\\r';
|
||||||
if (c === "\t") return "\\t";
|
if (c === '\t') return '\\t';
|
||||||
return "";
|
return '';
|
||||||
});
|
});
|
||||||
return text;
|
return text;
|
||||||
};
|
};
|
||||||
const formatPraiseText = (text) => {
|
const formatPraiseText = (text) => {
|
||||||
text = formatText(text);
|
text = formatText(text);
|
||||||
text = JSON.parse(text).choices[0].message.content;
|
text = JSON.parse(text).choices[0].message.content;
|
||||||
text = text.replace(/<\/?strong>/g, "");
|
text = text.replace(/<\/?strong>/g, '');
|
||||||
|
|
||||||
text = text.replace(/<h1>/g, "<div>").replace(/<\/h1>/g, "</div>");
|
text = text.replace(/<h1>/g, '<div>').replace(/<\/h1>/g, '</div>');
|
||||||
|
|
||||||
text = text.replace(/<h2>/g, "<div>").replace(/<\/h2>/g, "</div>");
|
text = text.replace(/<h2>/g, '<div>').replace(/<\/h2>/g, '</div>');
|
||||||
|
|
||||||
text = text.replace(/<h3>/g, "<div>").replace(/<\/h3>/g, "</div>");
|
text = text.replace(/<h3>/g, '<div>').replace(/<\/h3>/g, '</div>');
|
||||||
let list = [];
|
let list = [];
|
||||||
const split1 = text.split("二、核心风格基因解析");
|
const split1 = text.split('二、核心风格基因解析');
|
||||||
list.push(split1[0]);
|
list.push(split1[0]);
|
||||||
split1[1] = "<p>二、核心风格基因解析</p>" + split1[1];
|
split1[1] = '<p>二、核心风格基因解析</p>' + split1[1];
|
||||||
const split2 = split1[1].split("五、关键细节设计:刘海与发色");
|
const split2 = split1[1].split('五、关键细节设计:刘海与发色');
|
||||||
split2[1] = "<p>五、关键细节设计:刘海与发色</p>" + split2[1];
|
split2[1] = '<p>五、关键细节设计:刘海与发色</p>' + split2[1];
|
||||||
list = list.concat(split2);
|
list = list.concat(split2);
|
||||||
return list;
|
return list;
|
||||||
};
|
};
|
||||||
const formatShengXiao = (text) => {
|
const formatShengXiao = (text) => {
|
||||||
text = formatText(text);
|
text = formatText(text);
|
||||||
// text = JSON.parse(text).choices[0].message.content;
|
// text = JSON.parse(text).choices[0].message.content;
|
||||||
text = text.replace(/<h1>/g, "<div>").replace(/<\/h1>/g, "</div>");
|
text = text.replace(/<h1>/g, '<div>').replace(/<\/h1>/g, '</div>');
|
||||||
|
|
||||||
text = text.replace(/<h2>/g, "<div>").replace(/<\/h2>/g, "</div>");
|
text = text.replace(/<h2>/g, '<div>').replace(/<\/h2>/g, '</div>');
|
||||||
|
|
||||||
text = text.replace(/<h3>/g, "<div>").replace(/<\/h3>/g, "</div>");
|
text = text.replace(/<h3>/g, '<div>').replace(/<\/h3>/g, '</div>');
|
||||||
let list = [];
|
let list = [];
|
||||||
const split1 = text.split("二、五行命理与易学幸运色推导");
|
const split1 = text.split('二、五行命理与易学幸运色推导');
|
||||||
list.push(split1[0]);
|
list.push(split1[0]);
|
||||||
split1[1] = "<p>二、五行命理与易学幸运色推导</p>" + split1[1];
|
split1[1] = '<p>二、五行命理与易学幸运色推导</p>' + split1[1];
|
||||||
list.push(split1[1]);
|
list.push(split1[1]);
|
||||||
return list;
|
return list;
|
||||||
};
|
};
|
||||||
|
|
||||||
const customFigure = ref(null);
|
const customFigure = ref(null);
|
||||||
|
|
||||||
const customerStyle = ref("");
|
const customerStyle = ref('');
|
||||||
|
|
||||||
const getPraiseText = (callWord, type) => {
|
const getPraiseText = (callWord, type) => {
|
||||||
let params = {
|
let params = {
|
||||||
// model: "doubao-seed-1-6-250615",
|
// model: "doubao-seed-1-6-250615",
|
||||||
model: "doubao-seed-1-6-flash-250715",
|
model: 'doubao-seed-1-6-flash-250715',
|
||||||
openId: openId,
|
openId: openId,
|
||||||
text: "",
|
text: '',
|
||||||
type: enterType,
|
type: enterType,
|
||||||
tabType: "",
|
tabType: '',
|
||||||
};
|
};
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
// params.model = "doubao-1-5-thinking-vision-pro-250428";
|
// params.model = "doubao-1-5-thinking-vision-pro-250428";
|
||||||
// params.model = "doubao-seed-1-6-250615";
|
// params.model = "doubao-seed-1-6-250615";
|
||||||
// params.model = "doubao-seed-1-6-flash-250715";
|
// params.model = "doubao-seed-1-6-flash-250715";
|
||||||
params.model = "doubao-1-5-thinking-pro-m-250428";
|
params.model = 'doubao-1-5-thinking-pro-m-250428';
|
||||||
}
|
}
|
||||||
|
|
||||||
let customKey = `客户特征:
|
let customKey = `客户特征:
|
||||||
@@ -686,42 +585,49 @@ const getPraiseText = (callWord, type) => {
|
|||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (callWord === "one") {
|
if (callWord === 'one') {
|
||||||
params.tabType = "hair";
|
params.tabType = 'hair';
|
||||||
params.text = hairText(customKey)
|
params.text = hairText(customKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callWord === "three") {
|
if (callWord === 'three') {
|
||||||
params.tabType = "shengxiao";
|
params.tabType = 'shengxiao';
|
||||||
params.text = shengxiaoText(collect?.value?.birthday, collect?.value?.gender, collect?.value?.work)
|
params.text = shengxiaoText(
|
||||||
|
collect?.value?.birthday,
|
||||||
|
collect?.value?.gender,
|
||||||
|
collect?.value?.work,
|
||||||
|
);
|
||||||
|
|
||||||
params.system_prompt = shengxiaoSystem_prompt
|
params.system_prompt = shengxiaoSystem_prompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callWord === "four") {
|
if (callWord === 'four') {
|
||||||
params.tabType = "stature";
|
params.tabType = 'stature';
|
||||||
params.text = statureText(customKey, collect.value?.straight_total_score_t, collect.value?.total_sense_of_quantity_t, collect.value.dynamic_static_t)
|
params.text = statureText(
|
||||||
|
customKey,
|
||||||
|
collect.value?.straight_total_score_t,
|
||||||
|
collect.value?.total_sense_of_quantity_t,
|
||||||
|
collect.value.dynamic_static_t,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callWord === "five") {
|
if (callWord === 'five') {
|
||||||
params.tabType = "style";
|
params.tabType = 'style';
|
||||||
params.text = styleText(customKey);
|
params.text = styleText(customKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
praiseTextApi(params).then((res) => {
|
praiseTextApi(params).then((res) => {
|
||||||
console.log('res: vvvvvvvvvvvvvvvvvvvv', res);
|
console.log('res: vvvvvvvvvvvvvvvvvvvv', res);
|
||||||
// tabType
|
// tabType
|
||||||
if (callWord === "one") {
|
if (callWord === 'one') {
|
||||||
// console.log("数据是什么1", res.data);
|
// console.log("数据是什么1", res.data);
|
||||||
praiseTextList.value = formatPraiseText(res.data);
|
praiseTextList.value = formatPraiseText(res.data);
|
||||||
} else if (callWord === "two") {
|
} else if (callWord === 'two') {
|
||||||
return;
|
return;
|
||||||
luckyTxtList.value = formatShengXiao(res.data);
|
luckyTxtList.value = formatShengXiao(res.data);
|
||||||
} else if (callWord === "three") {
|
} else if (callWord === 'three') {
|
||||||
let obj = JSON.parse(res.data);
|
let obj = JSON.parse(res.data);
|
||||||
|
|
||||||
|
|
||||||
let shengxiaoContent = JSON.parse(obj.choices[0].message.content).content;
|
let shengxiaoContent = JSON.parse(obj.choices[0].message.content).content;
|
||||||
luckyTxtList.value = formatShengXiao(shengxiaoContent.text);
|
luckyTxtList.value = formatShengXiao(shengxiaoContent.text);
|
||||||
// console.log(shengxiaoContent, "shengxiaoContent");
|
// console.log(shengxiaoContent, "shengxiaoContent");
|
||||||
@@ -741,14 +647,14 @@ const getPraiseText = (callWord, type) => {
|
|||||||
shegnxiaoImgUrl.value = shengxiaoImgList[i].imgUrl;
|
shegnxiaoImgUrl.value = shengxiaoImgList[i].imgUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (callWord === "four") {
|
} else if (callWord === 'four') {
|
||||||
const obj = JSON.parse(res.data);
|
const obj = JSON.parse(res.data);
|
||||||
console.log("obj: ccccccccccccccccccccccccccccc", obj);
|
console.log('obj: ccccccccccccccccccccccccccccc', obj);
|
||||||
const content = obj.choices[0].message.content;
|
const content = obj.choices[0].message.content;
|
||||||
customFigure.value = JSON.parse(content);
|
customFigure.value = JSON.parse(content);
|
||||||
|
|
||||||
console.log('customFigure.value: mmmmmmmmmmmmmmmmm', customFigure.value);
|
console.log('customFigure.value: mmmmmmmmmmmmmmmmm', customFigure.value);
|
||||||
} else if (callWord === "five") {
|
} else if (callWord === 'five') {
|
||||||
const obj = JSON.parse(res.data);
|
const obj = JSON.parse(res.data);
|
||||||
const content = obj.choices[0].message.content;
|
const content = obj.choices[0].message.content;
|
||||||
|
|
||||||
@@ -783,19 +689,16 @@ const getPraiseText = (callWord, type) => {
|
|||||||
|
|
||||||
const getHairstyleList = () => {
|
const getHairstyleList = () => {
|
||||||
hairStyleListApi({
|
hairStyleListApi({
|
||||||
phone: "17600222111",
|
phone: '17600222111',
|
||||||
isPerson: "yes",
|
isPerson: 'yes',
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
hairStyleList.value = res.result;
|
hairStyleList.value = res.result;
|
||||||
// console.log(res, "发型列表 -----------------");
|
// console.log(res, "发型列表 -----------------");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getHairstyleList();
|
getHairstyleList();
|
||||||
|
|
||||||
|
|
||||||
const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
||||||
let tries = 0;
|
let tries = 0;
|
||||||
const poll = (resolve, reject) => {
|
const poll = (resolve, reject) => {
|
||||||
@@ -804,15 +707,15 @@ const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
|||||||
// console.log("轮询结果", ress);
|
// console.log("轮询结果", ress);
|
||||||
if (
|
if (
|
||||||
ress.result[0].url !==
|
ress.result[0].url !==
|
||||||
"https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png" &&
|
'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png' &&
|
||||||
ress.result[1].url !==
|
ress.result[1].url !==
|
||||||
"https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png" &&
|
'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png' &&
|
||||||
ress.result[2].url !==
|
ress.result[2].url !==
|
||||||
"https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png"
|
'https://cdn.meidaojia.com/aidigitalfield/digital_cloth/static/1720084773937.png'
|
||||||
) {
|
) {
|
||||||
resolve(ress);
|
resolve(ress);
|
||||||
} else if (tries >= maxTries) {
|
} else if (tries >= maxTries) {
|
||||||
reject(new Error("轮询超时"));
|
reject(new Error('轮询超时'));
|
||||||
} else {
|
} else {
|
||||||
tries++;
|
tries++;
|
||||||
setTimeout(() => poll(resolve, reject), interval);
|
setTimeout(() => poll(resolve, reject), interval);
|
||||||
@@ -826,9 +729,7 @@ const pollExchangeHairHistory = (requestId, maxTries = 30, interval = 2000) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getColorTypeText = (sj_color_type) => {
|
const getColorTypeText = (sj_color_type) => {
|
||||||
const found = newColorTypeList.value.find(
|
const found = newColorTypeList.value.find((item) => item.typeName + '型' === sj_color_type);
|
||||||
(item) => item.typeName + "型" === sj_color_type
|
|
||||||
);
|
|
||||||
if (found) {
|
if (found) {
|
||||||
colorTypeText.value = found;
|
colorTypeText.value = found;
|
||||||
}
|
}
|
||||||
@@ -848,22 +749,18 @@ const getHair = async (data) => {
|
|||||||
|
|
||||||
const getUserFaceInfo = async () => {
|
const getUserFaceInfo = async () => {
|
||||||
getStyleApi({ openId: openId }).then(async (res) => {
|
getStyleApi({ openId: openId }).then(async (res) => {
|
||||||
newColorTypeList.value = reorderByValue(
|
newColorTypeList.value = reorderByValue(colorTypeList, res?.detail?.sj_color_type);
|
||||||
colorTypeList,
|
|
||||||
res?.detail?.sj_color_type
|
|
||||||
);
|
|
||||||
|
|
||||||
colorTypeInfo.value = newColorTypeList.value[0];
|
colorTypeInfo.value = newColorTypeList.value[0];
|
||||||
|
|
||||||
userFaceInfo.value = res.data || {};
|
userFaceInfo.value = res.data || {};
|
||||||
if (!userFaceInfo.value.avatar_img_url) {
|
if (!userFaceInfo.value.avatar_img_url) {
|
||||||
userFaceInfo.value.avatar_img_url =
|
userFaceInfo.value.avatar_img_url = 'https://llshop.zglvling.com/shop/img/jpg/avatar.jpg';
|
||||||
"https://llshop.zglvling.com/shop/img/jpg/avatar.jpg";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userFaceInfo?.value?.gender === "男") {
|
if (userFaceInfo?.value?.gender === '男') {
|
||||||
faceImgUrl.value =
|
faceImgUrl.value =
|
||||||
"https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/menhairstyles.png";
|
'https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/menhairstyles.png';
|
||||||
let hairInfo = faceList.find((item) => item.id === 8);
|
let hairInfo = faceList.find((item) => item.id === 8);
|
||||||
hairIds.value = hairInfo?.hairStyleIdList;
|
hairIds.value = hairInfo?.hairStyleIdList;
|
||||||
// for(let i =0)
|
// for(let i =0)
|
||||||
@@ -876,32 +773,26 @@ const getUserFaceInfo = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPraiseText('one');
|
||||||
|
getPraiseText('three', 1);
|
||||||
|
getPraiseText('four');
|
||||||
|
getPraiseText('five');
|
||||||
|
|
||||||
getPraiseText("one");
|
getColorTypeText(res?.detail?.sj_color_type || '');
|
||||||
getPraiseText("three", 1);
|
|
||||||
try {
|
|
||||||
|
|
||||||
getPraiseText("four");
|
|
||||||
} catch (error) {
|
|
||||||
console.error('error: ', error);
|
|
||||||
}
|
|
||||||
getPraiseText("five");
|
|
||||||
|
|
||||||
getColorTypeText(res?.detail?.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');
|
||||||
formData.append("isHr", "false");
|
formData.append('isHr', 'false');
|
||||||
formData.append("sex", userFaceInfo?.value.gender);
|
formData.append('sex', userFaceInfo?.value.gender);
|
||||||
formData.append("hairIds", hairIds.value);
|
formData.append('hairIds', hairIds.value);
|
||||||
// 如果有图片/文件需要上传
|
// 如果有图片/文件需要上传
|
||||||
if (blob) {
|
if (blob) {
|
||||||
formData.append("files", blob, "avatar.jpg");
|
formData.append('files', blob, 'avatar.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
let taskInfo = await uploadFormData(formData);
|
let taskInfo = await uploadFormData(formData);
|
||||||
let ress = null;
|
let ress = null;
|
||||||
if (enterType === "weixin") {
|
if (enterType === 'weixin') {
|
||||||
ress = await getHair();
|
ress = await getHair();
|
||||||
} else {
|
} else {
|
||||||
ress = await pollExchangeHairHistory(taskInfo.requestId);
|
ress = await pollExchangeHairHistory(taskInfo.requestId);
|
||||||
@@ -919,16 +810,16 @@ const toHairstyleRoom = (item) => {
|
|||||||
},
|
},
|
||||||
fail(error) {
|
fail(error) {
|
||||||
// alert('错误', error)
|
// alert('错误', error)
|
||||||
console.log("navigateTo error: ", error);
|
console.log('navigateTo error: ', error);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function getScrollHeight() {
|
function getScrollHeight() {
|
||||||
const tabsEl = document.getElementById("headerBox");
|
const tabsEl = document.getElementById('headerBox');
|
||||||
if (tabsEl) {
|
if (tabsEl) {
|
||||||
const rect = tabsEl.getBoundingClientRect();
|
const rect = tabsEl.getBoundingClientRect();
|
||||||
console.log(rect.height, "rect.height");
|
console.log(rect.height, 'rect.height');
|
||||||
|
|
||||||
scrollHeight.value = rect.height;
|
scrollHeight.value = rect.height;
|
||||||
}
|
}
|
||||||
@@ -938,42 +829,40 @@ function onPageScroll(e) {
|
|||||||
let scrollTop = e && e.scrollTop !== undefined ? e.scrollTop : window.scrollY;
|
let scrollTop = e && e.scrollTop !== undefined ? e.scrollTop : window.scrollY;
|
||||||
if (scrollTop > scrollHeight.value) {
|
if (scrollTop > scrollHeight.value) {
|
||||||
//277是需要固定的地方到顶部的距离
|
//277是需要固定的地方到顶部的距离
|
||||||
classFixed.value = "fixed";
|
classFixed.value = 'fixed';
|
||||||
} else {
|
} else {
|
||||||
classFixed.value = "";
|
classFixed.value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getScrollHeight();
|
getScrollHeight();
|
||||||
window.addEventListener("scroll", onPageScroll);
|
window.addEventListener('scroll', onPageScroll);
|
||||||
});
|
});
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
window.removeEventListener("scroll", onPageScroll);
|
window.removeEventListener('scroll', onPageScroll);
|
||||||
});
|
});
|
||||||
getStyleApi({ openId })
|
getStyleApi({ openId }).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
styleType.value = res.data;
|
styleType.value = res.data;
|
||||||
})
|
});
|
||||||
// .then(() => {
|
// .then(() => {
|
||||||
// getUserFaceInfo();
|
// getUserFaceInfo();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (collect.value) {
|
if (collect.value) {
|
||||||
getUserFaceInfo()
|
getUserFaceInfo();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
function onTabChange(tabIndex) {
|
function onTabChange(tabIndex) {
|
||||||
// H5端滚动到id=tabs的位置
|
// H5端滚动到id=tabs的位置
|
||||||
if (
|
if (
|
||||||
typeof window !== "undefined" &&
|
typeof window !== 'undefined' &&
|
||||||
activeTab.value !== tabIndex &&
|
activeTab.value !== tabIndex &&
|
||||||
!!window.scrollY &&
|
!!window.scrollY &&
|
||||||
window.scrollY > scrollHeight.value
|
window.scrollY > scrollHeight.value
|
||||||
) {
|
) {
|
||||||
window.scrollTo({ top: scrollHeight.value, behavior: "smooth" });
|
window.scrollTo({ top: scrollHeight.value, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
activeTab.value = tabIndex;
|
activeTab.value = tabIndex;
|
||||||
}
|
}
|
||||||
@@ -984,14 +873,14 @@ function onTabChange(tabIndex) {
|
|||||||
padding: 20px 20px 0;
|
padding: 20px 20px 0;
|
||||||
}
|
}
|
||||||
.report-title {
|
.report-title {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
}
|
}
|
||||||
.report-title-en {
|
.report-title-en {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
@@ -1087,14 +976,14 @@ function onTabChange(tabIndex) {
|
|||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
.swiper-type-name {
|
.swiper-type-name {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
letter-spacing: 94%;
|
letter-spacing: 94%;
|
||||||
}
|
}
|
||||||
.swiper-type-name-en {
|
.swiper-type-name-en {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
@@ -1104,7 +993,7 @@ function onTabChange(tabIndex) {
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
.swiper-type-text {
|
.swiper-type-text {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
@@ -1116,7 +1005,7 @@ function onTabChange(tabIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.html-rich-text {
|
.html-rich-text {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
@@ -1151,7 +1040,7 @@ function onTabChange(tabIndex) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
@@ -1269,7 +1158,7 @@ function onTabChange(tabIndex) {
|
|||||||
}
|
}
|
||||||
.style-type {
|
.style-type {
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
font-family: "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
color: #031c24;
|
color: #031c24;
|
||||||
/* font-family: Molengo; */
|
/* font-family: Molengo; */
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -1280,7 +1169,7 @@ function onTabChange(tabIndex) {
|
|||||||
background-color: red; */
|
background-color: red; */
|
||||||
}
|
}
|
||||||
.trends-title {
|
.trends-title {
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -1320,7 +1209,7 @@ function onTabChange(tabIndex) {
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
margin-top: 28px;
|
margin-top: 28px;
|
||||||
font-family: "PingFang SC", "Microsoft YaHei", "Arial", sans-serif !important;
|
font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial', sans-serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: Regular;
|
font-style: Regular;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ const ReportApi = {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
getUserAvatar: () =>
|
||||||
|
request({
|
||||||
|
url: '/member/user/get ',
|
||||||
|
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