This commit is contained in:
safavimohadeseh78 2025-10-01 17:39:40 +03:30
commit 2a3c9a752b
25 changed files with 421 additions and 684 deletions

View File

@ -1,5 +1,5 @@
VITE_PROJECT_BASE = montzar
VITE_PROJECT_BASEURL = https://liman.gold/server
VITE_PROJECT_BASEURL_WS = wss://liman.gold
VITE_PROJECT_BASEURL = https://montpar.ir/server/
VITE_PROJECT_BASEURL_WS = wss://montpar.ir
VITE_PROJECT_TITLE = Mont Zar | پنل مشتریان
VITE_PROJECT_LOGO = /logo_desktop.svg

5
.env.pargar Normal file
View File

@ -0,0 +1,5 @@
VITE_PROJECT_BASE = pargar
VITE_PROJECT_BASEURL = https://liman.gold/server
VITE_PROJECT_BASEURL_WS = wss://liman.gold
VITE_PROJECT_TITLE = پرگار | پنل مشتریان
VITE_PROJECT_LOGO = /logo_desktop.svg

12
components.d.ts vendored
View File

@ -9,11 +9,9 @@ declare module 'vue' {
export interface GlobalComponents {
AAffix: typeof import('ant-design-vue/es')['Affix']
AAlert: typeof import('ant-design-vue/es')['Alert']
ABadge: typeof import('ant-design-vue/es')['Badge']
AButton: typeof import('ant-design-vue/es')['Button']
ACard: typeof import('ant-design-vue/es')['Card']
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
ADivider: typeof import('ant-design-vue/es')['Divider']
ADrawer: typeof import('ant-design-vue/es')['Drawer']
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
AFloatButton: typeof import('ant-design-vue/es')['FloatButton']
@ -21,19 +19,11 @@ declare module 'vue' {
AFormItem: typeof import('ant-design-vue/es')['FormItem']
AInput: typeof import('ant-design-vue/es')['Input']
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
AMenu: typeof import('ant-design-vue/es')['Menu']
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AModal: typeof import('ant-design-vue/es')['Modal']
APagination: typeof import('ant-design-vue/es')['Pagination']
ARadio: typeof import('ant-design-vue/es')['Radio']
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASpin: typeof import('ant-design-vue/es')['Spin']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
ATextarea: typeof import('ant-design-vue/es')['Textarea']
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
BaseDatePicker: typeof import('./src/components/BasicPacks/BaseDatePicker/src/BaseDatePicker.vue')['default']
BaseSwitch: typeof import('./src/components/BasicPacks/BaseSwitch/src/BaseSwitch.vue')['default']
BaseTable: typeof import('./src/components/BasicPacks/BaseTable/src/BaseTable.vue')['default']
@ -65,7 +55,5 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
Setting: typeof import('./src/components/Setting.vue')['default']
UserSetting: typeof import('./src/components/UserSetting.vue')['default']
VanActionSheet: typeof import('vant/es')['ActionSheet']
VanDialog: typeof import('vant/es')['Dialog']
}
}

BIN
dist.rar

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -12,42 +12,13 @@
}"
>
<div class="">
<!-- <InstallPWA v-if="userStore.user" class="fixed left-0 bottom-24 w-full flex justify-center z-50"/>-->
<AAffix :offset-top="0">
<div class="">
<div class="container mx-auto">
<Navbar v-if="router.currentRoute.value.meta.showNavbar" />
<!-- <div class="hidden md:block relative" v-if="router.currentRoute.value.meta.showMenu">-->
<!-- <div class="relative" v-if="router.currentRoute.value.meta.showMenu">
<Menu />
<div class="flex justify-center absolute top-0 bottom-0 left-4">
<div class="hidden md:flex items-center">
<ADropdown placement="bottom">
<div
class="bg-[#E2E8F0] p-2 rounded-full flex justify-center items-center cursor-pointer w-12 h-12">
<img :src="avatar" alt="">
</div>
<template #overlay>
<div class="w-[340px] userSettingDropDown shadow-lg py-6 px-4">
<UserSetting />
</div>
</template>
</ADropdown>
</div>
</div>
<div class="flex justify-center absolute top-0 bottom-0 p-2 right-4">
<img :src="logo" alt="">
</div>
</div>-->
</div>
</div>
</AAffix>
<div class="main-body">
<div class="circle-bg circle-1"></div>
<div class="circle-bg circle-2"></div>
</div>
<RouterView v-slot="{ Component }">
<KeepAlive :include="keepAliveList">
<Component
@ -60,7 +31,7 @@
<div v-if="router.currentRoute.value.meta.showMenu" class="py-8 absolute bottom-1px" style="justify-self: center">
<div class="container mx-auto">
<div class="menuBorder w-22rem">
<Menu/>
<!-- <Menu/>-->
</div>
</div>
</div>
@ -77,10 +48,7 @@
<div class="paper"></div>
<div class="keyboard"></div>
</div>
<BasicButton @click="$router.push('orders')" size="large" class="w-full buttonLogin">رفتن به لیست سفارشات</BasicButton>
<!-- <img :src="order" alt="" class="my-5">-->
<!-- <BasicButton @click="$router.push('orders')" class="w-full text-primary border-primary">رفتن به لیست سفارشات</BasicButton>-->
</div>
<BasicButton @click="$router.push('orders')" size="large" class="w-full buttonLogin">رفتن به لیست سفارشات</BasicButton> </div>
</BasicModal>
<BasicModal width="390px"
v-model:visible="openResult"
@ -151,11 +119,7 @@
<div class="grid grid-cols-2 gap-2 w-full mt-5">
<BasicButton class="bg-green-600 text-white border-solid" @click="confirmOrder()">تایید</BasicButton>
<BasicButton class="bg-red-600 text-white border-solid" @click="rejectOrder()">رد</BasicButton>
</div>
<!-- <img :src="order" alt="" class="my-5">-->
<!-- <BasicIcon icon="vuesax-linear:clipboard-tick" color="green" :size="80" class="my-5"/>-->
<!-- <BasicButton @click="$router.push('orders')" class="w-full text-primary border-primary">رفتن به لیست سفارشات</BasicButton>-->
</div>
</div> </div>
</BasicModal>
<BasicModal width="20rem"
@ -165,12 +129,10 @@
:loading="loading"
:closable="false"
:maskClosable="false">
<!-- <div class="flex flex-col items-center">-->
<div class="flex flex-col items-center">
<BasicIcon class="home_appear_fade_in_up text-center" color="orange"
icon="vuesax-linear:info-circle"
size="50" />
<!-- <div class="home_appear_fade_in_up delay-100">به روز رسانی</div>-->
<div class="home_appear_fade_in_up mt-2 text-white">نسخه جدید در دسترس است</div>
<BasicButton class="mt-2 w-full buttonLogin" @click="update">به روز رسانی</BasicButton>
</div>

View File

@ -10,10 +10,6 @@ export const loginWithSMS = async (payload:Login) => {
return await axios.post<any>('/auth/login', payload)
}
export const getSepideh = async () => {
return await axios.post<any>('/auth/login')
}
export const registerCustomer = async (obj: User) => await axios.post<User>(`/auth/register`, obj)
export async function verifyToken(id: any,token:string){

View File

@ -2,7 +2,7 @@
@import (less) './fonts.less';
@import (less) './ant.less';
@import (less) './scroll.less';
@import (less) 'montzar.less';
@import (less) 'pargar.less';
html {
scroll-behavior: smooth;

View File

@ -1,13 +1,13 @@
body.montzar {
body.pargar {
position: fixed;
top: 0;
bottom: 0;
background: #191919;
color: #ffffff;
background: #FFD86DFF;
color: rgba(47, 47, 47, 0.8);
overflow: hidden;
}
@media (min-width: 425px) {
body.montzar {
body.pargar {
max-width: 425px !important;
justify-self: center;
}
@ -15,33 +15,65 @@ body.montzar {
html {
background: #000000;
}
.circle-bg {
position: absolute;
width: 500px;
height: 500px;
background: radial-gradient(
circle,
rgba(255, 191, 101, 0.15) 0%,
rgba(255, 191, 101, 0) 70%
);
border-radius: 50%;
pointer-events: none;
z-index: 0;
body.pargar .icon {
fill: rgba(226, 177, 43, 1);
stroke: rgba(226, 177, 43, 1);
}
body.pargar .bottom-rectangle {
background: white;
position: fixed;
bottom: 0;
max-width: 425px;
width: 100%;
display: flex;
justify-content: center;
padding: 1rem;
}
body.pargar .bottom-yellow-rectangle {
background: #FFD86DFF;
max-width: 425px;
width: 100%;
justify-self: center;
z-index: 1;
position: fixed;
top: 48rem;
bottom: 0;
right: 0;
left: 0;
box-shadow: 0px -4px 43px -14px rgba(255, 196, 32, 1);
}
.circle-1 {
top: -130px;
left: 150px;
body.pargar .middle-white-rectangle {
background: #ffffff;
z-index: -1;
max-width: 425px;
width: 100%;
justify-self: center;
position: fixed;
top: 13rem;
bottom: 0;
right: 0;
left: 0;
}
.circle-2 {
bottom: -5rem;
right: 180px;
body.pargar .pargar-logo {
background: #ffffff;
justify-self: center;
margin-top: 4rem;
z-index: 1;
}
body.montzar .avatarIcon {
fill: #FFBF65;
stroke: #FFBF65;
body.pargar .continueButton {
font-size: 20px;
padding-left: 2rem;
padding-right: 2rem;
background: rgba(255, 216, 109, 1);
box-shadow: 0px 0px 18.1px -3px rgba(0, 0, 0, 0.25);
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
}
body.montzar .card{
body.pargar .card{
color: #ffffff;
border-radius: 15px;
border: 1px solid #FFBF65;
@ -51,116 +83,121 @@ body.montzar .card{
rgba(217, 217, 217, 0.07)
), #1A1A1A;
}
body.montzar .golden-icon {
align-items: center;
filter: drop-shadow(0 0 2px #FFBF65)
drop-shadow(0 0 4px #FFBF65);
}
body.montzar .green-color {
color: #64BA4A;
}
body.montzar .red-color {
color: #BA4A4A;
}
body.montzar .section-title {
position: absolute;
top: -25px;
left: 50%;
transform: translateX(-50%);
z-index: 1;
width: 115px;
height: 49px;
display: flex;
justify-content: center;
align-items: center;
padding: 6px 12px;
border-radius: 12px;
background: #1A1A1A;
border: 1px solid #FFBF65;
color: #ffffff;
font-size: 20px;
box-shadow: 0 2px 4px rgba(255, 191, 101, 0.5);
}
body.montzar .menuItem svg{
color: #ffffff;
fill: #ffffff;
stroke: #ffffff;
height: 38px;
width: 38px;
}
body.montzar .menuItemSelect svg{
color: #FFBF65;
fill: #FFBF65;
stroke: #FFBF65;
height: 38px;
width: 38px;
}
@media (min-width: 769px) {
.ant-menu-light {
background: #191919;
border-radius: 20px;
}
}
@media (max-width: 768px) {
.ant-menu-light {
background: #191919;
border-radius: 20px;
}
}
body.montzar .menuItemSelectText{
color: #FFBF65;
font-size: 0.75rem;
}
body.montzar .menuItemText{
color: #ffffff;
fill: #ffffff;
stroke: #ffffff;
font-size: 0.75rem;
}
body.montzar .menuBorder{
body.pargar .menuBorder{
position: relative;
border: 1px solid #FFBF65;
border-radius: 20px;
z-index: 3;
}
body.montzar .navbar{
border: 1px solid #FFBF65;
border-radius: 12px;
body.pargar .navbar{
border: 1px solid rgba(47, 47, 47, 1);
border-radius: 50px;
background: none;
width: 12rem;
margin-top: 4.5rem;
z-index: 4;
}
body.pargar .input-1{
border: 1px solid rgba(85, 85, 85, 0.5);
border-radius: 50px;
z-index: 5;
height: 3rem;
padding: 1rem;
align-items: center;
background: linear-gradient(180deg, rgba(153, 130, 65, 0.02) 0%, rgba(179, 151, 76, 0.03) 25%, rgba(204, 173, 87, 0.05) 50%, rgba(242, 205, 104, 0.07) 87.5%, rgba(255, 216, 109, 0.1) 100%);
}
body.pargar .input-2{
border: 1px solid rgba(85, 85, 85, 0.5);
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
z-index: 5;
height: 3rem;
padding: 1rem;
align-items: center;
background: linear-gradient(180deg, rgba(153, 130, 65, 0.02) 0%, rgba(179, 151, 76, 0.03) 25%, rgba(204, 173, 87, 0.05) 50%, rgba(242, 205, 104, 0.07) 87.5%, rgba(255, 216, 109, 0.1) 100%);
}
body.pargar .line-2 {
width: 12px;
height: 40px;
background-color: rgba(255, 196, 32, 1);
box-shadow: 2px 0px 8px rgba(149, 109, 0, 0.6);
position: absolute;
top: 50%;
right: 0;
transform: translate(50%, -50%);
border-radius: 2rem 0 0 2rem;
}
body.pargar .input-3 {
border: 1px solid rgba(85, 85, 85, 0.5);
border-radius: 50px;
z-index: 5;
width: 100%;
height: 3rem;
padding: 1rem;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(
rgba(217, 217, 217, 0.07),
rgba(217, 217, 217, 0.07)
), #1A1A1A;
180deg,
rgba(153, 130, 65, 0.02) 0%,
rgba(179, 151, 76, 0.03) 25%,
rgba(204, 173, 87, 0.05) 50%,
rgba(242, 205, 104, 0.07) 87.5%,
rgba(255, 216, 109, 0.1) 100%
);
position: relative;
}
body.montzar .productDrawer{
background: rgba(18, 18, 18, 0.13);
backdrop-filter: blur(8px);
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: 1px solid #FFBF65;
max-width: 425px;
justify-self: anchor-center;
.line-3 {
width: 70px;
height: 6px;
background-color: rgba(255, 196, 32, 1);
box-shadow: 0px 2px 8px rgba(149, 109, 0, 0.6);
position: absolute;
top: 2px;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 0 0 999px 999px;
}
body.montzar .orderDrawer{
background: rgba(18, 18, 18, 0.13);
backdrop-filter: blur(8px);
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: 1px solid #FFBF65;
max-width: 425px;
justify-self: anchor-center;
.dot-line {
display: flex;
align-items: center;
}
body.montzar .orderCard{
.dot {
width: 4px;
height: 4px;
background-color: rgba(255, 196, 32, 1);
border-radius: 50%;
}
.line-1 {
width: 60px;
height: 1px;
background-color: rgba(255, 196, 32, 1);
}
.line-2 {
width: 60px;
flex-grow: 1;
justify-self: center;
height: 5px;
background-color: rgba(255, 196, 32, 1);
}
body.pargar .orderCard{
color: #ffffff;
border-radius: 15px;
margin-top: 1rem;
border: 1px solid #FFBF65;
//height: 21vh;
width: 350px;
box-shadow: 0px 4px 4px 1px rgba(0, 0, 0, 0.55);
background: linear-gradient(
@ -168,25 +205,24 @@ body.montzar .orderCard{
rgba(207, 207, 207, 0.07)
), #1A1A1A;
}
body.montzar .ant-input{
background: #191919 ;
border: 1px solid #FFBF65;
color: #FFFFFF99 ;
body.pargar .ant-input{
border: none;
box-shadow: 0px 4px 20px -4px rgba(0, 0, 0, 0.25);
}
body.montzar .body.montzar .ant-input{
color: #FFFFFF99 ;
body.pargar .ant-input-focused{
border: none;
}
body.montzar .ant-input-group-addon{
background: #191919 ;
body.pargar .ant-input-group-addon{
border: 1px solid #FFBF65;
font-size: 16px;
color: #ffffff;
}
body.montzar .ant-form-item .ant-form-item-label >label {
body.pargar .ant-form-item .ant-form-item-label >label {
color: #7F7F7F ;
}
body.montzar .BuySell_submitButton{
body.pargar .BuySell_submitButton{
background: linear-gradient(
to right,
rgb(151, 113, 60),
@ -205,7 +241,7 @@ body.montzar .BuySell_submitButton{
border-bottom-right-radius: 12px;
border-bottom-left-radius: 3px;
}
body.montzar .BuySell_cancelButton{
body.pargar .BuySell_cancelButton{
border: 1px solid #FFBF65 !important;
background: none !important;
color: #ffffff ;
@ -217,20 +253,21 @@ body.montzar .BuySell_cancelButton{
border-bottom-right-radius: 3px;
border-bottom-left-radius: 12px;
}
body.montzar .ant-btn-default{
color: #ffffff;
background: linear-gradient(
rgb(189, 143, 78),
rgb(115, 89, 52)
), #1A1A1A;
border: none;
}
body.montzar .ant-btn-default:not(:disabled):hover{
//body.pargar .ant-btn-default{
// color: #ffffff;
// background: linear-gradient(
// rgb(189, 143, 78),
// rgb(115, 89, 52)
// ), #1A1A1A;
// border: none;
//}
body.pargar .ant-btn-default:not(:disabled):hover{
background: none;
border: 1px solid #FFBF65;
color: white;
border: none;
background: #FFD86DFF;
color: rgba(47, 47, 47, 0.8);
}
body.montzar .property-segmented {
body.pargar .property-segmented {
border: 1px solid #FFBF65;
font-size: 16px;
background: linear-gradient(
@ -243,7 +280,7 @@ body.montzar .property-segmented {
align-items: center;
color: #FFBF65;
}
body.montzar .tarazCard {
body.pargar .tarazCard {
position: relative;
color: #ffffff;
border-radius: 15px;
@ -257,7 +294,7 @@ body.montzar .tarazCard {
rgba(207, 207, 207, 0.07)
), #1A1A1A;
}
body.montzar .priceCard{
body.pargar .priceCard{
color: #ffffff;
border-radius: 15px;
margin-top: 1rem;
@ -269,33 +306,30 @@ body.montzar .priceCard{
rgba(207, 207, 207, 0.07)
), #1A1A1A;
}
body.montzar .buyCard{
body.pargar .buyCard{
color: #ffffff;
width: 160px;
height: 2.5rem;
font-size: 18px;
font-weight: bold;
border-radius: 8px;
//margin-top: 1rem;
border: 1px solid #FFBF65;
background: none;
align-content: center;
}
body.montzar .ant-input-affix-wrapper .anticon.ant-input-password-icon{
color: #ffffff;
body.pargar .ant-input-affix-wrapper .anticon.ant-input-password-icon{
//color: #ffffff;
}
body.montzar .buyDifferent{
body.pargar .buyDifferent{
color: #ffffff;
width: 160px;
//height: 2.5rem;
font-size: 18px;
border-radius: 8px;
//margin-top: 1rem;
border: 1px solid #FFBF65;
background: none;
align-content: center;
}
body.montzar .taraz-title {
body.pargar .taraz-title {
position: absolute;
left: 50%;
top: -20px;
@ -314,7 +348,7 @@ body.montzar .taraz-title {
font-size: 20px;
box-shadow: 0 2px 4px rgba(255, 191, 101, 0.5);
}
body.montzar .accountDetail-datePicker{
body.pargar .accountDetail-datePicker{
border: 1px solid #FFBF65;
border-top-right-radius: 12px;
border-top-left-radius: 12px;
@ -325,33 +359,32 @@ body.montzar .accountDetail-datePicker{
justify-self: center;
}
body.montzar .accountDetail-datePicker .ant-picker{
body.pargar .accountDetail-datePicker .ant-picker{
background: none;
border: none;
//width: auto !important;
}
body.montzar .ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner, :where(.css-dev-only-do-not-override-12oxb1q).ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner, :where(.css-dev-only-do-not-override-12oxb1q).ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {
body.pargar .ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner, :where(.css-dev-only-do-not-override-12oxb1q).ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner, :where(.css-dev-only-do-not-override-12oxb1q).ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {
color: white;
background: #191919;
}
body.montzar .ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner::before{
body.pargar .ant-picker-dropdown .ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner::before{
border: 1px solid #191919;
}
body.montzar .ant-picker-dropdown .ant-picker-today-btn{
body.pargar .ant-picker-dropdown .ant-picker-today-btn{
color: #191919;
}
body.montzar .ant-picker-clear{
body.pargar .ant-picker-clear{
color: white;
background: #191919;
}
body.montzar .accountDetail-datePicker .ant-picker .ant-picker-input >input{
body.pargar .accountDetail-datePicker .ant-picker .ant-picker-input >input{
justify-items: center;
font-size: 20px;
font-weight: 200;
color: rgba(255, 255, 255, 0.2);
}
body.montzar .submitDate{
body.pargar .submitDate{
border: none;
color: #ffffff ;
font-size: 15px;
@ -361,7 +394,7 @@ body.montzar .submitDate{
border-bottom-right-radius: 8px;
border-bottom-left-radius: 2px;
}
body.montzar .getPDF{
body.pargar .getPDF{
border: none;
color: #ffffff ;
font-size: 15px;
@ -372,39 +405,39 @@ body.montzar .getPDF{
border-bottom-right-radius: 2px;
border-bottom-left-radius: 8px;
}
body.montzar .accountingCard{
body.pargar .accountingCard{
color: white;
background: none;
border: 1px solid #FFBF65;
border-radius: 12px;
}
body.montzar .orderSearchBox .ant-input{
body.pargar .orderSearchBox .ant-input{
background: none ;
border: none;
color: #FFFFFF99 ;
}
body.montzar .orderSearchBox input::placeholder {
body.pargar .orderSearchBox input::placeholder {
color: white;
}
body.montzar .orderSearchBox .ant-input-affix-wrapper{
body.pargar .orderSearchBox .ant-input-affix-wrapper{
background: none;
border: 1px solid #FFBF65;
border-radius: 12px;
height: 46px;
width: 20rem;
}
body.montzar .searchIcon{
body.pargar .searchIcon{
stroke: #FFBF65 ;
}
body.montzar .backUserSetting1 {
background: none;
border: none;
body.pargar .backUserSetting1 {
background: #FFBF65;
border: #FFBF65;
}
body.montzar .backUserSetting2 {
body.pargar .backUserSetting2 {
background-color: #000000;
border-color: #e5e7eb ;
}
body.montzar .users-title {
body.pargar .users-title {
background: linear-gradient(
rgba(217, 217, 217, 0.07),
rgba(217, 217, 217, 0.07)
@ -437,16 +470,17 @@ body.montzar .users-title {
right: 24px;
bottom: 130px;
}
body.montzar .ant-float-btn-body {
body.pargar .ant-float-btn-body {
background: #FFBF65;
border-radius: 15px;
height: 50px;
width: 50px;
}
body.montzar .ant-float-btn-default .ant-float-btn-body:hover{
body.pargar .ant-float-btn-default .ant-float-btn-body:hover{
background-color: #FFBF65;
}
body.montzar .userDrawer{
body.pargar .packageDrawer{
background: rgba(18, 18, 18, 0.13);
backdrop-filter: blur(8px);
border-top-left-radius: 15px;
@ -455,18 +489,7 @@ body.montzar .userDrawer{
max-width: 425px;
justify-self: anchor-center;
}
body.montzar .packageDrawer{
background: rgba(18, 18, 18, 0.13);
backdrop-filter: blur(8px);
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: 1px solid #FFBF65;
max-width: 425px;
justify-self: anchor-center;
}
body.montzar .user_submitButton{
body.pargar .user_submitButton{
background: linear-gradient(
to right,
rgb(151, 113, 60),
@ -478,17 +501,17 @@ body.montzar .user_submitButton{
font-weight: 700;
font-size: 20px;
}
body.montzar .van-action-sheet__header{
body.pargar .van-action-sheet__header{
color: white;
}
body.montzar .ant-form-item .ant-form-item-label > label{
body.pargar .ant-form-item .ant-form-item-label > label{
color: white;
}
body.montzar .ant-input-affix-wrapper{
body.pargar .ant-input-affix-wrapper{
background: #191919;
border: 1px solid #FFBF65;
}
body.montzar .userCard{
body.pargar .userCard{
width: 350px;
background: rgba(217, 217, 217, 0.07);
border: 1px solid #FFBF65;
@ -496,27 +519,23 @@ body.montzar .userCard{
box-shadow: 0px 0px 7px 4px rgba(0, 0, 0, 0.55);
align-self: center;
}
body.montzar .iconUserSetting {
body.pargar .iconUserSetting {
stroke: #FFBF65 ;
fill: #FFBF65 ;
}
body.montzar .userSettingDrawer {
background: rgba(18, 18, 18, 0.71);
body.pargar .userSettingDrawer {
backdrop-filter: blur(3px);
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border: 1px solid #FFBF65;
width: 80%;
//max-width: 400px;
margin-left: auto;
}
body.montzar .birthDate.ant-picker{
body.pargar .birthDate.ant-picker{
background: #191919 !important;
border: 2px solid #FFBF65;
}
body.montzar .submitButton-userSetting {
body.pargar .submitButton-userSetting {
font-size: 21px;
border: none;
@ -535,7 +554,7 @@ body.montzar .submitButton-userSetting {
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
body.montzar .cancelButton-userSetting {
body.pargar .cancelButton-userSetting {
background: none;
border: 1px solid #FFBF65;
color: #ffffff ;
@ -546,7 +565,7 @@ body.montzar .cancelButton-userSetting {
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
body.montzar .package_submitButton{
body.pargar .package_submitButton{
background: linear-gradient(
to right,
rgb(151, 113, 60),
@ -558,7 +577,7 @@ body.montzar .package_submitButton{
font-weight: 700;
font-size: 25px;
}
body.montzar .mobile-navbar {
body.pargar .mobile-navbar {
border: 1px solid #FFBF65;
font-size: 16px;
background: linear-gradient(
@ -571,7 +590,7 @@ body.montzar .mobile-navbar {
align-items: center;
color: #ffffff;
}
body.montzar .ant-modal-content{
body.pargar .ant-modal-content{
background: rgba(18, 18, 18, 0.13);
backdrop-filter: blur(8px);
border-top-left-radius: 15px;
@ -580,118 +599,77 @@ body.montzar .ant-modal-content{
border-bottom-right-radius: 15px;
border: 1px solid #FFBF65;
}
body.montzar .ant-modal-close-x{
body.pargar .ant-modal-close-x{
color: white;
}
body.montzar .userSettingDropDown{
body.pargar .userSettingDropDown{
color: white;
background: rgba(18, 18, 18, 0.71);
backdrop-filter: blur(8px);
border-radius: 45px;
border: 1px solid #FFBF65;
}
body.montzar .ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-title {
body.pargar .ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-title {
color: #ffffff;
}
body.montzar .customInput .ant-input{
body.pargar .customInput .ant-input{
border: none;
}
body.montzar .ant-radio-wrapper{
body.pargar .ant-input:hover{
border: none;
}
body.pargar .ant-radio-wrapper{
color: #ffffff;
}
body.montzar .ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
body.pargar .ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
background:#E3C27BFF;
border-color:#E3C27BFF;
}
body.montzar .ant-select-selector, .ant-tooltip-open, .ant-select-selection-item, .ant-select-item .ant-select-item-option {
body.pargar .ant-select-selector, .ant-tooltip-open, .ant-select-selection-item, .ant-select-item .ant-select-item-option {
color: white;
}
body.montzar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
body.pargar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
position: relative;
background-color: #191919;
}
body.montzar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
body.pargar .ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: #191919;
}
body.montzar .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
body.pargar .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
border-color: #E3C27BFF;
}
body.montzar .buttonLogin {
body.pargar .buttonLogin {
background-color: #E3C27BFF ;
color: #ffffff ;
}
body.montzar .updateModal .ant-modal-content {
body.pargar .updateModal .ant-modal-content {
background: rgb(18, 18, 18);
border-radius: 20px;
border: 1px solid #FFBF65;
}
body.montzar .ant-input::placeholder {
body.pargar .ant-input::placeholder {
color: #ffffff !important;
}
body.montzar .ant-input:hover {
background: none;
}
body.montzar .ant-input-lg {
body.pargar .ant-input-lg {
font-size: 14px;
}
body.montzar .hide-scrollbar {
body.pargar .hide-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
body.montzar .hide-scrollbar::-webkit-scrollbar {
body.pargar .hide-scrollbar::-webkit-scrollbar {
display: none;
}
body.montzar .mobileInput {
body.pargar .mobileInput {
font-size: 18px;
/*background: linear-gradient(
rgba(217, 217, 217, 0.07),
rgba(217, 217, 217, 0.07)
), #1A1A1A;*/
//height: 49px;
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
border-top-right-radius: 12px;
border-bottom-right-radius: 3px;
padding: 1rem;
margin-top: 2rem;
border-top-left-radius: 146px;
border-bottom-left-radius: 146px;
border-top-right-radius: 146px;
border-bottom-right-radius: 146px;
}
body.montzar .continueButton {
font-size: 20px;
background: linear-gradient(
to right,
rgb(153, 114, 60) 10%,
rgb(255, 191, 101) 90%
);
width: 110px;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
border-top-right-radius: 3px;
border-bottom-right-radius: 8px;
}
body.montzar .continueButton2 {
font-size: 20px;
background: none;
border: 1px solid #FFBF65;
border-top-left-radius: 8px;
border-bottom-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 8px;
}
body.montzar .buttonRegister {
font-size: 20px;
background: linear-gradient(
to right,
rgb(153, 114, 60) 10%,
rgb(255, 191, 101) 90%
);
border: none;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
body.montzar .continueButton3 {
body.pargar .continueButton3 {
font-size: 20px;
margin-top: 4px;
border: none;
@ -706,7 +684,7 @@ body.montzar .continueButton3 {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
body.montzar .getSmsCodeButton {
body.pargar .getSmsCodeButton {
//font-size: 15px;
border: none;
background: linear-gradient(
@ -720,7 +698,7 @@ body.montzar .getSmsCodeButton {
border-top-right-radius: 10px;
border-bottom-right-radius: 3px;
}
body.montzar .getAgainSmsCodeButton {
body.pargar .getAgainSmsCodeButton {
font-size: 15px;
color: white;
align-self: center;
@ -732,26 +710,26 @@ body.montzar .getAgainSmsCodeButton {
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
}
body.montzar .getAgainSmsCodeButton.ant-btn-dashed:not(:disabled):hover {
body.pargar .getAgainSmsCodeButton.ant-btn-dashed:not(:disabled):hover {
color: #FFBF65;
border: 1px solid #FFBF65;
}
body.montzar input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active{
body.pargar input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active{
box-shadow: none;
}
body.montzar .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{
body.pargar .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{
border: 1px solid #FFBF65;
color: black;
}
body.montzar .input-internal-autofill-selected {
body.pargar .input-internal-autofill-selected {
background: none;
}
body.montzar .van-dialog {
body.pargar .van-dialog {
background: black;
backdrop-filter: blur(8px);
border: 1px solid #FFBF65;
}
body.montzar .main-body {
body.pargar .main-body {
position: absolute;
inset: 0;
pointer-events: none;
@ -764,7 +742,7 @@ body.montzar .main-body {
max-width: 100%;
height: auto;
}
body.montzar .loginInput.ant-input-affix-wrapper{
body.pargar .loginInput.ant-input-affix-wrapper{
border: 1px solid #FFBF65;
background: linear-gradient(
rgba(217, 217, 217, 0.07),
@ -772,31 +750,12 @@ body.montzar .loginInput.ant-input-affix-wrapper{
), #1A1A1A;
border-radius: 12px;
}
body.montzar .loginInput .ant-input{
body.pargar .loginInput .ant-input{
border-radius: 12px;
font-size: 18px;
background: linear-gradient(
rgba(217, 217, 217, 0.07),
rgba(217, 217, 217, 0.07)
), #1A1A1A;
//height: 49px;
}
body.montzar .bottom-blur {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 12vh;
width: 350px;
border-top-right-radius: 18px;
border-top-left-radius: 18px;
justify-self: center;
backdrop-filter: blur(3px);
-webkit-backdrop-filter: blur(3px);
background: rgba(25, 25, 25, 0.17);
pointer-events: none;
z-index: 1;
border-top: none;
/* box-shadow: inset 0 10px 10px -10px rgba(25, 25, 25, 0.3); */
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,12 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
<defs>
<style>
.cls-1 {
font-size: 347.222px;
text-anchor: end;
font-family: "Copperplate Gothic Bold";
}
</style>
</defs>
<text id="MZ" class="cls-1" transform="translate(196.036 134.04) scale(0.336)"><tspan x="0">MZ</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 378 B

View File

@ -1,12 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
<defs>
<style>
.cls-1 {
font-size: 347.222px;
text-anchor: end;
font-family: "Copperplate Gothic Bold";
}
</style>
</defs>
<text id="MZ" class="cls-1" transform="translate(194.036 139.04) scale(0.336)"><tspan x="0">MZ</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 378 B

View File

@ -1,18 +1,18 @@
<template>
<div class="flex justify-center mt-2 p-2">
<div
class="flex justify-between h-3rem w-20rem items-center navbar"
>
<span class="text-white text-[16px] mr-1rem" style="font-weight: 400;">
{{ userStore.user?.name }}
</span>
<Icon
icon="vuesax-linear:user"
size="40"
@click="open = true"
class="avatarIcon"
/>
</div>
<div
class="flex justify-between items-center navbar"
>
<span class="text-white text-[16px] mr-1rem" style="font-weight: 400; color: rgba(226, 177, 43, 1);">
{{ userStore.user?.name }}
</span>
<Icon
icon="vuesax-linear:profile-circle"
size="30"
@click="open = true"
class="p-0.5 icon"
/>
</div>
</div>
<div>
<ProfileDrawer
@ -28,7 +28,6 @@ import ProfileDrawer from '@/components/ProfileDrawer.vue'
import { ref } from 'vue'
import { useUserStore } from '@/store/user'
import Icon from '@/components/Icon.vue'
const mode = import.meta.env.MODE
const { prefixCls } = usePrefix('header')
const open = ref<boolean>(false)
const userStore = useUserStore()

View File

@ -3,7 +3,7 @@
<ADrawer
class="userSettingDrawer"
:open="props.open"
placement="right"
placement="bottom"
:header-style="{ display: 'none' }"
:body-style="{ padding: '12px' }"
:get-container="false"

View File

@ -1,171 +1,70 @@
<template>
<div :class="[prefixCls]">
<div class="px-3rem justify-center absolute right-0 left-0 bottom-0 top-0">
<div class="justify-center absolute right-0 left-0 bottom-0 top-0">
<div class="p-2 w-full flex justify-center">
<div class="flex property-segmented mt-4rem items-center p-1 mt-2">
<div
class="w-full text-center py-2 cursor-pointer transition"
:class="activeKey === 'ثبت نام' ? 'text-[#FFBF65]' : 'text-white'"
@click="activeKey = 'ثبت نام'; step = 'register'"
>
ثبت نام
</div>
<div class="w-[1.5px] h-[24px] bg-[#FFBF65A6]"></div>
<div
class="w-full text-center py-2 cursor-pointer transition"
:class="activeKey === 'ورود' ? 'text-[#FFBF65]' : 'text-white'"
@click="activeKey = 'ورود'; step = 'mobile'"
>
ورود
</div>
</div>
</div>
<AForm :model="model" ref="formRef" layout="vertical" class="">
<AForm :model="model" ref="formRef" layout="vertical">
<div style="border-radius: 15px" class="">
<div v-if="step === 'mobile'">
<!-- <img
src="@/assets/img/loginVector.png"
alt="login-image"
class="vector absolute bottom-0 left-[7.5rem] transform -translate-x-1/2"
/>-->
<img :src="goldVectorr"
alt="login-image"
style="display: block; margin: 4rem auto;" />
<img src="@/assets/img/login.png" alt="login image" style="justify-self: center;"/>
<div class="text-center text-[16px] text-white mb-6">
جهت ورود شماره موبایل خود را وارد کنید.
</div>
<AFormItem name="mobile" :rules="[{ required: true, message: 'شماره موبایل را وارد نمایید' }]">
<AInput v-model:value="model.mobile" class="mobileInput" size="large" placeholder="شماره موبایل" />
</AFormItem>
<BasicButton class="continueButton" size="large" :loading="loading" @click="submitMobileHandler">
ادامه
</BasicButton>
<div v-if="step === 'mobile'">
<div class="text-center mt-0.5rem text-[16px]">
شماره موبایل خود را وارد کنید
</div>
<AFormItem class="px-8" name="mobile" :rules="[{ required: true, message: 'شماره موبایل را وارد نمایید' }]">
<AInput v-model:value="model.mobile" class="mobileInput" placeholder="شماره موبایل" />
</AFormItem>
</div>
<div v-if="step === 'password'">
<!-- <img
src="@/assets/img/codeVector2.png"
alt="login-image"
class="vector absolute bottom-0 left-[0.5rem]"
/>-->
<img src="@/assets/img/codeVector.png"
alt="login-image"
style="display: block; margin: 4rem auto;"/>
<div class="text-center text-[16px] text-white mb-6">
کلمه عبور خود را وارد کنید.
</div>
<AFormItem name="password" :rules="[{ required: true, message: 'کلمه عبور را وارد نمایید' }]">
<AInputPassword class="customInput" v-model:value="model.password" size="large" type="password" placeholder="کلمه عبور" />
</AFormItem>
<div class="flex gap-2">
<BasicButton
class=" w-1/3 continueButton2"
:loading="loading"
@click="submitPasswordHandler"
>
ادامه
</BasicButton>
<BasicButton size="large" class="w-2/3 getSmsCodeButton" @click="sendOtpFromPasswordStep">
دریافت کد ورود از طریق پیامک
</BasicButton>
</div>
<div v-if="step === 'otp'" class="mt-0.5rem px-8">
<!-- <div class="flex items-center mr-2 cursor-pointer" @click="step = 'mobile'">
<Icon icon="vuesax-linear:edit" size="20" />
</div>-->
<div class="text-center text-[16px]">
کد ارسال شده از طریق پیامک را وارد کنید.
</div>
<!-- <div v-if="!enableSendAgainCode" class="flex justify-center gap-1">
<span>ارسال مجدد کد در </span>
<span>{{ time }}</span>
<span> دیگر </span>
</div>-->
<!-- <BasicButton v-if="enableSendAgainCode" class="continueButton" type="dashed" @click="reSendCode">ارسال مجدد کد تایید</BasicButton>-->
<OtpInput
style="direction: ltr"
class=" mobileInput"
ref="refOtpInput"
autocomplete="one-time-code"
input-classes="otp-input"
separator=""
value=""
:num-inputs="4"
:should-auto-focus="true"
:is-input-num="true"
@on-change="handleOnChange"
@on-complete="handleOnComplete"
/>
<!-- <AInput
type="password"
class="mobileInput"
autocomplete="one-time-code"
maxlength="4"
v-model:value="refOtpInput"
@on-change="handleOnChange"
@pressEnter="handleOnComplete"
/>-->
</div>
<div v-if="step === 'otp'" class="text-white flex flex-col items-center gap-2">
<div class="flex items-center mr-2 cursor-pointer" @click="step = 'mobile'">
<Icon icon="vuesax-linear:edit" size="20" />
</div>
<img src="@/assets/img/codeVector.png" alt="login-image" style="justify-self: center; margin-top: 4rem; margin-bottom: 4rem;"/>
<div class="text-center text-[16px] text-white mb-6">
کد ارسال شده را وارد کنید.
</div>
<div v-if="!enableSendAgainCode" class="flex justify-center gap-1">
<span>ارسال مجدد کد در </span>
<span>{{ time }}</span>
<span> دیگر </span>
</div>
<BasicButton v-if="enableSendAgainCode" class="getAgainSmsCodeButton" type="dashed" @click="reSendCode">ارسال مجدد کد تایید</BasicButton>
<OtpInput
style="direction: ltr"
class="mt-2 justify-center"
ref="refOtpInput"
autocomplete="one-time-code"
input-classes="otp-input"
separator=""
value=""
:num-inputs="4"
:should-auto-focus="true"
:is-input-num="true"
@on-change="handleOnChange"
@on-complete="handleOnComplete"
/>
<BasicButton class="w-full continueButton3" :loading="loading" @click="submitHandler">
ورود
</BasicButton>
</div>
<div class="bottom-rectangle">
<BasicButton v-if="step === 'mobile'" class="continueButton" icon="vuesax-linear:arrow-right-1" :loading="loading" @click="submitMobileHandler">
دریافت کد
</BasicButton>
<BasicButton v-if="step === 'otp'" class="w-11rem continueButton" icon="vuesax-linear:arrow-right-1" :loading="loading" @click="submitHandler">
ورود
</BasicButton>
</div>
</div>
</AForm>
<div class="mt-4rem" v-if="step === 'register'" >
<a-form ref="formRef" :model="userFormState" name="basic"
@finish="registerAccount">
<a-form-item :rules="[required()]" class="home_appear_fade_in_down loginInput" label="نام" name="fname">
<BasicInput v-model:value="userFormState.fname" place-holder="نام" class="loginInput"/>
</a-form-item>
<a-form-item :rules="[required()]" class="home_appear_fade_in_down loginInput" label="نام خانوادگی" name="lname">
<BasicInput v-model:value="userFormState.lname" place-holder="نام خانوادگی" class="loginInput"/>
</a-form-item>
<a-form-item :rules="[required(),mobileValidation()]" class="home_appear_fade_in_down" label="شماره موبایل" name="mobile">
<BasicInput v-model:value="userFormState.mobile" place-holder="شماره موبایل" class="loginInput"/>
</a-form-item>
<a-form-item :rules="[required()]" class="home_appear_fade_in_down customInput" label="کلمه عبور" name="password">
<AInputPassword v-model:value="userFormState.password" place-holder="کلمه عبور" class="loginInput"/>
</a-form-item>
<!-- <a-form-item class="home_appear_fade_in_down" :rules="[required()]" label="کد معرف" name="referral_id">
<BasicInput :disabled="disableForm" v-model:value="userFormState.referral_id" place-holder="کد معرف" />
</a-form-item>-->
<a-form-item>
<BasicButton
:disabled="loading"
class="buttonRegister w-full py-2 mt-4"
html-type="submit"
type="primary"
>
<div>
<a-spin v-if="loading" size="small" />
<div v-else>ثبت نام</div>
</div>
</BasicButton>
</a-form-item>
</a-form>
<DialogVantOneButton v-model:show="registeredInfo" :closeOnClickOverlay="false" :timeOut="-1">
<template v-slot:img>
<!-- <img :src="registerDelayImage" alt="" class="opacity-80">-->
</template>
<template v-slot:title>
<div class="p-5 text-center">
ثبت نام شما با موفقیت انجام شد. اکنون شما میتوانید با وارد کردن اطلاعات ورودی خود، وارد اپلیکیشن شوید.
</div>
</template>
<template v-slot:button>
<div class="text-center cursor-pointer" @click="step = 'mobile'">
متوجه شدم
</div>
</template>
</DialogVantOneButton>
</div>
</div>
</div>
</template>
@ -175,39 +74,28 @@ import useCountdownTimer from '@/composable/useCountdownTimer'
import { persian2english } from '@/utils/convert'
import { usePrefix } from '@/composable/usePrefix'
import OtpInput from 'vue3-otp-input'
import { onMounted, reactive, ref } from 'vue'
import { reactive, ref } from 'vue'
import type { Login } from '@/model/login'
import type { FormInstance } from 'ant-design-vue'
import { loginWithPass, verifyToken, loginWithSMS, getSepideh, registerCustomer } from '@/api/auth'
import { setToken, URLUserType } from '@/utils'
import { verifyToken, loginWithSMS } from '@/api/auth'
import { setToken } from '@/utils'
import { useUserStore } from '@/store/user'
import router from '@/router'
import { message } from 'ant-design-vue'
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
import Icon from '@/components/Icon.vue'
import { mobileValidation, required } from '@/utils/inputRules'
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
import DialogVantOneButton from '@/components/DialogVantOneButton.vue'
import type { User } from '@/model/user'
import goldVectorr from '@/assets/img/goldloginVector.png'
const formRef = ref<FormInstance>()
const refOtpInput = ref<InstanceType<typeof OtpInput> | null>(null)
const userStore = useUserStore()
const logo = import.meta.env.VITE_PROJECT_LOGO
const mode = import.meta.env.MODE
const { prefixCls } = usePrefix('login')
const loading = ref(false)
const enableSendAgainCode = ref(false)
const data = reactive(['ثبت نام' , 'ورود'])
const activeKey = ref('ورود')
const registeredInfo = ref<boolean>(false)
const userFormState = reactive<User>({
access_token: ''
})
const disableForm=ref(false)
const step = ref<'register' | 'mobile' | 'password' | 'otp'>('mobile')
const step = ref<'mobile' | 'otp'>('mobile')
const { time, onFinish, reset } = useCountdownTimer('00:02:00', 'mm:ss')
onFinish(() => enableSendAgainCode.value = true)
@ -220,17 +108,11 @@ const model = reactive<Login>({
provider: 'customer',
type_app: 'client'
})
onMounted(() => isSepideh())
async function isSepideh() {
await getSepideh()
}
function submitMobileHandler() {
formRef.value?.validateFields(['mobile']).then(() => {
step.value = 'password'
step.value = 'otp'
})
sendOtpFromPasswordStep()
}
async function reSendCode() {
@ -245,24 +127,6 @@ async function reSendCode() {
reset()
}
function registerAccount() {
formRef.value?.validateFields().then(async () => {
try {
loading.value = true
URLUserType() === 'single' ? userFormState.type = 2 : userFormState.type = 1
const { id } = await registerCustomer(userFormState)
registeredInfo.value = true
} catch (e) {
console.log(e)
if (e.response?.status === 422) {
// message.error('این شماره همراه قبلا ثبت نام کرده است')
}
} finally {
loading.value = false
}
})
}
const handleOnChange = (value: string) => (model.token = value)
const handleOnComplete = async (value: string) => {
@ -285,10 +149,6 @@ async function submitHandler() {
}
}
function goToRegister() {
router.push({ name: 'register' })
}
async function sendOtpFromPasswordStep() {
try {
loading.value = true
@ -310,29 +170,6 @@ async function sendOtpFromPasswordStep() {
}
}
async function submitPasswordHandler() {
await formRef.value?.validateFields(['password'])
try {
loading.value = true
const { access_token } = await loginWithPass({
mobile: persian2english(model.mobile),
password: model.password,
provider: 'customer',
type_app: 'client'
})
setToken(access_token)
await userStore.getUserInfo()
await router.push({ name: 'home' })
message.success('با موفقیت وارد شدید.')
} catch (error : any) {
message.error(error.response?.data?.message || 'ورود با کلمه عبور ناموفق بود.')
} finally {
loading.value = false
}
}
</script>

View File

@ -1,74 +1,88 @@
<template>
<div :class="[prefixCls]">
<div class="pb-4 relative">
<!-- <AAffix class="md:hidden" :offset-top="74">-->
<div class="p-4 pt-0">
<div class="flex p-2 gap-2 rounded-md mt-4">
<span class="w-full font-semibold text-center cursor-pointer green-color text-[20px]">خـــــرید</span>
<!-- <ADivider type="vertical" style="height: 20px; background-color: #FFBF65A6; " />-->
<div class="container-with-line"></div>
<div class="" :class="[prefixCls]">
<img style="position: fixed; top: 3rem; justify-self: center" src="@/assets/img/logo.png" alt="logo image"/>
<div class="bottom-yellow-rectangle"></div>
<div class="middle-white-rectangle"></div>
<span class="w-full font-semibold text-center red-color cursor-pointer text-[20px]">فـــــروش</span>
</div>
</div>
<!-- </AAffix>-->
<div class="grid grid-cols-1 gap-4 max-h-[75vh] overflow-y-auto px-4 hide-scrollbar pb-12rem">
<!-- <a-alert message="تمامی معاملات تستی می باشد." type="warning" class="md:col-span-2 lg:col-span-3" show-icon />-->
<a-alert :message="val.title" :description="val.text" class="" closable :key="val.id" :title="val.title" :type="alertType(val.type)" show-icon v-for="val in messages"/>
<div class="grid grid-cols-2 gap-3 h-28rem overflow-y-scroll mt-10rem" style="justify-self: center;">
<div class="flex col-span-1 input-1 font-semibold justify-center">سند فروش </div>
<div v-if="mainProductList?.some(p => p.unit === 'گرم')" class="mt-[1rem] ">
<div v-for="(item, index) in mainProductList.filter(p => p.unit === 'گرم')" :key="'gram' + index" class="relative mt-4">
<div v-if="index === 0" class="section-title ">آبشـــده</div>
<ProductCard
:item="item"
@buy="openHandler('buy', item)"
@sell="openHandler('sell', item)"
/>
</div>
</div>
<div v-if="mainProductList?.some(p => p.unit === 'تعداد')" class="mt-[3rem]">
<div v-for="(item, index) in mainProductList.filter(p => p.unit === 'تعداد')" :key="'coin' + index" class="relative">
<div v-if="index === 0" class="section-title font-semibold">مسکوکات</div>
<ProductCard
:item="item"
@buy="openHandler('buy', item)"
@sell="openHandler('sell', item)"
/>
</div>
<div class="col-span-1 font-semibold flex justify-center">
<div class="input-3 relative">
<div class="line-3 absolute"></div>
سند خرید
</div>
</div>
<div class="bottom-blur"></div>
<div class="col-span-1 font-semibold flex justify-center">
<div class="input-3 relative">
<div class="line-3 absolute"></div>
سند حسابداری
</div>
</div>
<div class="flex col-span-1 input-1 justify-center font-semibold">سند سامانه مودیان </div>
<div class="col-span-2 relative input-2">
<div class="line-2 absolute"></div>
<div class="flex justify-between">
<div class="">مــوضــوع</div>
<div class="font-bold">اصــــلــی</div>
</div>
</div>
<div class="flex justify-between col-span-2 relative input-2">
<div class="line-2 absolute"></div>
<div class="">شـمـــاره</div>
<div class="flex items-center">
<Icon icon="vuesax-linear:arrow-right-1" size="20" class="icon"/>
<div class="mx-4 font-bold">2</div>
<Icon icon="vuesax-linear:arrow-left-1" size="20" class="icon"/>
</div>
</div>
<div class="col-span-2 flex justify-between relative input-2">
<div class="line-2 absolute"></div>
<div class="">تـاریـــخ</div>
<div class="flex items-center">
<div>1404/05/06</div>
</div>
</div>
<div class="col-span-2 flex justify-between relative input-2">
<div class="line-2 absolute"></div>
<div class="">عیار تبدیل مثقال/گرم</div>
<div class="font-bold">18</div>
</div>
<div class="col-span-2 flex justify-between relative input-2">
<div class="line-2 absolute"></div>
<div class="">عیار</div>
<div class="font-bold">750</div>
</div>
<div class="col-span-2 flex items-center justify-center gap-2">
<span class="dot-line">
<span class="line-1"></span>
<span class="dot"></span>
</span>
<div class="text-14px">مظنه را انتخاب کنید و سپس وارد کنید</div>
<span class="dot-line">
<span class="dot"></span>
<span class="line-1"></span>
</span>
</div>
<div class="flex col-span-1 input-1 justify-center">مظنه گرمی</div>
<div class="flex col-span-1 input-1 justify-center">مظنه مثقالی</div>
<div class="col-span-2 flex justify-between relative input-2">
<div class="line-2 absolute"></div>
<div class="">عیار</div>
<div class="font-bold">750</div>
</div>
</div>
<BasicActionSheet
class=" productDrawer"
v-model:show="open"
height="600"
placement="bottom"
:header-style="{ display: 'none' }"
:body-style="{ padding: '16px', height: 'fit-content' }"
@close="open = false"
>
<template #closeIcon></template>
<BuySell
:type="transactionType"
@change="(value) => (transactionType = value)"
@cancel="open = false"
:data="data"
/>
</BasicActionSheet>
<!--
<BasicModal class="" width="450px" v-model:visible="open" custom-footer :loading="loading" v-else>
<BuySell
:type="transactionType"
@change="(value) => (transactionType = value)"
@cancel="open = false"
:data="data" />
<template #footer></template>
</BasicModal>
-->
</div>
</template>
@ -85,6 +99,7 @@ import { useUserStore } from '@/store/user'
import { getPrices,fillItemsCredit, mainProductList, setIntervalGetPrice, stopPriceInterval } from '@/utils/price'
import { getMessages } from '@/api/message'
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
import Icon from '@/components/Icon.vue'
const { prefixCls } = usePrefix('products')
const open = ref<boolean>(false)