新产品火狐

This commit is contained in:
“wanyongkang”
2021-04-28 08:48:56 +08:00
parent dfc7a6a1c1
commit 403b1663c7
11 changed files with 842 additions and 124 deletions

View File

@@ -19,16 +19,55 @@
height: calc(85vh);
overflow: auto;
}
.form-control {
height: 50px;
font-size: 25px;
width: 90%;
}
.citylabel {
font-weight: normal;
width: 300px;
height: 50px;
padding-left: 5px;
padding-top: 5px;
text-align: left;
border: solid 1px #ccc;
}
.citylabel>span{
padding-left: 50px;
display: block;
float: left;
}
.radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] {
position:none;
margin-left: 10px;
width: 25px;
height: 25px;
}
.btn {
height: 50px;
width: 90%;
font-size: 25px;
}
.province{
margin-bottom: 10px;
}
</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"/>&nbsp;&nbsp;<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 id="jike">
<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"/>&nbsp;&nbsp;<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 id="huohu">
加载中,请稍后...
</div>
</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>
@@ -40,8 +79,8 @@
account = getQueryVariable('account'),
pass = getQueryVariable('password');
if(product_id != 13) {
alert('目前仅支持极客产品!');
if(product_id != 13&&product_id != 19) {
alert('目前仅支持极客、火狐产品!');
window.location.href = "/User/MyAccounts";
}
@@ -61,53 +100,111 @@
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;
// }
//}
}
});
if(product_id == 13){
$("#jike").show();
$("#huohu").hide();
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/product/AccountAddress/index?user='+account+'&password='+pass,
dataType: "json",
contentType: "application/json",
success: function (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;
// }
//}
}
});
}
if(product_id == 19){
$("#huohu").show();
$("#jike").hide();
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/product/AccountAddress/getList?user='+account+'&password='+pass,
dataType: "json",
contentType: "application/json",
success: function (res) {
$("#huohu").html('<p style="font-size:30px;">统一服务器地址1.hhip.vip</p>');
$("#huohu").append(res.ipmodel);
$("#huohu").append("<hr>");
$("#huohu").append(res.city);
}
});
}
},
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;
// }
//}
if(product_id == 13){
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;
// }
//}
}
});
}
if(product_id == 19){
let address_checked = [];
$("input[name='citys[]']:checked").each(function(i){
address_checked.push($(this).val());
});
let ipmode = $("select[name='ipmode']").val();
console.log(address_checked)
console.log(ipmode)
let data = {
list:address_checked,
account:this.assign_account,
password:this.assign_pass,
ipmode:ipmode,
}
$.ajax({
type: 'POST',
url: 'http://php-api.juip.com/product/AccountAddress/setAddress',
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;
// }
//}
}
});
}
},
}
})

View File

@@ -27,4 +27,34 @@
$("#coupon_num").text(res.Data.length);
}
})
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var is_realname = getQueryString('realname');
if(is_realname){
let data = {
cookie:document.cookie
}
$.ajax({
type: 'POST',
url: 'http://php-api.juip.com/api/test/aliGetResult',
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data),
beforeSend: function(xhr) {
xhr.withCredentials = true;
},
crossDomain: true,
success: function (res) {
}
});
}
</script>

View File

@@ -99,8 +99,8 @@
<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>
</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 class="btnXq" v-if="@item.ProductId==13||@item.ProductId==19" href="/User/AssignAddress?productId=@item.ProductId&account=@item.Account&password=@item.Pwd">
<button type="button" class="btnXq" style="margin-top:3px">切换地区</button>
</a>
</td>