极客指定线路
This commit is contained in:
@@ -532,6 +532,13 @@ namespace Home.Controllers
|
||||
var ret = await m_ProductAccountService.Query(exp, true).OrderByDescending(m=>m.Id).ToListAsync();
|
||||
return View(ret);
|
||||
}
|
||||
[HttpGet]
|
||||
[UserAuth]
|
||||
public async Task<IActionResult> AssignAddress([FromQuery]AccountSearchModel request=null )
|
||||
{
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[UserAuth]
|
||||
|
||||
129
Host/Views.Mobile/User/AssignAddress.cshtml
Normal file
129
Host/Views.Mobile/User/AssignAddress.cshtml
Normal file
@@ -0,0 +1,129 @@
|
||||
@using Home.Models
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Pass.Vpn.Model
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model List<OriginAccountOnlineModel>
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
var productId = this.Context.Request.GetInt("productId");
|
||||
}
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
margin-left: 1rem;
|
||||
margin-top: 2rem;
|
||||
height: calc(85vh);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<div id="app" >
|
||||
<div class="checkbox">
|
||||
<label style="width: 90%;margin-left: 0.3rem;" v-for="(item,index) in assign_add_list">
|
||||
<input type="checkbox" style="height: 0.3rem;width: 0.3rem;" v-model="assign_list" :value="item.name+'-'+item.id"/> <span v-if="item.status ==2">{{item.name}}</span><span v-if="item.status ==1" style="color: red;">{{item.name}}</span>
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div style="text-align: center;height:calc(5vh);margin-top:0.2rem;">
|
||||
<button type="button" class="btnTui btn-refund" v-on:click="selectAddAssign()">确定选择</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
let product_id = getQueryVariable('productId'),
|
||||
account = getQueryVariable('account'),
|
||||
pass = getQueryVariable('password');
|
||||
|
||||
if(product_id != 13) {
|
||||
alert('目前仅支持极客产品!');
|
||||
window.location.href = "/User/MyAccounts";
|
||||
}
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
assign_add_list:[],
|
||||
assign_list:[],
|
||||
assign_account:'',
|
||||
assign_pass:'',
|
||||
},
|
||||
mounted: function () {
|
||||
this.assign_address();
|
||||
},
|
||||
methods: {
|
||||
assign_address () {
|
||||
var that = this;
|
||||
this.assign_account = account;
|
||||
this.assign_pass = pass;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'http://php-api.juip.com/product/AccountAddress/index?user='+account+'&password='+pass,
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.assign_add_list = res;
|
||||
//if (res.Code == 10000) {
|
||||
// that.onLineData = res.Data;
|
||||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||||
// that.onLineData[i].ProductId = productId;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
});
|
||||
},
|
||||
selectAddAssign() {
|
||||
if(this.assign_list.length>20||this.assign_list.length==0){
|
||||
alert('最多选择20个,至少选择一个!');
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
list:this.assign_list,
|
||||
account:this.assign_account,
|
||||
password:this.assign_pass,
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'http://php-api.juip.com/product/AccountAddress/select',
|
||||
dataType: "json",
|
||||
data:JSON.stringify(data),
|
||||
contentType: "application/json",
|
||||
success: function (res) {
|
||||
if(res.code == 1){
|
||||
alert('选择成功');
|
||||
} else {
|
||||
alert('选择失败');
|
||||
}
|
||||
//if (res.Code == 10000) {
|
||||
// that.onLineData = res.Data;
|
||||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||||
// that.onLineData[i].ProductId = productId;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
});
|
||||
function getQueryVariable(variable)
|
||||
{
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i=0;i<vars.length;i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if(pair[0] == variable){return pair[1];}
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -91,13 +91,16 @@
|
||||
a-Account="@item.Account"
|
||||
a-Pwd="@item.Pwd"
|
||||
a-ConnectCount="@item.ConnectCount"
|
||||
a-StartTime="@item.StartTime"
|
||||
a-EndTime="@item.EndTime"
|
||||
a-StartTime='@item.StartTime.Value.ToString("yyyy.M.dd H:m")'
|
||||
a-EndTime='@item.EndTime.Value.ToString("yyyy.M.dd H:m")'
|
||||
a-RestTime="@item.RestTime">
|
||||
详情
|
||||
</button>
|
||||
<a class="btnXq" asp-action="OnLine" asp-controller="User" asp-route-productId="@item.ProductId" asp-route-account="@item.Account">
|
||||
<button type="button" class="btnXq" style="margin-top:3px">查看</button>
|
||||
<button type="button" class="btnXq" style="margin-top:3px">查看在线</button>
|
||||
</a>
|
||||
<a class="btnXq" href="/User/AssignAddress?productId=@item.ProductId&account=@item.Account&password=@item.Pwd">
|
||||
<button type="button" class="btnXq" style="margin-top:3px">指定线路</button>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
position: fixed;
|
||||
left: 350px;
|
||||
width: 1000px;
|
||||
height: 700px;
|
||||
height: 710px;
|
||||
top: 100px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
@@ -251,12 +251,12 @@
|
||||
</div>
|
||||
@* 指定地区 *@
|
||||
<div class="online" style="overflow: hidden;" v-cloak v-if="showAddress">
|
||||
<span>最多选择20条线路</span>
|
||||
<h4>最多选择20条线路 <span style="color: red;">标红</span>为线路正在维护中</h4>
|
||||
<img src="~/img/close.png" class="btnOnlineClose" style="position: absolute;top:10px;" v-on:click="closeOnline()" />
|
||||
<div style="overflow-y: auto;width:950px;height:580px;">
|
||||
<div class="checkbox">
|
||||
<label style="width: 25%;" v-for="(item,index) in assign_add_list">
|
||||
<input type="checkbox" v-model="assign_list" :value="item.name+'-'+item.id">{{item.name}}
|
||||
<input type="checkbox" v-model="assign_list" :value="item.name+'-'+item.id"><span v-if="item.status ==2">{{item.name}}</span><span v-if="item.status ==1" style="color: red;">{{item.name}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
BIN
Host/wwwroot/img/acBanner.bak.png
Normal file
BIN
Host/wwwroot/img/acBanner.bak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 568 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 568 KiB After Width: | Height: | Size: 78 KiB |
Reference in New Issue
Block a user