Browse Source

卡通手办

lzm_web
Linzm 5 months ago
parent
commit
5812793f79
  1. 38
      src/views/badge/index.vue
  2. 1
      src/views/badge/orderDetail.vue
  3. 11
      src/views/badge/preview.vue

38
src/views/badge/index.vue

@ -16,13 +16,16 @@ @@ -16,13 +16,16 @@
产品类型
</div>
<div class="order-type-item-title" v-if="typeId == 1">
{{ prodId == 7 ? '人物立体徽章' : '宠物立体徽章'}}
立体徽章
</div>
<div class="order-type-item-title" v-if="typeId == 2">
{{ prodId == 7 ? '人物浮雕相框' : '宠物浮雕相框'}}
浮雕相框
</div>
<div class="order-type-item-title" v-if="typeId == 3">
{{ prodId == 7 ? '人物冰箱贴' : '宠物冰箱贴'}}
3D冰箱贴
</div>
<div class="order-type-item-title" v-if="typeId == 4">
3D卡通手办
</div>
</div>
</div>
@ -73,10 +76,10 @@ @@ -73,10 +76,10 @@
<p style="font-size: 12px; color: #000; margin-left: 16px;">需要先输入手机号才可体验徽章设计</p>
<div class="style-box">
<div class="style-box-item">
<div class="style-item-title" :class="{ styleActive: prodId == 7 }" @click="styleChange(7)">
<div class="style-item-title" :class="{ styleActive: prodId == 7 || prodId == 1 }" @click="styleChange(7)">
{{ prop == '3D真人肖像' ? '3D真人肖像' : '人物立体徽章' }}
</div>
<div class="style-item-title" :class="{ styleActive: prodId == 8 }" @click="styleChange(8)">
<div class="style-item-title" :class="{ styleActive: prodId == 8 || prodId == 2 }" @click="styleChange(8)">
宠物立体徽章
</div>
</div>
@ -113,10 +116,10 @@ @@ -113,10 +116,10 @@
</div>
<div class="tag-change-box" v-if="trialCode == false">
<div class="tag-change-item">
<div class="tag-change-item-title" :class="{ tagActive: prodId == 7 }" @click="prodChange(7)">
<div class="tag-change-item-title" :class="{ tagActive: prodId == 7 || prodId == 1 }" @click="prodChange(7)">
人物主体
</div>
<div class="tag-change-item-title" :class="{ tagActive: prodId == 8 }" @click="prodChange(8)">
<div class="tag-change-item-title" :class="{ tagActive: prodId == 8 || prodId == 2 }" @click="prodChange(8)">
宠物主体
</div>
</div>
@ -173,8 +176,8 @@ @@ -173,8 +176,8 @@
<h5-cropper :option="option" @getbase64Data="getbase64Data" @imgorigoinf="imgorigoinf"></h5-cropper>
</div>
</div>
<div style="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 7">温馨提示请上传只有{{ prop == '3D真人肖像' ? '1' : '1-3' }}人的照片</div>
<div style="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 8">温馨提示请上传只有1-3只宠物的照片</div>
<div style="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 7 || prodId == 1">温馨提示请上传只有{{ prop == '3D真人肖像' ? '1' : '1-3' }}人的照片</div>
<div style="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 8 || prodId == 2">温馨提示请上传只有1-3只宠物的照片</div>
<div style="height: 120px;"></div>
<div class="design-action-bar">
<div class="design-left">
@ -323,7 +326,11 @@ const typeId = ref(0) @@ -323,7 +326,11 @@ const typeId = ref(0)
const getOrderStat = () => {
badgeApi.getOrderStat({}).then((res: any) => {
orderStat.value = res
if (res.type_id == 4) {
prodId.value = res.prod_id == 1 ? 1 : 2
} else {
prodId.value = res.type_id == 3 ? 8 : res.prod_id
}
prop.value = res.prop
typeId.value = res.type_id
getSundryList()
@ -331,11 +338,16 @@ const getOrderStat = () => { @@ -331,11 +338,16 @@ const getOrderStat = () => {
}
const prodChange = (id: number) => {
if (typeId.value == 3) {
console.log('prodChange', id)
if (typeId.value == 3 && id == 7) {
showToast('人物3D冰箱贴暂未开放')
return
}
prodId.value = id
if (typeId.value == 4 && id == 8) {
showToast('宠物卡通手办暂未开放')
return
}
prodId.value = typeId.value == 4 ? id == 8 ? 2 : 1 : id == 7 ? 7 : 8
picture.value = null
}
@ -421,7 +433,7 @@ function getbase64Data(data) { @@ -421,7 +433,7 @@ function getbase64Data(data) {
return false;
}
imgurl.value = blob;
if (prodId.value == 7) {
if (prodId.value == 7 || prodId.value == 1) {
getUploadUrl()
}
}
@ -490,7 +502,7 @@ const sendFaceToOss = async (src: string, url: string, path: string) => { @@ -490,7 +502,7 @@ const sendFaceToOss = async (src: string, url: string, path: string) => {
badgeApi.faceCheck({
path: path,
prop: prop.value,
prod_id: 7
prod_id: prodId.value
}).then((res: any) => {
console.log('faceCheck', res)
showSuccessToast({

1
src/views/badge/orderDetail.vue

@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
<span class="product-value" v-if="order.type_id == 1">{{ order.prod_id == 7 ? '人物立体徽章' : '宠物立体徽章' }}</span>
<span class="product-value" v-if="order.type_id == 2">{{ order.prod_id == 7 ? '人物浮雕相框' : '宠物浮雕相框' }}</span>
<span class="product-value" v-if="order.type_id == 3">{{ order.prod_id == 7 ? '人物冰箱贴' : '宠物冰箱贴' }}</span>
<span class="product-value" v-if="order.type_id == 4">{{ order.prod_id == 1 ? '人物卡通手办' : '宠物卡通手办' }}</span>
</div>
<div class="product-row">
<span class="product-label">尺寸</span>

11
src/views/badge/preview.vue

@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
<div class="info-title" v-if="typeId == 1">{{ 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-title" v-if="typeId == 4">{{ prodId == 1 ? '人物卡通手办' : '宠物卡通手办' }}</div>
<div class="info-content">产品类型</div>
</div>
<div class="info-item">
@ -68,7 +69,7 @@ @@ -68,7 +69,7 @@
<div class="shape-type" v-if="imageUrl && typeId == 3">
<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 class="shape-box" v-if="imageUrl && typeId != 3">
<div class="shape-box" v-if="imageUrl && typeId != 3 && typeId != 4">
<block v-for="item in shapeList" :key="item.id">
<div class="shape-item" @click="shapeChange(item)">
<div class="shape-item-list">
@ -331,7 +332,9 @@ const getSizeList = () => { @@ -331,7 +332,9 @@ const getSizeList = () => {
badgeApi.getOrderPrice({}).then((res: any) => {
console.log('getSizeList', res);
sizeList.value = res
if (typeId.value != 4) {
getShapeList()
}
})
}
@ -702,7 +705,7 @@ const limitCount = ref(0) @@ -702,7 +705,7 @@ const limitCount = ref(0)
const getShapeList = () => {
badgeApi.getShapeList({
prod_id: prodId.value,
type_id: orderStat.value.type_id
type_id: typeId.value
}).then((res: any) => {
console.log('getShapeList', res)
shapeList.value = res.list
@ -879,6 +882,7 @@ onMounted(() => { @@ -879,6 +882,7 @@ onMounted(() => {
if (route.query.prod_id) {
prodId.value = route.query.prod_id
}
getTrialCode()
// pid.value = 281505;
// group.value = 1;
@ -886,8 +890,9 @@ onMounted(() => { @@ -886,8 +890,9 @@ onMounted(() => {
// getTypesList()
getImageList()
progressList()
setTimeout(() => {
getCompareImage()
getTrialCode()
}, 1000)
timer.value = setInterval(() => {
getImageList()
}, 10000)

Loading…
Cancel
Save