+
+
+
+
{{ $props.text }}
@@ -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{
diff --git a/src/component/LoginPage/login/enterprise.vue b/src/component/LoginPage/login/enterprise.vue
index f5fd7522..a5391b45 100644
--- a/src/component/LoginPage/login/enterprise.vue
+++ b/src/component/LoginPage/login/enterprise.vue
@@ -105,7 +105,7 @@
I agree to the
Terms,
- Privacy Policy,
+ Privacy Policy,
and Fees.
diff --git a/src/component/LoginPage/login/personal.vue b/src/component/LoginPage/login/personal.vue
index 20a1f7ae..8afe7b59 100644
--- a/src/component/LoginPage/login/personal.vue
+++ b/src/component/LoginPage/login/personal.vue
@@ -88,7 +88,7 @@
I agree to the
Terms,
- Privacy Policy,
+ Privacy Policy,
and Fees.
diff --git a/src/component/LoginPage/login/school.vue b/src/component/LoginPage/login/school.vue
index 7435cc00..60ca77d5 100644
--- a/src/component/LoginPage/login/school.vue
+++ b/src/component/LoginPage/login/school.vue
@@ -105,7 +105,7 @@
I agree to the
Terms,
- Privacy Policy,
+ Privacy Policy,
and Fees.
diff --git a/src/component/WorksPage/newScaleImage.vue b/src/component/WorksPage/newScaleImage.vue
index 87573f2d..49b1caad 100644
--- a/src/component/WorksPage/newScaleImage.vue
+++ b/src/component/WorksPage/newScaleImage.vue
@@ -440,8 +440,13 @@ export default defineComponent({
if(userDetail.value.systemList.indexOf(1) == -1){
return message.info(t('newScaleImage.jsContent1'))
}
- return message.info(t('newScaleImage.jsContent2'))
+ 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'))
}
diff --git a/src/lang/cn.ts b/src/lang/cn.ts
index ded270bc..1c196e21 100644
--- a/src/lang/cn.ts
+++ b/src/lang/cn.ts
@@ -583,6 +583,7 @@ export default {
jsContent2: "上传的文件不会保存,是否继续? ",
jsContent3: "您必须选择一种或多种颜色进行下一步。",
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个,这可能会导致一些已钉住的项目未被使用。您是否仍要继续?",
+ jsContent6: "画布内容没有保存,请点击预保存后继续。",
},
DesignDetail: {
Details: "详情",
@@ -751,7 +752,8 @@ export default {
editUser: "修改个人信息",
notModifiable: "没有修改次数",
remainingModifications: "本月剩余次数:",
- Country: "国家",
+ plaseSelect:"请选择",
+ Country: "国家或地区",
CompanyName: "职业",
Status: "状态",
Valid: "有效",
@@ -1348,5 +1350,16 @@ export default {
jsContent1:'邮箱格式有误',
jsContent2:'请检查所有带 * 号的内容',
jsDelete:'确定删除这一项吗',
+ Design:'设计',
+ SingleDesign:'单品设计',
+ MoodBoard:'情绪版',
+ PrintBoard:'印花板',
+ SketchBoard:'线稿板',
+ Pattern:'设计',
+ Logo:'标志',
+ Slogan:'标语',
+ ToProductImage:'产品图',
+ Relight:'打光',
+ ChatRobot:'对话生成',
},
};
diff --git a/src/lang/en.ts b/src/lang/en.ts
index 0928c6d4..b770ca3c 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -585,6 +585,7 @@ 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.',
},
DesignDetail: {
Details: "Details",
@@ -753,7 +754,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",
@@ -1350,5 +1352,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',
},
};
diff --git a/src/store/Detail/designDetail.ts b/src/store/Detail/designDetail.ts
index adcd1886..dbae1ece 100644
--- a/src/store/Detail/designDetail.ts
+++ b/src/store/Detail/designDetail.ts
@@ -74,6 +74,7 @@ const DesignDetail : Module
= {
state.frontBack.back = back
},
updataDetailItem(state,data){
+ console.log(data)
state.designDetail.clothes.forEach((item:any) => {
if(item.id == state.selectDetail.id){
for (const key in data) {
@@ -230,7 +231,7 @@ const DesignDetail : Module = {
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,
@@ -256,7 +257,7 @@ const DesignDetail : Module = {
})
if(state.currentDetailType != 'models'){
state.selectDetail.change = item.change
- if(state.selectDetail?.newDetail?.color){
+ if(state.selectDetail?.newDetail?.color && currentType != 'color'){
state.selectDetail.color = state.selectDetail?.newDetail?.color
state.selectDetail.newDetail.color = null
}
@@ -273,12 +274,20 @@ const DesignDetail : Module = {
state.selectDetail.printObject = item.printObject
state.selectDetail.trims = item.trims
state.selectDetail.type = item.type
+ state.selectDetail.color = {
+ ...item.color,
+ rgba:{
+ r:item.color?.r,
+ g:item.color?.g,
+ b:item.color?.b,
+ }
+ }
state.selectDetail.undividedLayer = item.undividedLayer
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])delete state.selectDetail.newDetail[currentType]
+ if(currentType)if(state.selectDetail.newDetail?.[currentType] && currentType != 'color')delete state.selectDetail.newDetail[currentType]
}
}
if(value.fun)value.fun()
diff --git a/src/tool/https.js b/src/tool/https.js
index b20e8b98..139c3b9a 100644
--- a/src/tool/https.js
+++ b/src/tool/https.js
@@ -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);
diff --git a/src/views/HomeView/library.vue b/src/views/HomeView/library.vue
index f858ef3a..56da44fd 100644
--- a/src/views/HomeView/library.vue
+++ b/src/views/HomeView/library.vue
@@ -357,7 +357,7 @@
-
+