|
30精币
下面是网站页的代码js 怎么生成加密token的
function getCache(item) { return localStorage.getItem(item);}function setCache(item, value) { localStorage.setItem(item, String(value));}function removeCache(item) { localStorage.removeItem(item);}function getDeviceId() { let deviceId = getCache("_device_id"); if (!deviceId) { deviceId = newGuid(); setCache("_device_id", deviceId); } return deviceId;}function newGuid() { return 'xxxxxx4xxyxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); });}//---------------------------------------------------// 日期格式化// 格式 YYYY/yyyy/YY/yy 表示年份// MM/M 月份// W/w 星期// dd/DD/d/D 日期// hh/HH/h/H 时间// mm/m 分钟// ss/SS/s/S 秒//---------------------------------------------------Date.prototype.Format = function (formatStr) { var str = formatStr; var Week = ['日', '一', '二', '三', '四', '五', '六']; str = str.replace(/yyyy|YYYY/, this.getFullYear()); str = str.replace(/yy|YY/, (this.getYear() % 100) > 9 ? (this.getYear() % 100).toString() : '0' + (this.getYear() % 100)); var currMonth = this.getMonth() + 1; str = str.replace(/MM/, currMonth > 9 ? currMonth.toString() : '0' + currMonth); str = str.replace(/M/g, currMonth); str = str.replace(/w|W/g, Week[this.getDay()]); str = str.replace(/dd|DD/, this.getDate() > 9 ? this.getDate().toString() : '0' + this.getDate()); str = str.replace(/d|D/g, this.getDate()); str = str.replace(/hh|HH/, this.getHours() > 9 ? this.getHours().toString() : '0' + this.getHours()); str = str.replace(/h|H/g, this.getHours()); str = str.replace(/mm/, this.getMinutes() > 9 ? this.getMinutes().toString() : '0' + this.getMinutes()); str = str.replace(/m/g, this.getMinutes()); str = str.replace(/ss|SS/, this.getSeconds() > 9 ? this.getSeconds().toString() : '0' + this.getSeconds()); str = str.replace(/s|S/g, this.getSeconds()); return str;}
下面是网站页的js生成加密tokentoken:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJleHAiOjE3MjUwOTIyMDEsInN1YiI6ImFkbWluc3lzIiwiYXVkIjoiMzM4ODAiLCJpYXQiOiIyMDI0LzgvMzEgMTY6MDY6NDEiLCJkYXRhIjp7ImFkbWluTmFtZSI6IjMzODgwIiwiaWQiOiJjSW5JdG1yaFpXST0iLCJkaWFtb25kIjoiNTAwMCIsImxldmVsIjoiMyIsIlJvbGVJRCI6MH19.j0MLUWgcw8ZJyNqLWY4fE-smhjqojX-S95lqKkygsy8
|
最佳答案
查看完整内容
[e=0].版本 2
.支持库 spec
.子程序 _按钮1_被单击
.局部变量 文本, 文本型, , "0"
.局部变量 n, 整数型
.局部变量 解码, 文本型
文本 = 分割文本 (“eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJleHAiOjE3MjUwOTIyMDEsInN1YiI6ImFkbWluc3lzIiwiYXVkIjoiMzM4ODAiLCJpYXQiOiIyMDI0LzgvMzEgMTY6MDY6NDEiLCJkYXRhIjp7ImFkbWluTmFtZSI6IjMzODgwIiwiaWQiOiJjSW5JdG1yaFpXST0iLCJkaWFtb25kIjoiNTAwMCIsImxldmVsIjoiMyIsIl ...
|