2026-01-18 13:01:46 +03:30
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="wrap-fix z-1 bg-white py-3 px-3 text-primary font-bold drop-shadow flex">
|
|
|
|
|
<div @click="router.back()" class="cursor-pointer">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:arrow-right-1" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mr-2">قوانین و مقررات</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pt-20">
|
|
|
|
|
<div>
|
|
|
|
|
<img :src="img" alt="" class="mt-2 w-full absolute bottom-0" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-justify text-base z-200000 relative">
|
|
|
|
|
<div class="px-10">
|
|
|
|
|
<!-- <div class="h-20vh flex justify-center">
|
|
|
|
|
<img :src="logoFull" class="mb-20 h-15vh mt-5" />
|
|
|
|
|
</div>-->
|
|
|
|
|
<div class="overflow-y-auto h-60vh pb-20 border-primary">
|
2026-06-01 17:19:45 +03:30
|
|
|
<div class="rules-panel mt-5 border-solid border-2 border-primary text-primary rounded-[12px] p-4">
|
2026-01-18 13:01:46 +03:30
|
|
|
<div class="font-bold text-sm text-primary">
|
2026-05-31 16:27:59 +03:30
|
|
|
{{ rulesTitle }}
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
|
|
|
|
<div class="w-full h-1px my-3 bg-secondary"></div>
|
2026-05-31 16:27:59 +03:30
|
|
|
<div
|
2026-06-01 17:19:45 +03:30
|
|
|
v-for="(block, blockIndex) in rulesBlocks"
|
|
|
|
|
:key="`block-${blockIndex}`"
|
|
|
|
|
class="rules-block"
|
2026-05-31 16:27:59 +03:30
|
|
|
>
|
|
|
|
|
<div
|
2026-06-01 17:19:45 +03:30
|
|
|
v-if="block.title"
|
|
|
|
|
class="font-bold text-sm text-primary mt-4 mb-2"
|
|
|
|
|
>
|
|
|
|
|
{{ block.title }}
|
|
|
|
|
</div>
|
|
|
|
|
<p
|
|
|
|
|
v-for="(rule, index) in block.items"
|
|
|
|
|
:key="`rule-${blockIndex}-${index}`"
|
|
|
|
|
class="rules-paragraph"
|
2026-05-31 16:27:59 +03:30
|
|
|
>
|
|
|
|
|
{{ rule }}
|
2026-06-01 17:19:45 +03:30
|
|
|
</p>
|
|
|
|
|
</div>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-23 16:34:15 +03:30
|
|
|
<div v-if="config.config.name === 'garoosi'" class="wrap-fix bottom-0 px-10 pb-3rem flex gap-2 bg-white">
|
2026-06-03 11:57:40 +03:30
|
|
|
<a class="w-full" href="tel:09031265925">
|
2026-01-31 14:23:28 +03:30
|
|
|
<BasicButton class="w-full" type="primary">تماس با پشتیبانی</BasicButton>
|
|
|
|
|
</a>
|
2026-05-21 18:38:56 +03:30
|
|
|
<a href="https://ble.ir/garoosigallery">
|
2026-01-31 14:23:28 +03:30
|
|
|
<img src="@/assets/img/bale.png" alt="" class="h-10 w-10"/>
|
|
|
|
|
</a>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
2026-05-23 16:34:15 +03:30
|
|
|
<div v-else class="wrap-fix bottom-0 px-10 pb-3rem flex gap-2 bg-white">
|
2026-06-11 13:19:16 +03:30
|
|
|
<a class="w-full" :href="getProjectSupportPhoneLink()">
|
2026-05-23 16:34:15 +03:30
|
|
|
<BasicButton class="w-full" type="primary">تماس با پشتیبانی</BasicButton>
|
|
|
|
|
</a>
|
2026-06-11 13:19:16 +03:30
|
|
|
<a :href="getProjectBaleLink()" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
<img src="@/assets/img/bale.png" alt="بله" class="h-10 w-10"/>
|
2026-05-23 16:34:15 +03:30
|
|
|
</a>
|
|
|
|
|
</div>
|
2026-01-18 13:01:46 +03:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <ActionSheet v-model:show="editPassVisible">salam</ActionSheet>-->
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2026-05-31 16:27:59 +03:30
|
|
|
import { onMounted, reactive, ref, computed } from 'vue'
|
2026-01-18 13:01:46 +03:30
|
|
|
import img from '@/assets/img/user_ly1.svg'
|
|
|
|
|
// import gr_bottom from './assets/img/gr_bottom_white.svg'
|
|
|
|
|
import { loading } from '@/utils'
|
|
|
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|
|
|
|
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
|
|
|
|
import { lengthValidation, required } from '@/utils/inputRules'
|
|
|
|
|
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
|
|
|
|
|
import type { User } from '@/models/login'
|
|
|
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
|
|
|
import router from '@/router'
|
|
|
|
|
import type { FormInstance } from 'ant-design-vue'
|
|
|
|
|
import { message } from 'ant-design-vue'
|
|
|
|
|
import { updateMe } from '@/api/me'
|
|
|
|
|
import { useUserStore } from '@/store/userStore'
|
|
|
|
|
import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker'
|
2026-01-21 19:38:50 +03:30
|
|
|
import {useConfigStore} from "../../../store/configStore";
|
2026-06-11 13:19:16 +03:30
|
|
|
import {getProjectBaleLink, getProjectSupportPhoneLink, getReferralShareText, getReferralShareTitle, isBoursecuProject} from "@/utils/config";
|
2026-05-31 16:27:59 +03:30
|
|
|
import {
|
2026-06-01 17:19:45 +03:30
|
|
|
getRulesBlocks,
|
2026-05-31 16:27:59 +03:30
|
|
|
getRulesTitle,
|
|
|
|
|
} from './rulesContent'
|
2026-06-01 17:19:45 +03:30
|
|
|
const config = useConfigStore()
|
2026-01-18 13:01:46 +03:30
|
|
|
const userFormState = ref<User>({
|
|
|
|
|
fname: '',
|
|
|
|
|
lname: '',
|
|
|
|
|
mobile: undefined,
|
|
|
|
|
birth_date: '',
|
|
|
|
|
phone_number: '',
|
|
|
|
|
province: '',
|
|
|
|
|
city: '',
|
|
|
|
|
n_code: undefined
|
|
|
|
|
})
|
|
|
|
|
const formRef = ref<FormInstance>()
|
|
|
|
|
const userStore = useUserStore()
|
2026-06-01 17:19:45 +03:30
|
|
|
const nameProject = computed(() => config.config?.name_fa || config.config?.name || 'بورس مس')
|
2026-05-31 16:27:59 +03:30
|
|
|
const isBoursecu = computed(() => isBoursecuProject())
|
2026-06-01 17:19:45 +03:30
|
|
|
const rulesTitle = computed(() => getRulesTitle(nameProject.value, isBoursecu.value))
|
|
|
|
|
const rulesBlocks = computed(() => getRulesBlocks(nameProject.value, isBoursecu.value))
|
2026-01-18 13:01:46 +03:30
|
|
|
// const editPassVisible = ref<boolean>(false)
|
|
|
|
|
const editPassVisible = ref<boolean>(false)
|
|
|
|
|
|
|
|
|
|
function setForm() {
|
|
|
|
|
userFormState.value = userStore.userInfo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function copyCode() {
|
|
|
|
|
// nextTick(() => {
|
|
|
|
|
const val = userStore.userInfo?.referral_id
|
|
|
|
|
navigator.clipboard.writeText(val)
|
|
|
|
|
message.info('کد رونوشت شد')
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function shareCode() {
|
2026-05-31 16:27:59 +03:30
|
|
|
const val = getReferralShareText({
|
|
|
|
|
userName: userStore.userInfo?.name,
|
2026-06-01 17:19:45 +03:30
|
|
|
projectName: nameProject.value,
|
2026-05-31 16:27:59 +03:30
|
|
|
referralId: userStore.userInfo?.referral_id,
|
|
|
|
|
})
|
2026-01-18 13:01:46 +03:30
|
|
|
navigator.share({
|
2026-06-01 17:19:45 +03:30
|
|
|
title: getReferralShareTitle(nameProject.value),
|
2026-01-18 13:01:46 +03:30
|
|
|
text: val
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const resetData = () => {
|
|
|
|
|
formRef.value?.resetFields()
|
|
|
|
|
userFormState.value = {
|
|
|
|
|
fname: '',
|
|
|
|
|
lname: '',
|
|
|
|
|
mobile: undefined,
|
|
|
|
|
birth_date: '',
|
|
|
|
|
phone_number: '',
|
|
|
|
|
province: '',
|
|
|
|
|
city: '',
|
|
|
|
|
n_code: undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
setForm()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function ok() {
|
|
|
|
|
formRef.value?.validateFields().then(async () => {
|
|
|
|
|
try {
|
|
|
|
|
loading.value = true
|
|
|
|
|
await updateMe(userFormState.value)
|
|
|
|
|
await userStore.getMyInfo()
|
|
|
|
|
editPassVisible.value = false
|
|
|
|
|
message.success('اطلاعات شما با موفقیت به روز رسانی شد')
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
} finally {
|
|
|
|
|
loading.value = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-06-01 17:19:45 +03:30
|
|
|
.rules-panel {
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
line-height: 1.75rem;
|
2026-01-18 13:01:46 +03:30
|
|
|
}
|
|
|
|
|
|
2026-06-01 17:19:45 +03:30
|
|
|
.rules-block + .rules-block {
|
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rules-paragraph {
|
|
|
|
|
margin: 0 0 1rem;
|
|
|
|
|
text-align: justify;
|
|
|
|
|
line-height: 1.9;
|
|
|
|
|
word-break: normal;
|
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
|
white-space: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rules-paragraph:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
2026-01-18 13:01:46 +03:30
|
|
|
</style>
|