Merge remote-tracking branch 'origin/develop' into develop

master
eason.qian 7 years ago
commit 2c313cbf65

@ -67,6 +67,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
int client_id = device.getIntValue("client_id"); int client_id = device.getIntValue("client_id");
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id); List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
JSONObject res = new JSONObject(); JSONObject res = new JSONObject();
res.put("operation_pause",false);
Boolean apply = false; Boolean apply = false;
if (!clientLogs.isEmpty()) { if (!clientLogs.isEmpty()) {
apply = true; apply = true;
@ -82,6 +83,10 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
res.put("active", true); res.put("active", true);
res.put("expire", false); res.put("expire", false);
} }
LocalDateTime dt = LocalDateTime.now();
if(dt.getDayOfWeek()==DayOfWeek.MONDAY && dt.getHour()<18){
res.put("operation_pause",true);
}
BigDecimal total_redpack = actMonDelaySettleRedPackMapper.getTotalRedPack(client_id); BigDecimal total_redpack = actMonDelaySettleRedPackMapper.getTotalRedPack(client_id);
PageList<JSONObject> list = actMonDelaySettleRedPackMapper.listRedpacks(client_id, new PageBounds(Order.formString("create_time.desc"))); PageList<JSONObject> list = actMonDelaySettleRedPackMapper.listRedpacks(client_id, new PageBounds(Order.formString("create_time.desc")));
res.put("apply", apply); res.put("apply", apply);

@ -53,8 +53,8 @@
</button> </button>
</div> </div>
<div class="button_center" th:if="${active && !apply}" id="applyButton"> <div class="button_center" th:if="${active && !apply}" id="applyButton">
<button class="button_position"> <button class="button_position" th:style="'background-image:' + @{(${operation_pause} ? 'linear-gradient(0deg, #eee 0%, #eee 100%)' )} + ''">
<span style="color: #FFFFFF;">我要参加</span> <span style="color: #FFFFFF;" th:style="'color:' + @{(${operation_pause} ? '#999' )} + ''">我要参加</span>
</button> </button>
</div> </div>
<div th:class="${apply}?'margin_top'" th:if="${list!=null}"> <div th:class="${apply}?'margin_top'" th:if="${list!=null}">
@ -87,8 +87,8 @@
</div> </div>
</div> </div>
<div class="button_center cancel_posttion" th:if="${active && apply}" id="cancelButton"> <div class="button_center cancel_posttion" th:if="${active && apply}" id="cancelButton">
<button class="button_position button_color"> <button class="button_position button_color" th:style="'background-image:' + @{(${operation_pause} ? 'linear-gradient(0deg, #eee 0%, #eee 100%)' )} + ''">
<span class="cancel">放弃活动资格</span> <span class="cancel" th:style="'color:' + @{(${operation_pause} ? '#999' )} + ''">放弃活动资格</span>
</button> </button>
</div> </div>
@ -110,7 +110,7 @@
</html> </html>
<script type="text/javascript" data-th-inline="javascript"> <script type="text/javascript" data-th-inline="javascript">
$(document).ready(function () { $(document).ready(function () {
var operation_pause= /*[[${operation_pause}]]*/false;
function is_weixin() { function is_weixin() {
var ua = navigator.userAgent.toLowerCase(); var ua = navigator.userAgent.toLowerCase();
@ -121,6 +121,9 @@
} }
} }
$('#applyButton').click(function () { $('#applyButton').click(function () {
if(operation_pause){
return;
}
var u = navigator.userAgent; var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
@ -135,6 +138,9 @@
} }
}); });
$('#cancelButton').click(function () { $('#cancelButton').click(function () {
if(operation_pause){
return;
}
var u = navigator.userAgent; var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);

@ -212,4 +212,3 @@ tbody tr:nth-child(odd){
letter-spacing: 0px; letter-spacing: 0px;
padding: 0 8px; padding: 0 8px;
} }

Loading…
Cancel
Save