forked from natuka/web.puabadge.com
电商翻译
This commit is contained in:
1 parent
6938e12196
commit
75e04a4de3
12 files changed
+854
-891
No files matched your search
+79
-72
@@ -5,7 +5,7 @@
|
||||
<div class="order-type">
|
||||
<div class="order-type-item">
|
||||
<div class="order-type-item-title" v-if="orderStat.order_no">
|
||||
订单编号
|
||||
{{ toValueWithout("订单编号") }}
|
||||
</div>
|
||||
<div class="order-type-item-title">
|
||||
{{ orderStat.order_no }}
|
||||
@@ -13,24 +13,24 @@
|
||||
</div>
|
||||
<div class="order-type-item" v-if="prodId">
|
||||
<div class="order-type-item-title">
|
||||
产品类型
|
||||
{{ toValueWithout("产品类型") }}
|
||||
</div>
|
||||
<div class="order-type-item-title" v-if="typeId == 1">
|
||||
立体徽章
|
||||
{{ toValueWithout("立体徽章") }}
|
||||
</div>
|
||||
<div class="order-type-item-title" v-if="typeId == 2">
|
||||
浮雕相框
|
||||
{{ toValueWithout("浮雕相框") }}
|
||||
</div>
|
||||
<div class="order-type-item-title" v-if="typeId == 3">
|
||||
3D冰箱贴
|
||||
{{ toValueWithout("3D冰箱贴") }}
|
||||
</div>
|
||||
<div class="order-type-item-title" v-if="typeId == 4">
|
||||
3D卡通手办
|
||||
{{ toValueWithout("3D卡通手办") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size-title">
|
||||
剩余兑换数量
|
||||
{{ toValueWithout("剩余兑换数量") }}
|
||||
</div>
|
||||
<div class="size-options">
|
||||
<div class="size-item" v-for="item in sizeList" :key="item.id">
|
||||
@@ -38,7 +38,7 @@
|
||||
{{ item.size }}
|
||||
</div>
|
||||
<div class="size-count">
|
||||
(剩余兑换:{{ item.remaining }})
|
||||
({{ toValueWithout("剩余兑换") }}:{{ item.remaining }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,41 +46,41 @@
|
||||
<div class="badge-info" v-if="trialCode == false">
|
||||
<div class="badge-item" @click="goToRecord">
|
||||
<div class="badge-title">
|
||||
设计图集
|
||||
{{ toValueWithout("设计图集") }}
|
||||
</div>
|
||||
<div class="badge-count">
|
||||
{{ orderStat.create_count || 0 }}张
|
||||
{{ orderStat.create_count || 0 }}{{ toValueWithout("张") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="badge-item" @click="goToMyOrder">
|
||||
<div class="badge-title">
|
||||
我的订单
|
||||
{{ toValueWithout("我的订单") }}
|
||||
</div>
|
||||
<div class="badge-count">
|
||||
{{ orderStat.order_count || 0 }}笔
|
||||
{{ orderStat.order_count || 0 }}{{ toValueWithout("笔") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="badge-phone" v-if="trialCode == true">
|
||||
<van-field
|
||||
label="手机号码"
|
||||
:label="toValueWithout('手机号码')"
|
||||
type="number"
|
||||
v-model="mobile"
|
||||
placeholder="请输入手机号"
|
||||
:placeholder="toValueWithout('请输入手机号')"
|
||||
required
|
||||
maxlength="11"
|
||||
:rules="[{ required: true, message: '请输入手机号' }]"
|
||||
:rules="[{ required: true, message: toValueWithout('请输入手机号') }]"
|
||||
@blur="onBlur"
|
||||
@confirm="onBlur"
|
||||
/>
|
||||
<p style="font-size: 12px; color: #000; margin-left: 16px;">注:需要先输入手机号才可体验徽章设计</p>
|
||||
<p style="font-size: 12px; color: #000; margin-left: 16px;">{{ toValueWithout("注:需要先输入手机号才可体验徽章设计") }}</p>
|
||||
<div class="style-box">
|
||||
<div class="style-box-item">
|
||||
<div class="style-item-title" :class="{ styleActive: prodId == 7 || prodId == 1 }" @click="styleChange(7)">
|
||||
{{ prop == '3D真人肖像' ? '3D真人肖像' : '人物立体徽章' }}
|
||||
{{ prop == '3D真人肖像' ? toValueWithout('3D真人肖像') : toValueWithout('人物立体徽章') }}
|
||||
</div>
|
||||
<div class="style-item-title" :class="{ styleActive: prodId == 8 || prodId == 2 }" @click="styleChange(8)">
|
||||
宠物立体徽章
|
||||
{{ toValueWithout("宠物立体徽章") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,10 +93,10 @@
|
||||
</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">
|
||||
上传正面照片
|
||||
{{ toValueWithout("上传正面照片") }}
|
||||
</div>
|
||||
<div class="step-desc">
|
||||
1张五官清晰的正面照片
|
||||
{{ toValueWithout("1张五官清晰的正面照片") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,10 +106,10 @@
|
||||
</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">
|
||||
确认下单
|
||||
{{ toValueWithout("确认下单") }}
|
||||
</div>
|
||||
<div class="step-desc">
|
||||
选择一个你喜欢的设计
|
||||
{{ toValueWithout("选择一个你喜欢的设计") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,20 +117,20 @@
|
||||
<div class="tag-change-box" v-if="trialCode == false">
|
||||
<div class="tag-change-item">
|
||||
<div class="tag-change-item-title" :class="{ tagActive: prodId == 7 || prodId == 1 }" @click="prodChange(7)">
|
||||
人物主体
|
||||
{{ toValueWithout("人物主体") }}
|
||||
</div>
|
||||
<div class="tag-change-item-title" :class="{ tagActive: prodId == 8 || prodId == 19 }" @click="prodChange(8)">
|
||||
宠物主体
|
||||
{{ toValueWithout("宠物主体") }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: #888; text-align: center;">注:不同主体的照片检测标准不同</div>
|
||||
<div style="font-size: 12px; color: #888; text-align: center;">{{ toValueWithout("不同主体的照片检测标准不同") }}</div>
|
||||
</div>
|
||||
<div class="step-line" v-if="prop == '3D真人肖像'">
|
||||
<div class="step-line-item">
|
||||
<div class="step-line-item-title">
|
||||
<span style="display: flex; align-items: center;justify-content: center;">
|
||||
<span style="height: 1px; background: #ccc;width: 50px;"></span>
|
||||
<span style="margin: 0 8px; color: #888;">照片示例</span>
|
||||
<span style="margin: 0 8px; color: #888;">{{ toValueWithout("照片示例") }}</span>
|
||||
<span style="height: 1px; background: #ccc;width: 50px;"></span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -154,21 +154,21 @@
|
||||
<div v-if="!picture" class="photo-upload-box">
|
||||
<div class="photo-upload-header" @click="imgShow = true">
|
||||
<van-icon name="question-o" size="16px" class="photo-upload-guide-icon" />
|
||||
<span class="photo-upload-guide-text">图片上传指南</span>
|
||||
<span class="photo-upload-guide-text">{{ toValueWithout("图片上传指南") }}</span>
|
||||
</div>
|
||||
<div class="photo-upload-area">
|
||||
<div class="photo-upload-plus">
|
||||
+
|
||||
</div>
|
||||
<div class="photo-upload-text">
|
||||
点击上传照片
|
||||
{{ toValueWithout("点击上传照片") }}
|
||||
</div>
|
||||
<div class="photo-upload-tip">
|
||||
*上传照片时建议勾选[原图]
|
||||
*{{ toValueWithout("上传照片时建议勾选[原图]") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-upload-footer">
|
||||
请确定您对上传的照片拥有合法使用权利或已取得他人合法授权,且同意本平台分析图片信息以提供生成服务
|
||||
{{ toValueWithout("请确定您对上传的照片拥有合法使用权利或已取得他人合法授权,且同意本平台分析图片信息以提供生成服务") }}
|
||||
</div>
|
||||
</div>
|
||||
<img class="photo-upload-img" v-if="picture" :src="picture" alt="" srcset="">
|
||||
@@ -177,41 +177,41 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="typeId == 4 && kindList.length > 0">
|
||||
<div style="font-size: 16px; color: #222; font-weight: bold; margin-top: 16px;padding: 0 16px;">风格类型</div>
|
||||
<div style="font-size: 16px; color: #222; font-weight: bold; margin-top: 16px;padding: 0 16px;">{{ toValueWithout("风格类型") }}</div>
|
||||
<div class="kind-box">
|
||||
<div class="kind-box-item" v-for="item in kindList" :key="item.id" :class="{ styleActive: kindId == item.id }">
|
||||
<div class="kind-item-title" @click="kindChange(item.id)">
|
||||
{{ item.name }}
|
||||
{{ toValueWithout(item.name) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="typeId == 4 && prodId == 19">
|
||||
<div style="font-size: 16px; color: #222; font-weight: bold; margin-top: 16px;padding: 0 16px;">多视角参考图</div>
|
||||
<div style="font-size: 12px; color: #aaa; margin-top: 8px;padding: 0 16px;">AI建模具有随机性,上传参考图有助于更好的还原主体特征</div>
|
||||
<div style="font-size: 16px; color: #222; font-weight: bold; margin-top: 16px;padding: 0 16px;">{{ toValueWithout("多视角参考图") }}</div>
|
||||
<div style="font-size: 12px; color: #aaa; margin-top: 8px;padding: 0 16px;">{{ toValueWithout("AI建模具有随机性,上传参考图有助于更好的还原主体特征") }}</div>
|
||||
<div class="photo-upload-box-refer">
|
||||
<van-uploader v-model="referPicture" multiple :max-count="3" :max-size="10 * 1024 * 1024" @oversize="onOversize" :deletable="true" :show-preview="true" :before-read="beforeRead" upload-icon="plus" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="typeId != 4">
|
||||
<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="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 7 || prodId == 1">{{ toValueWithout("温馨提示:请上传只有") }}{{ prop == '3D真人肖像' ? '1' : '1-3' }}{{ toValueWithout("人的照片") }}</div>
|
||||
<div style="font-size: 12px; color: red; margin-top: 16px; text-align: center;" v-if="prodId == 8 || prodId == 2">{{ toValueWithout("温馨提示:请上传只有") }}1-3{{ toValueWithout("只宠物的照片") }}</div>
|
||||
</div>
|
||||
<div style="height: 120px;"></div>
|
||||
<div class="design-action-bar">
|
||||
<div class="design-left">
|
||||
<img class="design-leaf-icon" width="18" height="18" src="@/assets/badge/leaf.png" alt="">
|
||||
<span v-if="trialCode == false" class="design-remaining">剩余{{ orderStat.remain_count || 0 }}次</span>
|
||||
<span v-if="trialCode == true" class="design-remaining">体验1次</span>
|
||||
<span v-if="trialCode == false" class="design-remaining">{{ toValueWithout("剩余") }}{{ orderStat.remain_count || 0 }}{{ toValueWithout("次") }}</span>
|
||||
<span v-if="trialCode == true" class="design-remaining">{{ toValueWithout("体验1次") }}</span>
|
||||
</div>
|
||||
<button class="design-btn" @click="goToPreview">
|
||||
<span>开始设计</span>
|
||||
<span>{{ toValueWithout("开始设计") }}</span>
|
||||
<img class="design-arrow" src="@/assets/badge/arrow.png" alt="">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model:show="imgShow" title="图片上传指南" :close-on-click-overlay="true" closeable>
|
||||
<van-action-sheet v-model:show="imgShow" :title="toValueWithout('图片上传指南')" :close-on-click-overlay="true" closeable>
|
||||
<div style="padding: 0 16px 24px 16px;">
|
||||
<div style="text-align: center;">
|
||||
<img :src="sundryList[0].path" alt="照片上传指南" style="width: 90vw; border-radius: 16px; margin-bottom: 16px;">
|
||||
@@ -220,19 +220,19 @@
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<img :src="sundryList[1].path" alt="多主体" style="width: 25vw; height: 25vw; border-radius: 8px; object-fit: cover;">
|
||||
<div style="font-size: 13px; color: #888; margin-top: 4px;">
|
||||
多主体
|
||||
{{ toValueWithout("多主体") }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<img :src="sundryList[2].path" alt="光线昏暗" style="width: 25vw; height: 25vw; border-radius: 8px; object-fit: cover;">
|
||||
<div style="font-size: 13px; color: #888; margin-top: 4px;">
|
||||
光线昏暗
|
||||
{{ toValueWithout("光线昏暗") }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<img :src="sundryList[3].path" alt="后侧面及背影" style="width: 25vw; height: 25vw; border-radius: 8px; object-fit: cover;">
|
||||
<div style="font-size: 13px; color: #888; margin-top: 4px;">
|
||||
后侧面及背影
|
||||
{{ toValueWithout("后侧面及背影") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,19 +240,19 @@
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<img :src="sundryList[4].path" alt="照片模糊" style="width: 25vw; height: 25vw; border-radius: 8px; object-fit: cover;">
|
||||
<div style="font-size: 13px; color: #888; margin-top: 4px;">
|
||||
照片模糊
|
||||
{{ toValueWithout("照片模糊") }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center;">
|
||||
<img :src="sundryList[5].path" alt="照片留白过少" style="width: 25vw; height: 25vw; border-radius: 8px; object-fit: cover;">
|
||||
<div style="font-size: 13px; color: #888; margin-top: 4px;">
|
||||
照片留白过少
|
||||
{{ toValueWithout("照片留白过少") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 24px; text-align: center;">
|
||||
<button style="width: 90%; height: 44px; background: linear-gradient(90deg, #d6f5b7 0%, #50cf54 100%); border: none; border-radius: 22px; color: #222; font-size: 18px; font-weight: bold; cursor: pointer;" @click="imgShow = false">
|
||||
我已了解
|
||||
{{ toValueWithout("我已了解") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -265,10 +265,17 @@ import "vue-cropper-h5/dist/style.css"
|
||||
import { showLoadingToast, showToast, closeToast, showFailToast, showSuccessToast } from 'vant';
|
||||
import type { UploaderFileListItem } from 'vant'
|
||||
import * as badgeApi from '@/api/badge'
|
||||
import { useTranslation } from "i18next-vue";
|
||||
import * as i18n from '@/lang/utils'
|
||||
import { toValueWithout } from '@/lang/utils'
|
||||
|
||||
import { localStorage } from '@/utils/local-storage'
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
// 初始化翻译功能
|
||||
const { t } = useTranslation();
|
||||
i18n.set(t);
|
||||
|
||||
const show = ref(false)
|
||||
const imgShow = ref(false)
|
||||
|
||||
@@ -376,16 +383,16 @@ const getKindList = () => {
|
||||
const prodChange = (id: number) => {
|
||||
console.log('prodChange', id)
|
||||
if (typeId.value == 3 && id == 7) {
|
||||
showToast('人物3D冰箱贴暂未开放')
|
||||
showToast(toValueWithout('人物3D冰箱贴暂未开放'))
|
||||
return
|
||||
}
|
||||
if (typeId.value == 4) {
|
||||
if(prodId.value == 19) {
|
||||
showToast('该订单属于宠物卡通手办')
|
||||
showToast(toValueWithout('该订单属于宠物卡通手办'))
|
||||
return
|
||||
}
|
||||
if(prodId.value == 1) {
|
||||
showToast('该订单属于人物卡通手办')
|
||||
showToast(toValueWithout('该订单属于人物卡通手办'))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -409,11 +416,11 @@ function goToPreview() {
|
||||
}
|
||||
console.log('goToPreview')
|
||||
if (!imgurl.value) {
|
||||
showToast('请先上传照片')
|
||||
showToast(toValueWithout('请先上传照片'))
|
||||
return
|
||||
}
|
||||
if (orderStat.value.remain_count <= 0) {
|
||||
showToast('剩余次数不足')
|
||||
showToast(toValueWithout('剩余次数不足'))
|
||||
return
|
||||
}
|
||||
isLoading.value = true
|
||||
@@ -427,12 +434,12 @@ function goToPreview() {
|
||||
// 一次性体验链接
|
||||
const trialPhone = async () => {
|
||||
if (!mobile.value) {
|
||||
showToast('请输入手机号');
|
||||
showToast(toValueWithout('请输入手机号'));
|
||||
return;
|
||||
}
|
||||
const mobileReg = /^1[3-9]\d{9}$/;
|
||||
if (!mobileReg.test(mobile.value)) {
|
||||
showToast('请输入正确的手机号');
|
||||
showToast(toValueWithout('请输入正确的手机号'));
|
||||
return;
|
||||
}
|
||||
await badgeApi.trialPhone({
|
||||
@@ -469,14 +476,14 @@ function getbase64Data(data) {
|
||||
imageWidth.value = img.naturalWidth;
|
||||
imageHeight.value = img.naturalHeight;
|
||||
if (imageWidth.value < 300 || imageHeight.value < 300) {
|
||||
showToast('请上传尺寸大于300*300像素的照片')
|
||||
showToast(toValueWithout('请上传尺寸大于300*300像素的照片'))
|
||||
imgurl.value = null
|
||||
picture.value = null
|
||||
return false;
|
||||
}
|
||||
const blob = base64ToBlob(data);
|
||||
if (blob.size > 1024 * 1024 * 10) {
|
||||
showToast('照片大小不能超过10M')
|
||||
showToast(toValueWithout('照片大小不能超过10M'))
|
||||
imgurl.value = null
|
||||
picture.value = null
|
||||
return false;
|
||||
@@ -510,7 +517,7 @@ function imgorigoinf(data) {
|
||||
imageWidth.value = img.naturalWidth;
|
||||
imageHeight.value = img.naturalHeight;
|
||||
if (imageWidth.value < 300 || imageHeight.value < 300) {
|
||||
showToast('请上传尺寸大于300*300像素的照片')
|
||||
showToast(toValueWithout('请上传尺寸大于300*300像素的照片'))
|
||||
setTimeout(() => {
|
||||
const btn = document.querySelector('.btn')
|
||||
if (btn) {
|
||||
@@ -555,13 +562,13 @@ const sendFaceToOss = async (src: string, url: string, path: string) => {
|
||||
}).then((res: any) => {
|
||||
console.log('faceCheck', res)
|
||||
showSuccessToast({
|
||||
message: '人脸检测成功',
|
||||
message: toValueWithout('人脸检测成功'),
|
||||
duration: 2000,
|
||||
})
|
||||
}).catch((err) => {
|
||||
console.log('faceCheck', err)
|
||||
showFailToast({
|
||||
message: err.message || '人脸检测失败',
|
||||
message: err.message || toValueWithout('人脸检测失败'),
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
@@ -576,7 +583,7 @@ const sendFaceToOss = async (src: string, url: string, path: string) => {
|
||||
} catch (err) {
|
||||
closeToast()
|
||||
showFailToast({
|
||||
message: err.message || '上传失败',
|
||||
message: err.message || toValueWithout('上传失败'),
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
@@ -585,7 +592,7 @@ const sendFaceToOss = async (src: string, url: string, path: string) => {
|
||||
|
||||
const onOversize = (file: any) => {
|
||||
if (file.size > 10 * 1024 * 1024) {
|
||||
showToast('照片大小不能超过10M')
|
||||
showToast(toValueWithout('照片大小不能超过10M'))
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@@ -600,7 +607,7 @@ const beforeRead = (file: any) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const raw: File = input.file || input
|
||||
if (raw.size > MAX_SIZE) {
|
||||
showToast('照片大小不能超过10M')
|
||||
showToast(toValueWithout('照片大小不能超过10M'))
|
||||
reject(false)
|
||||
return
|
||||
}
|
||||
@@ -614,7 +621,7 @@ const beforeRead = (file: any) => {
|
||||
imageHeight.value = height
|
||||
URL.revokeObjectURL(objectUrl)
|
||||
if (width < MIN_WIDTH || height < MIN_HEIGHT) {
|
||||
showToast(`请上传尺寸大于${MIN_WIDTH}×${MIN_HEIGHT}像素的照片`)
|
||||
showToast(toValueWithout(`请上传尺寸大于${MIN_WIDTH}×${MIN_HEIGHT}像素的照片`))
|
||||
reject(false)
|
||||
return
|
||||
}
|
||||
@@ -627,13 +634,13 @@ const beforeRead = (file: any) => {
|
||||
resolve(out)
|
||||
}
|
||||
reader.onerror = () => {
|
||||
showToast('图片读取失败')
|
||||
showToast(toValueWithout('图片读取失败'))
|
||||
reject(false)
|
||||
}
|
||||
reader.readAsDataURL(raw)
|
||||
}
|
||||
img.onerror = () => {
|
||||
showToast('图片加载失败')
|
||||
showToast(toValueWithout('图片加载失败'))
|
||||
URL.revokeObjectURL(objectUrl)
|
||||
reject(false)
|
||||
}
|
||||
@@ -658,7 +665,7 @@ const beforeRead = (file: any) => {
|
||||
const pid = ref('')
|
||||
const getPid = async () => {
|
||||
showLoadingToast({
|
||||
message: '上传中...',
|
||||
message: toValueWithout('上传中...'),
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
duration: 0,
|
||||
@@ -694,7 +701,7 @@ const getPid = async () => {
|
||||
closeToast()
|
||||
console.error('上传失败:', err)
|
||||
showFailToast({
|
||||
message: '上传失败',
|
||||
message: toValueWithout('上传失败'),
|
||||
duration: 2000,
|
||||
})
|
||||
isLoading.value = false
|
||||
@@ -771,11 +778,11 @@ const createLog = () => {
|
||||
type_id: typeId.value,
|
||||
kind_id: kindId.value
|
||||
}
|
||||
badgeApi.createLog(params).then((res: any) => {
|
||||
badgeApi.createLog(params).then((res: any) => {
|
||||
console.log('createLog', res)
|
||||
closeToast()
|
||||
showSuccessToast({
|
||||
message: '照片上传成功',
|
||||
message: toValueWithout('照片上传成功'),
|
||||
duration: 2000,
|
||||
})
|
||||
setTimeout(() => {
|
||||
@@ -842,12 +849,12 @@ const userId = ref('')
|
||||
const onBlur = async () => {
|
||||
console.log(mobile.value);
|
||||
if (!mobile.value) {
|
||||
showToast('请输入手机号');
|
||||
showToast(toValueWithout('请输入手机号'));
|
||||
return;
|
||||
}
|
||||
const mobileReg = /^1[3-9]\d{9}$/;
|
||||
if (!mobileReg.test(mobile.value)) {
|
||||
showToast('请输入正确的手机号');
|
||||
showToast(toValueWithout('请输入正确的手机号'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1070,7 +1077,7 @@ onMounted(() => {
|
||||
.photo-upload-plus {
|
||||
font-size: 48px;
|
||||
color: #c2c2c2;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.photo-upload-text {
|
||||
font-size: 16px;
|
||||
@@ -1083,7 +1090,7 @@ onMounted(() => {
|
||||
}
|
||||
.photo-upload-footer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
bottom: 0px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header" @click="goBack">
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> 我的订单</span>
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> {{ toValueWithout("我的订单") }}</span>
|
||||
</div>
|
||||
<div class="order-list" v-if="orders.length > 0">
|
||||
<div class="order-item" @click="OrderDetail(item.id)" v-for="item in orders" :key="item.id">
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="record-image-item-null">
|
||||
<img src="@/assets/badge/null-data.png" alt="暂无数据">
|
||||
<img src="@/assets/badge/null-data.png" :alt="toValueWithout('暂无数据')">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -18,6 +18,7 @@
|
||||
import { useRouter } from 'vue-router'
|
||||
import * as badgeApi from '@/api/badge'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { toValueWithout } from '@/lang/utils'
|
||||
const page = ref(1)
|
||||
const loading = ref(false)
|
||||
const finished = ref(false)
|
||||
@@ -61,15 +62,15 @@ function OrderDetail(id: number) {
|
||||
}
|
||||
function getStatus(status: number) {
|
||||
if(status == 1) {
|
||||
return '待支付'
|
||||
return toValueWithout('待支付')
|
||||
} else if(status == 2) {
|
||||
return '已取消'
|
||||
return toValueWithout('已取消')
|
||||
} else if(status == 100) {
|
||||
return '生产中'
|
||||
return toValueWithout('生产中')
|
||||
} else if(status == 200) {
|
||||
return '待收货'
|
||||
return toValueWithout('待收货')
|
||||
} else if(status == 300) {
|
||||
return '已完成'
|
||||
return toValueWithout('已完成')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header" @click="goBack">
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> 订单详情</span>
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> {{ toValueWithout("订单详情") }}</span>
|
||||
</div>
|
||||
<div class="order-status">
|
||||
<div class="avatar-wrapper">
|
||||
@@ -14,21 +14,21 @@
|
||||
<div class="status-info">
|
||||
<div class="status-title">{{ getStatus(order.status) }}</div>
|
||||
<div class="status-desc">
|
||||
下单后预计需要10天完成生产发货。如对产品有疑问,可以联系客服咨询。
|
||||
{{ toValueWithout("下单后预计需要10天完成生产发货。如对产品有疑问,可以联系客服咨询。") }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 0 16px;">
|
||||
<van-divider />
|
||||
</div>
|
||||
<div class="product-info" v-if="order.use_type == 2">
|
||||
<div class="product-title">收货信息</div>
|
||||
<div class="product-title">{{ toValueWithout("收货信息") }}</div>
|
||||
<div class="product-details">
|
||||
<div class="product-row">
|
||||
<span class="product-label">收货人信息</span>
|
||||
<span class="product-label">{{ toValueWithout("收货人信息") }}</span>
|
||||
<span class="product-value">{{order.contact_name}} {{order.contact_mobile}}</span>
|
||||
</div>
|
||||
<div class="product-row">
|
||||
<span class="product-label">收货地址</span>
|
||||
<span class="product-label">{{ toValueWithout("收货地址") }}</span>
|
||||
<span class="product-value">{{order.province_name}} {{order.city_name}} {{order.county_name}} {{order.address}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,25 +37,25 @@
|
||||
<van-divider />
|
||||
</div>
|
||||
<div class="product-info">
|
||||
<div class="product-title">产品信息</div>
|
||||
<div class="product-title">{{ toValueWithout("产品信息") }}</div>
|
||||
<div class="product-details">
|
||||
<div class="product-row">
|
||||
<span class="product-label">产品名称</span>
|
||||
<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>
|
||||
<span class="product-label">{{ toValueWithout("产品名称") }}</span>
|
||||
<span class="product-value" v-if="order.type_id == 1">{{ order.prod_id == 7 ? toValueWithout('人物立体徽章') : toValueWithout('宠物立体徽章') }}</span>
|
||||
<span class="product-value" v-if="order.type_id == 2">{{ order.prod_id == 7 ? toValueWithout('人物浮雕相框') : toValueWithout('宠物浮雕相框') }}</span>
|
||||
<span class="product-value" v-if="order.type_id == 3">{{ order.prod_id == 7 ? toValueWithout('人物冰箱贴') : toValueWithout('宠物冰箱贴') }}</span>
|
||||
<span class="product-value" v-if="order.type_id == 4">{{ order.prod_id == 1 ? toValueWithout('人物卡通手办') : toValueWithout('宠物卡通手办') }}</span>
|
||||
</div>
|
||||
<div class="product-row">
|
||||
<span class="product-label">尺寸</span>
|
||||
<span class="product-label">{{ toValueWithout("尺寸") }}</span>
|
||||
<span class="product-value">{{order.model_size}}</span>
|
||||
</div>
|
||||
<div class="product-row" v-if="shape_name">
|
||||
<span class="product-label">形状</span>
|
||||
<span class="product-value">{{shape_name}}</span>
|
||||
<span class="product-label">{{ toValueWithout("形状") }}</span>
|
||||
<span class="product-value">{{ toValueWithout(shape_name) }}</span>
|
||||
</div>
|
||||
<div class="product-row">
|
||||
<span class="product-label">购买数量</span>
|
||||
<span class="product-label">{{ toValueWithout("购买数量") }}</span>
|
||||
<span class="product-value">{{order.count}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,14 +78,14 @@
|
||||
<van-divider />
|
||||
</div>
|
||||
<div class="product-info">
|
||||
<div class="product-title">订单信息</div>
|
||||
<div class="product-title">{{ toValueWithout("订单信息") }}</div>
|
||||
<div class="product-details">
|
||||
<div class="product-row">
|
||||
<span class="product-label">购买订单id</span>
|
||||
<span class="product-label">{{ toValueWithout("购买订单id") }}</span>
|
||||
<span class="product-value">{{order.sw_oid}}</span>
|
||||
</div>
|
||||
<div class="product-row">
|
||||
<span class="product-label">购买时间</span>
|
||||
<span class="product-label">{{ toValueWithout("购买时间") }}</span>
|
||||
<span class="product-value">{{order.pay_at}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,6 +98,7 @@ import { useRouter } from 'vue-router';
|
||||
import * as badgeApi from '@/api/badge';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { toValueWithout } from '@/lang/utils';
|
||||
const route = useRoute();
|
||||
const order = ref({})
|
||||
const id = ref(0)
|
||||
@@ -147,15 +148,15 @@ function goBack() {
|
||||
}
|
||||
function getStatus(status: number) {
|
||||
if(status == 1) {
|
||||
return '待支付'
|
||||
return toValueWithout('待支付')
|
||||
} else if(status == 2) {
|
||||
return '已取消'
|
||||
return toValueWithout('已取消')
|
||||
} else if(status == 100) {
|
||||
return '生产中'
|
||||
return toValueWithout('生产中')
|
||||
} else if(status == 200) {
|
||||
return '待收货'
|
||||
return toValueWithout('待收货')
|
||||
} else if(status == 300) {
|
||||
return '已完成'
|
||||
return toValueWithout('已完成')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+55
-55
@@ -3,20 +3,20 @@
|
||||
<view class="backstyle_1"></view>
|
||||
<view class="backstyle_2"></view>
|
||||
<div class="header" @click="goBack">
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" /> 效果预览</span>
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" /> {{ toValueWithout("效果预览") }}</span>
|
||||
</div>
|
||||
<div class="step-container">
|
||||
<div class="step-item">
|
||||
<div class="step-content">
|
||||
<div class="step-title">正面照片</div>
|
||||
<div class="step-desc">清晰的正面照片</div>
|
||||
<div class="step-title">{{ toValueWithout("正面照片") }}</div>
|
||||
<div class="step-desc">{{ toValueWithout("清晰的正面照片") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-item active">
|
||||
<div class="step-num">2</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">确认下单</div>
|
||||
<div class="step-desc">选择一个你喜欢的效果图下单</div>
|
||||
<div class="step-title">{{ toValueWithout("确认下单") }}</div>
|
||||
<div class="step-desc">{{ toValueWithout("选择一个你喜欢的效果图下单") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="progress-bar-fg" :style="{ width: progress + '%' }"></div>
|
||||
</div>
|
||||
<div class="progress-text">{{progressText}} {{progress}}%</div>
|
||||
<div class="progress-desc">总计大约需要90秒,请耐心等待...</div>
|
||||
<div class="progress-desc">{{ toValueWithout("总计大约需要90秒,请耐心等待...") }}</div>
|
||||
</div>
|
||||
<div v-else class="progress-section-picture" style="width: 320px;height: 320px;">
|
||||
<div class="progress-section-img" style="width: 320px;height: 320px;">
|
||||
@@ -41,24 +41,24 @@
|
||||
<div class="image-list-item" v-for="item in imageList" :key="item.key">
|
||||
<img v-if="item.status == 1" class="image-list-item-img" :class="{ imgActive: item.key == imgKey }" :src="item.origin_url" alt="" @click="changeImage(item)">
|
||||
<div v-else-if="item.status == 0" class="image-list-item-loading">
|
||||
设计中
|
||||
{{ toValueWithout("设计中") }}
|
||||
</div>
|
||||
<div v-else-if="item.status == 2" class="image-list-item-loading">
|
||||
设计失败
|
||||
{{ toValueWithout("设计失败") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-section">
|
||||
<div class="info-item">
|
||||
<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 class="info-title" v-if="typeId == 1">{{ prodId == 7 ? toValueWithout('人物立体徽章') : toValueWithout('宠物立体徽章') }}</div>
|
||||
<div class="info-title" v-if="typeId == 2">{{ prodId == 7 ? toValueWithout('人物浮雕相框') : toValueWithout('宠物浮雕相框') }}</div>
|
||||
<div class="info-title" v-if="typeId == 3">{{ prodId == 7 ? toValueWithout('人物3D冰箱贴') : toValueWithout('宠物3D冰箱贴') }}</div>
|
||||
<div class="info-title" v-if="typeId == 4">{{ prodId == 1 ? toValueWithout('人物卡通手办') : toValueWithout('宠物卡通手办') }}</div>
|
||||
<div class="info-content">{{ toValueWithout("产品类型") }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-title">3D全彩打印</div>
|
||||
<div class="info-content">工艺</div>
|
||||
<div class="info-title">{{ toValueWithout("3D全彩打印") }}</div>
|
||||
<div class="info-content">{{ toValueWithout("工艺") }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-title">ID</div>
|
||||
@@ -76,12 +76,12 @@
|
||||
<img class="shape-item-image" :class="{ 'shape-item-image-round': item.id == 1 || item.id == 2 }" :src="item.cover_path || imageUrl"/>
|
||||
<van-icon v-if="item.id == shapeId" class="shape-icon" color="#15CF5F" name="checked" size="18px" />
|
||||
</div>
|
||||
<div class="shape-item-text">{{item.name}}</div>
|
||||
<div class="shape-item-text">{{ toValueWithout(item.name) }}</div>
|
||||
</div>
|
||||
</block>
|
||||
</div>
|
||||
<div class="shape-box-input" v-if="imageUrl && custom_switch == 1">
|
||||
<input class="shape-box-input-text" type="text" placeholder="请输入文字" v-model="shapeText" @change="changeShapeText" @input="changeShapeText" @onBlur="changeShapeText" />
|
||||
<input class="shape-box-input-text" type="text" :placeholder="toValueWithout('请输入文字')" v-model="shapeText" @change="changeShapeText" @input="changeShapeText" @onBlur="changeShapeText" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="info-desc">
|
||||
@@ -92,12 +92,12 @@
|
||||
<van-divider />
|
||||
</div>
|
||||
<div class="order-section" v-if="trialCode == false && imageUrl">
|
||||
<div class="order-title">订购数量</div>
|
||||
<div class="order-title">{{ toValueWithout("订购数量") }}</div>
|
||||
<block v-for="item in sizeList" :key="item.id">
|
||||
<block>
|
||||
<div class="order-item">
|
||||
<span class="order-size">{{ item.size }}</span>
|
||||
<span class="order-free">(剩余兑换:{{ item.remaining }})</span>
|
||||
<span class="order-free">({{ toValueWithout("剩余兑换") }}:{{ item.remaining }})</span>
|
||||
<div class="order-ctrl">
|
||||
<van-stepper v-model="item.count" :min="0" :max="item.remaining" @change="changeValue" />
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@
|
||||
<!-- <block v-if="orderStat.use_type == 2">
|
||||
<div class="order-item">
|
||||
<span class="order-size">{{ item.size }}</span>
|
||||
<span class="order-free">(剩余兑换:{{ item.remaining }})</span>
|
||||
<span class="order-free">({{ toValueWithout("剩余兑换") }}:{{ item.remaining }})</span>
|
||||
<div class="order-ctrl">
|
||||
<van-stepper v-model="item.count" :min="0" :max="item.remaining" @change="changeValue" />
|
||||
</div>
|
||||
@@ -115,29 +115,29 @@
|
||||
</block>
|
||||
</div>
|
||||
<div class="address-box" v-if="orderStat.use_type == 2 && imageUrl && code == 'ACAYOAAC3PFCPO3CD6DVM1'">
|
||||
<div class="order-title" style="padding: 0 16px;">地址识别</div>
|
||||
<div class="order-title" style="padding: 0 16px;">{{ toValueWithout("地址识别") }}</div>
|
||||
<div class="address-item">
|
||||
<van-field
|
||||
v-model="addressInput"
|
||||
label=""
|
||||
placeholder="请输入姓名、手机号、详细地址(如:张三 13800138000 广东省深圳市南山区科技园1号)"
|
||||
:placeholder="toValueWithout('请输入姓名、手机号、详细地址(如:张三 13800138000 广东省深圳市南山区科技园1号)')"
|
||||
clearable
|
||||
right-icon="search"
|
||||
>
|
||||
<template #button>
|
||||
<van-button size="small" type="primary" @click="handleAddressInput" style="margin-left: 8px;">自动识别</van-button>
|
||||
<van-button size="small" type="primary" @click="handleAddressInput" style="margin-left: 8px;">{{ toValueWithout("自动识别") }}</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
<div class="address-item" style="padding: 0px 16px 16px 16px;" v-if="contact_name && contact_mobile && province_name && city_name && county_name && address">
|
||||
<div style="font-size: 16px;color: #387aff;text-align: left;margin-bottom: 8px;">识别结果</div>
|
||||
<div style="font-size: 16px;color: #387aff;text-align: left;margin-bottom: 8px;">{{ toValueWithout("识别结果") }}</div>
|
||||
<div style="font-size: 14px;text-align: left;">
|
||||
{{ contact_name }} {{ contact_mobile }} {{ province_name }} {{ city_name }} {{ county_name }} {{ address }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="address-box" v-if="orderStat.use_type == 2 && imageUrl">
|
||||
<div class="order-title" style="padding: 0 16px;">收货地址</div>
|
||||
<div class="order-title" style="padding: 0 16px;">{{ toValueWithout("收货地址") }}</div>
|
||||
<div class="address-item">
|
||||
<van-address-edit
|
||||
:area-list="areaList"
|
||||
@@ -146,7 +146,7 @@
|
||||
show-delete
|
||||
show-search-result
|
||||
:search-result="searchResult"
|
||||
:area-columns-placeholder="['请选择', '请选择', '请选择']"
|
||||
:area-columns-placeholder="[toValueWithout('请选择'), toValueWithout('请选择'), toValueWithout('请选择')]"
|
||||
@change="nameTelChange"
|
||||
@change-area="changeArea"
|
||||
@change-detail="onChangeDetail"
|
||||
@@ -156,41 +156,39 @@
|
||||
<div style="height: 130px;"></div>
|
||||
<div class="confirm-box">
|
||||
<div class="action-section">
|
||||
<button v-if="trialCode == false" @click="sureReload" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/reload.png" alt=""> 再次生成</button>
|
||||
<button @click="compare" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/duibi.png" alt=""> 前后对比</button>
|
||||
<button @click="save" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/down.png" alt=""> 保存图片</button>
|
||||
<button v-if="trialCode == false" @click="sureReload" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/reload.png" alt=""> {{ toValueWithout("再次生成") }}</button>
|
||||
<button @click="compare" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/duibi.png" alt=""> {{ toValueWithout("前后对比") }}</button>
|
||||
<button @click="save" :disabled="flag < 1" class="action-btn"><img class="action-img" src="@/assets/badge/down.png" alt=""> {{ toValueWithout("保存图片") }}</button>
|
||||
</div>
|
||||
<div class="btn-box" v-if="trialCode == false">
|
||||
<button @click="confirm" :disabled="flag < 1" class="confirm-btn">确认选择</button>
|
||||
<button @click="confirm" :disabled="flag < 1" class="confirm-btn">{{ toValueWithout("确认选择") }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model:show="showCompare" title="前后对比" :close-on-click-overlay="true" closeable>
|
||||
<van-action-sheet v-model:show="showCompare" :title="toValueWithout('前后对比')" :close-on-click-overlay="true" closeable>
|
||||
<div style="padding: 16px;">
|
||||
<div style="display: flex; align-items: center; justify-content: center; gap: 20px;">
|
||||
<div style="text-align: center;">
|
||||
<img :src="compareList.origin_path" alt="原图" style="max-width: 120px; max-height: 120px; border-radius: 8px;">
|
||||
<img :src="compareList.origin_path" :alt="toValueWithout('原图')" style="max-width: 120px; max-height: 120px; border-radius: 8px;">
|
||||
</div>
|
||||
<div style="font-size: 24px; color: #333;">
|
||||
<van-icon name="arrow" size="20px" />
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<img :src="imageUrl" alt="效果图" style="width: 120px; height: 120px; border-radius: 8px;">
|
||||
<img :src="imageUrl" :alt="toValueWithout('效果图')" style="width: 120px; height: 120px; border-radius: 8px;">
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 16px; color: #999; font-size: 12px;">
|
||||
温馨提示:<br/>
|
||||
AI设计的徽章效果图是根据用户提供的照片机器学习生成的,<br/>
|
||||
多试几次就能找到你满意的徽章~
|
||||
{{ toValueWithout("温馨提示:AI设计的徽章效果图是根据用户提供的照片机器学习生成的,多试几次就能找到你满意的徽章~") }}
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<div v-if="showPreview">
|
||||
<div class="preview-mask" @click="showPreview = false">
|
||||
<img :src="imageWater" alt="徽章预览" />
|
||||
<p>长按图片 → 保存到相册</p>
|
||||
<img :src="imageWater" :alt="toValueWithout('徽章预览')" />
|
||||
<p>{{ toValueWithout("长按图片 → 保存到相册") }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -201,6 +199,7 @@ import { showSuccessToast, showToast, showNotify, showConfirmDialog, AddressEdit
|
||||
import { localStorage } from '@/utils/local-storage'
|
||||
import * as badgeApi from '@/api/badge'
|
||||
import { areaList } from '@/utils/area'
|
||||
import { toValueWithout } from '@/lang/utils'
|
||||
const router = useRouter();
|
||||
const value = ref(0);
|
||||
const showReload = ref(false)
|
||||
@@ -219,14 +218,14 @@ function compare() {
|
||||
function sureReload() {
|
||||
console.log('orderStat', orderStat.value)
|
||||
if (orderStat.value.remain_count <= 0) {
|
||||
showToast('当前次数已用完,请重新购买')
|
||||
showToast(toValueWithout('当前次数已用完,请重新购买'))
|
||||
return
|
||||
}
|
||||
isPreview.value = false
|
||||
showConfirmDialog({
|
||||
title: '再次生成',
|
||||
title: toValueWithout('再次生成'),
|
||||
message:
|
||||
'请确认是否重新生成。',
|
||||
toValueWithout('请确认是否重新生成。'),
|
||||
})
|
||||
.then(() => {
|
||||
group.value = newGroup.value
|
||||
@@ -464,31 +463,31 @@ const confirm = () => {
|
||||
if (loading.value) return
|
||||
console.log('confirm')
|
||||
if (payAmount.value <= 0) {
|
||||
showToast('请先选择下单数量')
|
||||
showToast(toValueWithout('请先选择下单数量'))
|
||||
return
|
||||
}
|
||||
if (orderStat.value.use_type == 2 && !contact_name.value) {
|
||||
showToast('请先填写收货人信息')
|
||||
showToast(toValueWithout('请先填写收货人信息'))
|
||||
return
|
||||
}
|
||||
if (orderStat.value.use_type == 2 && !contact_mobile.value) {
|
||||
showToast('请先填写收货人手机号')
|
||||
showToast(toValueWithout('请先填写收货人手机号'))
|
||||
return
|
||||
}
|
||||
if (orderStat.value.use_type == 2 && !province_id.value) {
|
||||
showToast('请先选择地区')
|
||||
showToast(toValueWithout('请先选择地区'))
|
||||
return
|
||||
}
|
||||
if (orderStat.value.use_type == 2 && !address.value) {
|
||||
showToast('请先填写详细地址')
|
||||
showToast(toValueWithout('请先填写详细地址'))
|
||||
return
|
||||
}
|
||||
getPosition()
|
||||
loading.value = true
|
||||
showConfirmDialog({
|
||||
title: '确认下单',
|
||||
title: toValueWithout('确认下单'),
|
||||
message:
|
||||
'请再次确认是否选择这个模型下单,下单后预计需要10天完成生产发货。如对产品有疑问,可以联系客服咨询。',
|
||||
toValueWithout('请再次确认是否选择这个模型下单,下单后预计需要10天完成生产发货。如对产品有疑问,可以联系客服咨询。'),
|
||||
})
|
||||
.then(() => {
|
||||
const parms = {
|
||||
@@ -517,7 +516,7 @@ const confirm = () => {
|
||||
badgeApi.creatOrder(parms).then((res: any) => {
|
||||
console.log('creatOrder', res)
|
||||
showSuccessToast({
|
||||
message: '下单成功',
|
||||
message: toValueWithout('下单成功'),
|
||||
duration: 2000,
|
||||
})
|
||||
router.push({
|
||||
@@ -574,13 +573,13 @@ const progressList = () => {
|
||||
if (progress.value < 90) {
|
||||
progress.value += 1
|
||||
if (progress.value < 25) {
|
||||
progressText.value = '照片数据分析中'
|
||||
progressText.value = toValueWithout('照片数据分析中')
|
||||
} else if (progress.value < 50) {
|
||||
progressText.value = '提炼图像关键词'
|
||||
progressText.value = toValueWithout('提炼图像关键词')
|
||||
} else if (progress.value < 75) {
|
||||
progressText.value = '图像生成中'
|
||||
progressText.value = toValueWithout('图像生成中')
|
||||
} else {
|
||||
progressText.value = '图像后处理与优化'
|
||||
progressText.value = toValueWithout('图像后处理与优化')
|
||||
}
|
||||
}
|
||||
}, 300)
|
||||
@@ -1382,7 +1381,7 @@ onUnmounted(() => {
|
||||
}
|
||||
.shape-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
@@ -1412,11 +1411,12 @@ onUnmounted(() => {
|
||||
.shape-icon {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
bottom: 24px;
|
||||
top: 14vw;
|
||||
}
|
||||
.shape-item-text {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
max-width: 20vw;
|
||||
}
|
||||
.shape-type {
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="header" @click="goBack" style="text-align: center;">
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> 设计记录</span>
|
||||
<span class="back-icon"><van-icon name="arrow-left" size="16px" color="#333" /> {{ toValueWithout("设计记录") }}</span>
|
||||
</div>
|
||||
<div class="record-container">
|
||||
<div class="record-note">注:可点击效果图进行下单打印</div>
|
||||
<div class="record-note">{{ toValueWithout("注:可点击效果图进行下单打印") }}</div>
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model:loading="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
:finished-text="toValueWithout('没有更多了')"
|
||||
@load="onLoad"
|
||||
>
|
||||
<div class="record-images" v-if="images.length > 0">
|
||||
@@ -20,19 +20,19 @@
|
||||
</block>
|
||||
<div v-else-if="item.status == 0 || item.reason" class="record-image-item-loading">
|
||||
<div style="font-size: 12px;color: #999;text-align: center;">ID: {{ item.sw_pid }}</div>
|
||||
<div style="width: 70%;font-size: 12px;">{{ item.reason || '设计中' }}</div>
|
||||
<div style="width: 70%;font-size: 12px;">{{ item.reason || toValueWithout('设计中') }}</div>
|
||||
</div>
|
||||
<div v-else-if="item.status == 2 || item.reason" class="record-image-item-loading">
|
||||
<div style="font-size: 12px;color: #999;text-align: center;">ID: {{ item.sw_pid }}</div>
|
||||
<div style="width: 70%;font-size: 12px;">{{ item.reason || '设计失败' }}</div>
|
||||
<div style="width: 70%;font-size: 12px;">{{ item.reason || toValueWithout('设计失败') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="loading && page.value === 1" class="record-image-item-loading">
|
||||
加载中...
|
||||
{{ toValueWithout("加载中...") }}
|
||||
</div>
|
||||
<div v-else class="record-image-item-null">
|
||||
<img src="@/assets/badge/null-data.png" alt="暂无数据">
|
||||
<img src="@/assets/badge/null-data.png" :alt="toValueWithout('暂无数据')">
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
@@ -44,6 +44,7 @@
|
||||
import { useRouter } from 'vue-router';
|
||||
import * as badgeApi from '@/api/badge';
|
||||
import { onMounted, ref, onUnmounted } from 'vue';
|
||||
import { toValueWithout } from '@/lang/utils';
|
||||
const router = useRouter();
|
||||
const images = ref([]);
|
||||
const page = ref(1);
|
||||
@@ -81,7 +82,7 @@ async function getList() {
|
||||
page.value++;
|
||||
}
|
||||
} catch (err: any) {
|
||||
error.value = err.message || '获取数据失败';
|
||||
error.value = err.message || toValueWithout('获取数据失败');
|
||||
console.error('获取设计记录失败', err);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
||||
Reference in new issue
Block a user