<!DOCTYPE html>
<html lang="zh" class="js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>开通主机</title>
<link rel="stylesheet" href="./dashlite.css">
<link rel="stylesheet" href="./style.css">
</head>
<body class="nk-body npc-invest bg-lighter ">
<div class="nk-wrap ">
<div class="nk-content nk-content-lg nk-content-fluid">
<div class="container-xl" id="app" style="text-align: center;">
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
<div class="card card-preview">
<div class="card-inner mt-3">
<div class="nya-title nk-ibx-action-item progress-rating">
<span class="nk-menu-text font-weight-bold">在线开通主机</span>
</div>
<div class="alert alert-info">请牢记账号密码</div>
<div class="list-group">
<div class="form-group">
<div class="input-group input-group-lg">
<div class="input-group-prepend"><span class="input-group-text">账号</span></div>
<input type="text" class="form-control" id="username" placeholder="账号" v-model="desc">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-lg">
<div class="input-group-prepend"><span class="input-group-text">密码</span></div>
<input type="text" class="form-control" id="password" placeholder="密码" v-model="imei">
</div>
</div>
</div>
<br/>
<div class="form-group">
<button type="button" class="btn btn-dim btn-outline-primary btn-block btn-lg" id="submit">开通主机</button>
</div>
<div v-html="result" v-show="showresult"></div>
</div>
</div>
</div>
</div>
</div>
<!-- content @d -->
<div class="nk-footer nk-footer-fluid bg-lighter">
<div class="container-xl">
<div class="nk-footer-wrap">
<div class="nk-footer-copyright"> © 2023 开通主机 </div>
</div>
</div>
</div>
<!-- footer @e -->
</div>
<!-- wrap @e -->
<script src="//cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
<script src="//cdn.staticfile.org/bootstrap/4.6.1/js/bootstrap.bundle.min.js"></script>
<script src="//cdn.staticfile.org/layer/3.5.1/layer.js"></script>
<!--请求接口-->
<script>
$(document).ready(function(){
$("button").click(function(){
layer.msg('正在开通中', {icon: 1});
var username = $("#username").val();
var password = $("#password").val();
$.post("http://23.224.85.147:520/kt/api.php",
{
username:username,
password:password
},
function(data,status){
var obj = JSON.parse(data);
if (obj.code == 1) {
layer.confirm('开通成功\n结果:'+obj.msg+'<br>登录地址:'+obj.login+'<br>接口由流年小镇提供',{
btn: ['登录','好的'] },
function(){
window.location.href=""+obj.login;},
function(){
});
} else {
layer.confirm('开通失败\n结果:'+obj.msg+'<br>登录地址:'+obj.login+'接口由流年小镇供',{
btn: ['好的'] },
);
}
});
});
});
</script>
<!--请求结束-->
</body>
</html>