调整detail拉伸sketch但是编辑印花和画布使用的sketch不受影响
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
VITE_USER_NODE_ENV = 'production'
|
||||
VITE_USER_NODE_ENV = 'development'
|
||||
# VITE_APP_BASE_URL = 'https://aida.com.hk/test'
|
||||
# VITE_APP_BASE_URL = 'http://18.167.251.121:10088'
|
||||
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
|
||||
|
||||
9
components.d.ts
vendored
9
components.d.ts
vendored
@@ -9,11 +9,15 @@ export {}
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
||||
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||
AImage: typeof import('ant-design-vue/es')['Image']
|
||||
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
|
||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||
@@ -21,9 +25,14 @@ declare module 'vue' {
|
||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||
ASlider: typeof import('ant-design-vue/es')['Slider']
|
||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||
ATable: typeof import('ant-design-vue/es')['Table']
|
||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
|
||||
@@ -117,13 +117,12 @@ export default defineComponent({
|
||||
let value = {
|
||||
country:accountHomeData.Country,
|
||||
title:accountHomeData.selectSex,
|
||||
userName:accountHomeData.editUserName,
|
||||
surname:accountHomeData.surname,
|
||||
givenName:accountHomeData.givenName,
|
||||
}
|
||||
store.commit('upUserDetail',value)
|
||||
accountHomeData.loadingShow = false
|
||||
message.success(t('exportModel.jsContent7'))
|
||||
message.success(t('account.jsContent13'))
|
||||
}).catch((err:any)=>{
|
||||
accountHomeData.loadingShow = false
|
||||
})
|
||||
|
||||
@@ -870,7 +870,7 @@ export class ExportManager {
|
||||
const clipObject = this.canvas?.clipPath;
|
||||
if (!clipObject) {
|
||||
console.warn("未找到可用的裁剪对象");
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
// 克隆对象作为裁剪路径
|
||||
@@ -878,7 +878,6 @@ export class ExportManager {
|
||||
clipObject,
|
||||
false,
|
||||
false
|
||||
|
||||
);
|
||||
|
||||
if (!clonedClipPath) {
|
||||
|
||||
@@ -759,13 +759,13 @@ export class ToolManager {
|
||||
* @private
|
||||
*/
|
||||
_showRasterizeConfirmModal(isGroup, layerId) {
|
||||
const title = "栅格化图层";
|
||||
const content = "需要先栅格化才能进行液化操作,是否立即栅格化?";
|
||||
const title = this.t("Canvas.RasterizedLayer");
|
||||
const content = this.t("Canvas.rasterizeImmediately");
|
||||
|
||||
Modal.confirm({
|
||||
title,
|
||||
content,
|
||||
okText: "确定栅格化",
|
||||
okText: this.t("Canvas.ConfirmRasterization"),
|
||||
cancelText: "取消",
|
||||
centered: true,
|
||||
icon: h("span", { style: "color: #faad14;" }, "⚠️"),
|
||||
@@ -800,8 +800,8 @@ export class ToolManager {
|
||||
if (!this.commandManager || !this.layerManager) return;
|
||||
// 显示加载Modal
|
||||
const loadingModal = Modal.info({
|
||||
title: "正在栅格化",
|
||||
content: "正在栅格化图层,请稍候...",
|
||||
title: this.t('Canvas.beingRasterized'),
|
||||
content: this.t('Canvas.waitRasterizing'),
|
||||
okButtonProps: { style: { display: "none" } },
|
||||
centered: true,
|
||||
closable: false,
|
||||
@@ -823,16 +823,16 @@ export class ToolManager {
|
||||
|
||||
if (result) {
|
||||
// 栅格化成功,启动液化
|
||||
message.success("图层已成功栅格化,可以进行液化操作");
|
||||
message.success(this.t('Canvas.successRasterizing'));
|
||||
this._startLiquify(result);
|
||||
|
||||
this.setTool(OperationType.LIQUIFY); // 切换到液化工具
|
||||
} else {
|
||||
// 栅格化失败
|
||||
Modal.error({
|
||||
title: "栅格化失败",
|
||||
content: "栅格化失败,无法进行液化操作",
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.gridingFailed'),
|
||||
content: this.t('Canvas.gridingFailedNoOperation'),
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
}
|
||||
@@ -840,9 +840,9 @@ export class ToolManager {
|
||||
console.error("栅格化图层失败:", error);
|
||||
|
||||
Modal.error({
|
||||
title: "栅格化错误",
|
||||
content: `栅格化失败:${error.message}`,
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.gridingError'),
|
||||
content: `${this.t('Canvas.gridingFailed')}:${error.message}`,
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
} finally {
|
||||
@@ -866,9 +866,9 @@ export class ToolManager {
|
||||
);
|
||||
if (!layer) {
|
||||
Modal.error({
|
||||
title: "图层错误",
|
||||
content: "图层不存在",
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.LayerError'),
|
||||
content: this.t('Canvas.LayerDoesNotExist'),
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
return;
|
||||
@@ -880,9 +880,9 @@ export class ToolManager {
|
||||
// 背景图层使用 fabricObject (单数)
|
||||
if (!layer.fabricObject) {
|
||||
Modal.warning({
|
||||
title: "背景图层为空",
|
||||
content: "背景图层为空,无法进行液化操作",
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.backgroundEmpty'),
|
||||
content: this.t('Canvas.backgroundEmptyNoLiquidation'),
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
return;
|
||||
@@ -892,9 +892,9 @@ export class ToolManager {
|
||||
// 普通图层使用 fabricObjects (复数)
|
||||
if (!layer.fabricObjects || layer.fabricObjects.length === 0) {
|
||||
Modal.warning({
|
||||
title: "图层为空",
|
||||
content: "图层为空,无法进行液化操作",
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.layerEmpty'),
|
||||
content: this.t('Canvas.layerEmptyNoLiquidation'),
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
return;
|
||||
@@ -906,9 +906,9 @@ export class ToolManager {
|
||||
const liquifyManager = this.canvasManager?.liquifyManager;
|
||||
if (!liquifyManager) {
|
||||
Modal.error({
|
||||
title: "液化管理器错误",
|
||||
content: "液化管理器未初始化",
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.liqueficationManagerError'),
|
||||
content: this.t('Canvas.liqueficationManagerErrorInitialized'),
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
return;
|
||||
@@ -917,8 +917,8 @@ export class ToolManager {
|
||||
try {
|
||||
// 显示准备中的Modal
|
||||
const preparingModal = Modal.info({
|
||||
title: "准备液化环境",
|
||||
content: "正在准备液化环境,请稍候...",
|
||||
title: this.t('Canvas.liquefactionEnvironment'),
|
||||
content: this.t('Canvas.liquefactionEnvironmentLoading'),
|
||||
okButtonProps: { style: { display: "none" } },
|
||||
centered: true,
|
||||
closable: false,
|
||||
@@ -963,9 +963,9 @@ export class ToolManager {
|
||||
} catch (error) {
|
||||
console.error("启动液化工具失败:", error);
|
||||
Modal.error({
|
||||
title: "液化工具启动失败",
|
||||
content: `启动液化工具失败:${error.message}`,
|
||||
okText: "确定",
|
||||
title: this.t('Canvas.LiqueficationFailed'),
|
||||
content: `${this.t('Canvas.LiqueficationFailed')}:${error.message}`,
|
||||
okText: this.t('Canvas.ok'),
|
||||
centered: true,
|
||||
});
|
||||
}
|
||||
@@ -1041,7 +1041,7 @@ export class ToolManager {
|
||||
_createTextDirect(x, y, options = {}) {
|
||||
// 默认文本属性
|
||||
const defaultOptions = {
|
||||
text: "双击编辑文本",
|
||||
text: this.t('Canvas.DoubleClickText'),
|
||||
fontFamily: "Arial",
|
||||
fontSize: 24,
|
||||
fontWeight: "normal",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
:enabledRedGreenMode="true"
|
||||
:clothingImageUrl="imageUrls.baseImage"
|
||||
:redGreenImageUrl="imageUrls.maskImage"
|
||||
@trigger-red-green-mouseup="frontBackChange"
|
||||
:clothingImageOpts="{ imageMode: 'contains' }"
|
||||
/>
|
||||
</div>
|
||||
@@ -51,6 +52,9 @@ const loadJSON = () => {
|
||||
const changeFixedImage = () => {
|
||||
canvasEditor.value.changeFixedImage(changeImageUrl);
|
||||
};
|
||||
const frontBackChange = (value) =>{
|
||||
console.log(value)
|
||||
}
|
||||
|
||||
// 组件挂载时绑定键盘事件
|
||||
onMounted(() => {});
|
||||
|
||||
@@ -213,6 +213,7 @@ export default defineComponent({
|
||||
setRevocation()
|
||||
detailData.loadingShow = false
|
||||
if(rv.singleOverall == "single"){
|
||||
console.log(rv.clothes)
|
||||
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
|
||||
}
|
||||
|
||||
@@ -521,7 +522,7 @@ export default defineComponent({
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
:deep(.detailText){
|
||||
font-size: 1.8rem;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 600;
|
||||
|
||||
}
|
||||
@@ -566,6 +567,7 @@ export default defineComponent({
|
||||
overflow: hidden;
|
||||
&.detailLeft{
|
||||
width: 34rem;
|
||||
// width: 34rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -185,12 +185,55 @@ export default defineComponent({
|
||||
img.src = url
|
||||
})
|
||||
}
|
||||
|
||||
const resizeImageWithNativeCanvas = async (image1Url, imageBUrl)=>{
|
||||
try {
|
||||
// 加载第一张图片获取尺寸
|
||||
const img1 = await loadImage(image1Url);
|
||||
const targetWidth = img1.naturalWidth;
|
||||
const targetHeight = img1.naturalHeight;
|
||||
|
||||
// 加载第二张图片
|
||||
const imgB = await loadImage(imageBUrl);
|
||||
|
||||
// 创建canvas元素
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = targetWidth;
|
||||
canvas.height = targetHeight;
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// 绘制调整尺寸后的图片
|
||||
ctx.drawImage(imgB, 0, 0, targetWidth, targetHeight);
|
||||
|
||||
// 导出base64
|
||||
const base64 = canvas.toDataURL('image/png', 1);
|
||||
|
||||
return base64;
|
||||
} catch (error) {
|
||||
console.error('处理图片时出错:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// 图片加载辅助函数
|
||||
const loadImage = (url)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.crossOrigin = 'anonymous';
|
||||
img.onload = () => resolve(img);
|
||||
img.onerror = reject;
|
||||
img.src = url;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const frontBackChange = (value:any)=>{
|
||||
let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.selectDetail.path
|
||||
let size = {
|
||||
...detailData.canvasConfig,
|
||||
}
|
||||
segmentImage(value,full,size).then((rv)=>{
|
||||
|
||||
segmentImage(value,full,size).then(async (rv)=>{
|
||||
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
||||
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
||||
if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl
|
||||
@@ -199,7 +242,8 @@ export default defineComponent({
|
||||
if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
|
||||
|
||||
front.imageUrl = rv.targetFrontUrl
|
||||
front.maskUrl = value
|
||||
let base64 = await resizeImageWithNativeCanvas(front.oldMaskUrl,value)
|
||||
front.maskUrl = base64
|
||||
back.imageUrl = rv.targetBackUrl
|
||||
store.commit('DesignDetail/updataDetailItem',{maskUrl:value})
|
||||
})
|
||||
|
||||
@@ -143,7 +143,7 @@ export default defineComponent({
|
||||
sketchWH:{
|
||||
width:0,
|
||||
height:0,
|
||||
scale:0,
|
||||
scale:[1,1],
|
||||
},
|
||||
loadingShow:false,
|
||||
printElementList:null as any,
|
||||
@@ -187,8 +187,8 @@ export default defineComponent({
|
||||
|
||||
let scale = [width / editPrintElementData.sketchWH.width,height]
|
||||
|
||||
let sketchW = editPrintElementData.sketchWH.width * editPrintElementData.sketchWH.scale
|
||||
let sketchH = editPrintElementData.sketchWH.height * editPrintElementData.sketchWH.scale
|
||||
let sketchW = editPrintElementData.sketchWH.width * editPrintElementData.sketchWH.scale[0]
|
||||
let sketchH = editPrintElementData.sketchWH.height * editPrintElementData.sketchWH.scale[1]
|
||||
let x = sketchW / 2 - (sketchW * (width / editPrintElementData.sketchWH.width)/2)
|
||||
let y = sketchH / 2 -(sketchH * height/2)
|
||||
if(!editPrintElementData.stateOverallSingle == 'single'){
|
||||
@@ -226,12 +226,12 @@ export default defineComponent({
|
||||
let style = item.pattern.style
|
||||
let sketchWH = editPrintElementData.sketchWH.scale
|
||||
if(item.ifSingle){
|
||||
scale = [style.width.replace(/px/g,'')/editPrintElementData.sketchWH.width,(style.height.replace(/px/g,'')/editPrintElementData.sketchWH.height)]
|
||||
location = [style.left.replace(/px/g,'')*sketchWH,style.top.replace(/px/g,'')*sketchWH]
|
||||
scale = [style.width.replace(/px/g,'')/(editPrintElementData.sketchWH.width),(style.height.replace(/px/g,'')/(editPrintElementData.sketchWH.height))]
|
||||
location = [style.left.replace(/px/g,'')*sketchWH[0],style.top.replace(/px/g,'')*sketchWH[1]]
|
||||
}else{
|
||||
let x = Number(style.left.replace(/px/g,''))
|
||||
let y = Number(style.top.replace(/px/g,''))
|
||||
location = [(x*sketchWH) ,(y*sketchWH)]
|
||||
location = [(x*sketchWH[0]) ,(y*sketchWH[1])]
|
||||
scale =[ editPrintElementData.systemDesignerPercentage/100, editPrintElementData.systemDesignerPercentage/100]
|
||||
// scale = [item.pattern.style.width/item.pattern.style.height,item.pattern.style.height/item.pattern.style.width]
|
||||
// location = [item.pattern.style.left,item.pattern.style.top]
|
||||
@@ -283,13 +283,13 @@ export default defineComponent({
|
||||
|
||||
if(item.ifSingle){
|
||||
//single
|
||||
left = item.location[0] / editPrintElementData.sketchWH.scale
|
||||
top = item.location[1] / editPrintElementData.sketchWH.scale
|
||||
left = item.location[0] / editPrintElementData.sketchWH.scale[0]
|
||||
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
||||
}else{
|
||||
//overall
|
||||
editPrintElementData.systemDesignerPercentage = item.scale[0]*1000
|
||||
left = item.location[0] / editPrintElementData.sketchWH.scale
|
||||
top = item.location[1] / editPrintElementData.sketchWH.scale
|
||||
left = item.location[0] / editPrintElementData.sketchWH.scale[0]
|
||||
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
||||
editPrintElementData.systemDesignerPercentage = item.scale?.[0]?item.scale[0]*100:30
|
||||
}
|
||||
let pattern = {
|
||||
@@ -322,11 +322,15 @@ export default defineComponent({
|
||||
nextTick(()=>{
|
||||
let img = new Image
|
||||
img.onload = ()=>{
|
||||
let scale = img.width / editPrintElementDom.sketchImg.offsetWidth
|
||||
// let sketchScale = editPrintElementData.selectDetail.layersObject[0].scale
|
||||
let sketchScale = [1,1]
|
||||
let scaleX = img.width * sketchScale[0] / editPrintElementDom.sketchImg.offsetWidth
|
||||
let scaleY = img.height * sketchScale[1] / editPrintElementDom.sketchImg.offsetHeight
|
||||
|
||||
editPrintElementData.sketchWH = {
|
||||
width:editPrintElementDom.sketchImg.offsetWidth,
|
||||
height:editPrintElementDom.sketchImg.offsetHeight,
|
||||
scale,
|
||||
scale:[scaleX,scaleY],
|
||||
}
|
||||
if(!editPrintElementData.selectDetail.printObject.prints)return
|
||||
let state = true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="modelNavBox" :class="{'modelNavBox_active':designDetail.clothes.length == 5}">
|
||||
<div class="modelNavBox" ref="modelNavBox" :class="{'modelNavBox_active':designDetail.clothes.length == 5}">
|
||||
<div class="modelNav" ref="modelNav" :style="{height:prentHeight}">
|
||||
<div class="modelNav_item item"
|
||||
v-for="item,index in designDetail.clothes"
|
||||
@@ -45,6 +45,7 @@ export default defineComponent({
|
||||
singleOveral:inject('singleOveral') as any,
|
||||
getCanvasIfEdit:inject('getCanvasIfEdit')as any,
|
||||
modelNav:null as any,
|
||||
modelNavBox:null as any,
|
||||
})
|
||||
const collItemSize = reactive({
|
||||
collValue:18,
|
||||
@@ -237,12 +238,18 @@ export default defineComponent({
|
||||
collItemSize.prentHeight = (collItemSize.padding + remValue) * elArr.length + 'px'
|
||||
moveItem()
|
||||
}
|
||||
let observers = null as any
|
||||
onMounted(()=>{
|
||||
|
||||
observers = new ResizeObserver(entries => {
|
||||
for (let entry of entries) {
|
||||
setItemPosition()
|
||||
}
|
||||
});
|
||||
observers.observe(detailData.modelNavBox);
|
||||
})
|
||||
onBeforeUnmount(()=>{
|
||||
observers.disconnect();
|
||||
})
|
||||
// onBeforeUnmount(()=>{
|
||||
// detailData.selectIndex = -1
|
||||
// })
|
||||
return{
|
||||
...toRefs(detailData),
|
||||
...toRefs(collItemSize),
|
||||
|
||||
@@ -83,7 +83,10 @@ export default defineComponent({
|
||||
if(!detailData.frontBack?.body?.path || !dom)return
|
||||
img.onload = () => {
|
||||
if(!detailData.selectDetail?.id){
|
||||
store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id)
|
||||
let item = detailData.designDetail.clothes.reduce((max, current) => {
|
||||
return current.priority > max.priority ? current : max;
|
||||
});
|
||||
store.commit('DesignDetail/setDesignColthes',item.id)
|
||||
}
|
||||
// resolve(img)
|
||||
sacle = dom.parentNode.offsetWidth / img.width
|
||||
|
||||
@@ -468,6 +468,7 @@ export default defineComponent({
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.fi::before{
|
||||
padding: 5px;
|
||||
|
||||
@@ -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">
|
||||
<!-- <div class="icon" @click="toGmailLogin"> -->
|
||||
<img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
|
||||
<span>{{ $props.text }}</span>
|
||||
</div>
|
||||
@@ -27,6 +28,17 @@
|
||||
const {t} = useI18n()
|
||||
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 +48,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'
|
||||
}
|
||||
@@ -79,7 +91,6 @@
|
||||
}
|
||||
}
|
||||
const toGmailLogin = ()=>{
|
||||
console.log(12312)
|
||||
message.info(t('account.canNotUtilize'))
|
||||
}
|
||||
onBeforeUnmount(()=>{
|
||||
@@ -90,7 +101,7 @@
|
||||
}
|
||||
})
|
||||
onMounted(()=>{
|
||||
// createGmailLogin()
|
||||
createGmailLogin()
|
||||
})
|
||||
return {
|
||||
toGmailLogin,
|
||||
@@ -135,7 +146,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;
|
||||
|
||||
@@ -368,6 +368,8 @@ export default defineComponent({
|
||||
email: this.forgetPasswordEmail,
|
||||
operationType: "FORGET_PWD",
|
||||
};
|
||||
this.frogetPasswordStep = 2;
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.frogetPasswordStep = 2;
|
||||
@@ -895,6 +897,7 @@ export default defineComponent({
|
||||
font-weight: bold;
|
||||
color: #030303;
|
||||
margin-top: 3.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.forget_submit_button {
|
||||
|
||||
@@ -98,7 +98,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login_text" v-show="emailStap !== 2">
|
||||
<div class="forget_password_text" @click="changeIsLogin(2)">
|
||||
Forgot your password
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">
|
||||
<label :class="{ active: emailStap == 2 }">
|
||||
<input :state="emailStap" type="checkbox" v-model="checked" />
|
||||
@@ -912,6 +916,7 @@ export default defineComponent({
|
||||
font-weight: bold;
|
||||
color: #030303;
|
||||
margin-top: 3.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.forget_submit_button {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetail.systemList.indexOf(1) > -1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<div v-if="userDetail.systemList.indexOf(1) > -1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1 && scaleImageData.openSource != 0" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
<div v-else class="newScaleImage_right_content_generate">
|
||||
@@ -279,7 +279,7 @@ import fullScreenImg from '@/component/HomePage/fullScreenImg.vue'
|
||||
|
||||
export default defineComponent({
|
||||
components:{fullScreenImg},
|
||||
emits:['deletePorfolio'],
|
||||
emits:['deletePorfolio','uploadLikeAndLook'],
|
||||
setup(props:any,{emit}) {
|
||||
let {t} = useI18n()
|
||||
//首先在setup中定义
|
||||
@@ -332,6 +332,7 @@ export default defineComponent({
|
||||
}
|
||||
scaleImage.value = false
|
||||
imgData.scaleImageIndex = 0
|
||||
emit('uploadLikeAndLook',imgData.scaleImageData)
|
||||
imgData.scaleImageData = {}
|
||||
imgData.commentText = ''
|
||||
imgData.scaleImageList = []
|
||||
|
||||
@@ -251,7 +251,7 @@ import 'swiper/css';
|
||||
import { Pagination } from 'swiper/modules';
|
||||
export default defineComponent({
|
||||
components:{fullScreenImg,Swiper,SwiperSlide},
|
||||
emits:['deletePorfolio','bbb'],
|
||||
emits:['deletePorfolio','uploadLikeAndLook'],
|
||||
setup(props:any,{emit}) {
|
||||
let {t} = useI18n()
|
||||
//首先在setup中定义
|
||||
@@ -304,6 +304,7 @@ export default defineComponent({
|
||||
}
|
||||
scaleImage.value = false
|
||||
imgData.scaleImageIndex = 0
|
||||
emit('uploadLikeAndLook',imgData.scaleImageData)
|
||||
imgData.scaleImageData = {}
|
||||
imgData.commentText = ''
|
||||
imgData.scaleImageList = []
|
||||
|
||||
@@ -285,6 +285,7 @@ export default defineComponent({
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.fi::before{
|
||||
padding: 5px;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="center">{{ selectObject?.styleName?selectObject?.styleName:'All' }}</div>
|
||||
<div class="gallery_btn" @click="setStyle">{{ $t('Habit.Select') }}</div>
|
||||
</div>
|
||||
<!-- <div class="style brand marginBottom">
|
||||
<div class="style brand marginBottom">
|
||||
<div class="text">{{$t('Habit.Brand')}}:</div>
|
||||
<div class="gallery_btn" @click="setBrandDNA">{{ $t('Habit.Select') }}</div>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
:tip-formatter="formatterBrandDNA"
|
||||
>
|
||||
</a-slider>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="position marginBottom" v-show="show.position" v-if="httpWorkflowType == 'SINGLE_DESIGN'">
|
||||
<div class="text">
|
||||
{{$t('Habit.Category')}}:
|
||||
|
||||
@@ -408,9 +408,14 @@ 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.fileList.forEach((listItem:any)=>{
|
||||
if(listItem.id == file.id){
|
||||
listItem.isChecked = true
|
||||
}else{
|
||||
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"
|
||||
|
||||
@@ -810,6 +810,7 @@ export default {
|
||||
jsContent10: "请输入姓",
|
||||
jsContent11: "请输入名字",
|
||||
jsContent12: "邮箱格式不正确",
|
||||
jsContent13: "保存成功~",
|
||||
},
|
||||
frontPage: {
|
||||
BindWechat: "绑定微信",
|
||||
@@ -1283,6 +1284,27 @@ export default {
|
||||
help:'帮助',
|
||||
back:'返回',
|
||||
confirm:'确定',
|
||||
RasterizedLayer:'栅格化图层',
|
||||
rasterizeImmediately:'需要先栅格化才能进行液化操作,是否立即栅格化?',
|
||||
ConfirmRasterization:'确定栅格化',
|
||||
beingRasterized:'正在栅格化',
|
||||
waitRasterizing:'正在栅格化图层,请稍候...',
|
||||
successRasterizing:'图层已成功栅格化,可以进行液化操作',
|
||||
gridingFailed:'栅格化失败',
|
||||
gridingFailedNoOperation:'栅格化失败,无法进行液化操作',
|
||||
gridingError:'栅格化错误',
|
||||
LayerError:'图层错误',
|
||||
LayerDoesNotExist:'图层不存在',
|
||||
backgroundEmpty:'背景图层为空',
|
||||
backgroundEmptyNoliquidation:'背景图层为空,无法进行液化操作',
|
||||
layerEmpty:'图层为空',
|
||||
layerEmptyNoLiquidation:'图层为空,无法进行液化操作',
|
||||
liqueficationManagerError:'液化管理器失败',
|
||||
liqueficationManagerErrorInitialized:'液化初始化失败',
|
||||
liquefactionEnvironment:'准备液化环境',
|
||||
liquefactionEnvironmentLoading:'正在准备液化环境,请稍候...',
|
||||
LiqueficationFailed:'液化工具启动失败',
|
||||
DoubleClickText:'双击编辑文本',
|
||||
},
|
||||
speedList:{
|
||||
High:'高级',
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { en } from "element-plus/es/locales.mjs";
|
||||
|
||||
export default {
|
||||
Header: {
|
||||
hello: "hello",
|
||||
@@ -812,6 +810,7 @@ export default {
|
||||
jsContent10: "Please enter surname",
|
||||
jsContent11: "Please enter givenName",
|
||||
jsContent12: "The email format is incorrect",
|
||||
jsContent13: "Save successfully~",
|
||||
},
|
||||
frontPage: {
|
||||
BindWechat: "Bind Wechat",
|
||||
@@ -1285,6 +1284,27 @@ export default {
|
||||
help:'Help',
|
||||
back:'Back',
|
||||
confirm:'Confirm',
|
||||
RasterizedLayer:'Rasterized Layer',
|
||||
rasterizeImmediately:'You need to rasterize first before performing the distortion operation. Do you want to rasterize immediately?',
|
||||
ConfirmRasterization:'Confirm Rasterization',
|
||||
beingRasterized:'Currently, it is being rasterized.',
|
||||
waitRasterizing:'Rasterizing the layer. Please wait...',
|
||||
successRasterizing:'The layer has been successfully rasterized and can now undergo the distortion operation.',
|
||||
gridingFailed:'Griding Failed',
|
||||
gridingFailedNoOperation:'Griding failed. Unable to perform the liquefaction operation.',
|
||||
gridingError:'Griding Error',
|
||||
LayerError:'Layer Error',
|
||||
LayerDoesNotExist:'The layer does not exist.',
|
||||
backgroundEmpty:'The background layer is empty.',
|
||||
backgroundEmptyNoLiquidation:'The background layer is empty, so the liquidation operation cannot be performed.',
|
||||
layerEmpty:'The layer is empty.',
|
||||
layerEmptyNoLiquidation:'The layer is empty and cannot perform the liquefaction operation.',
|
||||
liqueficationManagerError:'Liquefication Manager Error',
|
||||
liqueficationManagerErrorInitialized:'The liquefaction manager has not been initialized.',
|
||||
liquefactionEnvironment:'Prepare for the liquefaction environment',
|
||||
liquefactionEnvironmentLoading:'The liquefaction environment is being prepared. Please wait a moment...',
|
||||
LiqueficationFailed:'Liquefication tool failed to start.',
|
||||
DoubleClickText:'Double-click to edit the text',
|
||||
},
|
||||
speedList:{
|
||||
High:'High',
|
||||
|
||||
@@ -340,12 +340,12 @@ const navTypeList = (t)=>{
|
||||
value:'Models',
|
||||
router:'library=Models'
|
||||
},
|
||||
// {
|
||||
// icon:'fi-ss-gem',
|
||||
// label:t('LibraryPage.brandDNA'),
|
||||
// value:'MyBrand',
|
||||
// router:'library=MyBrand'
|
||||
// },
|
||||
{
|
||||
icon:'fi-ss-gem',
|
||||
label:t('LibraryPage.brandDNA'),
|
||||
value:'MyBrand',
|
||||
router:'library=MyBrand'
|
||||
},
|
||||
]
|
||||
},
|
||||
// history:{
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<img v-show="isNoData && isNull" src="@/assets/images/homePage/null_img.png">
|
||||
</div>
|
||||
|
||||
<newScaleImage ref="newScaleImage" @deletePorfolio="deletePorfolio"></newScaleImage>
|
||||
<newScaleImageMobile ref="newScaleImageMobile" @deletePorfolio="deletePorfolio"></newScaleImageMobile>
|
||||
<newScaleImage ref="newScaleImage" @deletePorfolio="deletePorfolio" @uploadLikeAndLook="uploadLikeAndLook"></newScaleImage>
|
||||
<newScaleImageMobile ref="newScaleImageMobile" @deletePorfolio="deletePorfolio" @uploadLikeAndLook="uploadLikeAndLook"></newScaleImageMobile>
|
||||
<!-- <RobotAssist></RobotAssist> -->
|
||||
|
||||
</div>
|
||||
@@ -286,6 +286,16 @@ export default defineComponent({
|
||||
// { root:worksPage }
|
||||
).observe(imgParent);
|
||||
}
|
||||
const uploadLikeAndLook = (selectData:any)=>{
|
||||
for (let i = 0; i < fall.value.list.length; i++) {
|
||||
let item = fall.value.list[i]
|
||||
if (item.id === selectData.id) {
|
||||
item.likeNum = selectData.likeNum
|
||||
item.viewNums = selectData.viewNums
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
watch(() => route.query,
|
||||
(query, oldQuery) => {
|
||||
if(oldQuery && query?.works == oldQuery?.works)return
|
||||
@@ -370,6 +380,7 @@ export default defineComponent({
|
||||
setprintModel,
|
||||
setPortfolioLike,
|
||||
deletePorfolio,
|
||||
uploadLikeAndLook,
|
||||
}
|
||||
},
|
||||
async mounted(){
|
||||
|
||||
Reference in New Issue
Block a user