Merge branch 'master' of https://gitee.com/lvYeJu/lane-crawford-3
This commit is contained in:
@@ -1,42 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, reactive, toRefs, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import RouteCache from '@/components/RouteCache.vue'
|
||||
//const props = defineProps({
|
||||
//})
|
||||
//const emit = defineEmits([
|
||||
//])
|
||||
let data = reactive({})
|
||||
onMounted(() => {})
|
||||
onUnmounted(() => {})
|
||||
defineExpose({})
|
||||
const {} = toRefs(data)
|
||||
const workshopContent = ref<HTMLDivElement>()
|
||||
const router = useRouter()
|
||||
|
||||
const viewType = ref(0)
|
||||
watch(
|
||||
() => router.currentRoute.value,
|
||||
() => (viewType.value = 0)
|
||||
)
|
||||
const changeViewType = (v: number) => {
|
||||
viewType.value = v
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="workshop" :view-type="viewType">
|
||||
<router-view @view-type="changeViewType" />
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.workshop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
font-family: 'satoshiRegular';
|
||||
&[view-type='1'] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<RouteCache />
|
||||
</template>
|
||||
@@ -4,6 +4,7 @@ import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import FooterNavigation from '@/components/FooterNavigation.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import GenerateLoading from '@/views/asistant/components/GenerateLoading.vue'
|
||||
import { useGenerateStore } from '@/stores'
|
||||
const router = useRouter()
|
||||
//const props = defineProps({
|
||||
//})
|
||||
@@ -33,6 +34,7 @@ onMounted(() => {
|
||||
emit('view-type', 1)
|
||||
data.isLoading = true;
|
||||
setTimeout(()=>{
|
||||
useGenerateStore().useStyleGenerate()
|
||||
data.isLoading = false;
|
||||
}, 2000)
|
||||
})
|
||||
@@ -43,7 +45,7 @@ const { isLoading } = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<header-title style-type="2" />
|
||||
<div class="selectModelContinue" v-if="!isLoading">
|
||||
<div class="product" v-if="!isLoading">
|
||||
<div class="text">
|
||||
<div class="title">
|
||||
Go with this Look?
|
||||
@@ -78,7 +80,7 @@ const { isLoading } = toRefs(data);
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.selectModelContinue{
|
||||
.product{
|
||||
width: 100%;
|
||||
// height: 100%;
|
||||
position: relative;
|
||||
@@ -47,8 +47,8 @@ const setSelectedModelId = (item)=>{
|
||||
onMounted(()=>{
|
||||
emit('view-type', 1)
|
||||
})
|
||||
const toSelectModelContinue = ()=>{
|
||||
router.push({ path: 'selectModelContinue' })
|
||||
const toProduct = ()=>{
|
||||
router.push({ path: 'product' })
|
||||
}
|
||||
onMounted(()=>{
|
||||
})
|
||||
@@ -81,7 +81,7 @@ const { modelList, selectedModelId } = toRefs(data);
|
||||
</div>
|
||||
<div class="footer placeholder"></div>
|
||||
<div class="footer">
|
||||
<button @click.stop="toSelectModelContinue">Continue</button>
|
||||
<button @click.stop="toProduct">Continue</button>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
import { onMounted, onUnmounted, reactive, toRefs, computed } from "vue";
|
||||
import SelectItem from "@/components/selectStyle/selectItem.vue";
|
||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import editProfile1_1 from '@/assets/images/workshop/selectStyle/selectStyle1-1.png'
|
||||
import editProfile1_2 from '@/assets/images/workshop/selectStyle/selectStyle1-2.png'
|
||||
import editProfile1_3 from '@/assets/images/workshop/selectStyle/selectStyle1-3.png'
|
||||
import editProfile1_4 from '@/assets/images/workshop/selectStyle/selectStyle1-4.png'
|
||||
import editProfile1 from '@/assets/images/workshop/selectStyle/selectStyle1.png'
|
||||
import editProfile2 from '@/assets/images/workshop/selectStyle/selectStyle2.png'
|
||||
import editProfile3 from '@/assets/images/workshop/selectStyle/selectStyle3.png'
|
||||
import editProfile4 from '@/assets/images/workshop/selectStyle/selectStyle4.png'
|
||||
import { useGenerateStore } from '@/stores'
|
||||
const router = useRouter()
|
||||
|
||||
@@ -15,63 +15,44 @@ const router = useRouter()
|
||||
const emit = defineEmits([
|
||||
'view-type'
|
||||
])
|
||||
const generateStore = useGenerateStore()
|
||||
let data = reactive({
|
||||
selectList:
|
||||
[
|
||||
{
|
||||
id:1,
|
||||
imgList:[
|
||||
editProfile1_1,
|
||||
editProfile1_2,
|
||||
editProfile1_3,
|
||||
editProfile1_4,
|
||||
],
|
||||
isLike: false,
|
||||
isAdd: false,
|
||||
imgUrl:editProfile1,
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
imgList:[
|
||||
editProfile1_1,
|
||||
editProfile1_2,
|
||||
editProfile1_3,
|
||||
editProfile1_4,
|
||||
],
|
||||
isLike: false,
|
||||
isAdd: false,
|
||||
imgUrl:editProfile2,
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
imgList:[
|
||||
editProfile1_1,
|
||||
editProfile1_2,
|
||||
editProfile1_3,
|
||||
editProfile1_4,
|
||||
],
|
||||
isLike: false,
|
||||
isAdd: false,
|
||||
imgUrl:editProfile3,
|
||||
},
|
||||
{
|
||||
id:4,
|
||||
imgList:[
|
||||
editProfile1_1,
|
||||
editProfile1_2,
|
||||
editProfile1_3,
|
||||
editProfile1_4,
|
||||
],
|
||||
isLike: false,
|
||||
isAdd: false,
|
||||
imgUrl:editProfile4,
|
||||
},
|
||||
],
|
||||
select:{
|
||||
|
||||
}
|
||||
select:computed(()=>generateStore.userData.style)
|
||||
})
|
||||
|
||||
const generateStore = useGenerateStore()
|
||||
const selectItem = (item)=>{
|
||||
generateStore.selectStyle(item)
|
||||
}
|
||||
|
||||
const toSelectModelContinue = ()=>{
|
||||
router.push({ path: 'selectModelContinue' })
|
||||
const updateStyle = ({item,index})=>{
|
||||
generateStore.updateStyle(item)
|
||||
data.selectList[index] = {
|
||||
id:9,
|
||||
imgUrl:item.imgUrl,
|
||||
}
|
||||
}
|
||||
|
||||
const toProduct = ()=>{
|
||||
router.push({ path: 'product' })
|
||||
}
|
||||
onMounted(()=>{
|
||||
emit('view-type', 1)
|
||||
@@ -94,12 +75,12 @@ const { selectList, select } = toRefs(data);
|
||||
</div>
|
||||
</div>
|
||||
<div class="selectContent">
|
||||
<SelectItem :selectList="selectList" v-model:select="select" />
|
||||
<SelectItem :selectList="selectList" v-model:select="select" @selectItem="selectItem" @updateStyle="updateStyle" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer placeholder"></div>
|
||||
<div class="footer">
|
||||
<button @click.stop="toSelectModelContinue">Continue</button>
|
||||
<button @click.stop="toProduct">Continue</button>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user