(cache)
| 42 | } |
| 43 | |
| 44 | function writeTokenCache(cache) { |
| 45 | try { |
| 46 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 47 | } catch (e) { |
| 48 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | function maskPhone(phone = "") { |
| 53 | return String(phone).replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2"); |
no test coverage detected