Files
juipnet/Host/Views.Mobile/LineList/Index.cshtml
“wanyongkang” 2f291d5f01 修复界面显示bug
2025-05-28 10:44:34 +08:00

572 lines
21 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@using Hncore.Pass.Vpn.Domain
@using Hncore.Infrastructure.Extension
@using Hncore.Pass.Vpn.Service
@inject ProductService m_ProductService
@model List<ProductRouteEntity>
@{
var pid = this.Context.Request.GetInt("ProductId");
var product = ViewData["products"] as List<ProductEntity>;
var currentProduct = (await m_ProductService.GetById(pid)) ?? new ProductEntity();
var lineTotalCount = Model.Count;
var lineCount = Model.Where(m => m.Status == "正常").Count();
}
<div id="loading">
<div class="loader">
<div class="loader-inner">
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
</div>
</div>
</div>
<style>
.loader {
background: #000;
background: radial-gradient(#222, #000);
bottom: 0;
left: 0;
overflow: hidden;
position: fixed;
right: 0;
top: 0;
z-index: 99999;
}
.loader-inner {
bottom: 0;
height: 60px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
width: 100px;
}
.loader-line-wrap {
animation:
spin 2000ms cubic-bezier(.175, .885, .32, 1.275) infinite
;
box-sizing: border-box;
height: 50px;
left: 0;
overflow: hidden;
position: absolute;
top: 0;
transform-origin: 50% 100%;
width: 100px;
}
.loader-line {
border: 4px solid transparent;
border-radius: 100%;
box-sizing: border-box;
height: 100px;
left: 0;
margin: 0 auto;
position: absolute;
right: 0;
top: 0;
width: 100px;
}
.loader-line-wrap:nth-child(1) { animation-delay: -50ms; }
.loader-line-wrap:nth-child(2) { animation-delay: -100ms; }
.loader-line-wrap:nth-child(3) { animation-delay: -150ms; }
.loader-line-wrap:nth-child(4) { animation-delay: -200ms; }
.loader-line-wrap:nth-child(5) { animation-delay: -250ms; }
.loader-line-wrap:nth-child(1) .loader-line {
border-color: hsl(0, 80%, 60%);
height: 90px;
width: 90px;
top: 7px;
}
.loader-line-wrap:nth-child(2) .loader-line {
border-color: hsl(60, 80%, 60%);
height: 76px;
width: 76px;
top: 14px;
}
.loader-line-wrap:nth-child(3) .loader-line {
border-color: hsl(120, 80%, 60%);
height: 62px;
width: 62px;
top: 21px;
}
.loader-line-wrap:nth-child(4) .loader-line {
border-color: hsl(180, 80%, 60%);
height: 48px;
width: 48px;
top: 28px;
}
.loader-line-wrap:nth-child(5) .loader-line {
border-color: hsl(240, 80%, 60%);
height: 34px;
width: 34px;
top: 35px;
}
@@keyframes spin {
0%, 15% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
</style>
<style>
table,table tr th,td {
border:1px solid #ccc;
}
</style>
<div id="app">
<div style="padding:5.5em 0 0.5em 0;background:rgb(57, 81, 107);color:white;text-align:center;">
<p style="padding: 3px;margin:0;">*线路表和账号必须为同一产品才能使用。</p>
<p style="padding: 3px;margin:0;">*请优先选择客户端连接 <a style="color:#0777ff;" href="/product/soft"><<<下载客户端>>></a> </p>
<p style="padding: 3px;margin:0;">*无对应客户端时,可通过线路表直连支持所有设备<a style="color:#0777ff;" href="/article/index"><<<教程&帮助>>></a></p>
</div>
<div class="lineBar"></div>
<div class="cpList">
<ul>
@foreach (var item in product.Where(m => m.Id != 7 && m.Id != 9&& m.Id != 20&& m.Id != 21).OrderBy(m=>m.Sort))
{
<li v-on:click="select_product(@item.Id)" id="product-@item.Id" class="item @(item.Id==pid?"cpActive":"")" a-pid="@item.Id" a-name="@item.Name">@item.Name</li>
}
</ul>
</div>
<div style="color: red;" v-if="product_id ==1|| product_id==2">
<p style="text-align:center;">
<span style="font-size: 20px;color:#FF0033;">{{search_field}}</span> 用服务器地址直连用户请注意:
</p>
<p>因电信联通机房限制此协议会存在个别地区直连无法连接电脑客户端和安卓APP不受影响。</p>
<p v-if="product_id ==1">解决方法IP账号后边输入@@特征码例如您的IP账号为zx1234要用sstp直连温州的那账号框就输入zx1234@zjwz服务器输入任意一个全国混拨的服务器则会连接到温州。</p>
<p v-if="product_id==2">解决方法IP账号后边输入@@特征码例如您的IP账号为zx1234要用sstp直连三亚的那账号框就输入zx1234@hnsy服务器输入任意一个全国混拨的服务器则会连接到三亚。</p>
</div>
<div style="color: red;text-align:center;font-size:20px;" v-if="product_id ==22">
<p>静态线路里面名称不带宽带字样的线路ip是相对固定不变的。</p>
<p>只要线路名称里面带“宽带”两个字的是完全模拟家庭宽带网络的线路和家庭宽度网络一样一般1-2天不等自动换一次ip</p>
</div>
<div class="dangqianshousuo">
<p>
<input type="hidden" name="ProductId" id="ProductId" value="@pid" />
<span style="background:rgb(74, 113, 155);color:white;padding: 0.6em 0 0.6em 0.6em;background:#1b379d;">{{search_field}}
<input type="text" style="color:black;" v-model="search_product_data" name="KeyWord" placeholder="输入地区/名称/服务器" id="KeyWord" />
</span>
<button style="width:auto;padding: 0 1em;" v-on:click="search_product()" type="submit" class="btnBlue">搜索</button>
</p>
<p><img src="~/m/img/shuju.png"> 实时总线路:{{ count }}条 <img src="~/m/img/shuju.png"> 实时可用线路:{{ use_count }}条</p>
</div>
<div class="daochu">
<div class="item">
<p><img src="~/m/img/miyao.png"> L2TP密钥{{l2tp}}</p>
<p><img src="~/m/img/dk.png"> SSTP端口{{sstp}}</p>
</div>
<div class="item">
<span v-on:click="export_data()"><img src="~/m/img/excel.png"> 导出Excel</span>
</div>
</div>
<table class="table table-striped xianluTable" style="margin-bottom: 10px;">
<tr>
<th>地区</th>
<th v-if="product_id ==19">剩余拨数</th>
<th v-else="product_id ==19">运营商</th>
<th>服务器域名</th>
<th style="width:3em;">详情</th>
<th>操作</th>
</tr>
<tr v-for="site in table_data" :style="(site.online=='故障')?'color:#ec5656;':''">
<td colspan="5" v-if="!site.nasname" style="color:#339933;font-weight:bold;text-align:center;">{{site.city}}</td>
<td v-if="site.nasname">{{site.city}}</td>
<td v-if="site.nasname">{{site.supply}}</td>
<td v-if="site.nasname">{{site.nasname}} <a style="cursor:pointer;" v-on:click="copyText(site.nasname)">复制</a></td>
<td v-if="site.nasname">{{site.online}}</td>
<td v-if="site.nasname"><button type="button" v-on:click="detail(site)" class="btnDetail">详情</button></td>
</tr>
</table>
<!-- 弹窗详情 -->
<div class="layerTable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>产品:</td>
<td>{{info.name}}</td>
</tr>
<tr>
<td>城市:</td>
<td>{{info.city}}</td>
</tr>
<tr>
<td v-if="product_id ==19">剩余拨数:</td>
<td v-else="product_id ==19">运营商:</td>
<td>{{info.supply}}</td>
</tr>
<tr>
<td>服务器域名:</td>
<td>{{info.nasname}}</td>
</tr>
<tr>
<td>IP量</td>
<td>{{info.ip}}</td>
</tr>
<tr>
<td>实时带宽:</td>
<td>{{info.daikuan}}</td>
</tr>
<tr>
<td>维护状态:</td>
<td>{{info.online}}</td>
</tr>
<tr>
@* <td>负载状态:</td> *@
<td v-if="product_id ==1|| product_id==2">特征码:</td>
<td v-else="product_id ==1|| product_id==2">负载状态:</td>
<td>{{info.status}}</td>
</tr>
</table>
<div v-on:click="back()" class="back">
<img src="~/m/img/arrowback.png"> 返回列表
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
setTimeout(function(){
$("#loading").hide();
},500);
});
var app = new Vue({
el: '#app',
data: {
table_data: [],
search_all_data: '',
search_product_data:'',
product_id:0,
l2tp:'',
search_field:'全部',
sstp:'',
info: {},
count:'0',
use_count:'0',
all_data:'',
},
computed: {
},
watch: {
},
created: function () {
this.select_product(0);
},
methods: {
copyText(text) {
// 检查浏览器是否支持 Clipboard API
if (!navigator.clipboard) {
// 如果不支持,则使用传统的 document.execCommand("copy") 方式
const textArea = document.createElement("textarea");
textArea.value = text;
textArea.style.position = "fixed";
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);
return;
}
// 使用 Clipboard API 复制内容到剪切板
navigator.clipboard.writeText(text).then(
function() {
console.log("复制成功");
},
function() {
console.log("复制失败");
}
);
},
select_product(ProductId){
this.product_id = ProductId;
let datalist = [];
let count = 0;
let use_count = 0;
$("li").removeClass("cpActive");
$("#product-"+ProductId).addClass("cpActive");
switch(ProductId){
case 29:
this.l2tp = '8899';
this.search_field = '极狐IP';
this.sstp = '4430';
break;
case 3:
this.l2tp = '1234';
this.search_field = '极光IP';
this.sstp = '4430';
break;
case 2:
this.l2tp = '123';
this.search_field = '讯连IP';
this.sstp = '1500';
break;
case 4:
this.l2tp = '123456';
this.search_field = '金瑞IP';
this.sstp = '4438';
break;
case 5:
this.l2tp = '123';
this.search_field = '老鹰IP';
this.sstp = '4430';
break;
case 6:
this.l2tp = '6666';
this.search_field = '先锋IP';
this.sstp = '889';
break;
case 10:
this.l2tp = '88';
this.search_field = '无限-单窗口单ip';
this.sstp = '';
break;
case 13:
this.l2tp = '123456';
this.search_field = '极客IP';
this.sstp = '4433';
break;
case 17:
this.l2tp = '123456';
this.search_field = '西瓜IP';
this.sstp = '4433';
break;
case 14:
this.l2tp = '1234';
this.search_field = '天天IP';
this.sstp = '4430';
break;
case 15:
this.l2tp = '66';
this.search_field = '共享IP';
this.sstp = '888';
break;
case 16:
this.l2tp = '8899';
this.search_field = '实惠IP';
this.sstp = '不支持';
break;
case 1:
this.l2tp = '888888';
this.search_field = '强子IP';
this.sstp = '1500';
break;
case 8:
this.l2tp = '88';
this.search_field = '星星IP';
this.sstp = '6666';
break;
case 18:
this.l2tp = '8899';
this.search_field = '蘑菇IP';
this.sstp = '4430';
break;
case 22:
this.l2tp = '888888';
this.search_field = '火狐IP';
this.sstp = '5908';
break;
case 23:
this.l2tp = '888888';
this.search_field = '云牛IP';
this.sstp = '5908';
break;
case 25:
this.l2tp = '888888';
this.search_field = '强子静态IP';
this.sstp = '1500';
break;
case 26:
this.l2tp = '1234';
this.search_field = '猎豹IP';
this.sstp = '4430';
break;
case 27:
this.l2tp = '123';
this.search_field = '麒麟IP';
this.sstp = '4432';
break;
case 28:
this.l2tp = '123';
this.search_field = '水滴独享IP';
this.sstp = '4432';
break;
}
$.ajax({
type: 'GET',
url: 'https://php-api.juip.com/script/linedata/display.php?product=' + ProductId,
dataType: "json",
async:false,
success: function (res) {
datalist = res.data;
count = res.count;
use_count = res.use_count;
}
});
if (ProductId == 0){
this.all_data = datalist;
let now_data = [];
for (let i = 0;i<50;i++){
now_data[i] = datalist[i];
}
this.table_data = now_data;
} else {
this.table_data = datalist;
}
this.count = count;
this.use_count = use_count;
},
search_all(){
if(!this.search_all_data){
this.select_product(0);
return;
}
$.ajax({
type: 'GET',
url: 'https://php-api.juip.com/script/linedata/search.php?type=1&info=' + this.search_all_data,
dataType: "json",
async:false,
success: function (res) {
datalist = res.data;
}
});
this.table_data = datalist;
},
search_product(){
if(!this.search_product_data){
this.select_product(this.product_id);
return;
}
$.ajax({
type: 'GET',
url: 'https://php-api.juip.com/script/linedata/search.php?type=0&productid='+this.product_id+'&info=' + this.search_product_data,
dataType: "json",
async:false,
success: function (res) {
datalist = res.data;
}
});
this.table_data = datalist;
},
export_data(){
switch(this.product_id){
case 0:
self.location.href='https://php-api.juip.com/script/linedata/data/download/all.csv';
break;
case 2:
self.location.href='https://php-api.juip.com/script/linedata/data/download/xunlian.csv';
break;
case 4:
self.location.href='https://php-api.juip.com/script/linedata/data/download/jinrui.csv';
break;
case 5:
self.location.href='https://php-api.juip.com/script/linedata/data/download/laoying.csv';
break;
case 6:
self.location.href='https://php-api.juip.com/script/linedata/data/download/xianfeng.csv';
break;
case 10:
self.location.href='https://php-api.juip.com/script/linedata/data/download/wuxian.csv';
break;
case 13:
self.location.href='https://php-api.juip.com/script/linedata/data/download/jike.csv';
break;
case 17:
self.location.href='https://php-api.juip.com/script/linedata/data/download/xigua.csv';
break;
case 18:
self.location.href='https://php-api.juip.com/script/linedata/data/download/mogu.csv';
break;
case 29:
self.location.href='https://php-api.juip.com/script/linedata/data/download/jihu.csv';
break;
case 3:
self.location.href='https://php-api.juip.com/script/linedata/data/download/jiguang.csv';
break;
case 14:
self.location.href='https://php-api.juip.com/script/linedata/data/download/tiantian.csv';
break;
case 15:
self.location.href='https://php-api.juip.com/script/linedata/data/download/gongxiang.csv';
break;
case 16:
self.location.href='https://php-api.juip.com/script/linedata/data/download/shihui.csv';
break;
case 1:
self.location.href='https://php-api.juip.com/script/linedata/data/download/qiangzi.csv';
break;
case 8:
self.location.href='https://php-api.juip.com/script/linedata/data/download/xingxing.csv';
break;
case 17:
self.location.href='https://php-api.juip.com/script/linedata/data/download/xigua.csv';
break;
case 18:
self.location.href='https://php-api.juip.com/script/linedata/data/download/mogu.csv';
break;
case 19:
self.location.href='https://php-api.juip.com/script/linedata/data/download/huohu.csv';
break;
case 25:
self.location.href='https://php-api.juip.com/script/linedata/data/download/qiangzijt.csv';
break;
case 26:
self.location.href='https://php-api.juip.com/script/linedata/data/download/liebao.csv';
break;
case 27:
self.location.href='https://php-api.juip.com/script/linedata/data/download/qilin.csv';
break;
}
},
detail(r){
$(".layerTable").show();
this.info= r;
},
back(){
$(".layerTable").hide();
}
}
})
</script>