This commit is contained in:
X1627315083
2024-12-18 17:38:43 +08:00
90 changed files with 3220 additions and 865 deletions

View File

@@ -5,9 +5,8 @@ NODE_ENV = 'development'
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VUE_APP_BASE_URL = 'https://www.api.aida.com.hk'
#
VUE_APP_BASE_URL = 'http://192.168.1.4:5567'
#
# VUE_APP_BASE_URL = 'http://192.168.1.4:5567'
# 海波
# VUE_APP_BASE_URL = 'http://18.167.251.121:15567'
# VUE_APP_BASE_URL = 'http://192.168.1.6:5567'
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -0,0 +1,18 @@
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_537_3867)">
<mask id="mask0_537_3867" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="50" height="50">
<path d="M50 0H0V50H50V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_537_3867)">
<path d="M10.4143 25.186C10.4143 23.552 10.689 21.9857 11.1769 20.5169L2.61091 14.0449C0.887829 17.5063 -0.00607483 21.3202 3.10708e-05 25.186C3.10708e-05 29.1896 0.937897 32.9657 2.60603 36.3185L11.1696 29.8355C10.6695 28.3363 10.4155 26.7663 10.4143 25.186Z" fill="#FBBC05"/>
</g>
<path d="M25.4614 10.3262C28.874 10.3195 32.1846 11.4894 34.834 13.6388L42.2405 6.32383C37.7276 2.43915 31.9416 0.0366211 25.4614 0.0366211C15.4001 0.0366211 6.75174 5.72914 2.61133 14.045L11.1834 20.517C13.1568 14.5884 18.784 10.3256 25.4639 10.3256" fill="#EA4335"/>
<path d="M25.5704 39.7145C18.8551 39.7145 13.2004 35.4785 11.2148 29.5859L2.60547 36.0189C6.76603 44.2835 15.4566 49.9382 25.5704 49.9382C31.8094 49.9382 37.7663 47.7724 42.2395 43.7102L34.0649 37.5291C31.7605 38.949 28.8553 39.7151 25.5679 39.7151" fill="#34A853"/>
<path d="M49.9922 24.9489C49.9922 23.4723 49.7584 21.8809 49.4109 20.4043H25.5674V30.0602H39.2904C38.6065 33.3526 36.7393 35.8838 34.0662 37.53L42.2389 43.7111C46.9374 39.4477 49.9922 33.0958 49.9922 24.9489Z" fill="#4285F4"/>
</g>
<defs>
<clipPath id="clip0_537_3867">
<rect width="50" height="50" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -4,7 +4,11 @@
"id": 1,
"title":"Just post your design work, you could have the chance to come to Hong Kong and interact with industry leaders face-to-face",
"imgUrl": "/image/events/workshop-En.jpg"
}
},{
"id": 2,
"title":"AiDA X SFT AI Fashion Award 2024",
"imgUrl": "/image/events/Fashion-Award-2024.png"
}
],
"eventsItem":[
{
@@ -64,6 +68,26 @@
]
}
]
}
},
{
"id":2,
"title":"AiDA X SFT AI Fashion Award 2024",
"imgUrl": "/image/events/Fashion-Award-2024.png",
"textList":[
{
"paragraph":[
{
"text":"With the aim of inspiring students to innovate in fashion design using AI, Code-Create and The Hong Kong Polytechnic University School of Fashion and Textiles (SFT) have jointly launched the 'AiDA X SFT AI Fashion Award 2024'. This competition provides students with valuable practical AiDA experience, laying the foundation for the future fashion design industry and positioning them as pioneers in AI fashion."
}
]
},{
"paragraph":[
{
"text":"The competition is open to all SFT students, with the winners having the chance to win cash prizes (up to 20,000 HKD), internship opportunity at BESFXXK (will work with the renowned designer, Mr Jae Hyuk Lim, for the BESFXXK collection, that will be featured at NY Fashion Week and Paris Fashion Week) and more surprises! Scan the QR code to learn more."
}
]
}
]
}
]
}

View File

@@ -4,6 +4,10 @@
"id": 1,
"title":"什么?只要发布设计作品就有机会来香港与大佬面对面交流?!",
"imgUrl": "/image/events/workshop-Cn.jpg"
},{
"id": 2,
"title":"AiDA X SFT AI时尚设计比赛2024",
"imgUrl": "/image/events/Fashion-Award-2024.png"
}
],
"eventsItem":[
@@ -64,6 +68,26 @@
]
}
]
},
{
"id":2,
"title":"AiDA X SFT AI时尚设计比赛2024",
"imgUrl": "/image/events/Fashion-Award-2024.png",
"textList":[
{
"paragraph":[
{
"text":"秉承着激发学生使用AI进行时尚设计的创新能力的初衷Code-Create和香港理工大学时装及纺织学院SFT共同举办了“AiDA X SFT AI时尚设计比赛2024”让学生们在比赛中获得宝贵的AiDA实践经验为未来的时尚设计行业打下了坚实的基础成为时尚界的AI先锋。"
}
]
},{
"paragraph":[
{
"text":" 此次比赛面向全体SFT 学生最终获奖者将赢取丰厚奖金最高可达2万港币获得在BESFXXK的实习机会将与著名设计师Lim Jae Hyuk先生合作设计BESFXXK 系列,该系列将在纽约时装周和巴黎时装周上展出)及更多惊喜哦!扫描二维码获取更多比赛信息。"
}
]
}
]
}
]
}

View File

@@ -215,6 +215,7 @@ li {
border: 2px solid #000;
cursor: pointer;
box-sizing: border-box;
white-space: nowrap;
}
.gallery_btn.gallery_btn_radius {
border-radius: 1.4rem;
@@ -716,19 +717,32 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
color: #fff;
cursor: pointer;
}
.generalModel_page .generalModel_table_search .generalModel_state {
.generalModel_state {
position: relative;
display: flex;
align-items: center;
width: auto;
flex-wrap: wrap;
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item {
.generalModel_state .generalModel_state_item {
display: flex;
align-items: center;
margin-right: 5rem;
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item > span {
.generalModel_state .generalModel_state_item > input {
height: 2.5rem !important;
border-radius: 4rem;
padding: 2rem !important;
box-sizing: content-box;
background-color: #f3f3f3;
width: calc(100% - 4rem);
font-size: 1.8rem;
transition: all 0.3s;
}
.generalModel_state .generalModel_state_item > input:hover {
border: 1px solid;
}
.generalModel_state .generalModel_state_item > span {
font-size: 2rem;
font-weight: 400;
color: #030303;
@@ -738,31 +752,35 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
min-width: 5rem;
text-align: left;
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item .ant-picker-range,
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item .ant-select-selector {
height: 2.5rem;
.generalModel_state .generalModel_state_item .ant-picker-range,
.generalModel_state .generalModel_state_item .ant-select-selector,
.generalModel_state .generalModel_state_item .range_picker {
height: 2.5rem !important;
border-radius: 4rem;
padding: 2rem;
padding: 2rem !important;
box-sizing: content-box;
background-color: #f3f3f3;
width: calc(100% - 4rem);
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item .ant-select-lg {
font-size: 14px;
.generalModel_state .generalModel_state_item .ant-picker-input > input {
font-size: 1.8rem;
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_state_item .ant-select-lg .ant-select-selector .ant-select-selection-item {
.generalModel_state .generalModel_state_item .ant-select-lg {
font-size: 1.8rem;
}
.generalModel_state .generalModel_state_item .ant-select-lg .ant-select-selector .ant-select-selection-item {
height: 100%;
display: flex;
align-items: center;
}
.generalModel_page .generalModel_table_search .generalModel_state .generalModel_current {
.generalModel_state .generalModel_current {
background: #fff;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.generalModel_page .generalModel_table_search .generalModel_state .header_user_content {
.generalModel_state .header_user_content {
position: absolute;
border: 2px solid;
border-radius: 1rem;
@@ -773,14 +791,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
display: none;
margin-left: -2rem;
}
.generalModel_page .generalModel_table_search .generalModel_state .header_user_content .username {
.generalModel_state .header_user_content .username {
padding: 0 2rem;
color: #000;
}
.generalModel_page .generalModel_table_search .generalModel_state .header_user_content .username:hover {
.generalModel_state .header_user_content .username:hover {
background: #e1e1e1;
}
.generalModel_page .generalModel_table_search .generalModel_state .header_user_content.active {
.generalModel_state .header_user_content.active {
display: block;
}
.generalModel {
@@ -1057,7 +1075,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
top: 6rem;
}
.ant-modal-confirm-btns .ant-btn:hover {
color: #39215b !important;
color: #fff !important;
border-color: #39215b !important;
}
.ant-modal-confirm-btns .ant-btn-primary {
@@ -1288,7 +1306,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.admin_page .admin_table_search .admin_state .header_user_content.active {
display: block;
}
.admin_page .admin_table_content {
.admin_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
@@ -1297,65 +1315,65 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
border-radius: 2rem;
overflow: hidden;
}
.admin_page .admin_table_content .ant-table {
.admin_table_content .ant-table {
background: transparent;
}
.admin_page .admin_table_content .ant-table-body {
.admin_table_content .ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
.admin_page .admin_table_content .ant-table-body::-webkit-scrollbar {
.admin_table_content .ant-table-body::-webkit-scrollbar {
width: 0 !important;
}
.admin_page .admin_table_content .ant-table-body::-webkit-scrollbar-horizontal {
.admin_table_content .ant-table-body::-webkit-scrollbar-horizontal {
height: 2px !important;
width: 2px !important;
}
.admin_page .admin_table_content .ant-table-body::-webkit-scrollbar-thumb:horizontal {
.admin_table_content .ant-table-body::-webkit-scrollbar-thumb:horizontal {
background-color: #8a8a8a;
/* 水平滚动条手柄颜色 */
border-radius: 5px;
}
.admin_page .admin_table_content .ant-table-body::-webkit-scrollbar-track:horizontal {
.admin_table_content .ant-table-body::-webkit-scrollbar-track:horizontal {
background-color: #f1f1f1;
/* 水平滚动条轨道颜色 */
}
.admin_page .admin_table_content .ant-table-thead > tr > th {
.admin_table_content .ant-table-thead > tr > th {
background: #ffffff;
border-bottom: none;
}
.admin_page .admin_table_content .ant-table-tbody > tr > td {
.admin_table_content .ant-table-tbody > tr > td {
border: none;
background: #fff;
}
.admin_page .admin_table_content .operate_list {
.admin_table_content .operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
}
.admin_page .admin_table_content .operate_list .operate_item {
.admin_table_content .operate_list .operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
.admin_page .admin_table_content .ant-table-tbody > tr:hover > td {
.admin_table_content .ant-table-tbody > tr:hover > td {
background: #cacaca;
}
.admin_page .admin_table_content .ant-table-pagination-right {
.admin_table_content .ant-table-pagination-right {
padding-right: 3.5rem;
}
.admin_page .admin_table_content .operate_list {
.admin_table_content .operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
justify-content: center;
}
.admin_page .admin_table_content .operate_list .operate_item {
.admin_table_content .operate_list .operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
@@ -1878,6 +1896,71 @@ textarea:focus {
top: 0rem;
border: 1px solid #dcdfe6;
}
.collection_modal_body .input_border .generage_btn_box,
.design_detail_modal_component .input_border .generage_btn_box,
.library_page .input_border .generage_btn_box,
.productImg_modal .input_border .generage_btn_box,
.accountEdit_page .input_border .generage_btn_box,
.generalMenu_printModel_upload .input_border .generage_btn_box {
position: relative;
display: flex;
align-items: center;
}
.collection_modal_body .input_border .generage_btn_box .icon-xiala,
.design_detail_modal_component .input_border .generage_btn_box .icon-xiala,
.library_page .input_border .generage_btn_box .icon-xiala,
.productImg_modal .input_border .generage_btn_box .icon-xiala,
.accountEdit_page .input_border .generage_btn_box .icon-xiala,
.generalMenu_printModel_upload .input_border .generage_btn_box .icon-xiala {
margin-left: 1rem;
transition: all 0.3s;
cursor: pointer;
}
.collection_modal_body .input_border .generage_btn_box .icon-xiala.active,
.design_detail_modal_component .input_border .generage_btn_box .icon-xiala.active,
.library_page .input_border .generage_btn_box .icon-xiala.active,
.productImg_modal .input_border .generage_btn_box .icon-xiala.active,
.accountEdit_page .input_border .generage_btn_box .icon-xiala.active,
.generalMenu_printModel_upload .input_border .generage_btn_box .icon-xiala.active {
transform: rotate(180deg);
}
.collection_modal_body .input_border .generage_btn_box .content,
.design_detail_modal_component .input_border .generage_btn_box .content,
.library_page .input_border .generage_btn_box .content,
.productImg_modal .input_border .generage_btn_box .content,
.accountEdit_page .input_border .generage_btn_box .content,
.generalMenu_printModel_upload .input_border .generage_btn_box .content {
position: absolute;
top: 100%;
width: calc(100% - 2rem);
left: 2rem;
text-align: center;
border-radius: calc(1rem*1.2);
overflow: hidden;
z-index: 3;
margin-top: 0.2rem;
}
.collection_modal_body .input_border .generage_btn_box .content > div,
.design_detail_modal_component .input_border .generage_btn_box .content > div,
.library_page .input_border .generage_btn_box .content > div,
.productImg_modal .input_border .generage_btn_box .content > div,
.accountEdit_page .input_border .generage_btn_box .content > div,
.generalMenu_printModel_upload .input_border .generage_btn_box .content > div {
background: #cccccc;
line-height: 2;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.collection_modal_body .input_border .generage_btn_box .content > div:hover,
.design_detail_modal_component .input_border .generage_btn_box .content > div:hover,
.library_page .input_border .generage_btn_box .content > div:hover,
.productImg_modal .input_border .generage_btn_box .content > div:hover,
.accountEdit_page .input_border .generage_btn_box .content > div:hover,
.generalMenu_printModel_upload .input_border .generage_btn_box .content > div:hover {
background: #999999;
}
.collection_modal_body .input_border .generage_btn,
.design_detail_modal_component .input_border .generage_btn,
.library_page .input_border .generage_btn,
@@ -1885,6 +1968,7 @@ textarea:focus {
.accountEdit_page .input_border .generage_btn,
.generalMenu_printModel_upload .input_border .generage_btn {
margin-left: 2rem;
display: flex;
}
.hideChecked {
user-select: none;

View File

@@ -220,6 +220,7 @@ input:focus{
border: 2px solid #000;
cursor: pointer;
box-sizing: border-box;
white-space: nowrap;
&.gallery_btn_radius{
border-radius: 1.4rem;
}
@@ -780,77 +781,95 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
cursor: pointer;
}
}
.generalModel_state {
position: relative;
display: flex;
align-items: center;
width: auto;
flex-wrap: wrap;
.generalModel_state_item{
display: flex;
align-items: center;
margin-right: 5rem;
>span{
font-size: 2rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 5rem;
text-align: left;
}
.ant-picker-range,.ant-select-selector{
height: 2.5rem;
border-radius: 4rem;
padding: 2rem;
box-sizing: content-box;
background-color: #f3f3f3;
width: calc(100% - 4rem);
}
.ant-select-lg{
font-size: 14px;
.ant-select-selector{
.ant-select-selection-item{
height: 100%;
display: flex;
align-items: center;
}
}
}
}
.generalModel_current{
background: #fff;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.header_user_content {
position: absolute;
border: 2px solid;
border-radius: 1rem;
overflow: hidden;
top: 0;
transform: translateY(6rem);
z-index: 2;
display: none;
margin-left: -2rem;
.username{
padding: 0 2rem;
color: #000;
}
.username:hover{
background: #e1e1e1;
}
&.active{
display: block;
}
}
.generalModel_state {
position: relative;
display: flex;
align-items: center;
width: auto;
flex-wrap: wrap;
.generalModel_state_item{
display: flex;
align-items: center;
margin-right: 5rem;
>input{
height: 2.5rem !important;
border-radius: 4rem;
padding: 2rem !important;
box-sizing: content-box;
background-color: #f3f3f3;
width: calc(100% - 4rem);
font-size: 1.8rem;
transition: all .3s;
}
>input:hover{
border: 1px solid;
}
>span{
font-size: 2rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 5rem;
text-align: left;
}
.ant-picker-range,.ant-select-selector,.range_picker{
height: 2.5rem !important;
border-radius: 4rem;
padding: 2rem !important;
box-sizing: content-box;
background-color: #f3f3f3;
width: calc(100% - 4rem);
}
.ant-picker-input > input{
font-size: 1.8rem;
}
.ant-select-lg{
font-size: 1.8rem;
.ant-select-selector{
.ant-select-selection-item{
height: 100%;
display: flex;
align-items: center;
}
}
}
}
}
.generalModel_current{
background: #fff;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.header_user_content {
position: absolute;
border: 2px solid;
border-radius: 1rem;
overflow: hidden;
top: 0;
transform: translateY(6rem);
z-index: 2;
display: none;
margin-left: -2rem;
.username{
padding: 0 2rem;
color: #000;
}
.username:hover{
background: #e1e1e1;
}
&.active{
display: block;
}
}
}
.generalModel{//自带关闭的页面
-moz-user-select: none;
-webkit-user-select: none;
@@ -1158,7 +1177,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
}
.ant-modal-confirm-btns{
.ant-btn:hover{
color: #39215b !important;
color: #fff !important;
border-color: #39215b !important;
}
.ant-btn-primary{
@@ -1403,88 +1422,88 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
}
}
}
}
.admin_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
padding-bottom: 3rem;
background: #fff;
border-radius: 2rem;
overflow: hidden;
.ant-table {
background: transparent;
}
.admin_table_content {
margin-top: 2.6rem;
width: 100%;
height: calc(100% - 13.7rem);
padding-bottom: 3rem;
.ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar {
width: 0 !important;
}
&::-webkit-scrollbar-horizontal {
height: 2px !important;
width: 2px !important;
}
&::-webkit-scrollbar-thumb:horizontal {
background-color: #8a8a8a; /* 水平滚动条手柄颜色 */
border-radius: 5px;
}
&::-webkit-scrollbar-track:horizontal {
background-color: #f1f1f1; /* 水平滚动条轨道颜色 */
}
}
.ant-table-thead > tr > th {
background: #ffffff;
border-bottom: none;
// backdrop-filter: blur(1rem);
}
.ant-table-tbody > tr > td {
border: none;
background: #fff;
border-radius: 2rem;
overflow: hidden;
.ant-table {
background: transparent;
}
// color: #fff;
}
.operate_list{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
.ant-table-body {
overflow-y: auto !important;
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
&::-webkit-scrollbar {
width: 0 !important;
}
&::-webkit-scrollbar-horizontal {
height: 2px !important;
width: 2px !important;
}
&::-webkit-scrollbar-thumb:horizontal {
background-color: #8a8a8a; /* 水平滚动条手柄颜色 */
border-radius: 5px;
}
&::-webkit-scrollbar-track:horizontal {
background-color: #f1f1f1; /* 水平滚动条轨道颜色 */
}
.operate_item{
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
.ant-table-thead > tr > th {
background: #ffffff;
border-bottom: none;
// backdrop-filter: blur(1rem);
}
.ant-table-tbody > tr {
&:hover > td {
background: rgb(202, 202, 202)
}
.ant-table-tbody > tr > td {
border: none;
background: #fff;
// color: #fff;
}
.operate_list{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
.operate_item{
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
.ant-table-tbody > tr {
&:hover > td {
background: rgb(202, 202, 202)
}
}
.ant-table-pagination-right {
padding-right: 3.5rem;
}
.operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
justify-content: center;
.operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
.ant-table-pagination-right {
padding-right: 3.5rem;
}
.operate_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
justify-content: center;
.operate_item {
font-size: 1.4rem;
font-family: Roboto;
font-weight: 400;
color: #343579;
cursor: pointer;
}
}
}
.homeMain_heade,.account_message{
.ant-badge{
width: auto;
@@ -1889,9 +1908,45 @@ textarea:focus{
// color: red;
// width: 100%;
// }
.generage_btn_box{
position: relative;
display: flex;
align-items: center;
.icon-xiala{
margin-left: 1rem;
transition: all .3s;
cursor: pointer;
&.active{
transform: rotate(180deg);
}
}
.content{
position: absolute;
top: 100%;
width: calc(100% - 2rem);
left: 2rem;
text-align: center;
border-radius: calc(1rem* 1.2);
overflow: hidden;
z-index: 3;
margin-top: .2rem;
>div{
background: #cccccc;
line-height: 2;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
>div:hover{
background: #999999;
}
}
}
.generage_btn{
// margin: 0 auto;
margin-left: 2rem;
display: flex;
}
}

View File

@@ -7,19 +7,19 @@
<div class="content_item_user">
<div class="content_item_user_left">
<div class="content_item_user_left_detail">
<img :src="userInfo?.avatar" alt="">
<img :src="userDetail.avatar" alt="">
</div>
<div class="content_item_user_left_detail">
<div class="modal_title_text">
<div>{{ cookieUserInfo.userName }}</div>
<div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ cookieUserInfo?.email }}</div>
<div>{{ userDetail.userName }}</div>
<div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ userDetail.email }}</div>
</div>
<div class="content_item_user_left_detail_bottom">
<div>
<span>{{$t('account.Follow')}}</span>{{ userInfo?.followeeCount }}
<span>{{$t('account.Follow')}}</span>{{ userDetail.followeeCount }}
</div>
<div>
<span>{{$t('account.Fans')}}</span>{{ userInfo?.followerCount }}
<span>{{$t('account.Fans')}}</span>{{ userDetail.followerCount }}
</div>
</div>
</div>
@@ -54,7 +54,6 @@ import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { useRouter,useRoute } from 'vue-router'
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
@@ -63,14 +62,9 @@ export default defineComponent({
const {t} = useI18n()
const store = useStore();
let userInfo:any= computed(()=>{
return store.state.UserHabit.userInfo
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
let cookieUserInfo = ref(null)
if(getCookie('userInfo')){
let userInfo:any = getCookie('userInfo')
cookieUserInfo.value = JSON.parse(userInfo)
}
let accountHomeData = reactive({
rootSubmenuKeys:[
{
@@ -96,8 +90,7 @@ export default defineComponent({
router.push({path:event.item.route})
}
return{
userInfo,
cookieUserInfo,
userDetail,
...toRefs(accountHomeData),
router,
handleClick,

View File

@@ -43,7 +43,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import follow from '@/component/Account/followFans/follow.vue'
import fans from '@/component/Account/followFans/fans.vue'
import { useI18n } from 'vue-i18n'
@@ -70,9 +69,6 @@ export default defineComponent({
],
activeKey: '',
})
let userInfo= computed(()=>{
return store.state.UserHabit.userInfo
})
let domRefs:any = reactive({
follow:ref(null),
fans:ref(null),
@@ -108,7 +104,6 @@ export default defineComponent({
return{
...toRefs(accountMessage),
...toRefs(domRefs),
userInfo,
messageSystem,
setReadStatus,
changeTabs,

View File

@@ -39,7 +39,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import system from '@/component/Account/message/system.vue'
import privateChat from '@/component/Account/message/privateChat.vue'
import newFollow from '@/component/Account/message/newFollow.vue'

View File

@@ -39,10 +39,7 @@
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},

View File

@@ -46,10 +46,7 @@
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},

View File

@@ -20,7 +20,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import myInformation from '@/component/Account/frontPage/mylnformation.vue';
import bind from '@/component/Account/frontPage/bindPage.vue';
import cancelRenewal from '@/component/Account/frontPage/cancelRenewal.vue';
@@ -33,7 +32,8 @@ export default defineComponent({
},
setup() {
const {t} = useI18n()
const router = useRouter()
const route = useRoute();
const router = useRouter();
const store = useStore();
let accountfrontPage = reactive({
frontPageList:[
@@ -47,8 +47,8 @@ export default defineComponent({
title:t('account.cancel'),
key:'cancelRenewal',
}
],
loadingShow:false,
activeKey: '',
})
let domRefs:any = reactive({
@@ -77,49 +77,35 @@ export default defineComponent({
reject(err)
})
})
}
let setAllfrontPage = ()=>{
return new Promise((resolve,reject)=>{
let data = {
type:accountfrontPage.activeKey
}
Https.axiosPost(Https.httpUrls.oneClickRead,'',{params:data}).then((rv)=>{
resolve(rv)
}).catch((err)=>{
reject(err
)
})
})
}
let getHistory = (data:any)=>{
return new Promise((resolve,reject)=>{
data.type = accountfrontPage.activeKey
let url = Https.httpUrls.getHistoryNotification
// if(data.type == 'follow'){
// url = Https.httpUrls.porfolioGetFollowerList
// }
Https.axiosPost(url,data).then((rv)=>{
if(rv){
// domRefs[data.type][0].setfrontPageList(rv,data)
resolve(rv)
}
}).catch((err)=>{
reject(err)
})
})
const wechatLogin = (value:any)=> {
let data = {
code : value.code
}
accountfrontPage.loadingShow = true
Https.axiosGet(Https.httpUrls.bindWeChat, {params:data})
.then((rv) => {
accountfrontPage.loadingShow = false
console.log(rv);
router.push({ query: {} });
})
.catch((res) => {accountfrontPage.loadingShow = false});
}
onMounted(()=>{
let key = accountfrontPage.frontPageList[0].key
accountfrontPage.activeKey = key
const data = route.query
if(data?.state == 'weiXin'){
accountfrontPage.activeKey = 'bind'
wechatLogin(data)
}
})
return{
...toRefs(accountfrontPage),
...toRefs(domRefs),
setReadStatus,
changeTabs,
setAllfrontPage,
getHistory,
}
},
data(){

View File

@@ -5,43 +5,148 @@
<div class="title">Bind Wechat</div>
<div class="box">
<div class="type">
<img src="@/assets/images/loginPage/weiXinIcon.svg" alt="">
<div class="text">Unbound</div>
<img v-if="!userDetail.accountExtendList?.WeChat" src="@/assets/images/loginPage/weiXinIcon.svg" alt="">
<img v-else :src="userDetail.accountExtendList?.WeChat.headImgUrl" alt="">
<div class="text">{{ userDetail.accountExtendList?.WeChat?userDetail.accountExtendList?.WeChat.name:'Unbound' }}</div>
</div>
<div class="gallery_btn">Bind Now</div>
<div v-if="!userDetail.accountExtendList?.WeChat" class="gallery_btn" @click="openWeiXinModel">Bind Now</div>
<div v-else class="gallery_btn" @click="ungroupWeiXinModel">Ungroup</div>
</div>
</div>
<div class="bind_item">
<div class="title">Bind Gmail</div>
<div class="box">
<div class="type">
<img v-if="!userDetail.accountExtendList?.Google" src="@/assets/images/loginPage/gmailIcon.svg" alt="">
<img v-else :src="userDetail.accountExtendList?.Google?.headImgUrl" alt="">
<div class="text">{{ userDetail.accountExtendList?.Google?userDetail.accountExtendList?.Google.name:'Unbound' }}</div>
</div>
<div class="gmail_btn">
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn">Bind Now</div>
<div v-else class="gallery_btn" @click="ungroupGoogleModel">Ungroup</div>
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
</div>
</div>
</div>
</div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
<weiXinModel ref="weiXinModel"></weiXinModel>
</div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
<script>
import { defineComponent,computed,ref,reactive,nextTick,toRefs,onBeforeUnmount, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import weiXinModel from "@/component/LoginPage/weiXinModel.vue";
import { useRoute } from 'vue-router';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
weiXinModel
},
setup() {
const route = useRoute();
const router = useRouter();
const store = useStore();
let userInfo:any= computed(()=>{
return store.state.UserHabit.userInfo
let accountHomeData = reactive({
router:null,
loadingShow:false,
userDetail:computed(()=>{
return store.state.UserHabit.userDetail
})
})
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
let accountHomeData:any = reactive({
cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
uploadUrl:userInfo.value?.avatar,
uploadFile:undefined,
token:'',
fileList:[]
let bindPageDom = reactive({
weiXinModel:null
})
let data = reactive({
scriptSrc:'https://accounts.google.com/gsi/client',
})
const openWeiXinModel = ()=>{
bindPageDom.weiXinModel.init()
}
const handleCredentialResponse = (response)=>{
let code = response.credential
accountHomeData.loadingShow = true
let data = {credential : code}
Https.axiosGet(Https.httpUrls.bindGoogle, {params:data})
.then((rv) => {
accountHomeData.loadingShow = false
})
.catch((res) => {accountHomeData.loadingShow = false});
}
const ungroupWeiXinModel = ()=>{
Https.axiosGet(Https.httpUrls.unbindWeChat,).then((rv)=>{
message.success('Successful discharge');
let value = {
accountExtendList:{
WeChat:undefined,
Google:accountHomeData.userDetail.accountExtendList?.Google
}
}
store.commit("upUserDetail", value)
})
}
const ungroupGoogleModel = ()=>{
Https.axiosGet(Https.httpUrls.unbindGoogle,).then((rv)=>{
let value = {
accountExtendList:{
WeChat:accountHomeData.userDetail.accountExtendList?.WeChat,
Google:undefined,
}
}
store.commit("upUserDetail", value)
message.success('Successful discharge');
})
}
onMounted(async ()=>{
let GOOGLE_CLIENT_ID = '194770296147-njd68pm7tnapgonkj2h48mhf63n15n3f.apps.googleusercontent.com'
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(!existingScript){
await new Promise((resolve, reject) => {
const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{
resolve()
}
document.body.appendChild(script);
})
}
window.google.accounts.id.initialize({
// 主要就是填写client_id
client_id: GOOGLE_CLIENT_ID,
auto_select: false,
callback: handleCredentialResponse,
// context:"signin",
ux_mode:"popup",
itp_support:true,
});
window.google.accounts.id.renderButton(
document.getElementById("g_id_bind"),
{
type:"icon",//icon为只有一个icon
shape:"circle",
theme:"outline",
size:"large",
logo_alignment:"center",
}
);
})
onBeforeUnmount(()=>{
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(existingScript)existingScript.remove()
})
return{
...toRefs(accountHomeData),
userInfo,
cookieUserInfo,
...toRefs(bindPageDom),
openWeiXinModel,
ungroupGoogleModel,
ungroupWeiXinModel,
}
},
data(){
@@ -79,9 +184,24 @@ export default defineComponent({
>.text{
display: flex;
align-items: center;
font-size: 1.8rem;
}
}
>.gmail_btn{
position: relative;
#g_id_bind{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
z-index: 2;
:deep(.nsm7Bb-HzV7m-LgbsSe.Bz112c-LgbsSe){
width: 100%;
}
}
}
}
}
.bind_item:last-child{

View File

@@ -1,38 +1,46 @@
<template>
<div class="cancelRenewal_page">
<div class="cancel_box_item">
<div class="modal_title_text">
<div>Sorry to see you go</div>
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
<div v-if="userDetail.status != 'canceled'">
<div class="cancel_box_item">
<div class="modal_title_text">
<div>Sorry to see you go</div>
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
</div>
<a-select class="gallerySelect" v-model:value="currentState.value" size="large" optionFilterProp="label" :options="state" placeholder="Select a reason" allowClear show-search></a-select>
<textarea v-model="textareaValue" placeholder="Share your feedback here..."></textarea>
<div class="button_box">
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
<div class="gallery_btn gallery_btn_radius" @click="cancelSubscription">Yes, cancel it</div>
</div>
</div>
<a-select class="gallerySelect" v-model:value="currentState.value" size="large" optionFilterProp="label" :options="state" placeholder="Select a reason" allowClear show-search></a-select>
<textarea v-model="searchPictureName" placeholder="Share your feedback here..."></textarea>
<div class="button_box">
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
<div class="gallery_btn gallery_btn_radius">Yes, cancel it</div>
<div class="cancel_box_item cancel_box_item2">
<div class="modal_title_text">
<div>Youre about to cancel your subscription</div>
<div>
<i class="fi fi-sr-circle-xmark"></i>
<div class="modal_title_text_assistant">You will loose all your date</div>
</div>
<div>
<i class="fi fi-sr-circle-xmark"></i>
<div class="modal_title_text_assistant">You will loose your settings and customizations</div>
</div>
</div>
<div class="tips">
<i class="fi fi-sr-triangle-warning"></i>
<div>Dont worry! The data you have in AiDA will be
safe.</div>
</div>
<div class="button_box">
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
<div class="gallery_btn gallery_btn_radius" @click="cancelSubscription">Yes, cancel it</div>
</div>
</div>
</div>
<div class="cancel_box_item cancel_box_item2">
<div class="modal_title_text">
<div>Youre about to cancel your subscription</div>
<div>
<i class="fi fi-sr-circle-xmark"></i>
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
</div>
<div>
<i class="fi fi-sr-circle-xmark"></i>
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
</div>
</div>
<div class="tips">
<i class="fi fi-sr-triangle-warning"></i>
<div>Dont worry!The data you have in Notion will be
safe.</div>
</div>
<div class="button_box">
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
<div class="gallery_btn gallery_btn_radius">Yes, cancel it</div>
</div>
<div v-else class="no_renewal">
There are no subscription plans with automatic renewal.
</div>
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
</div>
<renew ref="renew"></renew>
</div>
@@ -42,7 +50,6 @@ import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMo
import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
import renew from "@/component/HomePage/renew.vue";
export default defineComponent({
@@ -51,12 +58,13 @@ export default defineComponent({
},
setup() {
const store = useStore();
let userInfo:any= computed(()=>{
return store.state.UserHabit.userInfo
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
let accountHomeData:any = reactive({
currentState:{value:'income'}, //裁剪的原始文件数据
textareaValue:'',
isShowMark:false,
})
let state:any = ref([
{
@@ -72,13 +80,32 @@ export default defineComponent({
const subscribe = ()=>{
renew.value.init()
}
const cancelSubscription = ()=>{
let data = {
subscriptionId:userDetail.value.subscriptionId,
reason:'',
}
accountHomeData.isShowMark = true
Https.axiosGet(Https.httpUrls.cancelSubscription, {params:data})
.then((rv: any) => {
message.success(rv)
let value = {
status:'canceled',
}
accountHomeData.isShowMark = false
store.commit("upUserDetail", value)
})
.catch((res) => {
accountHomeData.isShowMark = false
});
}
return{
...toRefs(accountHomeData),
userInfo,
cookieUserInfo,
userDetail,
state,
renew,
subscribe,
cancelSubscription,
}
},
data(){
@@ -90,9 +117,18 @@ export default defineComponent({
</script>
<style lang="less" scoped>
.cancelRenewal_page{
display: flex;
justify-content: center;
align-items: flex-start;
>div{
display: flex;
justify-content: center;
align-items: flex-start;
height: 45rem;
align-items: center;
&.no_renewal{
font-size: 2rem;
font-weight: 400;
}
}
.cancel_box_item{
border: 2px solid #000;
border-radius: 2rem;

View File

@@ -17,7 +17,7 @@
class="upload_tip_block"
>
<!-- <i class="fi fi-br-upload"></i> -->
<img :src="uploadUrl" alt="">
<img :src="uploadUrl?uploadUrl:userDetail.avatar" alt="">
</div>
</a-upload>
</div>
@@ -27,13 +27,13 @@
<div class="accountEdit_page_body_item">
<div class="accountEdit_page_body_item_name">{{$t('account.userName')}}:</div>
<div class="accountEdit_page_body_item_inut">
<input type="text" disabled :value="cookieUserInfo.userName">
<input type="text" disabled :value="userDetail.userName">
</div>
</div>
<div class="accountEdit_page_body_item">
<div class="accountEdit_page_body_item_name">{{$t('account.email')}}:</div>
<div class="accountEdit_page_body_item_inut">
<input type="text" disabled :value="cookieUserInfo.email">
<input type="text" disabled :value="userDetail.email">
</div>
</div>
<div class="accountEdit_page_body_item">
@@ -51,7 +51,6 @@ import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import Cropper from '@/component/HomePage/Cropper.vue'
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
@@ -59,13 +58,12 @@ export default defineComponent({
},
setup() {
const store = useStore();
let userInfo:any= computed(()=>{
return store.state.UserHabit.userInfo
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
let accountHomeData:any = reactive({
cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
uploadUrl:userInfo.value?.avatar,
uploadUrl:'',
uploadFile:undefined,
token:'',
fileList:[]
@@ -138,15 +136,14 @@ export default defineComponent({
let data = {
avatar : rv
}
store.commit("setUserInfo", data)
store.commit("upUserDetail", data)
message.success('提交成功')
})
}
return{
...toRefs(accountHomeData),
userInfo,
cookieUserInfo,
userDetail,
Cropper,
handleCropperSuccess,
beforeUpload,
@@ -201,6 +198,7 @@ export default defineComponent({
border-radius: 1.6rem;
border: 2px solid #D0D0D0;
width: 100%;
font-size: 2rem;
}
input{
height: 7rem;

View File

@@ -43,8 +43,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},

View File

@@ -41,8 +41,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},

View File

@@ -37,9 +37,7 @@
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{

View File

@@ -73,7 +73,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{

View File

@@ -30,9 +30,7 @@
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{

View File

@@ -53,7 +53,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
import Works from '@/views/HomeView/Works.vue';
export default defineComponent({

View File

@@ -77,11 +77,13 @@
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { useStore } from "vuex";
import { Https } from "@/tool/https";
export default defineComponent({
components: {
},
setup() {
const store:any = useStore()
let rangePickerValue: any = ref([]);
let rangeTimeValue: any = ref([]);
let renameData: any = ref({}); //修改名字选中的数据
@@ -90,9 +92,10 @@ export default defineComponent({
{
title: 'Email',
align: "center",
ellipsis: true,
dataIndex: "userEmail",
key: "userEmail",
width:200,
fixed: "left",
},
{
title: 'User Id',
@@ -100,6 +103,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "accountId",
key: "accountId",
width:100,
},
{
title: 'User Name',
@@ -107,6 +111,7 @@ export default defineComponent({
ellipsis: 200,
dataIndex: "userName",
key: "userName",
width:100,
// customRender: (record: any) => {
// let time = formatTime(
// record.text / 1000,
@@ -121,6 +126,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "isTrial",
key: "isTrial",
width:100,
customRender: (record: any) => {
let str
if(record.value == 1){
@@ -137,6 +143,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "designTimes",
key: "designTimes",
width:100,
},
{
title: 'Country',
@@ -144,6 +151,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "country",
key: "country",
width:200,
},
{
title: 'Title',
@@ -151,6 +159,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "title",
key: "title",
width:100,
},
{
title: 'Surname',
@@ -158,6 +167,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "surname",
key: "surname",
width:150,
},
{
title: 'Given Name',
@@ -165,6 +175,7 @@ export default defineComponent({
ellipsis: true,
dataIndex: "givenName",
key: "givenName",
width:100,
},
{
title: 'Create Time',
@@ -176,6 +187,19 @@ export default defineComponent({
// resizable: true,
dataIndex: "createTime",
key: "createTime",
width:200,
},
{
title: 'Credits',
align: "center",
ellipsis: true,
// width: 150,
// minWidth: 100,
// maxWidth: 200,
// resizable: true,
dataIndex: "credits",
key: "credits",
width:100,
},
{
title: 'Occupation',
@@ -187,6 +211,7 @@ export default defineComponent({
// resizable: true,
dataIndex: "occupation",
key: "occupation",
width:100,
},
{
title: 'Trial Order Id',
@@ -196,11 +221,14 @@ export default defineComponent({
// resizable: true,
dataIndex: "trialOrderId",
key: "trialOrderId",
width:100,
},
];
});
let allUserList: any = ref([]);
let allUserList: any = computed(()=>{
return store.state.adminPage.allUserList
})
let ids = ref([])
let email = ref('')
let dataList: any = ref([]);
@@ -237,10 +265,6 @@ export default defineComponent({
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 200;
this.gettrialList();
let allUserList: any = sessionStorage.getItem("allUserList");
if (allUserList) {
this.allUserList = JSON.parse(allUserList);
}
},
methods: {
//改变页码

View File

@@ -0,0 +1,306 @@
<template>
<div class="admin_page">
<div class="admin_table_search">
<div class="admin_state">
<div class="admin_state_item">
<span>Start Time:</span>
<a-range-picker
style="width:280px"
class="range_picker"
v-model:value="rangePickerValue"
:allowClear="false"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
<div class="admin_state_item">
<span>State:</span>
<a-select v-model:value="currentState.value" size="large" style="width:280px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div>
<div class="admin_state_item">
<span>Affiliate Id:</span>
<input
style="width:280px"
v-model="affiliateId"
placeholder="Please enter Affiliate Id"
@keydown.enter="gettrialList"
type="text"
/>
</div>
</div>
<div class="admin_search">
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
</div>
<div class="admin_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
>
<template
#bodyCell="{ column, text, record, index }"
>
<div
class="operate_list"
v-if="column?.Operations && record.status == 'Pending'"
>
<div v-show="status == 0" class="operate_item" @click="setAgree(record, true)">
agree
</div>
<div v-show="status == 0" class="operate_item" @click="setAgree(record, false)" >
refuse
</div>
</div>
<div v-else-if="column?.Operations">
{{ record.status }}
</div>
<div v-else-if="column?.openType" @click="openDetail(record,column?.openType)">
{{ text }} HDK
</div>
</template>
</a-table>
</div>
<itemAffiliateDetail ref="itemAffiliateDetail"></itemAffiliateDetail>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
import itemAffiliateDetail from "./itemAffiliateDetail.vue";
export default defineComponent({
components: {
itemAffiliateDetail,
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
{
title: 'Id',
align: "center",
width: 50,
dataIndex: "id",
key: "id",
fixed: "left",
},
{
title: 'Create Time',
align: "center",
width: 200,
dataIndex: "createTime",
key: "createTime",
sorter: true,
},{
title: 'State',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "status",
key: "status",
},{
title: 'Updata Time',
align: "center",
width: 200,
dataIndex: "updateTime",
key: "updateTime",
},{
title: 'Total income',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "totalEarnings",
key: "totalEarnings",
openType:'month',
},{
title: 'Monthly income',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "monthlyEarnings",
key: "monthlyEarnings",
openType:'all',
},{
title: 'Invitation Link',
align: "center",
ellipsis: true,
width: 250,
dataIndex: "link",
key: "link",
},{
title: 'Unpaid amount',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "unpaidEarnings",
key: "unpaidEarnings",
},
{
title: 'Operations',
key: "operation",
align: "center",
fixed: "right",
width: 130,
// slots:{customRender:'action'}
Operations: true,
},
];
});
let currentState = ref({
label:'All',
value:'',
state:false,
},)
let state:any = ref([
{
label:'All',
value:'',
},
{
label:'Pending',
value:'Pending',
},
{
label:'Active',
value:'Active',
},
{
label:'Inactive',
value:'Inactive',
},
{
label:'Refused',
value:'Refused',
},
])
const itemAffiliateDetail = ref()
let collectionList: any = ref([]);
let status: any = ref(0);
const openDetail = (value:any,openType:string)=>{
console.log(value,openType);
let data = {
id:value.id,
type:openType
}
itemAffiliateDetail.value.init(data)
}
return {
columns,
collectionList,
renameData,
status,
currentState,
itemAffiliateDetail,
state,
openDetail,
};
},
data() {
return {
rangePickerValue:[],
currentPage: 1,
pageSize: 10,
total: 0,
order:'',
affiliateId:'',
historyTableHeight: 0,
newCollectionName: "",
renameVisivle: false, //修改名字弹窗
collectionName: "", //选中的名字
searchCollectionName: "",
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 200;
this.gettrialList();
},
methods: {
//改变页码
changePage(e: any, filters:any, sorter:any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.order = sorter.order == "descend" ? "DESC" : "ASC";
this.gettrialList();
},
//查询列表
searchHistoryList() {
this.currentPage = 1;
this.gettrialList();
},
//获取列表
gettrialList() {
let startDate: any = this.rangePickerValue?.[0]
? this.rangePickerValue[0]+' '+'00:00:00'
: "";
let endDate: any = this.rangePickerValue?.[1]
? this.rangePickerValue[1]+' '+'00:00:00'
: "";
let data = {
page: this.currentPage,
size: this.pageSize,
order: this.order,
status: this.currentState.value,
startTime:startDate,
endTime:endDate,
affiliateId:this.affiliateId
};
Https.axiosPost(Https.httpUrls.affiliateList, data).then(
(rv: any) => {
this.collectionList = rv.records;
this.total=rv.total
}
);
},
setAgree(record: any, boolean: boolean){
// const formData = new FormData()
// formData.append('id',record.id)
// formData.append('isApproved ',boolean+'')
let data = {
id:record.id,
isApproved: boolean,
}
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
Https.axiosGet(Https.httpUrls.affiliateApproval, {params:data}).then(
(rv: any) => {
if(boolean){
message.success('同意成功~')
}else{
message.success('拒绝成功~')
}
this.gettrialList();
}
);
},
setState(){
this.currentState.state = true
},
setStateItem(item:any){
this.currentState = item
this.currentState.state = false
},
},
});
</script>
<style lang="less" scoped>
.admin_page .admin_table_content .operate_list{
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,228 @@
<template>
<div class="itemAffiliateDetail" ref="itemAffiliateDetail"></div>
<a-modal class="generalModel"
v-model:visible="itemAffiliateDetailShow"
:footer="null"
:get-container="() => $refs.itemAffiliateDetail"
width="75%"
:maskClosable="false"
:centered="true"
:closable="false"
:mask="true"
wrapClassName="#app"
>
<div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="23" cy="23" r="23" fill="white" 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="admin_page">
<div class="admin_state_item">
<span>Start Time:</span>
<a-range-picker
style="width:280px"
class="range_picker"
v-model:value="rangePickerValue"
:allowClear="false"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
<div class="gallery_btn" @click="getDetailList" style="margin-left: 2rem;">Search</div>
</div>
<div class="itemAffiliateDetail_content generalModel_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:scroll="{ y: 200 }"
@change="changePage"
:pagination="{
showSizeChanger: true,
current: currentPage,
pageSize: pageSize,
total: total,
showQuickJumper: true,
bordered: false,
}"
>
</a-table>
</div>
</div>
</a-modal>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed, reactive, toRefs, nextTick } from "vue";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
export default defineComponent({
components: {
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
const itemAffiliateDom = reactive({
historyTable:null as any,
})
const itemAffiliateDetail = reactive({
itemAffiliateDetailShow:false,
loadingShow:false,
rangePickerValue:[] as any,
itemId:-1,
collectionList:[],
currentPage: 1,
pageSize: 10,
order:'',
total: 0,
historyTableHeight:0,
columns:computed(() => {
return [
{
title: 'Id',
align: "center",
width: 50,
dataIndex: "accountId",
key: "accountId",
fixed: "left",
},{
title: 'User Name',
key: "username",
dataIndex: "username",
align: "center",
width: 150,
},
{
title: 'Time',
align: "center",
width: 200,
dataIndex: "time",
key: "time",
sorter: true,
},{
title: 'First Subscription Payment Amount',
align: "center",
width: 200,
dataIndex: "firstSubscriptionPaymentAmount",
key: "firstSubscriptionPaymentAmount",
},{
title: 'Commission',
align: "center",
ellipsis: true,
width: 150,
dataIndex: "commission",
key: "commission",
fixed: "right",
}
];
})
})
const init = (value:any)=>{
itemAffiliateDetail.itemAffiliateDetailShow = true
getCurrentMonthStart(value.type)
nextTick(()=>{
itemAffiliateDetail.historyTableHeight = itemAffiliateDom.historyTable.clientHeight - 40;
itemAffiliateDetail.itemId = value.id
getDetailList()
})
}
const cancelDsign = () =>{
itemAffiliateDetail.itemAffiliateDetailShow = false
itemAffiliateDetail.loadingShow = false
}
const getCurrentMonthStart = (type:any) => {
const now = new Date(); // 获取当前日期
const year = now.getFullYear(); // 获取当前年份
const month = now.getMonth(); // 获取当前月份0 - 11
let startOfPeriod:any, endOfPeriod:any;
if (type === 'month') {
startOfPeriod = new Date(year, month, 1);
endOfPeriod = new Date(year, month + 1, 0); // 下个月的第0天即为当前月的最后一天
startOfPeriod.setHours(0, 0, 0, 0);
endOfPeriod.setHours(23, 59, 59, 999); // 设置为最后一天的23:59:59.999
} else if (type === 'year') {
startOfPeriod = new Date(year, 0, 1);
endOfPeriod = new Date(year, 11, 31);
}
const formatDate = (date:any) => {
return date.getFullYear() + '-' +
String(date.getMonth() + 1).padStart(2, '0') + '-' +
String(date.getDate()).padStart(2, '0') + ' ' +
String(date.getHours()).padStart(2, '0') + ':' +
String(date.getMinutes()).padStart(2, '0') + ':' +
String(date.getSeconds()).padStart(2, '0');
};
if (type === 'month')itemAffiliateDetail.rangePickerValue = [formatDate(startOfPeriod),formatDate(endOfPeriod)]
}
const changePage = (e: any, filters:any, sorter:any)=>{
itemAffiliateDetail.currentPage = e.current;
itemAffiliateDetail.pageSize = e.pageSize;
itemAffiliateDetail.order = sorter.order == "descend" ? "DESC" : "ASC";
getDetailList();
}
const getDetailList = ()=>{
itemAffiliateDetail.loadingShow = true
let startDate: any = itemAffiliateDetail.rangePickerValue?.[0]
? itemAffiliateDetail.rangePickerValue[0]+' '+'00:00:00'
: "";
let endDate: any = itemAffiliateDetail.rangePickerValue?.[1]
? itemAffiliateDetail.rangePickerValue[1]+' '+'00:00:00'
: "";
let data = {
affiliateId:itemAffiliateDetail.itemId,
endTime:endDate,
startTime:startDate,
order:itemAffiliateDetail.order,
page: itemAffiliateDetail.currentPage,
size: itemAffiliateDetail.pageSize,
}
Https.axiosPost(Https.httpUrls.getEachAffiliateGeneratedRevenue,data).then((rv:any)=>{
console.log(rv);
itemAffiliateDetail.collectionList = rv.records
itemAffiliateDetail.loadingShow = false
itemAffiliateDetail.total=rv.total
}).catch((err:any)=>{
itemAffiliateDetail.loadingShow = false
})
}
return {
...toRefs(itemAffiliateDom),
...toRefs(itemAffiliateDetail),
init,
cancelDsign,
changePage,
getDetailList,
};
},
});
</script>
<style lang="less" scoped>
.itemAffiliateDetail{
.itemAffiliateDetail_content{
margin-top: 2rem;
}
.admin_page .admin_table_content .operate_list{
justify-content: space-between;
}
}
</style>

View File

@@ -88,7 +88,7 @@
class="admin_state_list_item"
@click="lastGeTrialList('year')"
>
Last year
Nearly a year
</div>
<div
class="admin_state_list_item"

View File

@@ -41,7 +41,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -28,7 +28,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -29,7 +29,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -32,7 +32,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -32,7 +32,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -63,7 +63,7 @@
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>

View File

@@ -41,7 +41,7 @@
<div
v-show="status == 0"
class="operate_item"
@click="setAagree(record, index)"
@click="setAgree(record, index)"
>
agree
</div>
@@ -67,7 +67,6 @@
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { Https } from "@/tool/https";
import { Modal, message } from "ant-design-vue";
export default defineComponent({
@@ -184,14 +183,12 @@ export default defineComponent({
},
])
let collectionList: any = ref([]);
let userInfo: any = {};
let status: any = ref(0);
let voluntarily: any = ref(false);
return {
columns,
collectionList,
renameData,
userInfo,
status,
currentState,
state,
@@ -214,8 +211,6 @@ export default defineComponent({
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 200;
this.gettrialList();
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.getIsAutoApproval()
},
methods: {

View File

@@ -2,10 +2,34 @@
<div class="recentNewUserChart admin_page">
<div class="admin_table_search">
<div class="admin_state">
<div class="admin_state_item">
<span>Select Time:</span>
<a-range-picker
style="width:250px"
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
</div>
<div class="admin_search">
</div>
<div class="admin_search">
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>
</div>
<div class="admin_table_content" ref="pageChartDom"></div>
@@ -43,9 +67,34 @@ export default defineComponent({
let searchHistoryList = () => {
gettrialList();
};
let lastGeTrialList = (str:string)=>{
let currentDate = new Date();
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
// 计算30天前的时间戳
let thirtyDaysAgoTimestamp
if(str == 'year'){
thirtyDaysAgoTimestamp = currentTimestamp - (360 * 24 * 60 * 60);
}else if(str == 'month'){
thirtyDaysAgoTimestamp = currentTimestamp - (30 * 24 * 60 * 60);
}else if(str == 'week'){
thirtyDaysAgoTimestamp = currentTimestamp - (7 * 24 * 60 * 60);
}
filterData.rangePickerValue = [formatTime(thirtyDaysAgoTimestamp,'YYYY-MM-DD'),formatTime(currentTimestamp,'YYYY-MM-DD')]
gettrialList();
}
//获取列表
let gettrialList = async () => {
Https.axiosGet(Https.httpUrls.conversionRate).then((rv: any) => {
let startDate: any = filterData.rangePickerValue?.[0]
? filterData.rangePickerValue[0]+' '+'00:00:00'
: "";
let endDate: any = filterData.rangePickerValue?.[1]
? filterData.rangePickerValue[1]+' '+'00:00:00'
: "";
let data = {
endTime:endDate,
startTime:startDate,
}
Https.axiosGet(Https.httpUrls.conversionRate,{params:data}).then((rv: any) => {
if (rv) {
let entries:any = Object.entries(rv);
let data: any = [];
@@ -99,7 +148,8 @@ export default defineComponent({
},
legend: {
top: '10%',
left: 'center'
left: 'center',
// formatter: '{a} <br/>{b}'
},
series: [
{
@@ -120,10 +170,10 @@ export default defineComponent({
show: true,
fontSize: 30,
fontWeight: 'bold'
}
},
},
labelLine: {
show: false
show: false,
},
data: data
}
@@ -141,6 +191,7 @@ export default defineComponent({
return {
...toRefs(filter),
...toRefs(filterData),
lastGeTrialList,
searchHistoryList,
gettrialList,
pageChartDom,

View File

@@ -1,11 +1,35 @@
<template>
<div class="recentNewUserChart admin_page">
<div class="admin_table_search">
<div class="admin_state">
</div>
<div class="admin_search">
<div class="admin_state">
<div class="admin_state_item">
<span>Select Time:</span>
<a-range-picker
style="width:250px"
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
</div>
<div class="admin_search">
<div class="admin_search_item" @click="searchHistoryList">Search</div>
</div>
<div class="admin_state_list">
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
</div>
</div>
<div class="admin_table_content" ref="pageChartDom"></div>
@@ -61,9 +85,34 @@ export default defineComponent({
let searchHistoryList = () => {
gettrialList();
};
let lastGeTrialList = (str:string)=>{
let currentDate = new Date();
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
// 计算30天前的时间戳
let thirtyDaysAgoTimestamp
if(str == 'year'){
thirtyDaysAgoTimestamp = currentTimestamp - (360 * 24 * 60 * 60);
}else if(str == 'month'){
thirtyDaysAgoTimestamp = currentTimestamp - (30 * 24 * 60 * 60);
}else if(str == 'week'){
thirtyDaysAgoTimestamp = currentTimestamp - (7 * 24 * 60 * 60);
}
filterData.rangePickerValue = [formatTime(thirtyDaysAgoTimestamp,'YYYY-MM-DD'),formatTime(currentTimestamp,'YYYY-MM-DD')]
gettrialList();
}
//获取列表
let gettrialList = async () => {
Https.axiosGet(Https.httpUrls.trialUserCountry).then((rv: any) => {
let startDate: any = filterData.rangePickerValue?.[0]
? filterData.rangePickerValue[0]+' '+'00:00:00'
: "";
let endDate: any = filterData.rangePickerValue?.[1]
? filterData.rangePickerValue[1]+' '+'00:00:00'
: "";
let data = {
endTime:endDate,
startTime:startDate,
}
Https.axiosGet(Https.httpUrls.trialUserCountry,{params:data}).then((rv: any) => {
if (rv) {
let data: any = [];
rv.names.forEach((item: any, index: number) => {
@@ -137,6 +186,7 @@ export default defineComponent({
return {
...toRefs(filter),
...toRefs(filterData),
lastGeTrialList,
state,
searchHistoryList,
gettrialList,

View File

@@ -185,7 +185,6 @@ import { Modal,message } from 'ant-design-vue';
import {getUploadUrl,isMoible,setGradual} from '@/tool/util'
import { useStore } from "vuex";
import { openGuide,driverObj__ } from "@/tool/guide";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
import addDetails from '@/component/Detail/addDetails.vue'
export default defineComponent({
@@ -204,6 +203,9 @@ export default defineComponent({
let designItemDetail :any = computed(()=>{
return store.state.DesignDetailModule.designItemDetail
})
const userDetail = computed(()=>{
return store.state.UserHabit.userDetail
})
let parentData:any = ref({
design:{},
index:0,
@@ -224,7 +226,6 @@ export default defineComponent({
let body = ref(false)
let designItemId = ref()
let designOutfitId = ref()
let userInfo:any = {}
let ifSubmit = ref(false)
let designItemDetailUrl = ref({})
let setRevocationShow = ref(false)//判断是不是第一次进来和切换下一张
@@ -252,6 +253,7 @@ export default defineComponent({
return{
designItemDetail,
userDetail,
store,
parentData,
others,
@@ -261,7 +263,6 @@ export default defineComponent({
body,
designItemId,
designOutfitId,
userInfo,
ifSubmit,
designItemDetailUrl,
setRevocationShow,
@@ -386,8 +387,6 @@ export default defineComponent({
window.removeEventListener('beforeunload',beforeunload)
}
window.addEventListener('beforeunload',beforeunload)
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
// this.loadingShow = true
// Https.axiosGet(url).then(
@@ -783,7 +782,7 @@ export default defineComponent({
isPreview:false,
sketchString:'',
ifSubmit:designItemDetail.isPreview,
processId:String(this.userInfo?.userId),
processId:this.userDetail.userId,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
}
if(str == 'preview'){

View File

@@ -51,12 +51,10 @@
<script lang="ts">
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { message,Modal } from "ant-design-vue";
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { downloadIamge } from "@/tool/util";
import { useI18n } from "vue-i18n";

View File

@@ -70,9 +70,6 @@ export default defineComponent({
isNoData:false,//如果数据为空就不加载
loadingShow:{},
})
let systemUser = computed(()=>{
return store.state.UserHabit.systemUser
})
let likeFile = (item:any,type:string) => {
}
let setBack = ()=>{
@@ -112,7 +109,6 @@ export default defineComponent({
})
return {
...toRefs(filter),
systemUser,
likeFile,
setBack,
openButton,

View File

@@ -166,7 +166,6 @@ import { Https } from "@/tool/https";
import GO from "@/tool/GO";
import { defineComponent, h,ref,inject, nextTick } from 'vue'
import { LoadingOutlined } from '@ant-design/icons-vue';
import {getCookie} from '@/tool/cookie'
import {getUploadUrl,rgbToHsv,isMoible} from '@/tool/util'
import {useStore} from 'vuex'
import ColorThief from '@/tool/colorthief/colorthief'
@@ -351,7 +350,6 @@ export default defineComponent({
level1Type:'Moodboard',
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
},
token:'',
uploadUrl:'',
store:useStore(),
colorPickerVisible: true,
@@ -361,7 +359,6 @@ export default defineComponent({
},
mounted(){
nextTick(()=>{
this.token = getCookie('token') || ''
this.uploadUrl = getUploadUrl()
})

View File

@@ -178,7 +178,7 @@
<label class="uploadImage">
<i class="fi fi-br-upload" ></i>
<input type="file" @change="uploadImage">
<input type="file" @change="uploadImage" accept="image/*">
</label>
<i class="icon iconfont" @click="setOperation('text')" :class="{active:operation == 'text'}">T</i>
<i class="icon iconfont icon-IC-yehua" @click="setLiquefaction()"></i>
@@ -302,7 +302,7 @@
</div>
</template>
<script>
import {defineComponent, computed, h, ref, nextTick, inject, reactive, onMounted,
import {defineComponent, computed, h, ref, nextTick, inject, reactive, onMounted,onBeforeUnmount
} from "vue";
import { Https } from "@/tool/https";
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
@@ -734,6 +734,7 @@ export default defineComponent({
imgUrl = data.designOutfitUrl;
imgWidth[key] = setImageWidth(key,img);
}
if(key == 'upImgFiles')imgWidth[key] = setImageWidth(key,img);
let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
@@ -1197,8 +1198,10 @@ export default defineComponent({
// let brushwork = ref('')
// 监听键盘的 keydown 和 keyup 事件
let keyDown = []
let oldOperation = ''
let canvasKeyDown = (event) => {
if(keyDown.indexOf(event.key)>-1){
event.preventDefault();
if(keyDown.indexOf(event.code)>-1){
}else{
keyDown.push(event.code)
if(event.key === 'Enter' && operation.value == 'fold'){
@@ -1213,13 +1216,54 @@ export default defineComponent({
copy()
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyV') > -1){
paste()
}else if(keyDown.indexOf('BracketLeft') > -1){
let width = canvasPencilWidth.value[operation.value]
console.log(width);
canvasPencilWidth.value[operation.value] = (width - 5) < 3?3:(width - 5)
console.log(canvasPencilWidth.value[operation.value]);
setPencilWidth()
}else if(keyDown.indexOf('BracketRight') > -1){
let width = canvasPencilWidth.value[operation.value]
canvasPencilWidth.value[operation.value] = (width + 5) > 50?50:(width + 5)
setPencilWidth()
}else if(keyDown.indexOf('KeyI') > -1){
getColor()//吸色
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyD') > -1){
canvas.discardActiveObject().renderAll();
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyO') > -1){
let input = document.querySelector('.uploadImage input')
input.click()
}else if(keyDown.indexOf('Backquote') > -1){
if(operation.value == 'pencil' || operation.value == 'texture'){
oldOperation = operation.value
setOperation('eraser')
}
}
}
}
let getColor = async ()=>{
try {
const dropper = new EyeDropper();
const result = await dropper.open();
let hex = result.sRGBHex.replace("#", "");
// 将十六进制颜色码拆分成红、绿、蓝三个部分
// const r = parseInt(hex.substring(0, 2), 16);
// const g = parseInt(hex.substring(2, 4), 16);
// const b = parseInt(hex.substring(4, 6), 16);
canvasPencilColor.value = result.sRGBHex;
setPencilColor()
} catch (e) {
message.info(this.t('ColorboardUpload.jsContent1'))
}
}
let canvasKeyUp = (event) =>{
keyDown = keyDown.filter(function(item) {
return event.code !== item;
})
if(event.code == 'Backquote' && oldOperation){
setOperation(oldOperation)
oldOperation = ''
}
}
let setCanvasKeyDown = (event)=>{
// let e = event || window.event
@@ -1378,6 +1422,7 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.canvasElementUpload, formData,config).then((rv)=>{
rv.imgUrl = rv.minioUrl
fabric.Image.fromURL(rv.minioUrl,(img) => {
console.log(canvas.wrapperEl.parentNode.scrollTop);
setCanvasImage(img,"upImgFiles",0,canvas.wrapperEl.parentNode.scrollTop,rv)
canvas.add(img);
},{ crossOrigin: "Anonymous" })
@@ -1570,6 +1615,7 @@ export default defineComponent({
setFontFamily()
return
}
console.log(canvasPencilColor.value);
// brushIndicator.fill = canvasPencilColor.value;
if(canvas.freeDrawingBrush.isEraser){
}else{
@@ -2061,6 +2107,10 @@ export default defineComponent({
fontFamily.value = arr[0].value
});
onBeforeUnmount(()=>{
document.removeEventListener("keydown", setCanvasKeyDown);
document.removeEventListener("keyup", clearCanvasKeyDown);
})
return {
toSvg,
t,

View File

@@ -127,8 +127,27 @@
@click.stop=""
v-model="searchPictureName"
></textarea>
<div v-show="!isGenerate" class="generage_btn started_btn" :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click.stop="getgenerate">
{{ $t('Generate.Generate') }}
<div class="generage_btn_box" v-show="!isGenerate">
<div class="generage_btn started_btn">
<div :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click.stop="getgenerate">
<span
v-if="
type_.type2 == 'Moodboard' ||
(type_.type2 == 'Printboard' && scene?.value == 'Pattern') ||
(type_.type2 == 'Sketchboard' && scene?.value == 'generate')"
>
{{ speedData.label }}
</span>
<span v-else>{{ $t('Generate.Generate') }}</span>
</div>
<div class="icon iconfont icon-xiala" v-show="
type_.type2 == 'Moodboard' ||
(type_.type2 == 'Printboard' && scene?.value == 'Pattern') ||
(type_.type2 == 'Sketchboard' && scene?.value == 'generate')" :class="{active:speedState}" @click.stop="openSpeed"></div>
</div>
<div class="content" v-show="speedState">
<div v-for="item in speedList" :key="item.value" @click="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div>
</div>
<div v-show="isGenerate && !remGenerate" class="generage_btn started_btn" :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click="getgenerate">
<i class="fi fi-br-loading"></i>
@@ -182,7 +201,7 @@
<script lang="ts">
import { LoadingOutlined } from "@ant-design/icons-vue";
import { message, Upload, Modal } from "ant-design-vue";
import { defineComponent, computed, createVNode, h, ref,watch, nextTick, inject } from "vue";
import { defineComponent, computed, reactive, createVNode, h, ref,watch, nextTick, inject, toRefs } from "vue";
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import GO from "@/tool/GO";
@@ -206,7 +225,9 @@ export default defineComponent({
props: ["msg",'sketchCatecoryList','scene'],
setup(props) {
// console.log(prop.msg);
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let printModelList:any = ref([])
let sketchStyleList:any = ref([])
let printModel:any = ref({
@@ -234,7 +255,6 @@ export default defineComponent({
let driver__:any = inject('driver__')
let {t} = useI18n()
let isTest = ref()
let userInfo:any = {}
let generateTime:any = ref()
let generateProceedList:any = ref([])
let remGenerate:any = ref(false)
@@ -243,7 +263,39 @@ export default defineComponent({
let generateLevel2Type = ''
let isSloganHint:any = ref(' ')
let loadingShow =ref(false)
let speed = reactive({
speedList:[
{
title:'Picture quality is average, speed is fast',
label:'Low Quality',
value:'fast',
},{
title:'Picture quality is high, speed is slow',
label:'High Quality',
value:'high',
},
],
speedState:false,
speedData:{
title:'Picture quality is average, speed is fast',
label:'Low Quality',
value:'fast',
},
})
const openSpeed = ()=>{
speed.speedState = !speed.speedState
if(speed.speedState){
document.addEventListener('click',openSpeed)
}else{
document.removeEventListener('click',openSpeed)
}
}
const setSpeed = (item:any)=>{
speed.speedData = item
}
return {
userDetail,
searchPictureName,
searchPictureSeed,
store,
@@ -264,7 +316,6 @@ export default defineComponent({
driver__,
t,
isTest,
userInfo,
generateTime,
generateProceedList,
remGenerate,
@@ -273,6 +324,9 @@ export default defineComponent({
generateLevel2Type,
isSloganHint,
loadingShow,
...toRefs(speed),
openSpeed,
setSpeed,
};
},
data(prop) {
@@ -309,8 +363,6 @@ export default defineComponent({
// item.id_ = GO.id++
// })
// this.store.commit("addGenerateFils", this.fileList);
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.token = getCookie("token") || "";
let isTest:any = getCookie('isTest')
this.isTest =JSON.parse(isTest)
@@ -322,17 +374,17 @@ export default defineComponent({
if(this.type_.type2 == 'Printboard'){
this.printModelList = [
{
num:'',
num:1,
optype:false,
value:'Painting Style',
label:useI18n().t('Generate.Model1')
},{
num:'',
num:2,
optype:false,
value:'Illustration Style',
label:useI18n().t('Generate.Model2')
},{
num:'',
num:3,
optype:false,
value:'Real Style',
label:useI18n().t('Generate.Model3')
@@ -340,7 +392,7 @@ export default defineComponent({
]
}else if(this.type_.type2 == 'Sketchboard'){
this.printModelList = JSON.parse(JSON.stringify(this.store.state.UserHabit.SketchStyle))
let imgList = ['/image/sketch/sketch-fine.jpg','/image/sketch/sketch-medium.jpg','/image/sketch/sketch-thick.jpg']
let imgList = ['/image/sketch/sketch-thick.jpg','/image/sketch/sketch-medium.jpg','/image/sketch/sketch-fine.jpg']
this.printModelList.forEach((item:any,index:number)=>{
item.img = imgList[index]
})
@@ -536,9 +588,9 @@ export default defineComponent({
level2Type:level2Type,
text:sloganText,
seed:this.searchPictureSeed,
userId:this?.userInfo?.userId,
userId:this?.userDetail?.userId,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
version:1,//为1就是Print
version:this.speedData.value,//为1就是Print
isTestUser:this.driver__.driver?false:this.isTest,
gender:this.workspace.sexEnum.value,
sloganBase64:base64,
@@ -649,7 +701,7 @@ export default defineComponent({
}
let data = {
uniqueId:str,
userId:this?.userInfo?.userId,
userId:this?.userDetail?.userId,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
type: type
}

View File

@@ -420,7 +420,6 @@ export default defineComponent({
(rv) => {
if (rv) {
this.userInfo.email = this.email;
setCookie("userInfo", JSON.stringify(this.userInfo));
(this.bindEmailVisible = false),
(this.bindEmailStep = 1);
this.clearTimer();

View File

@@ -85,7 +85,6 @@ export default defineComponent({
let record:any = ref([
])
const userInfo:any = {}
let bloodBars:any = ref(0)
let {t} = useI18n()
let isTest = ref()
@@ -95,6 +94,9 @@ export default defineComponent({
return store.state.Guide.guide
})
let driver__Time:any = ref()
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
return {
robotTop,
robotInput,
@@ -104,14 +106,14 @@ export default defineComponent({
robotChildDom,
timeTop,
timeInput,
userInfo,
bloodBars,
t,
isTest,
store,
workspace,
driver__,
driver__Time
driver__Time,
userDetail
};
},
data() {
@@ -171,10 +173,8 @@ export default defineComponent({
},
mounted() {
this.textScroll()
let userInfo:any = getCookie("userInfo")
let isTest:any = getCookie('isTest')
this.isTest =JSON.parse(isTest)
this.userInfo = JSON.parse(userInfo);
if (sessionStorage.getItem("record") == null) {
this.record = []
}else{
@@ -220,7 +220,7 @@ export default defineComponent({
this.createTimer()
},
getBloodBars(){
Https.axiosGet(Https.httpUrls.getBloodBars,{params:{userId:this?.userInfo?.userId}}).then((rv: any) => {
Https.axiosGet(Https.httpUrls.getBloodBars,{params:{userId:this?.userDetail?.userId}}).then((rv: any) => {
if (rv) {
if(rv <= 0){
rv = 0
@@ -277,7 +277,7 @@ export default defineComponent({
// sessionStorage.removeItem
let a = true
let data = {
"user_id" : this.userInfo?.userId,
"user_id" : this.userDetail?.userId,
"session_id":sessionId,
"message" : this.chatCentent,
gender:this.workspace.sexEnum.value,
@@ -386,7 +386,7 @@ export default defineComponent({
likeFile(item:any,imgIndex:number,index:number){
let data = {
...item,
"userId" : this.userInfo?.userId,
"userId" : this.userDetail?.userId,
}
Https.axiosPost(Https.httpUrls.pictureLikeOrUnLike, data).then(
(rv) => {

View File

@@ -221,7 +221,6 @@ export default defineComponent({
let {t} = useI18n()
let driver__:any = inject('driver__')
let isTest = ref()
let userInfo:any = {}
let useGenerate:any = ref({
imgId : '',
imgUrl:1,
@@ -249,7 +248,6 @@ export default defineComponent({
t,
driver__,
isTest,
userInfo,
useGenerate,
scene,
openMenu,
@@ -347,8 +345,6 @@ export default defineComponent({
}
},
mounted() {
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.token = getCookie("token") || "";
let isTest:any = getCookie('isTest')
this.isTest =JSON.parse(isTest)

View File

@@ -28,9 +28,6 @@
<script lang="ts">
import { defineComponent, h, ref ,computed,reactive, nextTick} from "vue";
// import { Https } from "@/tool/https";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
// import { getCookie } from "@/tool/cookie";
import { openGuide,driverObj__ } from "@/tool/guide";
// import domTurnImg from '@/tool/domTurnImg'

View File

@@ -87,8 +87,6 @@
<script>
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
import { Https } from "@/tool/https";
import { formatTime } from "@/tool/util";
import { setCookie, getCookie } from "@/tool/cookie";
import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import allOrder from "@/component/Pay/allOrder.vue";

View File

@@ -60,7 +60,6 @@ import { useStore } from "vuex";
import { Https } from "@/tool/https";
import { openGuide,driverObj__ } from "@/tool/guide";
import { getUploadUrl } from "@/tool/util";
import { getCookie } from "@/tool/cookie";
import { message, Upload, Modal } from "ant-design-vue";
export default defineComponent({
name:'filterComponent',
@@ -170,7 +169,6 @@ import { message, Upload, Modal } from "ant-design-vue";
level1Type: 'Sketchboard',
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
},
token: "",
uploadUrl: "",
type_: {
type1: "generate",
@@ -183,7 +181,6 @@ import { message, Upload, Modal } from "ant-design-vue";
},
mounted() {
this.uploadUrl = getUploadUrl();
this.token = getCookie("token") || "";
this.upload.gender = this.store?.state?.Workspace?.workspace?.sexEnum?.value
}
});

View File

@@ -40,7 +40,6 @@ import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{

View File

@@ -244,7 +244,6 @@
<script lang="ts">
import { LoadingOutlined } from "@ant-design/icons-vue";
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
@@ -268,6 +267,9 @@ export default defineComponent({
props: ['setTask'],
setup(props,{emit}) {
const store = useStore();
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
const {t} = useI18n()
const upload:any = ref({})
let driver__:any = computed(()=>{
@@ -610,12 +612,11 @@ export default defineComponent({
productImgData.isProductimg = false
productImgData.remProductimg= false
clearInterval(prductimgTime)
let userInfo:any = getCookie("userInfo")
if(generateProceedList){
// let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
let str = generateProceedList.join(',')
let data = {
uniqueId:str,userId:JSON.parse(userInfo).userId,
uniqueId:str,userId:userDetail.value.userId,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
type:productimgMenu.value.value,
}

View File

@@ -138,12 +138,11 @@
</template>
<script lang="ts">
import { defineComponent, h, ref ,toRefs,createVNode,reactive, nextTick} from "vue";
import { defineComponent, h, ref ,toRefs,createVNode,reactive, computed} from "vue";
import { Https } from "@/tool/https";
import { Modal } from "ant-design-vue";
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { downloadIamge } from "@/tool/util";
import { getCookie,setCookie } from "@/tool/cookie";
import { useI18n } from "vue-i18n";
import { useStore } from "vuex";
import generalMiniCanvas from "@/component/modules/generalMiniCanvas.vue";
@@ -170,6 +169,9 @@ export default defineComponent({
},
setup(props:any,{emit}) {
const store = useStore();
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let {t} = useI18n()
let productimg = reactive({
isProductimg:false,
@@ -292,13 +294,12 @@ export default defineComponent({
productimg.productimgIsProductimg = false
productimg.productimgRemProductimg= false
clearInterval(prductimgTime)
let userInfo:any = getCookie("userInfo")
if(generateProceedList){
// let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
let str = generateProceedList.join(',')
let data = {
uniqueId:str,
userId:JSON.parse(userInfo).userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
userId:userDetail.value.userId,
type:scaleImageList.value[scaleImageIndex.value]?.resultType
}
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(

View File

@@ -53,12 +53,10 @@
<script lang="ts">
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { message,Modal } from "ant-design-vue";
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { downloadIamge } from "@/tool/util";
import { useI18n } from "vue-i18n";

View File

@@ -33,7 +33,7 @@
</div>
</div>
</div>
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
<div style="display: flex; align-items: center;">
<div style="display: flex; align-items: center;">
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
@@ -62,7 +62,7 @@
</a-select> -->
<div>{{ sex.label }}</div>
</div>
<div class="placement_point_item" v-for="(point,index) in pointList" :key="index" @touchmove="touchmove($event)">
<div class="placement_point_item" v-for="(point,index) in pointList" :key="index" @mousemove="mouseMove" @touchmove="touchmove($event)">
<div class="ponit_title">{{point.title}}</div>
<div class="point_list">
<div class="point_item" v-for="item in point.pointList" :key="item.color" :style="{borderColor:item.color,visibility:item.show?'inherit':'hidden'}" @mousedown="AddDian(item)" @touchstart="AddDian(item)"><div class="point_block" :style="{background:item.color}"></div></div>
@@ -137,10 +137,9 @@
</template>
<script lang="ts">
import { defineComponent,ref,createVNode,nextTick} from 'vue'
import { defineComponent,ref,createVNode,nextTick,computed} from 'vue'
import { Https } from "@/tool/https";
import {dataURLtoFile,base64toFile} from "@/tool/util"
import { getCookie } from "@/tool/cookie";
import 'vue-cropper/dist/index.css'
import { VueCropper } from "vue-cropper";
import { useStore } from "vuex";
@@ -154,6 +153,9 @@ export default defineComponent({
},
setup() {
const store = useStore()
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let oldLocationList:any = ref([])
let locationList:any = ref([])
let printObject:any = ref({})
@@ -164,7 +166,6 @@ export default defineComponent({
let pointList:any = ref([])
let isSubmit:any = ref(false) //判断历史是否有提交过
let manager:any = ref(false)
let userInfo:any = ref()
let sex:any = ref({})
let sexList:any = ref([
@@ -174,6 +175,7 @@ export default defineComponent({
let {t} = useI18n()
return {
store,
userDetail,
oldLocationList,
locationList,
printObject,
@@ -184,7 +186,6 @@ export default defineComponent({
pointList,
isSubmit,
manager,
userInfo,
sex,
sexList,
cropperTime,
@@ -239,8 +240,6 @@ export default defineComponent({
}
},
mounted(){
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
// this.getSex()
},
methods:{
@@ -589,7 +588,7 @@ export default defineComponent({
// })
let cropper:any = this.$refs.cropper,
that = this
if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 83)){
if((this.modelType == 'System' && this.userDetail.userId == 88) || (this.modelType == 'System' &&this.userDetail.userId == 83)){
if(this.printObject.templateId){
this.printObject.id = this.printObject.relationId
this.confrimSubmit()
@@ -631,7 +630,7 @@ export default defineComponent({
},
async confrimSubmit(){
let modelType = 'Library'
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
modelType = this.modelType
}
let param = {
@@ -659,7 +658,7 @@ export default defineComponent({
customRequest(){
let modelType = 'Library'
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
modelType = this.modelType
}
let new_data = {

View File

@@ -33,7 +33,7 @@
</div>
</div>
</div>
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
<div style="display: flex; align-items: center;">
<div style="display: flex; align-items: center;">
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
@@ -137,10 +137,9 @@
</template>
<script lang="ts">
import { defineComponent,ref,createVNode,nextTick} from 'vue'
import { defineComponent,ref,createVNode,nextTick,computed} from 'vue'
import { Https } from "@/tool/https";
import {dataURLtoFile,base64toFile} from "@/tool/util"
import { getCookie } from "@/tool/cookie";
import 'vue-cropper/dist/index.css'
import { VueCropper } from "vue-cropper";
import { useStore } from "vuex";
@@ -164,7 +163,6 @@ export default defineComponent({
let pointList:any = ref([])
let isSubmit:any = ref(false) //判断历史是否有提交过
let manager:any = ref(false)
let userInfo:any = ref()
let sex:any = ref({})
let sexList:any = ref([
@@ -172,6 +170,9 @@ export default defineComponent({
let cropperTime:any = ref()
let {t} = useI18n()
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
return {
store,
oldLocationList,
@@ -184,13 +185,13 @@ export default defineComponent({
pointList,
isSubmit,
manager,
userInfo,
sex,
sexList,
cropperTime,
t,
getMousePosition
getMousePosition,
userDetail
}
},
data(){
@@ -236,8 +237,6 @@ export default defineComponent({
}
},
mounted(){
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
// this.getSex()
},
methods:{
@@ -586,7 +585,7 @@ export default defineComponent({
// })
let cropper:any = this.$refs.cropper,
that = this
if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 83)){
if((this.modelType == 'System' && this.userDetail.userId == 88) || (this.modelType == 'System' &&this.userDetail.userId == 83)){
if(this.printObject.templateId){
this.printObject.id = this.printObject.relationId
this.confrimSubmit()
@@ -628,7 +627,7 @@ export default defineComponent({
},
async confrimSubmit(){
let modelType = 'Library'
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
modelType = this.modelType
}
let param = {
@@ -656,7 +655,7 @@ export default defineComponent({
customRequest(){
let modelType = 'Library'
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
modelType = this.modelType
}
let new_data = {

View File

@@ -32,7 +32,7 @@
</div>
</div>
</div>
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
<div style="display: flex; align-items: center;">
<div style="display: flex; align-items: center;">
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
@@ -107,10 +107,9 @@
</template>
<script lang="ts">
import { defineComponent,ref,createVNode} from 'vue'
import { defineComponent,ref,createVNode,computed} from 'vue'
import { Https } from "@/tool/https";
import {dataURLtoFile} from "@/tool/util"
import { getCookie } from "@/tool/cookie";
import { useStore } from "vuex";
import { Modal,message } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
@@ -127,8 +126,9 @@ export default defineComponent({
let pointList:any = ref([])
let isSubmit:any = ref(false) //判断历史是否有提交过
let manager:any = ref(false)
let userInfo:any = ref()
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
return {
store,
oldLocationList,
@@ -141,7 +141,7 @@ export default defineComponent({
pointList,
isSubmit,
manager,
userInfo
userDetail
}
},
data(){
@@ -162,8 +162,6 @@ export default defineComponent({
}
},
mounted(){
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.getSex()
},
methods:{
@@ -398,7 +396,7 @@ export default defineComponent({
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
...this.getPrintLocation()
}
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
// param.modelType = this.modelType
}
this.isShowMark = true
@@ -424,7 +422,7 @@ export default defineComponent({
modelType:'System',
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
}
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
// new_data.modelType = this.modelType
new_data.sex = this.sex
}

View File

@@ -82,7 +82,6 @@ import { defineComponent,ref,createVNode,watch,nextTick,inject} from 'vue'
import { Https } from "@/tool/https";
// import {dataURLtoFile,base64toFile} from "@/tool/util"
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
// import { getCookie } from "@/tool/cookie";
import 'vue-cropper/dist/index.css'
import { VueCropper } from "vue-cropper";
// import { useStore } from "vuex";

View File

@@ -53,7 +53,6 @@ import { defineComponent,ref,createVNode,watch,nextTick,inject} from 'vue'
import { Https } from "@/tool/https";
// import {dataURLtoFile,base64toFile} from "@/tool/util"
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
// import { getCookie } from "@/tool/cookie";
import 'vue-cropper/dist/index.css'
import { VueCropper } from "vue-cropper";
// import { useStore } from "vuex";

View File

@@ -1,11 +1,13 @@
<template>
<div class="Container">
<!-- 谷歌登录 -->
<div class="g_id_signin" id="g_id_signin"></div>
<div class="g_id_signin" id="g_id_signin">
<img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
</div>
</div>
</template>
<script>
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
import { defineComponent, ref, reactive, watch, onMounted, onBeforeUnmount, toRefs } from "vue";
export default defineComponent({
name: "login",
@@ -17,38 +19,49 @@
emit('googelLogin',code)
}
let data = reactive({
// scriptSrc:'https://apis.google.com/js/platform.js',
scriptSrc:'https://accounts.google.com/gsi/client',
script:null
})
let GOOGLE_CLIENT_ID = '194770296147-njd68pm7tnapgonkj2h48mhf63n15n3f.apps.googleusercontent.com'
// let GOOGLE_CLIENT_ID = '399537927614-3sd3rs9p79doocsrff7gm5m1f3chvmn2.apps.googleusercontent.com'
// 使用谷歌登录的api
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(!existingScript){
const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{
document.body.appendChild(script);
window.google.accounts.id.initialize({
// 主要就是填写client_id
client_id: GOOGLE_CLIENT_ID,
auto_select: false,
callback: handleCredentialResponse,
// context:"signin",
ux_mode:"popup",
itp_support:true,
});
window.google.accounts.id.renderButton(
document.getElementById("g_id_signin"),
{
type:"icon",//icon为只有一个icon
shape:"circle",
theme:"outline",
size:"large",
logo_alignment:"center",
const createGmailLogin = async ()=>{
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(!existingScript){
await new Promise((resolve, reject) => {
const script = document.createElement("script");
script.src = data.scriptSrc
script.onload=()=>{
resolve()
}
);
document.body.appendChild(script);
})
}
window.google.accounts.id.initialize({
// 主要就是填写client_id
client_id: GOOGLE_CLIENT_ID,
auto_select: false,
callback: handleCredentialResponse,
// context:"signin",
ux_mode:"popup",
itp_support:true,
});
window.google.accounts.id.renderButton(
document.getElementById("g_id_signin"),
{
type:"icon",//icon为只有一个icon
shape:"circle",
theme:"outline",
size:"large",
logo_alignment:"center",
});
}
onBeforeUnmount(()=>{
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(existingScript)existingScript.remove()
})
createGmailLogin()
return {
}
},
@@ -62,5 +75,22 @@
padding: 0;
}
}
.g_id_signin{
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #dadce0;
border-radius: 50%;
cursor: pointer;
&:hover{
background: #f8faff;
}
img{
width: 18px;
height: 18px;
}
}
}
</style>

View File

@@ -34,10 +34,12 @@
<script>
import { defineComponent,ref,reactive,toRefs, onMounted} from "vue";
import { useRoute } from 'vue-router';
export default defineComponent({
components: {
},
setup(){
const route = useRoute();
let weiXinModel = reactive({
weiXinModel:false,
weiXinModelMask:true,
@@ -71,7 +73,7 @@ export default defineComponent({
id: "wx_id_signin", //容器的id
appid: "wxcfb92eb28d6385f5", //应用唯一标识,在微信开放平台提交应用审核通过后获得
scope: "snsapi_login", //应用授权作用域,拥有多个作用域用逗号(,分隔网页应用目前仅填写snsapi_login即可
redirect_uri: `${http}/login`, //扫完码授权成功跳转到的路径
redirect_uri: `${http}${route.path}`, //扫完码授权成功跳转到的路径
state: 'weiXin', //用于保持请求和回调的状态,授权请求后原样带回给第三方。该参数可用于防止 csrf 攻击(跨站请求伪造攻击),建议第三方带上该参数,可设置为简单的随机数加 session 进行校验
style: "black", //提供"black"、"white"可选,默认为黑色文字描述
href: "data:text/css;base64,DQoud2ViX3FyY29kZV90eXBlX2lmcmFtZXsNCglkaXNwbGF5OiBmbGV4Ow0KCWFsaWduLWl0ZW1zOiBjZW50ZXI7DQoJanVzdGlmeS1jb250ZW50OiBjZW50ZXI7DQp9DQoud2ViX3FyY29kZV9wYW5lbF9hcmVhew0KCWhlaWdodDogMTAwJTsNCglkaXNwbGF5OiBmbGV4Ow0KCWFsaWduLWl0ZW1zOiBjZW50ZXI7DQoJanVzdGlmeS1jb250ZW50OiBjZW50ZXI7DQp9" //自定义样式链接,第三方可根据实际需求覆盖默认样式

View File

@@ -4,7 +4,7 @@
<div class="generalModel_state">
<div class="generalModel_state_item">
<!-- <span>{{$t('allOrder.Time')}}:</span> -->
<a-range-picker
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
@@ -22,10 +22,13 @@
</template>
</a-range-picker>
</div>
<div class="generalModel_state_item">
<!-- <span>{{$t('allOrder.Time')}}:</span> -->
<input type="Number" :placeholder="$t('Generate.jsContent3')" v-model="orderId">
</div>
</div>
<div class="generalModel_search">
<div class="gallery_btn" @click="searchAllOrderList()">Search</div>
<div class="gallery_btn" style="margin-left: 2rem;" @click="searchAllOrderList()">Export</div>
<!-- <div
class="generalModel_search_item"
@click="searchAllOrderList()"
@@ -39,7 +42,6 @@
<div class="generalModel_table_content" ref="historyTable">
<a-table
:columns="columns"
:row-selection="{ selectedRowKeys: selectedRowKey, onChange: onSelectChange }"
:data-source="collectionList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
@@ -61,7 +63,7 @@
class="operate_list"
v-if="column?.Operations"
>
<div class="operate_item">{{ $t('HistoryPage.Delete') }}</div>
<div class="operate_item"><a v-if="text" :href="text" target="_blank">LINK</a><span v-else>\</span></div>
</div>
</template>
<template #itemRender="{ type, originalElement }">
@@ -89,8 +91,8 @@ export default defineComponent({
title: useI18n().t('allOrder.Serial'),
align: "center",
ellipsis: true,
dataIndex: "orderNo",
key: "orderNo",
dataIndex: "id",
key: "id",
},
{
title: useI18n().t('allOrder.Time'),
@@ -103,29 +105,37 @@ export default defineComponent({
title: useI18n().t('allOrder.Money'),
align: "center",
ellipsis: true,
dataIndex: "totalFee",
key: "totalFee",
dataIndex: "amount",
key: "amount",
},
{
title: useI18n().t('allOrder.PaymentMethods'),
align: "center",
ellipsis: true,
dataIndex: "paymentType",
key: "paymentType",
dataIndex: "paymentMethod",
key: "paymentMethod",
},
{
title: useI18n().t('allOrder.State'),
align: "center",
ellipsis: true,
dataIndex: "orderStatus",
key: "orderStatus",
dataIndex: "state",
key: "state",
},
{
title: useI18n().t('allOrder.OrderType'),
align: "center",
ellipsis: true,
dataIndex: "title",
key: "title",
dataIndex: "orderType",
key: "orderType",
},
{
title: useI18n().t('allOrder.Receipt'),
align: "center",
ellipsis: true,
Operations:true,
dataIndex: "invoiceLink",
key: "invoiceLink",
},
// {
@@ -139,6 +149,7 @@ export default defineComponent({
});
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let orderId: any = ref();
let collectionList: any = ref([]);
let userInfo: any = {};
@@ -164,6 +175,7 @@ export default defineComponent({
dataList,
renameData,
rangePickerValue,
orderId,
collectionList,
userInfo,
currentState,
@@ -185,9 +197,10 @@ export default defineComponent({
mounted() {
},
methods: {
init(){
init(id:any){
this.currentPage = 1
this.pageSize = 10
this.orderId = id
nextTick(()=>{
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 100;
@@ -215,7 +228,8 @@ export default defineComponent({
isIncome: this.currentState.value == 'income'?true:false,
page:this.currentPage,
size:this.pageSize,
startTime: startDate
startTime: startDate,
orderId:this.orderId
}
// getCreditsDetail
// orderInfoList

View File

@@ -88,7 +88,6 @@
import { defineComponent,ref,reactive,toRefs ,onMounted} from "vue";
import { Https } from "@/tool/https";
import { isEmail } from "@/tool/util";
import { setCookie ,WriteCookie } from "@/tool/cookie";
import { message } from "ant-design-vue";
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
import { useStore } from "vuex";

View File

@@ -71,11 +71,12 @@ export default defineComponent({
},
mounted() {},
methods: {
init() {
init(id:any) {
this.showPayOrder = true;
this.setState('paypal')
this.setState('paypal',id)
if(id)sessionStorage.removeItem('orderId')
},
setState(str:any){
setState(str:any,id:any){
nextTick(()=>{
this.presentState = str
let setInit:any
@@ -84,7 +85,7 @@ export default defineComponent({
}else{
setInit = this.$refs.creditsDetail
}
setInit.init()
setInit.init(id)
})
},
cancelDsign(){

View File

@@ -60,10 +60,10 @@
</div>
<div class="detail_right_user_content">
<div>
<div style="text-align: center;">
<div class="scaleImage_chunk_title_intro">@{{scaleImageData.userName}}</div>
<div v-if="scaleImageData.isFollow == 0 && userInfo?.userId != scaleImageData?.accountId" style="margin-bottom: 0;" class="started_btn" @click="setFollow()" >{{$t('newScaleImage.Follow')}}</div>
<div v-else-if="userInfo?.userId != scaleImageData?.accountId" class="started_btn" style="margin-bottom: 0;" @click="setFollow()" >{{$t('newScaleImage.Unfollow')}}</div>
<div v-if="scaleImageData.isFollow == 0 && userDetail?.userId != scaleImageData?.accountId" style="margin-bottom: 0;" class="started_btn" @click="setFollow()" >{{$t('newScaleImage.Follow')}}</div>
<div v-else-if="userDetail?.userId != scaleImageData?.accountId" class="started_btn" style="margin-bottom: 0;" @click="setFollow()" >{{$t('newScaleImage.Unfollow')}}</div>
</div>
<div v-if="scaleImageData.original == 1" class="scaleImage_chunk_title_intro scaleImage_chunk_title_Original">{{$t('newScaleImage.Original')}}</div>
<div v-else @click="originalGetDetail()" class="scaleImage_chunk_title_intro">{{$t('newScaleImage.from')}}<span :class="{active:scaleImageData.jumpable == 1}"> @{{ scaleImageData.originalUserName }}/{{ scaleImageData.portfolioName }}</span></div>
@@ -99,7 +99,7 @@
<i class="fi fi-rr-comment-alt-dots"></i>
<span>{{commentList.length}}</span>
</div>
<div v-if="userInfo?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
<div v-if="userDetail?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
<i class="icon iconfont icon-shanchu operate_icon"></i>
<!-- <span>{{$t('newScaleImage.Delete')}}</span> -->
</div>
@@ -111,7 +111,7 @@
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
</div>
</div>
<div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
<div v-if="userDetail.systemUser == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
</div>
<div v-else class="newScaleImage_right_content_generate">
@@ -206,7 +206,7 @@
<span>123</span>
</div> -->
<div class="left_content_item_btn">
<div class="left_content_item_delete" v-if="userInfo?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_delete" v-if="userDetail?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_unfold" @click="()=>item.detailUnfold = !item.detailUnfold">{{item.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
</div>
</div>
@@ -231,7 +231,7 @@
<span>123</span>
</div> -->
<div class="left_content_item_btn">
<div class="left_content_item_delete" v-if="userInfo?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_delete" v-if="userDetail?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_unfold" @click="()=>children.detailUnfold = !children.detailUnfold">{{children.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
</div>
</div>
@@ -266,7 +266,6 @@
<script lang="ts">
import { defineComponent,watch,getCurrentInstance, createVNode, ref ,toRefs,computed,reactive,triggerRef, nextTick, onMounted} from "vue";
import { Https } from "@/tool/https";
import { getCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { useStore } from "vuex";
import { useRouter } from 'vue-router'
@@ -282,8 +281,10 @@ export default defineComponent({
setup(props:any,{emit}) {
let {t} = useI18n()
//首先在setup中定义
let userInfo = ref({});
const store = useStore();
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
const router = useRouter()
let scaleImage: any = ref(false);//弹窗
let scaleImageMask:any = ref(false)//弹窗遮罩
@@ -310,9 +311,6 @@ export default defineComponent({
isNoData:false,
isShowMark:false,
})
let systemUser = computed(()=>{
return store.state.UserHabit.systemUser
})
let commentInputFocus:any = ref()
let textarea: any = ref(null)
let setCopy = ()=>{
@@ -370,6 +368,8 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.getPorfolioDetail,data).then(
(rv: any) => {
imgData.loadingShow = false
if(rv.portfolioDes)rv.portfolioDes = rv.portfolioDes.replace(/#/g, ' ');
imgData.scaleImageData = rv
let canvasUrl = [rv.canvasUrl]
var findUrl = []
@@ -406,7 +406,7 @@ export default defineComponent({
}
let setChoose = () =>{
if(systemUser.value.value !== 1){
if(userDetail.value.systemUser !== 1){
return message.info(t('newScaleImage.jsContent1'))
}
if(imgData.scaleImageData.openSource == 0){
@@ -593,15 +593,12 @@ export default defineComponent({
}
)
onMounted(()=>{
let user:any = getCookie('userInfo')
userInfo.value = JSON.parse(user)
})
return {
userInfo,
userDetail,
scaleImage,
scaleImageMask,
...toRefs(imgData),
systemUser,
commentInputFocus,
textarea,
setCopy,
@@ -801,6 +798,7 @@ export default defineComponent({
justify-content: space-between;
width: 100%;
align-items: flex-start;
.scaleImage_chunk_title_Original{
color: #39215b;
background: #c9a2ff;

View File

@@ -60,7 +60,6 @@
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
</div>
</div>
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
</div>
</div>
</div>
@@ -114,7 +113,7 @@
<i class="fi fi-rr-comment-alt-dots"></i>
<span>{{commentList.length}}</span>
</div>
<div v-if="userInfo?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
<div v-if="userDetail?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
<i class="icon iconfont icon-shanchu operate_icon"></i>
<!-- <span>{{$t('newScaleImage.Delete')}}</span> -->
</div>
@@ -126,7 +125,6 @@
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
</div>
</div>
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
</div>
</div>
<div v-if="false" class="newScaleImageMobile_right_detail">
@@ -177,7 +175,7 @@
<span>123</span>
</div> -->
<div class="left_content_item_btn">
<div class="left_content_item_delete" v-if="userInfo?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_delete" v-if="userDetail?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_unfold" @click="()=>item.detailUnfold = !item.detailUnfold">{{item.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
</div>
</div>
@@ -202,7 +200,7 @@
<span>123</span>
</div> -->
<div class="left_content_item_btn">
<div class="left_content_item_delete" v-if="userInfo?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_delete" v-if="userDetail?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
<div class="left_content_item_unfold" @click="()=>children.detailUnfold = !children.detailUnfold">{{children.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
</div>
</div>
@@ -238,7 +236,6 @@
<script lang="ts">
import { defineComponent,watch,getCurrentInstance, createVNode, ref ,toRefs,computed,reactive,triggerRef, nextTick, onMounted} from "vue";
import { Https } from "@/tool/https";
import { getCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { useStore } from "vuex";
import { useRouter } from 'vue-router'
@@ -256,7 +253,9 @@ export default defineComponent({
setup(props:any,{emit}) {
let {t} = useI18n()
//首先在setup中定义
let userInfo = ref({});
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
const store = useStore();
const router = useRouter()
let scaleImage: any = ref(false);//弹窗
@@ -284,9 +283,6 @@ export default defineComponent({
isNoData:false,
isShowMark:false,
})
let systemUser = computed(()=>{
return store.state.UserHabit.systemUser
})
let commentInputFocus:any = ref()
let textarea: any = ref(null)
let setCopy = ()=>{
@@ -379,7 +375,7 @@ export default defineComponent({
}
let setChoose = () =>{
if(systemUser.value.value !== 1){
if(userDetail.value.systemUser !== 1){
return message.info(t('newScaleImage.jsContent1'))
}
if(imgData.scaleImageData.openSource == 0){
@@ -545,15 +541,12 @@ export default defineComponent({
}
)
onMounted(()=>{
let user:any = getCookie('userInfo')
userInfo.value = JSON.parse(user)
})
return {
userInfo,
userDetail,
scaleImage,
scaleImageMask,
...toRefs(imgData),
systemUser,
commentInputFocus,
textarea,
setCopy,

View File

@@ -76,9 +76,7 @@
<script lang="ts">
import { defineComponent,watch,createVNode, inject, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Modal,message } from 'ant-design-vue';
@@ -115,14 +113,14 @@ export default defineComponent({
})
let portfolio:any = inject('portfolio')
let setPortfolio:any = inject('setPortfolio')
let tagList = ref([{id:1,tagName:'#RCAworkshop_2024',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}])
let tagList = ref([{id:1,tagName:'#AiDAworkshop_2024',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}])
// let textarea: any = ref(null)
// let setCopy = ()=>{
// textarea.value.select()
// document.execCommand("copy");
// }
let init = (data:any)=>{
let userInfo:any = getCookie("userInfo")
let userInfo:any = store.state.UserHabit.userDetail
// console.log(data);
publish.value = true
publishData.selectDate.url = data.imgUrl
@@ -131,7 +129,7 @@ export default defineComponent({
// userLikeGroupId : data.id,
coverId : '',
// coverId : data.groupDetails[0].designOutfitId,
accountId : JSON.parse(userInfo).userId,
accountId : userInfo.userId,
createDate:'',
idDeleted:'',
id:portfolio.value.id?portfolio.value.id:'',

View File

@@ -0,0 +1,267 @@
<template>
<div class="affiliate_home">
<div class="detail">
<div class="detail_item">
<div class="title">Invitation link</div>
<div class="link" @click="copyLink">{{affiliateLink}}</div>
</div>
<div class="detail_item">
<div class="title">Number of link visits</div>
<div class="num">{{linkVisits}}<span>times</span></div>
</div>
<div class="detail_item">
<div class="title">Number of Invitations</div>
<div class="num">{{people}}<span>people</span></div>
</div>
<div class="detail_item">
<div class="title">Earned commission</div>
<div class="num"><sup>$</sup>{{earned}}<span>HKD</span></div>
</div>
<div class="detail_item">
<div class="title">Total commission</div>
<div class="num"><sup>$</sup>{{total}}<span>HKD</span></div>
</div>
</div>
<div class="echarts_box">
<div class="title generalModel_state">
<div class="radio">
<label>
<input name="pric" type="radio" value="monthly" v-model="current.type" @change="setPricType('monthly')">
Monthly
</label>
<label>
<input name="pric" type="radio" value="year" v-model="current.type" @change="setPricType('year')">
Yearly
</label>
</div>
<div class="date generalModel_state_item">
<a-date-picker
class="range_picker"
v-model:value="rangePickerValue"
picker="year"
valueFormat="YYYY"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-date-picker>
</div>
<div class="gallery_btn" style="margin-right: 1rem;" @click="search">Search</div>
</div>
<div class="echarts" ref="echarts">
213
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, nextTick, computed, reactive, toRefs, onMounted } from "vue";
import { Https } from "@/tool/https";
import { useI18n } from "vue-i18n";
import type { Dayjs } from 'dayjs';
import * as echarts from 'echarts/core';
import {
DatasetComponent,
TooltipComponent,
GridComponent,
LegendComponent
} from 'echarts/components';
import { BarChart } from 'echarts/charts';
import { CanvasRenderer } from 'echarts/renderers';
import { color } from "echarts";
import { message } from "ant-design-vue";
export default defineComponent({
components: {
},
setup() {
const affiliateData = reactive({
rangePickerValue:'2024',
current:{
type:'year',
} as any,
affiliateLink:'-------------',
linkVisits:'--',
people:'--',
earned:'--',
total:'--',
echartsList:[]
})
const affiliateDom = reactive({
echarts:null,
})
const setPricType=(str:any)=>{
affiliateData.current.type = str
}
const getUserInfo = ()=>{
Https.axiosGet(Https.httpUrls.personalCenter).then((rv)=>{
affiliateData.affiliateLink = rv.link
affiliateData.linkVisits = rv.linkViewCount
affiliateData.people = rv.visits
affiliateData.earned = rv.unpaidEarnings
affiliateData.total = rv.totalEarnings
})
search()
}
const search = ()=>{
let year = affiliateData.rangePickerValue?affiliateData.rangePickerValue:''
let data = {
year,
}
Https.axiosGet(Https.httpUrls.getPersonalMonthlyIncome,{params:data}).then((rv)=>{
let value = rv.map((item:any,index:any)=>{
return {product:`${index+1}`,'Earned commission':item}
})
console.log(value)
setEcharts(value)
})
}
const copyLink = (e:any)=>{
navigator.clipboard.writeText(e.target.innerText)
.then(() => {
message.success('Copy Successful')
})
.catch(err => {
console.error("复制失败:", err);
});
}
let myChart:any
let setEcharts = (data:any) =>{
if (myChart) {
myChart.setOption({
dataset: {
dimensions: ['product', 'Earned commission'],
source: data
},
});
}else{
echarts.use([
DatasetComponent,
TooltipComponent,
GridComponent,
LegendComponent,
BarChart,
CanvasRenderer
]);
var app = {};
var chartDom = affiliateDom.echarts;
myChart = echarts.init(chartDom);
var option;
option = {
legend: {right: '0%'},
tooltip: {
},
dataset: {
dimensions: ['product', 'Earned commission'],
source: data
},
xAxis: { type: 'category' },
yAxis: {},
series: [{
type: 'bar',
itemStyle:{
borderRadius: [10, 10, 5, 5],
color: '#7f43f6',
}
}]
}
};
option && myChart.setOption(option);
}
onMounted(()=>{
getUserInfo()
})
return {
...toRefs(affiliateData),
...toRefs(affiliateDom),
setPricType,
search,
copyLink,
};
},
})
</script>
<style lang="less" scoped>
.affiliate_home{
height: 100%;
display: flex;
overflow: hidden;
flex-direction: column;
>.detail{
display: flex;
justify-content: space-between;
margin-bottom: 3rem;
>.detail_item{
padding: 2rem 3rem;
background: #eeeff6;
border-radius: 2rem;
width: calc((100% - 1rem * 4) / 5 );
>div{
font-weight: 600;
}
>.title{
margin-bottom: 1rem;
font-size: 2rem;
color: #666;
}
>.link{
font-size: 1.8rem;
color: #000;
text-decoration-line: underline;
cursor: pointer;
}
>.num{
font-size: 4rem;
>span{
font-size: 2rem;
}
}
}
}
>.echarts_box{
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: #fff;
padding: 3rem;
border-radius: 2rem;
>.title{
>.radio{
margin-right: 3rem;
display: flex;
font-size: 1.8rem;
font-weight: 400;
>label{
margin-right: 2rem;
display: flex;
cursor: pointer;
input{
margin-right: 1rem;
}
}
>label:last-child{
margin: 0;
}
}
}
>.echarts{
flex: 1;
}
}
}
</style>

View File

@@ -5,7 +5,7 @@
&lt; BACK
</div>
<div class="title">Choose your subscription plan</div>
<div class="introduce" @click="()=>isSelectSignUp=true">LEARN MORE ALL OUR PRODUCT FEATURES</div>
<div class="introduce"><span @click="()=>isSelectSignUp=true">LEARN MORE ALL OUR PRODUCT FEATURES</span></div>
<div class="gallery_list product_list">
<div class="gallery_item" v-for="item in productList" :key="item">
<div class="product_signUp_box">
@@ -158,7 +158,7 @@
font-size: 1.6rem;
margin-bottom: 3rem;
}
.back,.introduce{
.back,.introduce>span{
cursor: pointer;
}
.title,.introduce{

View File

@@ -498,31 +498,24 @@ export default defineComponent({
let isTest = rv.systemUser == 3 ? true : false;
let isBeginner = rv.isBeginner == 1 ? true : false;
let token = rv.token;
setCookie("isMurmur", false);
setCookie("token", token);
setCookie("isTest", isTest);
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0); //从第一步开始,机器人开始的话就是从第二部开始
setCookie("userInfo", JSON.stringify(rv));
this.store.commit("setSystemUser", rv.systemUser);
let obj: any = {
avatar: rv.avatar,
followeeCount: rv.followeeCount,
followerCount: rv.followerCount,
};
this.store.commit("setUserInfo", obj);
if (rv.systemUser == 0) {
let userid = {
ueserId:rv.userId,
systemUser:rv.systemUser
}
this.store.commit("upUserDetail", userid);
if (window.innerWidth < 768) {
message.info(
"If you need to design, please log in using an iPad or computer."
);
this.turnToHomePage("/Square");
} else {
if (window.innerWidth < 768) {
message.info(
"If you need to design, please log in using an iPad or computer."
);
this.turnToHomePage("/Square");
} else {
this.turnToHomePage("/home");
}
this.turnToHomePage("/home");
}
sessionStorage.setItem(
"isTimeOne",
@@ -537,6 +530,7 @@ export default defineComponent({
},
//邮箱登录提交
submitEmailLogin(emailVerifyCode: any) {
let affiliateRef = sessionStorage.getItem('affiliateRef');
let data = {
email: this.email,
emailVerifyCode: emailVerifyCode,
@@ -545,6 +539,7 @@ export default defineComponent({
"userEmail": this.email,
"userName": this.username,
"userPassword": md5(this.password + "abc"),
invitationCode:affiliateRef?affiliateRef:'',
};
Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data).then(
(rv: any) => {

View File

@@ -34,6 +34,7 @@ export default {
Payment:'支付方式',
State:'状态',
OrderType:'类型',
Receipt:'收据',
Income:'支出',
Expend:'收入',
credits:'积分',

View File

@@ -34,6 +34,7 @@ export default {
Payment:'Payment',
State:'State',
OrderType:'Order Type',
Receipt:'Receipt',
Income:'Income',
Expend:'Expend',
credits:'Credits',

View File

@@ -1,6 +1,7 @@
import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router'
import { defineAsyncComponent } from 'vue'
import store from "@/store"
import { useStore } from "vuex";
import { Https } from "@/tool/https";
import { getCookie, setCookie } from "@/tool/cookie";
const _import = (path: string) => () => import(`../views/${path}.vue`);
@@ -11,6 +12,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: "/",
// redirect重定向
meta:{enter:'all',},
redirect: "/Square"
// redirect: "/upgrade"
@@ -18,6 +20,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/login',
name: 'login',
meta:{enter:'all',},
component: _import('LoginPage')
},
// {
@@ -28,6 +31,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/upgrade',
name: 'upgrade',
meta:{enter:'all',},
component: _import('Upgrade'),
},
// {
@@ -38,6 +42,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/home',
name: 'home',
meta:{enter:'all',},
component: _import('HomeMain'),
children:[
{
@@ -48,56 +53,68 @@ const routes: Array<RouteRecordRaw> = [
{
path:'homePage',
name:'homePage',
meta:{enter:'all',},
component: _import_custom('HomeView/HomeView.vue'),
},{
},{
path:'library',
name:'library',
meta:{enter:'all',},
component: _import_custom('HomeView/library.vue'),
},{
path:'history',
name:'history',
meta:{enter:'all',},
component: _import_custom('HomeView/history.vue'),
},{
path:'works',
name:'works',
meta:{enter:'all',},
component: _import_custom('HomeView/Works.vue'),
},{
path:'events',
name:'events',
meta:{enter:'all',},
component: _import_custom('HomeView/Events.vue'),
},{
path:'eventsDetail',
name:'eventsDetail',
meta:{enter:'all',},
component: _import_component('Events/eventsDetail.vue'),
},{
path:'account',
name:'account',
meta:{enter:'all',},
component: _import_component('Account/account.vue'),
children:[
{
path: "",
name:'accountChil',
meta:{enter:'all',},
redirect: "/home/account/frontPage"
},
{
path:'frontPage',
name:'frontPage',
meta:{enter:'all',},
component: _import_component('Account/frontPage.vue'),
},
{
path:'accountMessage',
name:'accountMessage',
meta:{enter:'all',},
component: _import_component('Account/accountMessage.vue'),
},
{
path:'accountFollowFans',
name:'accountFollowFans',
meta:{enter:'all',},
component: _import_component('Account/accountFollowFans.vue'),
}
]
},{
path:'otherUsers',
name:'otherUsers',
meta:{enter:'all',},
component: _import_component('Account/otherUsers.vue'),
}
]
@@ -105,25 +122,30 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/Square',
name: "HomeRecommend",
meta:{enter:'all',},
component: _import('HomeRecommend'),
children:[
{
path: "",
name:'SquareChil',
meta:{enter:'all',},
redirect: "/Square/works"
},
{
path:'works',
name:'SquareWorks',
meta:{enter:'all',},
component: _import_custom('HomeView/Works.vue'),
},{
path:'events',
name:'SquareEvents',
meta:{enter:'all',},
component: _import_custom('HomeView/Events.vue'),
},{
path:'eventsDetail',
name:'SquareEventsDetail',
meta:{enter:'all',},
component: _import_component('Events/eventsDetail.vue'),
}
]
@@ -146,71 +168,118 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/administrator',
name: 'administrator',
meta:{enter:3,},
component: _import('Administrator'),
children:[
{
path: "",
name:'adminChil',
meta:{enter:3,},
redirect: "/administrator/allUser"
},
{
path:'allUser',
name:'allUser',
meta:{enter:3,},
component: _import_component('Administrator/allUser.vue'),
},
{
path:'testClickData',
name:'testClickData',
meta:{enter:3,},
component: _import_component('Administrator/TestClickData.vue'),
},
{
path:'trialApproval',
name:'trialApproval',
meta:{enter:3,},
component: _import_component('Administrator/trialApproval.vue'),
},{
path:'questionnaire',
name:'questionnaire',
meta:{enter:3,},
component: _import_component('Administrator/questionnaire.vue'),
},{
path:'recentActiveChart',
name:'recentActiveChart',
meta:{enter:3,},
component: _import_component('Administrator/recentActiveChart.vue'),
},{
path:'recentActiveUser',
name:'recentActiveUser',
meta:{enter:3,},
component: _import_component('Administrator/recentActiveUser.vue'),
},{
path:'recentActiveUserChart',
name:'recentActiveUserChart',
meta:{enter:3,},
component: _import_component('Administrator/recentActiveUserChart.vue'),
},{
path:'recentNewUser',
name:'recentNewUser',
meta:{enter:3,},
component: _import_component('Administrator/recentNewUser.vue'),
},{
path:'recentNewUserChart',
name:'recentNewUserChart',
meta:{enter:3,},
component: _import_component('Administrator/recentNewUserChart.vue'),
},{
path:'trialUserCountry',
name:'trialUserCountry',
meta:{enter:3,},
component: _import_component('Administrator/trialUserCountry.vue'),
},{
path:'trialUserConversionRateChart',
name:'trialUserConversionRateChart',
meta:{enter:3,},
component: _import_component('Administrator/trialUserConversionRateChart.vue'),
},{
path:'trialAllUser',
name:'trialAllUser',
meta:{enter:3,},
component: _import_component('Administrator/trialAllUser.vue'),
},{
path:'affiliateAudit',
name:'affiliateAudit',
meta:{enter:3,},
component: _import_component('Administrator/affiliate/affiliateAudit.vue'),
},
]
},
{
path: '/paySucceed',
name: 'paySucceed',
meta:{
enter:'all',
},
component: _import('paySucceed')
},
{
path: '/affiliate',
name: 'affiliate',
meta:{
enter:2,
},
component: _import('affiliate/affiliatePage'),
children:[
{
path: "/affiliate",
name:'affiliateHome',
meta:{
enter:2,
},
component: _import_component('affiliate/home'),
},
]
},{
path: '/affiliateRegister',
name: 'affiliateRegister',
meta:{
enter:'all',
},
component: _import('affiliate/affiliateRegister'),
},
// {
// path: '/library',
// name: 'library',
@@ -224,26 +293,33 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/setIdentification',
name: 'setIdentification',
meta:{
enter:'all',
},
component: _import('setIdentification')
},
{
path: '/feedbackSurvey',
name: 'feedbackSurvey',
meta:{
enter:'all',
},
component: _import('feedbackSurvey'),
},
{
path: '/feedbackSurveyCN',
name: 'feedbackSurveyCN',
meta:{
enter:'all',
},
component: _import('feedbackSurveyCN'),
},
{
path: '/emailVerify',
name: 'emailVerify',
component: _import('emailVerify'),
},
{
path: '/404',
name: '404',
meta:{
enter:'all',
},
component: _import('404')
},
{
@@ -262,23 +338,15 @@ const router = createRouter({
let state:any = store.state
window.addEventListener("beforeunload", (e) => {
localStorage.setItem(
"vuex_setSystemUser",
JSON.stringify(state.UserHabit.systemUser.value)
);
localStorage.setItem(
"vuex_setUserInfo",
JSON.stringify(state.UserHabit.userInfo)
"vuex_setUserDetail",
JSON.stringify(state.UserHabit.userDetail)
);
});
var vuex_setSystemUser:any = localStorage.getItem("vuex_setSystemUser");
var vuex_setUserInfo:any = localStorage.getItem("vuex_setUserInfo");
if (vuex_setSystemUser == 0 || vuex_setSystemUser == 1) {
store.commit("setSystemUser", JSON.parse(vuex_setSystemUser));
localStorage.removeItem("vuex_setSystemUser");
}
if (vuex_setUserInfo) {
store.commit("setUserInfo", JSON.parse(vuex_setUserInfo));
localStorage.removeItem("vuex_setSystemUser");
var vuex_setUserDetail:any = localStorage.getItem("vuex_setUserDetail");
if (vuex_setUserDetail) {
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
// localStorage.removeItem("vuex_setUserDetail");
}
let setMurmur = (id:any)=> {
@@ -299,6 +367,11 @@ let setMurmur = (id:any)=> {
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0);//从第一步开始,机器人开始的话就是从第二部开始
setCookie("userInfo", JSON.stringify(rv));
let userid = {
ueserId:rv.userId,
systemUser:rv.systemUser
}
store.commit("upUserDetail", userid);
sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗
let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
sessionStorage.setItem('sessionId', randomNum);
@@ -309,13 +382,16 @@ let setMurmur = (id:any)=> {
// router.push('/Square')
});
}
}
const setViewsIncrease = (value:any)=>{
sessionStorage.setItem('affiliateRef', value);
let data = {
id:value
}
Https.axiosGet(Https.httpUrls.viewsIncrease,{params:data}).then((rv)=>{})
}
router.beforeEach((to:any, from, next) => {
let upgradeList = ['/feedbackSurvey','/feedbackSurveyCN','emailVerify']//指定页面系统维护也可以访问
// // 系统维护
// 系统维护
// const toName = to.name === 'upgrade';
// if(upgradeList.indexOf(to.path) > -1){
// next();
@@ -332,72 +408,20 @@ router.beforeEach((to:any, from, next) => {
let herfData = window.location.search.substring(1)
if(herfData.split('=')[0] == 'noLogin' && to.name != 'homePage'){
setMurmur(herfData.split('=')[1])
// console.log(`-------------------成功${herfData.split('=')[1]}-------------------`)
return
}
let userInfo = JSON.parse(getCookie("userInfo") as any);
let murmurStr: any = localStorage.getItem('murmurStr')
let getIsMurmur: any = getCookie("isMurmur")
let token = getCookie("token");
let isMurmur = JSON.parse(getIsMurmur)
let routeList = ['/testClickData','/trialApproval']//指定页面需要指定id才能进入
let userIdList = [88,6,46,31,73,83,87,4]
let isSystemUserRouteList = ['/login','/Square']//游客用户只能进入这两个页面
let systemUser = state.UserHabit.systemUser
const routeExists = router.getRoutes().some(({ name }) =>{
if(name){
return (name === to.name || to.path == '/')
}else{
return false
}
});
if(upgradeList.indexOf(to.path) > -1){//指定页面任何用户都可以进入
let affiliateRef = sessionStorage.getItem('affiliateRef');
if(to.query.order)sessionStorage.setItem('orderId', to.query.order);//记录是否点击跳转订单链接
if(to.query.ref && affiliateRef != to.query.ref)setViewsIncrease(to.query.ref)
if(to.meta.enter == 'all'){
next();
return
}else if(state.UserHabit.userDetail.systemList.indexOf(to.meta.enter) > -1){
next()
}else{
next('/404');
}
if(systemUser.value == 0){//游客用户只能进入这两个页面
let sSystemUser = false
for (let index = 0; index < isSystemUserRouteList.length; index++) {
if(to.path.indexOf(isSystemUserRouteList[index]) > -1){
sSystemUser = true
break
}
}
if(sSystemUser){
next();
}else{
next('/Square');
}
return
}
if (isMurmur && murmurStr && token) {
const toName = to.name === 'login';
if (toName) {
return next({ name: '/home' });//机房用户
}
} else {
if(to.path == '/upgrade'){
return next({ path: '/' });//机房用户
}
if (routeList.indexOf(to.path) > -1 ) {//指定也买你必须指定用户可以进入
if(userIdList.indexOf(userInfo.userId) > -1){
}else{
return next({ name: '/404' });
}
}
// 如果页面存在,正常跳转
}
next();
// if (routeExists) {//检测档期那页面是否存在
// } else {
// // 如果页面不存在可以跳转到404页面或者其他页面
// next('/404');
// }
// if(systemUser == 0){//游客用户只能进入这两个页面
});

View File

@@ -1,6 +1,7 @@
import {Module} from 'vuex'
import {RootState} from '../index'
import { Https } from "@/tool/https";
import { setLang } from "@/tool/guide";
import store from '../index'
interface UserHabit{
clothingType:any,
@@ -58,15 +59,24 @@ const userHabit : Module<UserHabit,RootState> = {
sex:{
},
userDetail:{
email: "X1627315083@163.com",
userName: "wxd",
userId: 83,
isTrial: 0,
isBeginner: 0,
systemUser: 1,
email:'-------------',
userName: "---",
userId: -1,
isBeginner: false,
systemUser: -1,
avatar: "https://www.minio.aida.com.hk:12024/aida-users/87/avatar/default.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241209T055108Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=04bb98c0a264b91f3c30173f7ab9e91de7bf31bd48440f4595fdd91f05629b80",
followeeCount: 3,
followerCount: 3
followeeCount: '-',
followerCount: '-',
accountExtendList:null,
systemList:[],
expireTime:null,
language:'',
timeData:{
isExpiration:false,
text:''
},
subscriptionType:null,
subscriptionId:null,
}
},
mutations:{
@@ -101,32 +111,23 @@ const userHabit : Module<UserHabit,RootState> = {
state.Position = state.MalePosition
}
},
setSystemUser(state,data){
state.systemUser.value = data
},
setUserInfo(state,data){
upUserDetail(state,data){
if(!data)return
for (const key in data) {
state.userInfo[key] = data[key]
if(data.affiliate){
if(state.userDetail.systemList.indexOf(data.affiliate) == -1)state.userDetail.systemList.push(2)
}
for (const key in data) {
state.userDetail[key] = data[key]
}
},
clearSystemUser(state){
state.systemUser.value = -1
state.userInfo = {}
},
setMessageSystem(state,data){
let num = 0
// let userInfo = ['-1']
let userInfo = ['followeeCount','followerCount']
let obj:any = {}
console.log(data);
data.forEach((item:any) => {
for (const iterator in item) {
if(userInfo.indexOf(iterator) > -1){
obj[iterator] = item[iterator]
store.commit('setUserInfo', obj)
}else{
// if(iterator != 'newPosted')num+=item[iterator]
state.messageSystem.messageType[iterator] = item[iterator]
}
}
@@ -151,15 +152,96 @@ const userHabit : Module<UserHabit,RootState> = {
setSex(state,data){
state.sex.value = data
},
createDetail(state,data){
state.userDetail = {
email:'-------------',
userName: "---",
userId: -1,
isBeginner: false,
systemUser: -1,
avatar: "https://www.minio.aida.com.hk:12024/aida-users/87/avatar/default.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241209T055108Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=04bb98c0a264b91f3c30173f7ab9e91de7bf31bd48440f4595fdd91f05629b80",
followeeCount: '-',
followerCount: '-',
accountExtendList:null,
systemList:[],
expireTime:null,
language:'',
timeData:{
isExpiration:false,
text:''
},
subscriptionType:null,
subscriptionId:null,
//是否是affiliate用户
affiliate:false,
}
},
setUserDetail(state,data){
// state.userDetail = data
console.log(data);
data.email = data.email?data.email:'------'
data.userName = data.userName
data.userId = data.userId
data.avatar = data.avatar
data.followeeCount = data.followeeCount
data.followerCount = data.followerCount
// state.userDetail = data
state.userDetail.email = data.email?data.email:'------'
state.userDetail.userName = data.userName//用户名
state.userDetail.userId = data.userId//用户id
state.userDetail.avatar = data.avatar//头像
state.userDetail.isBeginner = data.isBeginner == 1 ? true : false;//是否完成新手指引
/**
* 用于区分游客与系统用户
* 0 游客
* 1 年付用户
* 2 月付用户
* 3 试用用户
* 4 参加活动获取30天有效期和6000个积分的用户
* 5 企业管理员账号
* 6 企业子账号
* 7 学校管理员
* 8 学校子账号
*/
state.userDetail.affiliate = data.affiliate
state.userDetail.systemUser = data.systemUser
// 身份列表1可以使用aida系统2:可以使用affiliate页面3系统管理员用户
state.userDetail.systemList = []
if(data.systemUser != 0)state.userDetail.systemList.push(1)
if(data.affiliate)state.userDetail.systemList.push(2)
let adminIdList = [88,6,46,31,73,83,87,4]
if(adminIdList.indexOf(data.userId) > -1)state.userDetail.systemList.push(3)
state.userDetail.followeeCount = data.followeeCount//粉丝数量
state.userDetail.followerCount = data.followerCount//关注数量
state.userDetail.accountExtendList = {}
if(data.accountExtendList){
if(!Array.isArray(data.accountExtendList)){
state.userDetail.accountExtendList = data.accountExtendList
}else{
let WeChat = data.accountExtendList.filter((item:any) => item.authType == 'WeChat')[0]
let Google = data.accountExtendList.filter((item:any) => item.authType == 'Google')[0]
let obj = {
WeChat,Google
}
state.userDetail.accountExtendList = obj//绑定相关内容
}
}
state.userDetail.email = data.email?data.email:'------'
let current = Math.floor(Date.now() / 1000);
let timeData
if(data.expireTime){
timeData = {
isExpiration:current<data.expireTime,
text:new Date(parseInt(String(data.expireTime*1000))).toLocaleDateString()
}
}else{
timeData = {
isExpiration:true,
text:'- - - - / - - / - -'
}
}
state.userDetail.timeData = timeData//有效期
state.userDetail.language = data.language//当前语言
setLang(data.language)
state.userDetail.expireTime = data.expireTime//有效期
state.userDetail.subscriptionType = data.subscriptionType//当前订阅类型
state.userDetail.status = data.status//当前订阅类型
state.userDetail.subscriptionId = data.subscriptionId//最新订阅id
}
},
@@ -195,7 +277,7 @@ const userHabit : Module<UserHabit,RootState> = {
let allPromise = [];
let getList = ['DesignElementsEnum','PrintboardLevel2TypeEnum','FemalePosition','MalePosition','SketchStyle','SketchGenerateType','Sex']
let axiosGet = (item:any)=>{
return new Promise((resolve) => {
return new Promise((resolve,reject) => {
Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:item}}).then((rv: any) => {
if (rv) {
rv.forEach((item:any) => {
@@ -222,14 +304,18 @@ const userHabit : Module<UserHabit,RootState> = {
}
resolve('')
}
}).catch(()=>{
reject('')
})
})
}
let getUserDetail = ()=>{
return new Promise((resolve) => {
return new Promise((resolve,reject) => {
Https.axiosPost(Https.httpUrls.accountDetail).then((rv: any) => {
context.commit('setUserDetail',rv)
resolve('')
}).catch(()=>{
reject('')
})
})
}

View File

@@ -32,15 +32,10 @@ function JSchangeType(canvas, val) {
}
}
//绘制直线
function JScanvasMouseDown(e, data) {//创建线
function JScanvasMouseDown(str,e, width,patterning) {//创建线
let downPoint = e.absolutePointer
let currentPatterning
let fill = data?.fill || 'rgba(0, 0, 0, 0.2)'
let radius = data?.radius || 5
let width = data?.width || 0
let selectable = data?.selectable
let strokeDashArray = data?.strokeDashArray || [0,0]
switch (data.str) {
switch (str) {
case 'rect':
let top = Math.min(downPoint.y)
let left = Math.min(downPoint.x)
@@ -49,13 +44,9 @@ function JScanvasMouseDown(e, data) {//创建线
currentPatterning = new fabric.Rect({
top,
left,
fill: fill,
stroke:'#000',
strokeWidth:width,
strokeDashArray:strokeDashArray,
rx:radius,
ry:radius,
selectable,
fill: 'rgba(0, 0, 0, 0.2)',
rx:5,
ry:5,
})
break
case 'line':
@@ -64,7 +55,7 @@ function JScanvasMouseDown(e, data) {//创建线
downPoint.x, downPoint.y // 结束点坐标
],
{
stroke: fill, // 笔触颜色
stroke: 'rgba(0, 0, 0, 0.2)', // 笔触颜色
strokeLineCap: 'round',
strokeWidth:Number(width),
}
@@ -75,9 +66,9 @@ function JScanvasMouseDown(e, data) {//创建线
top: downPoint.y,
left: downPoint.x,
radius: 0,
fill: fill,
fill: 'rgba(0, 0, 0, 0.2)',
// fill: 'transparent',
// stroke: fill
// stroke: 'rgba(0, 0, 0, 0.2)'
})
break
case 'triangle':
@@ -86,9 +77,9 @@ function JScanvasMouseDown(e, data) {//创建线
left: downPoint.x,
width: 0,
height: 0,
fill: fill,
fill: 'rgba(0, 0, 0, 0.2)',
// fill: 'transparent',
// stroke: fill
// stroke: 'rgba(0, 0, 0, 0.2)'
})
break
case 'ellipse':
@@ -97,9 +88,9 @@ function JScanvasMouseDown(e, data) {//创建线
left: downPoint.x,
rx: 0,
ry: 0,
fill: fill,
fill: 'rgba(0, 0, 0, 0.2)',
// fill: 'transparent',
// stroke: fill
// stroke: 'rgba(0, 0, 0, 0.2)'
})
break
case 'fold':
@@ -108,7 +99,7 @@ function JScanvasMouseDown(e, data) {//创建线
{ x: downPoint.x, y: downPoint.y }
],{
fill: 'transparent',
stroke: fill,
stroke: 'rgba(0, 0, 0, 0.2)',
objectCaching: false,
strokeWidth:Number(width),
selection:false,
@@ -278,15 +269,14 @@ async function JSSetTexture(src,){
})
return img
}
let JSSetRemoveImage = (fun)=>{
function JSSetRemoveImage(fun){
const deleteIcon = cuowuImg
// 创建删除图片元素
const cornerSize = 24
let deleteImg = document.createElement('img')
deleteImg.src = deleteIcon
let renderIcon = (icon) => {
return (ctx, left, top, styleOverride, fabricObject)=> {
var size = cornerSize;
function renderIcon(icon) {
return function (ctx, left, top, styleOverride, fabricObject) {
var size = this.cornerSize;
ctx.save();
ctx.translate(left, top);
ctx.rotate(fabric.util.degreesToRadians(fabricObject.angle));
@@ -302,7 +292,7 @@ let JSSetRemoveImage = (fun)=>{
cursorStyle: 'pointer',
mouseUpHandler:fun,
render: renderIcon(deleteImg),
cornerSize: cornerSize
cornerSize: 24
})
}
function JSSetGroup(data){

View File

@@ -0,0 +1,416 @@
import cuowuImg from '@/assets/images/homePage/cuowu.svg'
function multiselectJS(canvas) {//获取整体宽高
canvas.discardActiveObject() // 丢弃当前活动的对象和触发事件。 如果fabric作为鼠标事件的结果调用该函数则将该事件作为参数传递给自定义事件的fire函数。 当作为一个方法使用时,参数没有任何应用。
const sel = new fabric.ActiveSelection(canvas.getObjects(), {
canvas
})
// console.log(sel)
canvas.setActiveObject(sel)
canvas.requestRenderAll()
const activeObject = canvas.getActiveObject(); // 获取当前选中的整体对象
if (activeObject && activeObject.type === 'activeSelection') {
const totalWidth = activeObject.width * activeObject.scaleX;
const totalHeight = activeObject.height * activeObject.scaleY;
return { totalWidth, totalHeight }
console.log('Total Width:', totalWidth);
console.log('Total Height:', totalHeight);
}
}
function JSchangeType(canvas, val) {
switch (val) {
case 'init':
canvas.selection = true
canvas.selectionColor = 'rgba(0, 0, 0, 0.2)'
canvas.selectionBorderColor = 'rgba(255, 255, 255, 0.3)'
canvas.skipTargetFind = false
break
default:
canvas.selectionColor = 'transparent'
canvas.selectionBorderColor = 'transparent'
canvas.skipTargetFind = true // 禁止选中
break
}
}
//绘制直线
function JScanvasMouseDown(e, data) {//创建线
let downPoint = e.absolutePointer
let currentPatterning
let fill = data?.fill || 'rgba(0, 0, 0, 0.2)'
let radius = data?.radius || 5
let width = data?.width || 0
let selectable = data?.selectable
let strokeDashArray = data?.strokeDashArray || [0,0]
switch (data.str) {
case 'rect':
let top = Math.min(downPoint.y)
let left = Math.min(downPoint.x)
// let height = Math.abs(downPoint.y - upPointer.y)
// let width = Math.abs(downPoint.x - upPointer.x)
currentPatterning = new fabric.Rect({
top,
left,
fill: fill,
stroke:'#000',
strokeWidth:width,
strokeDashArray:strokeDashArray,
rx:radius,
ry:radius,
selectable,
})
break
case 'line':
currentPatterning = new fabric.Line([
downPoint.x, downPoint.y, // 起始点坐标
downPoint.x, downPoint.y // 结束点坐标
],
{
stroke: fill, // 笔触颜色
strokeLineCap: 'round',
strokeWidth:Number(width),
}
)
break
case 'circle':
currentPatterning = new fabric.Circle({
top: downPoint.y,
left: downPoint.x,
radius: 0,
fill: fill,
// fill: 'transparent',
// stroke: fill
})
break
case 'triangle':
currentPatterning = new fabric.Triangle({
top: downPoint.y,
left: downPoint.x,
width: 0,
height: 0,
fill: fill,
// fill: 'transparent',
// stroke: fill
})
break
case 'ellipse':
currentPatterning = new fabric.Ellipse({
top: downPoint.y,
left: downPoint.x,
rx: 0,
ry: 0,
fill: fill,
// fill: 'transparent',
// stroke: fill
})
break
case 'fold':
currentPatterning = new fabric.Polyline([
{ x: downPoint.x, y: downPoint.y },
{ x: downPoint.x, y: downPoint.y }
],{
fill: 'transparent',
stroke: fill,
objectCaching: false,
strokeWidth:Number(width),
selection:false,
}
)
break
}
return currentPatterning
}
async function exportSele(canvas,format){
var activeObjects = canvas.getActiveObject();
let data = {
url:'',
imageType:'u'
}
if(!activeObjects){
return
}
if(activeObjects.type == 'image'){
data = {
url:activeObjects.getSrc(),
imageType:'u',
}
}else{
let scale = activeObjects.scaleX? activeObjects.scaleX: 1
var exportCanvas = new fabric.Canvas(null, {
width: activeObjects.width*scale,
height: activeObjects.height*scale,
backgroundColor: "rgba(255, 255, 255)",
});
await new Promise((resolve, reject)=>{
activeObjects.clone((value)=>{
value.left = 0
value.top = 0
exportCanvas.add(value);
resolve()
})
})
exportCanvas.renderAll();
var imgData = exportCanvas.toDataURL({format: format,quality:1});
data = {
url:imgData,
imageType:'b',
}
exportCanvas.dispose()
}
return data
}
function JScreateCheck(e){//创建对号
let downPoint = e.absolutePointer
let rect = new fabric.Rect({
width:20,
height:20,
fill: 'rgba(0, 0, 0, 0.2)',
rx:5,
ry:5,
})
var path = new fabric.Path('M2 10 L8 16 L18 4', {
left: 2.5,
top: 2.5,
stroke: 'white',
strokeWidth: 2,
fill:'transparent',
});
var polyLineBtn = new fabric.Group([rect, path],{
top:downPoint.y-40,
left:downPoint.x-10,
width:20,
height:20,
hasControls: false, // 禁用控制点
hasBorders: false, // 禁用边框线
selectable: false, // 禁用选择功能
hoverCursor: 'pointer'
});
return polyLineBtn
}
function JScanvasMouseMove(str,e, currentPatterning,downPoint,keyDown) {
const currentPoint = e.absolutePointer
let width,height,top,left,radius,rx,ry
switch (str) {
case 'line':
currentPatterning.set('x2', currentPoint.x)
currentPatterning.set('y2', currentPoint.y)
break
case 'rect':
width = Math.abs(downPoint.x - currentPoint.x)
height = Math.abs(downPoint.y - currentPoint.y)
top = currentPoint.y > downPoint.y ? downPoint.y : currentPoint.y
left = currentPoint.x > downPoint.x ? downPoint.x : currentPoint.x
currentPatterning.set('width', width)
currentPatterning.set('height', height)
currentPatterning.set('top', top)
currentPatterning.set('left', left)
break
case 'circle':
radius = Math.min(Math.abs(downPoint.x - currentPoint.x), Math.abs(downPoint.y - currentPoint.y)) / 2
top = currentPoint.y > downPoint.y ? downPoint.y : downPoint.y - radius * 2
left = currentPoint.x > downPoint.x ? downPoint.x : downPoint.x - radius * 2
currentPatterning.set('radius', radius)
currentPatterning.set('top', top)
currentPatterning.set('left', left)
break
case 'triangle':
width = Math.abs(downPoint.x - currentPoint.x)
height = Math.abs(downPoint.y - currentPoint.y)
top = currentPoint.y > downPoint.y ? downPoint.y : currentPoint.y
left = currentPoint.x > downPoint.x ? downPoint.x : currentPoint.x
currentPatterning.set('width', width)
currentPatterning.set('height', height)
currentPatterning.set('top', top)
currentPatterning.set('left', left)
break
case 'ellipse':
rx = Math.abs(downPoint.x - currentPoint.x) / 2
if(keyDown.indexOf('ShiftLeft')>-1){
ry = Math.abs(downPoint.y - currentPoint.y) / 2
if(rx > ry){
ry = rx
}else{
rx = ry
}
}else{
ry = Math.abs(downPoint.y - currentPoint.y) / 2
}
height = width
top = currentPoint.y > downPoint.y ? downPoint.y : downPoint.y - ry * 2
left = currentPoint.x > downPoint.x ? downPoint.x : downPoint.x - rx * 2
currentPatterning.set('rx', rx)
currentPatterning.set('ry', ry)
currentPatterning.set('top', top)
currentPatterning.set('left', left)
break
case 'fold':
let points = currentPatterning.points
points[points.length - 1].x = currentPoint.x
points[points.length - 1].y = currentPoint.y
break
}
}
function JSRectUpdata(rect, downPointer, upPointer) {
let height = (downPointer.y - upPointer.y)
let width = (downPointer.x - upPointer.x)
rect.set({
height,
width
})
return rect
}
async function JSSetTexture(src,){
let img
await new Promise((resolve, reject) => {
img = new Image
img.src = src
img.onload = ()=>{
img.width = 200
img.height = 200
resolve()
img.remove()
}
})
return img
}
let JSSetRemoveImage = (fun)=>{
const deleteIcon = cuowuImg
// 创建删除图片元素
const cornerSize = 24
let deleteImg = document.createElement('img')
deleteImg.src = deleteIcon
let renderIcon = (icon) => {
return (ctx, left, top, styleOverride, fabricObject)=> {
var size = cornerSize;
ctx.save();
ctx.translate(left, top);
ctx.rotate(fabric.util.degreesToRadians(fabricObject.angle));
ctx.drawImage(icon, -size/3, -size/3, size/1.5, size/1.5);
ctx.restore();
}
}
fabric.Object.prototype.controls.deleteControl = new fabric.Control({
x: 0.5,
y: -0.5,
offsetY: -16,
offsetX: 16,
cursorStyle: 'pointer',
mouseUpHandler:fun,
render: renderIcon(deleteImg),
cornerSize: cornerSize
})
}
function JSSetGroup(data){
let rect
if(data.gradient){
let colorStops = []
data.gradient.gradientList.forEach(item=>{
let obj = {
offset:item.left.split('%')[0]/100,
color:`rgba(${item.rgba.r},${item.rgba.g},${item.rgba.b},${item.rgba.a})`
}
colorStops.push(obj)
})
let { x0, y0, x1, y1 } = calculateGradientCoordinate(100,120,data.gradient.angle)
let linear = new fabric.Gradient({
type: 'linear', // 线性渐变
// coords: { x1: 0, y1: 0, x2: 200, y2: 0 }, // 渐变方向
coords: { x1:x0, y1:y0, x2:x1, y2:y1 }, // 渐变方向
colorStops: colorStops,
})
var color = new fabric.Rect({
top:0,
left:0,
width: 110,
height: 130,
textAlign: "left",
fill: linear // 设置渐变填充
// fill: `rgb(${data.rgbValue.r},${data.rgbValue.g},${data.rgbValue.b})`,
});
var text = new fabric.Text('',{
left: 0,
top: 0,
fontSize: 0,
fontFamily: "Arial",
textAlign: "left",
fill: "black",
});
let text1 = new fabric.Text('',{
left: 0,
top: 0,
width: 20,
fontSize: 0,
fontFamily: "Arial",
textAlign: "left",
});
rect = {text,text1,color,width:110}
}else{
var text = new fabric.Text(data.tcx,{
left: 0,
top: 60,
fontSize: 14,
fontFamily: "Arial",
textAlign: "left",
fill: "black",
});
let text1 = new fabric.Text(data.name,{
left: 0,
top: 80,
width: 20,
fontSize: 14,
fontFamily: "Arial",
textAlign: "left",
});
let width = 110 > text1.width ? 110 : text1.width;
var color = new fabric.Rect({
width: width,
height: 60,
textAlign: "left",
fill: `rgb(${data.rgbValue.r},${data.rgbValue.g},${data.rgbValue.b})`,
});
rect = {text,text1,color,width}
}
return rect
}
function JSSetPencil(str,canvas){
let pencil
if(str == 'PencilBrush'){
pencil = new fabric.PencilBrush(canvas,{}); //普通笔
}else if(str == 'Marking'){
pencil = new fabric.PencilBrush(canvas,); //记号笔
}else if(str == 'InkBrush'){
pencil = new fabric.InkBrush(canvas,{}); //油画笔
}else if(str=='CrayonBrush'){
pencil = new fabric.CrayonBrush(canvas,{}); //蜡笔
}else if(str == 'RibbonBrush'){
pencil = new fabric.RibbonBrush(canvas,{width: 1,}); //色带
}else if(str == 'MarkerBrush'){
pencil = new fabric.MarkerBrush(canvas,{}); //书写笔
// pencil = new fabric.PenBrush(canvas,{}); //书写笔
}else if(str == 'WritingBrush'){
pencil = new fabric.WritingBrush(canvas,{}); //毛笔
}else if(str == 'LongfurBrush'){
pencil = new fabric.LongfurBrush(canvas,{width: 1,}); //色带
}else if(str == 'SpraypaintBrush'){
pencil = new fabric.SpraypaintBrush(canvas,{}); //长毛刷
}
return pencil
}
export {
multiselectJS,
JSRectUpdata,
JSchangeType,
JScanvasMouseDown,
JScanvasMouseMove,
JScreateCheck,
exportSele,
JSSetTexture,
JSSetRemoveImage,
JSSetGroup,
JSSetPencil,
}

View File

@@ -10,7 +10,8 @@ let flexible = (designWidth, maxWidth,minWidth) =>{
if(width/height>1.98) width = height * 1.98;
width > maxWidth && (width = maxWidth);
width < minWidth && (width = minWidth);
var rem = Math.round(width * 10 / designWidth);
var rem = width * 10 / designWidth;
// var rem = Math.round(width * 10 / designWidth);
docEl.style.fontSize = rem+'px'
remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
}

View File

@@ -100,10 +100,10 @@ axios.interceptors.response.use((res) =>{
}
}
if(!sSystemUser){
router.replace('/')
// router.replace('/')
}
message.warning('Please login and try again~')
store.commit('clearSystemUser')
store.commit('createDetail')
setTimeout(()=>[
isLoginTime = false
],2000)
@@ -153,6 +153,10 @@ export const Https = {
accountResetPwd:'/api/account/resetPwd', //忘记密码修改
accountLogout:'/api/account/logout',//登出
accountBindEmail:'/api/account/bindEmail', //绑定邮箱
bindGoogle:'/api/account/bindGoogle', //绑定谷歌
bindWeChat:'/api/account/bindWeChat', //绑定微信
unbindGoogle:`/api/account/unbindGoogle`, //取消绑定谷歌
unbindWeChat:'/api/account/unbindWeChat', //取消绑定微信
elementGeneratePrint:'/api/element/generatePrint', //生成印花
elementSavePrint:'/api/element/savePrint',//保存印花
getRgbByTcx:'/api/element/getRgbByTcx', // 通过hsv值获取潘通信息
@@ -172,6 +176,8 @@ export const Https = {
payStripe:`/api/stripe/createOrder`, //Stripe支付
payPaypal:`/api/paypal/trade`, //paypal确认支付
getCredits:`/api/credits/getCredits`, //查询用户积分
cancelSubscription:`/api/stripe/cancelSubscription`, //取消订阅
orderInfoList:`/api/order-info/list`, //查询订单列表
getCreditsDetail:`/api/credits/getCreditsDetail`, //查询积分列表
@@ -262,8 +268,15 @@ export const Https = {
adminAddUser:`/api/inquiry/addUser`,//添加用户
modifyUser:`/api/inquiry/modifyUser`,//修改用户
publishSysMessage:`/api/message/publishSysMessage`,//发布系统任务
//affiliate接口
viewsIncrease:`/api/affiliate/viewsIncrease`,//增加访问量
affiliateRegistration:`/api/affiliate/registration`,//affiliate注册
personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
affiliateList:`/api/affiliate/list`,//affiliate审批列表
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
getTasksList:`/api/tasks/getList`,//获取w为执行完的所有任务
getTasksHistory:`/api/tasks/getAllTask`,//获取所有任务列表
prepareForSR:`/api/python/prepareForSR`,//超分

View File

@@ -9,6 +9,7 @@ class MyWs {
this.wsUrl = ''
this.reconnectionTime = null
this.times = 0
this.sendPINGTime = null
}
linkWs(url) {
if(!(JSON.parse(getCookie("userInfo"))))return
@@ -17,19 +18,23 @@ class MyWs {
this.ws = new WebSocket(this.wsUrl)
this.ws.onmessage = (e)=>{
try {
MyWs.receiveText(JSON.parse(e.data))
let rv = JSON.parse(e.data)
if(rv == "PONG")return
this.times = 0
MyWs.receiveText(rv)
} catch (error) {
console.error('websocket',error)
}
}
clearInterval(this.sendPINGTime)
this.sendPINGTime = setInterval(()=>{
this.send({text:'PING'})
// },1000)
},1000*60*2)
this.ws.onclose = (e)=>{
console.log('',e);
console.log('错误');
this.reconnection()
}
this.ws.onerror = (e)=>{
console.log('失败',e);
this.reconnection()
}
}
@@ -37,6 +42,7 @@ class MyWs {
this.times++
clearTimeout(this.reconnectionTime)
if(this.times>=10)return
clearInterval(this.sendPINGTime)
this.reconnectionTime = setTimeout(()=>{
this.linkWs(this.wsUrl)
},1000)
@@ -70,7 +76,12 @@ class MyWs {
}
}
send(obj) {
this.ws.send(JSON.stringify(obj))
if(this.ws.readyState == 1){
this.ws.send(JSON.stringify(obj))
}else{
clearTimeout(this.sendPINGTime)
this.reconnection()
}
}
close(){
if (this.ws && this.ws.readyState == 1) {

View File

@@ -74,7 +74,6 @@ import { Https } from "@/tool/https";
import { useStore } from "vuex";
import { useRouter,useRoute } from 'vue-router'
import GO from "@/tool/GO";
import { getCookie } from "@/tool/cookie";
import { country } from "@/tool/country";
import { getUploadUrl } from "@/tool/util";
// import { forEach } from "jszip";
@@ -214,6 +213,12 @@ export default defineComponent({
// isShow:true,
// },
],
},{
name:'Trial Affiliate',
icon:'usetime',
route:'/administrator/affiliateAudit',
key:'sub10',
isShow:true,
}],
openKeys: [],
selectedKeys: ['sub1'],
@@ -239,16 +244,6 @@ export default defineComponent({
router.push('/home');
}
onMounted(() => {
let cookieInfo = getCookie('userInfo') || ''
if(cookieInfo){
// menuList.value = JSON.parse(menuListSession)
// userInfo.value = JSON.parse(cookieInfo)
// state.selectedKeys = [route.path]
// getBreadData(route.name)
// getTitle(menuList.value, route.path)
}else{
}
state.rootSubmenuKeys.forEach((item:any) => {
if(item.children){
item.children.forEach((item:any) => {

View File

@@ -4,23 +4,23 @@
<div class="homeMain_right_content">
<div class="homeMain_user">
<div class="homeMain_user_icon" @click="openAccount">
<img :src="userInfo?.avatar" alt="">
<img :src="userDetail.avatar" alt="">
</div>
<div class="homeMain_user_detail">
<div class="homeMain_user_icon" @click="openAccount">
<img :src="userInfo?.avatar" alt="">
<img :src="userDetail.avatar" alt="">
</div>
<div v-if="isTest" class="username">{{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
<div v-else class="username">{{$t('Header.hello')}}@{{ cookieUserInfo?.userName }}</div>
<div v-if="userDetail.systemUser == 3" class="username">{{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
<div v-else class="username">{{$t('Header.hello')}}@{{ userDetail.userName }}</div>
<div class="homeMain_user_detail_attention">
<div class="attention_item">
<!-- 点击事件就用下面的div -->
<!-- <div class="attention_item attention_item_active"> -->
<div>{{ userInfo?.followeeCount }}</div>
<div>{{ userDetail?.followeeCount }}</div>
<span>{{$t('account.Follow')}}</span>
</div>
<div class="attention_item">
<div>{{ userInfo?.followerCount }}</div>
<div>{{ userDetail?.followerCount }}</div>
<span>{{$t('account.Fans')}}</span>
</div>
<!-- <div class="attention_item">
@@ -31,8 +31,9 @@
<div class="homeMain_subscribe">
<div>
<span class="font">Status</span>
<span class="state font">Paid <i class="fi fi-ss-check-circle"></i></span>
<span class="time">31 Dec 2024</span>
<span v-if="userDetail.timeData.isExpiration" class="stateSucsess font">Valid <i class="fi fi-ss-check-circle"></i></span>
<span v-else class="stateError font">Expire <i class="fi fi-ss-check-circle"></i></span>
<span class="time">{{ userDetail.timeData.text }}</span>
</div>
<!-- <div>
<span class="font">Cancel Renewal <i class="fi fi-rr-arrow-small-right"></i></span>
@@ -56,11 +57,14 @@
<i class="fi fi-rs-notebook"></i>
<span class="select_item_des">{{$t('Header.ViewOrders')}}</span>
</div>
<router-link class="select_item" v-if="AdministratorUserIdList.indexOf(cookieUserInfo?.userId) >= 0" :to="`/administrator`">
<router-link class="select_item" v-if="userDetail.systemList.indexOf(3) >= 0" :to="`/administrator`">
<span class="icon iconfont icon-yonghu"></span>
<span class="select_item_des">Administrator</span>
</router-link>
<router-link class="select_item" :to="`/Affiliate`" v-if="userDetail.systemList.indexOf(2) >= 0">
<span class="icon iconfont icon-yonghu"></span>
<span class="select_item_des">Affiliate</span>
</router-link>
<div class="select_item" @click="getTutorial()">
<span class="fi fi-rr-book-user"></span>
<span class="select_item_des">{{$t('Header.Tutorial')}}</span>
@@ -116,7 +120,6 @@
<UpgradePlan ref="UpgradePlan"></UpgradePlan>
<TaskPage ref="TaskPage"></TaskPage>
</header>
<div class="homeMain_content_body">
<!-- <router-view v-slot="{ Component }" @setTask = "setTask">
<keep-alive>
@@ -174,10 +177,9 @@ export default defineComponent({
const store = useStore();
const {t} = useI18n()
const {locale} = useI18n()
let userInfo= computed(()=>{
return store.state.UserHabit.userInfo
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
let isTest = ref()
let isMurmur = ref()
let credits = computed(()=>{
return store.state.UserHabit.credits.value
@@ -185,7 +187,6 @@ export default defineComponent({
let activeCredits = ref(false)
let getLangIsShowMark = ref(true)
let AdministratorUserIdList = [88,6,46,31,73,83,87,4]
let navRouterList = ref([])
let messageNum = computed(()=>{
return store.state.UserHabit.messageSystem.messageNum
@@ -208,6 +209,7 @@ export default defineComponent({
}
})
}
MyWs.close()
// MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
let getWsMessage = (data)=>{
@@ -221,7 +223,7 @@ export default defineComponent({
isObj = true
}
});
if(isObj)store.commit('setUserInfo',obj)
if(isObj)store.commit('upUserDetail',obj)
store.commit('setMessageSystem',data)
}
@@ -290,15 +292,13 @@ export default defineComponent({
})
return {
store,
userInfo,
userDetail,
t,
locale,
isTest,
isMurmur,
credits,
activeCredits,
getLangIsShowMark,
AdministratorUserIdList,
navRouterList,
messageNum,
messageType,
@@ -314,15 +314,11 @@ export default defineComponent({
data() {
return {
bindEmailVisible: false,
isHaveBindEmail: false,
bindEmailStep: 1,
email: "",
emailCode: ["", "", "", "", "", ""], //邮箱验证码
time: 60, //60秒倒计时
timer: 0,
cookieUserInfo: {
userId:-1
},
timerOperate: null,
numTime: 30,
timerSec: null,
@@ -352,18 +348,23 @@ export default defineComponent({
},
}
},
mounted() {
let isTest = getCookie('isTest')//获取是否是试用用户
this.isTest =JSON.parse(isTest)
async mounted() {
await new Promise((resolve, reject) => {
this.store.dispatch('getLangType').then(()=>{
this.getLangIsShowMark = false
resolve()
}).catch(()=>{
this.getLangIsShowMark = false
resolve()
})
})
let isMurmur = getCookie('isMurmur')//获取是否是试用用户
this.isMurmur =JSON.parse(isMurmur)
this.cookieUserInfo = JSON.parse(getCookie("userInfo"));
if (!this.cookieUserInfo) {
this.$router.replace("/");
if (this.userDetail.userId && this.userDetail.userId > -1) {
this.accountIsLogin();
} else {
this.accountIsLogin(this.cookieUserInfo);
this.$router.replace("/");
}
this.isHaveBindEmail = this.cookieUserInfo?.email ? true : false;
if(!this.isMurmur){
this.operateClick();
document.addEventListener("click", this.operateClick);
@@ -371,10 +372,7 @@ export default defineComponent({
this.getCredits()
this.getLang('')
//语言适配
this.store.dispatch('getLangType').then(()=>{
this.getLangIsShowMark = false
})
let tl1 = gsap.timeline({ paused: true });
let heradeRight = document.querySelector('.homeMain_max .homeMain_right_content')
@@ -410,6 +408,12 @@ export default defineComponent({
tl1.reverse()
}, 500);
})
let orderId = sessionStorage.getItem('orderId');//进入首页后是否打开订单列表查询到订单
console.log(orderId);
if(orderId){
let payOrder = this.$refs.payOrder
payOrder.init(orderId)
}
},
methods: {
setTask(data){
@@ -454,9 +458,9 @@ export default defineComponent({
},
//教程
getTutorial(){
let url = 'https://code-create.com.hk/wp-content/uploads/2024/10/aida_3.1-Manual-10_21-CN.pdf'
let url = 'https://code-create.com.hk/wp-content/uploads/2024/10/aida_3.0-Manual-10_21-CN.pdf'
if(this.locale == 'ENGLISH'){
url = 'https://code-create.com.hk/wp-content/uploads/2024/10/aida_3.1-Manual-10_21-EN.pdf'
url = 'https://code-create.com.hk/wp-content/uploads/2024/10/aida_3.0-Manual-10_21-EN.pdf'
showViewVideo({url:'https://code-create.com.hk/wp-content/uploads/2024/10/AiDA-demo-video_10_21_EN.mp4'})
}else{
showViewVideo({url:'https://code-create.com.hk/wp-content/uploads/2024/10/AiDA-demo-video_10_21_CN.mp4'})
@@ -472,11 +476,10 @@ export default defineComponent({
//登出
async logout() {
let data = {
userId: this.cookieUserInfo.userId,
userId: this.userDetail.userId,
};
let isTest = getCookie('isTest')
// console.log(getCookie("token"));
if(JSON.parse(isTest)){
if(this.userDetail.systemUser == 3){
await Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => {
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
this.$router.replace("/");
@@ -489,7 +492,7 @@ export default defineComponent({
});
this.$router.replace("/");
}
this.store.commit('clearSystemUser')
this.store.commit('createDetail')
// WriteCookie("token");
clonAllCookie()
@@ -497,9 +500,9 @@ export default defineComponent({
},
//判断是否登录
accountIsLogin(userInfo) {
accountIsLogin() {
let data = {
userId: userInfo.userId,
userId: this.userDetail.userId,
};
Https.axiosPost(Https.httpUrls.accountIsLogin, data).then((rv) => {
if (!rv) {
@@ -743,9 +746,12 @@ export default defineComponent({
font-weight: 600;
margin-right: 1rem;
}
.state{
.stateSucsess{
color: #3ab45c;
}
.stateError{
color: #b43a3a;
}
.time{
font-size: 1.4rem;
font-weight: 400;

View File

@@ -27,11 +27,11 @@
</div>
</div>
<div class="homeRecommend_right">
<a class="gallery_btn" v-if="systemUser.value == 0" href="https://code-create.com.hk/aida/" target="_blank">Upgrade to an official user</a>
<div class="gallery_btn" v-if="systemUser.value == 1 && !isMoblie" @click="goHome">Home</div>
<div class="gallery_btn white" v-if="systemUser.value != -1" @click="logout">log off</div>
<a class="gallery_btn" v-if="userDetail.systemUser == 0" href="https://code-create.com.hk/aida/" target="_blank">Upgrade to an official user</a>
<div class="gallery_btn" v-if="userDetail.systemUser == 1 && !isMoblie" @click="goHome">Home</div>
<div class="gallery_btn white" v-if="userDetail.systemUser != -1" @click="logout">log off</div>
</div>
<div class="homeRecommend_right" v-if="systemUser.value == -1">
<div class="homeRecommend_right" v-if="userDetail.systemUser == -1">
<div class="gallery_btn" @click="setLogin">Login</div>
<div class="gallery_btn white" @click="setRegister">Sign up</div>
</div>
@@ -60,7 +60,7 @@
</template>
<script >
import { defineComponent, reactive, ref , nextTick,computed, onMounted, toRefs } from "vue";
import { defineComponent, toRefs, reactive, ref , nextTick,computed, onMounted, onBeforeUnmount } from "vue";
import { isEmail } from "@/tool/util";
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
@@ -92,8 +92,8 @@ export default defineComponent({
signUp:null
})
let isMoblie = ref(false)
let systemUser = computed(()=>{
return store.state.UserHabit.systemUser
let userDetail = computed(()=>{
return store.state.UserHabit.userDetail
})
let setLogin = ()=>{
router.push("/login");
@@ -113,13 +113,12 @@ export default defineComponent({
});
}
let logout = ()=>{
let userInfo = JSON.parse(getCookie("userInfo"));
let userInfo = store.state.UserHabit.userDetail;
let data = {
userId: userInfo?.userId,
};
store.commit('clearSystemUser')
store.commit('createDetail')
if(!data.userId) return
// console.log(getCookie("token"));
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
clonAllCookie();
});
@@ -127,14 +126,27 @@ export default defineComponent({
let goHome = ()=>{
router.push('/home');
}
let time
let updataIsMoblie = ()=>{
clearTimeout(time)
time = setTimeout(()=>{
if(window.innerWidth < 768){
isMoblie.value = true
}else{
isMoblie.value = false
}
},500)
}
onMounted(()=>{
if(window.innerWidth < 768){
isMoblie.value = true
}
window.addEventListener('resize',updataIsMoblie)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updataIsMoblie);
});
return {
...toRefs(data),
systemUser,
userDetail,
setLogin,
registerModel,
setRegister,

View File

@@ -1,10 +1,10 @@
<template>
<div class="events_page" :class="{active:isScroll}">
<div class="modal_title_text modal_search">
<div v-show="isScroll || systemUser.value>-1" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}">
<div v-show="isScroll || userDetail.systemUser>-1" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}">
{{ item.name }}
</div>
<div v-show="!isScroll && systemUser.value == -1" class="modal_title_text_assistant active">All</div>
<div v-show="!isScroll && userDetail.systemUser == -1" class="modal_title_text_assistant active">All</div>
</div>
<div class="page_content" >
<div class="page_content_itemBox">
@@ -77,8 +77,8 @@ export default defineComponent({
isShowMark:false,
isNoData:false,//如果数据为空就不加载
})
let systemUser = computed(()=>{
return store.state.UserHabit.systemUser
let userDetail = computed(()=>{
return store.state.UserHabit.userDetail
})
let selectMenu:any = ref({
label:'全部',
@@ -151,7 +151,7 @@ export default defineComponent({
})
return {
...toRefs(filter),
systemUser,
userDetail,
selectMenu,
setWorksSelect,
likeFile,

View File

@@ -4,6 +4,10 @@
<!-- <generalCanvas></generalCanvas> -->
<div class="page_content">
<div class="userSystem" v-if="userDetail.systemList.indexOf(0) >= 0">
You can use these features only after becoming a regular user~
</div>
<!-- <img class="page_content_bg" src="@/assets/images/homePage/bg.png" /> -->
<div class="page_content_body">
<div class="home_page_body">
@@ -79,7 +83,7 @@
</a-slider>
<div class="text">Big</div>
</div>
<div class="gallery_btn Guide_1_31" style="margin-left: auto" @click="exportModel()">
<div v-show="designCollectionId" class="gallery_btn Guide_1_31" style="margin-left: auto" @click="exportModel()">
<!-- {{ $t('HomeView.Export') }} -->
{{$t('HomeView.FinalizeCollection')}}
</div>
@@ -224,8 +228,7 @@
</div> -->
<!-- design collection的进度蒙层 end-->
<affiche ref="affiche"></affiche>
<!-- <RobotAssist></RobotAssist> -->
<tesst></tesst>
<!-- <tesst></tesst> -->
</div>
</template>
@@ -242,7 +245,6 @@ import productImg from "@/component/HomePage/productImg.vue";
import generalCanvas from "@/component/modules/generalCanvas.vue";
import affiche from "@/component/HomePage/affiche.vue";
import DesignDetail from "@/component/Detail/DesignDetail.vue";
// import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import html2canvas from "html2canvas";
import { message,Modal } from "ant-design-vue";
import { useStore } from "vuex";
@@ -265,7 +267,6 @@ export default defineComponent({
DesignDetail,
ExportNewCoolection,
affiche,
// RobotAssist,
draggable,
productImg,
generalCanvas
@@ -283,6 +284,9 @@ export default defineComponent({
let designCollectionList: any = computed(() => {
return store.state.HomeStoreModule.designCollectionList;
});
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
})
let userGroupId: any = computed(() => {
return store.state.HomeStoreModule.userGroupId;
}); //模特id //当likeDesignCollectionList长度为0时清空startdesign时清空
@@ -334,7 +338,6 @@ export default defineComponent({
])
provide('exportNav',exportNav)
let isShowOperate = ref(false)
let userInfo:any = {}
let {t} = useI18n()
let driver__:any = computed(()=>{
return store.state.Guide.guide
@@ -374,6 +377,7 @@ export default defineComponent({
likeDesignCollectionList,
designCollectionList,
userGroupId,
userDetail,
setPortfolio,
designCollectionId,
designId,
@@ -381,7 +385,6 @@ export default defineComponent({
contentImg,
exportNav,
isShowOperate,
userInfo,
t,
driver__,
likeDesignItemIdList,
@@ -439,8 +442,6 @@ export default defineComponent({
// }
let test:any = getCookie('isTest')
let isTest =JSON.parse(test)
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
this.store.dispatch('get_clothingType')
//判断账号剩余时间是否太短
let isModalOne = JSON.parse(sessionStorage.getItem("isTimeOne") as any)
@@ -1215,13 +1216,26 @@ export default defineComponent({
// transform: translateX(-50%);
.page_content {
position: relative;
.userSystem{
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index:2;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 600;
font-size: 4rem;
}
.page_content_body {
position: absolute;
width: 100%;
height: 100%;
padding-bottom: 2.1rem;
box-sizing: border-box;
z-index:1;
.home_page_body {
width: 100%;
height: 100%;

View File

@@ -342,9 +342,24 @@
@click.stop=""
v-model="captionGeneration"
></textarea>
<div v-show="!isGenerate[selectCode]" class="generage_btn started_btn" @click.stop="getgenerate">
{{ $t('LibraryPage.Generate') }}
<!-- <div v-show="isGenerate"><a-spin size="large" /></div> -->
<div class="generage_btn_box" v-show="!isGenerate[selectCode]">
<div class="generage_btn started_btn">
<div @click.stop="getgenerate">
<span v-if="
selectCode == 'Moodboard' ||
(selectCode == 'Printboard' && scene?.value == 'Pattern') ||
(selectCode == 'Sketchboard' && scene?.value == 'generate')">{{ speedData.label }}</span>
<span v-else>{{ $t('LibraryPage.Generate') }}</span>
</div>
<div class="icon iconfont icon-xiala" v-show="
selectCode == 'Moodboard' ||
(selectCode == 'Printboard' && scene?.value == 'Pattern') ||
(selectCode == 'Sketchboard' && scene?.value == 'generate')" :class="{active:speedState}" @click.stop="openSpeed"></div>
</div>
<div class="content" v-show="speedState">
<div v-for="item in speedList" :key="item.value" @click="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div>
</div>
<div v-show="isGenerate[selectCode] && !remGenerate[selectCode]" class="generage_btn started_btn" @click.stop="getgenerate">
<i class="fi fi-br-loading"></i>
@@ -419,7 +434,7 @@
</template>
<script lang="ts">
import { LoadingOutlined } from "@ant-design/icons-vue";
import { defineComponent,h ,ref,createVNode,nextTick,watch,provide,computed} from 'vue'
import { defineComponent,h ,ref,createVNode,nextTick,watch,provide,computed,reactive,toRefs} from 'vue'
// import HeaderComponent from "@/component/HomePage/Header.vue";
import ModelPlacement from '@/component/LibraryPage/ModelPlacement.vue';
// import ModelPlacement from '@/component/LibraryPage/ModelPlacementUpdata.vue';
@@ -550,6 +565,9 @@ export default defineComponent({
let driver__:any = computed(()=>{
return store.state.Guide.guide
})
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
let generateTime:any = ref({
Sketchboard:'',
Moodboard:'',
@@ -599,6 +617,37 @@ export default defineComponent({
let generateLevel2:any = {}
let isSloganHint:any = ref('')
let printModelList:any = ref([])
let speed = reactive({
speedList:[
{
title:'Picture quality is average, speed is fast',
label:'Low Quality',
value:'fast',
},{
title:'Picture quality is high, speed is slow',
label:'High Quality',
value:'high',
},
],
speedState:false,
speedData:{
title:'Picture quality is average, speed is fast',
label:'Low Quality',
value:'fast',
},
})
const openSpeed = ()=>{
speed.speedState = !speed.speedState
if(speed.speedState){
document.addEventListener('click',openSpeed)
}else{
document.removeEventListener('click',openSpeed)
}
}
const setSpeed = (item:any)=>{
speed.speedData = item
}
let getSex = () =>{
sex.value = store.state.UserHabit.sex.value[0].value
getPosition()
@@ -720,6 +769,7 @@ export default defineComponent({
intersection,
isTest,
driver__,
userDetail,
generateTime,
generateProceedList,
isGenerate,
@@ -739,11 +789,13 @@ export default defineComponent({
getLibraryList,
getClass,
printModelList,
...toRefs(speed),
openSpeed,
setSpeed,
}
},
data(this_) {
return {
userInfo: {},
indicator: h(LoadingOutlined, {
style: {
fontSize: "2.4rem",
@@ -783,10 +835,8 @@ export default defineComponent({
},
async mounted(){
this.upload.gender = this.sex
let userInfo:any = getCookie("userInfo")
let isTest:any = getCookie('isTest')
this.isTest =JSON.parse(isTest)
this.userInfo = JSON.parse(userInfo);
this.uploadUrl = getUploadUrl()
this.token = getCookie("token") || "";
},
@@ -863,17 +913,17 @@ export default defineComponent({
if(this.selectCode == 'Printboard'){
this.printModelList = [
{
num:'',
num:1,
optype:false,
value:'Painting Style',
label:this.t('Generate.Model1')
},{
num:'',
num:2,
optype:false,
value:'Illustration Style',
label:this.t('Generate.Model2')
},{
num:'',
num:3,
optype:false,
value:'Real Style',
label:this.t('Generate.Model3')
@@ -1120,8 +1170,6 @@ export default defineComponent({
_this.store.commit("setWorkspace", rv);
}
})
console.log(newData);
_this.confirmDeletePic('',index,newData)
},
onCancel(){
@@ -1392,8 +1440,6 @@ export default defineComponent({
id:rv.id,
status:'Success',
})
console.log(this.generateList);
this.isShowMark = false
}
}).catch(()=>{
@@ -1450,12 +1496,12 @@ export default defineComponent({
collectionElementId:collectionElementId,
level1Type:selectCodeStr,
level2Type:level2Type,
userId:(this?.userInfo as any).userId,
userId:(this?.userDetail as any).userId,
isTestUser:this.driver__.driver?false:this.isTest,
text:sloganText,
seed:this.searchPictureSeed,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
version:1,//为1就是Print
version:this.speedData.value,//为1就是Print
gender:selectCodeStr == 'Sketchboard'?this.sex:'',
sloganBase64:base64,
}
@@ -1562,7 +1608,7 @@ export default defineComponent({
}
let data = {
uniqueId:str,
userId:(this?.userInfo as any)?.userId,
userId:(this?.userDetail as any)?.userId,
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
type: type
}
@@ -1970,10 +2016,11 @@ export default defineComponent({
.input_border{
padding-bottom: 0;
background: rgba(0, 0, 0, 0);
width: 50rem;
width: 55rem;
.input_box_btnBox{
background: #fff;
align-items: center;
width:65%;
.search_input{
height: 3rem;
}

View File

@@ -558,25 +558,20 @@ export default defineComponent({
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0); //从第一步开始,机器人开始的话就是从第二部开始
setCookie("userInfo", JSON.stringify(rv));
let userid = {
ueserId:rv.userId,
systemUser:rv.systemUser
}
this.store.commit("upUserDetail", userid);
this.store.commit("setSystemUser", rv.systemUser);
let obj: any = {
avatar: rv.avatar,
followeeCount: rv.followeeCount,
followerCount: rv.followerCount,
};
this.store.commit("setUserInfo", obj);
if (rv.systemUser == 0) {
if (window.innerWidth < 768) {
message.info(
"If you need to design, please log in using an iPad or computer."
);
this.turnToHomePage("/Square");
} else {
if (window.innerWidth < 768) {
message.info(
"If you need to design, please log in using an iPad or computer."
);
this.turnToHomePage("/Square");
} else {
this.turnToHomePage("/home");
}
this.turnToHomePage("/home");
}
sessionStorage.setItem(
"isTimeOne",
@@ -627,7 +622,7 @@ export default defineComponent({
//跳转到首页
turnToHomePage(str: any) {
this.getLang();
// this.getLang();
// this.$router.push("/home");
// console.log(window.location.search.substring(1));
this.store.commit("clearAllData");
@@ -637,17 +632,17 @@ export default defineComponent({
this.$router.push(str);
},
//获取当前语言
getLang() {
let data = {};
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
(rv: any) => {
if (rv) {
this.locale = rv;
setLang(rv);
}
}
);
},
// getLang() {
// let data = {};
// Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
// (rv: any) => {
// if (rv) {
// this.locale = rv;
// setLang(rv);
// }
// }
// );
// },
},
mounted() {
const data = this.$route.query
@@ -673,17 +668,22 @@ export default defineComponent({
.login_content {
position: relative;
width: 100%;
height: 100%;
// width: 100%;
// height: 100%;
width: 70%;
display: flex;
justify-content: space-between;
align-items: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@media (max-width: 768px) {
width: 100%;
}
.login_content_left {
width: 50%;
padding: 0 20rem;
width: 60%;
// padding: 0 20rem;
padding-right: 20rem;
@media (max-width: 768px) {
width: 100%;
}

View File

@@ -5,13 +5,13 @@
<i class="fi fi-rr-settings"></i>
</div>
<div class="upgrade-content-wire"></div>
<div class="upgrade-content-text">System upgrading</div>
<!-- <div class="upgrade-content-text">System maintenance</div> -->
<!-- <div class="upgrade-content-text">System upgrading</div> -->
<div class="upgrade-content-text">System maintenance</div>
<!-- 没有截至时间 -->
<div class="upgrade-content-textab">Due to the system server upgrade, we will start the upgrade from 9:30 am Hong Kong time on the weekend of October 20th until October 21st. During this time,<br> the AiDA system will be temporarily inaccessible. We apologize for any inconvenience this may cause and thank you for your understanding.</div>
<!-- <div class="upgrade-content-textab">Due to the system server upgrade, we will start the upgrade from 9:30 am Hong Kong time on the weekend of October 20th until October 21st. During this time,<br> the AiDA system will be temporarily inaccessible. We apologize for any inconvenience this may cause and thank you for your understanding.</div> -->
<!-- 有截至时间 -->
<!-- <div class="upgrade-content-textab">Due to system server upgrades, We will be upgrading from 9:30 am Hong Kong time on Tuesday, July 9 until 17:00 PM on Tuesday, July 9. During this period, access to the AiDA system will be temporarily unavailable.<br> We apologize for any inconvenience this may cause and appreciate your understanding.</div> -->
<!-- <div class="upgrade-content-textab">The AiDA system cannot be accessed temporarily due to system server maintenance. We apologize for any inconvenience this may cause and thank you for your understanding.</div> -->
<div class="upgrade-content-textab">The AiDA system cannot be accessed temporarily due to system server maintenance. We apologize for any inconvenience this may cause and thank you for your understanding.</div>
</div>
</div>
</template>

View File

@@ -0,0 +1,318 @@
<template>
<div class="affiliateHome_page">
<div class="affiliateHome_page_left">
<div class="affiliateHome_title ">
<div class="modal_title_text" @click="setBack">
<i class="fi fi-sr-left"></i>
<div class="modal_title_intro affiliateHome_title_text">Back</div>
</div>
</div>
<div class="modal_title_text">Affiliate</div>
<a-menu
id="dddddd"
class="menu_list_content"
theme="dark"
v-model:openKeys="openKeys"
v-model:selectedKeys="selectedKeys"
mode="inline"
@click="handleClick"
>
<div v-for="(menu) in rootSubmenuKeys" :key="menu.key" >
<a-menu-item :key="menu.key" :name="menu.name" :route="menu.route" v-if="!menu.children">
<template #icon>
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
</template>
<span class="menu_title" :title="menu.name">{{menu.name}}</span>
</a-menu-item>
<a-sub-menu :key="menu.key" v-else>
<template #icon>
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
</template>
<template #expandIcon><span :class="['icon','iconfont', 'menu_icon', menu.expandIcon]"></span></template>
<template #title><span class="menu_title" :title="menu.name">{{menu.name}}</span></template>
<div >
<a-menu-item v-for="child in menu.children" :key="child.key" :name="child.name" :route="child.route"><span class="menu_title" :title="child.name">{{child.name}}</span></a-menu-item>
</div>
</a-sub-menu>
</div>
</a-menu>
</div>
<div class="affiliateHome_page_right">
<div class="affiliateHome_page_right_header">
<div class="page_name">
<div v-show="!routers.length" class="page_name_title">{{nowPageName}}</div>
<a-breadcrumb v-show="routers.length" :routes="routers">
<template #itemRender="{ route, routes, paths }">
<span v-if="routes.indexOf(route) === routes.length - 1">
{{ route.breadcrumbName }}
</span>
<router-link v-else :to="`${paths.join('/')}`">
{{ route.breadcrumbName }}
</router-link>
</template>
</a-breadcrumb>
</div>
</div>
<div class="affiliateHome_page_right_content">
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" />
</keep-alive>
</router-view>
</div>
</div>
</div>
</template>
<script lang="ts">
import { message, Upload } from "ant-design-vue";
import { defineComponent, onMounted, h, ref, nextTick, inject,reactive, toRefs } from "vue";
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import { useRouter,useRoute } from 'vue-router'
import { country } from "@/tool/country";
import { getUploadUrl } from "@/tool/util";
export default defineComponent({
components: {
},
props: ["msg",'sketchCatecoryList'],
setup() {
const router = useRouter()
// const route:any = useRoute()
const store:any = useStore()
const state:any = reactive({
rootSubmenuKeys: [{
name:'Affiliate Home',
route:'/affiliate',
icon:'yonghu',
expandIcon:'icon-xiala',
key:'sub1',
isShow:true,
// children: [
// {
// name:'User Management',
// route:'/home/excil1',
// icon:'',
// key:'/home/excil22',
// isShow:true,
// },
// {
// code:'ROLE_MANAGER',
// name:'Access Permission',
// route:'/home/excil2',
// icon:'',
// key:'/home/excil33',
// isShow:true,
// },
// ],
},],
openKeys: [],
selectedKeys: ['sub1'],
nowPageName:'Affiliate Home',//当前页面名称
});
let routers:any = ref([])
const onOpenChange = (openKeys: string[]) => {
const latestOpenKey:any = openKeys.find(key => state.openKeys.indexOf(key) === -1);
if (state.rootSubmenuKeys.indexOf(latestOpenKey!) === -1) {
state.openKeys = openKeys;
} else {
state.openKeys = latestOpenKey ? [latestOpenKey] : [];
}
};
let handleClick = (event:any) => {
// state.selectedKeys = [Number(event.key)]
state.nowPageName = event.item.name
router.push({path:event.item.route})
}
let setBack = ()=>{
router.push('/home');
}
onMounted(() => {
state.rootSubmenuKeys.forEach((item:any) => {
if(item.children){
item.children.forEach((item:any) => {
if(item.route == router.currentRoute.value.path){
state.selectedKeys[0] = item.key
}
});
}else{
if(item.route == router.currentRoute.value.path){
state.selectedKeys[0] = item.key
}
}
});
//储存所有用户id和name
Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => {
if (rv) {
store.commit('setAllUserList',rv);
}
})
let allCountry = country
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
// state.nowPageName = state.rootSubmenuKeys[0].name
// router.push(state.rootSubmenuKeys[0].route)
})
return {
...toRefs(state),
onOpenChange,
routers,
handleClick,
setBack,
};
},
data(prop) {
return {
}
},
mounted() {
},
watch:{
// newWindowState:{
// handler(newVal,oldVal){
// console.log(newVal);
// if(newVal){
// this.newWindow?.close();
// }
// }
// },
},
methods: {
},
});
</script>
<style lang="less">
.affiliateHome_page {
width: 100%;
height: 100%;
display: flex;
background: rgba(243,244,248,0.4);
.affiliateHome_title{
display: flex;
align-items: center;
position: sticky;
top: 0;
z-index: 222;
.modal_title_text{
cursor: pointer;
display: flex;
margin-bottom: 0;
font-size: 1.8rem;
}
.affiliateHome_title_text{
line-height: 1;
}
.modal_title_text:hover .affiliateHome_title_text{
text-decoration: underline;
}
i{
font-size: 1.2rem;
display: flex;
align-items: center;
margin-right: 1rem;
}
}
.affiliateHome_page_left{
width: 20%;
padding-top: 20px;
.modal_title_text{
// font-size: var(--aida-fsize1-8);
line-height: 10rem;
text-align: center;
}
.ant-menu-dark.menu_list_content{
padding-left: 1.8rem;
// width: 30rem;
width: 100%;
height: calc(100% - 16rem);
background: #FFFFFF;
flex-shrink: 0;
overflow-y: auto;
&::-webkit-scrollbar{
width: 0;
}
.menu_icon{
font-size: 2.4rem;
color: #808185;
}
.ant-menu-item{
padding-left: 3.1rem !important;
display: flex;
align-items: center;
height: 6.6rem;
border-radius: 3.3rem 0px 0px 3.3rem;
box-sizing: border-box;
&.ant-menu-item-only-child{
padding-left: 5.6rem !important;
}
}
.ant-menu-submenu-title{
padding-left: 3.1rem !important;
height: 6.6rem;
}
.ant-menu-inline.ant-menu-sub{
background: #FFFFFF;
padding-left: 4rem;
}
.menu_title{
font-size: 1.8rem;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #808185;
}
.ant-menu-item-selected{
background: #F3F4F8;
.menu_title{
color: #343579;
}
.menu_icon{
color: #808185;
}
}
}
}
.affiliateHome_page_right{
flex: 1;
width: 80%;
.affiliateHome_page_right_header{
display: flex;
justify-content: space-between;
align-items: center;
height: 6.6rem;
padding: 0 2.8rem 0 3.0rem;
.page_name{
border-left: solid .4rem #161F29;
.page_name_title,.ant-breadcrumb-link{
font-size: 1.8rem;
font-weight: normal;
color: #333333;
padding-left: 1.2rem;
line-height: 1.8rem;
}
}
}
.affiliateHome_page_right_content{
height: 100%;
padding: 0 3rem;
}
}
}
</style>

View File

@@ -0,0 +1,86 @@
<template>
<div class="affiliateRegister">
<div class="title">AiDA 3.0 Questionnaire</div>
<div class="info">Have questions or suggestions? We'd love to hear from you. Send us a message and we'll respond as soon as possible.</div>
<div class="textarea_box">
<div class="text"></div>
<textarea :value="textarea"></textarea>
</div>
<div class="gallery_btn" style="width: 100%;" @click="submit">Register</div>
</div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</template>
<script lang="ts">
import { message, Upload } from "ant-design-vue";
import { defineComponent, onMounted, h, ref, nextTick, inject,reactive, toRefs } from "vue";
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
export default defineComponent({
components: {
},
props: ["msg",'sketchCatecoryList'],
setup() {
const router = useRouter()
const affiliateRegisterData:any = reactive({
loadingShow:false,
textarea:'',//当前页面名称
});
const submit = ()=>{
affiliateRegisterData.loadingShow = true
let data = {
promotionMethod:affiliateRegisterData.textarea,
}
Https.axiosGet(Https.httpUrls.affiliateRegistration,{params:data}).then(()=>{
affiliateRegisterData.loadingShow = false
message.success('success')
}).catch((err)=>{
affiliateRegisterData.loadingShow = false
})
}
onMounted(() => {
})
return {
...toRefs(affiliateRegisterData),
submit,
};
},
});
</script>
<style lang="less" scoped>
.affiliateRegister{
width: 100rem;
margin: 0 auto;
margin-top: 14.5rem;
>.title{
font-size: 4rem;
font-weight: 600;
margin-bottom: 4rem;
}
>.info{
margin-bottom: 4rem;
font-size: 1.8rem;
font-weight: 400;
}
>.textarea_box{
margin-bottom: 5rem;
>.text{
font-size: 2rem;
font-weight: 600;
}
textarea{
width: 100%;
height: 18rem !important;
border: 2px solid;
border-radius: 2rem;
background: #f7f8fa;
padding: 2rem;
}
}
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<div class="feedbackSurvey" :class="{'active': forbid}">
<main id="main">
<h1 id="title">AiDA 3.1 Feedback Survey</h1>
<h1 id="title">AiDA 3.0 Feedback Survey</h1>
<p id="description" v-if="!forbid">Please take the survey</p>
<div id="survey-form" :class="{'active': !forbid}">
<h2 class="section-title">Personal Information</h2>
@@ -392,7 +392,7 @@
</label>
</div>
<div class="section">
<p>3. Will you subscribe to AiDA 3.1?<span class="fontColor">*</span></p>
<p>3. Will you subscribe to AiDA 3.0?<span class="fontColor">*</span></p>
<label>
<input
:disabled="forbid"

View File

@@ -1,7 +1,7 @@
<template>
<div class="feedbackSurvey">
<main id="main">
<h1 id="title">AiDA 3.1 调查问卷</h1>
<h1 id="title">AiDA 3.0 调查问卷</h1>
<p id="description">请填写调查问卷表</p>
<div id="survey-form">
<h2 class="section-title">参与者信息</h2>
@@ -360,7 +360,7 @@
</label>
</div>
<div class="section">
<p>3. 您会订阅AiDA 3.1<span class="fontColor">*</span></p>
<p>3. 您会订阅AiDA 3.0<span class="fontColor">*</span></p>
<label>
<input
type="radio"

View File

@@ -43,12 +43,7 @@ export default defineComponent({
return {};
},
mounted() {
// this.userInfo = JSON.parse(getCookie("userInfo") as any);
// if (this.userInfo.userId == 83) {
// } else {
// router.replace("/home");
// return
// }
},
methods: {
async setFingerprint2(str:any) {

View File

@@ -111,13 +111,13 @@
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import HeaderComponent from "@/component/HomePage/Header.vue";
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
import router from "@/router/index";
import { Https } from "@/tool/https";
import { formatTime } from "@/tool/util";
import { Modal, message } from "ant-design-vue";
import { useStore } from "vuex";
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { useI18n } from "vue-i18n";
@@ -128,6 +128,7 @@ export default defineComponent({
RobotAssist,
},
setup() {
const store = useStore()
let rangePickerValue: any = ref([]);
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
@@ -232,15 +233,17 @@ export default defineComponent({
},
])
let collectionList: any = ref([]);
let userInfo: any = {};
let status: any = ref(0);
let voluntarily: any = ref(false);
let userDetail:any= computed(()=>{
return store.state.UserHabit.userDetail
})
return {
rangePickerValue,
columns,
collectionList,
renameData,
userInfo,
userDetail,
status,
currentState,
state,
@@ -263,10 +266,8 @@ export default defineComponent({
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
this.gettrialList();
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
if (this.userInfo.userId == 83 || this.userInfo.userId == 88 || this.userInfo.userId == 6) {
if (this.userDetail.userId == 83 || this.userDetail.userId == 88 || this.userDetail.userId == 6) {
} else {
router.replace("/home");
return