package com.yidianling.ydlcommon.custom.http;

import com.yidianling.ydlcommon.core.base.BaseApplication;
import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.ydlcommon.custom.data.YdlDataManager;
import com.yidianling.ydlcommon.custom.router.YdlCommonRouterManager;
import com.yidianling.ydlcommon.custom.router.YdlUserInfo;

/**
 * 基础网络请求类
 * Created by Dog on 2015/5/8.
 */
public class BaseCommand {

    public String uid = "0";
    public String accessToken = "";

    public String ts;

    public String version;

    public String osBuild = RxDeviceTool.getBuildMANUFACTURER() + "," + RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getOsBuileVersion() + "," + RxDeviceTool.getAppVersionName(BaseApplication.Companion.getApp());

    public String isFromApp = "1";//2表示专家版1表示用户版

    public String ffrom = YdlDataManager.INSTANCE.getRam().getChannelName();//渠Y道来源

    public BaseCommand() {
        YdlUserInfo userInfo = YdlCommonRouterManager.INSTANCE.getYdlCommonRoute().getUserInfo();
        if (userInfo != null) {
            uid = userInfo.getUserId();
            accessToken = userInfo.getToken();
        }
        ts = (System.currentTimeMillis() / 1000) + "";
        version = RxDeviceTool.getAppVersionName(BaseApplication.Companion.getApp());

    }

}