Merge branch 'StableVersion' of http://18.167.251.121:10003/aidlab/aida_front into StableVersion
This commit is contained in:
@@ -1989,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;
|
||||
@@ -2314,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;
|
||||
|
||||
@@ -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;
|
||||
@@ -2200,6 +2200,8 @@ textarea:focus{
|
||||
top: 0rem;
|
||||
flex: 1;
|
||||
border: 1px solid #dcdfe6;
|
||||
width: calc(var(--width) + 6rem);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
// span{
|
||||
|
||||
@@ -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">{{ $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;
|
||||
pointer-events: none;
|
||||
}
|
||||
#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%;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -298,7 +298,11 @@ 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}`:''
|
||||
detailData.selectDetail.maskUrl = ''
|
||||
@@ -307,8 +311,8 @@ export default defineComponent({
|
||||
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,
|
||||
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]?.maskMinioUrl,
|
||||
// maskUrl:'',
|
||||
maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl,
|
||||
@@ -319,19 +323,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((list[i].color?.gradient || list[i].newDetail?.color?.gradient) && !detailData.isEditPattern.value){
|
||||
gradient = list[i].newDetail?.color?.gradient || list[i].color.gradient
|
||||
gradient.colorImg = await setGradual(gradient,320,700)
|
||||
data.gradient = gradient
|
||||
@@ -374,6 +378,7 @@ export default defineComponent({
|
||||
delete detailData.designDetail.newModel
|
||||
store.commit('DesignDetail/setPraeview',value)
|
||||
detailData.loadingShow = false
|
||||
canvasReload()
|
||||
// setRevocation()
|
||||
}).catch(res=>{
|
||||
detailData.loadingShow = false
|
||||
@@ -387,7 +392,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:'',
|
||||
|
||||
@@ -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="{
|
||||
@@ -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');
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
@@ -236,38 +236,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){
|
||||
|
||||
@@ -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(() => {
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -88,7 +88,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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'))
|
||||
}
|
||||
|
||||
@@ -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:'对话生成',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -74,6 +74,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
||||
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<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,
|
||||
@@ -256,7 +257,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
||||
})
|
||||
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<DesignDetail,RootState> = {
|
||||
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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user