Compare commits
9 Commits
18fd62568c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7c3c038a8 | ||
|
|
d1e4fb05b8 | ||
| 2f14f45621 | |||
| a71bb476b1 | |||
| 16a690a3b4 | |||
|
|
2b7a4996e6 | ||
|
|
aada71df8a | ||
|
|
aeec6dbab6 | ||
| d51b2319dc |
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
DATABASE_PORT=3306
|
||||||
|
REDIS_PORT=6379
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -54,3 +54,7 @@ TestResult.xml
|
|||||||
nunit-*.xml
|
nunit-*.xml
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.volumes/
|
||||||
|
appsettings.Development.json
|
||||||
|
.env
|
||||||
|
|||||||
@@ -94,12 +94,14 @@ namespace Home.Controllers
|
|||||||
|
|
||||||
//判断测试卡使用次数是否超过限定次数 false表示免费没用完 true表示免费测试已经用完
|
//判断测试卡使用次数是否超过限定次数 false表示免费没用完 true表示免费测试已经用完
|
||||||
var test_flag = false;
|
var test_flag = false;
|
||||||
if ((user_Info.TestCountLimit!=0 && user_Info.TestCountLimit<=user_Info.UseTestCount) || (user_Info.TestCountLimit ==0 && user_Info.UseTestCount>2)) {
|
if ((user_Info.TestCountLimit != 0 && user_Info.TestCountLimit <= user_Info.UseTestCount) || (user_Info.TestCountLimit == 0 && user_Info.UseTestCount > 2))
|
||||||
|
{
|
||||||
test_flag = true;
|
test_flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
|
if ((user_Info.agent_id == 0 || (user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0)
|
||||||
|
{
|
||||||
//根据折扣设置价格
|
//根据折扣设置价格
|
||||||
|
|
||||||
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
||||||
@@ -107,50 +109,63 @@ namespace Home.Controllers
|
|||||||
foreach (var product in respList)
|
foreach (var product in respList)
|
||||||
{
|
{
|
||||||
product.Product.Content = "0";
|
product.Product.Content = "0";
|
||||||
product.Packages.ForEach(m => {
|
product.Packages.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
if (discount != null)
|
if (discount != null)
|
||||||
{
|
{
|
||||||
dis_price = m.LinePrice * discount.discount / 100;
|
dis_price = m.LinePrice * discount.discount / 100;
|
||||||
}
|
}
|
||||||
if(dis_price<m.Price){
|
if (dis_price < m.Price)
|
||||||
|
{
|
||||||
m.Price = dis_price;
|
m.Price = dis_price;
|
||||||
m.Title = discount.Remark;
|
m.Title = discount.Remark;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m.Title = "0";
|
m.Title = "0";
|
||||||
}
|
}
|
||||||
if(m.Price<m.MinPrice){
|
if (m.Price < m.MinPrice)
|
||||||
|
{
|
||||||
m.Price = m.MinPrice;
|
m.Price = m.MinPrice;
|
||||||
}
|
}
|
||||||
if (ExpiredProductAccountCount == 0 && (m.Id == 1012)){
|
if (ExpiredProductAccountCount == 0 && (m.Id == 1012))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
if (mogu_jihu == 0 && (m.Id==1188 || m.Id==1194 || m.Id==1200)){
|
if (mogu_jihu == 0 && (m.Id == 1188 || m.Id == 1194 || m.Id == 1200))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
if (jgday == 0 && (m.Id==1215 || m.Id==1221 || m.Id==1227)){
|
if (jgday == 0 && (m.Id == 1215 || m.Id == 1221 || m.Id == 1227))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
//判断测试卡是否收费
|
//判断测试卡是否收费
|
||||||
if (test_flag && (m.IsTest == 1)) {
|
if (test_flag && (m.IsTest == 1))
|
||||||
|
{
|
||||||
m.Price = 1.0M;
|
m.Price = 1.0M;
|
||||||
m.IsTest = 0;
|
m.IsTest = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//判断测试卡是否收费
|
//判断测试卡是否收费
|
||||||
if (test_flag) {
|
if (test_flag)
|
||||||
|
{
|
||||||
product.Product.Content = "1";
|
product.Product.Content = "1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//根据会员价
|
//根据会员价
|
||||||
var userPrices = await m_ProductUserPriceService.GetProductUserPrice(userInfo.UserId);
|
var userPrices = await m_ProductUserPriceService.GetProductUserPrice(userInfo.UserId);
|
||||||
|
|
||||||
foreach (var product in respList)
|
foreach (var product in respList)
|
||||||
{
|
{
|
||||||
product.Product.Content = "0";
|
product.Product.Content = "0";
|
||||||
product.Packages.ForEach(m => {
|
product.Packages.ForEach(m =>
|
||||||
|
{
|
||||||
m.Title = "0";
|
m.Title = "0";
|
||||||
|
|
||||||
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId);
|
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId);
|
||||||
@@ -158,38 +173,47 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
m.Price = userPrice.UserPrice;
|
m.Price = userPrice.UserPrice;
|
||||||
}
|
}
|
||||||
if (ExpiredProductAccountCount == 0 && (m.Id == 1012)){
|
if (ExpiredProductAccountCount == 0 && (m.Id == 1012))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mogu_jihu == 0 && ( m.Id==1188 || m.Id==1194 || m.Id==1200)){
|
if (mogu_jihu == 0 && (m.Id == 1188 || m.Id == 1194 || m.Id == 1200))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
if (jgday == 0 && (m.Id==1215 || m.Id==1221 || m.Id==1227)){
|
if (jgday == 0 && (m.Id == 1215 || m.Id == 1221 || m.Id == 1227))
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
//判断测试卡是否收费
|
//判断测试卡是否收费
|
||||||
if (test_flag && (m.IsTest == 1)) {
|
if (test_flag && (m.IsTest == 1))
|
||||||
|
{
|
||||||
m.Price = 1.0M;
|
m.Price = 1.0M;
|
||||||
m.IsTest = 0;
|
m.IsTest = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//判断测试卡是否收费
|
//判断测试卡是否收费
|
||||||
if (test_flag) {
|
if (test_flag)
|
||||||
|
{
|
||||||
product.Product.Content = "1";
|
product.Product.Content = "1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
foreach (var product in respList)
|
foreach (var product in respList)
|
||||||
{
|
{
|
||||||
product.Product.Content = "0";
|
product.Product.Content = "0";
|
||||||
product.Packages.ForEach(m => {
|
product.Packages.ForEach(m =>
|
||||||
|
{
|
||||||
m.Title = "0";
|
m.Title = "0";
|
||||||
|
|
||||||
|
|
||||||
if (m.Id == 1012 || m.Id==1188 || m.Id==1194 || m.Id==1200 || m.Id==1215 || m.Id==1221 || m.Id==1227){
|
if (m.Id == 1012 || m.Id == 1188 || m.Id == 1194 || m.Id == 1200 || m.Id == 1215 || m.Id == 1221 || m.Id == 1227)
|
||||||
|
{
|
||||||
m.Price = 0.1M;
|
m.Price = 0.1M;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -543,7 +567,8 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
var ordereNo = sArray["out_trade_no"];
|
var ordereNo = sArray["out_trade_no"];
|
||||||
var trade_status = sArray["trade_status"];
|
var trade_status = sArray["trade_status"];
|
||||||
if (trade_status == "TRADE_SUCCESS") {
|
if (trade_status == "TRADE_SUCCESS")
|
||||||
|
{
|
||||||
var order = await m_ProductOrderService.GetOrderByNo(ordereNo);
|
var order = await m_ProductOrderService.GetOrderByNo(ordereNo);
|
||||||
if (order.OrderState == OrderStatus.Complete || order.OrderState == OrderStatus.PayOk)
|
if (order.OrderState == OrderStatus.Complete || order.OrderState == OrderStatus.PayOk)
|
||||||
{
|
{
|
||||||
@@ -561,7 +586,8 @@ namespace Home.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
await Response.WriteAsync("success");
|
await Response.WriteAsync("success");
|
||||||
}catch(Exception ex)
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogHelper.Error("AliNotify.Exception", ex.Message);
|
LogHelper.Error("AliNotify.Exception", ex.Message);
|
||||||
await Response.WriteAsync("fail");
|
await Response.WriteAsync("fail");
|
||||||
@@ -642,7 +668,8 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
var ordereNo = sArray["out_trade_no"];
|
var ordereNo = sArray["out_trade_no"];
|
||||||
var trade_status = sArray["trade_status"];
|
var trade_status = sArray["trade_status"];
|
||||||
if (trade_status == "TRADE_SUCCESS") {
|
if (trade_status == "TRADE_SUCCESS")
|
||||||
|
{
|
||||||
var order = await m_ProductOrderService.GetOrderByNo(ordereNo);
|
var order = await m_ProductOrderService.GetOrderByNo(ordereNo);
|
||||||
if (order.OrderState == OrderStatus.Complete || order.OrderState == OrderStatus.PayOk)
|
if (order.OrderState == OrderStatus.Complete || order.OrderState == OrderStatus.PayOk)
|
||||||
{
|
{
|
||||||
@@ -731,10 +758,13 @@ namespace Home.Controllers
|
|||||||
var userId = this.Request.GetUserInfo().UserId;
|
var userId = this.Request.GetUserInfo().UserId;
|
||||||
var product = new ProductEntity();
|
var product = new ProductEntity();
|
||||||
var package = new ProductPackageEntity();
|
var package = new ProductPackageEntity();
|
||||||
if (id==1034||id==1040){
|
if (id == 1034 || id == 1040)
|
||||||
|
{
|
||||||
package = await m_ProductPackageService.Query(m => m.Id == id).FirstOrDefaultAsync();
|
package = await m_ProductPackageService.Query(m => m.Id == id).FirstOrDefaultAsync();
|
||||||
product = await m_ProductService.GetById(package.ProductId);
|
product = await m_ProductService.GetById(package.ProductId);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
product = await m_ProductService.GetById(id);
|
product = await m_ProductService.GetById(id);
|
||||||
package = await m_ProductPackageService.Query(m => m.IsTest == 1 && m.ProductId == id).FirstOrDefaultAsync();
|
package = await m_ProductPackageService.Query(m => m.IsTest == 1 && m.ProductId == id).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
@@ -754,10 +784,13 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
var product = new ProductEntity();
|
var product = new ProductEntity();
|
||||||
var package = new ProductPackageEntity();
|
var package = new ProductPackageEntity();
|
||||||
if (id==1034||id==1040||id==89||id==1094||id==1103||id==1097||id==60||id==1114||id==1115||id==1121||id==1127||id==1133||id==1187||id==1193||id==1199){
|
if (id == 1034 || id == 1040 || id == 89 || id == 1094 || id == 1103 || id == 1097 || id == 60 || id == 1114 || id == 1115 || id == 1121 || id == 1127 || id == 1133 || id == 1187 || id == 1193 || id == 1199)
|
||||||
|
{
|
||||||
package = await m_ProductPackageService.Query(m => m.Id == id).FirstOrDefaultAsync();
|
package = await m_ProductPackageService.Query(m => m.Id == id).FirstOrDefaultAsync();
|
||||||
product = await m_ProductService.GetById(package.ProductId);
|
product = await m_ProductService.GetById(package.ProductId);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
product = await m_ProductService.GetById(id);
|
product = await m_ProductService.GetById(id);
|
||||||
package = await m_ProductPackageService.Query(m => m.IsTest == 1 && m.ProductId == id).FirstOrDefaultAsync();
|
package = await m_ProductPackageService.Query(m => m.IsTest == 1 && m.ProductId == id).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
@@ -792,6 +825,7 @@ namespace Home.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IActionResult> Http()
|
public async Task<IActionResult> Http()
|
||||||
{
|
{
|
||||||
|
ViewData["BaseUrl"] = m_Configuration["BackendUrl"];
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@@ -824,14 +858,17 @@ namespace Home.Controllers
|
|||||||
var jgday = user_Info.jgday;
|
var jgday = user_Info.jgday;
|
||||||
|
|
||||||
var dis_price = 1000000M;
|
var dis_price = 1000000M;
|
||||||
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
|
if ((user_Info.agent_id == 0 || (user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0)
|
||||||
|
{
|
||||||
//根据折扣设置价格
|
//根据折扣设置价格
|
||||||
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
||||||
if (discount != null)
|
if (discount != null)
|
||||||
{
|
{
|
||||||
dis_price = package.LinePrice * discount.discount / 100;
|
dis_price = package.LinePrice * discount.discount / 100;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//根据会员价
|
//根据会员价
|
||||||
var userPrice = await m_ProductUserPriceService.GetPackageUserPrice(package.Id, userId);
|
var userPrice = await m_ProductUserPriceService.GetPackageUserPrice(package.Id, userId);
|
||||||
if (userPrice != null && userPrice.UserPrice > 0)
|
if (userPrice != null && userPrice.UserPrice > 0)
|
||||||
@@ -839,22 +876,27 @@ namespace Home.Controllers
|
|||||||
dis_price = userPrice.UserPrice;
|
dis_price = userPrice.UserPrice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(dis_price<package.Price){
|
if (dis_price < package.Price)
|
||||||
|
{
|
||||||
package.Price = dis_price;
|
package.Price = dis_price;
|
||||||
}
|
}
|
||||||
if(package.Price<package.MinPrice){
|
if (package.Price < package.MinPrice)
|
||||||
|
{
|
||||||
package.Price = package.MinPrice;
|
package.Price = package.MinPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExpiredProductAccountCount == 0 &&(package.Id == 1012)){
|
if (ExpiredProductAccountCount == 0 && (package.Id == 1012))
|
||||||
|
{
|
||||||
package.Price = 0.1M;
|
package.Price = 0.1M;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mogu_jihu == 0 &&(package.Id == 1188 || package.Id == 1194 || package.Id == 1200)){
|
if (mogu_jihu == 0 && (package.Id == 1188 || package.Id == 1194 || package.Id == 1200))
|
||||||
|
{
|
||||||
package.Price = 0.1M;
|
package.Price = 0.1M;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jgday == 0 && (package.Id==1215 || package.Id==1221 || package.Id==1227)){
|
if (jgday == 0 && (package.Id == 1215 || package.Id == 1221 || package.Id == 1227))
|
||||||
|
{
|
||||||
package.Price = 0.1M;
|
package.Price = 0.1M;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -884,7 +926,8 @@ namespace Home.Controllers
|
|||||||
var accountList = await m_ProductAccountService.GetAccounts(accounts);
|
var accountList = await m_ProductAccountService.GetAccounts(accounts);
|
||||||
|
|
||||||
var flag = true;
|
var flag = true;
|
||||||
if (productId == 26 || productId == 14) {
|
if (productId == 26 || productId == 14)
|
||||||
|
{
|
||||||
flag = await m_ProductAccountService.CheckAccountagentExist(productId, accounts.Split(',').ToList());
|
flag = await m_ProductAccountService.CheckAccountagentExist(productId, accounts.Split(',').ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -907,66 +950,82 @@ namespace Home.Controllers
|
|||||||
//0 无状态 1:尊享 2:高级 3:普通
|
//0 无状态 1:尊享 2:高级 3:普通
|
||||||
var pro_type_flag = 0;
|
var pro_type_flag = 0;
|
||||||
var pro_type_temp = 0;
|
var pro_type_temp = 0;
|
||||||
if (productId == 14) {
|
if (productId == 14)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<1034) {
|
if (m.PackageId < 1034)
|
||||||
|
{
|
||||||
pro_type_flag = 1;
|
pro_type_flag = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1034&&m.PackageId<1040) {
|
if (m.PackageId > 1034 && m.PackageId < 1040)
|
||||||
|
{
|
||||||
pro_type_flag = 2;
|
pro_type_flag = 2;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1040&&m.PackageId<1046) {
|
if (m.PackageId > 1040 && m.PackageId < 1046)
|
||||||
|
{
|
||||||
pro_type_flag = 3;
|
pro_type_flag = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pro_type_temp==0){
|
if (pro_type_temp == 0)
|
||||||
|
{
|
||||||
pro_type_temp = pro_type_flag;
|
pro_type_temp = pro_type_flag;
|
||||||
}
|
}
|
||||||
if (pro_type_temp!=pro_type_flag){
|
if (pro_type_temp != pro_type_flag)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "天天不同类型不能同时续费";
|
ViewBag.errorTip = "天天不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "天天不同类型不能同时续费"){
|
if (ViewBag.errorTip == "天天不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//0 无状态 1:尊享 2:高级 3:普通
|
//0 无状态 1:尊享 2:高级 3:普通
|
||||||
var pro_type_flag_liebao = 0;
|
var pro_type_flag_liebao = 0;
|
||||||
var pro_type_temp_liebao = 0;
|
var pro_type_temp_liebao = 0;
|
||||||
if (productId == 26) {
|
if (productId == 26)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<1097) {
|
if (m.PackageId < 1097)
|
||||||
|
{
|
||||||
pro_type_flag_liebao = 1;
|
pro_type_flag_liebao = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1096&&m.PackageId<1103) {
|
if (m.PackageId > 1096 && m.PackageId < 1103)
|
||||||
|
{
|
||||||
pro_type_flag_liebao = 2;
|
pro_type_flag_liebao = 2;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1103&&m.PackageId<1109) {
|
if (m.PackageId > 1103 && m.PackageId < 1109)
|
||||||
|
{
|
||||||
pro_type_flag_liebao = 3;
|
pro_type_flag_liebao = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pro_type_temp_liebao==0){
|
if (pro_type_temp_liebao == 0)
|
||||||
|
{
|
||||||
pro_type_temp_liebao = pro_type_flag_liebao;
|
pro_type_temp_liebao = pro_type_flag_liebao;
|
||||||
}
|
}
|
||||||
if (pro_type_temp_liebao!=pro_type_flag_liebao){
|
if (pro_type_temp_liebao != pro_type_flag_liebao)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "猎豹不同类型不能同时续费";
|
ViewBag.errorTip = "猎豹不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "猎豹不同类型不能同时续费"){
|
if (ViewBag.errorTip == "猎豹不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -974,33 +1033,41 @@ namespace Home.Controllers
|
|||||||
//0 无状态 1:尊享 2:高级 3:普通
|
//0 无状态 1:尊享 2:高级 3:普通
|
||||||
var pro_type_flag_jihu = 0;
|
var pro_type_flag_jihu = 0;
|
||||||
var pro_type_temp_jihu = 0;
|
var pro_type_temp_jihu = 0;
|
||||||
if (productId == 29) {
|
if (productId == 29)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<1193 || m.PackageId>1204&&m.PackageId<1208) {
|
if (m.PackageId < 1193 || m.PackageId > 1204 && m.PackageId < 1208)
|
||||||
|
{
|
||||||
pro_type_flag_jihu = 1;
|
pro_type_flag_jihu = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1192&&m.PackageId<1199 || m.PackageId>1207&&m.PackageId<1211) {
|
if (m.PackageId > 1192 && m.PackageId < 1199 || m.PackageId > 1207 && m.PackageId < 1211)
|
||||||
|
{
|
||||||
pro_type_flag_jihu = 2;
|
pro_type_flag_jihu = 2;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1199&&m.PackageId<1205 || m.PackageId>1210&&m.PackageId<1214) {
|
if (m.PackageId > 1199 && m.PackageId < 1205 || m.PackageId > 1210 && m.PackageId < 1214)
|
||||||
|
{
|
||||||
pro_type_flag_jihu = 3;
|
pro_type_flag_jihu = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pro_type_temp_jihu==0){
|
if (pro_type_temp_jihu == 0)
|
||||||
|
{
|
||||||
pro_type_temp_jihu = pro_type_flag_jihu;
|
pro_type_temp_jihu = pro_type_flag_jihu;
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jihu!=pro_type_flag_jihu){
|
if (pro_type_temp_jihu != pro_type_flag_jihu)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "不同类型不能同时续费";
|
ViewBag.errorTip = "不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "不同类型不能同时续费"){
|
if (ViewBag.errorTip == "不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1008,68 +1075,85 @@ namespace Home.Controllers
|
|||||||
//0 无状态 1:尊享 2:高级 3:普通
|
//0 无状态 1:尊享 2:高级 3:普通
|
||||||
var pro_type_flag_jiguang = 0;
|
var pro_type_flag_jiguang = 0;
|
||||||
var pro_type_temp_jiguang = 0;
|
var pro_type_temp_jiguang = 0;
|
||||||
if (productId == 3) {
|
if (productId == 3)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<1220 || m.PackageId>1232&&m.PackageId<1235) {
|
if (m.PackageId < 1220 || m.PackageId > 1232 && m.PackageId < 1235)
|
||||||
|
{
|
||||||
pro_type_flag_jiguang = 1;
|
pro_type_flag_jiguang = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1219&&m.PackageId<1226 || m.PackageId>1234&&m.PackageId<1238) {
|
if (m.PackageId > 1219 && m.PackageId < 1226 || m.PackageId > 1234 && m.PackageId < 1238)
|
||||||
|
{
|
||||||
pro_type_flag_jiguang = 2;
|
pro_type_flag_jiguang = 2;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1225&&m.PackageId<1232 || m.PackageId>1237&&m.PackageId<1241) {
|
if (m.PackageId > 1225 && m.PackageId < 1232 || m.PackageId > 1237 && m.PackageId < 1241)
|
||||||
|
{
|
||||||
pro_type_flag_jiguang = 3;
|
pro_type_flag_jiguang = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pro_type_temp_jiguang==0){
|
if (pro_type_temp_jiguang == 0)
|
||||||
|
{
|
||||||
pro_type_temp_jiguang = pro_type_flag_jiguang;
|
pro_type_temp_jiguang = pro_type_flag_jiguang;
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jiguang!=pro_type_flag_jiguang){
|
if (pro_type_temp_jiguang != pro_type_flag_jiguang)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "不同类型不能同时续费";
|
ViewBag.errorTip = "不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "不同类型不能同时续费"){
|
if (ViewBag.errorTip == "不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//0 无状态 1:1m 5m 3:10m 4:20m
|
//0 无状态 1:1m 5m 3:10m 4:20m
|
||||||
var pro_type_flag_qilindongtai = 0;
|
var pro_type_flag_qilindongtai = 0;
|
||||||
var pro_type_temp_qilindongtai = 0;
|
var pro_type_temp_qilindongtai = 0;
|
||||||
if (productId == 27) {
|
if (productId == 27)
|
||||||
|
{
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<1121) {
|
if (m.PackageId < 1121)
|
||||||
|
{
|
||||||
pro_type_flag_qilindongtai = 1;
|
pro_type_flag_qilindongtai = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1121&&m.PackageId<1127) {
|
if (m.PackageId > 1121 && m.PackageId < 1127)
|
||||||
|
{
|
||||||
pro_type_flag_qilindongtai = 2;
|
pro_type_flag_qilindongtai = 2;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1127&&m.PackageId<1133) {
|
if (m.PackageId > 1127 && m.PackageId < 1133)
|
||||||
|
{
|
||||||
pro_type_flag_qilindongtai = 3;
|
pro_type_flag_qilindongtai = 3;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1133&&m.PackageId<1139) {
|
if (m.PackageId > 1133 && m.PackageId < 1139)
|
||||||
|
{
|
||||||
pro_type_flag_qilindongtai = 4;
|
pro_type_flag_qilindongtai = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (pro_type_temp_qilindongtai==0){
|
if (pro_type_temp_qilindongtai == 0)
|
||||||
|
{
|
||||||
pro_type_temp_qilindongtai = pro_type_flag_qilindongtai;
|
pro_type_temp_qilindongtai = pro_type_flag_qilindongtai;
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai!=pro_type_flag_qilindongtai){
|
if (pro_type_temp_qilindongtai != pro_type_flag_qilindongtai)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "麒麟不同类型不能同时续费";
|
ViewBag.errorTip = "麒麟不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "麒麟不同类型不能同时续费"){
|
if (ViewBag.errorTip == "麒麟不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1077,30 +1161,37 @@ namespace Home.Controllers
|
|||||||
//0 无状态 1:尊享 2:高级 3:普通
|
//0 无状态 1:尊享 2:高级 3:普通
|
||||||
var pro_type_flag_xianfeng = 0;
|
var pro_type_flag_xianfeng = 0;
|
||||||
var pro_type_temp_xianfeng = 0;
|
var pro_type_temp_xianfeng = 0;
|
||||||
if (productId == 6) {
|
if (productId == 6)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
accountList.ForEach(m => {
|
accountList.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (m.PackageId<61) {
|
if (m.PackageId < 61)
|
||||||
|
{
|
||||||
pro_type_flag_xianfeng = 1;
|
pro_type_flag_xianfeng = 1;
|
||||||
}
|
}
|
||||||
if (m.PackageId>1108&&m.PackageId<1115) {
|
if (m.PackageId > 1108 && m.PackageId < 1115)
|
||||||
|
{
|
||||||
pro_type_flag_xianfeng = 2;
|
pro_type_flag_xianfeng = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pro_type_temp_xianfeng==0){
|
if (pro_type_temp_xianfeng == 0)
|
||||||
|
{
|
||||||
pro_type_temp_xianfeng = pro_type_flag_xianfeng;
|
pro_type_temp_xianfeng = pro_type_flag_xianfeng;
|
||||||
}
|
}
|
||||||
if (pro_type_temp_xianfeng!=pro_type_flag_xianfeng){
|
if (pro_type_temp_xianfeng != pro_type_flag_xianfeng)
|
||||||
|
{
|
||||||
ViewBag.errorTip = "先锋不同类型不能同时续费";
|
ViewBag.errorTip = "先锋不同类型不能同时续费";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViewBag.errorTip == "先锋不同类型不能同时续费"){
|
if (ViewBag.errorTip == "先锋不同类型不能同时续费")
|
||||||
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1120,9 +1211,11 @@ namespace Home.Controllers
|
|||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (productId == 28) {
|
if (productId == 28)
|
||||||
|
{
|
||||||
var package_type = "";
|
var package_type = "";
|
||||||
if(package_name.Contains("-")){
|
if (package_name.Contains("-"))
|
||||||
|
{
|
||||||
string[] arrStr = package_name.Split('-');
|
string[] arrStr = package_name.Split('-');
|
||||||
package_type = arrStr[0] + "-" + arrStr[1] + "-" + arrStr[2];
|
package_type = arrStr[0] + "-" + arrStr[1] + "-" + arrStr[2];
|
||||||
}
|
}
|
||||||
@@ -1134,13 +1227,15 @@ namespace Home.Controllers
|
|||||||
//从user表获取用户信息
|
//从user表获取用户信息
|
||||||
var user_Info = await m_UserService.GetById(userInfo.UserId);
|
var user_Info = await m_UserService.GetById(userInfo.UserId);
|
||||||
|
|
||||||
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
|
if ((user_Info.agent_id == 0 || (user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0)
|
||||||
|
{
|
||||||
//根据折扣设置价格
|
//根据折扣设置价格
|
||||||
|
|
||||||
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
||||||
var dis_price = 1000000.0M;
|
var dis_price = 1000000.0M;
|
||||||
|
|
||||||
respList.Packages.ForEach(m => {
|
respList.Packages.ForEach(m =>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1148,95 +1243,136 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
dis_price = m.LinePrice * discount.discount / 100;
|
dis_price = m.LinePrice * discount.discount / 100;
|
||||||
}
|
}
|
||||||
if(dis_price<m.Price){
|
if (dis_price < m.Price)
|
||||||
|
{
|
||||||
m.Price = dis_price;
|
m.Price = dis_price;
|
||||||
m.Title = discount.Remark;
|
m.Title = discount.Remark;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m.Title = "9.5";
|
m.Title = "9.5";
|
||||||
if (m.ProductId == 1||m.ProductId == 2){
|
if (m.ProductId == 1 || m.ProductId == 2)
|
||||||
|
{
|
||||||
m.Title = "7.5";
|
m.Title = "7.5";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 18){
|
if (m.ProductId == 18)
|
||||||
|
{
|
||||||
m.Title = "7.5";
|
m.Title = "7.5";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 6||m.ProductId == 5){
|
if (m.ProductId == 6 || m.ProductId == 5)
|
||||||
|
{
|
||||||
m.Title = "9";
|
m.Title = "9";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 26||m.ProductId == 17){
|
if (m.ProductId == 23 || m.ProductId == 13 || m.ProductId == 14 || m.ProductId == 26 || m.ProductId == 17)
|
||||||
|
{
|
||||||
m.Title = "8";
|
m.Title = "8";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(m.Price<m.MinPrice){
|
if (m.Price < m.MinPrice)
|
||||||
|
{
|
||||||
m.Price = m.MinPrice;
|
m.Price = m.MinPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.ProductId == 14){
|
if (m.ProductId == 14)
|
||||||
if (pro_type_temp ==1 && m.Id<1034) {
|
{
|
||||||
|
if (pro_type_temp == 1 && m.Id < 1034)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp ==2 && m.Id>1034&&m.Id<1040) {
|
if (pro_type_temp == 2 && m.Id > 1034 && m.Id < 1040)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp ==3 && m.Id>1040&&m.Id<1046) {
|
if (pro_type_temp == 3 && m.Id > 1040 && m.Id < 1046)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 26){
|
}
|
||||||
if (pro_type_temp_liebao ==1 && m.Id<1097) {
|
else if (m.ProductId == 26)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_liebao == 1 && m.Id < 1097)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_liebao ==2 && m.Id>1097&&m.Id<1103) {
|
if (pro_type_temp_liebao == 2 && m.Id > 1097 && m.Id < 1103)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_liebao ==3 && m.Id>1103&&m.Id<1109) {
|
if (pro_type_temp_liebao == 3 && m.Id > 1103 && m.Id < 1109)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 29){
|
}
|
||||||
if (pro_type_temp_jihu ==1 && (m.Id<1193 || m.Id>1204&&m.Id<1208)) {
|
else if (m.ProductId == 29)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_jihu == 1 && (m.Id < 1193 || m.Id > 1204 && m.Id < 1208))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jihu ==2 && (m.Id>1192&&m.Id<1199 || m.Id>1207&&m.Id<1211)) {
|
if (pro_type_temp_jihu == 2 && (m.Id > 1192 && m.Id < 1199 || m.Id > 1207 && m.Id < 1211))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jihu ==3 && (m.Id>1199&&m.Id<1205 || m.Id>1210&&m.Id<1214)) {
|
if (pro_type_temp_jihu == 3 && (m.Id > 1199 && m.Id < 1205 || m.Id > 1210 && m.Id < 1214))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 3){
|
}
|
||||||
if (pro_type_temp_jiguang ==1 && (m.Id<1220 || m.Id>1232&&m.Id<1235)) {
|
else if (m.ProductId == 3)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_jiguang == 1 && (m.Id < 1220 || m.Id > 1232 && m.Id < 1235))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jiguang ==2 && (m.Id>1219&&m.Id<1226 || m.Id>1234&&m.Id<1238)) {
|
if (pro_type_temp_jiguang == 2 && (m.Id > 1219 && m.Id < 1226 || m.Id > 1234 && m.Id < 1238))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jiguang ==3 && (m.Id>1225&&m.Id<1232 || m.Id>1237&&m.Id<1241)) {
|
if (pro_type_temp_jiguang == 3 && (m.Id > 1225 && m.Id < 1232 || m.Id > 1237 && m.Id < 1241))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 27){
|
}
|
||||||
if (pro_type_temp_qilindongtai ==1 && m.Id<1121) {
|
else if (m.ProductId == 27)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_qilindongtai == 1 && m.Id < 1121)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==2 && m.Id>1121&&m.Id<1127) {
|
if (pro_type_temp_qilindongtai == 2 && m.Id > 1121 && m.Id < 1127)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==3 && m.Id>1127&&m.Id<1133) {
|
if (pro_type_temp_qilindongtai == 3 && m.Id > 1127 && m.Id < 1133)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==4 && m.Id>1133&&m.Id<1139) {
|
if (pro_type_temp_qilindongtai == 4 && m.Id > 1133 && m.Id < 1139)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 6){
|
}
|
||||||
if (pro_type_temp_xianfeng ==1 && m.Id<61) {
|
else if (m.ProductId == 6)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_xianfeng == 1 && m.Id < 61)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_xianfeng ==2 && m.Id>1108&&m.Id<1115) {
|
if (pro_type_temp_xianfeng == 2 && m.Id > 1108 && m.Id < 1115)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//根据会员价
|
//根据会员价
|
||||||
var userPrices = await m_ProductUserPriceService.GetProductUserPrice(id, userInfo.UserId);
|
var userPrices = await m_ProductUserPriceService.GetProductUserPrice(id, userInfo.UserId);
|
||||||
respList.Packages.ForEach(m =>
|
respList.Packages.ForEach(m =>
|
||||||
@@ -1244,16 +1380,20 @@ namespace Home.Controllers
|
|||||||
|
|
||||||
|
|
||||||
m.Title = "9.5";
|
m.Title = "9.5";
|
||||||
if (m.ProductId == 1||m.ProductId == 2){
|
if (m.ProductId == 1 || m.ProductId == 2)
|
||||||
|
{
|
||||||
m.Title = "7.5";
|
m.Title = "7.5";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 18){
|
if (m.ProductId == 18)
|
||||||
|
{
|
||||||
m.Title = "7.5";
|
m.Title = "7.5";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 6||m.ProductId == 5){
|
if (m.ProductId == 6 || m.ProductId == 5)
|
||||||
|
{
|
||||||
m.Title = "9";
|
m.Title = "9";
|
||||||
}
|
}
|
||||||
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
|
if (m.ProductId == 23 || m.ProductId == 13 || m.ProductId == 14 || m.ProductId == 17)
|
||||||
|
{
|
||||||
m.Title = "8";
|
m.Title = "8";
|
||||||
}
|
}
|
||||||
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id);
|
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id);
|
||||||
@@ -1262,67 +1402,98 @@ namespace Home.Controllers
|
|||||||
m.Price = userPrice.UserPrice;
|
m.Price = userPrice.UserPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.ProductId == 14){
|
if (m.ProductId == 14)
|
||||||
if (pro_type_temp ==1 && m.Id<1034) {
|
{
|
||||||
|
if (pro_type_temp == 1 && m.Id < 1034)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp ==2 && m.Id>1034&&m.Id<1040) {
|
if (pro_type_temp == 2 && m.Id > 1034 && m.Id < 1040)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp ==3 && m.Id>1040&&m.Id<1046) {
|
if (pro_type_temp == 3 && m.Id > 1040 && m.Id < 1046)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 26){
|
}
|
||||||
if (pro_type_temp_liebao ==1 && m.Id<1097) {
|
else if (m.ProductId == 26)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_liebao == 1 && m.Id < 1097)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_liebao ==2 && m.Id>1097&&m.Id<1103) {
|
if (pro_type_temp_liebao == 2 && m.Id > 1097 && m.Id < 1103)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_liebao ==3 && m.Id>1103&&m.Id<1109) {
|
if (pro_type_temp_liebao == 3 && m.Id > 1103 && m.Id < 1109)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 29){
|
}
|
||||||
if (pro_type_temp_jihu ==1 && (m.Id<1193 || m.Id>1204&&m.Id<1208)) {
|
else if (m.ProductId == 29)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_jihu == 1 && (m.Id < 1193 || m.Id > 1204 && m.Id < 1208))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jihu ==2 && (m.Id>1192&&m.Id<1199 || m.Id>1207&&m.Id<1211)) {
|
if (pro_type_temp_jihu == 2 && (m.Id > 1192 && m.Id < 1199 || m.Id > 1207 && m.Id < 1211))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jihu ==3 && (m.Id>1199&&m.Id<1205 || m.Id>1210&&m.Id<1214)) {
|
if (pro_type_temp_jihu == 3 && (m.Id > 1199 && m.Id < 1205 || m.Id > 1210 && m.Id < 1214))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 3){
|
}
|
||||||
if (pro_type_temp_jiguang ==1 && (m.Id<1220 || m.Id>1232&&m.Id<1235)) {
|
else if (m.ProductId == 3)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_jiguang == 1 && (m.Id < 1220 || m.Id > 1232 && m.Id < 1235))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jiguang ==2 && (m.Id>1219&&m.Id<1226 || m.Id>1234&&m.Id<1238)) {
|
if (pro_type_temp_jiguang == 2 && (m.Id > 1219 && m.Id < 1226 || m.Id > 1234 && m.Id < 1238))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_jiguang ==3 && (m.Id>1225&&m.Id<1232 || m.Id>1237&&m.Id<1241)) {
|
if (pro_type_temp_jiguang == 3 && (m.Id > 1225 && m.Id < 1232 || m.Id > 1237 && m.Id < 1241))
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 27){
|
}
|
||||||
if (pro_type_temp_qilindongtai ==1 && m.Id<1121) {
|
else if (m.ProductId == 27)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_qilindongtai == 1 && m.Id < 1121)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==2 && m.Id>1121&&m.Id<1127) {
|
if (pro_type_temp_qilindongtai == 2 && m.Id > 1121 && m.Id < 1127)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==3 && m.Id>1127&&m.Id<1133) {
|
if (pro_type_temp_qilindongtai == 3 && m.Id > 1127 && m.Id < 1133)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_qilindongtai ==4 && m.Id>1133&&m.Id<1139) {
|
if (pro_type_temp_qilindongtai == 4 && m.Id > 1133 && m.Id < 1139)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
}else if(m.ProductId == 6){
|
}
|
||||||
if (pro_type_temp_xianfeng ==1 && m.Id<61) {
|
else if (m.ProductId == 6)
|
||||||
|
{
|
||||||
|
if (pro_type_temp_xianfeng == 1 && m.Id < 61)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
if (pro_type_temp_xianfeng ==2 && m.Id>1108&&m.Id<1115) {
|
if (pro_type_temp_xianfeng == 2 && m.Id > 1108 && m.Id < 1115)
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
package_temp.Add(m);
|
package_temp.Add(m);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1360,14 +1531,17 @@ namespace Home.Controllers
|
|||||||
|
|
||||||
var user_Info = await m_UserService.GetById(userId);
|
var user_Info = await m_UserService.GetById(userId);
|
||||||
var dis_price = 1000000M;
|
var dis_price = 1000000M;
|
||||||
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
|
if ((user_Info.agent_id == 0 || (user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0)
|
||||||
|
{
|
||||||
//根据折扣设置价格
|
//根据折扣设置价格
|
||||||
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
|
||||||
if (discount != null)
|
if (discount != null)
|
||||||
{
|
{
|
||||||
dis_price = package.LinePrice * discount.discount / 100;
|
dis_price = package.LinePrice * discount.discount / 100;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//根据会员价
|
//根据会员价
|
||||||
var userPrice = await m_ProductUserPriceService.GetPackageUserPrice(packageId, userId);
|
var userPrice = await m_ProductUserPriceService.GetPackageUserPrice(packageId, userId);
|
||||||
if (userPrice != null && userPrice.UserPrice > 0)
|
if (userPrice != null && userPrice.UserPrice > 0)
|
||||||
@@ -1375,11 +1549,13 @@ namespace Home.Controllers
|
|||||||
dis_price = userPrice.UserPrice;
|
dis_price = userPrice.UserPrice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(dis_price<package.Price){
|
if (dis_price < package.Price)
|
||||||
|
{
|
||||||
package.Price = dis_price;
|
package.Price = dis_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(package.Price<package.MinPrice){
|
if (package.Price < package.MinPrice)
|
||||||
|
{
|
||||||
package.Price = package.MinPrice;
|
package.Price = package.MinPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -345,6 +345,18 @@ namespace Home.Controllers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, AllowAnonymous]
|
[HttpPost, AllowAnonymous]
|
||||||
public async Task<ApiResult> SendPhoneCodevefy(string phone, string key)
|
public async Task<ApiResult> SendPhoneCodevefy(string phone, string key)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new ApiResult(ResultCode.C_SUCCESS, "验证码已发送到您的手机");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送手机验证码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, AllowAnonymous]
|
||||||
|
public async Task<ApiResult> SendPhonesCodevefy(string phone, string key)
|
||||||
{
|
{
|
||||||
key = $"{key}:{phone}";
|
key = $"{key}:{phone}";
|
||||||
|
|
||||||
@@ -528,15 +540,24 @@ namespace Home.Controllers
|
|||||||
|
|
||||||
if (request.ExpiredDay > -100)
|
if (request.ExpiredDay > -100)
|
||||||
{
|
{
|
||||||
if (request.ExpiredDay > 0){
|
if (request.ExpiredDay > 0)
|
||||||
|
{
|
||||||
exp = exp.And(m => Math.Ceiling((m.EndTime - DateTime.Now).Value.TotalDays) <= request.ExpiredDay && m.EndTime > DateTime.Now);
|
exp = exp.And(m => Math.Ceiling((m.EndTime - DateTime.Now).Value.TotalDays) <= request.ExpiredDay && m.EndTime > DateTime.Now);
|
||||||
} else if (request.ExpiredDay < 0 && request.ExpiredDay>-4) {
|
}
|
||||||
|
else if (request.ExpiredDay < 0 && request.ExpiredDay > -4)
|
||||||
|
{
|
||||||
exp = exp.And(m => Math.Ceiling((DateTime.Now - m.EndTime).Value.TotalDays) <= Math.Abs(request.ExpiredDay) && m.EndTime < DateTime.Now);
|
exp = exp.And(m => Math.Ceiling((DateTime.Now - m.EndTime).Value.TotalDays) <= Math.Abs(request.ExpiredDay) && m.EndTime < DateTime.Now);
|
||||||
} else if (request.ExpiredDay==-4) {
|
}
|
||||||
|
else if (request.ExpiredDay == -4)
|
||||||
|
{
|
||||||
exp = exp.And(m => Math.Ceiling((m.EndTime - DateTime.Now).Value.TotalDays) <= -4);
|
exp = exp.And(m => Math.Ceiling((m.EndTime - DateTime.Now).Value.TotalDays) <= -4);
|
||||||
} else if (request.ExpiredDay==-5) {
|
}
|
||||||
|
else if (request.ExpiredDay == -5)
|
||||||
|
{
|
||||||
exp = exp.And(m => m.EndTime > DateTime.Now);
|
exp = exp.And(m => m.EndTime > DateTime.Now);
|
||||||
} else if (request.ExpiredDay==-6) {
|
}
|
||||||
|
else if (request.ExpiredDay == -6)
|
||||||
|
{
|
||||||
exp = exp.And(m => m.EndTime < DateTime.Now);
|
exp = exp.And(m => m.EndTime < DateTime.Now);
|
||||||
}
|
}
|
||||||
exp = exp.And(m => m.PackageName != "测试卡");
|
exp = exp.And(m => m.PackageName != "测试卡");
|
||||||
@@ -631,6 +652,7 @@ namespace Home.Controllers
|
|||||||
public IActionResult HttpPackageList()
|
public IActionResult HttpPackageList()
|
||||||
{
|
{
|
||||||
var userId = this.Request.GetUserInfo().UserId;
|
var userId = this.Request.GetUserInfo().UserId;
|
||||||
|
ViewData["BaseUrl"] = m_Configuration["BackendUrl"];
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@@ -655,6 +677,13 @@ namespace Home.Controllers
|
|||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[UserAuth]
|
||||||
|
public IActionResult HttpWhiteIpSU()
|
||||||
|
{
|
||||||
|
ViewData["BaseUrl"] = m_Configuration["BackendUrl"];
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送手机验证码
|
/// 发送手机验证码
|
||||||
@@ -681,7 +710,8 @@ namespace Home.Controllers
|
|||||||
var notifyOrder = data.FromJsonTo<TaoBaoNotifyModel>();
|
var notifyOrder = data.FromJsonTo<TaoBaoNotifyModel>();
|
||||||
var taobaoEntity = notifyOrder.MapTo<TaoBaoOrderEntity>();
|
var taobaoEntity = notifyOrder.MapTo<TaoBaoOrderEntity>();
|
||||||
|
|
||||||
if((notifyOrder.SellerNick == "聚ip商城动态ip代理" || notifyOrder.SellerNick == "老鹰动态pptp")||notifyOrder.SellerNick == "强子pptp动态"||notifyOrder.SellerNick == "可乐开发商"){
|
if ((notifyOrder.SellerNick == "聚ip商城动态ip代理" || notifyOrder.SellerNick == "老鹰动态pptp") || notifyOrder.SellerNick == "强子pptp动态" || notifyOrder.SellerNick == "可乐开发商")
|
||||||
|
{
|
||||||
|
|
||||||
taobaoEntity.Phone = "none";
|
taobaoEntity.Phone = "none";
|
||||||
taobaoEntity.SkuPropertiesName = notifyOrder.Orders.FirstOrDefault()?.SkuPropertiesName;
|
taobaoEntity.SkuPropertiesName = notifyOrder.Orders.FirstOrDefault()?.SkuPropertiesName;
|
||||||
@@ -727,10 +757,13 @@ namespace Home.Controllers
|
|||||||
msg = "您好,打开网址:juip.com,登录会员名:" + phone + "(" + notifyOrder.Payment + "元已充值到此账户),密码:" + pas_result + "。这个会员名和密码不能直接使用,是用来登录官网的。登录后点击网站上方的-产品购买,即可完成开通或续费。在官网购买的账号密码可以直接使用。恭喜您本次获得优惠券(满4元减1元,满20元减3元,满54元减5元,满130元减15元,满490元减30元),各一张。欢迎您多来淘宝下单(人工客服在线时间:上午八点到晚上十一点半)";
|
msg = "您好,打开网址:juip.com,登录会员名:" + phone + "(" + notifyOrder.Payment + "元已充值到此账户),密码:" + pas_result + "。这个会员名和密码不能直接使用,是用来登录官网的。登录后点击网站上方的-产品购买,即可完成开通或续费。在官网购买的账号密码可以直接使用。恭喜您本次获得优惠券(满4元减1元,满20元减3元,满54元减5元,满130元减15元,满490元减30元),各一张。欢迎您多来淘宝下单(人工客服在线时间:上午八点到晚上十一点半)";
|
||||||
if (ret.Code != ResultCode.C_SUCCESS) return msg;
|
if (ret.Code != ResultCode.C_SUCCESS) return msg;
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
phone = userEntity.Phone;
|
phone = userEntity.Phone;
|
||||||
|
|
||||||
if(userEntity.TaoBao == null){
|
if (userEntity.TaoBao == null)
|
||||||
|
{
|
||||||
userEntity.TaoBao = notifyOrder.BuyerNick;
|
userEntity.TaoBao = notifyOrder.BuyerNick;
|
||||||
await m_UserService.Update(userEntity);
|
await m_UserService.Update(userEntity);
|
||||||
}
|
}
|
||||||
@@ -792,34 +825,46 @@ namespace Home.Controllers
|
|||||||
var refundInfos = datainfo.FromJsonTo<TaoBaoRefundModel>();
|
var refundInfos = datainfo.FromJsonTo<TaoBaoRefundModel>();
|
||||||
LogHelper.Info("淘宝参数回调", $"json={datainfo.ToJson()}");
|
LogHelper.Info("淘宝参数回调", $"json={datainfo.ToJson()}");
|
||||||
var info = "";
|
var info = "";
|
||||||
if (aopic == 2){
|
if (aopic == 2)
|
||||||
|
{
|
||||||
info = await m_TaoBaoService.ReceivedMsg(this.Request, process);
|
info = await m_TaoBaoService.ReceivedMsg(this.Request, process);
|
||||||
} else if(aopic == 256){//退款
|
}
|
||||||
|
else if (aopic == 256)
|
||||||
|
{//退款
|
||||||
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
||||||
if (his_order == null){
|
if (his_order == null)
|
||||||
|
{
|
||||||
info = await m_TaoBaoRefundService.ReceivedRefundMsg(this.Request, refunds);
|
info = await m_TaoBaoRefundService.ReceivedRefundMsg(this.Request, refunds);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
his_order.status = 0;
|
his_order.status = 0;
|
||||||
his_order.RefundFee = refundInfos.RefundFee;
|
his_order.RefundFee = refundInfos.RefundFee;
|
||||||
his_order.Modified = refundInfos.Modified;
|
his_order.Modified = refundInfos.Modified;
|
||||||
await m_TaoBaoRefundService.Update(his_order);
|
await m_TaoBaoRefundService.Update(his_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(aopic == 65536){//卖家同意退款
|
}
|
||||||
|
else if (aopic == 65536)
|
||||||
|
{//卖家同意退款
|
||||||
|
|
||||||
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
||||||
his_order.status = 1;
|
his_order.status = 1;
|
||||||
|
|
||||||
await m_TaoBaoRefundService.Update(his_order);
|
await m_TaoBaoRefundService.Update(his_order);
|
||||||
|
|
||||||
}else if(aopic == 262144){//拒绝退款
|
}
|
||||||
|
else if (aopic == 262144)
|
||||||
|
{//拒绝退款
|
||||||
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
||||||
his_order.status = 2;
|
his_order.status = 2;
|
||||||
|
|
||||||
|
|
||||||
await m_TaoBaoRefundService.Update(his_order);
|
await m_TaoBaoRefundService.Update(his_order);
|
||||||
|
|
||||||
}else if(aopic == 32768){//关闭
|
}
|
||||||
|
else if (aopic == 32768)
|
||||||
|
{//关闭
|
||||||
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
var his_order = m_TaoBaoRefundService.Query(m => m.Tid == refundInfos.Tid).FirstOrDefault();
|
||||||
his_order.status = 3;
|
his_order.status = 3;
|
||||||
|
|
||||||
@@ -1306,7 +1351,8 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
var ordereNo = sArray["out_trade_no"];
|
var ordereNo = sArray["out_trade_no"];
|
||||||
var trade_status = sArray["trade_status"];
|
var trade_status = sArray["trade_status"];
|
||||||
if (trade_status == "TRADE_SUCCESS") {
|
if (trade_status == "TRADE_SUCCESS")
|
||||||
|
{
|
||||||
var order = await m_ChargeService.GetOrderByNo(ordereNo);
|
var order = await m_ChargeService.GetOrderByNo(ordereNo);
|
||||||
if (order.OrderState == UOrderStatus.Complete || order.OrderState == UOrderStatus.PayOk)
|
if (order.OrderState == UOrderStatus.Complete || order.OrderState == UOrderStatus.PayOk)
|
||||||
{
|
{
|
||||||
@@ -1406,7 +1452,8 @@ namespace Home.Controllers
|
|||||||
{
|
{
|
||||||
var ordereNo = sArray["out_trade_no"];
|
var ordereNo = sArray["out_trade_no"];
|
||||||
var trade_status = sArray["trade_status"];
|
var trade_status = sArray["trade_status"];
|
||||||
if (trade_status == "TRADE_SUCCESS") {
|
if (trade_status == "TRADE_SUCCESS")
|
||||||
|
{
|
||||||
var order = await m_ChargeService.GetOrderByNo(ordereNo);
|
var order = await m_ChargeService.GetOrderByNo(ordereNo);
|
||||||
if (order.OrderState == UOrderStatus.Complete || order.OrderState == UOrderStatus.PayOk)
|
if (order.OrderState == UOrderStatus.Complete || order.OrderState == UOrderStatus.PayOk)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:5000"
|
"applicationUrl": "http://0.0.0.0:5000"
|
||||||
},
|
},
|
||||||
"Docker": {
|
"Docker": {
|
||||||
"commandName": "Docker",
|
"commandName": "Docker",
|
||||||
|
|||||||
@@ -845,7 +845,7 @@
|
|||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
||||||
this.order_info.password = (Math.floor(Math.random() * 1000) + 1);
|
this.order_info.password = (Math.floor(Math.random() * 1000000) + 1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
randomString(len) {
|
randomString(len) {
|
||||||
@@ -1077,8 +1077,8 @@
|
|||||||
alert('账号长度至少5位!');
|
alert('账号长度至少5位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.order_info.password.length < 3 && this.hasNumAndChar(this.order_info.password)) {
|
if (this.order_info.password.length < 6 && this.hasNumAndChar(this.order_info.password)) {
|
||||||
alert('密码长度至少3位!');
|
alert('密码长度至少6位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
if(name == '') { alert('手机号不能为空'); return; }
|
if(name == '') { alert('手机号不能为空'); return; }
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var url = '/User/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/User/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
if(name == '') { alert('手机号不能为空'); return; }
|
if(name == '') { alert('手机号不能为空'); return; }
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -610,7 +610,7 @@
|
|||||||
function getCode(_self) {
|
function getCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
var timerHandler;
|
var timerHandler;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -624,7 +624,7 @@
|
|||||||
function getFindCode(_self) {
|
function getFindCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#fusername").val()
|
var name = $("#fusername").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -221,6 +221,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-12 ">
|
||||||
|
<div class="boxes boxes-border-top text-left margin-top-30 clearfix">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h5 class="margin-top-0">白名单数量:</h5>
|
||||||
|
<div class="d-flex align-items-center" style="gap: 15px;">
|
||||||
|
<div class="btn-group" role="group">
|
||||||
|
<button type="button" v-on:click="dxwxl_whitelist_reduce()" :disabled="dxwxl_data.maxWhitelist <= 1" class="btn btn-new">-</button>
|
||||||
|
<button type="button" class="btn btn-default">{{ dxwxl_data.maxWhitelist }}</button>
|
||||||
|
<button type="button" v-on:click="dxwxl_whitelist_add()" :disabled="dxwxl_data.maxWhitelist >= 20" class="btn btn-new">+</button>
|
||||||
|
</div>
|
||||||
|
<span style="margin-left: 20px;">
|
||||||
|
您的白名单上限{{ dxwxl_data.maxWhitelist }}个,
|
||||||
|
<span v-if="dxwxl_data.maxWhitelist === 1">价格<span class="text-danger">无折扣</span></span>
|
||||||
|
<span v-else-if="dxwxl_data.maxWhitelist <= 5" class="text-danger">{{11 - dxwxl_data.maxWhitelist}}折</span>
|
||||||
|
<span v-else class="text-danger">6折</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-sm-12 ">
|
<div class="col-sm-12 ">
|
||||||
<div class="boxes boxes-border-top text-left margin-top-30 clearfix">
|
<div class="boxes boxes-border-top text-left margin-top-30 clearfix">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
@@ -700,7 +720,7 @@
|
|||||||
<script src="~/js/vue.js"></script>
|
<script src="~/js/vue.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var baseUrl = '@ViewData["BaseUrl"]';
|
||||||
var select_ip_num = 0;
|
var select_ip_num = 0;
|
||||||
|
|
||||||
$(document).on("ready", function(e) {
|
$(document).on("ready", function(e) {
|
||||||
@@ -806,6 +826,7 @@ $(document).on("ready", function(e) {
|
|||||||
durationType:5,
|
durationType:5,
|
||||||
periodType:1060,//必填,周期类型,1060-小时,1-按天,7-按周,30-按月,90-按季度
|
periodType:1060,//必填,周期类型,1060-小时,1-按天,7-按周,30-按月,90-按季度
|
||||||
periodAmount:1,//必填,购买周期,根据periodType来,例如按天,就是N天,按周就是N周
|
periodAmount:1,//必填,购买周期,根据periodType来,例如按天,就是N天,按周就是N周
|
||||||
|
maxWhitelist:1,//选填,变更无限量白名单数量,不填写会默认使用当前白名单数量
|
||||||
},
|
},
|
||||||
dxbt_data:{//短效包天
|
dxbt_data:{//短效包天
|
||||||
durationType:5,//必填,有效时长,5-1至5分钟,25-5至25分钟,180-25至180分钟,360-3至6小时
|
durationType:5,//必填,有效时长,5-1至5分钟,25-5至25分钟,180-25至180分钟,360-3至6小时
|
||||||
@@ -927,7 +948,7 @@ $(document).on("ready", function(e) {
|
|||||||
var that = this
|
var that = this
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/product/city',
|
url: `${baseUrl}/http/product/city`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async:false,
|
async:false,
|
||||||
data:this.game,
|
data:this.game,
|
||||||
@@ -941,7 +962,7 @@ $(document).on("ready", function(e) {
|
|||||||
var that = this
|
var that = this
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/product/game',
|
url: `${baseUrl}/http/product/game`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async:false,
|
async:false,
|
||||||
data:this.game,
|
data:this.game,
|
||||||
@@ -976,7 +997,7 @@ $(document).on("ready", function(e) {
|
|||||||
var that = this
|
var that = this
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/product/linecount',
|
url: `${baseUrl}/http/product/linecount`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async:false,
|
async:false,
|
||||||
data:this.game,
|
data:this.game,
|
||||||
@@ -1026,6 +1047,18 @@ $(document).on("ready", function(e) {
|
|||||||
this.dxwxl_data.periodAmount++;
|
this.dxwxl_data.periodAmount++;
|
||||||
this.calc_price();
|
this.calc_price();
|
||||||
},
|
},
|
||||||
|
//短效无限量购买白名单修改
|
||||||
|
dxwxl_whitelist_reduce(){
|
||||||
|
if (this.dxwxl_data.maxWhitelist > 1) {
|
||||||
|
this.dxwxl_data.maxWhitelist--;
|
||||||
|
this.calc_price();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//短效无限量购买白名单修改
|
||||||
|
dxwxl_whitelist_add(){
|
||||||
|
this.dxwxl_data.maxWhitelist++;
|
||||||
|
this.calc_price();
|
||||||
|
},
|
||||||
//短效包天购买时长修改
|
//短效包天购买时长修改
|
||||||
dxbt_gmsc_reduce(){
|
dxbt_gmsc_reduce(){
|
||||||
if (this.dxbt_data.periodAmount > 1) {
|
if (this.dxbt_data.periodAmount > 1) {
|
||||||
@@ -1115,7 +1148,7 @@ $(document).on("ready", function(e) {
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/order/create_order',
|
url: `${baseUrl}/http/order/create_order`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -1159,7 +1192,7 @@ $(document).on("ready", function(e) {
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/user/get_balance',
|
url: `${baseUrl}/http/user/get_balance`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -1199,7 +1232,7 @@ $(document).on("ready", function(e) {
|
|||||||
};
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/product/calc_price',
|
url: `${baseUrl}/http/product/calc_price`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async:false,
|
async:false,
|
||||||
data: this.order_info,
|
data: this.order_info,
|
||||||
@@ -1209,7 +1242,9 @@ $(document).on("ready", function(e) {
|
|||||||
});
|
});
|
||||||
switch(this.order_info.order_type) {
|
switch(this.order_info.order_type) {
|
||||||
case 2:
|
case 2:
|
||||||
this.order_info.money = this.order_info.data.periodAmount * price_info.price;
|
const whitelist = this.order_info.data.maxWhitelist
|
||||||
|
const discount = Math.max(.6, 1 - .1 * (whitelist - 1))
|
||||||
|
this.order_info.money = this.order_info.data.periodAmount * whitelist * discount * price_info.price;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.order_info.money = this.order_info.data.periodAmount * price_info.price * this.order_info.data.ipAmount;
|
this.order_info.money = this.order_info.data.periodAmount * price_info.price * this.order_info.data.ipAmount;
|
||||||
|
|||||||
@@ -1215,7 +1215,7 @@
|
|||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
||||||
this.order_info.password = (Math.floor(Math.random() * 1000) + 1);
|
this.order_info.password = (Math.floor(Math.random() * 1000000) + 1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
randomString(len) {
|
randomString(len) {
|
||||||
@@ -1446,8 +1446,8 @@
|
|||||||
alert('账号长度至少5位!');
|
alert('账号长度至少5位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.order_info.password.length < 3 && this.hasNumAndChar(this.order_info.password)) {
|
if (this.order_info.password.length < 6 && this.hasNumAndChar(this.order_info.password)) {
|
||||||
alert('密码长度至少3位!');
|
alert('密码长度至少6位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="staticBackdropLabel">微信扫码支付</h5>
|
<h5 class="modal-title" id="staticBackdropLabel">微信扫码支付</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="qrcode_s" style="margin: 0 auto;">
|
<div class="modal-body" id="qrcode_s" style="display:flex;justify-content:center;align-items:center;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
function getCode(_self) {
|
function getCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
function getFindCode(_self) {
|
function getFindCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#fusername").val()
|
var name = $("#fusername").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -234,6 +234,11 @@
|
|||||||
白名单设置
|
白名单设置
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/user/httpwhiteipsu">
|
||||||
|
白名单设置(短效无限量)
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
@{
|
@{
|
||||||
Layout = "_UserLayout";
|
Layout = "_UserLayout";
|
||||||
}
|
}
|
||||||
@@ -447,9 +446,17 @@
|
|||||||
<div class="col-sm-12 ">
|
<div class="col-sm-12 ">
|
||||||
<div class="boxes boxes-border-top text-left margin-top-30 clearfix">
|
<div class="boxes boxes-border-top text-left margin-top-30 clearfix">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<h5 class=" text-left">价格:¥{{order_info.money}} <span style="float:right;">
|
<h5 class=" text-left">
|
||||||
<button class="btn btn-new" v-on:click="pay()" data-backdrop="static" >实付¥{{order_info.money}}</button>
|
<span style="margin-right:4px">价格:¥{{order_info.money}}</span>
|
||||||
</span></h5>
|
<span style="font-size: 13px;font-weight: 400;color: #666666;">
|
||||||
|
无限量白名单上限:{{whitelist}}
|
||||||
|
</span>
|
||||||
|
<span style="float:right;">
|
||||||
|
<button class="btn btn-new" v-on:click="pay()"
|
||||||
|
data-backdrop="static">实付¥{{order_info.money}}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -462,6 +469,7 @@
|
|||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
var baseUrl = '@ViewData["BaseUrl"]';
|
||||||
var vm = new Vue({
|
var vm = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data: {
|
data: {
|
||||||
@@ -488,9 +496,11 @@
|
|||||||
},
|
},
|
||||||
regions: [],
|
regions: [],
|
||||||
user_detail: {},
|
user_detail: {},
|
||||||
|
whitelist: 1,
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.get_package_list();
|
this.get_package_list();
|
||||||
|
this.get_whitelist_max();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
get_package_list() {
|
get_package_list() {
|
||||||
@@ -501,7 +511,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/user/dx_package',
|
url: `${baseUrl}/http/user/dx_package`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -522,7 +532,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/user/get_user_token',
|
url: `${baseUrl}/http/user/get_user_token`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -548,7 +558,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/user/dx_order',
|
url: `${baseUrl}/http/user/dx_order`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -562,6 +572,8 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
rebuy(r) {
|
rebuy(r) {
|
||||||
|
console.log(r);
|
||||||
|
|
||||||
this.rebuy_data.title = r.name;
|
this.rebuy_data.title = r.name;
|
||||||
this.rebuy_data.packId = r.id;
|
this.rebuy_data.packId = r.id;
|
||||||
this.rebuy_data.packType = r.planType;
|
this.rebuy_data.packType = r.planType;
|
||||||
@@ -610,6 +622,7 @@
|
|||||||
pay() {
|
pay() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.order_info.data = this.rebuy_data;
|
this.order_info.data = this.rebuy_data;
|
||||||
|
this.order_info.renew = 1;
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
cookie: document.cookie,
|
cookie: document.cookie,
|
||||||
@@ -618,7 +631,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/order/rebuy_order',
|
url: `${baseUrl}/http/order/rebuy_order`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
@@ -721,7 +734,7 @@
|
|||||||
};
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'https://php-api.juip.com/http/product/calc_price',
|
url: `${baseUrl}/http/product/calc_price`,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
data: this.order_info,
|
data: this.order_info,
|
||||||
@@ -731,7 +744,9 @@
|
|||||||
});
|
});
|
||||||
switch (this.order_info.order_type) {
|
switch (this.order_info.order_type) {
|
||||||
case 2:
|
case 2:
|
||||||
this.order_info.money = this.order_info.data.periodAmount * price_info.price;
|
const whitelist = this.whitelist
|
||||||
|
const discount = Math.max(.6, 1 - .1 * (whitelist - 1))
|
||||||
|
this.order_info.money = this.order_info.data.periodAmount * whitelist * discount * price_info.price;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.order_info.money = this.order_info.data.periodAmount * price_info.price * this.order_info.data.ipAmount;
|
this.order_info.money = this.order_info.data.periodAmount * price_info.price * this.order_info.data.ipAmount;
|
||||||
@@ -739,6 +754,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.order_info.money = this.order_info.money.toFixed(2);
|
this.order_info.money = this.order_info.money.toFixed(2);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询短效无限量白名单数量
|
||||||
|
get_whitelist_max() {
|
||||||
|
const data = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/white_limit_get_su`,
|
||||||
|
data: data,
|
||||||
|
dataType: "json",
|
||||||
|
success: (res) => {
|
||||||
|
this.whitelist = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
312
Host/Views/User/HttpWhiteIpSU.cshtml
Normal file
312
Host/Views/User/HttpWhiteIpSU.cshtml
Normal file
@@ -0,0 +1,312 @@
|
|||||||
|
@{
|
||||||
|
Layout = "_UserLayout";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<div class="boxes margin-top-5 clearfix">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<input v-model="ip" type="text" style="width: 350px; margin-right: 20px;" placeholder="请输入ip地址并点击保存白名单" />
|
||||||
|
<button v-on:click="set_ip()" type="button" class="btn btn-primary"
|
||||||
|
style="outline: none; box-shadow: none;">保存</button>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top-30">
|
||||||
|
<h5>当前白名单列表
|
||||||
|
<span class="text-warning">当前白名单数量:{{ whiteLimit }} 个</span>
|
||||||
|
<button type="button" class="btn btn-new btn-xs" data-toggle="modal" data-target="#whitelistModal"
|
||||||
|
style="outline: none; box-shadow: none; margin-left: 60px;" v-on:click="get_package_details()">
|
||||||
|
调整白名单上限
|
||||||
|
</button>
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<div class="modal fade" id="whitelistModal" tabindex="-1" role="dialog">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">调整白名单上限</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center" style="gap: 15px;">
|
||||||
|
<div class="modal-body btn-group" role="group">
|
||||||
|
<button type="button" class="btn btn-new btn-xs" v-on:click="decreaseLimit"
|
||||||
|
style=" outline: none; box-shadow: none;" :disabled="tempWhiteLimit <= 1">-</button>
|
||||||
|
<span class="btn btn-default btn-xs">{{ tempWhiteLimit }}</span>
|
||||||
|
<button type="button" class="btn btn-new btn-xs" v-on:click="increaseLimit"
|
||||||
|
style="outline: none; box-shadow: none;" :disabled="tempWhiteLimit >= 20">+</button>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 2rem; margin-bottom: 1rem">
|
||||||
|
<span v-if="tempDiscount === 10">价格<span class="text-danger">无折扣</span></span>
|
||||||
|
<span v-else class="text-danger">
|
||||||
|
当前已应用 {{ tempDiscount*10 }}% 折扣
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 2rem; margin-bottom: 1rem">
|
||||||
|
调整后到期时间:{{ new Date(newExpre).toLocaleString() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
|
||||||
|
<button type="button" class="btn btn-primary" v-on:click="set_white_limit()">确定</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<table class="products-table responsive tablesaw tablesaw-stack" data-tablesaw-mode="stack">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>IP地址</th>
|
||||||
|
<th>设置时间</th>
|
||||||
|
<th>锁定状态</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in ip_list">
|
||||||
|
<td style="display:none;">{{item.id}}</td>
|
||||||
|
<td>{{item.ip}}</td>
|
||||||
|
<td>{{item.createTime}}</td>
|
||||||
|
<td>{{item.isLocked}}</td>
|
||||||
|
<td>
|
||||||
|
<a v-if="item.isLocked=='未锁定'" v-on:click="lock_ip(item.id,1)"
|
||||||
|
class="btn btn-new">锁定</a>
|
||||||
|
<a v-if="item.isLocked=='已锁定'" v-on:click="lock_ip(item.id,0)"
|
||||||
|
class="btn btn-new">解锁</a>
|
||||||
|
<a class="btn btn-danger" v-on:click="delete_ip(item.id)">删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var baseUrl = '@ViewData["BaseUrl"]';
|
||||||
|
var vm = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: {
|
||||||
|
ip_list: [],
|
||||||
|
ip: '',
|
||||||
|
whiteLimit: 1, //获取当前白名单的数量
|
||||||
|
tempWhiteLimit: 1, //模态框中白名单的数量
|
||||||
|
tempDiscount: 10,
|
||||||
|
detail: {},
|
||||||
|
newExpre: 0,
|
||||||
|
},
|
||||||
|
created: function () {
|
||||||
|
this.get_list()
|
||||||
|
this.get_white_limit()
|
||||||
|
this.get_package_details()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
get_list() {
|
||||||
|
let data = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/white_list_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: function (res) {
|
||||||
|
that.ip_list = res.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
set_ip() {
|
||||||
|
let data = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
data: { ip: this.ip }
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/create_white_ip_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: function (res) {
|
||||||
|
that.get_list()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
lock_ip(id, status) {
|
||||||
|
var lock_ip = {};
|
||||||
|
lock_ip.id = id;
|
||||||
|
lock_ip.lock = status;
|
||||||
|
let dataa = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
data: lock_ip
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/lock_ip_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(dataa),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: function (res) {
|
||||||
|
that.get_list()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delete_ip(id) {
|
||||||
|
var dalete_ip = {};
|
||||||
|
dalete_ip.id = id;
|
||||||
|
let dataa = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
data: dalete_ip
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/delete_ip_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(dataa),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: function (res) {
|
||||||
|
that.get_list()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 添加白名单数量
|
||||||
|
setTempWhiteLimit(value) {
|
||||||
|
this.tempWhiteLimit = Math.min(20, value)
|
||||||
|
this.tempWhiteLimit = Math.max(1, value)
|
||||||
|
this.tempDiscount = Math.max(6, 11 - value)
|
||||||
|
|
||||||
|
this.newExpre = this.calc_remain(this.detail.expireTime, this.whiteLimit, this.tempWhiteLimit)
|
||||||
|
},
|
||||||
|
increaseLimit() {
|
||||||
|
this.setTempWhiteLimit(this.tempWhiteLimit + 1)
|
||||||
|
},
|
||||||
|
// 减少白名单数量
|
||||||
|
decreaseLimit() {
|
||||||
|
this.setTempWhiteLimit(this.tempWhiteLimit - 1)
|
||||||
|
},
|
||||||
|
//确定后把最新白名单数量调接口给后端
|
||||||
|
set_white_limit() {
|
||||||
|
let data = {
|
||||||
|
cookie: document.cookie,
|
||||||
|
data: { maxAmount: this.tempWhiteLimit }
|
||||||
|
}
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/white_limit_set_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.code > 0) {
|
||||||
|
$('#whitelistModal').modal('hide');
|
||||||
|
alert('白名单上限设置成功!');
|
||||||
|
} else {
|
||||||
|
alert('设置失败:' + (res.message || '未知错误'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert('设置失败,请重试!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取白名单当前的数量
|
||||||
|
get_white_limit() {
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/white_limit_get_su`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify({
|
||||||
|
cookie: document.cookie,
|
||||||
|
}),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: (res) => {
|
||||||
|
if (res.code > 0) {
|
||||||
|
this.whiteLimit = res.data
|
||||||
|
this.setTempWhiteLimit(res.data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取最新套餐详情
|
||||||
|
get_package_details() {
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: `${baseUrl}/http/user/get_unlimited_available`,
|
||||||
|
dataType: "json",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify({
|
||||||
|
cookie: document.cookie,
|
||||||
|
}),
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
},
|
||||||
|
crossDomain: true,
|
||||||
|
success: (res) => {
|
||||||
|
if (res.code < 0) alert('获取套餐信息失败')
|
||||||
|
this.detail = res.data
|
||||||
|
this.setTempWhiteLimit(this.tempWhiteLimit)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算修改白名单上限后的剩余时间
|
||||||
|
calc_remain(expire, maxWhitelist, newMaxWhitelist) {
|
||||||
|
|
||||||
|
// 套餐剩余秒数
|
||||||
|
const now = Math.floor(Date.now() / 1000)
|
||||||
|
const prev = expire ?? now
|
||||||
|
const remain = prev - now
|
||||||
|
|
||||||
|
// 白名单比值,时间份数
|
||||||
|
const multiple = maxWhitelist / newMaxWhitelist
|
||||||
|
|
||||||
|
// 折扣比值,新折扣作为基准
|
||||||
|
const oldDiscount = Math.max(.6, 1 - .1 * (maxWhitelist - 1))
|
||||||
|
const newDiscount = Math.max(.6, 1 - .1 * (newMaxWhitelist - 1))
|
||||||
|
const offset = oldDiscount / newDiscount
|
||||||
|
|
||||||
|
// 手续费,固定 1%
|
||||||
|
const fee = 99 / 100
|
||||||
|
|
||||||
|
// 返回新到期时间
|
||||||
|
return Math.floor(remain * multiple * offset * fee + now) * 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"VirtualHost": "/"
|
"VirtualHost": "/"
|
||||||
},
|
},
|
||||||
"WxApps": {
|
"WxApps": {
|
||||||
"AppID": "wx18e5b4f42773c3ec", //<2F><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>
|
"AppID": "wx18e5b4f42773c3ec",
|
||||||
"AppSecret": "e35b29b1ceb3063d4337a0e5b0ee7758",
|
"AppSecret": "e35b29b1ceb3063d4337a0e5b0ee7758",
|
||||||
"MchId": "1571608411",
|
"MchId": "1571608411",
|
||||||
"MchKey": "846b9b0ea4aa4d5ca701e2c9f0aa6dae"
|
"MchKey": "846b9b0ea4aa4d5ca701e2c9f0aa6dae"
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"TestCountLimit": 3,
|
|
||||||
"Service_BaseUrl": "http://hapi.hncore.net/",
|
|
||||||
"BaseInfoUrl": "http://www.ipkd.com/",
|
|
||||||
"NotifyUrl": "http://hapi.hncore.net/product/WxOrderCallBack",
|
|
||||||
//"MySql": "Server=101.200.84.129;Database=hualian_test;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=3306",
|
|
||||||
"MySql": "Server=127.0.0.1;Database=hualianyun;User=root;Password=123456789;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=3306",
|
|
||||||
"Redis": "127.0.0.1:6379,password=123456,defaultDatabase=1,poolsize=1",
|
|
||||||
"Aliyun": {
|
|
||||||
"Oss": {
|
|
||||||
"AliEndpoint": "oss-cn-qingdao.aliyuncs.com",
|
|
||||||
"AliAccessId": "dpisQKVqzAYffodY",
|
|
||||||
"AliAccessKey": "ZG3uAkwPR4UpfsTJzG9DW1WeKIskHz"
|
|
||||||
},
|
|
||||||
"Pay": {
|
|
||||||
"NotifyUrl": "http://www.juip.com/product/AliNotify",
|
|
||||||
"ReturnUrl": "http://www.juip.com/product/AliReturn",
|
|
||||||
"UNotifyUrl": "http://www.juip.com/user/AliNotify",
|
|
||||||
"UReturnUrl": "http://www.juip.com/user/AliReturn",
|
|
||||||
|
|
||||||
"AppId": "2021005115644614",
|
|
||||||
"PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgu0+q0O98pTQev1dNQdYfrsIx/vt19HQMKHvyetTBaL3w3xr/pJywUdsSBXyVk7roDjOWbXXoQzOkMLf6e0XJzBOh8pl+ZIfXJMh4a4pdL1FGzumueNzjtV7Y8AefTvfxsxaQFfPWN+xRp2c7EBVcT8olka0A1HhrLb3C7c+iPZLw3YR+0LiKFrMbLEXsi6RdmehAGqt6Kt8ouHPwUaQ9tV600XliyySZNDEG2UifXCX7GE1zj7iAeO23Y2lCb+gtKCmadoETnB12YCFTbSckGW/xYhOM+BqcTYXBN/TYG8hSwvwf2GSYUcx97XaHHfh6TgoygD6EzE/U5sOfVisGwIDAQAB",
|
|
||||||
"PrivateKey": "MIIEogIBAAKCAQEApD5xBCfOL2aiayoPbXSp6TS8D24O8UXHCN6bnm8jqGtFwRA7kKcu9szoolaRvyyJQUKfzksU1/TEytMThO7f3J7eWy0ePI/6Fh1YZGf3SmM89zK7twBW41eY1T9nzolPpAyiUC860PM8ZL8nMNmJZFdNNYGaEX4cVwHjXAmvfe2w0H8U9fBimH6vRUXrmkFTTughnAjUgv3Oi2U8YH4AFSBkGTaQVHzlSDbEbi2wOju/zN61Nze3MnVrsIJRszZ0uUsEOxQt3alO9YrlVfmRK+/RSePeerrG+XnoSatBV41htNtijNujPuZR52+cqGC20w+KLDTW1E83k9pR72ic7wIDAQABAoIBAGmkA/tBQxw37pXxGrUzSapHEgL2rkO/ttJcpEmWgJ/uR5JzR2y2K73wdF0eQ2ZsVegU20bMAh8ZP46Zjz98iZ6UzL5mWcFoddnNjDIgsO02wVraVeTSIhDeId5fhvxQU1pYCfp7NmB5YsoGLUX9VaKliHK25osDy2SnQT7MuATNVwzqpfGDkZEWKnnjsrR726rcWIzOjH+FlBqFsVU4POpIKxTQ89VOJkQOUlfLwHUGck+DYR5AhgFSmrToqhUwiiG9W7S6RM1KyzYDaB3OExB0rErS48q3s4/EJSbTFVfhMB6rAmH3oR3pec2gDuTU9jIk/Vv2eBwZzdF6rnfYh/ECgYEA8ZLmOX06m1xZBTKM69OOgjBCX+G7BhTFAldjxLoZHFN6+Hxy5gD3bl7FwUsEoF4vVo7XFbEHVH4mGIFfEQrJ6y2UpXRlkIURK1j2w8NvjinAWxtVb/bfF+CSjEOTOyhoA4t+qOTxbhluS1KxbN9tiWtwnDaK/BN13pSLec9ba6kCgYEArg1ZGLY6RNKu29FTiDB6Ag7/Or1dOvA/LT0fai+400uNz9yB7Q5a0Mx+UOciFqaRuFIRHh7YUVkqu/duzujLktFU41CzKQGOjwpGB7SrOfX/jWiT6wW6jCAdQ9KXp9zjc0KslhwwzprHlEQkMZCnLBL4/aJ2fmVgVEVMLz2m4tcCgYAJSBGcZ9lWmse40WZksS4qhlwmfu/Gngmru1vT9Sp90h9JaM6pU6QuE2oZsR4uYzACbV6KMNENSAOCsYXLi9SSOqAZc01rrhEozzQ79UhV9/iyB2zS7nNH4ZL/3KDNhxHoAPYO2y0Dg+qe7kBu5G669uvOtLHGWaEPujlZpsPmcQKBgAvp8f1VC+wGF94IGBWsa82URTg6GhWcuFZaZroYBijAdTaTO3mEkAbW2JalG5o9UKAzTeSn69q1pc00BKu5F6Y3Gf5tWbYm2yFDbMO+RDI1eoatb+KYg8pvsFEiKytcXV1YZQPpbhXWVm75sxiJdEf6DH0gD8hbHBrom2xoZfIFAoGAXPDKBpuEw2+cwZNi6SkZn7J3xJ0XQL6yEFRTWVXIbdk6R4iRL2AbdnoiwKaMmvYQd2HTN34raGW39DzCRzgWzrKUoOTXwj3F/aSfpcuGPeZrBh/f419GoDZtWhibAjxqrn9h6uEKclAWOGj82uC6oof9nCqQIp5WqPaixAa4ceE="
|
|
||||||
|
|
||||||
},
|
|
||||||
"PayH5": {
|
|
||||||
"NotifyUrl": "http://www.juip.com/product/AliNotifyH5",
|
|
||||||
"ReturnUrl": "http://www.juip.com/product/AliReturnH5",
|
|
||||||
"UNotifyUrl": "http://www.juip.com/user/AliNotifyH5",
|
|
||||||
"UReturnUrl": "http://www.juip.com/user/AliReturnH5",
|
|
||||||
|
|
||||||
"AppId": "2021005115644614",
|
|
||||||
"PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgu0+q0O98pTQev1dNQdYfrsIx/vt19HQMKHvyetTBaL3w3xr/pJywUdsSBXyVk7roDjOWbXXoQzOkMLf6e0XJzBOh8pl+ZIfXJMh4a4pdL1FGzumueNzjtV7Y8AefTvfxsxaQFfPWN+xRp2c7EBVcT8olka0A1HhrLb3C7c+iPZLw3YR+0LiKFrMbLEXsi6RdmehAGqt6Kt8ouHPwUaQ9tV600XliyySZNDEG2UifXCX7GE1zj7iAeO23Y2lCb+gtKCmadoETnB12YCFTbSckGW/xYhOM+BqcTYXBN/TYG8hSwvwf2GSYUcx97XaHHfh6TgoygD6EzE/U5sOfVisGwIDAQAB",
|
|
||||||
"PrivateKey": "MIIEogIBAAKCAQEApD5xBCfOL2aiayoPbXSp6TS8D24O8UXHCN6bnm8jqGtFwRA7kKcu9szoolaRvyyJQUKfzksU1/TEytMThO7f3J7eWy0ePI/6Fh1YZGf3SmM89zK7twBW41eY1T9nzolPpAyiUC860PM8ZL8nMNmJZFdNNYGaEX4cVwHjXAmvfe2w0H8U9fBimH6vRUXrmkFTTughnAjUgv3Oi2U8YH4AFSBkGTaQVHzlSDbEbi2wOju/zN61Nze3MnVrsIJRszZ0uUsEOxQt3alO9YrlVfmRK+/RSePeerrG+XnoSatBV41htNtijNujPuZR52+cqGC20w+KLDTW1E83k9pR72ic7wIDAQABAoIBAGmkA/tBQxw37pXxGrUzSapHEgL2rkO/ttJcpEmWgJ/uR5JzR2y2K73wdF0eQ2ZsVegU20bMAh8ZP46Zjz98iZ6UzL5mWcFoddnNjDIgsO02wVraVeTSIhDeId5fhvxQU1pYCfp7NmB5YsoGLUX9VaKliHK25osDy2SnQT7MuATNVwzqpfGDkZEWKnnjsrR726rcWIzOjH+FlBqFsVU4POpIKxTQ89VOJkQOUlfLwHUGck+DYR5AhgFSmrToqhUwiiG9W7S6RM1KyzYDaB3OExB0rErS48q3s4/EJSbTFVfhMB6rAmH3oR3pec2gDuTU9jIk/Vv2eBwZzdF6rnfYh/ECgYEA8ZLmOX06m1xZBTKM69OOgjBCX+G7BhTFAldjxLoZHFN6+Hxy5gD3bl7FwUsEoF4vVo7XFbEHVH4mGIFfEQrJ6y2UpXRlkIURK1j2w8NvjinAWxtVb/bfF+CSjEOTOyhoA4t+qOTxbhluS1KxbN9tiWtwnDaK/BN13pSLec9ba6kCgYEArg1ZGLY6RNKu29FTiDB6Ag7/Or1dOvA/LT0fai+400uNz9yB7Q5a0Mx+UOciFqaRuFIRHh7YUVkqu/duzujLktFU41CzKQGOjwpGB7SrOfX/jWiT6wW6jCAdQ9KXp9zjc0KslhwwzprHlEQkMZCnLBL4/aJ2fmVgVEVMLz2m4tcCgYAJSBGcZ9lWmse40WZksS4qhlwmfu/Gngmru1vT9Sp90h9JaM6pU6QuE2oZsR4uYzACbV6KMNENSAOCsYXLi9SSOqAZc01rrhEozzQ79UhV9/iyB2zS7nNH4ZL/3KDNhxHoAPYO2y0Dg+qe7kBu5G669uvOtLHGWaEPujlZpsPmcQKBgAvp8f1VC+wGF94IGBWsa82URTg6GhWcuFZaZroYBijAdTaTO3mEkAbW2JalG5o9UKAzTeSn69q1pc00BKu5F6Y3Gf5tWbYm2yFDbMO+RDI1eoatb+KYg8pvsFEiKytcXV1YZQPpbhXWVm75sxiJdEf6DH0gD8hbHBrom2xoZfIFAoGAXPDKBpuEw2+cwZNi6SkZn7J3xJ0XQL6yEFRTWVXIbdk6R4iRL2AbdnoiwKaMmvYQd2HTN34raGW39DzCRzgWzrKUoOTXwj3F/aSfpcuGPeZrBh/f419GoDZtWhibAjxqrn9h6uEKclAWOGj82uC6oof9nCqQIp5WqPaixAa4ceE="
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"RabbitMqConfig": {
|
|
||||||
"HostName": "127.0.0.1",
|
|
||||||
"Port": 5672,
|
|
||||||
"UserName": "guest",
|
|
||||||
"Password": "123456",
|
|
||||||
"VirtualHost": "/"
|
|
||||||
},
|
|
||||||
"WxApps": {
|
|
||||||
"AppID": "wx18e5b4f42773c3ec", //<2F><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>
|
|
||||||
"AppSecret": "e35b29b1ceb3063d4337a0e5b0ee7758",
|
|
||||||
"EncodingAESKey": "XKBeQXngKx4Ijr2QbJo2cR6ydk0uhQCXyKVJzuXgdjH",
|
|
||||||
"MchId": "1571608411",
|
|
||||||
"MchKey": "846b9b0ea4aa4d5ca701e2c9f0aa6dae"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"TestCountLimit": 3,
|
"TestCountLimit": 3,
|
||||||
"Service_BaseUrl": "https://www.juip.com/",
|
"Service_BaseUrl": "https://www.juip.com/",
|
||||||
"BaseInfoUrl": "https://www.juip.com/",
|
"BaseInfoUrl": "https://www.juip.com/",
|
||||||
|
"BackendUrl": "https://php-api.juip.com/",
|
||||||
"NotifyUrl": "https://www.juip.com/product/WxOrderCallBack",
|
"NotifyUrl": "https://www.juip.com/product/WxOrderCallBack",
|
||||||
"UNotifyUrl": "https://www.juip.com/user/WxOrderCallBack",
|
"UNotifyUrl": "https://www.juip.com/user/WxOrderCallBack",
|
||||||
"MySql": "Server=127.0.0.1;Database=hualianyun;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=3306",
|
"MySql": "Server=127.0.0.1;Database=hualianyun;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=3306",
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"sdk": {
|
|
||||||
"version": "2.2.100"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
//{
|
|
||||||
// "MySql": "Server=rm-bp12e1533udh1827azo.mysql.rds.aliyuncs.com;Database=etor_property_test;User=etor_test;Password=etor_test!QAZ2wsx;Convert Zero Datetime=True;TreatTinyAsBoolean=false;",
|
|
||||||
// "Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=7,poolsize=1"
|
|
||||||
//}
|
|
||||||
{
|
|
||||||
"Host_BaseUrl": "http://ipistest.etor.top11",
|
|
||||||
"Wx_Mp_Appid": "wxd6b150a17c252fec",
|
|
||||||
"MySql": "Server=47.92.244.89;Database=property;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=5000;",
|
|
||||||
"Redis": "47.92.244.89:8088,password=123456,defaultDatabase=7,poolsize=1"
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"MySql": "Server=47.92.244.89;Database=hualianyun;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=5000",
|
|
||||||
"Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=7",
|
|
||||||
"RabbitMqConfig": {
|
|
||||||
"HostName": "47.111.18.99",
|
|
||||||
"Port": 5672,
|
|
||||||
"UserName": "test",
|
|
||||||
"Password": "123456",
|
|
||||||
"VirtualHost": "/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Debug",
|
|
||||||
"System": "Information",
|
|
||||||
"Microsoft": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Aliyun": {
|
|
||||||
"Oss": {
|
|
||||||
"AliEndpoint": "oss-cn-shenzhen.aliyuncs.com",
|
|
||||||
"AliAccessId": "dpisQKVqzAYffodY",
|
|
||||||
"AliAccessKey": "ZG3uAkwPR4UpfsTJzG9DW1WeKIskHz"
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"MySql": "Server=47.92.244.89;Database=property;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=5000;",
|
|
||||||
"Redis": "47.92.244.89:8088,password=123456,defaultDatabase=7,poolsize=1",
|
|
||||||
"NotifyUrl": "http://louxiaoyuapi.Hncore.vip/api/paymentcenter/v1/Payment/HWCNotify",
|
|
||||||
"UnionpayAggregateRootNotifyUrl": "http://louxiaoyuapi.Hncore.vip/api/paymentcenter/v1/Payment/UANotify",
|
|
||||||
"QuanFuTong": {
|
|
||||||
"MchId": "23",
|
|
||||||
"RSAPrivateKey": "242424cQu9cDT9LKpoU0JwDYKnu8yk8adt81xm4JifUNe/X7X242461GusKAQwYj3fs/mvgx8NHAgMBAAECggEAWLaC1jGLgvUvTPb9EhmGuLxy/WnjskI6NwSsL/ZzaC3KV+0Mz8Eo5n4CiIr/fMSrJgAPAqyqPKWjj8JgYqnDiZ+NdAjY/ai7oMQ+ABnSg9+u+tCAUBSQZ1zSD5NmmHbUiS/4OfLcEudZvn1ItCXuUlzqEMuxfLfShDyleN5VYtIF6+OKBGji7FePQJ+2eEdfsh+b1936vztKckVkERSMRaBHCs9RTLSKRfUH4OK7z0oaYV+GK/BBPWT1ylpd+DUoJOiTT13QMP2a3VfKuaYwonI3Whp/Wwc832GWRZMF0PLVJXFiPiPaB1AK+nYO5aD+8lresoYub530VMF6rdUj+QKBgQDWp73zQNtD1Cpcvz2kKjOlwqP2ROBTmZaJzn1AJEYW4bIyDCw1ECkZmo8JYaR8JFX0siyDvgMQsYUasmHZ8qbeKmX0AFfFa26c7A2VCJqWP++Mc1f83KH4dAGplLVirCs7xXGLxAxREPJsJB0BsmRzMwby7rS3J7978VNQD37vewKBgQDPO6jdEhhJZnvJcL2Uf/XCeEfc3Z5ascveqynSgZzkAkyeRKRBJ/rnQRmTklcq97jW+WkyQaYW5VxJ6Ep76gp7ip+UCL4dcjKRLgA/lWOxUh81NjZmsUDWZLSPVJIXdLuGbUU67XRBY5+1jG6SN2oYgBzxjeH/EM58Li7KE+1rpQKBgG1aeTdyZAGzFX24Y4O9iCA6/2KXhhyw0vMTgdVqZVaE1k4Oy3qg5/9GMPZbivs/W5bUKj9XTqJzfVazZ4wrxPzLZrMedZh6eZhx3R1+i5pdqgDIRhvono8/MhWdT6acBU5m8Mh+MLQfyRB0eV6C7g+OAE1EdEYWdsOClqnjqwv/AoGBAM45bofg8+5HYDRMTzyyQhzumYT/vhA/EsRZzNrBRSHZ7+koIdT9NkBfllY2sSv/LSAxPzBWCDSMttSNp2G8vAXJI5irQpYHCK9U+cZModLaCFhpxKVZC07PFKf13xQchGj34IcNuj1AKLUANSCoqJoNE8CGEzpCvVjylHlgb0pJAoGBANWAeTb3HYnPBJIUCkao13/gIP/6/0k7Z8vOnHZgoZVoZuOTVtCc+1Mg5Ati/CKDnvrRcpAyliaintO4kiRDMQTy4+PXpJ7dExG8smLWF428rOKe3D0pgSmrlMbBLZiDyj61/lsL8HNUNjaeuSLSEXlR7Br0PErVHOFvIHfFaH29",
|
|
||||||
"RSAPublicKey": "MIIBIjANBgkqhkiG9w034343482fo2+AyHkq11yE27IgOjSrKofgg3GWJ6SSQonYuXZ0c09chXXiZPKYe0zRbvq83kAVsYDu1sMwi8mfiVff6CIALsehs1MOjmdLW40N1CicVmJaWuh2yee+sj1/0xMOlV1LyJq63hShBD7T93qpGbHoNkpdz+BFc2byrhv1idbB4DRbUiKynzj3FX2Nz8Dv9TFQv8p2Z8dIOst890atv3P8DO7a9FI8I1reLvFDdyPawIDAQAB"
|
|
||||||
},
|
|
||||||
"UnionpayAggregateRoot": {
|
|
||||||
"MchId": "dfdf",
|
|
||||||
"Md5Key": "43434"
|
|
||||||
},
|
|
||||||
"EPayNotifyUrl": "https://psipbmsapi.wx.weiyu.Hncore.vip/api/v1/epay/paycallback1",
|
|
||||||
"EPayNotifyUrl_Test": "http://ipistest.Hncore.top/api/paymentcenter/v1/epay/callback_test1", //イ簗ヤサリオ<EFBE98>リヨキ
|
|
||||||
"EPayNoOrderBillCallbackUrl": "https://psipbmsapi.wx.weiyu.Hncore.vip/api/v1/epay/paycallbacknoorderbill1",
|
|
||||||
"EPayRefundCallbackUrl": "https://psipbmsapi.wx.weiyu.Hncore.vip/api/v1/epay/refundcallback1",
|
|
||||||
"WeiFuTongRefundCallbackUrl": "https://psipbmsapi.wx.weiyu.Hncore.vip/api/v1/feecenter/refundcallback1"
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
//{
|
|
||||||
// "MySql": "Server=rm-bp12e1533udh1827azo.mysql.rds.aliyuncs.com;Database=etor_property_test;User=etor_test;Password=etor_test!QAZ2wsx;Convert Zero Datetime=True;TreatTinyAsBoolean=false;",
|
|
||||||
// "Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=7,poolsize=1"
|
|
||||||
//}
|
|
||||||
{
|
|
||||||
"Host_BaseUrl": "http://ipistest.etor.top11",
|
|
||||||
"Wx_Mp_Appid": "wxd6b150a17c252fec",
|
|
||||||
"MySql": "Server=47.92.244.89;Database=property;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=5000;",
|
|
||||||
"Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=10,poolsize=1",
|
|
||||||
"Service_BaseUrl": "http://localhost:5000",
|
|
||||||
"Wx": {
|
|
||||||
"mp": {
|
|
||||||
"appId": "",
|
|
||||||
"appSecret": "",
|
|
||||||
"mchId": "",
|
|
||||||
"mchKey": ""
|
|
||||||
},
|
|
||||||
"mini": {
|
|
||||||
"appId": "",
|
|
||||||
"appSecret": "",
|
|
||||||
"mchId": "",
|
|
||||||
"mchKey": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
//{
|
|
||||||
// "MySql": "Server=rm-bp12e1533udh1827azo.mysql.rds.aliyuncs.com;Database=etor_property_test;User=etor_test;Password=etor_test!QAZ2wsx;Convert Zero Datetime=True;TreatTinyAsBoolean=false;",
|
|
||||||
// "Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=7,poolsize=1"
|
|
||||||
//}
|
|
||||||
{
|
|
||||||
"Host_BaseUrl": "http://ipistest.etor.top11",
|
|
||||||
"Wx_Mp_Appid": "wxd6b150a17c252fec",
|
|
||||||
"MySql": "Server=47.92.244.89;Database=course;User=root;Password=qaz123!@#;Convert Zero Datetime=True;TreatTinyAsBoolean=false;port=5000;",
|
|
||||||
"Redis": "47.92.85.90:6379,password=etor0070x01,defaultDatabase=10,poolsize=1"
|
|
||||||
}
|
|
||||||
1901
db/schemas.sql
Normal file
1901
db/schemas.sql
Normal file
File diff suppressed because it is too large
Load Diff
24
docker-compose.yaml
Normal file
24
docker-compose.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: juipnet
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0.21
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: 123456789
|
||||||
|
MYSQL_DATABASE: hualianyun
|
||||||
|
ports:
|
||||||
|
- "${DATABASE_PORT}:3306"
|
||||||
|
volumes:
|
||||||
|
- .volumes/mysql:/var/lib/mysql
|
||||||
|
- ./sql:/docker-entrypoint-initdb.d:ro
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:3.2.12
|
||||||
|
environment:
|
||||||
|
REDIS_PASSWORD: 123456
|
||||||
|
ports:
|
||||||
|
- "${REDIS_PORT}:6379"
|
||||||
|
volumes:
|
||||||
|
- .volumes/redis:/data
|
||||||
|
|
||||||
5
global.json
Normal file
5
global.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "2.2.207"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user