Git Product home page Git Product logo

Comments (19)

am-abudu avatar am-abudu commented on May 24, 2024

我没有想好友链申请API如何完成,根据我的设想,这可能会带来大量垃圾信息

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

可以先查看是否网站是通的,这要在面板内决定减少js负担,还有是否申请过,有没有在黑名单

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

然后使用邮件通知博主,博主可以直接在邮件内同意或不同意(js调用增加),然后结果由邮件发到申请者。
这样应该可以

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

就差api了
image

from qexo.

am-abudu avatar am-abudu commented on May 24, 2024

ba33063
我根据理解添加了相关API,请查看它们是否正常工作

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

申请与新增不同!!!!

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

这需要页面上可以看到申请内容的,而且是申请不需要鉴权,而增加需要鉴权

from qexo.

am-abudu avatar am-abudu commented on May 24, 2024

意思是增加一个不需要鉴权的API吗

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

报错信息:[Errno 21] Is a directory: '/var/task/templates/home'

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

申请不需要鉴权,而增加需要鉴权

from qexo.

am-abudu avatar am-abudu commented on May 24, 2024

新增一个不需要鉴权的API,添加后默认为隐藏?

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

申请是告诉博主有人申请要加,需要博主通过,而增加是直接增加

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

报错 报错信息:[Errno 21] Is a directory: '/var/task/templates/home'

from qexo.

am-abudu avatar am-abudu commented on May 24, 2024

提醒我做不到,因为Vercel的限制导致邮件会超时

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

可以在面板内提醒!

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

在这里
image

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

你先告诉我api地址和参数我先填到js

from qexo.

Fgaoxing avatar Fgaoxing commented on May 24, 2024

我现在写到这了,可能有些啰嗦

<body>
<div id="k"></div>
<div id="i"></div>
<script>
function qexo_friend_api(id, url) {
    qexo_url = url;
    var loadStyle = '<div class="qexo_loading"><div class="qexo_part"><div style="display: flex; justify-content: center"><div class="qexo_loader"><div class="qexo_inner one"></div><div class="qexo_inner two"></div><div class="qexo_inner three"></div></div></div></div><p style="text-align: center; display: block">友链申请加载中...</p></div>';
    document.getElementById(id).className = "friend-api";
    document.getElementById(id).innerHTML = loadStyle;
    document.getElementById(id).innerHTML = '<center><p>请正确填写友链,然后点击申请等待核实,请先添加本站友链</p><div class="friend-api"><style>input.qexo-friend-input {border: 0;box-shadow: none;position: relative;flex: 1 1 0%;min-width: 0;margin-bottom: 0;font-size: 0.875rem;transition: all 0.15s ease-in-out;height: calc(1.5em + 1.25rem + 5px);display: block;width: 100%;height: calc(1.5em + 1.25rem + 2px);padding: 0.625rem 0.75rem;font-size: 0.875rem;font-weight: 400;line-height: 1.5;color: #8898aa;background-color: #fff;background-clip: padding-box;border: 1px solid #dee2e6;border-radius: 0.25rem;box-shadow: 0 3px 2px rgb(233 236 239 / 5%);transition: all 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55);overflow: visible;margin: 0;font-family: inherit;font-size: inherit;line-height: inherit;position: relative;display: flex;flex-direction: column;min-width: 0;word-wrap: break-word;background-color: #fff;background-clip: border-box;border: 1px solid rgba(0, 0, 0, 0.05);border-radius: 0.375rem;--blue: #5e72e4;--indigo: #5603ad;--purple: #8965e0;--pink: #f3a4b5;--red: #f5365c;--orange: #fb6340;--yellow: #ffd600;--green: #2dce89;--teal: #11cdef;--cyan: #2bffc6;--gray: #8898aa;--gray-dark: #32325d;--lighter: #e9ecef;--primary: #5e72e4;--secondary: #f7fafc;--success: #2dce89;--info: #11cdef;--warning: #fb6340;--danger: #f5365c;--light: #adb5bd;--dark: #212529;--default: #172b4d;--white: #fff;--neutral: #fff;--darker: black;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: Open Sans, sans-serif;--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-family: sans-serif;line-height: 1.15;-webkit-text-size-adjust: 100%;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);width: 25%;}button.qexo-friend-button {cursor: pointer;position: relative;text-transform: none;transition: all 0.15s ease;letter-spacing: 0.025em;font-size: 0.875rem;will-change: transform;color: #fff;background-color: #5e72e4;border-color: #5e72e4;box-shadow: 0 4px 6px rgb(50 50 93 / 11%), 0 1px 3px rgb(0 0 0 / 8%);vertical-align: middle;cursor: pointer;user-select: none;border: 1px solid transparent;padding: 0.625rem 1.25rem;font-size: 0.875rem;line-height: 1.5;border-radius: 0.25rem;transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;}</style><input type="text" id="qexo_friend_name" class="qexo-friend-input" placeholder="网站名"><br><input type="text" id="qexo_friend_brief introduction" class="qexo-friend-input" placeholder="网站简介"><br><input type="text" id="qexo_friend_website" class="qexo-friend-input"  placeholder="网址"><br><input type="text" id="qexo_friend_logo" class="qexo-friend-input" placeholder="头像"><br><button type="button" class="qexo-friend-button" onclick="javascript:friend_api()">申请</button></div></center>';
}
function friend_api() {
    var name = document.getElementById('qexo_friend_name').value;
    var introduction = document.getElementById('qexo_friend_brief introduction').value;
    var website = document.getElementById('qexo_friend_website').value;
    var logo= document.getElementById('qexo_friend_logo').value;
    var uri = qexo_url + "";
    var ajax;
    try {
        // Firefox, Opera 8.0+, Safari
        ajax = new XMLHttpRequest();
    } catch (e) {
        // Internet Explorer
        try {
            ajax = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                ajax = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
                alert("糟糕,你的浏览器不能上传文件!");
                return false;
            }
        }
    }
    ajax.open("get", uri, true);
    ajax.setRequestHeader("Content-Type", "text/plain");
    ajax.onreadystatechange = function () {
        if (ajax.readyState == 4) {
            if (ajax.status == 200) {
                var res = JSON.parse(ajax.response);
                if (res["status"]) {

                } else {
                    alert("友链载入失败!");
                }
            } else {
                alert("友链获取失败!");
            }
        }
    }
    ajax.send(null);
}
</script>
<script>
qexo_friend_api("k","https://admin.yt-blog.top");
</script>

from qexo.

am-abudu avatar am-abudu commented on May 24, 2024

a56098b

from qexo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.