(cache)
| 51 | } |
| 52 | |
| 53 | function writeTokenCache(cache) { |
| 54 | try { |
| 55 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 56 | } catch (e) { |
| 57 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | function maskPhone(phone = "") { |
| 62 | return String(phone).replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2"); |
no test coverage detected