Giter Site home page Giter Site logo

react-native-easy-app's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-easy-app's Issues

登陆页面刷新后无法获取已存的token

我首先在config定义了 RNStorage,
export const RNStorage = {
mobile: undefined,
token: undefined,
json: undefined,//测试符串
};
引用后使用XStorage.initStorage 存储
XStorage.initStorage(RNStorage, () => {
RNStorage.token = res.data.token;
console.log('token9999=' + RNStorage.token);
});

res.data.token是后端API返回的token,当前的console可以拿到token数据,然后请求后跳转的页面也可以取到token,但是重新刷新页面后,判断当前token是否存在,一直拿不到token,一直获取的是undefined,正常逻辑是如果token存在进到首页,否则去登陆页,我是在设置路由的时候判断当前走主页还是登陆页,Navigation.setRoot(isLoggedIn() ? Routers : LOGIN); isLoggedIn是获取token的一个方法,但是此方法打印的 console.log(RNStorage.token,666) 一直是undefined ,麻烦问下是使用的方法不对吗😂

initParseDataFunc方法不进入

export default class HttpConfig { static init() { XHttpConfig() .initBaseUrl(APP_SERVE_URL_BD) .initTimeout(15000) .initHttpLogOn(false) .initContentType(XHttpConst.CONTENT_TYPE_URLENCODED) .initLoadingFunc((isLoading) => {}) .initHeaderSetFunc((headers, request) => { // console.log(headers,request) }) .initParamSetFunc((params, request) => { // console.log(params,request) }) .initParseDataFunc((result, request, callback) => { let {success, json, message, status, response} = result; console.log("===================") }) .initEncodeURIComponent(false); } }

initParseDataFunc方法不进入,initHeaderSetFunc、initParamSetFunc方法是可以进入的,能看一下是什么原因吗?

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.