优惠券
This commit is contained in:
@@ -14,7 +14,17 @@
|
||||
<li><img src="~/m/img/p1.png"><a asp-action="myorders" asp-controller="user">我的订单<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p2.png"><a asp-action="myrefundorders" asp-controller="user">退货订单<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p3.png"><a asp-action="myaccounts" asp-controller="user">IP账号管理<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p4.png"><a asp-action="mycoupons" asp-controller="user">我的优惠券<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p4.png"><a asp-action="mycoupons" asp-controller="user">我的优惠券 <span style="background-color: red;font-size:25px;" class="badge" id="coupon_num"></span><img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p4.png"></span><a asp-action="cashout" asp-controller="user">提现管理<img src="~/m/img/arrow.png"></a></li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
var url = '/api/sells/v1/coupon/GetAvailableCoupon';
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
$("#coupon_num").text(res.Data.length);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
<img src="~/img/p4.png"><a href="/user/myaccounts">IP账号管理</a>
|
||||
</div>
|
||||
<div class="item @(currentPath=="/user/mycoupons"?"active_b":"")">
|
||||
<img src="~/img/p5.png"><a href="/user/mycoupons">我的优惠券</a>
|
||||
<img src="~/img/p5.png"><a href="/user/mycoupons">我的优惠券 <span style="background-color: red;" class="badge" id="coupon_num"></span></a>
|
||||
</div>
|
||||
<div class="item @(currentPath=="/user/cashout"?"active_b":"")">
|
||||
<span class="glyphicon glyphicon-jpy" style="padding: 10px;"></span><a href="/user/cashout">提现管理</a>
|
||||
@@ -211,7 +211,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<script id="qd28521381485d6faa97edf5ad07d7e159f6cb902af0" src="https://wp.qiye.qq.com/qidian/2852138148/5d6faa97edf5ad07d7e159f6cb902af0" charset="utf-8" async defer></script>
|
||||
|
||||
<script>
|
||||
var url = '/api/sells/v1/coupon/GetAvailableCoupon';
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
$("#coupon_num").text(res.Data.length);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Hncore.Pass.Sells.Service
|
||||
|
||||
public async Task<List<UserCouponModel>> GetUserCoupon(int userId)
|
||||
{
|
||||
var oroginCoupons = m_CouponUserOrginService.Query(m => m.ToUser == userId && DateTime.Now <= m.EndTime);
|
||||
var oroginCoupons = m_CouponUserOrginService.Query(m => m.ToUser == userId && m.Status == CouponStatus.Origin && DateTime.Now <= m.EndTime);
|
||||
|
||||
var hasCoupon = from orgin in oroginCoupons
|
||||
join coupon in this.Query(true) on orgin.CouponId equals coupon.Id
|
||||
|
||||
Reference in New Issue
Block a user