Merge branch 'StableVersion' of ssh://18.167.251.121:10002/aidlab/aida_front into StableVersion

This commit is contained in:
X1627315083
2025-10-15 15:20:15 +08:00
59 changed files with 1156 additions and 746 deletions

View File

@@ -1816,13 +1816,11 @@ textarea:focus {
.accountEdit_page .input_border,
.generalMenu_printModel_upload .input_border,
.generate .input_border {
z-index: 2;
display: flex;
align-items: center;
padding-bottom: calc(2rem*1.2);
top: 0;
flex-wrap: wrap;
z-index: 6;
--width: 65%;
}
.collection_modal_body .input_border .input_box,
@@ -1836,7 +1834,6 @@ textarea:focus {
.generalMenu_printModel_upload .input_border .input_box,
.generate .input_border .input_box {
position: relative;
z-index: 6;
flex: 1;
display: flex;
align-items: center;
@@ -1992,7 +1989,7 @@ textarea:focus {
display: flex;
float: left;
align-items: center;
padding: 1.5rem 2rem;
padding: 1rem 2rem;
background-color: #fff;
flex: 1;
height: auto;
@@ -2210,7 +2207,6 @@ textarea:focus {
cursor: pointer;
transition: all 0.3s;
position: relative;
z-index: 4;
width: 4rem;
display: flex;
min-height: 3rem;
@@ -2318,6 +2314,8 @@ textarea:focus {
top: 0rem;
flex: 1;
border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
}
.generage_btn_box {
position: relative;

View File

@@ -1974,17 +1974,17 @@ textarea:focus{
//设计input和上传按钮样式
.collection_modal_body,.design_detail_modal_component,.library_page,.productImg_content,.poseTransfer,.scaleImage_modal,.editDesignType_modal,.accountEdit_page,.generalMenu_printModel_upload,.generate{
.input_border{
z-index: 2;
// z-index: 2;
display: flex;
align-items: center;
padding-bottom: calc(2rem*1.2);
top: 0;
flex-wrap: wrap;
z-index: 6;
// z-index: 6;
--width:65%;
.input_box{
position: relative;
z-index: 6;
// z-index: 6;
flex: 1;
display: flex;
align-items: center;
@@ -2057,7 +2057,7 @@ textarea:focus{
display: flex;
float: left;
align-items: center;
padding: 1.5rem 2rem;
padding: 1rem 2rem;
// padding-right: 0;
background-color: #fff;
flex: 1;
@@ -2150,7 +2150,6 @@ textarea:focus{
cursor: pointer;
transition: all .3s;
position: relative;
z-index: 4;
width: 4rem;
align-items: center;
justify-content: center;
@@ -2201,6 +2200,8 @@ textarea:focus{
top: 0rem;
flex: 1;
border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
}
// span{

View File

@@ -50,10 +50,10 @@
<div v-if="!isEditEmail">{{ userDetail.email }}</div>
<input v-else type="text" :value="editEmail">
</div>
<div class="icon">
<!-- <div class="icon">
<i v-if="!isEditEmail" class="fi fi-rr-edit" @click="openEdit('email')"></i>
<i v-else class="fi fi-br-check" @click="editChek('email')"></i>
</div>
</div> -->
</div>
</div>
<div class="content_item_user_left_detail_bottom">

View File

@@ -27,10 +27,10 @@
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
</div> -->
<div class="gmail_btn" @click="toGmailLogin">
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn forbidden">{{ $t('frontPage.BindNow') }}</div>
<!-- <div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div> -->
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn forbidden" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
<div class="gmail_btn">
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn" style="pointer-events: none;">{{ $t('frontPage.BindNow') }}</div>
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
<!-- <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> -->
</div>
</div>
@@ -138,12 +138,13 @@ export default defineComponent({
bindPageDom.bindEmail.init('Modify')
}
const toGmailLogin = ()=>{
message.info(t('account.canNotUtilize'))
}
onMounted(async ()=>{
return
let GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
let GOOGLE_CLIENT_ID
if(import.meta.env.VITE_USER_NODE_ENV == 'development'){
GOOGLE_CLIENT_ID = '157095842121-kdd1fdf8m8nudvj9sprstb2k2prnf9e4.apps.googleusercontent.com'
}else{
GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
}
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(!window.isAddGmail){
if(!existingScript){
@@ -206,7 +207,6 @@ export default defineComponent({
ungroupGoogleModel,
ungroupWeiXinModel,
modifyEmail,
toGmailLogin,
}
},
data(){
@@ -271,14 +271,21 @@ export default defineComponent({
}
>.gmail_btn{
position: relative;
border-radius: 4rem;
overflow: hidden;
> .gallery_btn{
position: relative;
z-index: 2;
}
#g_id_bind{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
z-index: 2;
// opacity: 0;
z-index: 1;
:deep(.nsm7Bb-HzV7m-LgbsSe.Bz112c-LgbsSe){
width: 100%;
}

View File

@@ -28,7 +28,7 @@
optionFilterProp="label"
:options="countryList"
:field-names="{ label: locale == 'CHINESE_SIMPLIFIED'?'labelCn':'label' }"
placeholder="Please select"
:placeholder="`${$t('account.plaseSelect')} ${$t('account.Country')}`"
allowClear
show-search
></a-select>

View File

@@ -22,7 +22,7 @@
</a-range-picker>
</div>
<!-- <div class="admin_state_item">
<span>Country:</span>
<span>Country or Region:</span>
<a-select
v-model:value="country"
:allowClear="true"

View File

@@ -77,10 +77,12 @@ import { PieChart } from 'echarts/charts';
import { LabelLayout } from 'echarts/features';
import { useStore } from "vuex";
import { CanvasRenderer } from 'echarts/renderers';
import { useI18n } from 'vue-i18n'
export default defineComponent({
components: {
},
setup() {
const {t} = useI18n()
const store:any = useStore()
let filter:any = reactive({
dataList:computed(()=>{
@@ -115,7 +117,7 @@ export default defineComponent({
let data:any = []
rv.names.forEach((item:any,index:number) => {
let obj = {
name : item,
name : t(`admin.${item}`),
value:rv.values[index],
}
data.push(obj)

View File

@@ -22,7 +22,7 @@
</a-range-picker>
</div>
<div class="admin_state_item">
<span>Country:</span>
<span>Country or Region:</span>
<a-select
v-model:value="country"
:allowClear="true"
@@ -365,11 +365,11 @@ export default defineComponent({
ellipsis:true
},
{
title: "Country",
title: "Country or Region",
align: "center",
dataIndex: "country",
key: "country",
width:150,
width:200,
ellipsis:true
},
{

View File

@@ -26,7 +26,7 @@
<a-select v-model:value="userType" size="large" style="width:250px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div> -->
<div class="admin_state_item">
<span>Country:</span>
<span>Country or Region:</span>
<a-select
v-model:value="country"
:allowClear="true"
@@ -292,11 +292,11 @@ export default defineComponent({
},
},
{
title: "Country",
title: "Country or Region",
align: "center",
dataIndex: "country",
key: "country",
width:100,
width:200,
},
{
title: "Create Date",

View File

@@ -92,7 +92,7 @@
/>
</div>
<div class="admin_state_item">
<span>Country:</span>
<span>Country or Region:</span>
<input
:disabled="title != 'Add'"
:class="{active:title != 'Add'}"

View File

@@ -1,298 +1,331 @@
<template>
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
<a-modal
class="allUserPoeration_modal generalModel"
v-model:visible="operationsModal"
:footer="null"
:get-container="() => $refs.allUserPoerationModal"
width="50%"
:height="'77rem'"
:maskClosable="false"
:centered="true"
:closable="false"
:mask="true"
wrapClassName="#app"
:keyboard="false"
>
<div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<svg
width="100%" height="100%"
viewBox="0 0 46 46"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" />
<rect
x="32.5063"
y="12"
width="3"
height="29"
rx="1.5"
transform="rotate(45 32.5063 12)"
fill="white"
/>
<rect
x="34.6274"
y="32.5059"
width="3"
height="29"
rx="1.5"
transform="rotate(135 34.6274 32.5059)"
fill="white"
/>
</svg>
</div>
</div>
<div class="modal_title_text">
<div>{{ title }} Coupon</div>
</div>
<div class="allUserPoeration_center admin_page">
<div class="admin_state_item">
<span>Cooperator:</span>
<input
v-model="cooperator"
placeholder="Please enter cooperator"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>percentOff(%): <span>*</span></span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="percentOff"
placeholder="Please enter percentOff"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>Commission Rate: <span>*</span></span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="commissionRate"
placeholder="Please enter commission rate"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<!-- <div class="admin_state_item" > -->
<span>End Time: <span>*</span></span>
<a-space direction="vertical" style="width: 220px">
<a-date-picker
v-model:value="rangePickerValue"
:disabled="title != 'Add'"
style="width: 220px"
/>
</a-space>
</div>
<div class="admin_state_item">
<span>MaxRedemptions:</span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="maxRedemptions"
placeholder="Please enter maximum"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>PaidCommission:</span>
<input
v-model="paidCommission"
placeholder="Please enter paidCommission"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>Remark:</span>
<input
v-model="remark"
placeholder="Please enter remark"
type="text"
style="width: 220px"
/>
</div>
</div>
<div class="allUserPoeration_btn admin_page">
<div class="admin_search_item" @click="cancelDsign">Close</div>
<div class="admin_search_item" @click="setOk">OK</div>
</div>
</a-modal>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</template>
<script>
import {
defineComponent,
ref,
reactive,
watch,
onMounted,
nextTick,
toRefs,
} from "vue";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { formatTime, isEmail } from "@/tool/util";
import dayjs, { Dayjs } from "dayjs";
import md5 from "md5";
export default defineComponent({
components: {},
emits: ["searchHistoryList"],
setup(props, { emit }) {
let operations = reactive({
operationsModal: false,
operationsEdit: false,
loadingShow: false,
title: "",
});
let operationsData = reactive({
rangePickerValue: "",
percentOff: "",
commissionRate: "",
maxRedemptions: "",
cooperator: "",
paidCommission: "",
remark: "",
id: "",
});
let init = (funStr, data) => {
operations.operationsModal = true;
operations.operationsEdit = true;
operations.title = funStr;
if (funStr == "Add") operations.operationsEdit = false;
if (funStr == "Edit") {
operationsData.id = data.id;
operationsData.percentOff = data.percentOff;
operationsData.commissionRate = data.commissionRate;
operationsData.maxRedemptions = data.maxRedemptions;
operationsData.cooperator = data.cooperator;
operationsData.paidCommission = data.paidCommission;
operationsData.remark = data.remark;
operationsData.rangePickerValue = dayjs(
new Date(data.redeemBy * 1000).toISOString().split("T")[0],
"YYYY/MM/DD"
);
// operationsData.rangePickerValue='2024-08-05T00:00:06'
// operationsData.validEndTime='2024-08-05T00:00:06'
// operationsData.commissionRate = data.commissionRate
// operationsData.maxRedemptions = data.maxRedemptions
// operationsData.validStartTime = formatTime(data.validStartTime)
// operationsData.validEndTime = formatTime(data.validEndTime)
}
};
let setAddData = () => {
const timestampMs =
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
return {
percentOff: operationsData.percentOff,
maxRedemptions: operationsData.maxRedemptions,
commissionRate: operationsData.commissionRate,
timestamp: timestampMs,
cooperator: operationsData.cooperator,
remark: operationsData.remark,
};
};
let setEditData = () => {
const timestampMs =
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
return {
id: operationsData.id,
paidCommission: operationsData.commissionRate,
cooperator: operationsData.cooperator,
remark: operationsData.remark,
};
};
let cancelDsign = () => {
operationsData.rangePickerValue = "";
operationsData.percentOff = "";
operationsData.commissionRate = "";
operationsData.maxRedemptions = "";
operationsData.cooperator = "";
operationsData.paidCommission = "";
operationsData.remark = "";
operationsData.id = "";
operations.operationsModal = false;
};
let setOk = () => {
let data;
if (operations.title == "Add") {
data = setAddData();
if (!data.commissionRate || !data.timestamp || !data.percentOff)
return message.warning("Please check the input box marked with *");
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
if (rv) {
cancelDsign();
emit("searchHistoryList");
}
});
} else {
data = setEditData();
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, {
params: data,
}).then((rv) => {
if (rv) {
cancelDsign();
emit("searchHistoryList");
}
});
}
};
return {
...toRefs(operations),
...toRefs(operationsData),
cancelDsign,
init,
focus,
blur,
setOk,
};
},
data() {
return {};
},
mounted() {},
methods: {},
});
</script>
<style lang="less" scoped>
:deep(.allUserPoeration_modal) {
.ant-modal-body {
display: flex;
flex-direction: column;
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
<a-modal
class="allUserPoeration_modal generalModel"
v-model:visible="operationsModal"
:footer="null"
:get-container="() => $refs.allUserPoerationModal"
width="50%"
:height="'77rem'"
:maskClosable="false"
:centered="true"
:closable="false"
:mask="true"
wrapClassName="#app"
:keyboard="false"
>
<div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<svg
width="100%" height="100%"
viewBox="0 0 46 46"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="23" cy="23" r="23" fill="black" fill-opacity="0.3" />
<rect
x="32.5063"
y="12"
width="3"
height="29"
rx="1.5"
transform="rotate(45 32.5063 12)"
fill="white"
/>
<rect
x="34.6274"
y="32.5059"
width="3"
height="29"
rx="1.5"
transform="rotate(135 34.6274 32.5059)"
fill="white"
/>
</svg>
</div>
</div>
<div class="modal_title_text">
<div>{{ title }} Coupon</div>
</div>
<div class="allUserPoeration_center admin_page">
<div class="admin_state_item">
<span>Cooperator:</span>
<input
v-model="cooperator"
placeholder="Please enter cooperator"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>percentOff(%): <span>*</span></span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="percentOff"
placeholder="Please enter percentOff"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>Commission Rate: <span>*</span></span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="commissionRate"
placeholder="Please enter commission rate"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<!-- <div class="admin_state_item" > -->
<span>Start Time: <span>*</span></span>
<a-space direction="vertical" style="width: 220px">
<a-date-picker
v-model:value="startTime"
:disabled="title != 'Add'"
style="width: 220px"
/>
</a-space>
</div>
<div class="admin_state_item">
<!-- <div class="admin_state_item" > -->
<span>End Time: <span>*</span></span>
<a-space direction="vertical" style="width: 220px">
<a-date-picker
v-model:value="endTime"
:disabled="title != 'Add'"
style="width: 220px"
/>
</a-space>
</div>
<div class="admin_state_item">
<span>MaxRedemptions:</span>
<input
:class="{ active: title != 'Add' }"
:disabled="title != 'Add'"
v-model="maxRedemptions"
placeholder="Please enter maximum"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>PaidCommission:</span>
<input
v-model="paidCommission"
placeholder="Please enter paidCommission"
type="text"
style="width: 220px"
/>
</div>
<div class="admin_state_item">
<span>Remark:</span>
<input
v-model="remark"
placeholder="Please enter remark"
type="text"
style="width: 220px"
/>
</div>
</div>
<div class="allUserPoeration_btn admin_page">
<div class="admin_search_item" @click="cancelDsign">Close</div>
<div class="admin_search_item" @click="setOk">OK</div>
</div>
</a-modal>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</template>
<script>
import {
defineComponent,
ref,
reactive,
watch,
onMounted,
nextTick,
toRefs,
} from "vue";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { formatTime, isEmail } from "@/tool/util";
import dayjs, { Dayjs } from "dayjs";
import md5 from "md5";
export default defineComponent({
components: {},
emits: ["searchHistoryList"],
setup(props, { emit }) {
let operations = reactive({
operationsModal: false,
operationsEdit: false,
loadingShow: false,
title: "",
});
let operationsData = reactive({
endTime: "",
startTime: "",
percentOff: "",
commissionRate: "",
maxRedemptions: "",
cooperator: "",
paidCommission: "",
remark: "",
id: "",
});
let init = (funStr, data) => {
operations.operationsModal = true;
operations.operationsEdit = true;
operations.title = funStr;
if (funStr == "Add") operations.operationsEdit = false;
if (funStr == "Edit") {
operationsData.id = data.id;
operationsData.percentOff = data.percentOff;
operationsData.commissionRate = data.commissionRate;
operationsData.maxRedemptions = data.maxRedemptions;
operationsData.cooperator = data.cooperator;
operationsData.paidCommission = data.paidCommission;
operationsData.remark = data.remark;
operationsData.endTime = dayjs(
new Date(data.redeemBy * 1000).toLocaleDateString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit'
}).replace(/\//g, '/'),
"YYYY/MM/DD"
);
// 确保格式一致
// operationsData.startTime = dayjs(
// new Date(data.startTime * 1000).toISOString().split("T")[0],
// "YYYY/MM/DD"
// );
operationsData.startTime = dayjs(
new Date(data.startTime * 1000).toLocaleDateString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit'
}).replace(/\//g, '/'),
"YYYY/MM/DD"
);
// operationsData.endTime='2024-08-05T00:00:06'
// operationsData.validEndTime='2024-08-05T00:00:06'
// operationsData.commissionRate = data.commissionRate
// operationsData.maxRedemptions = data.maxRedemptions
// operationsData.validStartTime = formatTime(data.validStartTime)
// operationsData.validEndTime = formatTime(data.validEndTime)
}
};
let setAddData = () => {
const emdTimeMs =
new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
const startTimeMs =
new Date(operationsData.startTime).getTime() / 1000; // 直接获取毫秒时间戳
return {
percentOff: operationsData.percentOff,
maxRedemptions: operationsData.maxRedemptions,
commissionRate: operationsData.commissionRate,
endTime: emdTimeMs,
startTime: startTimeMs,
cooperator: operationsData.cooperator,
remark: operationsData.remark,
};
};
let setEditData = () => {
const timestampMs =
new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
return {
id: operationsData.id,
paidCommission: operationsData.commissionRate,
cooperator: operationsData.cooperator,
remark: operationsData.remark,
};
};
let cancelDsign = () => {
operationsData.endTime = "";
operationsData.startTime = "";
operationsData.percentOff = "";
operationsData.commissionRate = "";
operationsData.maxRedemptions = "";
operationsData.cooperator = "";
operationsData.paidCommission = "";
operationsData.remark = "";
operationsData.id = "";
operations.operationsModal = false;
};
let setOk = () => {
let data;
if (operations.title == "Add") {
data = setAddData();
if (!data.commissionRate || !data.startTime || !data.percentOff || !data.endTime)
return message.warning("Please check the input box marked with *");
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
if (rv) {
cancelDsign();
emit("searchHistoryList");
}
});
} else {
data = setEditData();
Https.axiosGet(Https.httpUrls.updatePromCodeInfo, {
params: data,
}).then((rv) => {
if (rv) {
cancelDsign();
emit("searchHistoryList");
}
});
}
};
return {
...toRefs(operations),
...toRefs(operationsData),
cancelDsign,
init,
focus,
blur,
setOk,
};
},
data() {
return {};
},
mounted() {},
methods: {},
});
</script>
<style lang="less" scoped>
:deep(.allUserPoeration_modal) {
.ant-modal-body {
display: flex;
flex-direction: column;
}
}
}
</style>
<style lang="less" scoped>
.allUserPoeration_modal {
.closeIcon {
z-index: 2;
</style>
<style lang="less" scoped>
.allUserPoeration_modal {
.closeIcon {
z-index: 2;
}
.allUserPoeration_btn {
display: flex;
flex-direction: row;
height: auto;
justify-content: flex-end;
padding: 1rem 0;
.admin_search_item {
margin-bottom: 0;
}
}
.allUserPoeration_center {
flex: 1;
overflow-y: auto;
flex-direction: row;
flex-wrap: wrap;
}
}
.allUserPoeration_btn {
display: flex;
flex-direction: row;
height: auto;
justify-content: flex-end;
padding: 1rem 0;
.admin_search_item {
margin-bottom: 0;
}
}
.allUserPoeration_center {
flex: 1;
overflow-y: auto;
flex-direction: row;
flex-wrap: wrap;
}
}
</style>
</style>

View File

@@ -150,11 +150,11 @@ export default defineComponent({
},
},
{
title: "Country",
title: "Country or Region",
align: "center",
dataIndex: "country",
key: "country",
width:100,
width:200,
},
{
title: "Create Date",

View File

@@ -177,11 +177,11 @@ export default defineComponent({
},
},
{
title: "Country",
title: "Country or Region",
align: "center",
dataIndex: "country",
key: "country",
width:100,
width:200,
},
{
title: "Create Date",

View File

@@ -23,7 +23,7 @@
</a-range-picker>
</div>
<div class="admin_state_item">
<span>Country:</span>
<span>Country or Region:</span>
<a-select
v-model:value="country"
:allowClear="true"

View File

@@ -519,7 +519,7 @@ function showPanel(event) {
}
visible.value = true;
closePanel.value = true
// closePanel.value = true
isEditing.value = true;
// 初始化液化管理器并准备液化环境

View File

@@ -456,6 +456,15 @@ onMounted(async () => {
// 使用window的resize事件代替ResizeObserver
// 只有当窗口大小变化时才更新画布尺寸
// window.addEventListener("resize", handleWindowResize);
if(props.config.initZoom) {
const width = canvasManager.width;
const height = canvasManager.height;
const cwidth = props.config.width;
const cheight = props.config.height;
let zoom = Math.min(1,width/cwidth,height/cheight);
if(zoom < 1) zoom -= 0.05;
setZoom(zoom); // 设置画布缩放
}
});
watchEffect(() => {
@@ -521,6 +530,19 @@ function resetZoom() {
canvasManager.resetZoom();
}
function setZoom(zoom) {
setTimeout(()=>{
if (!canvasManager) return;
const newZoom = Math.max(zoom, 0.1); // 减少10%最小0.1倍
// 使用画布中心作为缩放点
const centerPoint = {
x: canvasManager.canvas.width / 2,
y: canvasManager.canvas.height / 2,
};
canvasManager.animateZoom(centerPoint, newZoom);
})
}
function zoomIn() {
if (!canvasManager) return;
@@ -882,6 +904,7 @@ defineExpose({
layerId = "", // 导出具体图层ID
layerIdArray = [], // 导出多个图层ID数组
expPicType = "png", // 导出图片类型 JPG 或 PNG ,SVG
isEnhanceImg, // 是否是增强图片
} = {}) => {
return canvasManager.exportImage({
isContainBg,
@@ -890,6 +913,7 @@ defineExpose({
layerId,
layerIdArray,
expPicType,
isEnhanceImg,
});
},
/**

View File

@@ -811,6 +811,7 @@ export class CanvasManager {
* @param {Array} options.layerIdArray 导出多个图层ID数组
* @param {String} options.expPicType 导出图片类型 (png/jpg/svg)
* @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} options.isEnhanceImg 是否是增强图片
* @returns {String} 导出的图片数据URL
*/
async exportImage(options = {}) {

View File

@@ -18,10 +18,12 @@ export class ExportManager {
* @param {Object} options 导出选项
* @param {Boolean} options.isContainBg 是否包含背景图层
* @param {Boolean} options.isContainFixed 是否包含固定图层
* @param {Boolean} options.isCropByBg 是否使用背景大小裁剪
* @param {String} options.layerId 导出具体图层ID
* @param {Array} options.layerIdArray 导出多个图层ID数组
* @param {String} options.expPicType 导出图片类型 (png/jpg/svg)
* @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} options.isEnhanceImg 是否是增强图片
* @returns {String} 导出的图片数据URL
*/
exportImage(options = {}) {
@@ -33,6 +35,7 @@ export class ExportManager {
layerIdArray = [],
expPicType = "png",
restoreOpacityInRedGreen = true,
isEnhanceImg, // 是否是增强图片
} = options;
try {
// 检查是否为红绿图模式
@@ -44,7 +47,8 @@ export class ExportManager {
expPicType,
isRedGreenMode,
restoreOpacityInRedGreen,
isCropByBg
isCropByBg,
isEnhanceImg, // 是否是增强图片
);
}
@@ -57,7 +61,8 @@ export class ExportManager {
isContainFixed,
isRedGreenMode,
restoreOpacityInRedGreen,
isCropByBg
isCropByBg,
isEnhanceImg, // 是否是增强图片
);
}
@@ -68,7 +73,8 @@ export class ExportManager {
isContainFixed,
isRedGreenMode,
restoreOpacityInRedGreen,
isCropByBg
isCropByBg,
isEnhanceImg, // 是否是增强图片
);
} catch (error) {
console.error("导出图片失败:", error);
@@ -82,6 +88,8 @@ export class ExportManager {
* @param {String} expPicType 导出类型
* @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL
* @private
*/
@@ -89,7 +97,9 @@ export class ExportManager {
layerId,
expPicType,
isRedGreenMode,
restoreOpacityInRedGreen
restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) {
if (!this.layerManager) {
throw new Error("图层管理器未初始化");
@@ -117,7 +127,9 @@ export class ExportManager {
return this._exportWithRedGreenMode(
objectsToExport,
expPicType,
restoreOpacityInRedGreen
restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
);
}
@@ -137,6 +149,8 @@ export class ExportManager {
* @param {Boolean} isContainFixed 是否包含固定图层
* @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL
* @private
*/
@@ -147,7 +161,8 @@ export class ExportManager {
isContainFixed,
isRedGreenMode,
restoreOpacityInRedGreen,
isCropByBg
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) {
if (!this.layerManager) {
throw new Error("图层管理器未初始化");
@@ -178,7 +193,9 @@ export class ExportManager {
return await this._exportWithCanvasSize(
objectsToExport,
expPicType,
restoreOpacityInRedGreen
restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
);
}
@@ -189,6 +206,8 @@ export class ExportManager {
* @param {Boolean} isContainFixed 是否包含固定图层
* @param {Boolean} isRedGreenMode 是否为红绿图模式
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL
* @private
*/
@@ -198,7 +217,8 @@ export class ExportManager {
isContainFixed,
isRedGreenMode,
restoreOpacityInRedGreen,
isCropByBg
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) {
// 按图层顺序收集对象(从底到顶)
const objectsToExport = this._collectObjectsByLayerOrder(
@@ -251,7 +271,9 @@ export class ExportManager {
objectsToExport,
expPicType,
restoreOpacityInRedGreen,
canvasClipPath
canvasClipPath,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
);
}
@@ -603,6 +625,9 @@ export class ExportManager {
* @param {Array} objectsToExport 要导出的对象数组
* @param {String} expPicType 导出类型
* @param {Boolean} restoreOpacityInRedGreen 是否恢复透明度为1
* @param {Object} maskObject 裁剪对象
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
* @param {Boolean} isEnhanceImg 是否是增强图片
* @returns {String} 图片数据URL
* @private
*/
@@ -610,7 +635,9 @@ export class ExportManager {
objectsToExport,
expPicType,
restoreOpacityInRedGreen,
maskObject
maskObject, // 裁剪对象
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
) {
// 使用当前画布尺寸
// const canvasWidth =
@@ -629,6 +656,8 @@ export class ExportManager {
trimWhitespace: true, // 裁剪空白
trimPadding: 0, // 裁剪边距
restoreOpacityInRedGreen,
isCropByBg, // 是否使用背景大小裁剪
isEnhanceImg, // 是否是增强图片
});
console.log("导出图片数据URL:", dataURL);

View File

@@ -21,6 +21,7 @@ export const createRasterizedImage = async ({
preserveOriginalQuality = true, // 是否保持原始质量(新增)
selectionManager = null, // 选区管理器,用于获取羽化值等设置
restoreOpacityInRedGreen, // 是否在红绿图模式下恢复透明度
isEnhanceImg, // 是否是增强图片
} = {}) => {
try {
console.log(`📊 开始栅格化 ${fabricObjects.length} 个对象`);
@@ -41,6 +42,7 @@ export const createRasterizedImage = async ({
clippingObject,
isReturenDataURL,
selectionManager, // 传递选区管理器
isEnhanceImg, // 是否是增强图片
});
}
@@ -81,6 +83,7 @@ const createClippedObjects = async ({
clippingObject,
isReturenDataURL,
selectionManager = null, // 新增选区管理器参数
isEnhanceImg, // 是否是增强图片
}) => {
try {
console.log("🎯 使用新的图像遮罩裁剪方法创建对象");
@@ -110,6 +113,7 @@ const createClippedObjects = async ({
clippingObject,
selectionBounds: optimizedBounds, // 使用优化后的边界框
featherAmount,
isEnhanceImg, // 是否是增强图片
});
}
@@ -120,6 +124,7 @@ const createClippedObjects = async ({
clippingObject,
selectionBounds: optimizedBounds, // 使用优化后的边界框
featherAmount,
isEnhanceImg, // 是否是增强图片
});
// 将DataURL转换为fabric.Image对象
@@ -173,6 +178,7 @@ const createClippedDataURLByCanvas = async ({
clippingObject,
selectionBounds,
featherAmount = 0,
isEnhanceImg = false, // 是否是增强图片
}) => {
try {
console.log("🖼️ 使用图像遮罩裁剪方法生成DataURL");
@@ -185,7 +191,9 @@ const createClippedDataURLByCanvas = async ({
// 使用高分辨率以保证质量
const pixelRatio = window.devicePixelRatio || 1;
const qualityMultiplier = Math.max(2, pixelRatio);
const qualityMultiplier = !!isEnhanceImg ? Math.max(2, pixelRatio) : 1;
console.log("使用高分辨率以保证质量:" + isEnhanceImg, optimizedBounds);
const canvasWidth = Math.ceil(optimizedBounds.width * qualityMultiplier);
const canvasHeight = Math.ceil(optimizedBounds.height * qualityMultiplier);
@@ -455,6 +463,8 @@ const createLegacyRasterization = async ({
quality,
format,
isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
}) => {
console.log("⚠️ 使用兼容的离屏渲染方法");
@@ -481,6 +491,8 @@ const createLegacyRasterization = async ({
format,
currentZoom,
isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
});
};
@@ -571,6 +583,8 @@ const createOffscreenRasterization = async ({
format,
currentZoom,
isReturenDataURL,
isCropByBg, // 是否根据背景裁剪
isEnhanceImg, // 是否是增强图片
}) => {
try {
// 创建离屏画布,使用绝对尺寸以保证高质量

View File

@@ -349,18 +349,18 @@ const handleImageError = (event) => {
/* 图片网格 */
.image-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
gap: 16px;
min-height: 200px;
max-height: 500px;
min-height: 20rem;
max-height: 50rem;
@media screen and (max-width: 768px) {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
gap: 12px;
}
@media screen and (max-width: 480px) {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
@media screen and (max-width: 48rem) {
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
gap: 10px;
}
}
@@ -387,7 +387,7 @@ const handleImageError = (event) => {
.image-wrapper {
position: relative;
width: 100%;
height: 220px;
height: 22rem;
overflow: hidden;
img {

View File

@@ -62,6 +62,7 @@
@addSketch="()=>isEditPattern.value=false"
@revocation="revocation"
@oppositeRevocation="oppositeRevocation"
@modelOnLoad="modelOnLoad"
></model>
<div class="btn">
<div class="gallery_btn" style="margin-right: 0;" @click="submit">{{$t('DesignPrintOperation.Submit')}}</div>
@@ -154,6 +155,7 @@ export default defineComponent({
fun:null,
},
positionKey:0,
isUndividedLayerWithSinglePrint:false,
})
provide('getCanvasIfEdit',detailData.getCanvasIfEdit)
@@ -167,60 +169,73 @@ export default defineComponent({
}
const showDesignDetailModal = (data:any,str:any)=>{
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}`
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
detailData.loadingShow = true
Https.axiosGet(url).then(
async (rv: any) => {
store.commit('DesignDetail/setDesignDetail',rv)
rv.clothes.forEach((item:any)=>{
let a
item.designType='Library'
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
if(item.color){
item.color.rgba = {
r:item.color.r,
g:item.color.g,
b:item.color.b,
return new Promise<void>((resolve, reject) => {
store.commit('DesignDetail/clearDetailData')
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}`
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
detailData.loadingShow = true
Https.axiosGet(url).then(
async (rv: any) => {
store.commit('DesignDetail/setDesignDetail',rv)
rv.clothes.forEach((item:any)=>{
let a
item.designType='Library'
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
}else{
item.color = {
// rgba:{
// r:undefined,
// g:undefined,
// b:undefined,
// }
if(item.color){
item.color.rgba = {
r:item.color.r,
g:item.color.g,
b:item.color.b,
}
}else{
item.color = {
// rgba:{
// r:undefined,
// g:undefined,
// b:undefined,
// }
}
}
}
if(item.gradient){
item.color.gradient = item.gradient
}
if(item.printObject.prints == null)item.printObject.prints = []
item.printObject.prints.forEach((element:any) => {
if(!element.designType){
element.designType = 'Library'
if(item.gradient){
item.color.gradient = item.gradient
}
});
})
detailData.singleOveral.value = rv.singleOverall
detailData.designDetailShow = true
// this.deleteShow = false
initialize()
setRevocation()
detailData.loadingShow = false
if(rv.singleOverall == "single"){
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
}
if(item.printObject.prints == null)item.printObject.prints = []
item.printObject.prints.forEach((element:any) => {
if(!element.designType){
element.designType = 'Library'
}
});
if(!item.layersObject[0].undividedLayerWithSinglePrint){
detailData.isUndividedLayerWithSinglePrint = true
}
})
detailData.singleOveral.value = rv.singleOverall
detailData.designDetailShow = true
// this.deleteShow = false
initialize()
setRevocation()
if(rv.singleOverall == "single"){
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
modelOnLoad()
}
}
).catch(rv=>{
detailData.loadingShow = false
})
if(detailData.isUndividedLayerWithSinglePrint){
}else{
detailData.loadingShow = false
}
resolve(rv)
}
).catch(rv=>{
detailData.loadingShow = false
resolve(rv)
})
})
}
const initialize = ()=>{//design后初始化
@@ -282,9 +297,10 @@ export default defineComponent({
}
const setClothes = async (list:any)=>{
let clothesList:any = []
await nextTick()
for(let i = 0;i<list.length;i++){
detailData.selectDetail
let {scale,offset,priority,maskUrl,maskMinioUrl} = (detailDom.model as any).getSubmitData(list[i])
let {scale,offset,priority,maskUrl,maskMinioUrl} = await (detailDom.model as any).getSubmitData(list[i],detailData.isUndividedLayerWithSinglePrint)
if(detailDom.canvasBox?.privewDetail)await (detailDom.canvasBox as any).privewDetail()
if(detailDom.detailRight?.privewDetail)await (detailDom.detailRight as any).privewDetail()
let gradient = null
@@ -298,18 +314,24 @@ export default defineComponent({
// 0.35822305
// ]
let isCurrent = list[i].id == detailData?.selectDetail?.id
let color = (detailData.currentDetailType == 'color' && isCurrent && newData?.rgba?.r)?(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):(list[i].color?.rgba?.r?`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:'')
let color = (detailData.currentDetailType == 'color' && isCurrent && !detailData.isEditPattern.value)?
(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):
(list[i].color?.rgba?.r?
`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:
'')
if(detailData.currentDetailType == 'sketch' && newData){
color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
color = detailData.designDetail.clothes?.[0]?.color?.rgba?.r?`${detailData.designDetail.clothes?.[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
detailData.selectDetail.maskUrl = ''
detailData.selectDetail.maskMinioUrl = ''
}
let data:any = {
changed:false,
color,
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.designType:list[i].designType,
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.id:list[i].id,
maskMinioUrl:list[i]?.maskMinioUrl,
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.designType:list[i].designType,
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.id:list[i].id,
maskMinioUrl:((newData && detailData.currentDetailType == 'sketch') || list[i].sketchString)?'':list[i]?.maskMinioUrl,
// maskUrl:'',
maskUrl:list[i].maskUrl,
maskUrl:((newData && detailData.currentDetailType == 'sketch') || list[i].sketchString)?'':list[i]?.maskUrl,
// offset:[
// -233.13985,
// 406.90964
@@ -317,19 +339,19 @@ export default defineComponent({
offset,
partialDesign:list[i].partialDesign || {},
// partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{},
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.minIOPath:list[i].minIOPath,
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.minIOPath:list[i].minIOPath,
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
priority,
// scale:[
// 0.5,
// 0.35822305
// ],
scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1],
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.level2Type || newData.categoryValue:list[i].type,
type:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.level2Type || newData.categoryValue:list[i].type,
sketchString:list[i].sketchString?list[i].sketchString:'',
trims:(newData && detailData.currentDetailType == 'element' && isCurrent)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]},
trims:(newData && detailData.currentDetailType == 'element' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].trims?.prints?list[i].trims:{prints:[]},
}
if((list[i].color?.gradient || list[i].newDetail?.color?.gradient)){
if((detailData.isEditPattern.value && list[i].color?.gradient) || (!detailData.isEditPattern.value && (list[i].newDetail?.color?.gradient || list[i].color?.gradient))){
gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient
gradient.colorImg = await setGradual(gradient,320,700)
data.gradient = gradient
@@ -341,9 +363,9 @@ export default defineComponent({
const getSubmitData = async (str:string)=>{
// return
let workspace = store.state.Workspace.probjects
if(!detailData.selectDetail.path && !detailData.selectDetail.newDetail?.sketch?.minIOPath)return
if(!detailData?.selectDetail?.path && !detailData?.selectDetail?.newDetail?.sketch?.minIOPath)return
let clothes:any
if(detailData.currentDetailType == 'models'){
if(detailData.currentDetailType == 'models' || detailData.isUndividedLayerWithSinglePrint){
clothes = await setClothes(detailData.designDetail.clothes)
}else{
clothes = await setClothes([detailData.selectDetail])
@@ -372,6 +394,8 @@ export default defineComponent({
delete detailData.designDetail.newModel
store.commit('DesignDetail/setPraeview',value)
detailData.loadingShow = false
detailData.isUndividedLayerWithSinglePrint = false
canvasReload()
// setRevocation()
}).catch(res=>{
detailData.loadingShow = false
@@ -385,7 +409,7 @@ export default defineComponent({
designSingleItemDTOList:clothes,
isPreview:false,
// ifSubmit:designItemDetail.isPreview,
gender:workspace?.sex == 'Male'?1:0,
gender:workspace?.sex,
sketchString:'',
modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'',
modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'',
@@ -420,6 +444,12 @@ export default defineComponent({
let data = getSubmitData('preview')
store.dispatch('DesignDetail/setSubmit',data)
}
const modelOnLoad = ()=>{
if(!detailData.isUndividedLayerWithSinglePrint)return
setTimeout(()=>{
previwe()
})
}
const detailEdit = async (str:any)=>{
if(str == 'edit'){
if(detailData.isEditPattern.value){
@@ -464,6 +494,7 @@ export default defineComponent({
oppositeRevocation,
detailEdit,
canvasReload,
modelOnLoad,
}
},

View File

@@ -9,7 +9,7 @@
<editCanvas v-if="canvasLoad" :config="canvasConfig"
@canvasInit="canvasInit"
@changeCanvas="changeCanvas"
:clothingImageUrl="selectDetail.undividedLayer || selectDetail.path"
:clothingImageUrl="selectDetail?.undividedLayerWithSinglePrint || selectDetail.undividedLayer || selectDetail.path"
showFixedLayer
:canvasJSON="canvasJSON"
:clothing-image-opts="{
@@ -35,7 +35,7 @@
</editFrontBack> -->
<editCanvas v-if="canvasLoad" :config="canvasConfig"
:enabledRedGreenMode="true"
:clothingImageUrl="selectDetail.undividedLayer || selectDetail.path"
:clothingImageUrl="selectDetail.path"
:redGreenImageUrl="frontBack.front[imgDomIndex].maskUrl"
@trigger-red-green-mouseup="frontBackChange"
:clothing-image-opts="{
@@ -141,7 +141,7 @@ export default defineComponent({
}else{
if(detailData.currentView === 'redGreenExample'){
nextTick(()=>{
setCanvas(detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
setCanvas(detailData.selectDetail?.undividedLayerWithSinglePrint || detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
detailData.canvasLoad = true
})
})
@@ -185,7 +185,7 @@ export default defineComponent({
})
}
const frontBackChange = (value:any)=>{
let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.frontBack.front[detailData.imgDomIndex].imageUrl
let full = detailData.frontBack.front[detailData.imgDomIndex]?.undividedLayerWithSinglePrint || detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.selectDetail.path
let size = {
...detailData.canvasConfig,
}
@@ -193,7 +193,7 @@ export default defineComponent({
let front = detailData.frontBack.front[detailData.imgDomIndex]
let back = detailData.frontBack.back[detailData.imgDomIndex]
if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl
if(!front?.oldMaskUrl)front.oldMaskUrl = front.imageUrl
if(!front?.oldMaskUrl)front.oldMaskUrl = front.maskUrl
if(!back?.oldImageUrl)back.oldImageUrl = back.imageUrl
if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
@@ -218,7 +218,6 @@ export default defineComponent({
detailData.isShowMark = true
}
const index = detailData.designDetail.clothes.findIndex(item => item.id === detailData.selectDetail.id);
console.log(index,detailData.selectDetail.id)
await new Promise<void>((resolve, reject) => {
if(!detailDom?.editCanvas)return resolve()
let canvasJSON = detailDom?.editCanvas?.getJSON()
@@ -261,7 +260,7 @@ export default defineComponent({
if(front?.oldImageUrl)front.imageUrl = front.oldImageUrl
if(front?.oldMaskUrl)front.maskUrl = front.oldMaskUrl
if(back?.oldImageUrl)back.imageUrl = back.oldImageUrl
if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.maskUrl})
sessionStorage.removeItem('frontBackEdit');
sessionStorage.removeItem('sketchEdit');
@@ -290,7 +289,7 @@ export default defineComponent({
});
})
}
setCanvas(detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
setCanvas(detailData.selectDetail?.undividedLayerWithSinglePrint || detailData.selectDetail.undividedLayer || detailData.selectDetail.path).then(()=>{
detailData.canvasLoad = true
})
})

View File

@@ -56,11 +56,13 @@ export default defineComponent({
})
const selectImgItem = (file:any)=>{
if(props.type != 'models'){
if(!file.resData.minIOPath){
file.minIOPath = getMinioUrl(file.imgUrl || file.resData.url)
if(!file.resData?.minIOPath){
file.minIOPath = getMinioUrl(file?.imgUrl || file?.resData?.url)
}else{
file.minIOPath = file.resData.minIOPath
}
if(!file.designType){
file.designType = file.resData.designType
file.designType = file?.resData?.designType
}
}
// store.commit('DesignDetail/setNewDetail',file.resData)

View File

@@ -129,6 +129,7 @@ export default defineComponent({
file.designType = res.data.designType
file.level2Type = type;
file.resData.level2Type = type;
file.minIOPath = file.resData.minIOPath
let fileList = detailData.uploadList.filter(
(v:any) => v.status === "done"

View File

@@ -76,10 +76,10 @@ export default defineComponent({
selectImgItem(data)
return
}
data.id = id
if(data?.imgUrl)data.url = data.imgUrl
let value = {
data,
id,
}
if(detailData.currentDetailType == 'sketch'){
detailData.selectDetail.sketchString = ''

View File

@@ -70,7 +70,7 @@
</div>
</div>
<!-- <img :src="selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg"> -->
<img :src="selectDetail?.undividedLayer?selectDetail.undividedLayer:selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg">
<img :src="selectDetail?.undividedLayer?selectDetail.undividedLayer:selectDetail.path" alt="" class="designOpenrtion_sketch" ref="sketchImg" @load="()=>isSketchLoad = true">
<div class="designOpenrtion_btn">
<ul v-if="overallSingle" v-for="item,index in printStyleList[type][stateOverallSingle]" :key="item" :class="{active:item?.pattern.designOpenrtionBtn?item?.pattern.designOpenrtionBtn:false}" class="designOpenrtion_Mousingle" :style="item?.pattern.style" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))">
<li class="designOpenrtion_btn_top" @mousedown.stop="itemSizeMousedown('top',getMousePosition($event,false))" @touchstart.passive="itemSizeMousedown('top',getMousePosition($event,true))"></li>
@@ -148,6 +148,7 @@ export default defineComponent({
},
loadingShow:false,
printElementList:null as any,
isSketchLoad:false,
})
const collItemSize = reactive({
collValue:18,
@@ -208,6 +209,7 @@ export default defineComponent({
})
}
const addPrintELement = async (data:any)=>{
if(!editPrintElementData.isSketchLoad)return
let {scale,location} = await setScaleLocation(data)
let item = {
angle:0,
@@ -379,6 +381,7 @@ export default defineComponent({
})
watch(()=>((editPrintElementData.selectDetail?.undividedLayer || editPrintElementData.selectDetail?.id)),(newVal)=>{
if(!newVal)return
editPrintElementData.isSketchLoad = false,
editPrintElementData.printStyleList[props.type] = {
single:[],
overall:[],
@@ -914,7 +917,7 @@ export default defineComponent({
> img{
width: 100%;
height: 100%;
object-fit: cover;
object-fit: contain;
}
> i{
position: absolute;

View File

@@ -23,7 +23,7 @@
<i class="fi fi-rr-copy" :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart="mousedownDesignImg" @touchend="mousedownDesignImg"></i>
</div>
<position ref="position" @canvasReload="()=>$emit('canvasReload')" :imgDesignImg=imgDesignImg></position>
<position ref="position" @modelOnLoad="()=>$emit('modelOnLoad')" @canvasReload="()=>$emit('canvasReload')" @addSketch="()=>$emit('addSketch')" :imgDesignImg=imgDesignImg></position>
</div>
</div>
@@ -42,7 +42,7 @@ export default defineComponent({
components:{
position,modelNav
},
emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation'],
emits:['detailEdit','canvasReload','addSketch','revocation','oppositeRevocation','modelOnLoad'],
setup(props,{emit}) {
const {t} = useI18n()
const store = useStore();
@@ -60,8 +60,8 @@ export default defineComponent({
libraryList:null as any,
position:null as any,
})
const getSubmitData = (value:any)=>{
return getDetailListDom.position.getSubmitData(value)
const getSubmitData = (value:any,boolean)=>{
return getDetailListDom.position.getSubmitData(value,boolean)
}
const showDesignImgDetail = (str:any)=>{
new Promise((resolve, reject) => {

View File

@@ -74,29 +74,31 @@ export default defineComponent({
},{immediate:true})
const selectDetailItem = (item:any,index:number)=>{
new Promise((resolve, reject) => {
// if(detailData.isEditPattern.value &&
// detailData.selectDetail?.id &&
// detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0
// ){
// Modal.confirm({
// title: t('collectionModal.jsContent2'),
// icon: createVNode(ExclamationCircleOutlined),
// okText: 'Yes',
// cancelText: 'No',
// mask:false,
// centered:true,
// onOk() {
// resolve(true)
// emit('canvasReload')
// },
// onCancel(){
// resolve(false)
// }
// });
// }else{
if(detailData.isEditPattern.value &&
detailData.selectDetail?.id &&
detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0
){
Modal.confirm({
title: t('collectionModal.jsContent6'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
resolve(true)
emit('canvasReload')
},
onCancel(){
resolve(false)
}
});
}else{
resolve(true)
emit('canvasReload')
// }
if(detailData.selectDetail.id !== item.id){
emit('canvasReload')
}
}
}).then((rv)=>{
if(rv)store.commit('DesignDetail/setDesignColthes',item.id)
})

View File

@@ -4,7 +4,7 @@
<div class="designOpenrtion_print" v-for="item,index in frontBack.back" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="frontBack.front[index].style">
<img :style="item.imageUrl?'':'display:none;'" :src="item.imageUrl" alt="">
</div>
<img class="perview_img" @load="setPrintSize()" ref="detailBody" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'">
<img class="perview_img" @load="setPrintSize()" ref="detailBody" :key="designDetail.designItemId" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'">
<div class="detail_modal_item_front" v-for="item,index in frontBack.front" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="item.style">
<img :src="item.imageUrl" alt="">
</div>
@@ -18,7 +18,7 @@
</div>
</div>
<div class="designOpenrtion_imgMask" v-if="!frontBack?.body?.path">
<img :src="designDetail?.undividedLayer || selectDetail?.path" style="object-fit: cover;" alt="">
<img :src="selectDetail?.undividedLayerWithSinglePrint || selectDetail?.undividedLayer || selectDetail?.path" style="object-fit: cover;" alt="">
<!-- <img @load="setSelectSketch()" :src="designDetail?.currentFullBodyView || selectDetail?.undividedLayer" style="object-fit: cover;" alt=""> -->
</div>
</div>
@@ -49,7 +49,7 @@ export default defineComponent({
type:Boolean,
}
},
emits:['canvasReload'],
emits:['canvasReload','addSketch','modelOnLoad'],
setup(props,{emit}) {
const {t} = useI18n()
const store = useStore();
@@ -82,6 +82,11 @@ export default defineComponent({
let dom = document.querySelector('.molepositon .perview_img') as any
if(!detailData.frontBack?.body?.path || !dom)return
img.onload = () => {
if(detailData.designDetail.clothes.length == 0){
store.commit('DesignDetail/addDesignColthes')
emit('addSketch')
return
}
if(!detailData.selectDetail?.id){
store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id)
}
@@ -111,6 +116,9 @@ export default defineComponent({
// detailData.frontBack.back[index].style[key] = value*sacle+'px'
}
});
setTimeout(() => {
emit('modelOnLoad')
},500);
};
img.src = detailData.frontBack?.body?.path;
})
@@ -236,38 +244,41 @@ export default defineComponent({
// }
}
const itemMoveMousedown = async (index:any,e:any)=>{
if(detailData.selectDetail.id != detailData.frontBack.front[index].id)return
let isOpen = false
let isModal = false
await new Promise((resolve, reject) => {
if(
detailData.isEditPattern.value &&
selectItem.selectDetail?.id &&
(detailData.frontBack.front[index].id != selectItem.selectDetail.id)
){
isModal = true
Modal.confirm({
title: t('collectionModal.jsContent2'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
resolve(true)
isOpen = true
},
onCancel(){
resolve(false)
isOpen = false
}
});
}else{
if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
isOpen = true
}
resolve(true)
isModal = false
}
// if(
// detailData.isEditPattern.value &&
// selectItem.selectDetail?.id &&
// (detailData.frontBack.front[index].id != selectItem.selectDetail.id)
// ){
// isModal = true
// Modal.confirm({
// title: t('collectionModal.jsContent2'),
// icon: createVNode(ExclamationCircleOutlined),
// okText: 'Yes',
// cancelText: 'No',
// mask:false,
// centered:true,
// onOk() {
// resolve(true)
// isOpen = true
// },
// onCancel(){
// resolve(false)
// isOpen = false
// }
// });
// }else{
// if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
// isOpen = true
// }
// resolve(true)
// isModal = false
// }
resolve(true)
isOpen = true
}).then((rv)=>{
})
if(isOpen){
@@ -305,9 +316,9 @@ export default defineComponent({
});
return arr
}
const getSubmitData = (value:any)=>{
const getSubmitData = (value:any,isNoComputed)=>{
let parentNode = document.getElementsByClassName('molepositon')[0].getElementsByClassName("designOpenrtion_imgMask")[0].getBoundingClientRect()
if(!detailData.frontBack?.body?.layersObject?.[0]?.imageSize){
if(!detailData.frontBack?.body?.layersObject?.[0]?.imageSize || isNoComputed){
return{
scale:value.layersObject[0].scale,
offset:value.layersObject[0].offset,
@@ -315,7 +326,6 @@ export default defineComponent({
}
}
let ratio = detailData.frontBack.body.layersObject[0].imageSize[0]/parentNode.width
// let arr:any = sort(detailData.frontBack.front)
let arr:any = sort(JSON.parse(JSON.stringify(detailData.frontBack.front)))
let num = 10
@@ -481,7 +491,7 @@ export default defineComponent({
align-items: center;
justify-content: center;
img{
height: auto;
// height: auto;
}
}
}

View File

@@ -338,7 +338,7 @@ export default defineComponent({
speed.speedData.value = ''
speed.speedData.label = ''
}else{
if(newVal.value == "Pattern"){
if(newVal.value == "Pattern" || props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1]
}else{
speed.speedData = speed.speedList[0]
@@ -350,6 +350,9 @@ export default defineComponent({
}
onMounted(() => {
instance.appContext.config.globalProperties.$dropdownEvents.onClose(removeOpenSpeed)
if(props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1]
}
})
onUnmounted(() => {
@@ -742,7 +745,7 @@ export default defineComponent({
data = data.filter((item:any) => item !== element.taskId);
console.log(data)
this.fileList = this.fileList.filter((item:any) => item.taskId !== element.taskId);
message.info(this.t('Generate.everyTimeEffectPoor'));
// message.info(this.t('Generate.everyTimeEffectPoor'));
}
});
if((data.length == 0)){
@@ -1008,6 +1011,7 @@ export default defineComponent({
this.searchPictureName = "";
},
onPaste(e:any){
if(this.sketchboardList.length != 0)return
if(e.clipboardData.files[0] && !this.isTextarea && this.upload.level1Type !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData();
param.append('inPin','0')

View File

@@ -365,6 +365,7 @@ export default defineComponent({
title:this.selectSex,
surname:this.surname,
givenName:this.givenName,
userId:this.userDetail?.userId,
};
if(this.loginTime){
this.loginTime = false

View File

@@ -71,7 +71,7 @@ import { message, Upload, Modal } from "ant-design-vue";
},
isFontType:{
type:Boolean,
default:true,
default:false,
},
selectSize:{
type:String,

View File

@@ -608,30 +608,31 @@ export default defineComponent({
setImageIndex(index:any){
if(this.isNext)return
let this_ = this
if(this.imgType == 'Printboard' || this.imgType == 'Sketchboard'){
this.isNext = true
new Promise((resolve,reject)=>{
Modal.confirm({
title: this.t('scaleImage.submitCanvas'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
this_.scaleImageIndex = index
this_.isNext = false
resolve('')
},
onCancel(){
this_.isNext = false
resolve('')
}
});
})
}else{
this.scaleImageIndex = index
}
// if(this.imgType == 'Printboard' || this.imgType == 'Sketchboard'){
// this.isNext = true
// new Promise((resolve,reject)=>{
// Modal.confirm({
// title: this.t('scaleImage.submitCanvas'),
// icon: createVNode(ExclamationCircleOutlined),
// okText: 'Yes',
// cancelText: 'No',
// mask:false,
// centered:true,
// onOk() {
// this_.scaleImageIndex = index
// this_.isNext = false
// resolve('')
// },
// onCancel(){
// this_.isNext = false
// resolve('')
// }
// });
// })
// }else{
// this.scaleImageIndex = index
// }
this.scaleImageIndex = index
},
LikeFile(item:any,str:string){
let parent:any = this.$parent

View File

@@ -4,9 +4,9 @@
<div class="general_video_btn" @click="clearVideo">
<i class="fi fi-rr-cross-small"></i>
</div>
<video ref="video" controls>
<source :src="url" type="video/webm">
Your browser does not support the video tag or the file format of this video.
<video ref="video" controls :src="url">
<!-- <source :src="url" type="video/webm">
Your browser does not support the video tag or the file format of this video. -->
</video>
</div>
</div>

View File

@@ -1,9 +1,10 @@
<template>
<div class="Container">
<!-- 谷歌登录 -->
<!-- <div class="g_id_signin" id="g_id_signin">
</div> -->
<div class="icon" @click="toGmailLogin" style="opacity: .7;">
<div class="g_id_signin" id="g_id_signin">
</div>
<!-- <div class="icon" @click="toGmailLogin"> -->
<div class="icon">
<img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
<span>{{ $props.text }}</span>
</div>
@@ -25,8 +26,33 @@
},
setup(props, { emit }) {
const {t} = useI18n()
function decodeJWT(token) {
let base64Url = token.split(".")[1];
let base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
let jsonPayload = decodeURIComponent(
atob(base64)
.split("")
.map(function (c) {
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
})
.join("")
);
return JSON.parse(jsonPayload);
}
const handleCredentialResponse = async (response) => {
// 获取回调响应的凭证数据 然后拿这个凭证给后台后台jwt进行解析获取登录信息
console.log("Encoded JWT ID token: " + response.credential);
const responsePayload = decodeJWT(response.credential);
console.log("Decoded JWT ID token fields:");
console.log(" Full Name: " + responsePayload.name);
console.log(" Given Name: " + responsePayload.given_name);
console.log(" Family Name: " + responsePayload.family_name);
console.log(" Unique ID: " + responsePayload.sub);
console.log(" Profile image URL: " + responsePayload.picture);
console.log(" Email: " + responsePayload.email);
let code = response.credential
emit('googelLogin',code)
window.isAddGmail = false
@@ -36,10 +62,10 @@
scriptSrc:'https://accounts.google.com/gsi/client',
script:null
})
console.log()
console.log(import.meta.env.VITE_USER_NODE_ENV)
let GOOGLE_CLIENT_ID
if(import.meta.env.VITE_USER_NODE_ENV == 'development'){
GOOGLE_CLIENT_ID = '29310152396-c44dcsoksjirhn7vbo29p8u8n0sg4qps.apps.googleusercontent.com'
GOOGLE_CLIENT_ID = '157095842121-kdd1fdf8m8nudvj9sprstb2k2prnf9e4.apps.googleusercontent.com'
}else{
GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
}
@@ -51,11 +77,11 @@
window.isAddGmail = true
await new Promise((resolve, reject) => {
const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{
resolve()
}
document.body.appendChild(script);
script.src = data.scriptSrc
})
}
window.google.accounts.id.initialize({
@@ -67,19 +93,19 @@
ux_mode:"popup",
itp_support:true,
});
console.log(document.querySelector('.Container #g_id_signin'))
window.google.accounts.id.renderButton(
document.querySelector('.Container #g_id_signin'),
{
type:"standard",//icon为只有一个icon
shape:"circle",
theme:"outline",
size:"large",
logo_alignment:"center",
});
document.querySelector('.Container #g_id_signin'),
{
type:"standard",//icon为只有一个icon
shape:"circle",
theme:"outline",
size:"large",
logo_alignment:"center",
});
}
}
const toGmailLogin = ()=>{
console.log(12312)
message.info(t('account.canNotUtilize'))
}
onBeforeUnmount(()=>{
@@ -90,7 +116,7 @@
}
})
onMounted(()=>{
// createGmailLogin()
createGmailLogin()
})
return {
toGmailLogin,
@@ -121,7 +147,6 @@
// width: 100%;
// height: 100%;
// }
// }
.icon{
// width: 40px;
@@ -135,7 +160,7 @@
box-sizing: border-box;
position: relative;
background: transparent;
// pointer-events: none;
pointer-events: none;
background-color: #f5f5f5;
@media (max-width: 768px) {
border-radius: 2.5rem;
@@ -165,15 +190,20 @@
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
// overflow: hidden;
top: 0;
left: 0;
opacity: 0;
// opacity: 0;
.S9gUrf-YoZ4jf{
}
:deep(.S9gUrf-YoZ4jf){
width: 100%;
height: 100%;
iframe{
zoom: 3;
}
}
}
&:hover{

View File

@@ -105,7 +105,7 @@
<span>
I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
<a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees.
</span>
</label>

View File

@@ -68,6 +68,7 @@
<div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div>
<div class="codeEmailInput">
<VerificationCodeInput
ref="verificationCodeInputDom"
:ct="emailCode"
@sendCaptcha="submitEmailLogin($event)"
></VerificationCodeInput>
@@ -88,7 +89,7 @@
<span>
I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
<a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees.
</span>
</label>
@@ -97,7 +98,9 @@
<div
class="login_submit_button"
:state="emailStap"
:class="{'active':animation}"
@click="submitPerLogin()"
@mousedown="loginBtnMousedown"
>
Sign in
</div>
@@ -302,6 +305,8 @@ export default defineComponent({
passwordType: "password",
userId: "",
loginTime: true,
animation: false,
inputCodeTime: null as any,
};
},
onBeforeUnmount() {
@@ -413,6 +418,16 @@ export default defineComponent({
submitPerLogin() {
//输入账号密码
if (this.emailStap >= 2) {
let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom
let code = verificationCodeInputDom.getCtData.map(item => item).join('');
console.log(code)
if(code.length !== this.emailCode.length){
message.info("Please enter the complete verification code.");
}else{
this.submitEmailLogin(code)
}
//提交验证码
return;
} else {
if (!this.password) {
@@ -480,20 +495,23 @@ export default defineComponent({
//邮箱登录提交
submitEmailLogin(emailVerifyCode: any) {
let data = {
email: this.email,
emailVerifyCode: emailVerifyCode,
loginType: "EMAIL",
userId: this.userId,
};
this.$emit('update:isMask',true)
Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => {
this.setSuccessLogin(rv);
})
.catch((res) => {
this.$emit('update:isMask',false)
});
clearTimeout(this.inputCodeTime)
this.inputCodeTime = setTimeout(()=>{
let data = {
email: this.email,
emailVerifyCode: emailVerifyCode,
loginType: "EMAIL",
userId: this.userId,
};
this.$emit('update:isMask',true)
Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => {
this.setSuccessLogin(rv);
})
.catch((res) => {
this.$emit('update:isMask',false)
});
},1000)
},
isCheckAgreement() {
message.info("Agree to all terms, privacy fees and policies");
@@ -602,7 +620,15 @@ export default defineComponent({
// }
// );
// },
},
loginBtnMousedown(){
this.animation = true
let mouseup = ()=>{
this.animation = false
document.removeEventListener('mouseup',mouseup)
}
document.addEventListener('mouseup',mouseup)
},
},
mounted() {
},
});
@@ -763,13 +789,12 @@ export default defineComponent({
transition: all 0.3s;
margin-top: 5rem;
font-weight: 600;
&.active{
transform: scale(.9);
}
&:hover {
background: #3c3c3c;
}
&[state="2"] {
cursor: not-allowed;
}
}
.NewAccount{
font-size: 1.6rem;
@@ -778,6 +803,8 @@ export default defineComponent({
margin-top: 1.2rem;
text-align: left;
cursor: pointer;
width: min-content;
white-space: nowrap;
}
.segmentation{
margin-top: 4rem;

View File

@@ -90,6 +90,7 @@
<div class="codeEmail">Weve sent an code to your email <span>{{ email }}</span></div>
<div class="codeEmailInput">
<VerificationCodeInput
ref="verificationCodeInputDom"
:ct="emailCode"
@sendCaptcha="submitEmailLogin($event)"
></VerificationCodeInput>
@@ -105,7 +106,7 @@
<span>
I agree to the
<a href="https://code-create.com.hk/aida-terms-and-conditions/" style="text-decoration: underline;color: #000;">Terms</a>,
<a href="aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
<a href="https://aida.com.hk/privacy-policy.html" target="_blank" style="text-decoration: underline;color: #000;">Privacy Policy</a>,
and Fees.
</span>
</label>
@@ -121,9 +122,11 @@
</div>
</div> -->
<div
class="login_submit_button marign_top40"
class="login_submit_button"
:state="emailStap"
:class="{'active':animation}"
@click="submitPerLogin()"
@mousedown="loginBtnMousedown"
>
Sign in
</div>
@@ -302,6 +305,8 @@ export default defineComponent({
passwordType: "password",
userId: "",
loginTime: true,
animation: false,
inputCodeTime: null as any,
};
},
onBeforeUnmount() {
@@ -413,6 +418,16 @@ export default defineComponent({
submitPerLogin() {
//输入账号密码
if (this.emailStap >= 2) {
let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom
let code = verificationCodeInputDom.getCtData.map(item => item).join('');
console.log(code)
if(code.length !== this.emailCode.length){
message.info("Please enter the complete verification code.");
}else{
this.submitEmailLogin(code)
}
//提交验证码
return;
} else {
if (!this.password) {
@@ -481,21 +496,24 @@ export default defineComponent({
//邮箱登录提交
submitEmailLogin(emailVerifyCode: any) {
let data = {
email: this.email,
emailVerifyCode: emailVerifyCode,
loginType: "EMAIL",
userId: this.userId,
organizationName: this.selectSchool,
};
this.$emit('update:isMask',true)
Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => {
this.setSuccessLogin(rv);
})
.catch((res) => {
this.$emit('update:isMask',false)
});
clearTimeout(this.inputCodeTime)
this.inputCodeTime = setTimeout(()=>{
let data = {
email: this.email,
emailVerifyCode: emailVerifyCode,
loginType: "EMAIL",
userId: this.userId,
organizationName: this.selectSchool,
};
this.$emit('update:isMask',true)
Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => {
this.setSuccessLogin(rv);
})
.catch((res) => {
this.$emit('update:isMask',false)
});
},1000)
},
isCheckAgreement() {
message.info("Agree to all terms, privacy fees and policies");
@@ -604,6 +622,14 @@ export default defineComponent({
// }
// );
// },
loginBtnMousedown(){
this.animation = true
let mouseup = ()=>{
this.animation = false
document.removeEventListener('mouseup',mouseup)
}
document.addEventListener('mouseup',mouseup)
},
},
mounted() {
},
@@ -781,13 +807,12 @@ export default defineComponent({
transition: all 0.3s;
margin-top: 5rem;
font-weight: 600;
&.active{
transform: scale(.9);
}
&:hover {
background: #3c3c3c;
}
&[state="2"] {
cursor: not-allowed;
}
}
.NewAccount{
font-size: 1.6rem;
@@ -796,6 +821,8 @@ export default defineComponent({
margin-top: 1.2rem;
text-align: left;
cursor: pointer;
width: min-content;
white-space: nowrap;
}
.segmentation{
margin-top: 4rem;

View File

@@ -440,6 +440,13 @@ export default defineComponent({
if(userDetail.value.systemList.indexOf(1) == -1){
return message.info(t('newScaleImage.jsContent1'))
}
const targetDate = new Date('2025-09-01T00:00:00');
// 解析输入日期字符串
const inputDate = new Date(imgData.scaleImageData.createDate);
if(inputDate < targetDate){
return message.info(t('newScaleImage.jsContent2'))
}
if(imgData.scaleImageData.openSource == 0){
return message.info(t('newScaleImage.jsContent2'))
}

View File

@@ -339,7 +339,7 @@ export default defineComponent({
},
deleteFile(item: any) {
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){
if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:8})
item.state = 'delete'
this.store.commit("addGenerateMaterialFils", item);

View File

@@ -385,7 +385,7 @@ export default defineComponent({
deleteFile(item:any){
// this.fileList.splice(item, 1)
// this.store.commit('setPrintboardFile',this.fileList)
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){
if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16})
item.state = 'delete'
this.store.commit("addGenerateMaterialFils", item);
@@ -610,7 +610,6 @@ export default defineComponent({
}
this.fileList.push(data)
}
console.log(this.fileList)
this.store.commit('setPrintboardFile',this.fileList)
},

View File

@@ -124,6 +124,14 @@ export default defineComponent({
designType:props.item.resData.designType,
}
}else{
rv.imgUrl = rv.url
rv.category = props.item.category
rv.categoryValue = props.item.categoryValue
rv.resData = {
id:rv.id,
url:rv.url,
designType:props.item.resData.designType,
}
props.list.unshift(rv)
}
}

View File

@@ -812,31 +812,32 @@ methods: {
},
setImageIndex(index:any){
if(this.isNext)return
let this_ = this
if(this.isCanvas){
this.isNext = true
new Promise((resolve,reject)=>{
Modal.confirm({
title: this.t('scaleImage.submitCanvas'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
this_.scaleImageIndex = index
this_.isNext = false
resolve('')
},
onCancel(){
this_.isNext = false
resolve('')
}
});
})
}else{
this.scaleImageIndex = index
}
// let this_ = this
// if(this.isCanvas){
// this.isNext = true
// new Promise((resolve,reject)=>{
// Modal.confirm({
// title: this.t('scaleImage.submitCanvas'),
// icon: createVNode(ExclamationCircleOutlined),
// okText: 'Yes',
// cancelText: 'No',
// mask:false,
// centered:true,
// onOk() {
// this_.scaleImageIndex = index
// this_.isNext = false
// resolve('')
// },
// onCancel(){
// this_.isNext = false
// resolve('')
// }
// });
// })
// }else{
// this.scaleImageIndex = index
// }
this.scaleImageIndex = index
},
LikeFile(item:any,str:string){
let parent:any = this.$parent

View File

@@ -1591,12 +1591,10 @@ export default defineComponent({
//设计新的collection
async designNewCollection() {
clearTimeout(this.getDesignTime);
let probjects = this.store.state.Workspace.probjects
if(probjects.type == "seriesDesign" && probjects?.model?.length == 0)return message.info(this.t('collectionModal.jsContent7'));
let data = await this.getDesignData("");
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
this.isShowMark = true
// this.store.commit("setLikeDesignCollectionList", []);
Https.axiosPost(Https.httpUrls.designCollection, data)
@@ -1911,7 +1909,7 @@ export default defineComponent({
if(design?.childList?.length > 0){
await new Promise((resolve, reject) => {
Modal.confirm({
title: this.t('LibraryPage.jsContent11'),
title: this.t('HomeView.jsContent12'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
@@ -2117,13 +2115,14 @@ export default defineComponent({
type: string
) {
// if()
if(this.isMove)return
if(this.isMove || this.isShowMark)return
this.store.commit('setOpenChatStatus',false)
if(design.resultType != "Design"){
this.selectEditBtn = design
this.setEditDesignType(collectionList,index,design.resultType,'edit',type)
return
}
this.isShowMark = true
design.designOutfitId = design.designPythonOutfitId?design.designPythonOutfitId:design.designOutfitId
let data = {
design: design,
@@ -2134,7 +2133,9 @@ export default defineComponent({
this.detailDestroy = true
nextTick(()=>{
let designDetail: any = this.$refs.designDetail;
designDetail.showDesignDetailModal(data);
designDetail.showDesignDetailModal(data).then(()=>{
this.isShowMark = false
})
})
},

View File

@@ -228,6 +228,7 @@ export default defineComponent({
let uploadElementData = {
str:'add',
list:rv.uploadElement,
isGetModule:true,
}
store.commit('setUploadElement',uploadElementData)

View File

@@ -43,7 +43,6 @@
</div>
<div class="style brand marginBottom">
<div class="text">{{$t('Habit.Brand')}}:</div>
<!-- <div class="text"><img v-show="selectObject.userBrandDna" :src="selectObject.userBrandDnaImg">{{ selectObject.userBrandDnaName }}</div> -->
<div class="gallery_btn" @click="setBrandDNA">{{ $t('Habit.Select') }}</div>
</div>
<div class="brandImg" v-if="selectObject.userBrandDna"><img :src="selectObject.userBrandDnaImg"></div>

View File

@@ -113,12 +113,16 @@ export default defineComponent({
return new Promise((res,rev)=>{
let img = new Image()
img.onload = ()=>{
let wH = [1,1]
let domHeight = dataDom.canvasBox.offsetHeight - 200
let imgHeight = img.height
wH = [1,domHeight/imgHeight]
data.canvasConfig.width = img.width * wH[1]
data.canvasConfig.height = domHeight
// let wH = [1,1]
// let domHeight = dataDom.canvasBox.offsetHeight - 200
// let imgHeight = img.height
// wH = [1,domHeight/imgHeight]
// data.canvasConfig.width = img.width * wH[1]
// data.canvasConfig.height = domHeight
data.canvasConfig.height = img.height
data.canvasConfig.width = img.width
data.canvasConfig.initZoom = true
data.canvasLoad = true
res('')
}

View File

@@ -39,8 +39,7 @@
}"
:headers="{ Authorization: token }"
:before-upload="beforeUpload"
v-model:file-list="fileList"
:multiple="true"
:multiple="!!upload.projectId"
accept=".jpg,.png,.jpeg,.bmp"
@change="(file) => fileUploadChange(file)"
>
@@ -136,6 +135,7 @@ import generalDrag from '@/component/modules/generalDrag.vue';
import { getUploadUrl,isMoible,getMinioUrl } from "@/tool/util";
import { getCookie,setCookie } from "@/tool/cookie";
import showViewVideo from "@/tool/mount";
import router from '@/router';
export default defineComponent({
components:{
@@ -156,6 +156,7 @@ export default defineComponent({
setup(props,{emit}) {
const {t,locale} = useI18n()
const store = useStore();
const route = useRoute();
const data:any = reactive({
button:{
left:false,
@@ -305,6 +306,23 @@ export default defineComponent({
data.isGenerate = false
clearInterval(data.remGenerateTime)
data.remGenerate = false
if(res.errCode === 2){
Modal.confirm({
title: res.errMsg,
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
zIndex:99999,
centered:true,
onOk() {
store.commit("setUpgradePlan", true);
},
onCancel(){
}
});
}
})
}
const setGenerate = (dataList:any)=>{
@@ -328,6 +346,8 @@ export default defineComponent({
list = ''
clearInterval(data.generateTime)
clearInterval(data.remGenerateTime)
data.remGenerate = false
data.isGenerate = false
// if(list?.filter)list = list?.filter((item:any) => item !== element.taskId);
store.dispatch('getCredits')
}else if(element.status == 'Fail'){
@@ -381,6 +401,11 @@ export default defineComponent({
}
}
let isSelectObject = false
watch(()=>route?.query,(newVal)=>{
if(!newVal.id){
isSelectObject = false
}
},{immediate:true})
let beforeUpload = async (file: any)=>{
const isJpgOrPng =
file.type === "image/jpeg" ||
@@ -408,19 +433,21 @@ export default defineComponent({
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.id = res.data.id
data.fileList.forEach((listItem:any)=>listItem.isChecked = false)
data.currentList.forEach((listItem:any)=>listItem.isChecked = false)
file.isChecked = true
file.type = 'ProductElement'
// if(props.productimgMenu.value == 'Relight'){
// file.type = "ToProductImage"
// }
data.selectImg = res.data
data.fileList.filter((v: any) => v.status === "done");
// data.fileList.filter((v: any) => v.status === "done");
let storeData = {
str:'add',
list:[file]
}
store.commit('setUploadElement',storeData)
}else{
bor = false
}
// this.showFileList = productImgData.fileList
} else if (file.status === "error") {
bor = false
}
@@ -548,6 +575,13 @@ export default defineComponent({
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
if(props.isDesignPage)return
data.fileList = store.state.HomeStoreModule.uploadElement
data.fileList.forEach((listItem:any)=>{
if(listItem.id == data.selectImg.id){
listItem.isChecked = true
}else{
listItem.isChecked = false
}
})
})
watch(()=>data.noLikeList.length,(newVal,oldVal)=>{
nextTick(()=>{

View File

@@ -45,8 +45,7 @@
}"
:headers="{ Authorization: token }"
:before-upload="beforeUpload"
v-model:file-list="fileList[productimgMenu.value]"
:multiple="true"
:multiple="!!upload.projectId"
accept=".jpg,.png,.jpeg,.bmp"
@change="(file) => fileUploadChange(file)"
>
@@ -323,6 +322,9 @@ export default defineComponent({
watch(()=>store.state.HomeStoreModule.uploadElement.length,(newVal,oldVal)=>{
if(props.isDesignPage)return
productImgData.fileList[props.productimgMenu.value] = store.state.HomeStoreModule.uploadElement
if(productImgData.fileList[props.productimgMenu.value][0]){
productImgData.fileList[props.productimgMenu.value][0].isChecked = true
}
})
const productImgDom = reactive({
generalDragLeft:null as any,
@@ -423,6 +425,7 @@ export default defineComponent({
}
let fileUploadChange = (data: any)=> {
console.log(data)
let file = data.file;
let bor = true
if (file.status === "done") {
@@ -435,11 +438,16 @@ export default defineComponent({
// if(props.productimgMenu.value == 'Relight'){
// file.type = "ToProductImage"
// }
productImgData.fileList[props.productimgMenu.value].filter((v: any) => v.status === "done");
let storeData = {
str:'add',
list:[file]
}
console.log(storeData)
console.log(1111)
store.commit('setUploadElement',storeData)
}else{
bor = false
}
// this.showFileList = productImgData.fileList
} else if (file.status === "error") {
bor = false
}
@@ -466,11 +474,9 @@ export default defineComponent({
CollectionType:props.productimgMenu.value,
}
}
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
console.log(!!((isJpgOrPng && isLt2M && productImgData.selectObject.id) || Upload.LIST_IGNORE))
return !!((isJpgOrPng && isLt2M && productImgData.selectObject.id) || Upload.LIST_IGNORE);
}
let deleteFile = (index:any)=>{
productImgData.fileList[props.productimgMenu.value].splice(index,1)
}
let setGenerate = (item:any)=>{
item.isChecked = !item.isChecked
}
@@ -563,6 +569,7 @@ export default defineComponent({
}else{
obj.elementId = item.id
obj.elementType = item.resultType || 'ProductElement'
obj.elementType = obj.elementType == 'Relight'?'ToProductImage':obj.elementType
}
obj.parentId = item?.parentId || item?.userLikeSortId,
selectArr.push(JSON.parse(JSON.stringify(obj)))
@@ -892,7 +899,6 @@ export default defineComponent({
setproduct,
fileUploadChange,
beforeUpload,
deleteFile,
setGenerate,
setUploadDelete,
likeFile,

View File

@@ -87,7 +87,7 @@ export default defineComponent({
// dataDom.editCanvas.exportImage({isContainBg:props.source == 'detail',isContainFixed:true}).then((rv)=>{
// emit('submitBase64Data',rv)
// })
dataDom.editCanvas.exportImage({isContainBg:true,isContainFixed:true}).then((rv)=>{
dataDom.editCanvas.exportImage({isContainBg:true,isContainFixed:true,isCropByBg:true}).then((rv)=>{
emit('submitBase64Data',rv)
})
}
@@ -135,12 +135,16 @@ export default defineComponent({
if(props.imgUrl){
let img = new Image()
img.onload = ()=>{
let wH = [1,1]
let domHeight = dataDom.canvasBox.offsetHeight - 200
let imgHeight = img.height
wH = [1,domHeight/imgHeight]
data.canvasConfig.height = domHeight
data.canvasConfig.width = wH[1] * img.width
// let wH = [1,1]
// let domHeight = dataDom.canvasBox.offsetHeight - 200
// let imgHeight = img.height
// wH = [1,domHeight/imgHeight]
// data.canvasConfig.height = domHeight
// data.canvasConfig.width = wH[1] * img.width
data.canvasConfig.height = img.height
data.canvasConfig.width = img.width
data.canvasConfig.initZoom = true
data.canvasLoad = true
// setTimeout(()=>{
// canvasLoadAddImg()

View File

@@ -239,6 +239,7 @@ export default {
jsContent9: "您确定要清除当前系列并重新开始吗?",
jsContent10: "二次创作的作品不允许使用'设计',但是您可以使用'重新设计'",
jsContent11: "取消喜欢后相关联的元素会被删除,确认要删除吗",
jsContent12: "你确定要删除选中元素和相关元素吗?",
},
ProductImg: {
productInput: "请输入关键词(例如款式、材质)",
@@ -582,6 +583,8 @@ export default {
jsContent2: "上传的文件不会保存,是否继续? ",
jsContent3: "您必须选择一种或多种颜色进行下一步。",
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续",
jsContent6: "画布内容没有保存,请点击预保存后继续。",
jsContent7: "请至少选择一个模特",
},
DesignDetail: {
Details: "详情",
@@ -750,7 +753,8 @@ export default {
editUser: "修改个人信息",
notModifiable: "没有修改次数",
remainingModifications: "本月剩余次数:",
Country: "国家",
plaseSelect:"请选择",
Country: "国家或地区",
CompanyName: "职业",
Status: "状态",
Valid: "有效",
@@ -1347,5 +1351,16 @@ export default {
jsContent1:'邮箱格式有误',
jsContent2:'请检查所有带 * 号的内容',
jsDelete:'确定删除这一项吗',
Design:'设计',
SingleDesign:'单品设计',
MoodBoard:'情绪版',
PrintBoard:'印花板',
SketchBoard:'线稿板',
Pattern:'设计',
Logo:'标志',
Slogan:'标语',
ToProductImage:'产品图',
Relight:'打光',
ChatRobot:'对话生成',
},
};

View File

@@ -241,6 +241,7 @@ export default {
jsContent9: "Are you sure to erase current collection and start over?",
jsContent10: "Re-created works are not allowed to use 'design', but you can use 'redesign'",
jsContent11: "By unliking this, all connected posts will be deleted. Are you sure you want to continue?",
jsContent12: "Are you sure about deleting the current brand DNA?",
},
ProductImg: {
productInput: "Enter keyword(style,texture)",
@@ -584,6 +585,8 @@ export default {
jsContent2: "The uploaded files will not be saved, being sure to continue? ",
jsContent3: "You must choose one or more colors for further process.",
jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?",
jsContent6: 'The content on the canvas has not been saved. Please click "Preview" to continue.',
jsContent7: "Please select at least one model.",
},
DesignDetail: {
Details: "Details",
@@ -752,7 +755,8 @@ export default {
editUser: "Change Information",
notModifiable: "Not modifiable",
remainingModifications: "Remaining this month:",
Country: "Country",
plaseSelect:"Please select",
Country: "Country or Region",
CompanyName: "Occupation",
Status: "Status",
Valid: "Valid",
@@ -1349,5 +1353,16 @@ export default {
jsContent1:'The email format is incorrect',
jsContent2:'Please check the input box marked with *',
jsDelete:'Are you sure you want to delete this item?',
Design:'Design',
SingleDesign:'SingleDesign',
MoodBoard:'MoodBoard',
PrintBoard:'PrintBoard',
SketchBoard:'SketchBoard',
Pattern:'Pattern',
Logo:'Logo',
Slogan:'Slogan',
ToProductImage:'ToProductImage',
Relight:'Relight',
ChatRobot:'ChatRobot',
},
};

View File

@@ -1,5 +1,6 @@
import {Module} from 'vuex'
import {RootState} from '../index'
import { forEach } from 'jszip'
interface DesignDetail{
designDetail:any,
@@ -28,6 +29,19 @@ const DesignDetail : Module<DesignDetail,RootState> = {
currentPrintElement:null,
},
mutations:{
clearDetailData(state){
state.designDetail = null
state.designPreviewData = {}
state.frontBack = {
front:[],
back:[],
body:{},
}
state.selectDetail = null
state.printZIndex = -1
state.currentDetailType = ''
state.currentPrintElement = null
},
setDesignDetail(state,data){
if(data.others.length > 0 && data.others[0].type == "Body"){
state.frontBack.body = data.others[0]
@@ -58,11 +72,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// front[index].style.zIndex = v.priority
front[index].id = v.id
front[index].undividedLayer = v.undividedLayer
front[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
}else{
back[index] = v.layersObject[i]
back[index].style.zIndex = v.priority
back[index].id = v.id
back[index].undividedLayer = v.undividedLayer
back[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
}
if(state.printZIndex < v.priority){
@@ -138,7 +154,6 @@ const DesignDetail : Module<DesignDetail,RootState> = {
}
},
setDesignColthes(state,data){
console.log(data)
if(!state.currentDetailType)state.currentDetailType = 'sketch'
//切换选择
// state.currentDetailType = ''
@@ -181,6 +196,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
trims:null,
type:null,
undividedLayer:null,
undividedLayerWithSinglePrint:null,
}
if(!state.currentDetailType)state.currentDetailType = 'sketch'
state.designDetail.clothes.forEach((item:any) => {
@@ -192,33 +208,36 @@ const DesignDetail : Module<DesignDetail,RootState> = {
},
async setPraeview(state,value){//preview
let data = value?.rv || value
console.log(data,'preview')
let currentType = value?.currentType
if(state.designDetail.oldModel?.url)state.frontBack.body.path = state.designDetail.oldModel.url
if(value?.rv?.currentFullBodyView)state.designDetail.currentFullBodyView = value.rv.currentFullBodyView
for (let j = 0; j < data.clothes.length; j++) {
const item = data.clothes[j];
if(!item.id)continue
if(item.id == state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id == item.id){
}
let id_:any
if(state.currentDetailType != 'models'){
id_ = state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id
if(data.clothes.length > 2){
//缺少字段临时添加
id_ = item.id || state.selectDetail.newDetail?.sketch?.id
}else{
id_ = state.selectDetail.id || state.selectDetail.newDetail?.sketch?.id
}
}else{
id_ = item.id
}
console.log(id_)
let el:any = document.querySelector('.molepositon .perview_img')
await new Promise((resolve, reject) => {
if(!state.frontBack?.body?.path){
state.frontBack.front[0].undividedLayer = value.rv.clothes[0].undividedLayer
state.frontBack.front[0].undividedLayerWithSinglePrint = value.rv.clothes[0]?.undividedLayerWithSinglePrint
resolve('')
}
const img = new Image();
img.src = state.frontBack.body.path;
img.onload = () => {
let scale:any = el.parentNode.offsetWidth / img.width;
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
if(state.selectDetail?.newDetail?.sketch?.id && !state.selectDetail.id){
state.frontBack.front.push({id:state.selectDetail.newDetail?.sketch?.id})
state.frontBack.back.push({id:state.selectDetail.newDetail?.sketch?.id})
}
@@ -230,7 +249,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
left:item.layersObject[i].position?.[1] * scale + 'px',
width:item.layersObject[i].imageSize?.[0] * scale + 'px',
height:item.layersObject[i].imageSize?.[1] * scale + 'px',
zIndex:v?.style?.zIndex?v.style.zIndex:state.frontBack.front.length
zIndex:v?.style?.zIndex?v.style.zIndex:v.priority?v.priority:state.frontBack.front.length
}
item.layersObject[i].centers={
left:0,
@@ -242,11 +261,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// state.frontBack.front[index].style.zIndex = v.priority
state.frontBack.front[index].id = item.id
state.frontBack.front[index].undividedLayer = item.undividedLayer
state.frontBack.front[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
}else{
state.frontBack.back[index] = item.layersObject[i]
// state.frontBack.back[index].style.zIndex = v.priority
state.frontBack.back[index].id = item.id
state.frontBack.back[index].undividedLayer = item.undividedLayer
state.frontBack.back[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
}
}
}
@@ -254,31 +275,89 @@ const DesignDetail : Module<DesignDetail,RootState> = {
resolve('')
};
})
if(state.currentDetailType != 'models'){
state.selectDetail.change = item.change
if(state.selectDetail?.newDetail?.color){
state.selectDetail.color = state.selectDetail?.newDetail?.color
state.selectDetail.newDetail.color = null
let uploadDetail = (detailItem)=>{
detailItem.change = item.change
if(detailItem?.newDetail?.color && currentType != 'color'){
detailItem.color = detailItem?.newDetail?.color
detailItem.newDetail.color = null
}
if(item.partialDesign){
state.selectDetail.partialDesign = item.partialDesign
detailItem.partialDesign = item.partialDesign
}
state.selectDetail.designType = item.designType
state.selectDetail.gradient = item.gradient
state.selectDetail.layersObject = item.layersObject
state.selectDetail.path = item.path
state.selectDetail.minIOPath = item.minIOPath
state.selectDetail.scale = [1,1]
state.selectDetail.offset = [0,0]
state.selectDetail.printObject = item.printObject
state.selectDetail.trims = item.trims
state.selectDetail.type = item.type
state.selectDetail.undividedLayer = item.undividedLayer
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
state.designDetail.clothes.push(state.selectDetail)
detailItem.designType = item.designType
detailItem.layersObject = item.layersObject
detailItem.path = item.path
detailItem.minIOPath = item.minIOPath
detailItem.scale = [1,1]
detailItem.offset = [0,0]
detailItem.printObject = item.printObject
detailItem.trims = item.trims
detailItem.type = item.type
detailItem.maskMinioUrl = item.layersObject?.[0]?.maskMinioUrl
detailItem.maskUrl = item.layersObject?.[0]?.maskUrl
detailItem.color = {
...item.color,
rgba:{
r:item.color?.r,
g:item.color?.g,
b:item.color?.b,
},
gradient:item.gradient,
}
state.selectDetail.id = item.id
if(currentType)if(state.selectDetail.newDetail?.[currentType])delete state.selectDetail.newDetail[currentType]
detailItem.undividedLayer = item.undividedLayer
detailItem.undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
if(detailItem.newDetail?.sketch?.id && !detailItem.id){
state.designDetail.clothes.push(detailItem)
}
detailItem.id = item.id
if(currentType)if(detailItem.newDetail?.[currentType] && currentType != 'color')delete detailItem.newDetail[currentType]
}
if(data.clothes.length > 2){
state.designDetail.clothes.forEach((detailItem:any) => {
if(detailItem.id == id_){
uploadDetail(detailItem)
}
});
}else{
uploadDetail(state.selectDetail)
}
if(state.currentDetailType != 'models'){
// state.selectDetail.change = item.change
// if(state.selectDetail?.newDetail?.color && currentType != 'color'){
// state.selectDetail.color = state.selectDetail?.newDetail?.color
// state.selectDetail.newDetail.color = null
// }
// if(item.partialDesign){
// state.selectDetail.partialDesign = item.partialDesign
// }
// state.selectDetail.designType = item.designType
// state.selectDetail.layersObject = item.layersObject
// state.selectDetail.path = item.path
// state.selectDetail.minIOPath = item.minIOPath
// state.selectDetail.scale = [1,1]
// state.selectDetail.offset = [0,0]
// state.selectDetail.printObject = item.printObject
// state.selectDetail.trims = item.trims
// state.selectDetail.type = item.type
// state.selectDetail.maskMinioUrl = item.layersObject?.[0]?.maskMinioUrl
// state.selectDetail.maskUrl = item.layersObject?.[0]?.maskUrl
// state.selectDetail.color = {
// ...item.color,
// rgba:{
// r:item.color?.r,
// g:item.color?.g,
// b:item.color?.b,
// },
// gradient:item.gradient,
// }
// state.selectDetail.undividedLayer = item.undividedLayer
// state.selectDetail.undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
// if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
// state.designDetail.clothes.push(state.selectDetail)
// }
// state.selectDetail.id = item.id
// if(currentType)if(state.selectDetail.newDetail?.[currentType] && currentType != 'color')delete state.selectDetail.newDetail[currentType]
}
}
if(value.fun)value.fun()

View File

@@ -95,6 +95,9 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
}
},
setUploadElement(state,data){
if(data?.isGetModule){
state.uploadElement = []
}
if(data.str == 'add'){
state.uploadElement.unshift(...data.list)
}else{

View File

@@ -38,19 +38,7 @@ const CancelToken = axios.CancelToken;
const source = CancelToken.source();
// console.log(import.meta.env.VITE_APP_BASE_URL);
let isLoginTime = false
const filterHttpsUrl = [
// '/api/portfolio/page',
'/api/account/resetPwd',
'/api/portfolio/detail',
'/api/account/preLogin',
'/api/account/designWorksRegister',
'/api/account/schoolLogin',
'/api/account/enterpriseLogin',
'/api/account/login',
'/api/account/organizationNameSearch',
'/api/account/designWorksRegisterCode',
'/api/third/party/parseWeChatCode',
'/api/account/sendEmail']
//POST传参序列化(添加请求拦截器)
axios.interceptors.request.use((config) => {
//在发送请求之前做某件事
@@ -63,23 +51,7 @@ axios.interceptors.request.use((config) => {
// config.data = JSON.stringify(config.data);
}
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
if(filterHttpsUrl.indexOf(config.url) == -1){
if (!getCookie('token')) {
console.log('无Token取消请求');
if(!isLoginTime){
isLoginTime = true
router.replace('/')
message.warning('Please login and try again~')
setTimeout(()=>[
isLoginTime = false
],2000)
}
return Promise.reject(new Error('缺少Token请求被拦截')); // 阻止请求
}
config.headers.Authorization = getCookie('token');
}else{
config.headers.Authorization = '';
}
config.headers.Authorization = getCookie('token');
return config;
},(error) =>{
return Promise.reject(error);

View File

@@ -339,7 +339,8 @@ const openTypeList = (t)=>{
label:t('LibraryPage.Mannequins'),
value:'Models',
router:'library=Models'
},{
},
{
icon:'fi-ss-gem',
label:t('LibraryPage.brandDNA'),
value:'MyBrand',

View File

@@ -240,11 +240,13 @@
</div>
</div>
</div>
<div class="userSystem" v-if="userDetail.systemList.indexOf(1) == -1">
{{$t('Header.pastDue')}}
</div>
<div class="router" v-else-if="!getLangIsShowMark">
<home ref="home" @setNewProject="()=>leftShow=true" @setTask="setTask"></home>
<div class="routerView">
<div class="userSystem" v-show="pastDuePage">
{{$t('Header.pastDue')}}
</div>
<div class="router" v-if="!getLangIsShowMark">
<home ref="home" @setNewProject="()=>leftShow=true" @setTask="setTask"></home>
</div>
</div>
</div>
</div>
@@ -341,6 +343,14 @@ export default defineComponent({
},
bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"]
})
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
const pastDuePage = computed(()=>{
const isAllowedRoute = route.path === '/home/events' || route.path === '/home/works';
const hasNoSystemAccess = userDetail.value.systemList.indexOf(1) === -1;
return hasNoSystemAccess && !isAllowedRoute;
})
watch(()=>homeMainData.userDetailLanguage,(newVal)=>{
if(locale.value == newVal || !newVal)return
locale.value = newVal
@@ -413,9 +423,6 @@ export default defineComponent({
// homeMainData.historyData.page = 1
// })
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
let isMurmur = ref()
let credits = computed(()=>{
return store.state.UserHabit.credits.value
@@ -791,6 +798,7 @@ export default defineComponent({
t,
...toRefs(homeMainData),
...toRefs(historyData),
pastDuePage,
locale,
isMurmur,
credits,
@@ -953,9 +961,9 @@ export default defineComponent({
let url = 'https://aida-user-manual-chinese.super.site/'
if(this.locale == 'ENGLISH'){
url = 'https://code-create.com.hk/wp-content/uploads/2025/02/aida_3.0-Manual-2_5-EN.pdf'
showViewVideo({url:'https://aida.com.hk/video/user_manual_3_1_0.mp4'})
showViewVideo({url:'https://aida.com.hk/video/AiDA_3_1_Demo_V2_EN.mp4'})
}else{
showViewVideo({url:'https://aida.com.hk/video/user_manual_3_1_0.mp4'})
showViewVideo({url:'https://aida.com.hk/video/AiDA_3_1_Demo_V2_CN.mp4'})
}
this.toUserManual()
// //打开视频
@@ -1778,26 +1786,32 @@ export default defineComponent({
}
}
> .router{
flex: 1;
> .routerView{
position: relative;
overflow: hidden;
padding: 0 6rem;
padding-bottom: 2rem;
}
> .userSystem{
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index:2;
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 600;
font-size: 4rem;
> .router{
flex: 1;
overflow: hidden;
padding: 0 6rem;
padding-bottom: 2rem;
}
> .userSystem{
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 600;
font-size: 4rem;
z-index: 100;
}
}
}
}

View File

@@ -357,7 +357,7 @@
</i>
<i v-show="selectCode == 'Printboard' && scene?.value == 'Slogan'" :title="$t('Generate.sloganTitle')" @click.stop="setSlogan" class="fi fi-rr-poll-h"></i>
<i v-show="!isTextarea" class="fi fi-br-expand" @click.stop="setTextareaShow"></i>
<i v-show="isTextarea" class="fi fi-bs-compress" @click.stop="setTextareaShow"></i>
<i v-show="isTextarea" class="fi fi-bs-compress" style="z-index: 100;" @click.stop="setTextareaShow"></i>
</div>
<div class="input_box_btnBox sketch" v-else>
<div class="upload_item" v-show="selectGenerateList.length > 0">
@@ -857,7 +857,6 @@ export default defineComponent({
dataDom.createBrand.openAddBrand()
}
const editImg = (item:any,index:number)=>{
console.log(item)
pageData.editIndex = index
dataDom.modalCanvas.init(item,'')
// imgList
@@ -995,7 +994,7 @@ export default defineComponent({
label:''
}
}else{
if(newVal.value == "Pattern"){
if(newVal.value == "Pattern" || this.selectCode == 'Sketchboard'){
this.speedData = this.speedList[1]
}else{
this.speedData = this.speedList[0]
@@ -1823,7 +1822,7 @@ export default defineComponent({
}else if(element.status == 'Fail' || element.status == 'Invalid'){
data = data.filter((item:any) => item !== element.taskId);
this.generateList[str] = this.generateList[str].filter((item:any) => item.taskId !== element.taskId);
message.info(this.t('Generate.everyTimeEffectPoor'));
// message.info(this.t('Generate.everyTimeEffectPoor'));
}
});
if((data.length == 0)){
@@ -1935,6 +1934,7 @@ export default defineComponent({
scaleImage.init(list,index)
},
onPaste(e:any){
if(this.selectGenerateList.length != 0)return
if(e.clipboardData.files[0] && !this.isTextarea && this.selectCode !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData();
param.append('inPin','0')

View File

@@ -40,7 +40,7 @@
<div class="title">
<i class="fi fi-br-angle-left" @click="loginBack"></i>
<!-- <i class="fi fi-rr-arrow-left" @click="()=>loginType = ''"></i> -->
<span>Log on to AiDA</span>
<span>Log on to AiDA 3.1</span>
</div>
<div class="info" v-show="!loginType">Please fill your information below</div>
<personal ref="personal" v-if="loginType == 'personal'" v-model:isMask="isMask"></personal>