From d5ec24a468383e2309660710bc50d7ae1d22cb40 Mon Sep 17 00:00:00 2001 From: Swift Date: Fri, 9 Feb 2024 22:41:32 +0330 Subject: [PATCH] fix --- pages/index.vue | 198 ++++++++++++++++----- server/plugins/asanServiceSerialChecker.js | 4 +- 2 files changed, 159 insertions(+), 43 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index bdb1de1..0c35019 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -5,8 +5,38 @@
-
+
+

نوع محصول را انتخاب کنید:

+
+ + +

+ ضمن خوش آمدگویی شما به مجموعه آسان سرویس چنانچه محصول خریداری شده شما دارای سریال گارانتی میباشد + میتوانید با وارد کردن سریال گارانتی در کادر زیر از وضعیت گارانتی محصول و یا با انتخاب گزینه اصالت + کالا و وارد کردن شماره سریال خود دستگاه از اصالت دستگاه مطلع شوید. +

+
+ +
+ +
+
+ +
+ +
+
+
+

استعلام گارانتی و اصالت کالا

+ لوازم جانبی کامپیوتر ، موبایل و محصولات حافظه + لوازم صوتی و تصویری خودرو

ضمن خوش آمدگویی شما به مجموعه آسان سرویس چنانچه محصول خریداری شده شما دارای سریال گارانتی میباشد میتوانید با وارد کردن سریال گارانتی در کادر زیر از وضعیت گارانتی محصول و یا با انتخاب گزینه اصالت کالا و @@ -75,35 +105,30 @@

-
+
- - - - @@ -117,7 +142,7 @@ export default { async asyncData({ $axios, error }) { try { const help = await $axios.get('/api/public/help?front=true') - + return { help: help.data } @@ -131,8 +156,9 @@ export default { help: null, inquiryType: 'guaranteeSerial', checkingSerial: false, - brands:[], - g: 1 + brands: [], + g: 1, + open: false } }, head() { @@ -153,14 +179,19 @@ export default { return this.$config } }, - mounted(){ - this.$axios.get(`/api/public/brand`).then((res)=>{ - this.brands = res.data - - }) + mounted() { + this.$axios.get(`/api/public/brand`).then(res => { + this.brands = res.data + }) }, methods: { - + openModal(g) { + this.g = g + this.open = true + }, + closeModal() { + this.open = false + }, checkSerial() { // validation if (this.checkingSerial) { @@ -216,8 +247,93 @@ export default { } - diff --git a/server/plugins/asanServiceSerialChecker.js b/server/plugins/asanServiceSerialChecker.js index 82a6a66..2315f55 100644 --- a/server/plugins/asanServiceSerialChecker.js +++ b/server/plugins/asanServiceSerialChecker.js @@ -1,8 +1,8 @@ const fs = require('fs') const readXlsxFile = require('read-excel-file/node') -const guaranteeSerialsPath = './static/uploads/serials' -const productSerialsPath = './static/uploads/serials_products' +const guaranteeSerialsPath = './static/uploads/serials/' +const productSerialsPath = './static/uploads/serials_products/' const serialChecker = async (serial, type = 'guaranteeSerial', g = 1) => { let exelsPath