|
|
|
@ -50,8 +50,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="info-section"> |
|
|
|
<div class="info-section"> |
|
|
|
<div class="info-item"> |
|
|
|
<div class="info-item"> |
|
|
|
<div class="info-title" v-if="orderStat.type_id == 1">{{ prodId == 7 ? '人物立体徽章' : '宠物立体徽章' }}</div> |
|
|
|
<div class="info-title" v-if="typeId == 1">{{ prodId == 7 ? '人物立体徽章' : '宠物立体徽章' }}</div> |
|
|
|
<div class="info-title" v-if="orderStat.type_id == 2">{{ prodId == 7 ? '人物浮雕相框' : '宠物浮雕相框' }}</div> |
|
|
|
<div class="info-title" v-if="typeId == 2">{{ prodId == 7 ? '人物浮雕相框' : '宠物浮雕相框' }}</div> |
|
|
|
|
|
|
|
<div class="info-title" v-if="typeId == 3">{{ prodId == 7 ? '人物3D冰箱贴' : '宠物3D冰箱贴' }}</div> |
|
|
|
<div class="info-content">产品类型</div> |
|
|
|
<div class="info-content">产品类型</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="info-item"> |
|
|
|
<div class="info-item"> |
|
|
|
@ -64,10 +65,10 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="shape-body"> |
|
|
|
<div class="shape-body"> |
|
|
|
<!-- <div class="shape-type"> |
|
|
|
<div class="shape-type" v-if="imageUrl && typeId == 3"> |
|
|
|
<div class="shape-type-item" :class="{ 'shape-active': item.id == typeId }" v-for="item in typesList" :key="item.id" @click="typeChange(item.id)">{{item.name}}</div> |
|
|
|
<div class="shape-type-item" :class="{ 'shape-active': item.id == shapeId }" v-for="item in shapeList" :key="item.id" @click="shapeChange(item)">{{item.name}}</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
<div class="shape-box" v-if="imageUrl"> |
|
|
|
<div class="shape-box" v-if="imageUrl && typeId != 3"> |
|
|
|
<block v-for="item in shapeList" :key="item.id"> |
|
|
|
<block v-for="item in shapeList" :key="item.id"> |
|
|
|
<div class="shape-item" @click="shapeChange(item)"> |
|
|
|
<div class="shape-item" @click="shapeChange(item)"> |
|
|
|
<div class="shape-item-list"> |
|
|
|
<div class="shape-item-list"> |
|
|
|
@ -204,7 +205,8 @@ function sureReload() { |
|
|
|
const params = { |
|
|
|
const params = { |
|
|
|
pid: pid.value, |
|
|
|
pid: pid.value, |
|
|
|
group: group.value, |
|
|
|
group: group.value, |
|
|
|
prod_id: prodId.value |
|
|
|
prod_id: prodId.value, |
|
|
|
|
|
|
|
type_id: typeId.value |
|
|
|
} |
|
|
|
} |
|
|
|
badgeApi.putModeling(params).then((res: any) => { |
|
|
|
badgeApi.putModeling(params).then((res: any) => { |
|
|
|
console.log('putModeling', res) |
|
|
|
console.log('putModeling', res) |
|
|
|
@ -230,9 +232,11 @@ function sureReload() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const imgKey = ref(101) |
|
|
|
const imgKey = ref(101) |
|
|
|
|
|
|
|
const frameUrl = ref('') |
|
|
|
const changeImage = (item: any) => { |
|
|
|
const changeImage = (item: any) => { |
|
|
|
imgKey.value = item.key |
|
|
|
imgKey.value = item.key |
|
|
|
imageUrl.value = item.origin_url |
|
|
|
imageUrl.value = item.origin_url |
|
|
|
|
|
|
|
frameUrl.value = item.frame_url |
|
|
|
imageWater.value = item.url |
|
|
|
imageWater.value = item.url |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -272,7 +276,8 @@ function getCompareImage() { |
|
|
|
badgeApi.getCompareImage({ |
|
|
|
badgeApi.getCompareImage({ |
|
|
|
pid: pid.value, |
|
|
|
pid: pid.value, |
|
|
|
group: group.value, |
|
|
|
group: group.value, |
|
|
|
prod_id: prodId.value |
|
|
|
prod_id: prodId.value, |
|
|
|
|
|
|
|
type_id: typeId.value |
|
|
|
}).then((res: any) => { |
|
|
|
}).then((res: any) => { |
|
|
|
console.log('getCompareImage', res) |
|
|
|
console.log('getCompareImage', res) |
|
|
|
compareList.value = res |
|
|
|
compareList.value = res |
|
|
|
@ -361,10 +366,14 @@ const loading = ref(false) |
|
|
|
const confirm = () => { |
|
|
|
const confirm = () => { |
|
|
|
if (loading.value) return |
|
|
|
if (loading.value) return |
|
|
|
console.log('confirm') |
|
|
|
console.log('confirm') |
|
|
|
// if (payAmount.value <= 0) { |
|
|
|
if (payAmount.value <= 0) { |
|
|
|
// showToast('请先选择下单数量') |
|
|
|
showToast('请先选择下单数量') |
|
|
|
// return |
|
|
|
return |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
if (typeId.value == 2 && (shapeText.value == '' || !shapeText.value.trim())) { |
|
|
|
|
|
|
|
showToast('请输入自定义文本') |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
if (orderStat.value.use_type == 2 && !contact_name.value) { |
|
|
|
if (orderStat.value.use_type == 2 && !contact_name.value) { |
|
|
|
showToast('请先填写收货人信息') |
|
|
|
showToast('请先填写收货人信息') |
|
|
|
return |
|
|
|
return |
|
|
|
@ -455,6 +464,7 @@ const getPosition = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const imageUrl = ref('') |
|
|
|
const imageUrl = ref('') |
|
|
|
|
|
|
|
const originUrl = ref('') |
|
|
|
const group = ref(1); |
|
|
|
const group = ref(1); |
|
|
|
// 轮询获取图片 |
|
|
|
// 轮询获取图片 |
|
|
|
const flag = ref(1) |
|
|
|
const flag = ref(1) |
|
|
|
@ -510,7 +520,9 @@ const getImageList = () => { |
|
|
|
|
|
|
|
|
|
|
|
// 如果有已生成的图片且还未设置预览图,则显示第一个生成的图片 |
|
|
|
// 如果有已生成的图片且还未设置预览图,则显示第一个生成的图片 |
|
|
|
if (firstGeneratedImage && !isPreview.value) { |
|
|
|
if (firstGeneratedImage && !isPreview.value) { |
|
|
|
|
|
|
|
originUrl.value = firstGeneratedImage.origin_url |
|
|
|
imageUrl.value = firstGeneratedImage.origin_url |
|
|
|
imageUrl.value = firstGeneratedImage.origin_url |
|
|
|
|
|
|
|
frameUrl.value = firstGeneratedImage.frame_url |
|
|
|
imageWater.value = firstGeneratedImage.url |
|
|
|
imageWater.value = firstGeneratedImage.url |
|
|
|
imgKey.value = firstGeneratedImage.key |
|
|
|
imgKey.value = firstGeneratedImage.key |
|
|
|
isPreview.value = true |
|
|
|
isPreview.value = true |
|
|
|
@ -538,11 +550,15 @@ const getImageList = () => { |
|
|
|
const currentImage = mergedList.filter((item: any) => item.key === imgKey.value)[0] |
|
|
|
const currentImage = mergedList.filter((item: any) => item.key === imgKey.value)[0] |
|
|
|
console.log('currentImage', currentImage) |
|
|
|
console.log('currentImage', currentImage) |
|
|
|
if (currentImage && currentImage.status === 1) { |
|
|
|
if (currentImage && currentImage.status === 1) { |
|
|
|
|
|
|
|
originUrl.value = currentImage.origin_url |
|
|
|
imageUrl.value = currentImage.origin_url |
|
|
|
imageUrl.value = currentImage.origin_url |
|
|
|
|
|
|
|
frameUrl.value = currentImage.frame_url |
|
|
|
imageWater.value = currentImage.url |
|
|
|
imageWater.value = currentImage.url |
|
|
|
isPreview.value = true |
|
|
|
isPreview.value = true |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
originUrl.value = currentImage.origin_url |
|
|
|
imageUrl.value = currentImage.origin_url |
|
|
|
imageUrl.value = currentImage.origin_url |
|
|
|
|
|
|
|
frameUrl.value = currentImage.frame_url |
|
|
|
imageWater.value = currentImage.url |
|
|
|
imageWater.value = currentImage.url |
|
|
|
isPreview.value = true |
|
|
|
isPreview.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
@ -561,10 +577,14 @@ const getImageList = () => { |
|
|
|
// 显示图片 |
|
|
|
// 显示图片 |
|
|
|
imageList.value = data.list |
|
|
|
imageList.value = data.list |
|
|
|
if (imgKey.value) { |
|
|
|
if (imgKey.value) { |
|
|
|
|
|
|
|
originUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].origin_url |
|
|
|
imageUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].origin_url |
|
|
|
imageUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].origin_url |
|
|
|
|
|
|
|
frameUrl.value = data.list.filter((item: any) => item.key == imgKey.value)[0].frame_url |
|
|
|
imageWater.value = data.list.filter((item: any) => item.key == imgKey.value)[0].url |
|
|
|
imageWater.value = data.list.filter((item: any) => item.key == imgKey.value)[0].url |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
originUrl.value = data.list[0].origin_url |
|
|
|
imageUrl.value = data.list[0].origin_url |
|
|
|
imageUrl.value = data.list[0].origin_url |
|
|
|
|
|
|
|
frameUrl.value = data.list[0].frame_url |
|
|
|
imageWater.value = data.list[0].url |
|
|
|
imageWater.value = data.list[0].url |
|
|
|
imgKey.value = data.list[0].key |
|
|
|
imgKey.value = data.list[0].key |
|
|
|
} |
|
|
|
} |
|
|
|
@ -598,12 +618,12 @@ const getImageList = () => { |
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
const shapeId = ref(1) |
|
|
|
const shapeId = ref(0) |
|
|
|
const shapeImage = ref('') |
|
|
|
const shapeImage = ref('') |
|
|
|
|
|
|
|
|
|
|
|
const shapeList = ref([]) |
|
|
|
const shapeList = ref([]) |
|
|
|
const custom_switch = ref(0) |
|
|
|
const custom_switch = ref(0) |
|
|
|
const limitCount = ref(10) |
|
|
|
const limitCount = ref(0) |
|
|
|
const getShapeList = () => { |
|
|
|
const getShapeList = () => { |
|
|
|
badgeApi.getShapeList({ |
|
|
|
badgeApi.getShapeList({ |
|
|
|
prod_id: prodId.value, |
|
|
|
prod_id: prodId.value, |
|
|
|
@ -722,6 +742,9 @@ const shapeChange = (item: any) => { |
|
|
|
shapeImage.value = item.frame_path |
|
|
|
shapeImage.value = item.frame_path |
|
|
|
custom_switch.value = item.custom_switch |
|
|
|
custom_switch.value = item.custom_switch |
|
|
|
limitCount.value = item.text_limit_max |
|
|
|
limitCount.value = item.text_limit_max |
|
|
|
|
|
|
|
if (typeId.value == 3) { |
|
|
|
|
|
|
|
imageUrl.value = item.name == '无边框' ? originUrl.value : frameUrl.value |
|
|
|
|
|
|
|
} |
|
|
|
ImageShow(item) |
|
|
|
ImageShow(item) |
|
|
|
if (custom_switch.value == 1) { |
|
|
|
if (custom_switch.value == 1) { |
|
|
|
textShow(item) |
|
|
|
textShow(item) |
|
|
|
@ -739,10 +762,12 @@ const getTrialCode = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const orderStat = ref({}) |
|
|
|
const orderStat = ref({}) |
|
|
|
|
|
|
|
const typeId = ref(0) |
|
|
|
const getOrderStat = () => { |
|
|
|
const getOrderStat = () => { |
|
|
|
badgeApi.getOrderStat({}).then((res: any) => { |
|
|
|
badgeApi.getOrderStat({}).then((res: any) => { |
|
|
|
console.log('getOrderStat', res) |
|
|
|
console.log('getOrderStat', res) |
|
|
|
orderStat.value = res |
|
|
|
orderStat.value = res |
|
|
|
|
|
|
|
typeId.value = res.type_id |
|
|
|
getSizeList() |
|
|
|
getSizeList() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|