由于前面刷视频经常刷到有人直播QQ号码价值评估,想着也搞一个玩玩,找了一圈接口好像很多都用不来,下面提供一个自己随便搞得页面,有兴趣的大佬可以完善下
`
QQ号码价值评估系统
正在评估中,请稍候...
QQ号码:
QQ邮箱:
评估价值: 0元
详细评估指标
号码长度
0分
重复数字
0分
豹子号加成
0分
顺子号加成
0分
特殊组合
0分
<script>
document.getElementById('search-btn').addEventListener('click', function() {
const qqNumber = document.getElementById('qq-input').value.trim();
if (!qqNumber || !/^[1-9]\d{4,10}$/.test(qqNumber)) {
showError('请输入5-11位的有效QQ号码');
return;
}
document.getElementById('loading').style.display = 'block';
document.getElementById('error').style.display = 'none';
document.getElementById('result-container').style.display = 'none';
// 模拟API请求延迟
setTimeout(() => {
try {
const result = evaluateQQValue(qqNumber);
displayResult(qqNumber, result);
} catch (error) {
showError('评估过程中出现错误');
} finally {
document.getElementById('loading').style.display = 'none';
}
}, 800);
});
function displayResult(qq, data) {
document.getElementById('avatar').src = `https://q2.qlogo.cn/headimg_dl?dst_uin=${qq}&spec=640`;
document.getElementById('qq-nickname').textContent = `QQ用户`;
document.getElementById('qq-number').textContent = qq;
document.getElementById('qq-email').textContent = `${qq}@qq.com`;
// 更新评估分数
document.getElementById('length-score').textContent = `${data.lengthScore}分`;
document.getElementById('repeat-score').textContent = `${data.repeatScore}分`;
document.getElementById('straight-score').textContent = `${data.straightScore}分`;
document.getElementById('sequence-score').textContent = `${data.sequenceScore}分`;
document.getElementById('special-score').textContent = `${data.specialScore}分`;
document.getElementById('value-score').textContent = data.totalValue;
// 动画效果
setTimeout(() => {
document.getElementById('value-bar').style.width = `${Math.min(100, data.totalValue / 50000 * 100)}%`;
}, 100);
document.getElementById('result-container').style.display = 'block';
}
function evaluateQQValue(qq) {
const length = qq.length;
// 1. 号码长度估值(5-11位)
const lengthValue = (12 - length) * 5000; // 越短价值越高
const lengthScore = Math.round(lengthValue / 500);
// 2. 重复数字估值
let repeatValue = 0;
const counts = {};
qq.split('').forEach(num => {
counts[num] = (counts[num] || 0) + 1;
});
Object.values(counts).forEach(cnt => {
if(cnt >= 2) {
repeatValue += Math.pow(10, cnt) * 100; // 重复次数越多价值越高
}
});
const repeatScore = Math.round(repeatValue / 1000);
// 3. 豹子号估值(3+连续相同数字)
let straightValue = 0;
const straightMatches = qq.match(/(\d)\1{2,}/g) || [];
straightMatches.forEach(match => {
straightValue += Math.pow(10, match.length) * 200;
});
const straightScore = Math.round(straightValue / 1000);
// 4. 顺子号估值(连续递增/递减)
let sequenceValue = 0;
if(/(123|234|345|456|567|678|789|987|876|765|654|543|432|321)/.test(qq)) {
sequenceValue = 5000;
}
const sequenceScore = Math.round(sequenceValue / 100);
// 5. 特殊组合估值
let specialValue = 0;
if(/^[1-9]0+$/.test(qq)) { // 结尾多个0
specialValue = 3000 * (qq.match(/0/g) || []).length;
}
const specialScore = Math.round(specialValue / 100);
const totalValue = lengthValue + repeatValue + straightValue + sequenceValue + specialValue;
return {
lengthScore,
repeatScore,
straightScore,
sequenceScore,
specialScore,
totalValue
};
}
function showError(message) {
const errorEl = document.getElementById('error');
errorEl.textContent = message;
errorEl.style.display = 'block';
}
</script>
`提供一个演示地址:https://diuta.com/api/qq_value.html
浙公网安备 33010602011771号