Merge branch 'StableVersion' of http://18.167.251.121:10003/aidlab/aida_front into StableVersion

This commit is contained in:
李志鹏
2025-09-25 13:52:20 +08:00
26 changed files with 548 additions and 446 deletions

View File

@@ -1989,7 +1989,7 @@ textarea:focus {
display: flex; display: flex;
float: left; float: left;
align-items: center; align-items: center;
padding: 1.5rem 2rem; padding: 1rem 2rem;
background-color: #fff; background-color: #fff;
flex: 1; flex: 1;
height: auto; height: auto;
@@ -2314,6 +2314,8 @@ textarea:focus {
top: 0rem; top: 0rem;
flex: 1; flex: 1;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
} }
.generage_btn_box { .generage_btn_box {
position: relative; position: relative;

View File

@@ -2057,7 +2057,7 @@ textarea:focus{
display: flex; display: flex;
float: left; float: left;
align-items: center; align-items: center;
padding: 1.5rem 2rem; padding: 1rem 2rem;
// padding-right: 0; // padding-right: 0;
background-color: #fff; background-color: #fff;
flex: 1; flex: 1;
@@ -2200,6 +2200,8 @@ textarea:focus{
top: 0rem; top: 0rem;
flex: 1; flex: 1;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
width: calc(var(--width) + 6rem);
padding: 1rem;
} }
// span{ // span{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -79,12 +79,23 @@
style="width: 220px" style="width: 220px"
/> />
</div> </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">
<!-- <div class="admin_state_item" > --> <!-- <div class="admin_state_item" > -->
<span>End Time: <span>*</span></span> <span>End Time: <span>*</span></span>
<a-space direction="vertical" style="width: 220px"> <a-space direction="vertical" style="width: 220px">
<a-date-picker <a-date-picker
v-model:value="rangePickerValue" v-model:value="endTime"
:disabled="title != 'Add'" :disabled="title != 'Add'"
style="width: 220px" style="width: 220px"
/> />
@@ -128,9 +139,9 @@
<div class="mark_loading" v-show="loadingShow"> <div class="mark_loading" v-show="loadingShow">
<a-spin size="large" /> <a-spin size="large" />
</div> </div>
</template> </template>
<script> <script>
import { import {
defineComponent, defineComponent,
ref, ref,
reactive, reactive,
@@ -138,14 +149,14 @@ import {
onMounted, onMounted,
nextTick, nextTick,
toRefs, toRefs,
} from "vue"; } from "vue";
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue"; import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { formatTime, isEmail } from "@/tool/util"; import { formatTime, isEmail } from "@/tool/util";
import dayjs, { Dayjs } from "dayjs"; import dayjs, { Dayjs } from "dayjs";
import md5 from "md5"; import md5 from "md5";
export default defineComponent({ export default defineComponent({
components: {}, components: {},
emits: ["searchHistoryList"], emits: ["searchHistoryList"],
setup(props, { emit }) { setup(props, { emit }) {
@@ -156,7 +167,8 @@ export default defineComponent({
title: "", title: "",
}); });
let operationsData = reactive({ let operationsData = reactive({
rangePickerValue: "", endTime: "",
startTime: "",
percentOff: "", percentOff: "",
commissionRate: "", commissionRate: "",
maxRedemptions: "", maxRedemptions: "",
@@ -178,12 +190,28 @@ export default defineComponent({
operationsData.cooperator = data.cooperator; operationsData.cooperator = data.cooperator;
operationsData.paidCommission = data.paidCommission; operationsData.paidCommission = data.paidCommission;
operationsData.remark = data.remark; operationsData.remark = data.remark;
operationsData.rangePickerValue = dayjs( operationsData.endTime = dayjs(
new Date(data.redeemBy * 1000).toISOString().split("T")[0], new Date(data.redeemBy * 1000).toLocaleDateString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit'
}).replace(/\//g, '/'),
"YYYY/MM/DD" "YYYY/MM/DD"
); );
// 确保格式一致
// operationsData.rangePickerValue='2024-08-05T00:00:06' // 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.validEndTime='2024-08-05T00:00:06'
// operationsData.commissionRate = data.commissionRate // operationsData.commissionRate = data.commissionRate
// operationsData.maxRedemptions = data.maxRedemptions // operationsData.maxRedemptions = data.maxRedemptions
@@ -192,20 +220,23 @@ export default defineComponent({
} }
}; };
let setAddData = () => { let setAddData = () => {
const timestampMs = const emdTimeMs =
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳 new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
const startTimeMs =
new Date(operationsData.startTime).getTime() / 1000; // 直接获取毫秒时间戳
return { return {
percentOff: operationsData.percentOff, percentOff: operationsData.percentOff,
maxRedemptions: operationsData.maxRedemptions, maxRedemptions: operationsData.maxRedemptions,
commissionRate: operationsData.commissionRate, commissionRate: operationsData.commissionRate,
timestamp: timestampMs, endTime: emdTimeMs,
startTime: startTimeMs,
cooperator: operationsData.cooperator, cooperator: operationsData.cooperator,
remark: operationsData.remark, remark: operationsData.remark,
}; };
}; };
let setEditData = () => { let setEditData = () => {
const timestampMs = const timestampMs =
new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳 new Date(operationsData.endTime).getTime() / 1000; // 直接获取毫秒时间戳
return { return {
id: operationsData.id, id: operationsData.id,
paidCommission: operationsData.commissionRate, paidCommission: operationsData.commissionRate,
@@ -214,7 +245,8 @@ export default defineComponent({
}; };
}; };
let cancelDsign = () => { let cancelDsign = () => {
operationsData.rangePickerValue = ""; operationsData.endTime = "";
operationsData.startTime = "";
operationsData.percentOff = ""; operationsData.percentOff = "";
operationsData.commissionRate = ""; operationsData.commissionRate = "";
operationsData.maxRedemptions = ""; operationsData.maxRedemptions = "";
@@ -228,7 +260,7 @@ export default defineComponent({
let data; let data;
if (operations.title == "Add") { if (operations.title == "Add") {
data = setAddData(); data = setAddData();
if (!data.commissionRate || !data.timestamp || !data.percentOff) if (!data.commissionRate || !data.startTime || !data.percentOff || !data.endTime)
return message.warning("Please check the input box marked with *"); return message.warning("Please check the input box marked with *");
Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => { Https.axiosPost(Https.httpUrls.createCoupon, data).then((rv) => {
if (rv) { if (rv) {
@@ -263,18 +295,18 @@ export default defineComponent({
}, },
mounted() {}, mounted() {},
methods: {}, methods: {},
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.allUserPoeration_modal) { :deep(.allUserPoeration_modal) {
.ant-modal-body { .ant-modal-body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.allUserPoeration_modal { .allUserPoeration_modal {
.closeIcon { .closeIcon {
z-index: 2; z-index: 2;
} }
@@ -294,5 +326,6 @@ export default defineComponent({
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
} }
} }
</style> </style>

View File

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

View File

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

View File

@@ -298,7 +298,11 @@ export default defineComponent({
// 0.35822305 // 0.35822305
// ] // ]
let isCurrent = list[i].id == detailData?.selectDetail?.id 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){ 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.maskUrl = ''
@@ -307,8 +311,8 @@ export default defineComponent({
let data:any = { let data:any = {
changed:false, changed:false,
color, color,
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.designType:list[i].designType, designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.designType:list[i].designType,
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.id:list[i].id, id:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.id:list[i].id,
maskMinioUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskMinioUrl, maskMinioUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskMinioUrl,
// maskUrl:'', // maskUrl:'',
maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl, maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl,
@@ -319,19 +323,19 @@ export default defineComponent({
offset, offset,
partialDesign:list[i].partialDesign || {}, partialDesign:list[i].partialDesign || {},
// partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{}, // partialDesign:detailData.isEditPattern.value?list[i].partialDesign:{},
path:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.minIOPath:list[i].minIOPath, path:(newData && detailData.currentDetailType == 'sketch' && isCurrent && !detailData.isEditPattern.value)?newData.minIOPath:list[i].minIOPath,
printObject:(newData && detailData.currentDetailType == 'print' && isCurrent)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]}, printObject:(newData && detailData.currentDetailType == 'print' && isCurrent && !detailData.isEditPattern.value)?{prints:newData}:list[i].printObject?list[i].printObject:{prints:[]},
priority, priority,
// scale:[ // scale:[
// 0.5, // 0.5,
// 0.35822305 // 0.35822305
// ], // ],
scale:[scale[0]?scale[0]:1,scale[1]?scale[1]:1], 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:'', 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((list[i].color?.gradient || list[i].newDetail?.color?.gradient) && !detailData.isEditPattern.value){
gradient = 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) gradient.colorImg = await setGradual(gradient,320,700)
data.gradient = gradient data.gradient = gradient
@@ -374,6 +378,7 @@ export default defineComponent({
delete detailData.designDetail.newModel delete detailData.designDetail.newModel
store.commit('DesignDetail/setPraeview',value) store.commit('DesignDetail/setPraeview',value)
detailData.loadingShow = false detailData.loadingShow = false
canvasReload()
// setRevocation() // setRevocation()
}).catch(res=>{ }).catch(res=>{
detailData.loadingShow = false detailData.loadingShow = false
@@ -387,7 +392,7 @@ export default defineComponent({
designSingleItemDTOList:clothes, designSingleItemDTOList:clothes,
isPreview:false, isPreview:false,
// ifSubmit:designItemDetail.isPreview, // ifSubmit:designItemDetail.isPreview,
gender:workspace?.sex == 'Male'?1:0, gender:workspace?.sex,
sketchString:'', sketchString:'',
modelId:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.id:detailData.designDetail.oldModel?detailData.designDetail.oldModel.id:'', 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:'', modelType:(detailData.currentDetailType == 'models' && detailData.designDetail.newModel)?detailData.designDetail.newModel.type:detailData.designDetail.oldModel?detailData.designDetail.oldModel.type:'',

View File

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

View File

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

View File

@@ -236,38 +236,41 @@ export default defineComponent({
// } // }
} }
const itemMoveMousedown = async (index:any,e:any)=>{ const itemMoveMousedown = async (index:any,e:any)=>{
if(detailData.selectDetail.id != detailData.frontBack.front[index].id)return
let isOpen = false let isOpen = false
let isModal = false let isModal = false
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
if( // if(
detailData.isEditPattern.value && // detailData.isEditPattern.value &&
selectItem.selectDetail?.id && // selectItem.selectDetail?.id &&
(detailData.frontBack.front[index].id != selectItem.selectDetail.id) // (detailData.frontBack.front[index].id != selectItem.selectDetail.id)
){ // ){
isModal = true // isModal = true
Modal.confirm({ // Modal.confirm({
title: t('collectionModal.jsContent2'), // title: t('collectionModal.jsContent2'),
icon: createVNode(ExclamationCircleOutlined), // icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes', // okText: 'Yes',
cancelText: 'No', // cancelText: 'No',
mask:false, // mask:false,
centered:true, // centered:true,
onOk() { // 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) resolve(true)
isOpen = true isOpen = true
},
onCancel(){
resolve(false)
isOpen = false
}
});
}else{
if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
isOpen = true
}
resolve(true)
isModal = false
}
}).then((rv)=>{ }).then((rv)=>{
}) })
if(isOpen){ if(isOpen){

View File

@@ -338,7 +338,7 @@ export default defineComponent({
speed.speedData.value = '' speed.speedData.value = ''
speed.speedData.label = '' speed.speedData.label = ''
}else{ }else{
if(newVal.value == "Pattern"){ if(newVal.value == "Pattern" || props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1] speed.speedData = speed.speedList[1]
}else{ }else{
speed.speedData = speed.speedList[0] speed.speedData = speed.speedList[0]
@@ -350,6 +350,9 @@ export default defineComponent({
} }
onMounted(() => { onMounted(() => {
instance.appContext.config.globalProperties.$dropdownEvents.onClose(removeOpenSpeed) instance.appContext.config.globalProperties.$dropdownEvents.onClose(removeOpenSpeed)
if(props.msg == 'Sketchboard'){
speed.speedData = speed.speedList[1]
}
}) })
onUnmounted(() => { onUnmounted(() => {
@@ -1008,6 +1011,7 @@ export default defineComponent({
this.searchPictureName = ""; this.searchPictureName = "";
}, },
onPaste(e:any){ 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'){ if(e.clipboardData.files[0] && !this.isTextarea && this.upload.level1Type !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData(); let param = new FormData();
param.append('inPin','0') param.append('inPin','0')

View File

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

View File

@@ -1,9 +1,10 @@
<template> <template>
<div class="Container"> <div class="Container">
<!-- 谷歌登录 --> <!-- 谷歌登录 -->
<!-- <div class="g_id_signin" id="g_id_signin"> <div class="g_id_signin" id="g_id_signin">
</div> --> </div>
<div class="icon" @click="toGmailLogin" style="opacity: .7;"> <!-- <div class="icon" @click="toGmailLogin"> -->
<div class="icon">
<img src="@/assets/images/loginPage/gmailIcon.svg" alt=""> <img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
<span>{{ $props.text }}</span> <span>{{ $props.text }}</span>
</div> </div>
@@ -25,8 +26,33 @@
}, },
setup(props, { emit }) { setup(props, { emit }) {
const {t} = useI18n() 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) => { const handleCredentialResponse = async (response) => {
// 获取回调响应的凭证数据 然后拿这个凭证给后台后台jwt进行解析获取登录信息 // 获取回调响应的凭证数据 然后拿这个凭证给后台后台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 let code = response.credential
emit('googelLogin',code) emit('googelLogin',code)
window.isAddGmail = false window.isAddGmail = false
@@ -36,10 +62,10 @@
scriptSrc:'https://accounts.google.com/gsi/client', scriptSrc:'https://accounts.google.com/gsi/client',
script:null script:null
}) })
console.log() console.log(import.meta.env.VITE_USER_NODE_ENV)
let GOOGLE_CLIENT_ID let GOOGLE_CLIENT_ID
if(import.meta.env.VITE_USER_NODE_ENV == 'development'){ 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{ }else{
GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com' GOOGLE_CLIENT_ID = '29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com'
} }
@@ -51,11 +77,11 @@
window.isAddGmail = true window.isAddGmail = true
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
const script = document.createElement("script"); const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{ script.onload=()=>{
resolve() resolve()
} }
document.body.appendChild(script); document.body.appendChild(script);
script.src = data.scriptSrc
}) })
} }
window.google.accounts.id.initialize({ window.google.accounts.id.initialize({
@@ -67,6 +93,7 @@
ux_mode:"popup", ux_mode:"popup",
itp_support:true, itp_support:true,
}); });
console.log(document.querySelector('.Container #g_id_signin'))
window.google.accounts.id.renderButton( window.google.accounts.id.renderButton(
document.querySelector('.Container #g_id_signin'), document.querySelector('.Container #g_id_signin'),
{ {
@@ -79,7 +106,6 @@
} }
} }
const toGmailLogin = ()=>{ const toGmailLogin = ()=>{
console.log(12312)
message.info(t('account.canNotUtilize')) message.info(t('account.canNotUtilize'))
} }
onBeforeUnmount(()=>{ onBeforeUnmount(()=>{
@@ -90,7 +116,7 @@
} }
}) })
onMounted(()=>{ onMounted(()=>{
// createGmailLogin() createGmailLogin()
}) })
return { return {
toGmailLogin, toGmailLogin,
@@ -121,7 +147,6 @@
// width: 100%; // width: 100%;
// height: 100%; // height: 100%;
// } // }
// } // }
.icon{ .icon{
// width: 40px; // width: 40px;
@@ -135,7 +160,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background: transparent; background: transparent;
// pointer-events: none; pointer-events: none;
background-color: #f5f5f5; background-color: #f5f5f5;
@media (max-width: 768px) { @media (max-width: 768px) {
border-radius: 2.5rem; border-radius: 2.5rem;
@@ -165,15 +190,20 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; // overflow: hidden;
top: 0; top: 0;
left: 0; left: 0;
opacity: 0; // opacity: 0;
.S9gUrf-YoZ4jf{ .S9gUrf-YoZ4jf{
} }
:deep(.S9gUrf-YoZ4jf){ :deep(.S9gUrf-YoZ4jf){
width: 100%; width: 100%;
height: 100%; height: 100%;
iframe{
zoom: 3;
}
} }
} }
&:hover{ &:hover{

View File

@@ -105,7 +105,7 @@
<span> <span>
I agree to the 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="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. and Fees.
</span> </span>
</label> </label>

View File

@@ -88,7 +88,7 @@
<span> <span>
I agree to the 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="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. and Fees.
</span> </span>
</label> </label>

View File

@@ -105,7 +105,7 @@
<span> <span>
I agree to the 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="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. and Fees.
</span> </span>
</label> </label>

View File

@@ -440,8 +440,13 @@ export default defineComponent({
if(userDetail.value.systemList.indexOf(1) == -1){ if(userDetail.value.systemList.indexOf(1) == -1){
return message.info(t('newScaleImage.jsContent1')) 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){ if(imgData.scaleImageData.openSource == 0){
return message.info(t('newScaleImage.jsContent2')) return message.info(t('newScaleImage.jsContent2'))
} }

View File

@@ -583,6 +583,7 @@ export default {
jsContent2: "上传的文件不会保存,是否继续? ", jsContent2: "上传的文件不会保存,是否继续? ",
jsContent3: "您必须选择一种或多种颜色进行下一步。", jsContent3: "您必须选择一种或多种颜色进行下一步。",
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续", jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续",
jsContent6: "画布内容没有保存,请点击预保存后继续。",
}, },
DesignDetail: { DesignDetail: {
Details: "详情", Details: "详情",
@@ -751,7 +752,8 @@ export default {
editUser: "修改个人信息", editUser: "修改个人信息",
notModifiable: "没有修改次数", notModifiable: "没有修改次数",
remainingModifications: "本月剩余次数:", remainingModifications: "本月剩余次数:",
Country: "国家", plaseSelect:"请选择",
Country: "国家或地区",
CompanyName: "职业", CompanyName: "职业",
Status: "状态", Status: "状态",
Valid: "有效", Valid: "有效",
@@ -1348,5 +1350,16 @@ export default {
jsContent1:'邮箱格式有误', jsContent1:'邮箱格式有误',
jsContent2:'请检查所有带 * 号的内容', jsContent2:'请检查所有带 * 号的内容',
jsDelete:'确定删除这一项吗', jsDelete:'确定删除这一项吗',
Design:'设计',
SingleDesign:'单品设计',
MoodBoard:'情绪版',
PrintBoard:'印花板',
SketchBoard:'线稿板',
Pattern:'设计',
Logo:'标志',
Slogan:'标语',
ToProductImage:'产品图',
Relight:'打光',
ChatRobot:'对话生成',
}, },
}; };

View File

@@ -585,6 +585,7 @@ export default {
jsContent2: "The uploaded files will not be saved, being sure to continue? ", jsContent2: "The uploaded files will not be saved, being sure to continue? ",
jsContent3: "You must choose one or more colors for further process.", 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?", 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: { DesignDetail: {
Details: "Details", Details: "Details",
@@ -753,7 +754,8 @@ export default {
editUser: "Change Information", editUser: "Change Information",
notModifiable: "Not modifiable", notModifiable: "Not modifiable",
remainingModifications: "Remaining this month:", remainingModifications: "Remaining this month:",
Country: "Country", plaseSelect:"Please select",
Country: "Country or Region",
CompanyName: "Occupation", CompanyName: "Occupation",
Status: "Status", Status: "Status",
Valid: "Valid", Valid: "Valid",
@@ -1350,5 +1352,16 @@ export default {
jsContent1:'The email format is incorrect', jsContent1:'The email format is incorrect',
jsContent2:'Please check the input box marked with *', jsContent2:'Please check the input box marked with *',
jsDelete:'Are you sure you want to delete this item?', 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

@@ -74,6 +74,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
state.frontBack.back = back state.frontBack.back = back
}, },
updataDetailItem(state,data){ updataDetailItem(state,data){
console.log(data)
state.designDetail.clothes.forEach((item:any) => { state.designDetail.clothes.forEach((item:any) => {
if(item.id == state.selectDetail.id){ if(item.id == state.selectDetail.id){
for (const key in data) { for (const key in data) {
@@ -230,7 +231,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
left:item.layersObject[i].position?.[1] * scale + 'px', left:item.layersObject[i].position?.[1] * scale + 'px',
width:item.layersObject[i].imageSize?.[0] * scale + 'px', width:item.layersObject[i].imageSize?.[0] * scale + 'px',
height:item.layersObject[i].imageSize?.[1] * 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={ item.layersObject[i].centers={
left:0, left:0,
@@ -256,7 +257,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
}) })
if(state.currentDetailType != 'models'){ if(state.currentDetailType != 'models'){
state.selectDetail.change = item.change 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.color = state.selectDetail?.newDetail?.color
state.selectDetail.newDetail.color = null state.selectDetail.newDetail.color = null
} }
@@ -273,12 +274,20 @@ const DesignDetail : Module<DesignDetail,RootState> = {
state.selectDetail.printObject = item.printObject state.selectDetail.printObject = item.printObject
state.selectDetail.trims = item.trims state.selectDetail.trims = item.trims
state.selectDetail.type = item.type 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 state.selectDetail.undividedLayer = item.undividedLayer
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){ if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
state.designDetail.clothes.push(state.selectDetail) state.designDetail.clothes.push(state.selectDetail)
} }
state.selectDetail.id = item.id 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() if(value.fun)value.fun()

View File

@@ -38,19 +38,7 @@ const CancelToken = axios.CancelToken;
const source = CancelToken.source(); const source = CancelToken.source();
// console.log(import.meta.env.VITE_APP_BASE_URL); // console.log(import.meta.env.VITE_APP_BASE_URL);
let isLoginTime = false 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传参序列化(添加请求拦截器) //POST传参序列化(添加请求拦截器)
axios.interceptors.request.use((config) => { axios.interceptors.request.use((config) => {
//在发送请求之前做某件事 //在发送请求之前做某件事
@@ -63,23 +51,7 @@ axios.interceptors.request.use((config) => {
// config.data = JSON.stringify(config.data); // config.data = JSON.stringify(config.data);
} }
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA'; // 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'); config.headers.Authorization = getCookie('token');
}else{
config.headers.Authorization = '';
}
return config; return config;
},(error) =>{ },(error) =>{
return Promise.reject(error); return Promise.reject(error);

View File

@@ -357,7 +357,7 @@
</i> </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="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-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>
<div class="input_box_btnBox sketch" v-else> <div class="input_box_btnBox sketch" v-else>
<div class="upload_item" v-show="selectGenerateList.length > 0"> <div class="upload_item" v-show="selectGenerateList.length > 0">
@@ -857,7 +857,6 @@ export default defineComponent({
dataDom.createBrand.openAddBrand() dataDom.createBrand.openAddBrand()
} }
const editImg = (item:any,index:number)=>{ const editImg = (item:any,index:number)=>{
console.log(item)
pageData.editIndex = index pageData.editIndex = index
dataDom.modalCanvas.init(item,'') dataDom.modalCanvas.init(item,'')
// imgList // imgList
@@ -995,7 +994,7 @@ export default defineComponent({
label:'' label:''
} }
}else{ }else{
if(newVal.value == "Pattern"){ if(newVal.value == "Pattern" || this.selectCode == 'Sketchboard'){
this.speedData = this.speedList[1] this.speedData = this.speedList[1]
}else{ }else{
this.speedData = this.speedList[0] this.speedData = this.speedList[0]
@@ -1935,6 +1934,7 @@ export default defineComponent({
scaleImage.init(list,index) scaleImage.init(list,index)
}, },
onPaste(e:any){ 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'){ if(e.clipboardData.files[0] && !this.isTextarea && this.selectCode !== 'Moodboard' && this.scene?.value != 'Slogan' && this.scene?.value != 'Logo'){
let param = new FormData(); let param = new FormData();
param.append('inPin','0') param.append('inPin','0')