allianceInitialState.js 5.94 KB
'use strict';

//http://apidoc.yohops.com/
import {List, Map, Record} from 'immutable';

let InitialState = Record({
    orderCode: 0,
    src: '',
    jumpUrl: '',
    showHelpDialog: false,
    showSureDialog: false,
    showTipsAlert: false,
    showBindAlert: false,
    showWithdrawalDialog: false,
    showBankInfoDialog: false,
    tipMessage: '',
    showBankAlert:false,
    showCheckSettleDialog: false,

    settlementInfo: new (Record({
        isFetching: false,
        error: null,
        settlementInfoData: Map(),
    })),

    shareTotalInfo: new (Record({
        isFetching: false,
        error: null,
        shareTotalInfoData: Map(),
    })),

    addSettlement: new (Record({
        isFetching: false,
        error: null,
        data: List(),
    })),

    checkSettlementInfo: new (Record({
        isFetching: false,
        error: null,
        settlementData: Map(),
    })),

    resourceInfo: new (Record({
        isFetching: false,
        error: null,
        resourceList: List(),
    })),

    messageResourceInfo: new (Record({
        isFetching: false,
        error: null,
        resourceList: List(),
    })),

    messageList: new (Record({
        isFetching: false,
        error: null,
        page: 0, // 当前页面
        page_size: 20, // 每页显示的数量
        total: 0, // 总共多少条
        totalPage: 0, // 总共多少页
        endReached: false, // 到达底部
        list: List(),
    })),

    mineResourceInfo: new (Record({
        isFetching: false,
        error: null,
        resourceList: List(),
    })),

    recentlyOrder: new (Record({
        isFetching: false,
        error: null,
        recentlyOrder_list: List(),
    })),

    orderDetail: new (Record({
        isFetching: true,
        error: null,
        amountStr: '',
        status: '',
        orderStatus: '',
        orderCode: '',
        orderTimeStr: '',
        lastOrderAmountStr: '',
        productList: List(),
    })),

    activityDetail: new (Record({
        isFetching: true,
        error: null,
        amountStr: '',
        statusStr: '',
        orderCodes: List(),
        activityName: '',
        timeStr: '',
        status: '',
        type: 0,
        nickname: '',
    })),

    orderList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        totalPage: 0, //总共多少页
        endReached: false, //到达底部
        list: List(),
    })),

    estimateList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        totalPage: 0, //总共多少页
        endReached: false, //到达底部
        list: List(),
    })),

    settlementRecordList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        totalPage: 0, //总共多少页
        endReached: false, //到达底部
        list: List(),
    })),

    invitedFriendsList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        totalPage: 0, //总共多少页
        endReached: false, //到达底部
        list: List(),
    })),

    topList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        page_total: 0, //总共多少页
        endReached: false, //到达底部
        product_list: List(),
    })),

    getBankCardInfo: new (Record({
        isFetching: false,
        error: null,
        name: null,
        bankName: null,
        bankCardNo: null,
    })),

    bankListInfo: new (Record({
        isFetching: false,
        error: null,
        bankList: Map(),
    })),

    checkBankCardResult: new (Record({
        isFetching: false,
        message: null,
        name: null,
        idCardNo: null,
        bankCardNo: null,
        bankCode: null,
        bankBranch: '',
        bankCityId: '',
        error: null,
    })),

    bindBankCardResult: new (Record({
        isFetching: false,
        error: null,
    })),

    statisticsInfo: new (Record({
        isFetching: false,
        error: null,
        orderNum: 0,
        clickNum: 0,
        orderAmountSum: 0,
        extraAmountSum: 0,
    })),

    /** 个人信息state */
    profile: new (Record({
        isFetching: false,
        error: null,
        head_ico: '',
        nickname: '',
        profile_name: '',
        username: '',
    })),


    bindIdentityCardResult: new (Record({
        isFetching: false,
        error: null,
    })),

    identityCardInfo: new (Record({
        isFetching: false,
        error: null,
        data: null,
    })),

    isShowToast: false,
    toastMessage: '',
    isShowLoading: false,

    inviteYohoResourceInfo: new (Record({
        isFetching: false,
        error: null,
        resourceList: List(),
    })),

    inviteYohoList: new (Record({
        isFetching: false,
        error: null,
        page: 0, //当前页面
        page_size: 20, //每页显示的数量
        total: 0, //总共多少条
        totalPage: 0, //总共多少页
        endReached: false, //到达底部
        list: List(),
    })),

    cityLocationInfo: new (Record({
        isProvinceFetching: false,
        isCityFetching: false,
        provinceError: null,
        cityError: null,
        provinceList: List(),
        cityList: List(),
    }))

});

export default InitialState;