adata-ui 2.1.13 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
16
16
|
moduleName: 'counterparty'
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
-
const { t } = useI18n()
|
|
19
|
+
const { t, locale } = useI18n()
|
|
20
20
|
|
|
21
21
|
interface ResponseData<DataResult> {
|
|
22
22
|
success: boolean
|
|
@@ -43,6 +43,9 @@ const systemMessage = ref(null)
|
|
|
43
43
|
const isOpenNotification = ref(false)
|
|
44
44
|
const message = useCookie('message')
|
|
45
45
|
|
|
46
|
+
const { myLayer } = useAppConfig()
|
|
47
|
+
const env = myLayer.mode
|
|
48
|
+
|
|
46
49
|
const mode = computed(() => {
|
|
47
50
|
if (props.moduleName === 'pk') {
|
|
48
51
|
return 'counterparty'
|
|
@@ -77,12 +80,22 @@ const computedClass = (state: string) =>
|
|
|
77
80
|
const fetchNotification = async () => {
|
|
78
81
|
try {
|
|
79
82
|
if (message.value === undefined) {
|
|
80
|
-
const link = `https://users.
|
|
83
|
+
const link = `https://users.${env}.kz/api/v1/system-messages/active-list/?module_name=${mode.value}`
|
|
81
84
|
const response = await fetch(link)
|
|
82
85
|
const { data } = await response.json()
|
|
83
86
|
|
|
84
|
-
if (data.details
|
|
85
|
-
|
|
87
|
+
if (data.details?.length) {
|
|
88
|
+
switch (locale.value) {
|
|
89
|
+
case 'ru':
|
|
90
|
+
systemMessage.value = data.details[0].message
|
|
91
|
+
break
|
|
92
|
+
case 'en':
|
|
93
|
+
systemMessage.value = data.details[0].message_en
|
|
94
|
+
break
|
|
95
|
+
case 'kk':
|
|
96
|
+
systemMessage.value = data.details[0].message_kz
|
|
97
|
+
break
|
|
98
|
+
}
|
|
86
99
|
isOpenNotification.value = true
|
|
87
100
|
}
|
|
88
101
|
}
|