Skip to content

Instantly share code, notes, and snippets.

View ManiaciaChao's full-sized avatar
🐧
I'm just a penguin :P

Mani Penguin ManiaciaChao

🐧
I'm just a penguin :P
View GitHub Profile
const API_SYNC_OPENID = 'https://yourapi.example.com/sync_openid';
const ACTIVE_SIGN = 'https://v18.teachermate.cn/wechat-api/v1/class-attendance/active_signs';
const success = window.location.search.match(/success=([^&]*)/)[1] == '1';
const openId = window.location.search.match(/openid=([^&]*)/)[1];
setTimeout(() => {
fetch(API_SYNC_OPENID, {
method: 'POST',
headers,
body: JSON.stringify({ openid: openId })