From 6a8aed228dc63ffe25febc16de05f829c922dbce Mon Sep 17 00:00:00 2001 From: Diyar Akhgar Date: Wed, 25 Jun 2025 18:03:05 +0330 Subject: [PATCH] fetch versions --- .../src/pages/dashboard/ChangeAvatar.vue | 101 ++++++++---------- .../src/pages/dashboard/EditProfile.vue | 4 +- xroom-dashboard/src/router/index.js | 4 +- 3 files changed, 48 insertions(+), 61 deletions(-) diff --git a/xroom-dashboard/src/pages/dashboard/ChangeAvatar.vue b/xroom-dashboard/src/pages/dashboard/ChangeAvatar.vue index 168d158..f2bab03 100644 --- a/xroom-dashboard/src/pages/dashboard/ChangeAvatar.vue +++ b/xroom-dashboard/src/pages/dashboard/ChangeAvatar.vue @@ -14,59 +14,40 @@
-
-

آواتارهای زنانه

-
-
-
- - -
- -
+ + +
+

آواتارهای زنانه

+
+
+
+ + Avatar Image
+
+
+
- -
-

آواتارهای مردانه

-
-
-
- -
- -
+ +
+

آواتارهای مردانه

+
+
+
+ + Avatar Image
+
+
+
+ +
@@ -97,18 +78,23 @@ export default { }, setup() { const maleAvatars = ref([ - { id: 1, name: 'مرد ۱', src: 'http://194.62.43.230:8000/media/2025/5/5/men1.glb' }, - { id: 2, name: 'مرد ۲', src: 'http://194.62.43.230:8000/media/2025/5/5/men1.glb' }, - { id: 7, name: 'مرد ۳', src: 'http://194.62.43.230:8000/media/2025/5/5/men1.glb' }, + { id: 1, name: 'مرد ۱', src: 'http://my.xroomapp.com:8000/media/user_glbs/men1.glb', profile_img:'http://my.xroomapp.com:8000/media/user_images/men1.png' }, + { id: 2, name: 'مرد ۲', src: 'http://my.xroomapp.com:8000/media/user_glbs/men2.glb' , profile_img:'http://my.xroomapp.com:8000/media/user_images/men2.png'}, + { id: 7, name: 'مرد ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/men3.glb' , profile_img:'http://my.xroomapp.com:8000/media/user_images/men3.png'}, + { id: 17, name: 'مرد 4', src: 'http://my.xroomapp.com:8000/media/user_glbs/men4.glb' , profile_img:'http://my.xroomapp.com:8000/media/user_images/men4.png'}, // Add more male avatars as needed ]); + + const femaleAvatars = ref([ - { id: 4, name: 'زن ۱', src: 'http://194.62.43.230:8000/media/2025/5/5/men1.glb' }, - { id: 10, name: 'زن ۳', src: 'http://194.62.43.230:8000/media/2025/5/5/men1.glb' }, - // Add more female avatars as needed - ]); - + { id: 4, name: 'زن ۱', src: 'http://my.xroomapp.com:8000/media/user_glbs/women1.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women1.png' }, + { id: 10, name: 'زن ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/women2.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women2.png' }, + { id: 10, name: 'زن ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/women3.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women3.png' }, + { id: 10, name: 'زن ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/women4.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women4.png' }, + { id: 10, name: 'زن ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/women6.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women6.png' }, + { id: 10, name: 'زن ۳', src: 'http://my.xroomapp.com:8000/media/user_glbs/women7.glb', profile_img: 'http://my.xroomapp.com:8000/media/user_images/women7.png' }, +]); const selectedAvatar = ref(null); // const selectAvatar = (avatar) => { @@ -141,7 +127,8 @@ export default { // try { await axios.post(`${this.baseUrl}/editProfile/`, { - profile_glb_url: avatar.src + profile_glb_url: avatar.src , + profile_img: avatar.profile_img }, { headers: { 'Content-Type': 'application/json' diff --git a/xroom-dashboard/src/pages/dashboard/EditProfile.vue b/xroom-dashboard/src/pages/dashboard/EditProfile.vue index e071a27..7f7241a 100644 --- a/xroom-dashboard/src/pages/dashboard/EditProfile.vue +++ b/xroom-dashboard/src/pages/dashboard/EditProfile.vue @@ -28,14 +28,14 @@ - تغییر آواتار + تغییر آواتار - ساخت آواتار جدید + ساخت آواتار جدید
diff --git a/xroom-dashboard/src/router/index.js b/xroom-dashboard/src/router/index.js index dd4552f..3c67440 100644 --- a/xroom-dashboard/src/router/index.js +++ b/xroom-dashboard/src/router/index.js @@ -135,8 +135,8 @@ router.beforeEach(async (to, from, next) => { if (!customer.is_sms_verified && to.name !== 'SmsVerification') { return next('/SmsVerification'); } - else if (!customer.profile_glb && to.name !== 'ReadyPlayer') { - return next('/dashboard/readyPlayer'); + else if (!customer.profile_glb && (to.name !== 'ReadyPlayer' ||to.name !== 'ChangeAvatar' )) { + return next('/dashboard/ChangeAvatar'); }