// Tab switching functionality function switchTab(tabId) { // Hide all tabs const allTabs = document.querySelectorAll('.tab-content'); allTabs.forEach(tab => { tab.classList.remove('active'); }); // Show selected tab const selectedTab = document.getElementById(tabId); if (selectedTab) { selectedTab.classList.add('active'); } // Update navigation buttons const allNavButtons = document.querySelectorAll('.nav-btn'); allNavButtons.forEach(btn => { btn.classList.remove('text-health-green'); btn.classList.add('text-gray-400'); }); // Highlight active nav button const activeNavBtn = document.querySelector(`[data-tab="${tabId}"]`); if (activeNavBtn) { activeNavBtn.classList.remove('text-gray-400'); activeNavBtn.classList.add('text-health-green'); } // Reinitialize feather icons feather.replace(); } // Initialize page document.addEventListener('DOMContentLoaded', function() { // Initialize feather icons feather.replace(); // Animate progress bars on load setTimeout(() => { const progressBars = document.querySelectorAll('.progress-bar'); progressBars.forEach(bar => { bar.style.transition = 'width 1s ease'; }); }, 500); // Simulate real-time updates setInterval(() => { // Update time const now = new Date(); const timeString = now.toLocaleTimeString('th-TH', { hour: '2-digit', minute: '2-digit' }); // Update heart rate animation const heartIcons = document.querySelectorAll('[data-feather="heart"]'); heartIcons.forEach(icon => { icon.parentElement.classList.add('pulse-animation'); setTimeout(() => { icon.parentElement.classList.remove('pulse-animation'); }, 2000); }); }, 10000); }); // Handle supplement status clicks document.querySelectorAll('.bg-red-50.border-red-200').forEach(item => { item.addEventListener('click', function() { this.classList.remove('bg-red-50', 'border-red-200'); this.classList.add('bg-green-50', 'border-green-200'); const icon = this.querySelector('[data-feather="x"]'); if (icon) { icon.setAttribute('data-feather', 'check'); feather.replace(); } const text = this.querySelector('.text-red-600'); if (text) { text.textContent = 'รับประทานแล้ว!'; text.classList.remove('text-red-600'); text.classList.add('text-green-600'); } // Show success notification showNotification('บันทึกสำเร็จ! รับประทานผลิตภัณฑ์แล้ว'); }); }); // Handle task completion document.querySelectorAll('.w-6.h-6.bg-gray-300').forEach(item => { item.addEventListener('click', function() { this.classList.remove('bg-gray-300'); this.classList.add('bg-green-500'); const icon = this.querySelector('[data-feather="clock"]'); if (icon) { icon.setAttribute('data-feather', 'check'); feather.replace(); } // Show success notification showNotification('ภารกิจเสร็จสิ้น! +3 แต้ม'); }); }); // Notification system function showNotification(message) { const notification = document.createElement('div'); notification.className = 'fixed top-20 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg z-50 transition-all duration-300'; notification.textContent = message; document.body.appendChild(notification); setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { document.body.removeChild(notification); }, 300); }, 2000); } // Handle purchase buttons document.querySelectorAll('button').forEach(button => { if (button.textContent.includes('เพิ่มลงตะกร้า') || button.textContent.includes('ซื้อซ้ำ') || button.textContent.includes('สมัครแบบรายเดือน')) { button.addEventListener('click', function() { showNotification('เพิ่มสินค้าลงตะกร้าแล้ว!'); }); } }); // Handle time range selector buttons document.querySelectorAll('button').forEach(button => { if (button.textContent.includes('7 วัน') || button.textContent.includes('14 วัน') || button.textContent.includes('30 วัน')) { button.addEventListener('click', function() { // Remove active state from all buttons this.parentElement.querySelectorAll('button').forEach(btn => { btn.classList.remove('bg-health-green', 'text-white'); btn.classList.add('bg-gray-200', 'text-gray-600'); }); // Add active state to clicked button this.classList.remove('bg-gray-200', 'text-gray-600'); this.classList.add('bg-health-green', 'text-white'); showNotification(`เปลี่ยนช่วงเวลาเป็น ${this.textContent}`); }); } }); // Handle contact buttons document.querySelectorAll('button').forEach(button => { if (button.textContent.includes('แชททาง LINE') || button.textContent.includes('ส่งรายงานสุขภาพ') || button.textContent.includes('นัด Video Call')) { button.addEventListener('click', function() { showNotification('เปิดหน้าต่างใหม่...'); }); } }); // Handle reward redemption document.querySelectorAll('.border-gray-200.rounded-lg').forEach(item => { if (item.textContent.includes('แต้ม')) { item.addEventListener('click', function() { const pointsText = this.querySelector('.text-gray-500').textContent; const points = parseInt(pointsText.match(/\d+/)[0]); if (points <= 415) { // User has 415 coins showNotification(`แลกรางวัลสำเร็จ! ใช้ ${points} แต้ม`); } else { showNotification('แต้มไม่พอ! สะสมแต้มเพิ่ม'); } }); } }); // Smooth scroll for internal navigation document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const target = document.querySelector(this.getAttribute('href')); if (target) { target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }); // Pull to refresh functionality let startY = 0; let isPulling = false; document.addEventListener('touchstart', function(e) { if (window.scrollY === 0) { startY = e.touches[0].pageY; isPulling = true; } }); document.addEventListener('touchmove', function(e) { if (!isPulling) return; const currentY = e.touches[0].pageY; const diff = currentY - startY; if (diff > 100) { document.body.style.transform = `translateY(${Math.min(diff * 0.5, 100)}px)`; } }); document.addEventListener('touchend', function() { if (isPulling) { document.body.style.transform = ''; document.body.style.transition = 'transform 0.3s ease'; setTimeout(() => { document.body.style.transition = ''; showNotification('อัปเดตข้อมูลล่าสุด'); }, 300); isPulling = false; } }); // Add haptic feedback for mobile (if supported) if ('vibrate' in navigator) { document.querySelectorAll('button').forEach(button => { button.addEventListener('click', function() { navigator.vibrate(50); }); }); } // Handle offline/online status window.addEventListener('online', function() { showNotification('เชื่อมต่ออินเทอร์เน็ตแล้ว'); }); window.addEventListener('offline', function() { showNotification('ขาดการเชื่อมต่ออินเทอร์เน็ต'); }); // Local storage for user preferences const saveUserPreference = (key, value) => { localStorage.setItem(`wp_${key}`, JSON.stringify(value)); }; const getUserPreference = (key) => { const value = localStorage.getItem(`wp_${key}`); return value ? JSON.parse(value) : null; }; // Save tab preference const originalSwitchTab = switchTab; switchTab = function(tabId) { originalSwitchTab(tabId); saveUserPreference('lastTab', tabId); }; // Restore last active tab on page load const lastTab = getUserPreference('lastTab'); if (lastTab && document.getElementById(lastTab)) { switchTab(lastTab); } // Add animations for chart bars const observerOptions = { threshold: 0.5, rootMargin: '0px' }; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.height = entry.target.getAttribute('data-height'); } }); }, observerOptions); document.querySelectorAll('.chart-bar').forEach(bar => { const height = bar.style.height; bar.setAttribute('data-height', height); bar.style.height = '0'; observer.observe(bar); });
WP
WELLNET

ยินดีต้อนรับกลับ!

คุณอยู่ในแผนฟื้นฟู: 30-Day Restore Plan

วันที่ 12/30

เป้าหมายวันนี้

🧬

HRV

ค่าปกติ 60-100

62/100
🔴

ความดัน

เป้าหมาย <125/80

134/90
⚖️

น้ำหนัก

เป้าหมาย 70 กก.

71.2 กก.
🧪

pH ปัสสาวะ

เป้าหมาย 6.8

5.5 (กรด)

สถานะอาหารเสริมวันนี้

BS

รับประทานแล้ว (07:30)

เช้า

LS

รับประทานแล้ว (12:15)

กลางวัน

PHK

ยังไม่ได้รับประทาน!

เย็น

ความคืบหน้า 30 วัน

วันที่ 1 40% เสร็จสิ้น วันที่ 30

สุขภาพของฉันวันนี้

วันที่ 12 ธันวาคม 2567

ข้อมูลจาก Smart Band & MyScale

การนอน

6.3 ชม.

คุณภาพ: ปานกลาง

Heart Rate

82 bpm

สูง

HRV

61 ms

ปกติ

Stress Index

78

สูง

68 / 100

คะแนนสุขภาพวันนี้

อยู่ในเกณฑ์ดี สามารถปรับปรุงได้

คำแนะนำสำหรับวันนี้

ดื่มน้ำมากขึ้น

เป้าหมาย 2.5 ลิตร ตอนนี้ดื่มไป 1.2 ลิตร

เดินเพิ่มอีก

เป้าหมาย 6,000 ก้าว ตอนนี้เดินไป 3,247 ก้าว

หลีกเลี่ยงคาเฟอีน

Stress Index สูง ควรหลีกเลี่ยงเครื่องดื่มกระตุ้น

แผนการฟื้นฟู 30 วัน

วันที่ 12 ธันวาคม 2567

ความคืบหน้าทั้งหมด

10/12 วัน

สำเร็จ 83% ของภารกิจที่กำหนด

ภารกิจวันนี้

08:00

กิน BS 1 เม็ด

หลังอาหารเช้า

12:00

ดื่มน้ำ 1 ลิตร + LS

ก่อนอาหารกลางวัน

18:00

ทาน PHK ก่อนอาหาร

ยังไม่ทำ!

All Day

เดินให้ครบ 5,000 ก้าว

สำเร็จ 5,247 ก้าว

Before bed

วัด HRV ก่อนนอน

รอดำเนินการ

สถิติ 7 วันล่าสุด

ความสำเร็จภารกิจ 83%

ผลิตภัณฑ์ฟื้นฟูสุขภาพ

แนะนำสำหรับคุณโดยเฉพาะ

📦 แพ็ก 1: Deep Blood Flow

  • BS 30 เม็ด
  • เหมาะสำหรับ: ความดันสูง, ชาเท้า
  • ปรับปรุงการไหลเวียนโลหิต

990 บ.

1,290 บ.

📦 แพ็ก 2: Detox + Recovery

  • LS + PHK ครบเซ็ต
  • ล้างพิษ + ปรับสมดุลเลือด
  • ฟื้นฟูระบบขับถ่าย

1,290 บ.

ลดพิเศษ -23%

📦 แพ็ก 3: 30-Day Full Plan

  • BS + LS + PHK ครบเซ็ต
  • คู่มือ Meal Plan 30 วัน
  • ปรึกษาโค้ช 2 ครั้ง

2,790 บ.

Subscription ลด 20%

🎁 ข้อเสนอพิเศษ!

ซื้อครบ 2,500 บ. จัดส่งฟรี!

จำกัดเวลา

ผลลัพธ์ย้อนหลัง

ติดตามความก้าวหน้าของคุณ

HRV (ms)

48 ms ↑ 27% 61 ms

ความดันโลหิต (Systolic)

145 ↓ 12% 128

น้ำหนัก (กก.)

72.4

เริ่มต้น

71.2

ปัจจุบัน

ลดลง 1.2 กก. ✨

pH ปัสสาวะ

5.1

เริ่มต้น

6.6

ปัจจุบัน

ดีขึ้นมาก ใกล้เป้าหมาย! 🎯

สรุป 30 วัน

✅ HRV ดีขึ้น 27%

✅ ความดันลดลง 12%

✅ น้ำหนักลด 1.2 กก.

🎯 pH เข้าใกล้เป้าหมาย

ที่ปรึกษาของคุณ

ผู้เชี่ยวชาญดูแลสุขภาพของคุณ

Consultant

กัลยาณี สุขใจดี

Certified Wellness Consultant

ระดับ

WP-CWC

ดูแลผู้ใช้

57 คน

นัด Video Call ได้ทุกพฤหัสบดี
ตอบกลับภายใน 2 ชม.
คะแนน: 4.9/5.0 (23 รีวิว)

ติดต่อที่ปรึกษา

ข้อความล่าสุด

ก

สวัสดีครับ ผลการวัดวันนี้ HRV ดีขึ้นนะครับ แนะนำให้ดื่มน้ำเพิ่มครับ

2 ชม.ที่แล้ว

ฉ

ขอบคุณครับ วันนี้จะพยายามดื่มน้ำให้ครบ 2.5 ลิตรครับ

1 ชม.ที่แล้ว

ระบบภารกิจ & รางวัล

สะสมแต้มรับรางวัล

WP Coin ที่สะสม

415

วันนี้ได้

+12

อันดับ

#42

ภารกิจประจำวัน

วัด HRV

ได้ 3 แต้ม

✅

กินผลิตภัณฑ์ครบ

ได้ 5 แต้ม

✅

เดินครบ 6,000 ก้าว

รอ 4 แต้ม

0/6,000

ภารกิจประจำสัปดาห์

7 วันติดต่อกัน!

ทำภารกิจครบติดต่อกัน 7 วัน

50 แต้ม

5/7 วัน

สุขภาพดีเด่น

คะแนนสุขภาพเฉลี่ย > 80

100 แต้ม

เฉลี่ย 68/100

แลกรางวัล

🎯

ส่วนลด 10%

200 แต้ม

📦

ผลิตภัณฑ์ฟรี

500 แต้ม

👨‍⚕️

ปรึกษาโค้ช

150 แต้ม

🏆

VIP 1 เดือน

1000 แต้ม

Profile

พรชัย วัฒนะ

สมาชิกตั้งแต่ 15 ตุลาคม 2567

ข้อมูลส่วนตัว

อายุ 47 ปี
ส่วนสูง 170 ซม.
เป้าหมาย ลดไขมันสะสมในช่องท้อง
โรคประจำตัว ความดัน, ภูมิแพ้
สินค้าที่ใช้ BS, LS

คะแนนฟื้นฟู (Recovery Index)

72 / 100

อยู่ในเกณฑ์ดี รักษาต่อไป!

ความสำเร็จ

🏅

7 วันแรก

💧

ดื่มน้ำดี

🎯

เป้าหมาย HRV