Files
juipnet/Host/Views.Mobile/LineList/Index.cshtml

349 lines
14 KiB
Plaintext
Raw Normal View History

2020-10-07 20:25:03 +08:00
@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();
}
2020-11-09 11:02:50 +08:00
<div id="app">
2020-10-07 20:25:03 +08:00
<div class="quanjushousuo">
2020-11-09 11:02:50 +08:00
<p><input type="text" v-model="search_all_data" name="KeyWord" placeholder="输入地区/名称/服务器" id="KeyWord" /><button type="submit" v-on:click="search_all()" class="btnOrange">搜索全部</button></p>
<p><img src="~/m/img/shuju.png"> 实时总线路:{{ count }}条 <img src="~/m/img/shuju.png"> 实时可用线路:{{ use_count }}条</p>
2020-11-30 13:56:19 +08:00
<p>所有线路均支持:【电脑/安卓/苹果】【IP/L2TP/SSTP】</p>
2021-04-04 18:13:45 +08:00
2020-10-07 20:25:03 +08:00
</div>
<div class="zhilian">
<div class="item">
<span class="btnZhilian">
<a asp-index="" asp-controller="article" asp-route-Catalog="4"><img src="~/m/img/zhilian.png">直连教程</a>
</span>
</div>
<div class="item">
<p class="grayText" style="font-size: 25px;">线路表与账号必须为同一产品才能使用</p>
</div>
</div>
2021-04-04 18:13:45 +08:00
<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> 模拟器sstp直连用户请注意
</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>
2020-10-07 20:25:03 +08:00
<div class="lineBar"></div>
<div class="cpList">
<ul>
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9))
{
2020-11-09 11:02:50 +08:00
<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>
2020-10-07 20:25:03 +08:00
}
</ul>
</div>
<div class="dangqianshousuo">
<p>
<input type="hidden" name="ProductId" id="ProductId" value="@pid" />
2020-11-09 11:02:50 +08:00
<input type="text" v-model="search_product_data" name="KeyWord" placeholder="输入地区/名称/服务器" id="KeyWord" />
<button v-on:click="search_product()" type="submit" class="btnBlue">搜索当前</button>
2020-10-07 20:25:03 +08:00
</p>
</div>
<div class="daochu">
<div class="item">
2020-11-09 11:02:50 +08:00
<p><img src="~/m/img/miyao.png"> L2TP密钥{{l2tp}}</p>
<p><img src="~/m/img/dk.png"> SSTP端口{{sstp}}</p>
2020-10-07 20:25:03 +08:00
</div>
<div class="item">
2020-11-09 11:02:50 +08:00
<span v-on:click="export_data()"><img src="~/m/img/excel.png"> 导出Excel</span>
2020-10-07 20:25:03 +08:00
</div>
</div>
<div class="tableTit">
<div class="item">
地区
</div>
<div class="item">
运营商
</div>
<div class="item">
服务器域名
</div>
<div class="item">
详情
</div>
</div>
2020-11-09 11:02:50 +08:00
<div class="cityData" v-for="site in table_data" :style="(site.online=='故障')?'color:#ec5656;':''">
<div class="item" v-if="site.online==null" style="color:#993399">{{site.city}}</div>
<div class="item" v-if="site.online!=null">{{site.city}}</div>
<div class="item">{{site.supply}}</div>
<div class="item">{{site.nasname}}</div>
<div class="item">
<button type="button" v-on:click="detail(site)" class="btnDetail">详情</button>
</div>
</div>
2020-10-07 20:25:03 +08:00
<!-- 弹窗详情 -->
<div class="layerTable">
<table border="0" cellspacing="0" cellpadding="0">
2020-11-09 11:02:50 +08:00
<tr>
<td>产品:</td>
<td>{{info.name}}</td>
</tr>
2020-10-07 20:25:03 +08:00
<tr>
<td>城市:</td>
2020-11-09 11:02:50 +08:00
<td>{{info.city}}</td>
2020-10-07 20:25:03 +08:00
</tr>
<tr>
<td>运营商:</td>
2020-11-09 11:02:50 +08:00
<td>{{info.supply}}</td>
2020-10-07 20:25:03 +08:00
</tr>
<tr>
<td>服务器域名:</td>
2020-11-09 11:02:50 +08:00
<td>{{info.nasname}}</td>
2020-10-07 20:25:03 +08:00
</tr>
<tr>
2020-11-09 11:02:50 +08:00
<td>IP量</td>
<td>{{info.ip}}</td>
2020-10-07 20:25:03 +08:00
</tr>
<tr>
2020-11-09 11:02:50 +08:00
<td>实时带宽:</td>
<td>{{info.daikuan}}</td>
2020-10-07 20:25:03 +08:00
</tr>
<tr>
2020-11-09 11:02:50 +08:00
<td>维护状态:</td>
<td>{{info.online}}</td>
</tr>
<tr>
2021-04-04 18:13:45 +08:00
@* <td>负载状态:</td> *@
<td v-if="product_id ==1|| product_id==2">特征码:</td>
<td v-else="product_id ==1|| product_id==2">负载状态:</td>
2020-11-09 11:02:50 +08:00
<td>{{info.status}}</td>
</tr>
2020-10-07 20:25:03 +08:00
</table>
2020-11-09 11:02:50 +08:00
<div v-on:click="back()" class="back">
2020-10-07 20:25:03 +08:00
<img src="~/m/img/arrowback.png"> 返回列表
</div>
</div>
2020-11-09 11:02:50 +08:00
</div>
2020-10-07 20:25:03 +08:00
<script type="text/javascript">
2020-11-09 11:02:50 +08:00
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',
2020-11-09 11:02:50 +08:00
},
computed: {
},
watch: {
},
created: function () {
this.select_product(0);
},
methods: {
select_product(ProductId){
this.product_id = ProductId;
let datalist = [];
let count = 0;
let use_count = 0;
2020-11-09 11:02:50 +08:00
$("li").removeClass("cpActive");
$("#product-"+ProductId).addClass("cpActive");
switch(ProductId){
2021-02-17 09:35:42 +08:00
case 2:
2020-11-09 11:02:50 +08:00
this.l2tp = '123';
2020-11-30 13:56:19 +08:00
this.search_field = '讯连IP';
2020-11-09 11:02:50 +08:00
this.sstp = '1500';
break;
case 4:
this.l2tp = '123456';
2020-11-30 13:56:19 +08:00
this.search_field = '金瑞IP';
2020-11-09 11:02:50 +08:00
this.sstp = '4438';
break;
case 5:
2021-03-27 14:14:32 +08:00
this.l2tp = '000';
2020-11-30 13:56:19 +08:00
this.search_field = '老鹰IP';
2020-11-09 11:02:50 +08:00
this.sstp = '4430';
break;
case 6:
this.l2tp = '123';
2020-11-30 13:56:19 +08:00
this.search_field = '先锋IP';
2020-11-09 11:02:50 +08:00
this.sstp = '6665';
break;
case 10:
this.l2tp = '88';
this.search_field = '无限-单窗口单ip';
this.sstp = '';
break;
case 13:
this.l2tp = '123456';
2020-11-30 13:56:19 +08:00
this.search_field = '极客IP';
2020-11-09 11:02:50 +08:00
this.sstp = '4433';
break;
2021-02-17 09:35:42 +08:00
case 17:
this.l2tp = '123456';
this.search_field = '西瓜IP';
this.sstp = '4433';
break;
2020-11-09 11:02:50 +08:00
case 14:
this.l2tp = '91ip';
2020-11-30 13:56:19 +08:00
this.search_field = '天天IP';
2020-11-09 11:02:50 +08:00
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';
2020-11-30 13:56:19 +08:00
this.search_field = '强子IP';
2020-11-09 11:02:50 +08:00
this.sstp = '1500';
break;
case 8:
this.l2tp = '88';
2020-11-30 13:56:19 +08:00
this.search_field = '星星IP';
2020-11-09 11:02:50 +08:00
this.sstp = '6666';
break;
2021-02-17 09:35:42 +08:00
case 18:
this.l2tp = '123456';
this.search_field = '蘑菇IP';
this.sstp = '4430';
break;
2020-11-09 11:02:50 +08:00
}
$.ajax({
type: 'GET',
url: 'http://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;
2020-11-09 11:02:50 +08:00
}
});
this.table_data = datalist;
this.count = count;
this.use_count = use_count;
2020-11-09 11:02:50 +08:00
},
search_all(){
2020-11-12 14:15:51 +08:00
if(!this.search_all_data){
this.select_product(0);
return;
}
2020-11-09 11:02:50 +08:00
$.ajax({
type: 'GET',
url: 'http://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(){
2020-11-12 14:15:51 +08:00
if(!this.search_product_data){
this.select_product(this.product_id);
return;
}
2020-11-09 11:02:50 +08:00
$.ajax({
type: 'GET',
url: 'http://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='http://php-api.juip.com/script/linedata/data/download/all.csv';
break;
case 2:
self.location.href='http://php-api.juip.com/script/linedata/data/download/xunlian.csv';
break;
case 4:
self.location.href='http://php-api.juip.com/script/linedata/data/download/jinrui.csv';
break;
case 5:
self.location.href='http://php-api.juip.com/script/linedata/data/download/laoying.csv';
break;
case 6:
self.location.href='http://php-api.juip.com/script/linedata/data/download/xianfeng.csv';
break;
case 10:
self.location.href='http://php-api.juip.com/script/linedata/data/download/wuxian.csv';
break;
case 13:
self.location.href='http://php-api.juip.com/script/linedata/data/download/jike.csv';
break;
2021-02-17 09:35:42 +08:00
case 17:
self.location.href='http://php-api.juip.com/script/linedata/data/download/xigua.csv';
break;
case 18:
self.location.href='http://php-api.juip.com/script/linedata/data/download/mogu.csv';
break;
2020-11-09 11:02:50 +08:00
case 14:
self.location.href='http://php-api.juip.com/script/linedata/data/download/tiantian.csv';
break;
case 15:
self.location.href='http://php-api.juip.com/script/linedata/data/download/gongxiang.csv';
break;
case 16:
self.location.href='http://php-api.juip.com/script/linedata/data/download/shihui.csv';
break;
case 1:
self.location.href='http://php-api.juip.com/script/linedata/data/download/qiangzi.csv';
break;
case 8:
self.location.href='http://php-api.juip.com/script/linedata/data/download/xingxing.csv';
break;
2021-02-17 09:35:42 +08:00
case 17:
self.location.href='http://php-api.juip.com/script/linedata/data/download/xigua.csv';
break;
case 18:
self.location.href='http://php-api.juip.com/script/linedata/data/download/mogu.csv';
break;
2020-11-09 11:02:50 +08:00
}
},
detail(r){
$(".layerTable").show();
this.info= r;
},
back(){
$(".layerTable").hide();
}
}
})
2020-10-07 20:25:03 +08:00
</script>