Skip to content

Instantly share code, notes, and snippets.

@yi-Xu-0100
Last active June 28, 2020 00:30
Show Gist options
  • Save yi-Xu-0100/9a681d4d5a7a4c326e9f0c66e9bc5e47 to your computer and use it in GitHub Desktop.
Save yi-Xu-0100/9a681d4d5a7a4c326e9f0c66e9bc5e47 to your computer and use it in GitHub Desktop.
聚创签到脚本
// ==UserScript==
// @name 聚创
// @namespace https://soulsign.inu1255.cn/scripts/186
// @version 1.0.4
// @author yi-Xu-0100
// @loginURL https://www.scjuchuang.com/login/index
// @updateURL https://soulsign.inu1255.cn/script/yi-Xu-0100/聚创
// @expire 900000
// @domain www.scjuchuang.com
// @grant cookie
// ==/UserScript==
exports.run = async function(param) {
var userinfo = await getCookie('https://www.scjuchuang.com/index', 'userinfo');
var { data } = await axios.post('https://www.scjuchuang.com/intergralSigin/signin',
{
"user_id": JSON.parse(userinfo).user_id,
"token": JSON.parse(userinfo).token
},
{
headers: {
"Origin": "https://www.scjuchuang.com",
"Referer": "https://www.scjuchuang.com/index"
}
});
if(/签到成功/.test(data.msg)) return "今日获得 " + data.data.integral + " 积分,已连续签到 " + data.data.continue_count + " 天";
if(/今日已签到/.test(data.msg)) return "重复签到";
if(/长时间未操作,请重新登录/.test(data.msg)){
var { data } = await axios.get('https://www.scjuchuang.com/index');
if(!/进入会员中心/.test(data)) throw "请登录";
var { data } = await axios.get('https://www.scjuchuang.com/intergralSigin/index');
return /已签到/.test(data) ? "重复签到." : data;
}else throw data;
};
exports.check = async function(param) {
var { data } = await axios.get('https://www.scjuchuang.com/index');
return /进入会员中心/.test(data) ? true : false;
};
@yi-Xu-0100
Copy link
Author

注意: 个人没有该网站的帐号,如需测试,可以邮箱发 yi_Xu#yixuju.cn(#改为@) 代为测试,帐号安全请自己确认。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment