Comments (19)
我没有想好友链申请API如何完成,根据我的设想,这可能会带来大量垃圾信息
from qexo.
可以先查看是否网站是通的,这要在面板内决定减少js负担,还有是否申请过,有没有在黑名单
from qexo.
然后使用邮件通知博主,博主可以直接在邮件内同意或不同意(js调用增加),然后结果由邮件发到申请者。
这样应该可以
from qexo.
from qexo.
ba33063
我根据理解添加了相关API,请查看它们是否正常工作
from qexo.
申请与新增不同!!!!
from qexo.
这需要页面上可以看到申请内容的,而且是申请不需要鉴权,而增加需要鉴权
from qexo.
意思是增加一个不需要鉴权的API吗
from qexo.
报错信息:[Errno 21] Is a directory: '/var/task/templates/home'
from qexo.
申请不需要鉴权,而增加需要鉴权
from qexo.
新增一个不需要鉴权的API,添加后默认为隐藏?
from qexo.
申请是告诉博主有人申请要加,需要博主通过,而增加是直接增加
from qexo.
报错 报错信息:[Errno 21] Is a directory: '/var/task/templates/home'
from qexo.
提醒我做不到,因为Vercel的限制导致邮件会超时
from qexo.
可以在面板内提醒!
from qexo.
from qexo.
你先告诉我api地址和参数我先填到js
from qexo.
我现在写到这了,可能有些啰嗦
<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.
from qexo.
Related Issues (20)
- Telegram信息推送问题 HOT 3
- SMMS图床图片上传失败 HOT 2
- FTP 图床上传的逻辑错误以及其它图床的可能错误 HOT 4
- docker file使用python:alpine3.17安装依赖失败 HOT 2
- 兰空图床最新版api对接不上 HOT 1
- S3协议在图片上传时,为图片生成的MD5重复 HOT 3
- lsky-pro图床,如果存在多个储存策略,那么无法通过自定义body选择到对应的策略 HOT 2
- 部署Vercel失败 HOT 1
- 3.1.1版本提示500 HOT 11
- 【安全性漏洞】消息功能XSS注入(HTML) HOT 7
- sm.ms图床上传时报错 HOT 6
- 又拍云上传bmp图片提示网络错误? HOT 3
- 使用 S3 协议删除图片报错 HOT 1
- 希望能添加图片预览功能,只有一串文件名,管理起来太麻烦了 HOT 3
- 加了又拍云CDN后,编辑配置文件报错 HOT 2
- Vercel 部署 (PostgreSQL/Vercel) Redeploy 时报错:./migrate.sh: line 1: pip: command not found HOT 7
- 看报错是说hexo-offline和hexo版本不符合,我需要将hexo降级吗 HOT 1
- 新建文章 错误500 HOT 1
- 保存新文章提示 请输入正确的文章名
- Error 500 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qexo.