import Taro from '@tarojs/taro'
const loginOut = arr => {
  Taro.$msgConfirm('确定退出吗？', () => {
    const openid = Taro.getStorageSync('sysOpenid')
    Taro.api.base.loginout({openid}).then(res => {
      Taro.removeStorageSync('sysToken')
      Taro.removeStorageSync('sysAppType')
      Taro.removeStorageSync('sysOpenid')
      Taro.removeStorageSync('sysOpenid')
      Taro.removeStorageSync('sysMenuObj')
      Taro.removeStorageSync('APP_pCount')
      Taro.removeStorageSync('APP_tCount')
      Taro.setStorageSync('loginOut', 'yes')
      Taro.reLaunch({url: '/pages/login/index'})
    })
  })
}
export {
  loginOut
}
