dokey.js 470 B

12345678910111213141516
  1. import random from 'random.js';
  2. const key = 'lVHtuCOfgXffjNQt';
  3. export default {
  4. secretdate: function() {
  5. var timestamp = new Date().getTime();
  6. var nonce = random.random_char(32);
  7. var data_for_sign = 'timestamp=' + timestamp + '&nonce=' + nonce;
  8. console.log('timestamp: ' + timestamp);
  9. console.log('nonce: ' + nonce);
  10. console.log('secretdate:' + data_for_sign);
  11. return data_for_sign;
  12. },
  13. getkey : function () {
  14. return key;
  15. }
  16. }