Browse Source

兼容大数字id

master
欧醚 2 years ago
parent
commit
5bb647888a
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      app.py
  2. +1
    -1
      static/index.js

+ 1
- 0
app.py View File

@ -79,6 +79,7 @@ def send_static_file(path):
def calc_token(cid, uid):
uid = uid % (2**30 - 1)
expireTimeInSeconds = 3600 * 5
currentTimestamp = int(time.time())
privilegeExpiredTs = currentTimestamp + expireTimeInSeconds

+ 1
- 1
static/index.js View File

@ -55,7 +55,7 @@ $('.join-form').submit(async function (e) {
$(this).serializeArray().forEach((v) => {
options[v.name] = v.value;
});
options.uid = parseInt(options.uid);
options.uid = parseInt(options.uid) % (2**30 - 1);
console.log(options);
try {
await join();

Loading…
Cancel
Save