// 存储

const USER_BASE_INFO = 'user_base_info';
const STORAGE_USER_TOKEN = 'storage_user_token';
const BATCH_SELECTED_DEVICE_LIST = 'batch_selected_device_list';
const SELECTED_SHOP = 'selected_shop';
const REFRESH_DEVICE_PAGE = 'refresh_device_page';
const SELECTED_DEVICE_INFO = 'selected_device_info';
const SEARCH_CLIENT_USER_INFO = 'search_client_user_info';
const GROUP_TREE_LIST = 'group_tree_list';
const APP_CONFIG = 'app_config';
const ICON_LIST = 'icon_list';
const ALARM_INFO = 'alarm_info';
const SELECTED_SHOP_INFO = 'selected_shop_info';
const GROUP_LIST = 'group_list';
const BLUETOOTH_LIST = 'bluetooth_list';
const POP_TIME = 'prompt_pop_time';
const NOTICE_VERSION = 'notice_version';
function setApiToken(token) {
    uni.setStorageSync(STORAGE_USER_TOKEN, token);
}
function getApiToken() {
    return uni.getStorageSync(STORAGE_USER_TOKEN);
}
function setPopTime(time) {
    uni.setStorageSync(POP_TIME, time);
}
function getPopTime(time) {
    return uni.getStorageSync(POP_TIME);
}
function setBaseUserInfo(baseUserInfo) {
    uni.setStorageSync(USER_BASE_INFO, baseUserInfo);
}
function getBaseUserInfo() {
    return uni.getStorageSync(USER_BASE_INFO);
}
function cleanBaseUserInfo() {
    uni.removeStorageSync(USER_BASE_INFO);
}
function setBatchSelectedDeviceList(device_list) {
    uni.setStorageSync(BATCH_SELECTED_DEVICE_LIST, device_list);
}
function getBatchSelectedDeviceList() {
    return uni.getStorageSync(BATCH_SELECTED_DEVICE_LIST);
}
function setSelectedShop(shop) {
    uni.setStorageSync(SELECTED_SHOP, shop);
}
function getSelectedShop() {
    return uni.getStorageSync(SELECTED_SHOP);
}
function setRefreshDeviceoPage(is_fresh) {
    uni.setStorageSync(REFRESH_DEVICE_PAGE, is_fresh);
}
function getRefreshDeviceoPage() {
    return uni.getStorageSync(REFRESH_DEVICE_PAGE);
}
function setSelectedDeviceInfo(device_info) {
    uni.setStorageSync(SELECTED_DEVICE_INFO, device_info);
}
function getSelectedDeviceInfo() {
    return uni.getStorageSync(SELECTED_DEVICE_INFO);
}
function setSearchClientUserInfo(user_info) {
    uni.setStorageSync(SEARCH_CLIENT_USER_INFO, user_info);
}
function getSearchClientUserInfo() {
    return uni.getStorageSync(SEARCH_CLIENT_USER_INFO);
}
function setGroupTreeList(group_tree_list) {
    uni.setStorageSync(GROUP_TREE_LIST, group_tree_list);
}
function getGroupTreeList() {
    return uni.getStorageSync(GROUP_TREE_LIST);
}
function setAppConfig(app_config) {
    uni.setStorageSync(APP_CONFIG, app_config);
}
function getAppConfig() {
    return uni.getStorageSync(APP_CONFIG);
}
function setIconList(iconList) {
    uni.setStorageSync(ICON_LIST, iconList);
}
function getIconList() {
    return uni.getStorageSync(ICON_LIST);
}
function setAlarmInfo(alarmInfo) {
    uni.setStorageSync(ALARM_INFO, alarmInfo);
}
function getAlarmInfo() {
    return uni.getStorageSync(ALARM_INFO);
}
function setSelectedShopInfo(selectedShopInfo) {
    uni.setStorageSync(SELECTED_SHOP_INFO, selectedShopInfo);
}
function getSelectedShopInfo() {
    return uni.getStorageSync(SELECTED_SHOP_INFO);
}
function setGroupList(group_list) {
    uni.setStorageSync(GROUP_LIST, group_list);
}
function getGroupList() {
    return uni.getStorageSync(GROUP_LIST);
}
function setBluetoothList(bluetooth_list) {
    uni.setStorageSync(BLUETOOTH_LIST, bluetooth_list);
}
function getBluetoothList() {
    return uni.getStorageSync(BLUETOOTH_LIST);
}
function setNoticeVersion(is_notice) {
    uni.setStorageSync(NOTICE_VERSION, is_notice);
}
function getNoticeVersion() {
    return uni.getStorageSync(NOTICE_VERSION);
}
module.exports = {
    setApiToken: setApiToken,
    getApiToken: getApiToken,
    setPopTime: setPopTime,
    getPopTime: getPopTime,
    setUserInfo: setBaseUserInfo,
    getUserInfo: getBaseUserInfo,
    cleanUserInfo: cleanBaseUserInfo,
    setBatchSelectedDeviceList: setBatchSelectedDeviceList,
    getBatchSelectedDeviceList: getBatchSelectedDeviceList,
    setSelectedShop: setSelectedShop,
    getSelectedShop: getSelectedShop,
    setRefreshDeviceoPage: setRefreshDeviceoPage,
    getRefreshDeviceoPage: getRefreshDeviceoPage,
    setSelectedDeviceInfo: setSelectedDeviceInfo,
    getSelectedDeviceInfo: getSelectedDeviceInfo,
    setSearchClientUserInfo: setSearchClientUserInfo,
    getSearchClientUserInfo: getSearchClientUserInfo,
    setGroupTreeList: setGroupTreeList,
    getGroupTreeList: getGroupTreeList,
    setAppConfig: setAppConfig,
    getAppConfig: getAppConfig,
    setIconList: setIconList,
    getIconList: getIconList,
    setAlarmInfo: setAlarmInfo,
    getAlarmInfo: getAlarmInfo,
    setSelectedShopInfo: setSelectedShopInfo,
    getSelectedShopInfo: getSelectedShopInfo,
    setGroupList: setGroupList,
    getGroupList: getGroupList,
    setBluetoothList: setBluetoothList,
    getBluetoothList: getBluetoothList,
    setNoticeVersion: setNoticeVersion,
    getNoticeVersion: getNoticeVersion
};
