由于前面刷视频经常刷到有人直播QQ号码价值评估,想着也搞一个玩玩,找了一圈接口好像很多都用不来,下面提供一个自己随便搞得页面,有兴趣的大佬可以完善下
HTML代码如下:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QQ号码价值评估系统-在线工具-丢塔网(www.diuta.com)</title>
<style>
body {
font-family: 'Microsoft YaHei', sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
margin: 0;
padding: 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
padding: 30px;
position: relative;
overflow: hidden;
}
h1 {
color: #12b7f5;
text-align: center;
margin-bottom: 30px;
position: relative;
}
h1:after {
content: "";
display: block;
width: 100px;
height: 3px;
background: #12b7f5;
margin: 10px auto;
}
.search-box {
display: flex;
margin-bottom: 30px;
}
#qq-input {
flex: 1;
padding: 12px 15px;
border: 2px solid #e0e0e0;
border-radius: 8px 0 0 8px;
font-size: 16px;
outline: none;
transition: border 0.3s;
}
#qq-input:focus {
border-color: #12b7f5;
}
#search-btn {
padding: 0 25px;
background: linear-gradient(45deg, #12b7f5, #0e9fd8);
color: white;
border: none;
border-radius: 0 8px 8px 0;
cursor: pointer;
font-size: 16px;
font-weight: bold;
transition: all 0.3s;
}
#search-btn:hover {
background: linear-gradient(45deg, #0e9fd8, #0b8fc7);
transform: translateY(-2px);
}
.result-container {
display: none;
animation: fadeIn 0.5s;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.basic-info {
display: flex;
align-items: center;
margin-bottom: 25px;
padding-bottom: 25px;
border-bottom: 1px dashed #e0e0e0;
}
.avatar {
width: 100px;
height: 100px;
border-radius: 50%;
margin-right: 25px;
border: 3px solid #12b7f5;
box-shadow: 0 5px 15px rgba(18, 183, 245, 0.3);
}
.value-container {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
border-radius: 10px;
padding: 20px;
margin: 20px 0;
box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.value-text {
text-align: center;
font-size: 28px;
font-weight: bold;
margin-bottom: 15px;
color: #333;
}
.value-amount {
font-size: 36px;
color: #ff5722;
text-shadow: 0 2px 5px rgba(255, 87, 34, 0.2);
}
.value-indicator {
height: 20px;
background: #e0e0e0;
border-radius: 10px;
margin: 15px 0;
overflow: hidden;
position: relative;
}
.value-bar {
height: 100%;
background: linear-gradient(90deg, #ff9500, #ff2d55);
width: 0;
transition: width 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
position: relative;
}
.value-bar:after {
content: "";
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 10px;
background: rgba(255,255,255,0.5);
transform: skewX(-15deg);
}
.detail-container {
margin-top: 30px;
}
.detail-title {
font-size: 18px;
color: #12b7f5;
margin-bottom: 15px;
padding-bottom: 5px;
border-bottom: 1px solid #e0e0e0;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 15px;
margin-bottom: 10px;
background: #f8f9fa;
border-radius: 8px;
transition: all 0.3s;
}
.detail-item:hover {
background: #e9ecef;
transform: translateX(5px);
}
.detail-label {
font-weight: bold;
color: #555;
}
.detail-score {
font-weight: bold;
color: #ff5722;
}
.loading {
text-align: center;
display: none;
margin: 20px 0;
}
.loading-spinner {
display: inline-block;
width: 40px;
height: 40px;
border: 4px solid rgba(18, 183, 245, 0.2);
border-radius: 50%;
border-top-color: #12b7f5;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.error {
color: #ff5722;
text-align: center;
padding: 15px;
background: #fff3f3;
border-radius: 8px;
margin: 20px 0;
display: none;
}
.special-tag {
display: inline-block;
padding: 3px 8px;
background: #ff5722;
color: white;
border-radius: 4px;
font-size: 12px;
margin-left: 10px;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="container">
<h1>QQ号码价值评估系统</h1>
<div class="search-box">
<input type="text" id="qq-input" placeholder="请输入QQ号码" maxlength="11">
<button id="search-btn">立即评估</button>
</div>
<div class="loading" id="loading">
<div class="loading-spinner"></div>
<p>正在评估中,请稍候...</p>
</div>
<div class="error" id="error"></div>
<div class="result-container" id="result-container">
<div class="basic-info">
<img id="avatar" class="avatar" src="" alt="QQ头像">
<div>
<h2 id="qq-nickname"></h2>
<p>QQ号码: <span id="qq-number"></span></p>
<p>QQ邮箱: <span id="qq-email"></span></p>
</div>
</div>
<div class="value-container">
<div class="value-text">
评估价值: <span class="value-amount" id="value-score">0</span>元
</div>
<div class="value-indicator">
<div class="value-bar" id="value-bar"></div>
</div>
</div>
<div class="detail-container">
<h3 class="detail-title">详细评估指标</h3>
<div class="detail-item">
<span class="detail-label">号码长度</span>
<span class="detail-score" id="length-score">0分</span>
</div>
<div class="detail-item">
<span class="detail-label">重复数字</span>
<span class="detail-score" id="repeat-score">0分</span>
</div>
<div class="detail-item">
<span class="detail-label">豹子号加成</span>
<span class="detail-score" id="straight-score">0分</span>
</div>
<div class="detail-item">
<span class="detail-label">顺子号加成</span>
<span class="detail-score" id="sequence-score">0分</span>
</div>
<div class="detail-item">
<span class="detail-label">特殊组合</span>
<span class="detail-score" id="special-score">0分</span>
</div>
</div>
</div>
</div>
<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>
</body>
</html>
提供一个演示地址:https://diuta.com/api/qq_value.html
© 版权声明
THE END
请登录后查看评论内容