页面优化

This commit is contained in:
“wanyongkang”
2024-02-24 13:58:39 +08:00
parent 95dc0c16be
commit abbef158af
16 changed files with 149 additions and 44 deletions

View File

@@ -844,6 +844,8 @@ namespace Home.Controllers
[HttpGet]
public async Task<IActionResult> ReBuyIndex(string accounts,int productId=0)
{
ViewBag.accounts = "";
ViewBag.errorTip = "";
var model = new ProductWithPackageResponse();
@@ -852,8 +854,15 @@ namespace Home.Controllers
ViewBag.errorTip = "请选择账号";
return View(model);
}
var accountList = await m_ProductAccountService.GetAccounts(accounts);
var flag = true;
if (productId == 26 || productId == 14) {
flag =await m_ProductAccountService.CheckAccountagentExist(productId, accounts.Split(',').ToList());
}
if (productId > 0)
accountList = accountList.Where(m => m.ProductId == productId).ToList();
var productIds = accountList.Select(m => m.ProductId);
@@ -1188,6 +1197,11 @@ namespace Home.Controllers
}
return_list.Packages = package_temp;
if (!flag)
{
ViewBag.errorTip = "1231312";
return View(return_list);
}
return View(return_list);
}

View File

@@ -597,6 +597,12 @@ namespace Home.Controllers
var userId =this.Request.GetUserInfo().UserId;
return View();
}
[HttpGet]
[UserAuth]
public IActionResult upload()
{
return View();
}
[HttpGet]
[UserAuth]

View File

@@ -279,6 +279,7 @@
info: {},
count:'0',
use_count:'0',
all_data:'',
},
computed: {
@@ -406,7 +407,17 @@
use_count = res.use_count;
}
});
this.table_data = datalist;
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;
},
@@ -507,6 +518,7 @@
}
},
detail(r){
$(".layerTable").show();
this.info= r;
},

View File

@@ -74,7 +74,10 @@
top: 0;
z-index: 99999;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
background-color:#cbd3d3;
color:white !important;
}
.loader-inner {
bottom: 0;
height: 60px;
@@ -234,17 +237,19 @@
@foreach (var item in Model)
{
<div role="tabpanel" class="tab-pane @(item.Product.Id==defaultProduct.Id?"active":"")" id="@item.Product.Id">
<div style="fonft-size:1.2em;float:left;position: relative;top: calc(-2vh);left: -47%;height:calc(26vh);line-height:1.2em;width:calc(100vw);overflow:hidden;background:rgb(57, 81, 107);color:#FFFFFF;">
<p class="texing text-center" style="color:#009933;border:none;">@item.Product.Name 简介</p>
<hr>
<ul class="texingList" style="padding-bottom:0;">
<div style="fonft-size:1.2em;float:left;position: relative;top: calc(-2vh);left: -47%;height:calc(26vh);line-height:1.2em;width:calc(100vw);overflow:hidden;background:#cbd3d3;color:black;border-radius:100px;">
<p class=" text-left" style="color:black;border:none;font-size: 35px;margin:0.7rem 0 0.2rem 0rem;width:calc(38vw);float:left;padding-left:0.4rem;">@item.Product.Name 简介: </p>
<a target="_blank" style="color: black;font-size:32px;float:right;width:calc(60vw);text-align:center;border:2px solid white;border-top:none;line-height:150%;" href="/img/product_compare.png?id=12">点击查看各产品对比<br>需求5个以上可联系客服优惠</a>
<br>
<br>
<ul class="texingList" style="padding-bottom:0;padding-top:0.6rem">
@foreach (var str in item.Product.ContentLine)
{
<li style="padding:5px;">·@str</li>
}
</ul>
<p class=" text-center" style="color:#FF9933">需求五个以上、可联系右侧客服设置优惠价</p>
<br>
</div>
<div style="margin-top:calc(2vh);">

View File

@@ -18,7 +18,7 @@
}
var product_id = Model.Product.Id;
if (product_id == 27) {
if (product_id == 27||product_id == 6) {
randomPwd = ValidateCodeHelper.MakeNumCode(6).ToLower();
}
}
@@ -110,6 +110,10 @@
$(".tip").text("账户和密码不能为空");
return;
}
if (data.ProductId == 6 && data.Pwd.length<6) {
$(".tip").text("密码要大于6位");
return;
}
$.ajax({
type: 'POST',
url: '/api/course/v1/productaccount/CreateTestAccount',

View File

@@ -688,6 +688,15 @@
return true;
},
checkOnePwd() {
if (productId == 27 || productId == 6) {
if (this.OneBuyModel.Pwd.length < 7 || this.OneBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
alert("此产品密码必须大于6位");
this.OneChecker.PwdOk = false;
return false;
}
this.OneChecker.PwdOk = true;
return true;
}
if (this.OneBuyModel.Pwd.length > 6 || this.OneBuyModel.Pwd.length <1 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
this.OneChecker.PwdOk = false;
alert('密码长度必须在1-6位且不能包含特殊字符');
@@ -717,6 +726,15 @@
return true;
},
checkMorePwd() {
if (productId == 27 || productId == 6) {
if (this.MoreBuyModel.Pwd.length < 7 || this.MoreBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
alert("此产品密码必须大于6位");
this.MoreChecker.PwdOk = false;
return false;
}
this.MoreChecker.PwdOk = true;
return true;
}
if (this.MoreBuyModel.Pwd.length > 6 || this.MoreBuyModel.Pwd.length < 1 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
this.MoreChecker.PwdOk = false;
alert('密码长度必须在1-6位且不能包含特殊字符');

View File

@@ -161,25 +161,25 @@
<!-- 弹窗导航 -->
<div class="mask">
<ul class="layNav">
<li><a href="/">首页</a></li>
<li><a href="/product/index">产品购买 <span style="color: red;">活动</span></a> </li>
<li><a asp-action="index" asp-controller="LineList" asp-route-Catalog="1">线路表</a> </li>
<li><a asp-action="soft" asp-controller="product">软件下载</a> </li>
<li><a asp-action="index" asp-controller="article">教程&帮助</a></li>
<li><a href="/product/routeros">软路由购买</a></li>
<li><a href="http://vps.juip.com" style="color: red;">动态VPS</a></li>
<li><a href="/"><p>首页</p></a></li>
<li><a href="/product/index"><p>产品购买 <span style="color: red;">活动</span></p></a> </li>
<li><a asp-action="index" asp-controller="LineList" asp-route-Catalog="1"><p>线路表</p></a> </li>
<li><a asp-action="soft" asp-controller="product"><p>软件下载</p></a> </li>
<li><a asp-action="index" asp-controller="article"><p>教程&帮助</p></a></li>
<li><a href="/product/routeros"><p>软路由购买</p></a></li>
<li><a href="http://vps.juip.com" style="color: red;"><p>动态VPS</p></a></li>
@* <li><a asp-action="taobao" asp-controller="article">淘宝充值活动</a></li> *@
@if (user != null)
{
<li><a asp-action="index" asp-controller="user">个人中心</a></li>
<li><a asp-action="LoginOut" asp-controller="user">退出</a></li>
<li><a asp-action="index" asp-controller="user"><p>个人中心</p></a></li>
<li><a asp-action="LoginOut" asp-controller="user"><p>退出</p></a></li>
}
else
{
<li><a asp-action="WebLogin" asp-controller="user">登录</a></li>
<li><a asp-action="WebLogin" asp-controller="user"><p>登录</p></a></li>
}
<li><img src="~/m/img/close.png" class="btnClose"></li>
<li><p class="btnClose"><img src="~/m/img/close.png" ></p></li>
</ul>
</div>
<div class="mynav">

View File

@@ -48,24 +48,24 @@
<!-- 弹窗导航 -->
<div class="mask">
<ul class="layNav">
<li><a href="/">首页</a></li>
<li><a href="/product/index">产品购买 <span style="color: red;">活动</span></a> </li>
<li><a asp-action="index" asp-controller="LineList">线路表</a> </li>
<li><a asp-action="soft" asp-controller="product">软件下载</a> </li>
<li><a asp-action="index" asp-controller="article">教程&帮助</a></li>
<li><a href="/product/routeros">软路由购买</a></li>
<li><a href="http://vps.juip.com" style="color: red;">动态VPS</a></li>
<li>
@if (user != null)
{
<a asp-action="index" asp-controller="user">个人中心</a>
}
else
{
<a asp-action="WebLogin" asp-controller="user">登录</a>
}
</li>
<li><img src="~/m/img/close.png" class="btnClose"></li>
<li><a href="/"><p>首页</p></a></li>
<li><a href="/product/index"><p>产品购买 <span style="color: red;">活动</span></p></a> </li>
<li><a asp-action="index" asp-controller="LineList" asp-route-Catalog="1"><p>线路表</p></a> </li>
<li><a asp-action="soft" asp-controller="product"><p>软件下载</p></a> </li>
<li><a asp-action="index" asp-controller="article"><p>教程&帮助</p></a></li>
<li><a href="/product/routeros"><p>软路由购买</p></a></li>
<li><a href="http://vps.juip.com" style="color: red;"><p>动态VPS</p></a></li>
@if (user != null)
{
<li><a asp-action="index" asp-controller="user"><p>个人中心</p></a></li>
<li><a asp-action="LoginOut" asp-controller="user"><p>退出</p></a></li>
}
else
{
<li><a asp-action="WebLogin" asp-controller="user"><p>登录</p></a></li>
}
<li><p class="btnClose"><img src="~/m/img/close.png" ></p></li>
</ul>
</div>
<div class="mynav">

View File

@@ -140,7 +140,7 @@
<tr>
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-status="@(item.Status)" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
<td>@item.ProductName/@item.PackageName</td>
<td>@item.Account</td>
<td>@item.Account<br>@item.Pwd</td>
<td>
<button type="button" class="btnXq toDetail"
a-Id="@item.Id"

View File

@@ -239,7 +239,7 @@
<td v-if="site.nasname">{{site.status}}</td>
</tr>
</table>
<div v-if="!is_all && (product_id == 0)" class="text-center" style="margin-bottom: 20px;">
<div id="more" v-if="!is_all && (product_id == 0)" class="text-center" style="margin-bottom: 20px;">
<button @@click="get_index_data()" type="button" class="btn btn-link" style="font-size:25px;">
------------------------------------------更多
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-chevron-double-down" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
@@ -506,6 +506,7 @@
this.is_all = true;
},
search_all(){
$('#more').hide();
this.is_all = true;
if(!this.search_all_data){
this.select_product(0);
@@ -523,6 +524,7 @@
this.table_data = datalist;
},
search_product(){
$('#more').hide();
if(!this.search_product_data){
this.select_product(this.product_id);
return;

View File

@@ -483,7 +483,7 @@
@if(!string.IsNullOrWhiteSpace(ViewBag.errorTip))
{
<script>
alert('@ViewBag.errorTip')
alert('禁止续费,请联系客服')
history.go(-1);
</script>
}

View File

@@ -13,7 +13,7 @@
randomAccount = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(4).ToLower();
}
var product_id = Model.Product.Id;
if (product_id == 27) {
if (product_id == 27 || product_id == 6) {
randomPwd = ValidateCodeHelper.MakeNumCode(6).ToLower();
}
}
@@ -133,6 +133,10 @@
$(".tip").text("账户和密码不能为空");
return;
}
if (data.ProductId == 6 && data.Pwd.length<6) {
$(".tip").text("密码要大于6位");
return;
}
$.ajax({
type: 'POST',
url: '/api/course/v1/productaccount/CreateTestAccount',

View File

@@ -792,8 +792,9 @@
return true;
},
checkOnePwd() {
if (productId == 27) {
if (productId == 27 || productId == 6) {
if (this.OneBuyModel.Pwd.length < 7 || this.OneBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
alert("此产品密码必须大于6位");
this.OneChecker.PwdOk = false;
return false;
}
@@ -826,7 +827,7 @@
return true;
},
checkMorePwd() {
if (productId == 27) {
if (productId == 27 || productId == 6) {
if (this.MoreBuyModel.Pwd.length < 7 || this.MoreBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
alert("此产品密码必须大于6位");
this.MoreChecker.PwdOk = false;

View File

@@ -480,7 +480,9 @@
<div class="row">
<div class="col-lg-6">
<div class="zhanghu">
<div class="accout_tit"><span class="lineBar"></span>账户信息</div>
<div class="accout_tit"><span class="lineBar"></span>账户信息
@* <a href="/user/upload" style="float:right;">上传协议书</a> *@
</div>
<div class="row">
<div class="col-lg-6 accoutLeft">
<p>

View File

@@ -0,0 +1,25 @@
@{
Layout = "_UserLayout";
}
<div id="app">
<h3>上传使用协议</h3>
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="上传">
</form>
</div>
<script>
var vm = new Vue({
el:'#app',
data:{
},
created:function(){
},
methods:{
}
});
</script>

View File

@@ -51,6 +51,18 @@ namespace Hncore.Pass.Vpn.Service
return false;
}
public async Task<bool> CheckAccountagentExist(int productId, List<string> accouts)
{
foreach (var item in accouts)
{
var ret = await m_AgentService.Exist(productId, item);
await Task.Delay(50);
if (ret == true)
return true;
}
return false;
}
//检查参加活动账号是否已经存在
public async Task<bool> CheckMonthAccountExist(string account)
{