12345678910111213141516171819202122 |
- var timestamp = Date.now();
-
- // 将时间戳转换成10位数的时间戳(秒级)
- var tenDigitTimestamp = Math.floor(timestamp / 1000);
-
- console.log(tenDigitTimestamp); // 输出10位数的时间戳
- let state = {
- Timestamp: tenDigitTimestamp, //过期时间
- AUTH_TOKEN:"e4c548d3a78b0e0247be267f1a8359cd"//鉴权秘钥
- }
- let mutations = {
- }
- let getters = {
- }
- export default {
- namespaced: true,
- state,
- mutations,
- getters
- }
|