function signup(req) {

  app.preloader.show();

  $.ajax({

    type: "post",

    url: base_url + 'signup',

    data: req,

    success: (res) => {

      if (res.status) {

        localStorage.removeItem('t01_user')

        localStorage.setItem('t01_user', JSON.stringify({

          uuid: res.data.uuid,

          phone: res.data.phone,

          sess_token: res.data.token,

          user_name: res.data.fullname

        }))

        app.preloader.hide();

        app.views.main.router.navigate('/');

      } else {

        app.preloader.hide();

        app.dialog.alert(res.message, 'SignUp Failed');

      }

    }

  })

}