Giter Club home page Giter Club logo

Comments (6)

amir-yaghoubi avatar amir-yaghoubi commented on June 12, 2024

سلام

ظاهر کد تقریبا درست هستش.(شرط بررسی ریجستر بودن کاربر بهتره به حالت زیر تغییر پیدا کنه )

if (chabok.isRegistered() && chabok.getUserId())

متد chabok.register همانطور که میبینید یک پرامیس بر میگردونه لطفا مقدار خروجی این تابع رو به این صورت دریافت نمایید تا بیشتر بررسی کنیم

// if .....
chabok.register(chabok.getUserId())
              .then(res => {
                        console.log('user-reRegistered:', res)
                       })
              .catch(err => {
                       console.log('error:', err)
                       })


// else ....

chabok.register('15334')
              .then(res => {
                        console.log('user-registered:', res)
                       })
              .catch(err => {
                       console.log('error:', err)
                       })

from chabok-client-js.

amiriun avatar amiriun commented on June 12, 2024

من این تکه کد رو که تو
else
بود مستقیم تو کنسول مرورگر وارد کردم و چیزی جز همون پرامیس ندیدم

from chabok-client-js.

amir-yaghoubi avatar amir-yaghoubi commented on June 12, 2024

اگه درون کنسول همچنان مقدار Promise نمایش داده می‌شود احتمالا به خاطر interpret شدن تنها خط اول در کنسول هست.

بهتره در کد اصلی جایگزین و اونجا نتیجه رو بررسی کنین

from chabok-client-js.

amiriun avatar amiriun commented on June 12, 2024

نه همرو تو یه خط گذاشتم و بعد تو کنسول تست کردم
تو کد اصلی هم تست کردم
باز نتیجه ای نداد

from chabok-client-js.

amir-yaghoubi avatar amir-yaghoubi commented on June 12, 2024

یک مقدار عجیب هست یعنی هیچکدام از لاگ‌های

console.log('user-registered:', res)
console.log('error:', err)

نمایش داده نشد؟

خطایی در بخش network و یا در کنسول مرورگر دریافت نمیکنین؟

from chabok-client-js.

amiriun avatar amiriun commented on June 12, 2024

مشکل حل شد
به جای استفاده از سی دی ان ، فایل های جاوااسکریپت رو تو خود سرور آپلود کردم

from chabok-client-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.