export default { // 获取本地存储对应key getStorage(key){ return uni.getStorageSync( key ); }, // 设置本地存储对应key setStorage(key,value){ return uni.setStorageSync( key,value ); }, // 清除全部本地存储 clearStorage (){ const overPackageRecordPointParams = '' if( uni.getStorageSync('overPackageRecordPointParams')){ overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') } const overPackageJobDetailPointParams = '' if( uni.getStorageSync('overPackageJobDetailPointParams')){ overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') } uni.clearStorageSync(); if(overPackageRecordPointParams){ uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams) } if(overPackageJobDetailPointParams){ uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams) } }, // 清除指定key本地存储 removeStorage ( key ){ uni.removeStorageSync( key ); }, // 关闭当前页面,返回上一页面或多级页面 constant:{ id:"id", token:"token", avatar: 'avatar', name: 'name', roles: 'roles', permissions: 'permissions' } }