This commit is contained in:
“wanyongkang”
2023-06-11 18:03:32 +08:00
parent 3dfe3faf33
commit 06e32328f7
14 changed files with 339 additions and 80 deletions

View File

@@ -107,16 +107,19 @@ namespace Home.Controllers
m.Price = dis_price;
m.Title = discount.Remark;
} else {
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "8";
}
if (m.ProductId == 6||m.ProductId == 5||m.ProductId == 23){
m.Title = "9";
}
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2){
m.Title = "7.5";
}
if (m.ProductId == 18){
m.Title = "7.5";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
m.Title = "8";
}
}
if(m.Price<m.MinPrice){
m.Price = m.MinPrice;
@@ -134,15 +137,18 @@ namespace Home.Controllers
{
product.Packages.ForEach(m => {
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
}
if (m.ProductId == 18){
m.Title = "8";
}
if (m.ProductId == 6||m.ProductId == 5||m.ProductId == 23){
m.Title = "9";
}
if (m.ProductId == 1||m.ProductId == 2){
m.Title = "7.5";
}
if (m.ProductId == 18){
m.Title = "7.5";
}
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
m.Title = "8";
}
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId);
if (userPrice != null && userPrice.UserPrice > 0)
@@ -160,15 +166,18 @@ namespace Home.Controllers
{
product.Packages.ForEach(m => {
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
if (m.ProductId == 1||m.ProductId == 2){
m.Title = "7.5";
}
if (m.ProductId == 18){
m.Title = "8";
m.Title = "7.5";
}
if (m.ProductId == 6||m.ProductId == 5||m.ProductId == 23){
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
m.Title = "8";
}
// if ((m.DayCount == 1||m.DayCount == 2) && m.Id != 1034&&m.Id != 1040 &&m.Id != 1079&&m.Id != 1073){
// m.Price = 0.1M;
// }
@@ -918,15 +927,18 @@ namespace Home.Controllers
m.Title = discount.Remark;
} else {
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
if (m.ProductId == 1||m.ProductId == 2){
m.Title = "7.5";
}
if (m.ProductId == 18){
m.Title = "8";
m.Title = "7.5";
}
if (m.ProductId == 6||m.ProductId == 5||m.ProductId == 23){
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
m.Title = "8";
}
}
if(m.Price<m.MinPrice){
m.Price = m.MinPrice;
@@ -956,15 +968,18 @@ namespace Home.Controllers
m.Title = "9.5";
if (m.ProductId == 1||m.ProductId == 2||m.ProductId == 13||m.ProductId == 17||m.ProductId == 14||m.ProductId == 19){
m.Title = "8";
if (m.ProductId == 1||m.ProductId == 2){
m.Title = "7.5";
}
if (m.ProductId == 18){
m.Title = "8";
m.Title = "7.5";
}
if (m.ProductId == 6||m.ProductId == 5||m.ProductId == 23){
if (m.ProductId == 6||m.ProductId == 5){
m.Title = "9";
}
if (m.ProductId == 23||m.ProductId == 13||m.ProductId == 14||m.ProductId == 17){
m.Title = "8";
}
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id);
if (userPrice != null && userPrice.UserPrice > 0)
{

View File

@@ -331,11 +331,11 @@
<p>所有IP产品已记录日志,均保留6个月以上</p>
<p>发现违法行为直接提交网监部门处理</p>
</div>
<p style="margin-top: 10px;font-weight:bold;text-align:center;">聚IP年新春复工助力活动:</p>
<p style="margin-top: 10px;font-weight:bold;text-align:center;">聚IP年新春复工助力活动:</p>
<div style="padding-left: 20px;">
@* <p>1.动态IP一毛钱一天每用户限一次~</p> *@
<p>1.新上蘑菇IP天卡送天卡,周卡送3天,月卡送10双月卡送1个月多买多送~</p>
<p>2.其他产品均有8折活动~</p>
<p>1.新上蘑菇IP周卡送1天,月卡送5双月卡送1个月多买多送~</p>
<p>2.其他产品均有<span style="color: red;font-size:1.5em;font-weight:bold;">7.5</span>折活动~</p>
<p>3.需求5个以上可联系客服设置优惠折扣</p>
</div>
</div>

View File

@@ -59,12 +59,12 @@
}
else if(item.Product.Id == 18) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">送</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></a>
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">送</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7.5折</span></a>
</li>
}
else if(item.Product.Id == 1||item.Product.Id == 2||item.Product.Id == 13||item.Product.Id == 17||item.Product.Id == 19) {
else if(item.Product.Id == 1||item.Product.Id == 2) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></a>
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7.5折</span></a>
</li>
}
else if(item.Product.Id == 5) {
@@ -72,9 +72,9 @@
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></a>
</li>
}
else if(item.Product.Id == 23) {
else if(item.Product.Id == 23||item.Product.Id == 13||item.Product.Id == 17) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></a>
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></a>
</li>
}
else if(item.Product.Id == 14) {

View File

@@ -79,7 +79,7 @@
</div>
<div class="col-md-9 ">
<input id="weixinpay_s" v-model="pay_type" type="radio" name="OPayType" value="1" checked> <label for="weixinpay_s"><img src="~/img/wx.png">微信支付</label>
<input id="zhifubaopay_s" v-model="pay_type" type="radio" name="OPayType" value="2"> <label for="zhifubaopay_s"><img src="~/img/zfb.png">支付宝支付</label>
@* <input id="zhifubaopay_s" v-model="pay_type" type="radio" name="OPayType" value="2"> <label for="zhifubaopay_s"><img src="~/img/zfb.png">支付宝支付</label> *@
<input id="UseAccountAmount" v-model="pay_type" type="radio" name="OPayType" value="3"> <label for="UseAccountAmount">余额支付</label>
</div>
</div>

View File

@@ -199,10 +199,10 @@
支付方式:
</div>
<div class="col-sm-7 col-xs-7 pay">
<div class="radio" v-on:click="OneBuyModel.OPayType=100">
@* <div class="radio" v-on:click="OneBuyModel.OPayType=100">
<input id="zhifubaopay_s1" name="OPayType" type="radio" v-model="OneBuyModel.OPayType" checked value="100">
<label for="zhifubaopay_s1" class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
</div>
</div> *@
<div class="radio" v-on:click="OneBuyModel.OPayType=70">
<input id="weixinpay_s1" name="OPayType" type="radio" v-model="OneBuyModel.OPayType" value="70">
<label for="weixinpay_s1" class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>
@@ -345,10 +345,10 @@
支付方式:
</div>
<div class="col-sm-7 col-xs-7 pay">
<div class="radio" v-on:click="MoreBuyModel.OPayType=100">
@* <div class="radio" v-on:click="MoreBuyModel.OPayType=100">
<input id="zhifubaopay_s" name="radio" type="radio" value="100" checked v-model="MoreBuyModel.OPayType">
<label for="zhifubaopay_s" class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
</div>
</div> *@
<div class="radio" v-on:click="MoreBuyModel.OPayType=70">
<input id="weixinpay_s" name="radio" type="radio" value="70" v-model="MoreBuyModel.OPayType">
<label for="weixinpay_s" class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>

View File

@@ -142,10 +142,10 @@
支付方式:
</div>
<div class="col-sm-7 col-xs-7 pay">
<div class="radio" v-on:click="OneBuyModel.OPayType=100">
@* <div class="radio" v-on:click="OneBuyModel.OPayType=100">
<input id="zhifubaopay_s1" name="OPayType" type="radio" v-model="OneBuyModel.OPayType" value="100">
<label for="zhifubaopay_s1" class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
</div>
</div> *@
<div class="radio" v-on:click="OneBuyModel.OPayType=70">
<input id="weixinpay_s1" name="OPayType" type="radio" v-model="OneBuyModel.OPayType" value="70">
<label for="weixinpay_s1" class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>

View File

@@ -277,7 +277,7 @@
<tr>
<td>支付方式:</td>
<td>
<input type="radio" name="PayChannel" value="40" checked> <img src="~/img/zfb.png">支付宝支付<br />
@* <input type="radio" name="PayChannel" value="40" checked> <img src="~/img/zfb.png">支付宝支付<br /> *@
<input type="radio" name="PayChannel" value="10"> <img src="~/img/wx.png">微信支付
</td>
</tr>

View File

@@ -711,13 +711,16 @@
<p>所有IP产品已记录日志,均保留6个月以上</p>
<p>发现违法行为直接提交网监部门处理</p>
</div>
<h4 style="margin-top: 10px;font-weight:bold;">聚IP年新春复工助力活动:</h4>
<h4 style="margin-top: 10px;font-weight:bold;">聚IP年新春复工助力活动:</h4>
<div style="padding-left: 20px;">
@* <p>1.动态IP一毛钱一天每用户限一次~</p> *@
<p>1.新上蘑菇IP天卡送天卡,周卡送3天,月卡送10双月卡送1个月多买多送~</p>
<p>2.其他产品均有8折活动~</p>
<p>1.新上蘑菇IP周卡送1天,月卡送5双月卡送1个月多买多送~</p>
<p>2.其他产品均有<span style="color: red;font-size:1.5em;font-weight:bold;">7.5</span>折活动~</p>
<p>3.需求5个以上可联系客服设置优惠折扣</p>
</div>
<div style="padding-left: 20px;">
<h4>因支付宝审核等问题暂时无法进行支付宝支付、充值等功能建议使用微信支付如确实需要支付宝支付请联系相关人员17719092232微信同号</h4>
</div>
</div>
<p style="width: 100%;">

View File

@@ -202,7 +202,7 @@
height: 0px;
border: 1.0rem solid #FF9933;
border-right-color: transparent;
content: "8折+送 1 天";
content: "7.5折+送 1 天";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
}
@@ -231,7 +231,7 @@
height: 0px;
border: 1.0rem solid #FF9933;
border-right-color: transparent;
content: "8折+送 5 天";
content: "7.5折+送 5 天";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
}
@@ -260,7 +260,7 @@
height: 0px;
border: 1.0rem solid #FF9933;
border-right-color: transparent;
content: "8折+送 1 月";
content: "7.5折+送 1 月";
box-shadow: 0px 0.3125rem 0.3125rem -0.3125rem #000;
}
@@ -364,19 +364,19 @@
@foreach (var item in Model)
{
if(item.Product.Id == 18) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">送</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></div>
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;">送</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7.5折</span></div>
}
else if(item.Product.Id == 6) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span class="glyphicon glyphicon-thumbs-up" style="color: #f64e3d;font-weight:bold;padding-right: 5px;"> </span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></div>
}
else if(item.Product.Id == 1||item.Product.Id == 2||item.Product.Id == 13||item.Product.Id == 17||item.Product.Id == 19) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></div>
else if(item.Product.Id == 1||item.Product.Id == 2) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">7.5折</span></div>
}
else if(item.Product.Id == 5) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></div>
}
else if(item.Product.Id == 23) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;"></span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">9折</span></div>
else if(item.Product.Id == 23||item.Product.Id == 13||item.Product.Id == 17) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;"></span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">8折</span></div>
}
else if(item.Product.Id == 14) {
<div class="dropdown">
@@ -414,6 +414,12 @@
<div style="background-color: #ccc;color:#0098fb" disabled="disabled"><span class="glyphicon glyphicon-arrow-down"></span>静态IP<span class="glyphicon glyphicon-arrow-down"></span></div>
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name</div>
}
else if(item.Product.Id == 25) {
@* <div style="background-color: #ccc;color:#0098fb" disabled="disabled"><span class="glyphicon glyphicon-arrow-down"></span>静态IP<span class="glyphicon glyphicon-arrow-down"></span></div> *@
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name</div>
}
else if(item.Product.Id == 23) {
<div class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name</div>
@@ -481,7 +487,7 @@
<br>
} *@
@if(item.Product.Id == 13||item.Product.Id == 17){
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信</p>
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
@* <div style="text-align:center;cursor:pointer;padding: 0px;margin:0px;font-size:15px;font-weight:bold;color:red;" title="目前公布要停的地区为:
长春,芜湖,西宁,贵阳,南宁,中卫,
兰州,武汉,西安,郑州,长沙,成都,
@@ -495,7 +501,7 @@
}
@if(item.Product.Id == 18){
<p class="youhuiNew" style="color: #FF9900;">周卡送1天月卡送5天<br>新开和续费都可参加您可对同一账号多次续费都有赠送每位会员不限账号数量您可购买多个IP账号都有赠送<br>新产品上线全新IP池</p>
<p class="youhuiNew" style="color: #0066CC;padding:0;margin:0;">本产品目前所有地区都屏蔽QQ微信</p>
<p class="youhuiNew" style="color: #0066CC;padding:0;margin:0;">本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
@* <div style="text-align:center;cursor:pointer;padding: 0px;margin:0px;font-size:15px;font-weight:bold;color:red;" title="目前公布要停的地区为:
南京,重庆,六盘水,遵义,海口,无锡,常州,苏州,
铁岭,葫芦岛,抚顺,大连,辽源,通化,
@@ -513,8 +519,8 @@
@if(item.Product.Id == 14){
<p class="youhuiNew">天天IP于8.6日已恢复全新IP池欢迎选购<br>购买须知本产品新开账号屏蔽QQ微信<br>购买需选择左侧天天产品类型</p>
}
@if(item.Product.Id == 1){
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信</p>
@if(item.Product.Id == 1 || item.Product.Id == 25){
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
@* <div style="text-align:center;cursor:pointer;padding:5px;font-size:15px;font-weight:bold;color:red;" >购买须知本产品域名出现问题点击查看服务器ip地址<span
data-container="body" data-toggle="popover" data-placement="auto top"
data-content="强子1混播 122.228.64.103
@@ -535,7 +541,7 @@
});
</script>
@if(item.Product.Id == 2){
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信</p>
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
@* <div style="text-align:center;cursor:pointer;padding:5px;font-size:15px;font-weight:bold;color:red;" >购买须知本产品域名出现问题点击查看服务器ip地址<span
data-container="body" data-toggle="popover" data-placement="auto top"
data-content="讯连1混播 122.228.64.99
@@ -545,13 +551,13 @@
</div> *@
}
@if(item.Product.Id == 22 ||item.Product.Id == 23 ){
<p class="youhuiNew">购买须知本产品目前所有地区QQ微信仅限于登录游戏账号</p>
<p class="youhuiNew">购买须知本产品目前所有地区QQ微信仅限于登录游戏账号 云南以及非大陆地区禁用</p>
}
@if(item.Product.Id == 5){
<p class="youhuiNew">购买须知本产品目前所有地区都屏蔽QQ微信</p>
<p class="youhuiNew">购买须知本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
}
@if(item.Product.Id == 19){
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信</p>
<p class="youhuiNew" style="color: #0066CC;">本产品目前所有地区都屏蔽QQ微信 云南以及非大陆地区禁用</p>
<p class="youhuiNew" style="padding: 0px;margin:0px;">本产品为独享,每个账号对应一个宽带拨号,永不超载,保证了网速及稳定性。<br>使用时只需设置这个唯一的服务器1.hhip.vip在账号列表中点击切换地区即可任意组合自己需要的地区<br><span style="color: #000000;">切记一定要指定一下地区,不然会没有网络</span>
</p>
@* <div style="text-align:center;cursor:pointer;padding: 0px;margin:0px;font-size:15px;font-weight:bold;color:red;" title="目前公布要停的地区为:

View File

@@ -88,7 +88,7 @@
</div>
<div class="col-md-9 ">
<input id="weixinpay_s" v-model="pay_type" type="radio" name="OPayType" value="1" checked> <label for="weixinpay_s"><img src="~/img/wx.png">微信支付</label>
<input id="zhifubaopay_s" v-model="pay_type" type="radio" name="OPayType" value="2"> <label for="zhifubaopay_s"><img src="~/img/zfb.png">支付宝支付</label>
@* <input id="zhifubaopay_s" v-model="pay_type" type="radio" name="OPayType" value="2"> <label for="zhifubaopay_s"><img src="~/img/zfb.png">支付宝支付</label> *@
<input id="UseAccountAmount" v-model="pay_type" type="radio" name="OPayType" value="3"> <label for="UseAccountAmount">余额支付</label>
</div>
</div>
@@ -388,6 +388,7 @@
document.forms['alipaysubmit'].submit();
@* window.location.href = '/user/rosorder'; *@
} else if (res.code == 3) {
alert("购买成功");
@* window.location.href = '/user/rosorder'; *@
} else {
alert('付款失败!请联系客服!');

View File

@@ -237,7 +237,7 @@
支付方式:
</div>
<div class="col-lg-4 zhifufangshi">
<input id="zhifubaopay_s1" type="radio" name="OPayType" value="100" checked v-model="OneBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s1">支付宝支付</label>
@* <input id="zhifubaopay_s1" type="radio" name="OPayType" value="100" checked v-model="OneBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s1">支付宝支付</label> *@
<input id="weixinpay_s1" type="radio" name="OPayType" value="70" v-model="OneBuyModel.OPayType"> <img src="~/img/wx.png"><label for="weixinpay_s1">微信支付</label>
<input id="UseAccountAmount_s1" type="radio" name="OPayType" value="1" v-model="OneBuyModel.UseAccountAmount"> <label for="UseAccountAmount_s1">余额支付</label>
@@ -401,7 +401,7 @@
支付方式:
</div>
<div class="col-lg-4 zhifufangshi">
<input id="zhifubaopay_s" type="radio" name="OPayType" value="100" checked v-model="MoreBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s">支付宝支付</label>
@* <input id="zhifubaopay_s" type="radio" name="OPayType" value="100" checked v-model="MoreBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s">支付宝支付</label> *@
<input id="weixinpay_s" type="radio" name="OPayType" value="70" v-model="MoreBuyModel.OPayType"> <img src="~/img/wx.png"><label for="weixinpay_s">微信支付</label>
<input id="UseAccountAmount" type="radio" name="OPayType" value="1" v-model="MoreBuyModel.UseAccountAmount"> <label for="UseAccountAmount">余额支付</label>

View File

@@ -181,7 +181,7 @@
支付方式:
</div>
<div class="col-lg-4 zhifufangshi">
<input id="zhifubaopay_s1" type="radio" name="OPayType" value="100" checked v-model="OneBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s1">支付宝支付</label>
@* <input id="zhifubaopay_s1" type="radio" name="OPayType" value="100" checked v-model="OneBuyModel.OPayType"> <img src="~/img/zfb.png"><label for="zhifubaopay_s1">支付宝支付</label> *@
<input id="weixinpay_s1" type="radio" name="OPayType" value="70" v-model="OneBuyModel.OPayType"> <img src="~/img/wx.png"><label for="weixinpay_s1">微信支付</label>
<input id="UseAccountAmount_s1" type="radio" name="OPayType" value="1" v-model="OneBuyModel.UseAccountAmount"> <label for="UseAccountAmount_s1">余额支付</label>

View File

@@ -235,7 +235,7 @@
</div>
<div class="form-group">
<label>支付方式:</label>
<input type="radio" name="PayChannel" value="50" checked> <img src="~/img/zfb.png">支付宝支付
@* <input type="radio" name="PayChannel" value="50" checked> <img src="~/img/zfb.png">支付宝支付 *@
<input type="radio" name="PayChannel" value="30"> <img src="~/img/wx.png">微信支付
</div>

View File

@@ -118,6 +118,10 @@ FROM product_order where OrderState=20 or OrderState=90 or OrderState=40 or Orde
public List<OrderStatisticModel> Statistics(DateTime? bTime, DateTime? eTime, int ProductId)
{
string where = $" (OrderState=20 or OrderState=90 or OrderState=40 or OrderState=50 or OrderState=30) ";
// if (bTime.HasValue && eTime.HasValue)
// {
where += $"and UpdateTime>DATE_SUB(CURDATE(), INTERVAL 30 DAY) and UpdateTime<now()";
// }
if (bTime.HasValue && eTime.HasValue)
{
where += $"and UpdateTime>'{bTime.Value.ToString("yyyy-MM-dd")}' and UpdateTime<'{eTime.Value.ToString("yyyy-MM-dd")}'";
@@ -235,14 +239,14 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
{
return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "产品不存在或者下架");
}
if (productEntity.Status == 0)
{
return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "产品不存在或者下架");
}
if (productEntity.Status == 0)
{
return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "服务不在线");
}
// if (productEntity.Status == 0)
// {
// return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "产品不存在或者下架");
// }
// if (productEntity.Status == 0)
// {
// return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "服务不在线");
// }
if (request.Account == request.Pwd)
{
@@ -310,7 +314,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
if (packageEntity.ProductId != 23 &&packageEntity.ProductId != 22 && ProductAccountCount == 0 && request.OrderType != OrderType.News && (packageEntity.DayCount == 1||packageEntity.DayCount == 2) && request.ConnectCount == 1 && request.OrderType!=OrderType.AgainBuy&& request.OrderType!=OrderType.AgainBuys){
price = 0.1M;
// price = 0.1M;
userEntity.ProductAccountCount = 1;
await m_UserService.Update(userEntity);
}
@@ -824,6 +828,236 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
}
/// <summary>
/// 处理成功的订单
/// </summary>
/// <param name="order"></param>
/// <returns></returns>
public async Task ApiProcessOrderAccount(ProductOrderEntity order,string remark)
{
if (order.OrderState != OrderStatus.PayOk || order.Accounts == null) return;
var isOk = true;
var accounts = order.Accounts.Split(',').ToList();
accounts = accounts.Distinct().ToList();
var userEntity = await m_UserService.GetById(order.UserId);
var user_remark = "";
if(order.ProductId == 8||order.ProductId == 7) {
//用户信息
user_remark = userEntity.Name.Substring(0,1) + "**" + userEntity.Phone.Substring(0,3) + "********" + userEntity.id_code.Substring(0,3)+"***************";
}
if (order.OrderType == OrderType.New || order.OrderType == OrderType.News)
{
var accountEntitys = new List<ProductAccountEntity>();
await accounts.ForEachAsync(async account =>
{
var accountEntity = new ProductAccountEntity()
{
Account = account,
AccountType = (int)order.OrderType,
ConnectCount = order.ConnectCount,
StartTime = DateTime.Now,
EndTime = DateTime.Now.AddDays(order.DayCount),
PackageId = order.PackageId,
PackageName = order.PackageName,
ProductId = order.ProductId,
ProductName = order.ProductName,
Pwd = order.AccountPwd,
ChargeStatus = AccountChargeStatus.Normal,
UserId = order.UserId,
UserCode = order.UserName,
agent_id = order.agent_id,
UserPhone = order.Remark,
Remark = remark
};
accountEntitys.Add(accountEntity);
});
using (var tran2 = await m_DbContext.Database.BeginTransactionAsync())
{
try
{
await m_ProductAccountService.Adds(accountEntitys);
order.OrderState = OrderStatus.Complete;
order.StartTime = DateTime.Now;
order.EndTime = DateTime.Now.AddDays(order.DayCount);
order.Remark = remark;
await this.Update(order);
tran2.Commit();
}
catch (Exception ex)
{
LogHelper.Error("处理订单创建账号", ex);
isOk = false;
tran2.Rollback();
}
}
if (isOk)
{
var accountError = "";
await accountEntitys.ForEachAsync(async accountEntity =>
{
var ret = new ApiResult();
if(accountEntity.PackageId.Value == 86 || accountEntity.PackageId.Value == 88){
ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount,1,2);
} else if(accountEntity.ProductId.Value == 8 || accountEntity.ProductId.Value == 7){
var account_remark = accountEntity.Account + "-" + user_remark;
ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, account_remark, accountEntity.Pwd, accountEntity.ConnectCount,1,2);
} else if (accountEntity.PackageId.Value > 1034 && accountEntity.PackageId.Value < 1040) {
ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount,2);
}
else if (accountEntity.PackageId.Value > 1040 && accountEntity.PackageId.Value < 1046) {
ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount,3);
}
else {
ret = await m_AgentService.NewAccount(order.Id, accountEntity.PackageId.Value, accountEntity.Account, accountEntity.Pwd, accountEntity.ConnectCount);
}
if (ret.Code != ResultCode.C_SUCCESS)
{
accountEntity.ChargeStatus = AccountChargeStatus.Exception;
accountEntity.Remark = ret.Message;
await m_ProductAccountService.Update(accountEntity);
}
else if (ret.Data != null && ret.Data.ToString().Has())
{
accountEntity.Raw = ret.Data.ToString();
await m_ProductAccountService.Update(accountEntity);
}
});
if (accountError.Has())
{
order.Remark = accountError;
await this.Update(order);
}
}
}
else if (order.OrderType == OrderType.AgainBuy || order.OrderType == OrderType.AgainBuys)
{
var accountEntitys = await m_ProductAccountService.Query(p => p.UserId == order.UserId && p.DeleteTag == 0 && p.ProductId == order.ProductId && accounts.Contains(p.Account)).ToListAsync();
accountEntitys = accountEntitys.Distinct(new AccountEntityEq()).ToList();
await accountEntitys.ForEachAsync(async account =>
{
if (account.EndTime < DateTime.Now)
{
account.StartTime = DateTime.Now;
account.EndTime = DateTime.Now.AddDays(order.DayCount);
}
else
{
account.EndTime = account.EndTime.Value.AddDays(order.DayCount);
}
account.PackageId = order.PackageId;
account.PackageName = order.PackageName;
account.ProductId = order.ProductId;
account.ProductName = order.ProductName;
account.AccountType = (int)order.OrderType;
});
using (var tran3 = await m_DbContext.Database.BeginTransactionAsync())
{
try
{
await m_ProductAccountService.Update(accountEntitys);
order.OrderState = OrderStatus.Complete;
order.StartTime = DateTime.Now;
order.EndTime = DateTime.Now.AddDays(order.DayCount);
order.Remark = remark;
await this.Update(order);
tran3.Commit();
}
catch (Exception ex)
{
LogHelper.Error("处理续费订单", ex);
isOk = false;
tran3.Rollback();
}
}
if (isOk)
{
var accountError = "";
var product = await m_ProductService.GetById(order.ProductId);
await accountEntitys.ForEachAsync(async accountEntity =>
{
var account = accountEntity.Account;
// if (product.GroupNO == "g7") account = accountEntity.Raw;
var ret = new ApiResult();
if (order.PackageId == 86){
ret = await m_AgentService.ReNewAccount(order.Id, order.PackageId, account, order.ConnectCount,2);
} else {
ret = await m_AgentService.ReNewAccount(order.Id, order.PackageId, account, order.ConnectCount);
}
if (ret.Code != ResultCode.C_SUCCESS)
{
accountEntity.ChargeStatus = AccountChargeStatus.Exception;
accountEntity.Remark = ret.Message;
await m_ProductAccountService.Update(accountEntity);
accountError += $"{accountEntity.Account}{accountEntity.Remark},";
}
});
if (accountError.Has())
{
order.Remark = accountError;
await this.Update(order);
}
}
}
if(order.agent_id != 0 && order.PaymentAmount != 0.1M){
var agentEntity = await m_AgentUserService.Query(m => m.id == order.agent_id).FirstOrDefaultAsync();
//根据折扣设置价格
var score_money = 0.00M;
// if((userEntity.agent_id == 0||(userEntity.agent_id != 0 && userEntity.discount_id != 0)) && userEntity.discount_id >= 0){
// //获取代理折扣
// var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
// var packageEntity = await m_ProductPackageService.GetById(order.PackageId);
// var price = packageEntity.LinePrice * discount.discount / 100;
// score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * price;
// } else {
// var agentPriceEntity = await m_AgentPriceService.Query(m => m.agent_id == order.agent_id && m.package_id == order.PackageId).FirstOrDefaultAsync();
// score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * agentPriceEntity.price;
// }
if(agentEntity.discount_id != 0){
//获取代理折扣
var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
var packageEntity = await m_ProductPackageService.GetById(order.PackageId);
var price = packageEntity.LinePrice * discount.discount / 100;
score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * price;
}
var agnetScoreEntity = new AgentScoreEntity()
{
agent_id = order.agent_id,
order_id = order.Id,
score_type = 1,
score_value = score_money,
remark = "客户购买产品" + order.Accounts,
agent_name = agentEntity.username,
op_user = order.UserName,
rest_amount1 = agentEntity.account,
rest_amount2 = agentEntity.account + score_money
};
agentEntity.account += score_money;
await m_AgentScoreService.Add(agnetScoreEntity);
await m_AgentUserService.Update(agentEntity);
}
}
public async Task<ApiResult> Refund(int userId, string account)
{