Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/lanecarford_front
This commit is contained in:
@@ -26,12 +26,12 @@
|
||||
}
|
||||
const onReload = () => {
|
||||
customizeInfo.inputText = customizeInfo.oldInputText
|
||||
generate("reload")
|
||||
generate('reload')
|
||||
customizeInfo.inputText = ''
|
||||
}
|
||||
|
||||
// 生成结果
|
||||
const generate = (type?: "reload") => {
|
||||
const generate = (type?: 'reload') => {
|
||||
customizeInfo.oldInputText = customizeInfo.inputText
|
||||
customizeInfo.oldTryOnId = customizeInfo.tryOnId
|
||||
const data = {
|
||||
@@ -39,14 +39,15 @@
|
||||
visitRecordId: generateStore.visitRecordId,
|
||||
styleId: generateStore.styleId,
|
||||
// modelPhotoId: generateStore.modelPhotoId,
|
||||
originalTryOnId: type === "reload" ? customizeInfo.oldTryOnId : generateStore.originalTryOnId,
|
||||
originalTryOnId: type === 'reload' ? customizeInfo.oldTryOnId : generateStore.originalTryOnId,
|
||||
isRegenerated: 1,
|
||||
prompt: customizeInfo.inputText
|
||||
}
|
||||
if (generateStore.customerPhotoId && customizeInfo.count === 0) data["customerPhotoId"] = generateStore.customerPhotoId
|
||||
if (generateStore.customerPhotoId && customizeInfo.count === 0)
|
||||
data['customerPhotoId'] = generateStore.customerPhotoId
|
||||
loading.value = true
|
||||
generateTryOnEffect(data)
|
||||
.then((res:any) => {
|
||||
.then((res: any) => {
|
||||
customizeInfo.count++
|
||||
customizeInfo.tryOnId = res.tryOnId
|
||||
customizeInfo.tryOnUrl = res.tryOnUrl
|
||||
@@ -92,41 +93,41 @@
|
||||
<template>
|
||||
<header-title style-type="2" />
|
||||
<div class="loading" v-if="loading"><generate-loading /></div>
|
||||
<template v-else>
|
||||
<div class="customize">
|
||||
<div class="title">Customize your Look!</div>
|
||||
<p class="tip">Refine your Look</p>
|
||||
<div class="input-box">
|
||||
<div class="help">?</div>
|
||||
<input
|
||||
type="text"
|
||||
v-model="customizeInfo.inputText"
|
||||
@keyup.enter="onSend"
|
||||
placeholder="Try: “Change background to Tokyo City”"
|
||||
/>
|
||||
<div class="send" @click="onSend"><SvgIcon name="send" size="48" /></div>
|
||||
<div class="customize" v-else>
|
||||
<div class="title">Customize your Look!</div>
|
||||
<p class="tip">Refine your Look</p>
|
||||
<div class="input-box">
|
||||
<div class="help">?</div>
|
||||
<input
|
||||
type="text"
|
||||
v-model="customizeInfo.inputText"
|
||||
@keyup.enter="onSend"
|
||||
placeholder="Try: “Change background to Tokyo City”"
|
||||
/>
|
||||
<div class="send" @click="onSend"><SvgIcon name="send" size="48" /></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<img :src="customizeInfo.tryOnUrl" />
|
||||
<div class="select-box">
|
||||
<div class="icon"><SvgIcon name="history" size="35" /></div>
|
||||
<div class="label">History</div>
|
||||
<div class="icon"><SvgIcon name="xialajiantou" size="29" /></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<img :src="customizeInfo.tryOnUrl" />
|
||||
<div class="select-box">
|
||||
<div class="icon"><SvgIcon name="history" size="35" /></div>
|
||||
<div class="label">History</div>
|
||||
<div class="icon"><SvgIcon name="xialajiantou" size="29" /></div>
|
||||
<div class="icons">
|
||||
<div @click="onLove">
|
||||
<SvgIcon :name="`love_${customizeInfo.isFavorite ? 1 : 0}`" size="35" />
|
||||
</div>
|
||||
<div class="icons">
|
||||
<div @click="onLove">
|
||||
<SvgIcon :name="`love_${customizeInfo.isFavorite ? 1 : 0}`" size="35" />
|
||||
</div>
|
||||
<div @click="onReload" v-show="customizeInfo.oldInputText"><SvgIcon name="reload" size="35" /></div>
|
||||
<!-- <div @click="onDownload"><SvgIcon name="download" size="35" /></div> -->
|
||||
<div @click="onReload" v-show="customizeInfo.oldInputText">
|
||||
<SvgIcon name="reload" size="35" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<button @click="onFinish">Finish</button>
|
||||
<!-- <div @click="onDownload"><SvgIcon name="download" size="35" /></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<footer-navigation />
|
||||
</template>
|
||||
<div class="btns">
|
||||
<button @click="onFinish">Finish</button>
|
||||
</div>
|
||||
</div>
|
||||
<footer-navigation />
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
@@ -64,11 +64,11 @@ defineExpose({})
|
||||
margin-top: 6.8rem;
|
||||
font-size: 9.6rem;
|
||||
line-height: 124%;
|
||||
background: radial-gradient(99.56% 47.68% at 99.56% 93.08%, #E6E6E6 0%, #443E37 100%) /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */,
|
||||
linear-gradient(120.09deg, #B3B3B3 0%, rgba(255, 255, 255, 0) 35.41%);
|
||||
background: #B3B3B3;
|
||||
background: linear-gradient(120deg, #b3b3b3 1%, rgba(0, 0, 0, 0) 48%), linear-gradient(
|
||||
344deg, #B3B3B2 16%, #000000 66%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
color: transparent; /* 文字本身透明,显示渐变背景 */
|
||||
background-clip: text;
|
||||
}
|
||||
> .navBox{
|
||||
|
||||
@@ -181,6 +181,7 @@ const { isLoading } = toRefs(data);
|
||||
<div class="loading-container" v-if="isLoading">
|
||||
<GenerateLoading title="Generating Results..." />
|
||||
</div>
|
||||
<footer-navigation is-placeholder/>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.product{
|
||||
@@ -281,9 +282,10 @@ const { isLoading } = toRefs(data);
|
||||
.loading-container{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
padding-top: 36.6rem;
|
||||
}
|
||||
.feedback{
|
||||
position: relative;
|
||||
@@ -294,6 +296,7 @@ const { isLoading } = toRefs(data);
|
||||
> .succeedIcon{
|
||||
width: 12.8rem;
|
||||
height: 12.8rem;
|
||||
margin-top: 11.6rem;
|
||||
> img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { onMounted, onUnmounted, reactive, toRefs, computed, onActivated } from "vue";
|
||||
import SelectItem from "@/components/selectStyle/selectItem.vue";
|
||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import FooterNavigation from '@/components/FooterNavigation.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGenerateStore, useUserInfoStore } from '@/stores'
|
||||
import { showToast } from 'vant';
|
||||
@@ -122,14 +123,15 @@ const { styleList, select } = toRefs(data);
|
||||
<SelectItem :selectList="styleList" v-model:select="select" @selectItem="selectItem" @updateStyle="updateStyle" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer placeholder"></div>
|
||||
<!-- <div class="footer placeholder"></div> -->
|
||||
<div class="footer">
|
||||
<button @click.stop="toProduct">Continue</button>
|
||||
</div>
|
||||
<footer-navigation is-placeholder />
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.header-title {
|
||||
--header-title-background: #f6f6f6;
|
||||
// --header-title-background: #f6f6f6;
|
||||
}
|
||||
.selectStyle{
|
||||
width: 100%;
|
||||
@@ -144,7 +146,7 @@ const { styleList, select } = toRefs(data);
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-top: 3.4rem;
|
||||
margin-bottom: 7.2rem;
|
||||
margin-bottom: 4.9rem;
|
||||
> .title{
|
||||
font-family: satoshiBold;
|
||||
font-weight: 700;
|
||||
@@ -159,13 +161,13 @@ const { styleList, select } = toRefs(data);
|
||||
}
|
||||
}
|
||||
.selectContent{
|
||||
padding: 0 3.5rem;
|
||||
padding: 0 4rem;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
position: fixed;
|
||||
// position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
Reference in New Issue
Block a user