$.ajax({
url: '/ajax.php', // URL для обработки клика
type: 'POST',
data: {
action: 'increment_click', // Действие для обработки
notification_id: notificationDetails[i]['id'] // ID уведомления
},
success: function(response) {
console.log('Click counter updated.');
},
error: function() {
// Обработка ошибок, если нужно
console.log('Error updating click counter.');
}
});
if ($_POST['action'] == 'increment_click' && isset($_POST['notification_id'])) {
.....
логика обновления по инкрименту нотификатору
}
interface reqiestType = {
name?:string;
age?:number;
}
interface reqiestType {
name:string;
age:number;
}
const data:Partial<reqiestType> = {};
router.beforeEach((to, from, next) => {
const auth = getAuth()
auth.onAuthStateChanged(user => {
if (!user && to.path !== '/auth') {
next('/auth')
}
else if (user && to.path === '/auth') {
next(from.path)
}
next()
})
})
<FormKit v-for="(deadline_type, idx) in data.deadline_types" key="deadline_type.id"
type="date"
v-model="form[idx]deadline_type.code"
:label="deadline_type.name"
/>
<input :value="text" @input="addCurrentValue"/>