Merge branch 'main' of http://18.167.251.121:10003/aidlab/lanecarford_front
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped

This commit is contained in:
李志鹏
2025-12-29 14:50:33 +08:00
16 changed files with 312 additions and 149 deletions

View File

@@ -1,9 +1,7 @@
<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <?xml version="1.0" encoding="UTF-8"?>
<rect width="44" height="44" fill="url(#pattern0_27_31213)"/> <svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 880 860.38">
<defs> <path d="M0,778.02v-31c5.85-.83,5.72-6.77,7.59-9.91,8.69-14.56,35.82-36.92,48.91-50.09,132.41-133.33,265.22-266.72,399-399,24.48-24.21,50.22-64.36,90.41-43.4,11.6,6.05,52.53,47.35,62.07,58.93,36.58,44.38-10.81,75.6-38.98,103.98-134.47,135.49-269.91,271.36-406,406-16.26,16.09-36.44,43.61-60.47,46.53-29.22,3.55-48.2-22.96-66.04-41.03-9.24-9.36-21.12-18.28-28.34-29.66-2.17-3.42-2.85-10.44-8.15-11.35ZM411.35,365.37c-2.17,2.21-15.35,15.62-15.83,16.67-.89,1.93-.9,4.04,0,5.97,13.11,12.89,26.45,25.54,39.5,38.49,9.43,9.36,18.54,18.95,28.02,27.98,3.81,3.63,7.06,10.05,13.42,10.57l111.05-110.01c8.1-9.65,12.08-18.21,5.33-30.36-3.97-7.14-45.89-48.98-53.82-55.18-15.22-11.91-27.19-3.82-38.92,7.13-29.56,27.59-60.23,59.7-88.75,88.75ZM45.35,731.37c-11.89,12.23-27.69,25.33-17.21,44.01,4.11,7.33,43.34,46.29,51.36,52.64,12.24,9.71,22.88,9.89,35.03.02l338.5-338.5c2.02-1.93,3.87-4.47,2.24-7.24l-76.71-77.33c-6.81-3.73-7.97,2-11.53,5.57-106.81,107.19-216.25,212.35-321.68,320.82Z"/>
<pattern id="pattern0_27_31213" patternContentUnits="objectBoundingBox" width="1" height="1"> <path d="M880,334.02v17c-5.37-.47-7.34,5.21-11.28,7.22-8.66,4.42-23.83,6.25-34.09,10.91-26.75,12.14-29.6,29.14-37.9,54.1-3.19,9.58-7.95,22.23-20.19,21.83-17.04-.55-18.67-24.85-23.04-37.04-6.38-17.79-17.31-31.49-34.79-39.21-12.9-5.7-50.73-9.57-44.24-30.86,4.1-13.47,23.9-15.02,35.08-18.92,23.2-8.09,37.12-22.61,45.17-45.83,3.07-8.85,4.36-25.17,12.91-31.09,13.68-9.47,24.05,3.61,28.11,15.65,5.67,16.79,7.2,30.82,20.37,44.63,16.19,16.99,35.71,15.07,53.62,24.38,3.37,1.75,6.17,6.34,10.28,7.22ZM776.74,289.16c-4.56.64-5.93,9.79-7.87,13.23-4.92,8.72-16.76,21.22-24.93,27.07-3.39,2.43-27.4,12.25-17.91,17.04,1.57.79,3.84.48,5.69,1.3,14.82,6.58,27.91,19.11,36.1,32.9,2.41,4.06,4.1,13.24,9.67,13.25,5.06.01,6.38-9.04,8.68-13.25,7.33-13.41,22.11-26.66,36.1-32.9,2.84-1.26,8.25-.22,7.76-5.23-.43-4.4-10.52-7.04-13.94-9.15-10.29-6.37-25.31-20.31-30.97-31.03-1.68-3.19-3.2-13.95-8.4-13.22Z"/>
<use xlink:href="#image0_27_31213" transform="scale(0.0078125)"/> <path d="M372.75.26c17.02-2.7,21.7,16.54,25.74,28.78.66,2,.35,4.18.97,6.03,13.37,39.65,24.62,56.65,65.57,70.43,12.7,4.27,34.46,6.35,40.83,19.17,3.04,6.11.84,15.15-3.82,19.9-7.28,7.4-39.68,13.7-51.41,18.59-18.8,7.84-36.26,25.05-44.04,43.96-4.84,11.74-11.29,45.73-19.62,52.38-9.65,7.7-21.8,4.05-27.82-6.11-7.31-12.34-9.82-36.44-16.95-51.05-15.65-32.09-39.88-37.6-70.19-47.81-6.54-2.2-20.02-5.97-23.84-11.16-7.42-10.08-4.71-18.67,3.87-26.8,29-11.22,57.77-13.95,78.99-39.01,16.65-19.67,17.52-40.92,26.48-63.52,2.43-6.14,8.52-12.7,15.25-13.77ZM373.63,45.09c-3.49,2.24-2.14,6.63-3.08,9.98-8.8,31.51-36.03,59.55-66.76,70.24-3.39,1.18-14.11,1.7-14.73,5.33-.78,4.51,19.66,9.4,23.63,11.19,23.74,10.71,47.33,35.36,55.8,60.2,1.49,4.36,1.94,11.23,3.41,14.59.55,1.24.82,2.54,2.58,2.47,1.5-.08,2.17-1.03,2.94-2.13,3.14-4.52,5.53-17.08,8.16-22.84,9.96-21.83,30.88-42.46,52.72-52.28,5.99-2.69,14.22-4.36,20.1-6.9,13.11-5.67-3.32-7.16-6.66-8.15-28.02-8.37-54.24-31.06-66.23-57.77-1.97-4.39-6.53-21.22-8.95-23.05-.95-.72-1.67-1.23-2.94-.86Z"/>
</pattern> <path d="M636.71,457.23c20.94-4.69,20.95,15.78,25.59,28.99,5.11,14.55,14.97,26.74,29.53,32.47,9.09,3.58,25.95,5.73,31.6,13.4,9.34,12.66-1.53,22.37-13.25,26.61-18.27,6.61-33.98,7.98-43.9,28.1-6.28,12.74-8.15,46.13-30.23,38.68-10.99-3.71-14.09-28.07-18.87-38.13-5.97-12.57-17.69-20.98-30.64-25.36-3.51-1.19-7.43-1.16-10.72-2.28-6.67-2.26-17.88-7.24-18.84-15.15-2.53-20.97,22.31-20.38,35.96-26.09,8.39-3.51,21.6-16.31,25.26-24.74,4.28-9.87,6.48-33.79,18.51-36.49ZM676.76,545.79c5.98-5.71-8.51-11.82-11.7-14.33-6.14-4.82-12.27-10.92-16.47-17.53-1.39-2.19-3.02-9.96-6.08-9.97-2.5,0-11.59,15.35-14.51,18.56-5.69,6.22-13.07,9.73-19.02,14.98-8.94,7.88,1.05,8.3,5.39,10.67,4.81,2.63,14.75,12.4,18.08,16.92,2.63,3.58,6.01,13.02,10.06,13.03s3.7-4.8,5.7-8.4c2.93-5.27,16.66-19.78,21.87-22.13,1.99-.9,5.35-.52,6.69-1.81Z"/>
<image id="image0_27_31213" width="128" height="128" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAACdpJREFUeJztnXmsXUUdxz9vgVff6ysSw1Yr4bmgQaDWxAJqoWnFgoW6YkQrMXE3BmONRomKC+ASlX8QgohEgoAIKkFU6lYLAoq4gQUiVSi0arW12+vy2tfrH783uWfmzLnnLme7c36fZBLeOefO/Mr3d85sv5kBpdYMlW1ATiwF3gE8G3gUOFiqNUqhrAIakfT9cs1RimQWsA3bARrAwjKNqjKDZRuQMUuBwzzXX1+0IUo5fIP4298A1pVplFIMg8Am/A7QAI4vz7TqElIV8DLgmMjfv3HuryjQFqUEvoD9xp8K/C/y9z3lmabkzRDwFE2xnwQGgBsi1w4CzyvLQCVf3o799l8yc/0s5/qVpVin5Moc4AmaIk8BEzP3hoD1zr35xZuo5MUAcBP2W36188wFzv2HEKdR+pwB4KvY4m4GjnKeGwTWOs/9HBgrzFIlc+YAN2KLOg2cm/D8BLDVef4B4Lm5W6pkyiDwNuAfxAd6VqX89nRgr/ObncBFwOyc7FUyYAAZ5LkM2EBc+GngI23m9SpguyeP7cA3gbOBkQxtV7pkBOnCXQU8TfLw7mY6H+E7Efhzizx3ALcgX5rDe/x3KF3wYfxTutG0H5n4cRt87TKCfPqjI4W+NIV8GfSrUBBn0lqQDcClZNd4Oxy4EHgwpdzPZlSeksLn8QtwNzK2P5Bj2RPAdUibwi1/TY7lKhHcId1o2gpcD7yabGcx5wNfw9+zSBpcUnLiEOB2Wn+OG8DjwEp6c4RXEh8g8qVHkOBSpUBOA74MPEZrcdYAx3WY92ySI4dM+jfS+FuBOKVSIi8CPgbci0zpumJtQd7mdpiHzAX4RP8b8CXgFYQVKBMUL0Dq4yls8fYAS1J+Ow+JE3CF/yntO5B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GBW/xqj4NUbFrzEqfo1R8WuMil9jVPwao+LXGBW/xswlzGNWlDYYJH7MqIpfI85Hxa810aPG9pPvWjSt8ytIdG37XTmWo29+RdlHU5CrcypDxa8wT9MU5b4c8j8KFb/S3IQtTpanTqj4fcBibIF2zVzrFRW/j7iRbJ1Axe8zRpHdK7JwAhW/T/EdozIJLOkgD+3n9zm9OIGKHwjdOIGKHxidOIGKHyjjxBuGe4FPI5NFRyATSRtR8YPF9yVolVT8ABmn9alaJj0FnFiSjUrODAMXE9/ZsoGcdvEdpP+v9BmdHkYwB9n98gTgEOTcu9XI268oSr/xf9AP/uWnP9byAAAAAElFTkSuQmCC"/> </svg>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -48,11 +48,11 @@ const {} = toRefs(data);
left: 50%; left: 50%;
border-radius: var(--gradientButtonBorderRadius); border-radius: var(--gradientButtonBorderRadius);
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background: linear-gradient(125deg, background: linear-gradient(156deg,
#f1f1f1 0%, #d3d3d3 0%,
#000 40%, #8a8682 40%,
#000 65%, #8a8682 65%,
#fff 100%); #ebebeb 100%);
} }
} }
</style> </style>

View File

@@ -82,22 +82,11 @@ const {} = toRefs(data);
</div> </div>
<div class="mask" v-if="item.id == select?.oldId"></div> <div class="mask" v-if="item.id == select?.oldId"></div>
</div> </div>
<div class="btn"> <!-- <div class="btn">
<!-- <div>
<SvgIcon v-if="!item.isLike" @click.stop="setLike(item,'like')" name="noLike" size="30" />
<SvgIcon v-else name="like" @click.stop="setLike(item,'noLike')" color="#FF4949" size="30" />
</div> -->
<div> <div>
<SvgIcon @click.stop="updateStyle(item,index)" name="update" size="30" /> <SvgIcon @click.stop="updateStyle(item,index)" name="update" size="30" />
</div> </div>
<!-- <div> </div> -->
<SvgIcon v-if="!item.isAdd" @click.stop="addLibrary(item,'add')" name="add" size="30" />
<SvgIcon v-else @click.stop="addLibrary(item,'delete')" name="confirmation" size="30" />
</div> -->
<!-- <div>
<SvgIcon @click.stop="deleteStyle(index)" name="delete" size="30" />
</div> -->
</div>
</div> </div>
</div> </div>
@@ -109,7 +98,7 @@ const {} = toRefs(data);
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
> .item{ > .item{
width: calc(50% - 3.1rem / 2); width: calc(50% - 3.5rem / 2);
position: relative; position: relative;
// margin-bottom: 3.3rem; // margin-bottom: 3.3rem;
display: flex; display: flex;
@@ -126,7 +115,7 @@ const {} = toRefs(data);
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
height: 45rem; height: 45rem;
margin: 2.4rem 0; margin: 2.3rem 0;
background-color: #fff; background-color: #fff;
justify-content: center; justify-content: center;
border: .6px solid #acacac; border: .6px solid #acacac;
@@ -170,26 +159,26 @@ const {} = toRefs(data);
// max-height: 50%; // max-height: 50%;
} }
} }
> .btn{ // > .btn{
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: flex-end; // justify-content: flex-end;
> div{ // > div{
color: #000; // color: #000;
margin-right: 1.2rem; // margin-right: 1.2rem;
border-radius: 50%; // border-radius: 50%;
width: 5.2rem; // width: 5.2rem;
height: 5.2rem; // height: 5.2rem;
padding: 1rem; // padding: 1rem;
background-color: #fff; // background-color: #fff;
&:last-child{ // &:last-child{
margin-right: 0rem; // margin-right: 0rem;
} // }
&:hover{ // &:hover{
color: #000; // color: #000;
} // }
} // }
} // }
} }
} }
</style> </style>

View File

@@ -121,7 +121,7 @@ const router = createRouter({
{ {
path: '/workshop/selectStyle', path: '/workshop/selectStyle',
name: 'selectStyle', name: 'selectStyle',
component: () => import('../views/Workshop/selectStyle.vue'), component: () => import('../views/Workshop/selectStyle/index.vue'),
meta: { verify: () => VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {

View File

@@ -15,7 +15,12 @@ export const useGenerateStore = defineStore({
isLike: false, //是否喜欢 isLike: false, //是否喜欢
status: '' status: ''
}, },
styleList: [{}, {}, {}, {}], styleList: [
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
],
model: { model: {
id: '' id: ''
}, },
@@ -98,6 +103,12 @@ export const useGenerateStore = defineStore({
taskId:'', taskId:'',
status: '' status: ''
} }
this.styleList = [
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
]
}, },
//模特相关 //模特相关
selectModel(data: any) { selectModel(data: any) {
@@ -107,7 +118,12 @@ export const useGenerateStore = defineStore({
this.isGenerate = isGenerate this.isGenerate = isGenerate
}, },
clearProductData() { clearProductData() {
this.styleList = [{}, {}, {}, {}] this.styleList = [
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
]
this.style = { this.style = {
id: '', id: '',
path: '', path: '',

View File

@@ -19,20 +19,6 @@ const navDisabledList = ref([])
// const data = reactive({ // const data = reactive({
// }) // })
const clickSwitchVIPID = ()=>{
showConfirmDialog({
title: 'Switch VIP ID?',
message: 'You have unsaved changes. Your progress will be lost.',
confirmButtonText: 'Yes',
cancelButtonText: 'Cancel',
})
.then(() => {
MyEvent.emit('clear-generate-state')
MyEvent.emit('clearAllCache')
router.push({ name: 'customer', query: { demo: 1 } })
})
.catch(() => {})
}
const openFlow = (item: any)=>{ const openFlow = (item: any)=>{
item.click && item.click() item.click && item.click()
const query = route.query const query = route.query

View File

@@ -21,8 +21,11 @@
<header-title @clickProfile="handleClickProfile" /> <header-title @clickProfile="handleClickProfile" />
<RouteCache view-type="1" /> <RouteCache view-type="1" />
<footer-navigation v-if="notShowFooter" /> <footer-navigation v-if="notShowFooter" />
<template>
<profile ref="profileRef" />
</template>
</div> </div>
<profile ref="profileRef" />
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.workshop { .workshop {

View File

@@ -166,6 +166,7 @@
// 打开customer选择时关闭profile弹窗 如果不是点击confirem关闭则重新打开profile弹窗 // 打开customer选择时关闭profile弹窗 如果不是点击confirem关闭则重新打开profile弹窗
const handleShowPopup = (flag: boolean) => { const handleShowPopup = (flag: boolean) => {
showSwitchCustomerPopup.value = flag showSwitchCustomerPopup.value = flag
if (props.isCustomer) return
show.value = !flag show.value = !flag
if (flag) { if (flag) {
loadCustomers(true) loadCustomers(true)
@@ -197,15 +198,15 @@
} }
MyEvent.add('update-customer-list', handleFetchCustomerList) MyEvent.add('update-customer-list', handleFetchCustomerList)
const openSwitchCustomerPopup = (flag = true) => { // const openSwitchCustomerPopup = (flag = true) => {
showSwitchCustomerPopup.value = flag // showSwitchCustomerPopup.value = flag
} // }
onMounted(() => { onMounted(() => {
handleFetchCustomerList() handleFetchCustomerList()
}) })
defineExpose({ open, close, openSwitchCustomerPopup }) defineExpose({ open, close, handleShowPopup })
</script> </script>
<template> <template>
@@ -319,12 +320,13 @@
<img v-show="item.checked" class="checked-icon" src="@/assets/images/checked.png" /> <img v-show="item.checked" class="checked-icon" src="@/assets/images/checked.png" />
</div> </div>
</div> </div>
</div> <div class="list-footer">
<div class="list-footer"> <div v-if="pager.loading">Loading...</div>
<div v-if="pager.loading">Loading...</div> <div v-else-if="pager.noMore">No more</div>
<div v-else-if="pager.noMore">No more</div> </div>
</div> </div>
<div class="confirm-btn" @click="handleSelectCustomer">Confirm</div> <div class="confirm-btn" @click="handleSelectCustomer">Confirm</div>
<div class="van-safe-area-bottom"></div>
</van-popup> </van-popup>
</template> </template>

View File

@@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, onUnmounted, reactive, toRefs, computed, ref } from "vue"; import { onMounted, onUnmounted, reactive, toRefs, computed, ref } from "vue";
import SelectItem from "@/components/selectStyle/selectItem.vue";
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { useGenerateStore, useUserInfoStore, useHGenerateStore } from '@/stores' import { useGenerateStore, useUserInfoStore, useHGenerateStore } from '@/stores'
import { showToast } from 'vant'; import { showToast } from 'vant';
@@ -9,7 +8,7 @@ import { generateRequestOutfit, getRequestOutfit, setStyleFavorite, cancelStyleF
import { FlowType, IsHistoryFlow } from '@/types/enum' import { FlowType, IsHistoryFlow } from '@/types/enum'
import GenerateLoading from '@/views/asistant/components/GenerateLoading.vue' import GenerateLoading from '@/views/asistant/components/GenerateLoading.vue'
import gradientButton from '@/components/gradientButton.vue' import gradientButton from '@/components/gradientButton.vue'
import StyleListDom from '@/views/Workshop/selectStyle/styleList.vue'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
//const props = defineProps({ //const props = defineProps({
@@ -32,7 +31,10 @@ const loadingTitle = computed(()=>{
let data = reactive({ let data = reactive({
select:computed(()=>generateStore.style), select:computed(()=>generateStore.style),
// styleList:computed(()=>generateStore.styleList), styleList:computed(()=>generateStore.styleList),
})
let dataDom = reactive({
styleListVue:null,
}) })
let getGenerateTime = null as any let getGenerateTime = null as any
@@ -40,7 +42,7 @@ let getGenerateTime = null as any
const updateStyle = ()=>{ const updateStyle = ()=>{
// generateStore.updateStyle(item) // generateStore.updateStyle(item)
// data.styleList[index] = {} // data.styleList[index] = {}
requestOutfit({num:1}) requestOutfit({num:4})
} }
const setLikeStyle = (likeStyle)=>{ const setLikeStyle = (likeStyle)=>{
if(!select.value.id)return if(!select.value.id)return
@@ -71,7 +73,7 @@ const toProduct = ()=>{
} }
const requestOutfit = async ({num})=>{ const requestOutfit = async ({num})=>{
let rv = await new Promise<void>((resolve, reject) => { let rv:any = await new Promise<void>((resolve, reject) => {
if(isHistoryFlow.value){ if(isHistoryFlow.value){
retrieveAndRegenerate({tryOnEffectsId:hGenerateStore.originalTryOn.id}).then((rv:any)=>{ retrieveAndRegenerate({tryOnEffectsId:hGenerateStore.originalTryOn.id}).then((rv:any)=>{
resolve(rv) resolve(rv)
@@ -93,41 +95,59 @@ const requestOutfit = async ({num})=>{
isLoading.value = true isLoading.value = true
generateStore.clearStyle() generateStore.clearStyle()
data.select.taskId = rv[0] data.select.taskId = rv[0]
rv.forEach((item,index)=>data.styleList[index].taskId = item)
getRequestOutfitList(rv) getRequestOutfitList(rv)
} }
const getRequestOutfitList = (generateList)=>{ const getRequestOutfitList = (generateList)=>{
let value = {requestIDs:generateList.join(',')} let value = {requestIDs:generateList.join(',')}
getRequestOutfit(value).then((rv:any)=>{ getRequestOutfit(value).then((rv:any)=>{
let selectIndex = rv.findIndex((item)=>item.requestId == data.select.taskId)
if(selectIndex != -1){
data.select.id = rv[selectIndex].id
data.select.path = rv[selectIndex].path
data.select.status = rv[selectIndex].status
}
rv.forEach((item)=>{ rv.forEach((item)=>{
data.select.id = item.id let index = data.styleList.findIndex((styleListItem)=>styleListItem?.taskId == item.requestId)
data.select.path = item.path data.styleList[index] = {
data.select.status = item.status id: item.id,
taskId: item.requestId,
status: item.status,
path: item.path,
}
}) })
if(['RUNNING','PENDING'].includes(data.select.status)){ if(['SUCCEEDED'].includes(data.select.status))isLoading.value = false
const taskIdList = data.styleList
.filter(item => item?.taskId && item?.status !== 'SUCCEEDED')
.map(item => item.taskId);
if(taskIdList.length > 0){
getGenerateTime = setTimeout(()=>{ getGenerateTime = setTimeout(()=>{
getRequestOutfitList([data.select.taskId]) getRequestOutfitList(taskIdList)
},3000) },3000)
}else{
isLoading.value = false
} }
}) })
} }
const styleListInit = ()=>{
dataDom.styleListVue.init(data.select)
}
onMounted(()=>{ onMounted(()=>{
// generateStore.clearProductData() // generateStore.clearProductData()
// if(!data.styleList[0]?.id)getRequestOutfitList(0) // if(!data.styleList[0]?.id)getRequestOutfitList(0)
if(getGenerateTime)clearTimeout(getGenerateTime) if(getGenerateTime)clearTimeout(getGenerateTime)
if(data.select.status == 'SUCCEEDED'){ const taskIdList = data.styleList
.filter(item => item?.taskId && item?.status !== 'SUCCEEDED')
.map(item => item.taskId);
if(data.select.status == 'SUCCEEDED' && taskIdList.length == 0){
return return
}else if(!data.select?.taskId){ }else if(!data.select?.taskId){
requestOutfit({num:1}) requestOutfit({num:4})
}else if(data.select.status != 'SUCCEEDED'){ }else if(data.select.status != 'SUCCEEDED' || taskIdList.length > 0){
isLoading.value = true if(data.select.status != 'SUCCEEDED')isLoading.value = true
// let generateList = [data.styleList[0].taskId] getRequestOutfitList(taskIdList)
getRequestOutfitList([data.select.taskId])
} }
}) })
onUnmounted(()=>{ onUnmounted(()=>{
@@ -135,6 +155,7 @@ onUnmounted(()=>{
}) })
defineExpose({}) defineExpose({})
const { select } = toRefs(data); const { select } = toRefs(data);
const { styleListVue } = toRefs(dataDom);
</script> </script>
<template> <template>
<div class="selectStyle"> <div class="selectStyle">
@@ -151,14 +172,24 @@ const { select } = toRefs(data);
<div class="imgBox"> <div class="imgBox">
<img :src="select.path" alt=""> <img :src="select.path" alt="">
</div> </div>
<div class="btn"> <div class="chooseMore" @click.stop="styleListInit">
<gradientButton>
<template #content>
<div class="text">
Choose More
</div>
</template>
</gradientButton>
<div></div>
</div>
<!-- <div class="btn">
<div class="like" @click.stop="setLikeStyle(select.isLike)"> <div class="like" @click.stop="setLikeStyle(select.isLike)">
<SvgIcon :name="`love_${select.isLike?1:0}`" size="35" /> <SvgIcon :name="`love_${select.isLike?1:0}`" size="35" />
</div> </div>
<div class="down" @click.stop="setDownload()"> <div class="down" @click.stop="setDownload()">
<SvgIcon name="download" size="35" /> <SvgIcon name="download" size="35" />
</div> </div>
</div> </div> -->
</div> </div>
<div class="btn"> <div class="btn">
<div class="btnItem style1" @click.stop="updateStyle()"> <div class="btnItem style1" @click.stop="updateStyle()">
@@ -170,7 +201,6 @@ const { select } = toRefs(data);
</span> </span>
Re-try Re-try
</div> </div>
</template> </template>
</gradientButton> </gradientButton>
</div> </div>
@@ -181,6 +211,7 @@ const { select } = toRefs(data);
<div class="loading-container" v-if="isLoading"> <div class="loading-container" v-if="isLoading">
<GenerateLoading :title="loadingTitle"/> <GenerateLoading :title="loadingTitle"/>
</div> </div>
<StyleListDom ref="styleListVue"></StyleListDom>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.header-title { .header-title {
@@ -231,18 +262,28 @@ const { select } = toRefs(data);
.selectContent{ .selectContent{
// padding: 0 4rem; // padding: 0 4rem;
margin: 0 auto; margin: 0 auto;
overflow: auto;
width: 73.7rem; width: 73.7rem;
margin-bottom: 19.4rem; margin-bottom: 19rem;
> .imgBox{ > .imgBox{
height: 73.7rem; height: 73.7rem;
width: 100%; width: 100%;
margin-bottom: 4.4rem; margin-bottom: 5.6rem;
> img{ > img{
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
> .chooseMore{
--borderRadius: 5.4rem;
--borderWidth: 2px;
width: 24.8rem;
margin: 0 auto;
height: 7.6rem;
.text{
font-size: 3.1rem;
font-family: satoshiMedium;
}
}
> .btn{ > .btn{
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -0,0 +1,120 @@
<script setup lang="ts">
import { computed, onMounted, onUnmounted, reactive, toRefs } from "vue";
import SelectItem from "@/components/selectStyle/selectItem.vue";
import { useGenerateStore, } from '@/stores'
//const props = defineProps({
//})
//const emit = defineEmits([
//])
const generateStore = useGenerateStore()
let data = reactive({
showStyleList:false,
list:computed(()=>generateStore.styleList),
selectStyle:computed(()=>generateStore.style),
oldSelectStyle:{} as any,
})
const close = ()=>{
showStyleList.value = false;
}
const init = (item)=>{
data.showStyleList = true
data.oldSelectStyle = JSON.parse(JSON.stringify(item))
}
const confirm = ()=>{
if(data.selectStyle.id != data.oldSelectStyle.id){
data.selectStyle.id = data.oldSelectStyle.id
data.selectStyle.path = data.oldSelectStyle.path
data.selectStyle.status = data.oldSelectStyle.status
data.selectStyle.taskId = data.oldSelectStyle.taskId
data.selectStyle.isLike = false
}
close();
}
const setStyle = (item)=>{
data.oldSelectStyle = item
}
onMounted(()=>{
})
onUnmounted(()=>{
})
defineExpose({init})
const {showStyleList,list,oldSelectStyle} = toRefs(data);
</script>
<template>
<van-popup
class="user-popup"
v-model:show="showStyleList"
round
position="bottom"
teleport="body"
>
<div class="profile">
<div class="header">
<span class="title">Outfit Result</span>
<van-icon name="cross" class="close" @click="close" />
</div>
<div class="content">
<SelectItem :selectList="list" :select="oldSelectStyle" @selectItem="setStyle"></SelectItem>
</div>
<div class="bottom">
<div @click="confirm">Confirm</div>
</div>
</div>
</van-popup>
</template>
<style lang="less" scoped>
.van-popup {
max-height: 90%;
--van-popup-round-radius: 7.8rem;
}
.profile {
margin: 11.1rem 0 5.6rem;
display: flex;
flex-direction: column;
align-items: center;
> .header {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 0 8rem 0 5.2rem;
margin-bottom: 8rem;
> .title {
font-family: satoshiBold;
font-size: 4.6rem;
color: #181725;
}
> .close {
margin-left: auto;
font-size: 5rem;
color: #a1a1a1;
}
}
> .content{
width: 96.2rem;
}
> .bottom{
margin: 3rem 0 4rem;
width: 100%;
> div{
width: 24.8rem;
line-height: 6.7rem;
font-family: satoshiMedium;
font-size: 3.6rem;
text-align: center;
border-radius: .7rem;
background-color: #000;
color: #fff;
margin-right: 4.2rem;
margin-left: auto;
}
}
}
</style>

View File

@@ -113,7 +113,7 @@ onMounted(() => {
.loading-image { .loading-image {
width: 36.4rem; width: 36.4rem;
height: 36.4rem; height: 36.4rem;
animation: rotate 1s linear infinite; animation: rotate 1.5s ease-in-out infinite;
} }
.loading-shadow { .loading-shadow {
@@ -146,11 +146,14 @@ onMounted(() => {
} }
@keyframes rotate { @keyframes rotate {
from { 0% {
transform: rotate(0deg); transform: translateY(0px);
} }
to { 50% {
transform: rotate(360deg); transform: translateY(-100px);
}
100% {
transform: translateY(0px);
} }
} }
</style> </style>

View File

@@ -55,6 +55,7 @@ const goToLogin = () => {
.title { .title {
font-family: 'satoshiMedium'; font-family: 'satoshiMedium';
line-height: 120%; line-height: 120%;
font-size: 11rem;
// letter-spacing: -0.02em; // letter-spacing: -0.02em;
} }
.subtitle { .subtitle {

View File

@@ -74,7 +74,7 @@
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useGenerateStore, useUserInfoStore } from '@/stores' import { useGenerateStore, useUserInfoStore } from '@/stores'
import { showToast } from 'vant' import { showToast, closeToast } from 'vant'
import { customerCheckin, createCustomer, type CreateCustomerParams } from '@/api/workshop' import { customerCheckin, createCustomer, type CreateCustomerParams } from '@/api/workshop'
import Profile from '../Workshop/profile.vue' import Profile from '../Workshop/profile.vue'
import MyEvent from '@/utils/myEvent' import MyEvent from '@/utils/myEvent'
@@ -86,6 +86,7 @@ const handleOpenProfile = () => {
const router = useRouter() const router = useRouter()
const generateStore = useGenerateStore() const generateStore = useGenerateStore()
const loading = ref(false)
type PageMode = 'form' | 'entry' | 'create' type PageMode = 'form' | 'entry' | 'create'
const pageMode = ref<PageMode>('entry') const pageMode = ref<PageMode>('entry')
@@ -104,50 +105,45 @@ const customerData = ref({
}) })
const handleConfirm = async () => { const handleConfirm = async () => {
if (pageMode.value === 'form') { if (loading.value) return
if (customerData.value.nickname === '') { const nickname = (customerData.value.nickname || '').trim()
showToast({ const vipId = (customerData.value.vipId || '').trim()
message: 'please input the nickname'
})
return
}
customerCheckin({ nickname: customerData.value.nickname }).then((res) => { if (!nickname) {
useUserInfoStore().resetGenerateParams() showToast({ message: 'please input the nickname' })
generateStore.setCustomerInfo(res) return
MyEvent.emit('clear-generate-state') }
router.push('/workshop/home')
})
} else {
if (customerData.value.vipId === '') {
showToast({
message: 'please input the VIP ID'
})
return
}
if (customerData.value.nickname === '') {
showToast({
message: 'please input the nickname'
})
return
}
createCustomer({ if (pageMode.value === 'create' && !vipId) {
nickname: customerData.value.nickname, showToast({ message: 'please input the VIP ID' })
vipId: customerData.value.vipId return
} as CreateCustomerParams).then((res) => { }
showToast({
message: 'Customer created successfully' loading.value = true
}) showToast({ message: 'Processing...', duration: 0, type: 'loading' })
handleBack() try {
if (pageMode.value === 'create') {
await createCustomer({ nickname, vipId } as CreateCustomerParams)
showToast({ message: 'Customer created successfully' })
MyEvent.emit('update-customer-list') MyEvent.emit('update-customer-list')
}) }
const res = await customerCheckin({ nickname })
useUserInfoStore().resetGenerateParams()
generateStore.setCustomerInfo(res)
MyEvent.emit('clear-generate-state')
router.push('/workshop/home')
} catch (err: any) {
showToast({ message: err?.message || 'Operation failed' })
} finally {
loading.value = false
closeToast()
} }
} }
const handleShowPopup = (flag: Boolean) => { const handleShowPopup = (flag: Boolean) => {
// showPopup.value = flag // showPopup.value = flag
profileRef.value.openSwitchCustomerPopup(flag) profileRef.value.handleShowPopup(flag)
} }
const handleSelectCustomer = (value) => { const handleSelectCustomer = (value) => {

View File

@@ -220,7 +220,7 @@ onUnmounted(() => {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
padding: 6rem 0 0 0; padding: 15.9rem 0 0 0;
.content { .content {
.loading-container { .loading-container {
:deep(.loading-image) { :deep(.loading-image) {
@@ -229,10 +229,11 @@ onUnmounted(() => {
animation: none; animation: none;
} }
:deep(.loading-shadow) { :deep(.loading-shadow) {
background-color: #000;
width: 9.2rem; width: 9.2rem;
height: 2.4rem; height: 2.4rem;
filter: blur(6px); filter: blur(6px);
opacity: 0.5; opacity: 0.2;
margin: 2.4rem 0 0; margin: 2.4rem 0 0;
// background-color: #d9d9d9; // background-color: #d9d9d9;
} }
@@ -247,8 +248,10 @@ onUnmounted(() => {
font-weight: 700; font-weight: 700;
line-height: 1.12; line-height: 1.12;
background: #b3b3b3; background: #b3b3b3;
background: linear-gradient(120deg, #b3b3b3 1%, rgba(0, 0, 0, 0) 48%), background: radial-gradient(80.79% 50% at 50% 50%, #d1c7c2 0%, rgba(255, 255, 255, 0) 100%),
linear-gradient(344deg, #b3b3b2 16%, #000000 66%); radial-gradient(99.56% 93.08% at 99.56% 93.08%, #e6e6e6 0%, #000000 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%);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
background-clip: text; background-clip: text;
@@ -325,7 +328,7 @@ onUnmounted(() => {
text-align: center; text-align: center;
border-radius: 4.6rem; border-radius: 4.6rem;
padding: 0 2.15rem; padding: 0 2.15rem;
&.active{ &.active {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
} }

View File

@@ -166,7 +166,7 @@ const handleContinue = () => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 2rem; padding: 2rem;
padding-top: 6rem; padding-top: 10rem;
} }
.header { .header {
@@ -178,6 +178,8 @@ const handleContinue = () => {
color: white; color: white;
line-height: 96%; line-height: 96%;
font-family: 'satoshiBold'; font-family: 'satoshiBold';
letter-spacing: -0.04rem;
margin-bottom: 3.2rem;
} }
.sub-title{ .sub-title{
font-family: 'satoshiRegular'; font-family: 'satoshiRegular';

View File

@@ -59,11 +59,14 @@ const handleSelect = (value: string) => {
font-weight: 700; font-weight: 700;
font-size: 11rem; font-size: 11rem;
line-height: 106%; line-height: 106%;
letter-spacing: -0.02rem;
margin-bottom: 4.6rem;
} }
.desc { .desc {
font-family: 'satoshiRegular'; font-family: 'satoshiRegular';
font-size: 4rem; font-size: 6rem;
line-height: 132%; line-height: 132%;
letter-spacing: 0.02rem;
} }
.select-list { .select-list {
display: flex; display: flex;