import Taro from '@tarojs/taro' import URL from '../serviceAPI.config' export default function logout() { Taro.request({ url:URL.LogOut, header: { 'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'), } }).then(res=>{ Taro.showToast({ title:'退出成功' }) Taro.clearStorageSync() setTimeout(() => { Taro.reLaunch({ url: '/pages/login/login' }) }, 2000); }).catch(err=>{ Taro.showToast({ title:'退出失败', icon:'none' }) Taro.clearStorageSync() }) }