import Cookies from 'js-cookie'
const storage = window.localStorage;
const TokenKey = 'token'
const UserInfo = 'userInfo'
const TokenChenzhenKey = 'tokenChenzhen'
const userIdKey = 'userId'
const commercialIdKey = 'commercialId'
storage.setItem("c",3);
const setStorage = (key,value)=>{
	storage.setItem(key,JSON.stringify(value));
}
const getStorage = (key)=>{
	return JSON.parse(storage.getItem(key));
}
export function getToken() {
  return storage.getItem(TokenKey)
}
export function getUserInfo() {
  return getStorage(UserInfo);
  // return Cookies.get(UserInfo)&&JSON.parse(Cookies.get(UserInfo))
}
export function setUserInfo(userInfo) {
  return setStorage(UserInfo,userInfo);
  // return Cookies.set(UserInfo, userInfo)
}
export function setToken(token) {
  return storage.setItem(TokenKey, token)
}

export function getTokenChenzhen() {
  return getStorage(TokenChenzhenKey)
}

export function setTokenChenzhen(token) {
  return setStorage(TokenChenzhenKey, token)
}
export function removeTokenChenzhen(token) {
  return setStorage(TokenChenzhenKey, "")
}
export function getUserId() {
  return getStorage(userIdKey)
}

export function setUserId(id) {
  return setStorage(userIdKey, id)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function getCommercialId() {
  return Cookies.get(commercialIdKey)
}

export function setCommercialId(token) {
  return Cookies.set(commercialIdKey, token)
}
export const emojis = [
	{file: "10000.png", code: "/::)", title: "微笑", reg: /\/::\)/g},
{file: "10001.png", code: "/::~", title: "撇嘴", reg: /\/::~/g},
{file: "10002.png", code: "/::B", title: "色", reg: /\/::B/g},
{file: "10003.png", code: "/::|", title: "发呆", reg: /\/::\|/g},
{file: "10004.png", code: "/:8-)", title: "得意", reg: /\/:8-\)/g},
{file: "10005.png", code: "/::<", title: "流泪", reg: /\/::</g},
{file: "10006.png", code: "/::$", title: "害羞", reg: /\/::\$/g},
{file: "10007.png", code: "/::X", title: "闭嘴", reg: /\/::X/g},
{file: "10008.png", code: "/::Z", title: "睡", reg: /\/::Z/g},
{file: "10009.png", code: "/::'(", title: "大哭", reg: /\/::'\(/g},
 {file: "100010.png", code: "/::-|", title: "尴尬", reg: /\/::-\|/g},
 {file: "100011.png", code: "/::@", title: "发怒", reg: /\/::@/g},
 {file: "100012.png", code: "/::P", title: "调皮", reg: /\/::P/g},
 {file: "100013.png", code: "/::D", title: "呲牙", reg: /\/::D/g},
 {file: "100014.png", code: "/::O", title: "惊讶", reg: /\/::O/g},
 {file: "100015.png", code: "/::(", title: "难过", reg: /\/::\(/g},
 {file: "100016.png", code: "/::+", title: "囧", reg: /\/::\+/g},
 {file: "100017.png", code: "/::Q", title: "抓狂", reg: /\/::Q/g},
 {file: "100018.png", code: "/::T", title: "吐", reg: /\/::T/g},
 {file: "100019.png", code: "/:,@P", title: "偷笑", reg: /\/:,@P/g},
 {file: "100020.png", code: "/:,@-D", title: "愉快", reg: /\/:,@-D/g},
 {file: "100021.png", code: "/::d", title: "白眼", reg: /\/::d/g},
 {file: "100022.png", code: "/:,@o", title: "傲慢", reg: /\/:,@o/g},
 {file: "100023.png", code: "/::g", title: "困", reg: /\/::g/g},
 {file: "100024.png", code: "/::!", title: "惊恐", reg: /\/::!/g},
 {file: "100025.png", code: "/::L", title: "流汗", reg: /\/::L/g},
 {file: "100026.png", code: "/::>", title: "憨笑", reg: /\/::>/g},
 {file: "100027.png", code: "/::,@", title: "悠闲", reg: /\/::,@/g},
 {file: "100028.png", code: "/:,@f", title: "奋斗", reg: /\/:,@f/g},
 {file: "100029.png", code: "/::-S", title: "咒骂", reg: /\/::-S/g},
 {file: "100030.png", code: "/:,@x", title: "疑问", reg: /\/:,@x/g},
 {file: "100031.png", code: "/:,@@", title: "嘘", reg: /\/:,@@/g},
 {file: "100032.png", code: "/::8", title: "晕", reg: /\/::8/g},
 {file: "100033.png", code: "/:,@!", title: "哀", reg: /\/:,@!/g},
 {file: "100034.png", code: "/:!!!", title: "骷髅", reg: /\/:!!!/g},
 {file: "100035.png", code: "/:xx", title: "敲打", reg: /\/:xx/g},
 {file: "100036.png", code: "/:bye", title: "再见", reg: /\/:bye/g},
 {file: "100037.png", code: "/:handclap", title: "擦汗", reg: /\/:handclap/g},
 {file: "100038.png", code: "/:<@", title: "抠鼻", reg: /\/:<@/g},
 {file: "100039.png", code: "/::-O", title: "鼓掌", reg: /\/::-O/g},
 {file: "100040.png", code: "/:@x", title: "坏笑", reg: /\/:@x/g},
 {file: "100041.png", code: "/:pd", title: "左哼哼", reg: /\/:pd/g},
 {file: "100042.png", code: "/:<W>", title: "右哼哼", reg: /\/:<W>/g},
 {file: "100043.png", code: "/:beer", title: "哈欠", reg: /\/:beer/g},
 {file: "100044.png", code: "/:basketb", title: "鄙视", reg: /\/:basketb/g},
 {file: "100045.png", code: "/:oo", title: "委屈", reg: /\/:oo/g},
 {file: "100046.png", code: "/:circle", title: "快哭了", reg: /\/:circle/g},
 {file: "100047.png", code: "/:coffee", title: "阴险", reg: /\/:coffee/g},
 {file: "100048.png", code: "/::(", title: "亲亲", reg: /\/::\(/g},
 {file: "100049.png", code: "/::+", title: "可怜", reg: /\/::\+/g},
 {file: "100050.png", code: "/::Q", title: "菜刀", reg: /\/::Q/g},
 {file: "100051.png", code: "/::T", title: "西瓜", reg: /\/::T/g},
 {file: "100052.png", code: "/:,@P", title: "啤酒", reg: /\/:,@P/g},
 {file: "100053.png", code: "/:,@-D", title: "咖啡", reg: /\/:,@-D/g},
 {file: "100054.png", code: "/::d", title: "猪头", reg: /\/::d/g},
 {file: "100055.png", code: "/:,@o", title: "玫瑰", reg: /\/:,@o/g},
 {file: "100056.png", code: "/::g", title: "凋谢", reg: /\/::g/g},
 {file: "100057.png", code: "/::!", title: "嘴唇", reg: /\/::!/g},
 {file: "100058.png", code: "/::L", title: "爱心", reg: /\/::L/g},
 {file: "100059.png", code: "/::>", title: "心碎", reg: /\/::>/g},
 {file: "100060.png", code: "/::,@", title: "蛋糕", reg: /\/::,@/g},
 {file: "100061.png", code: "/:,@f", title: "炸弹", reg: /\/:,@f/g},
 {file: "100062.png", code: "/::-S", title: "便便", reg: /\/::-S/g},
 {file: "100063.png", code: "/:,@x", title: "月亮", reg: /\/:,@x/g},
 {file: "100064.png", code: "/:,@@", title: "太阳", reg: /\/:,@@/g},
 {file: "100065.png", code: "/::8", title: "拥抱", reg: /\/::8/g},
 {file: "100066.png", code: "/:,@!", title: "强", reg: /\/:,@!/g},
 {file: "100067.png", code: "/:!!!", title: "弱", reg: /\/:!!!/g},
 {file: "100068.png", code: "/:xx", title: "握手", reg: /\/:xx/g},
 {file: "100069.png", code: "/:bye", title: "胜利", reg: /\/:bye/g},
 {file: "100070.png", code: "/:handclap", title: "抱拳", reg: /\/:handclap/g},
 {file: "100071.png", code: "/:<@", title: "勾引", reg: /\/:<@/g},
 {file: "100072.png", code: "/::-O", title: "拳头", reg: /\/::-O/g},
 {file: "100073.png", code: "/:@x", title: "OK", reg: /\/:@x/g},
 {file: "100074.png", code: "/:pd", title: "跳跳", reg: /\/:pd/g},
 {file: "100075.png", code: "/:<W>", title: "发抖", reg: /\/:<W>/g},
 {file: "100076.png", code: "/:beer", title: "怄火", reg: /\/:beer/g},
 {file: "100077.png", code: "/:basketb", title: "转圈", reg: /\/:basketb/g},
 {file: "100078.png", code: "/:oo", title: "嘿哈", reg: /\/:oo/g},
 {file: "100079.png", code: "/:circle", title: "捂脸", reg: /\/:circle/g},
 {file: "100080.png", code: "/:coffee", title: "奸笑", reg: /\/:coffee/g},
 {file: "100081.png", code: "/:basketb", title: "机智", reg: /\/:basketb/g},
 {file: "100082.png", code: "/:oo", title: "皱眉", reg: /\/:oo/g},
 {file: "100083.png", code: "/:circle", title: "耶", reg: /\/:circle/g},
 {file: "100084.png", code: "/:coffee", title: "合十", reg: /\/:coffee/g},
 {file: "100085.png", code: "/:oo", title: "礼物", reg: /\/:oo/g},
 {file: "100086.png", code: "/:circle", title: "红包", reg: /\/:circle/g},
 {file: "100087.png", code: "/:coffee", title: "鸡", reg: /\/:coffee/g},
]
