中兵学堂课时

刷课时

// ==UserScript==
// @name         中兵学堂课时
// @namespace    https://greasyfork.org/zh-CN/scripts/472627
// @version      1.0
// @description  刷课时
// @author       睡神
// @match        *://zh.zhichenghz.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 重写 axios.post 函数
    const originalPost = axios.post;
    axios.post = function(url, data, config) {
        if (url.includes('/player/record')) { // 判断请求地址是否是 /player/record
            data.studyProgress.playProcess = 100; // 修改 playProcess 的值为 100
            data.studyProgress.studyTime = data.duration; // 修改 playProcess 的值为 100
            console.log(data);
        }
        return originalPost.call(this, url, data, config);
    };
})();