Merge remote-tracking branch 'origin/activity' into activity
This commit is contained in:
commit
f1220707f9
|
|
@ -1,8 +1,7 @@
|
|||
package com.ruoyi.web.controller.draw;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.dto.DrawActivityRequest;
|
||||
import com.ruoyi.web.vo.Const;
|
||||
import com.ruoyi.dto.*;
|
||||
import com.ruoyi.web.vo.Result;
|
||||
import com.ruoyi.web.vo.draw.*;
|
||||
import com.sinosoft.activity.domain.DrawConfig;
|
||||
|
|
@ -12,6 +11,7 @@ import com.sinosoft.activity.service.IDrawConfigService;
|
|||
import com.sinosoft.activity.service.IDrawInfoService;
|
||||
import com.sinosoft.activity.service.IDrawTaskNotifyService;
|
||||
import com.sinosoft.activity.service.*;
|
||||
import com.sinosoft.activity.service.impl.ActPageConfigUserinfoServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
|
@ -19,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
|
|||
import me.chanjar.weixin.common.bean.WxOAuth2UserInfo;
|
||||
import me.chanjar.weixin.common.bean.oauth2.WxOAuth2AccessToken;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -32,6 +31,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -58,11 +58,18 @@ public class DrawController {
|
|||
@Autowired
|
||||
private IActConfigService actConfigService;
|
||||
@Autowired
|
||||
private ActPageConfigUserinfoServiceImpl actPageConfigUserinfoServiceImpl;
|
||||
@Autowired
|
||||
private IActPageConfigSubscribeService iActPageConfigSubscribeService;
|
||||
|
||||
@Autowired
|
||||
private IActPageConfigUserinfoService iActPageConfigUserinfoService;
|
||||
@Autowired
|
||||
private IDrawRecordService iDrawRecordService;
|
||||
|
||||
@Autowired
|
||||
private IDrawUserInfoService iDrawUserInfoService;
|
||||
@Autowired
|
||||
private IDrawTaskNotifyService taskNotifyService;
|
||||
@Autowired
|
||||
private IDrawRuleService drawRuleService;
|
||||
|
|
@ -174,12 +181,12 @@ public class DrawController {
|
|||
|
||||
@RequestMapping(value="/info.action", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public ActPageConfigUserinfoResult info(HttpServletRequest request, String drawCode) {
|
||||
public ActPageConfigUserinfoResult info(HttpServletRequest request, String actCode) {
|
||||
ActPageConfigUserinfoResult result = new ActPageConfigUserinfoResult();
|
||||
logger.info("活动编码"+drawCode);
|
||||
logger.info("活动编码"+actCode);
|
||||
try{
|
||||
List<ActPageConfigUserinfo> prizes = new ArrayList<ActPageConfigUserinfo>();
|
||||
ActPageConfigUserinfo actPageConfigUserinfo = iActPageConfigUserinfoService.selectActPageConfigUserinfoByCode(drawCode);
|
||||
ActPageConfigUserinfo actPageConfigUserinfo = iActPageConfigUserinfoService.selectActPageConfigUserinfoByCode(actCode);
|
||||
prizes.add(actPageConfigUserinfo);
|
||||
result.setActPageConfigUserinfo(prizes);
|
||||
}catch (Exception e){
|
||||
|
|
@ -193,51 +200,28 @@ public class DrawController {
|
|||
@ResponseBody
|
||||
public PrizeResult prizes(HttpServletRequest request, String drawCode, String isAll) {
|
||||
PrizeResult result = new PrizeResult();
|
||||
List<Prize> prizes = new ArrayList<Prize>();
|
||||
List<DrawRecord> prizes = new ArrayList<DrawRecord>();
|
||||
try {
|
||||
|
||||
HttpSession session = request.getSession();
|
||||
WxOAuth2UserInfo userInfo = getUserInfo(request, null);
|
||||
if (userInfo == null && !"1".equals(isAll)) {
|
||||
result.setPrizes(prizes);
|
||||
/* if (userInfo == null && !"1".equals(isAll)) {
|
||||
result.setRecord(prizes);
|
||||
return result;
|
||||
}
|
||||
String userId = null;
|
||||
if (!"1".equals(isAll)) {
|
||||
}*/
|
||||
String userId ="";
|
||||
/* if (!"1".equals(isAll)) {
|
||||
Long userId1 = ShiroUtils.getUserId();
|
||||
userId = userInfo.getOpenid();
|
||||
}*/
|
||||
List<DrawRecord> drawRecords = iDrawRecordService.selectDrawRecordCodeList(drawCode, userId);
|
||||
for (DrawRecord draw: drawRecords) {
|
||||
String mobile = draw.getPHONE();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
draw.setPHONE(mobile.substring(0, 3) + "****" + mobile.substring(7, mobile.length()));
|
||||
}
|
||||
}
|
||||
// AwardPrizeListResponse awardPrizeListResponse = activityService.awardPrizeList(drawCode, userId).get_return();
|
||||
// AwardPrizeListResponseHeader header = awardPrizeListResponse.getHeader();
|
||||
// result.setRespCode(header.getResultCode());
|
||||
// result.setRespMsg(header.getResultInfo());
|
||||
// AwardPrizeListResponseBody responseBody = awardPrizeListResponse.getResponseBody();
|
||||
// AwardPrizeList[] awardPrizes = responseBody.getAwardPrizeLists();
|
||||
// if (awardPrizes != null) {
|
||||
// for (int i = 0; i < awardPrizes.length; i++) {
|
||||
// AwardPrizeList awardPrize = awardPrizes[i];
|
||||
// Prize prize = new Prize();
|
||||
// prize.setPrizeCode(awardPrize.getPrizeCode());
|
||||
// prize.setPrizeName(awardPrize.getPrizeName());
|
||||
// prize.setPrizeType(awardPrize.getPrizeType());
|
||||
// prize.setDrawTime(DateUtil.convertDate(DateUtil.convertStringToDate(awardPrize.getDrawTime(), DateUtil.YYYYMMDDHHMMSSS), "yyyy/MM/dd HH:mm"));
|
||||
// prize.setStatus(awardPrize.getStatus());
|
||||
// prize.setExtId(awardPrize.getExtId());
|
||||
// prize.setGatewayFlow(awardPrize.getGatewayFolw());
|
||||
// String userName = awardPrize.getUserName();
|
||||
// if (StringUtils.isNotBlank(userName)) {
|
||||
// int end = 1;
|
||||
// if (userName.length()==2) {
|
||||
// end = 0;
|
||||
// }
|
||||
// prize.setUserName(StringUtil.getStarString2(userName, 1, end));
|
||||
// }
|
||||
// String mobile = awardPrize.getMobile();
|
||||
// if (StringUtils.isNotBlank(mobile)) {
|
||||
// prize.setMobile(StringUtil.getStarString2(mobile, 3, 4));
|
||||
// }
|
||||
// prizes.add(prize);
|
||||
// }
|
||||
// }
|
||||
result.setPrizes(prizes);
|
||||
result.setRecord(drawRecords);
|
||||
} catch (Exception e) {
|
||||
result.setRespCode("-1");
|
||||
result.setRespMsg("系统异常,请稍后再试");
|
||||
|
|
@ -309,42 +293,13 @@ public class DrawController {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
@RequestMapping(value="/saveAddress.action", method = RequestMethod.POST)
|
||||
@RequestMapping(value="/saveAddress", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Result saveAddress(HttpServletRequest request, String drawCode, String uname, String phone, String addr, String flow) {
|
||||
public Result saveAddress(HttpServletRequest request, DrawUserInfo userInfo) {
|
||||
Result result = new Result();
|
||||
try {
|
||||
HttpSession session = request.getSession();
|
||||
WxOAuth2UserInfo userInfo = getUserInfo(request, null);
|
||||
if (userInfo == null) {
|
||||
result.setRespCode("-2");
|
||||
result.setRespMsg("会话已失效,请重新登录");
|
||||
logger.info("DrawController.saveAddress userId is null");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(uname)) {
|
||||
result.setRespCode("-4");
|
||||
result.setRespMsg("请输入姓名");
|
||||
return result;
|
||||
}
|
||||
// String validateMobile = CommonValidate.validateMobile(phone, "1");
|
||||
// if (StringUtils.isNotBlank(validateMobile)) {
|
||||
// result.setRespCode("-4");
|
||||
// result.setRespMsg(validateMobile);
|
||||
// return result;
|
||||
// }
|
||||
String userId = userInfo.getOpenid();
|
||||
// SaveUserAddressRequestBody requestBody = new SaveUserAddressRequestBody();
|
||||
// requestBody.setDrawCode(drawCode);
|
||||
// requestBody.setGatewayFlow(flow);
|
||||
// requestBody.setUserId(userId);
|
||||
// requestBody.setUserName(uname);
|
||||
// requestBody.setPhone(phone);
|
||||
// requestBody.setAddress(addr);
|
||||
// //实物留资
|
||||
// requestBody.setNotifyType("007");
|
||||
// requestBody.setCity("无");
|
||||
// activityService.saveUserAddress(requestBody);
|
||||
userInfo.setCreateTime(new Date());
|
||||
iDrawUserInfoService.insertDrawUserInfo(userInfo);
|
||||
} catch (Exception e) {
|
||||
result.setRespCode("-1");
|
||||
result.setRespMsg("系统异常,请稍后再试");
|
||||
|
|
@ -410,7 +365,7 @@ public class DrawController {
|
|||
}catch (Exception e){
|
||||
result.setRespCode("-1");
|
||||
result.setRespMsg("系统异常,请稍后再试");
|
||||
logger.error("DrawController.saveAddress ex: ", e);
|
||||
logger.error("DrawController.qrCode ex: ", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
@ -431,5 +386,4 @@ public class DrawController {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
package com.ruoyi.web.vo.draw;
|
||||
|
||||
import com.ruoyi.web.vo.Result;
|
||||
import com.sinosoft.activity.domain.DrawRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PrizeResult extends Result {
|
||||
private List<Prize> prizes;
|
||||
|
||||
private List<DrawRecord> record;
|
||||
|
||||
public List<Prize> getPrizes() {
|
||||
return prizes;
|
||||
}
|
||||
|
|
@ -14,4 +17,12 @@ public class PrizeResult extends Result {
|
|||
public void setPrizes(List<Prize> prizes) {
|
||||
this.prizes = prizes;
|
||||
}
|
||||
|
||||
public List<DrawRecord> getRecord() {
|
||||
return record;
|
||||
}
|
||||
|
||||
public void setRecord(List<DrawRecord> record) {
|
||||
this.record = record;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
<meta charset="UTF-8">
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<title>活动</title>
|
||||
<link rel="stylesheet" href="../draw/css/reset.css">
|
||||
<link rel="stylesheet" href="../draw/css/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/popup.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/myPrize.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/register.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/winPrize.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/goods.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/rule.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/address.css">
|
||||
<script src="/js/config.js"></script>
|
||||
<link rel="stylesheet" href="../draw/css/main.css">
|
||||
<script src="../draw/js/jquery-1.9.1.min.js"></script>
|
||||
<script src="../draw/js/awardRotate.js"></script>
|
||||
<script src="../draw/js/util.js"></script>
|
||||
<script src="../draw/js/draw.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
async: false,
|
||||
url: contextRootPath + "/draw/info.action",
|
||||
data: {actCode: drawCode},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
//todo 根据风格改变css样式
|
||||
$(".act_guide").attr("background",data.actPageConfigUserinfo[0].bgImg);
|
||||
$("#titlePri").text(data.actPageConfigUserinfo[0].title);
|
||||
$("#describePri").text(data.actPageConfigUserinfo[0].description);
|
||||
$("#agreementPri").val(data.actPageConfigUserinfo[0].agreement);
|
||||
$("#btnPri").text(data.actPageConfigUserinfo[0].btnText);
|
||||
if (data.actPageConfigUserinfo[0].mobile=='on'){
|
||||
$("#phonePri").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].mobile=='on'){
|
||||
$("#phone").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].userName=='on'){
|
||||
$("#name").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].gender=='on'){
|
||||
$("#gender").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].address=='on'){
|
||||
document.getElementById("address").style.display="block";
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].agentName=='on'){
|
||||
$("#agentName").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].agentMobile=='on'){
|
||||
$("#agentMobile").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].agentGender=='on'){
|
||||
$("#agentGender").attr('type','text')
|
||||
}
|
||||
if (data.actPageConfigUserinfo[0].agentNo=='on'){
|
||||
document.getElementById("agentNo").style.display="block";
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="template_bg popupBox act_guide" style="background-color: #fbdaaf;
|
||||
background-repeat:no-repeat;
|
||||
background-attachment:fixed;
|
||||
background-size:100% 100%;">
|
||||
<form id="addressId" >
|
||||
<div class='popup address'>
|
||||
<div class='popupMin'>
|
||||
<div class='cont'>
|
||||
<div id="titlePri"></div>
|
||||
<div id="describePri"></div>
|
||||
|
||||
<div >请填写您的基本信息</div>
|
||||
|
||||
<input placeholder="姓名" name="userName" class="uname" type="hidden" id="name">
|
||||
|
||||
<input placeholder="手机号" class="phone" name="mobile" type="hidden" id="phone" maxlength="11">
|
||||
|
||||
<input placeholder="性别" class="gender" name="gender" height="10px" type="hidden" id="gender">
|
||||
|
||||
<textarea placeholder="地址" class="address" name="address" style="display:none;" id="address"></textarea>
|
||||
|
||||
<input placeholder="代理人姓名" class="agentName" name="agentName" type="hidden" id="agentName">
|
||||
|
||||
<input placeholder="代理人手机号" class="agentMobile" name="agentMobile" type="hidden" id="agentMobile" maxlength="11">
|
||||
|
||||
<input placeholder="代理人性别" class="agentGender" name="agentGender" type="hidden" id="agentGender">
|
||||
|
||||
<input placeholder="代理人工号" class="agentNo" name="agentNo" style="display:none;" id="agentNo">
|
||||
<div>
|
||||
<input type="checkbox" id="protocol"checked="checked" >
|
||||
<a onclick="protocol(this)" >点击查看协议</a>
|
||||
<input id="agreementPri" type="hidden">
|
||||
</div>
|
||||
|
||||
<button type="button" id="btnPri" class='button' onclick="saveAddr()"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!--登记 弹窗-->
|
||||
<div class='popup register' style="display: none;">
|
||||
<div class='popupMin'>
|
||||
<img src="../draw/images/top01.png" class='top'>
|
||||
<div class='popCont'>
|
||||
<div class='left'></div>
|
||||
<div class='cont'>
|
||||
<img src="../draw/images/success.png" >
|
||||
<div>信息登记成功</div>
|
||||
<div>奖品将在活动结束后四十个工作日寄送</div>
|
||||
<div type="button" class='button1' onclick="qrCode()">关注微信</div>
|
||||
</div>
|
||||
<div class='right'></div>
|
||||
</div>
|
||||
<img src="../draw/images/popupList04.png" class='bottom'>
|
||||
</div>
|
||||
<img src="../draw/images/delect.png" class='popDelect regDelect'>
|
||||
</div>
|
||||
<div class="tip_copy" style="display: none;">
|
||||
<p></p>
|
||||
</div>
|
||||
<script src="../draw/js/main.js"></script>
|
||||
<script src="../draw/js/scroll.js"></script>
|
||||
<script src="../draw/js/common.js"></script>
|
||||
</body>
|
||||
<script>
|
||||
function qrCode(){
|
||||
window.location.href='subscribe.html?drawCode='+drawCode;
|
||||
}
|
||||
function protocol() {
|
||||
var e = $("#agreementPri").val();
|
||||
alert(e)
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
.address{
|
||||
/* opacity:0;
|
||||
height:0; */
|
||||
}
|
||||
.popupMin{
|
||||
width:100%;
|
||||
margin-left:0%;
|
||||
height:auto !important;
|
||||
box-sizing: border-box;
|
||||
position:relative;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
/* max-height:1200px; */
|
||||
margin-bottom:56px;
|
||||
}
|
||||
.address .cont{
|
||||
min-height:400px;
|
||||
margin-top:-0px;
|
||||
|
||||
}
|
||||
.address .popCont{
|
||||
z-index: 1000;
|
||||
}
|
||||
.address .cont{
|
||||
background-size: 100% auto;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.address .cont>div:nth-child(1){
|
||||
font-size:23px;
|
||||
color:#ffe2ab;
|
||||
text-align:center;
|
||||
margin-top:20px;
|
||||
}
|
||||
.address .cont>div:nth-child(2){
|
||||
font-size:17px;
|
||||
color:#ffe2ab;
|
||||
text-align:center;
|
||||
margin-top:9px;
|
||||
font-weight:bold;
|
||||
|
||||
}
|
||||
.address .cont>div:nth-child(3){
|
||||
font-size:17px;
|
||||
color:#ffe2ab;
|
||||
text-align:center;
|
||||
margin-top:20px;
|
||||
font-weight:bold;
|
||||
}
|
||||
.address .cont>div:nth-child(12){
|
||||
font-size:17px;
|
||||
color:#ffe2ab;
|
||||
margin-top:15px;
|
||||
margin-right:35%;
|
||||
|
||||
}
|
||||
.address .cont>div:nth-child(13){
|
||||
font-size:17px;
|
||||
color:#ffe2ab;
|
||||
text-align:center;
|
||||
margin-top:20px;
|
||||
font-weight:bold;
|
||||
}
|
||||
.address .cont>img:last-child{
|
||||
width:83%;
|
||||
height:auto;
|
||||
object-fit:contain;
|
||||
margin-top:20px;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.address .cont>input{
|
||||
width:90%;
|
||||
height:30px;
|
||||
box-sizing: border-box;
|
||||
margin:0;
|
||||
padding:0 15px;
|
||||
border:1px solid #f2ca77;
|
||||
border-radius:15px;
|
||||
background: #fff;
|
||||
margin-top:12px;
|
||||
}
|
||||
.address .cont>textarea{
|
||||
width:90% !important;
|
||||
max-width:90% !important;
|
||||
min-height:60px;
|
||||
box-sizing: border-box;
|
||||
margin:0;
|
||||
padding:8px 15px;
|
||||
border:1px solid #f2ca77;
|
||||
border-radius:15px;
|
||||
background: #fff;
|
||||
margin-top:10px;
|
||||
outline: none;
|
||||
line-height:20px;
|
||||
}
|
||||
.button { /* 按钮美化 */
|
||||
width: 40px; /* 宽度 */
|
||||
height: 30px; /* 高度 */
|
||||
border-width: 0px; /* 边框宽度 */
|
||||
border-radius: 3px; /* 边框半径 */
|
||||
background: #f43c24; /* 背景颜色 */
|
||||
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
|
||||
outline: none; /* 不显示轮廓线 */
|
||||
font-family: Microsoft YaHei; /* 设置字体 */
|
||||
color: white; /* 字体颜色 */
|
||||
font-size: 17px; /* 字体大小 */
|
||||
}
|
||||
.button:hover { /* 鼠标移入按钮范围时改变颜色 */
|
||||
background: #5599FF;
|
||||
}
|
||||
.button1 { /* 按钮美化 */
|
||||
width: 80px; /* 宽度 */
|
||||
height: 30px; /* 高度 */
|
||||
border-width: 0px; /* 边框宽度 */
|
||||
border-radius: 3px; /* 边框半径 */
|
||||
background: #fff150; /* 背景颜色 */
|
||||
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
|
||||
outline: none; /* 不显示轮廓线 */
|
||||
font-family: Microsoft YaHei; /* 设置字体 */
|
||||
color: white; /* 字体颜色 */
|
||||
font-size: 17px; /* 字体大小 */
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
.p {
|
||||
clear: both;
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
.drawCodeImgPic {
|
||||
display: block;
|
||||
margin:250px auto;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
.drawQrCodePri {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 70%;
|
||||
font-size: 25px;
|
||||
left: 0%;
|
||||
color: #F00;
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -14,42 +14,11 @@
|
|||
<link rel="stylesheet" type="text/css" href="../draw/css/winPrize.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/goods.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../draw/css/rule.css"/>
|
||||
<script src="/static/js/config.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/subscribe.css">
|
||||
|
||||
<script src="/js/config.js"></script>
|
||||
<style type="text/css">
|
||||
.button { /* 按钮美化 */
|
||||
width: 200px; /* 宽度 */
|
||||
height: 40px; /* 高度 */
|
||||
border-width: 0px; /* 边框宽度 */
|
||||
border-radius: 3px; /* 边框半径 */
|
||||
background: #1E90FF; /* 背景颜色 */
|
||||
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
|
||||
outline: none; /* 不显示轮廓线 */
|
||||
font-family: Microsoft YaHei; /* 设置字体 */
|
||||
color: white; /* 字体颜色 */
|
||||
font-size: 17px; /* 字体大小 */
|
||||
}
|
||||
.button:hover { /* 鼠标移入按钮范围时改变颜色 */
|
||||
background: #5599FF;
|
||||
}
|
||||
p {
|
||||
clear: both;
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
.drawCodeImgPic {
|
||||
display: block;
|
||||
margin:250px auto;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
.drawQrCodePri {
|
||||
text-align: center;
|
||||
position:AS absolute;
|
||||
top: 70%;
|
||||
font-size: 25px;
|
||||
left: 0%;
|
||||
color: #F00;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="../draw/css/main.css">
|
||||
<script src="../draw/js/jquery-1.9.1.min.js"></script>
|
||||
|
|
@ -95,16 +64,4 @@
|
|||
<script src="../draw/js/scroll.js"></script>
|
||||
<script src="../draw/js/common.js"></script>
|
||||
</body>
|
||||
<script>
|
||||
function jump(){
|
||||
var flag = $("#flag").val;
|
||||
//根据不同玩法跳转不同页面
|
||||
if (flag == "0"){
|
||||
window.location.href='turntable.html?drawCode='+drawCode;
|
||||
}else{
|
||||
window.location.href='scratchcard.html?drawCode='+drawCode;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="GBK">
|
||||
<title>积分抓好运</title>
|
||||
<meta charset="UTF-8">
|
||||
<title>积分抓好运</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css?v=542" />
|
||||
<link rel="stylesheet" type="text/css" href="css/iosSelect.css" />
|
||||
<script src="/js/config.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="lottery">
|
||||
|
|
@ -23,21 +24,21 @@
|
|||
</div>
|
||||
<p class="lottery_role"></p>
|
||||
<p class="lottery_prize"></p>
|
||||
<p class="lottery_tips">每次消耗<span class="integral">50</span>积分</p>
|
||||
<p class="lottery_tips">每次消耗<span class="integral">50</span>积分</p>
|
||||
<button class="lottery_go"></button>
|
||||
<p class="lottery_points">您还剩余<span class="num">0</span>积分</p>
|
||||
<p class="lottery_points">您还剩余<span class="num">0</span>积分</p>
|
||||
<a href="javascript:void(0);" class="lottery_link"></a>
|
||||
</div>
|
||||
<input type="hidden" class="drawType"/>
|
||||
<!--未中奖-->
|
||||
<!--未中奖-->
|
||||
<div class="pop pop_fail" style="display:none;">
|
||||
<div class="pop_bg">
|
||||
<span class="closed"></span>
|
||||
<div class="contact">就差一点点<br/>再接再厉哦</div>
|
||||
<div class="contact">就差一点点<br/>再接再厉哦</div>
|
||||
<p class="btn"></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--中奖-->
|
||||
<!--中奖-->
|
||||
<div class="pop pop_success" style="display:none;">
|
||||
<div class="pop_bg">
|
||||
<span class="closed"></span>
|
||||
|
|
@ -48,41 +49,33 @@
|
|||
<p class="btn"></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--填写信息-->
|
||||
<!--填写信息-->
|
||||
<div class="pop pop_fillin" style="display:none;">
|
||||
<div class="pop_bg">
|
||||
<span class="closed"></span>
|
||||
<div class="contact">
|
||||
<p><span>收 货 人:</span><input class="uname" type="text" placeholder="请输入"/></p>
|
||||
<p><span>身份证号:</span><input class="idcard" type="text" maxlength="18" placeholder="请输入"/></p>
|
||||
<p><span>联系电话:</span><input class="phone" type="text" maxlength="11" placeholder="请输入"/></p>
|
||||
<p><span>所在地区:</span><input class="contact_sel city" type="text" placeholder="请输入" readonly value="北京市 北京市 西城区" id="select_contact" data-city-code="110100" data-province-code="110000" data-district-code="110102"/></p>
|
||||
<p><span>详细地址:</span><textarea class="addr" placeholder="请输入详细地址信息,如道路、门牌号、 小区、楼栋好、单元室等"></textarea></p>
|
||||
<p><span>收 货 人:</span><input class="uname" type="text" placeholder="请输入"/></p>
|
||||
<p><span>身份证号:</span><input class="idcard" type="text" maxlength="18" placeholder="请输入"/></p>
|
||||
<p><span>联系电话:</span><input class="phone" type="text" maxlength="11" placeholder="请输入"/></p>
|
||||
<p><span>所在地区:</span><input class="contact_sel city" type="text" placeholder="请输入" readonly value="北京市 北京市 西城区" id="select_contact" data-city-code="110100" data-province-code="110000" data-district-code="110102"/></p>
|
||||
<p><span>详细地址:</span><textarea class="addr" placeholder="请输入详细地址信息,如道路、门牌号、 小区、楼栋好、单元室等"></textarea></p>
|
||||
<p class="contact_btn"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--我的奖品-->
|
||||
<!--我的奖品-->
|
||||
<div class="pop pop_prize" style="display:none;">
|
||||
<div class="pop_bg">
|
||||
<h3 class="title"></h3>
|
||||
<span class="closed"></span>
|
||||
<div class="contact">
|
||||
<ul class="content_list myPrizes">
|
||||
<li><img src="images/img_prize01.png" /><span>50积分</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize02.png" /><span>猫眼50</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize03.png" /><span>猫眼70</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize04.png" /><span>网易季卡</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize05.png" /><span>网易月卡</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize06.png" /><span>QQ音乐</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize07.png" /><span>优酷月卡</span><span class="list_date">2020-11-23</span></li>
|
||||
<li><img src="images/img_prize08.png" /><span>优酷季卡</span><span class="list_date">2020-11-23</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--活动规则-->
|
||||
<div class="pop pop_role role" style="display:none;">
|
||||
<!--活动规则-->
|
||||
<div class="pop pop_role" style="display:none;">
|
||||
<div class="pop_bg">
|
||||
<h3 class="title"></h3>
|
||||
<span class="closed"></span>
|
||||
|
|
@ -96,16 +89,17 @@
|
|||
<img class="prize" src="" alt="">
|
||||
</div>
|
||||
<ul class="" style="display: none;">
|
||||
<li class="award">恭喜 151****3445 获得京东E卡</li>
|
||||
<li class="award">恭喜 151****3445 获得京东E卡</li>
|
||||
</ul>
|
||||
<ul class="" style="display: none;">
|
||||
<li class="prize_li"><img src="images/img_prize01.png" /><span class="pname">50积分</span><span class="list_date time">2020-11-23</span></li>
|
||||
<li class="prize_li"><img src="images/img_prize01.png" /><span class="pname">50积分</span><span class="list_date time">2020-11-23</span></li>
|
||||
</ul>
|
||||
<script src="js/jquery-1.11.0.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/scroll.js"></script>
|
||||
<script src="js/iosSelect.js"></script>
|
||||
<script src="js/areaData_v2.js" charset="GBK"></script>
|
||||
<script src="../draw/js/util.js"></script>
|
||||
<script src="../../common/taglibs.js"></script>
|
||||
<script src="../../js/jsencrypt.min.js"></script>
|
||||
<script src="../../js/encryptUtil.js"></script>
|
||||
|
|
@ -114,27 +108,26 @@
|
|||
<script src="../../js/layui/layer.js"></script>
|
||||
<script src="../../js/layui/layerUtils.js"></script>
|
||||
<script src="../draw/js/draw.js"></script>
|
||||
<script src="/js/config.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script>
|
||||
const DOLL = 'doll';
|
||||
$(function () {
|
||||
init(DOLL);
|
||||
//init(DOLL);
|
||||
initAwards();
|
||||
});
|
||||
//抽奖
|
||||
//抽奖
|
||||
var cH = $(".tool")[0].clientHeight;
|
||||
var tH = $(".tool")[0].offsetTop;
|
||||
var lH = $('.tool_line')[0].clientHeight;
|
||||
var timer = null;
|
||||
$('.lottery_go').click(function(){
|
||||
//中奖传1,2,3,4,5,6,7,8(对应奖品),未中奖传-1
|
||||
//1:50积分,2:猫眼50,3:猫眼70,4:网易季卡,5:网易月卡,6:QQ音乐,7:优酷月卡,8:优酷季卡
|
||||
//中奖传1,2,3,4,5,6,7,8(对应奖品),未中奖传-1
|
||||
//1:50积分,2:猫眼50,3:猫眼70,4:网易季卡,5:网易月卡,6:QQ音乐,7:优酷月卡,8:优酷季卡
|
||||
fnLottery(-1);
|
||||
});
|
||||
function fnLottery(status){
|
||||
try{
|
||||
zhuge.track('娃娃机-开始抓奖按钮【'+drawCode+'】');
|
||||
zhuge.track('娃娃机-开始抓奖按钮【'+drawCode+'】');
|
||||
}catch(err){console.log(err);}
|
||||
if (running) {
|
||||
console.log('running...');
|
||||
|
|
@ -161,7 +154,7 @@
|
|||
}
|
||||
$('.tool_line').animate({height:lH},1500);
|
||||
$(".tool").animate({top:tH},1500,function(){
|
||||
//中奖啦
|
||||
//中奖啦
|
||||
if(status != -1){
|
||||
$('.pop_success').show();
|
||||
$(".tool img").hide();
|
||||
|
|
@ -169,7 +162,7 @@
|
|||
let imgSrc = $('img[p-code='+prizeCode+']').attr('src');
|
||||
$(".contact img").attr('src',imgSrc);
|
||||
}
|
||||
//未中奖
|
||||
//未中奖
|
||||
if(status == -1){
|
||||
$('.pop_fail').show();
|
||||
}
|
||||
|
|
@ -178,16 +171,16 @@
|
|||
}, 2500);
|
||||
}
|
||||
|
||||
//所在地区选择
|
||||
//所在地区选择
|
||||
var selectContactDom = $('#select_contact');
|
||||
selectContactDom.bind('click', function () {
|
||||
var oneLevelId = selectContactDom.attr('data-province-code'); //省code
|
||||
var twoLevelId = selectContactDom.attr('data-city-code');//市code
|
||||
var threeLevelId = selectContactDom.attr('data-district-code');//区code
|
||||
var oneLevelId = selectContactDom.attr('data-province-code'); //省code
|
||||
var twoLevelId = selectContactDom.attr('data-city-code');//市code
|
||||
var threeLevelId = selectContactDom.attr('data-district-code');//区code
|
||||
var iosSelect = new IosSelect(3,
|
||||
[iosProvinces, iosCitys, iosCountys],
|
||||
{
|
||||
title: '地址选择',
|
||||
title: '地址选择',
|
||||
itemHeight: 35,
|
||||
relation: [1, 1],
|
||||
oneLevelId: oneLevelId,
|
||||
|
|
@ -201,29 +194,31 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
//活动规则
|
||||
//活动规则
|
||||
$('.lottery_role').click(function(){
|
||||
drawrule();
|
||||
$('.pop_role').show();
|
||||
})
|
||||
//关闭弹层
|
||||
//关闭弹层
|
||||
$('.closed,.btn').click(function(){
|
||||
$(this).parents('.pop').hide();
|
||||
})
|
||||
//未中奖确认关闭弹层
|
||||
//未中奖确认关闭弹层
|
||||
$('.pop_fail .btn').click(function(){
|
||||
$(this).parents('.pop').hide();
|
||||
})
|
||||
//中奖立即领取
|
||||
//中奖立即领取
|
||||
$('.pop_success .btn').click(function(){
|
||||
$(this).parents('.pop').hide();
|
||||
/*$(this).parents('.pop').hide();
|
||||
let cue = body.cue;
|
||||
let prizeType = body.prizeType;
|
||||
if (prizeType === 'materialObject') {
|
||||
$('.pop_fillin').show();
|
||||
} else {
|
||||
layerTip(cue);
|
||||
}
|
||||
}*/
|
||||
window.location.href='../act/address.html?drawCode='+drawCode;
|
||||
|
||||
});
|
||||
$('.contact_btn').click(function () {
|
||||
saveAddr()
|
||||
|
|
@ -233,7 +228,7 @@
|
|||
})
|
||||
$('.lottery_link').click(function () {
|
||||
try{
|
||||
zhuge.track('娃娃机-点我赚积分按钮【'+drawCode+'】');
|
||||
zhuge.track('娃娃机-点我赚积分按钮【'+drawCode+'】');
|
||||
}catch(err){console.log(err);}
|
||||
// location.href = contextRootPath+'/wechat/user/toPension.do?ak=pensionSecond';
|
||||
location.href = contextRootPath+'/activity/tree/index.html?showTask=1&cl='+cl;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ let cl = getParameter('cl');
|
|||
let uid = getParameter('uid');
|
||||
let running = false;
|
||||
let body;
|
||||
//剩余次数或积分
|
||||
//剩余次数或积分
|
||||
function init(facade){
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
|
|
@ -38,40 +38,40 @@ function init(facade){
|
|||
},
|
||||
error:function(XMLHttpRequest, textStatus, errorThrown){
|
||||
console.log(textStatus);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
}
|
||||
});
|
||||
}
|
||||
function initAwards(){
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:contextRootPath+'/integral/active/getRollList.do',
|
||||
data: {"drawCode": drawCode},
|
||||
url:contextRootPath+'/draw/prizes.action',
|
||||
data: {"drawCode": drawCode, isAll: 1},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
let awards = data.awardPrizeLists;
|
||||
let awards = data.record;
|
||||
if (!awards) {
|
||||
return;
|
||||
}
|
||||
$.each(awards, function (i, n) {
|
||||
let userName = n.userName;
|
||||
let prizeName = n.prizeName;
|
||||
let dateStr = n.dateStr;
|
||||
let userName = n.username;
|
||||
let prizeName = n.prizename;
|
||||
let dateStr = n.createtimestamp;
|
||||
let award = $('.award').clone();
|
||||
award.show();
|
||||
award.removeClass('award');
|
||||
award.html('恭喜'+userName+'获得'+prizeName);
|
||||
award.html('恭喜'+userName+'获得'+prizeName);
|
||||
$('.awards').append(award);
|
||||
});
|
||||
//中奖名单滚动
|
||||
//中奖名单滚动
|
||||
$('.my_scroll').myScroll({
|
||||
speed: 100, //数值越大,速度越慢
|
||||
rowHeight: 38//li的高度
|
||||
speed: 100, //数值越大,速度越慢
|
||||
rowHeight: 38//li的高度
|
||||
});
|
||||
},
|
||||
error:function(XMLHttpRequest, textStatus, errorThrown){
|
||||
console.log(textStatus);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -80,23 +80,23 @@ function myprizes(facade) {
|
|||
$('.pop_prize').show();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: contextRootPath+'/integral/active/awardPrizeList.do',
|
||||
url: contextRootPath+'/draw/prizes.action',
|
||||
data: {drawCode: drawCode, facade: facade},
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
let prizes = data.awardPrizeLists;
|
||||
let prizes = data.record;
|
||||
if (!prizes) {
|
||||
return;
|
||||
}
|
||||
$.each(prizes, function (i, n) {
|
||||
let ptype = n.prizeType;
|
||||
let ptype = n.prizetype;
|
||||
let status = n.status;
|
||||
let prizeCode = n.prizeCode;
|
||||
let prizeCode = n.prizecode;
|
||||
let prize = $('.prize_li').clone();
|
||||
prize.show();
|
||||
prize.removeClass('prize_li');
|
||||
prize.find('.pname').html(n.prizeName);
|
||||
prize.find('.time').html(n.dateStr);
|
||||
prize.find('.pname').html(n.prizename);
|
||||
prize.find('.time').html(n.createtimestamp);
|
||||
let imgSrc = $('img[p-code=' + prizeCode + ']').attr('src');
|
||||
prize.find("img").attr('src', imgSrc);
|
||||
let link = n.link;
|
||||
|
|
@ -106,13 +106,13 @@ function myprizes(facade) {
|
|||
});
|
||||
}
|
||||
$(prize).attr('val', prizeCode);
|
||||
$(prize).attr('flow', n.gatewayFolw);
|
||||
$(prize).attr('flow', n.drawtranseqno);
|
||||
$(prize).attr('ptype', ptype);
|
||||
$('.myPrizes').append(prize);
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -128,23 +128,23 @@ function saveAddr(type) {
|
|||
if ('integral' == prizeType) {
|
||||
} else if ('materialObject' == prizeType) {
|
||||
if (!uname) {
|
||||
layerTip('请输入收货人姓名');
|
||||
layerTip('请输入收货人姓名');
|
||||
return;
|
||||
}
|
||||
if (!idcard) {
|
||||
layerTip('请输入身份证号');
|
||||
layerTip('请输入身份证号');
|
||||
return;
|
||||
}
|
||||
if (!phone) {
|
||||
layerTip('请输入联系电话');
|
||||
layerTip('请输入联系电话');
|
||||
return;
|
||||
}
|
||||
if (!city) {
|
||||
layerTip('请选择所在地区');
|
||||
layerTip('请选择所在地区');
|
||||
return;
|
||||
}
|
||||
if (!addr) {
|
||||
layerTip('请输入详细地址');
|
||||
layerTip('请输入详细地址');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -168,11 +168,11 @@ function saveAddr(type) {
|
|||
} else {
|
||||
}
|
||||
$('.pop_fillin').hide();
|
||||
layerTip('保存成功')
|
||||
layerTip('保存成功')
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ function start() {
|
|||
return;
|
||||
} else if (code == '-1') {
|
||||
running = false;
|
||||
layerTip('请先完善手机号');
|
||||
layerTip('请先完善手机号');
|
||||
return;
|
||||
}
|
||||
if (code != '0') {
|
||||
|
|
@ -213,11 +213,11 @@ function start() {
|
|||
error:function(XMLHttpRequest, textStatus, errorThrown){
|
||||
running = false;
|
||||
console.log(textStatus);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
}
|
||||
});
|
||||
}
|
||||
//剩余次数或积分
|
||||
//剩余次数或积分
|
||||
function num(drawType){
|
||||
// let drawType = $('.drawType').val();
|
||||
$.ajax({
|
||||
|
|
@ -232,7 +232,7 @@ function num(drawType){
|
|||
},
|
||||
error:function(XMLHttpRequest, textStatus, errorThrown){
|
||||
console.log(textStatus);
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
layerTip('网络异常,请检查网络环境');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -71,4 +71,19 @@
|
|||
margin-top:10px;
|
||||
outline: none;
|
||||
line-height:20px;
|
||||
}
|
||||
.button { /* 按钮美化 */
|
||||
width: 40px; /* 宽度 */
|
||||
height: 30px; /* 高度 */
|
||||
border-width: 0px; /* 边框宽度 */
|
||||
border-radius: 3px; /* 边框半径 */
|
||||
background: #d1d1d1; /* 背景颜色 */
|
||||
cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
|
||||
outline: none; /* 不显示轮廓线 */
|
||||
font-family: Microsoft YaHei; /* 设置字体 */
|
||||
color: white; /* 字体颜色 */
|
||||
font-size: 17px; /* 字体大小 */
|
||||
}
|
||||
.button:hover { /* 鼠标移入按钮范围时改变颜色 */
|
||||
background: #5599FF;
|
||||
}
|
||||
|
|
@ -58,23 +58,23 @@ function myprizes() {
|
|||
data: {drawCode: drawCode},
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if (!data.prizes) {
|
||||
if (!data.record) {
|
||||
return;
|
||||
}
|
||||
console.log(data.prizes);
|
||||
$.each(data.prizes, function (i, n) {
|
||||
var ptype = n.prizeType;
|
||||
console.log(data.record);
|
||||
$.each(data.record, function (i, n) {
|
||||
var ptype = n.prizetype;
|
||||
var status = n.status;
|
||||
var iscenter = 0;
|
||||
var prize = $('.prize_li').clone();
|
||||
$(prize).css('display', 'inherit');
|
||||
prize.removeClass('prize_li');
|
||||
prize.find('.pname').html(n.prizeName);
|
||||
prize.find('.time').html(n.drawTime);
|
||||
$(prize).attr('val', n.prizeCode);
|
||||
$(prize).attr('flow', n.gatewayFlow);
|
||||
$(prize).attr('ptype', ptype);
|
||||
$('.popList').append(prize);
|
||||
var record = $('.prize_li').clone();
|
||||
$(record).css('display', 'inherit');
|
||||
record.removeClass('prize_li');
|
||||
record.find('.pname').html(n.prizename);
|
||||
record.find('.time').html(n.createtimestamp);
|
||||
$(record).attr('val', n.prizecode);
|
||||
$(record).attr('flow', n.drawtranseqno);
|
||||
$(record).attr('ptype', n.prizetype);
|
||||
$('.popList').append(record);
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
|
|
@ -132,10 +132,10 @@ function prizes() {
|
|||
dataType: "json",
|
||||
success: function(data){
|
||||
var content = '';
|
||||
if (data.prizes) {
|
||||
$.each(data.prizes, function (i, n) {
|
||||
if (n.mobile) {
|
||||
content = content + ('<li>恭喜 '+n.mobile+' 获得'+n.prizeName+'</li>');
|
||||
if (data.record) {
|
||||
$.each(data.record, function (i, n) {
|
||||
if (n.phone) {
|
||||
content = content + ('<li>恭喜 '+n.phone+' 获得'+n.prizename+'</li>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -152,6 +152,12 @@ function prizes() {
|
|||
|
||||
}
|
||||
function saveAddr() {
|
||||
var boolean = $("#protocol").prop("checked");
|
||||
if (!boolean){
|
||||
tip('请勾选协议');
|
||||
return ;
|
||||
}
|
||||
|
||||
var uname = $('.uname').val();
|
||||
var phone = $('.phone').val();
|
||||
var addr = $('.addr').val();
|
||||
|
|
@ -172,22 +178,26 @@ function saveAddr() {
|
|||
} else {
|
||||
}
|
||||
var flow = $('.flow').val();
|
||||
uname = getEntryptPwd(uname);
|
||||
phone = getEntryptPwd(phone);
|
||||
/* uname = getEntryptPwd(uname);
|
||||
phone = getEntryptPwd(phone);*/
|
||||
var data = $("#addressId").serialize();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: contextRootPath+"/draw/saveAddress.action",
|
||||
data: {drawCode: drawCode, flow:flow, uname: uname, phone: phone, addr: addr},
|
||||
url: contextRootPath+"/draw/saveAddress",
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
data: data,
|
||||
success: function(data){
|
||||
if (data.respCode == '1') {
|
||||
if ('integral' == prizeType) {
|
||||
|
||||
} else if ('materialObject' == prizeType) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
$('.goods').hide();
|
||||
$('.register').show();
|
||||
} else {
|
||||
$('.register').show();
|
||||
tip(data.respMsg);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,15 +4,18 @@
|
|||
<head>
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
<meta charset="GBK">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<title>支付抽好礼,好运伴随你</title>
|
||||
<title>支付抽好礼,好运伴随你</title>
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/popup.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/myPrize.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/rule.css"/>
|
||||
<script src="js/jquery-1.9.1.min.js"></script>
|
||||
<script src="/js/config.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.popupBox{
|
||||
width:100%;
|
||||
|
|
@ -25,61 +28,63 @@
|
|||
<body class="template_bg popupBox" style="background-color: #f9eec8;">
|
||||
<div class="promotion_goBack rtn_btn" onclick="rtn()">
|
||||
<span class="btn_back"><img src="images/btn_back.png" alt=""></span>
|
||||
<span>返回</span>
|
||||
<span>返回</span>
|
||||
</div>
|
||||
<div class="promotion_container">
|
||||
<header class="template_header">
|
||||
<p class="header_left"><span onclick="drawrule()">活动规则</span></p>
|
||||
<p class="header_right"><span onclick="myprizes()">我的奖品</span></p>
|
||||
<!-- <p class="header_right" style="position: absolute;top: 2rem;right: 0;z-index: 10;"><span onclick="rtn()"> 返 回 </span></p>-->
|
||||
<p class="header_left"><span onclick="drawrule()">活动规则</span></p>
|
||||
<p class="header_right"><span onclick="myprizes()">我的奖品</span></p>
|
||||
<!-- <p class="header_right" style="position: absolute;top: 2rem;right: 0;z-index: 10;"><span onclick="rtn()"> 返 回 </span></p>-->
|
||||
</header>
|
||||
|
||||
<!-- 推广图1 -->
|
||||
<!-- 推广图1 -->
|
||||
<div class="promotion_main clearfix promotion_main_1 nowPage">
|
||||
<!-- 红包 -->
|
||||
<!-- 红包 -->
|
||||
<div class="zk_red_box">
|
||||
<div class="zk_red_box_header">
|
||||
<h2 class="title">剩余抽奖次数:<span class="num">0</span>次</h2>
|
||||
<!-- 刮奖区 -->
|
||||
<h2 class="title">剩余抽奖次数:<span class="num">0</span>次</h2>
|
||||
<!-- 刮奖区 -->
|
||||
<!-- <div class="scratch_off_popup"> -->
|
||||
<canvas id="canvas" style="height: 4rem;"></canvas>
|
||||
<!-- </div> -->
|
||||
<!-- 三种状态 -->
|
||||
<!-- 三种状态 -->
|
||||
<div style="display: none;" class="scratch_off_box success">
|
||||
<p class="cue" style="display: none;">恭喜你获得现金红包</p>
|
||||
<p class="amount" style="margin-top: 0.18rem;">0.08元</p>
|
||||
<p class="remark" style="padding-top: 0.3rem;color: #bbadad;">红包将在2小时内发放至您的一账通绑定银行卡中,请注意查收</p>
|
||||
<p class="again_btn">再来一次</p>
|
||||
<p class="cue" style="display: none;">恭喜你获得现金红包</p>
|
||||
<p class="amount" style="margin-top: 0.18rem;">0.08元</p>
|
||||
<p class="remark" style="padding-top: 0.3rem;color: #bbadad;">红包将在2小时内发放至您的一账通绑定银行卡中,请注意查收</p>
|
||||
<p class="again_btn">再来一次</p>
|
||||
</div>
|
||||
<div style="display: none;" class="scratch_off_box fail">
|
||||
<p>大奖离你还差一点儿,加油</p>
|
||||
<p class="again_btn">再抽一次</p>
|
||||
<p>大奖离你还差一点儿,加油</p>
|
||||
<p class="again_btn">再抽一次</p>
|
||||
</div>
|
||||
<div style="display: none;" class="scratch_off_box no_chance">
|
||||
<p><img src="images/16.gif" style="width: 25px;vertical-align: middle;" alt="">您的抽奖机会已用完</p>
|
||||
<p>推荐客户获取更多抽奖机会吧~</p>
|
||||
<p><img src="images/16.gif" style="width: 25px;vertical-align: middle;" alt="">您的抽奖机会已用完</p>
|
||||
<p>推荐客户获取更多抽奖机会吧~</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zk_red_box_footer">
|
||||
<p>今日有机会刮出</p>
|
||||
<p>今日有机会刮出</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- 获奖人 -->
|
||||
<div class="myscroll zk_carry_box">
|
||||
<ul class="">
|
||||
<!-- zk_carry_box -->
|
||||
<li>恭喜 187****1234 获得现金红包</li>
|
||||
</ul>
|
||||
<!-- 获奖人 -->
|
||||
<div class="lucy_info">
|
||||
<img src="images/icon_hb1.png" />
|
||||
<div class="myscroll">
|
||||
<ul>
|
||||
<li>恭喜 187****1234 获得爱奇艺月卡</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tip_copy" style="display: none;">
|
||||
<p></p>
|
||||
</div>
|
||||
<!--我的奖品 弹窗-->
|
||||
<!--我的奖品 弹窗-->
|
||||
<div class='popup myPrize' style="display: none;">
|
||||
<div class='popupMin'>
|
||||
<img src="images/top02.png" class='top'>
|
||||
|
|
@ -88,13 +93,13 @@
|
|||
<div class='cont'>
|
||||
<div>
|
||||
<img src="images/left.png">
|
||||
<div>我的奖品</div>
|
||||
<div>我的奖品</div>
|
||||
<img src="images/right.png">
|
||||
</div>
|
||||
<div class='postListTop'>
|
||||
<div>
|
||||
<div>抽中奖品</div>
|
||||
<div>获奖时间</div>
|
||||
<div>抽中奖品</div>
|
||||
<div>获奖时间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='popList'>
|
||||
|
|
@ -108,10 +113,10 @@
|
|||
<img src="images/delect.png" class='popDelect prizeDelect'>
|
||||
</div>
|
||||
<div class="prize_li" style="display: none;">
|
||||
<div class="pname">奖品名称</div>
|
||||
<div class="pname">奖品名称</div>
|
||||
<div class="time">2020/08/05 09:00</div>
|
||||
</div>
|
||||
<!--活动规则-->
|
||||
<!--活动规则-->
|
||||
<div class='popup rule' style="display: none;">
|
||||
<div class='popupMin'>
|
||||
<img src="images/top02.png" class='top'>
|
||||
|
|
@ -120,22 +125,22 @@
|
|||
<div class='cont'>
|
||||
<div>
|
||||
<img src="images/left.png">
|
||||
<div>活动规则</div>
|
||||
<div>活动规则</div>
|
||||
<img src="images/right.png">
|
||||
</div>
|
||||
<ul class='contBox' style="list-style: inside">
|
||||
<!-- <li class='content'>活动时间:2020年10月29日-12月31日。</li>-->
|
||||
<!-- <li class='content'>活动期间,客户推荐客户使用一账通完成支付(不包含理财产品购买、手机充值、生活缴费),即可获得一次红包抽奖机会,中奖概率100%。抽奖机会有效期截止至2021年1月15日。</li>-->
|
||||
<!-- <li class='content'>奖品现金红包29400个,中奖概率100%,中奖后,系统将自动发放到您的手机或银行卡中,请及时查收。</li>-->
|
||||
<!-- <li class='content'>最终奖品情况以活动实际情况为准,中国人寿保留调整相关奖品情况的权利,如奖品发生变更,将通过抽奖活动页面进行公示。</li>-->
|
||||
<!-- <li class='content'>中奖后,用户需及时领取奖励,并提交所需领取信息,若因领奖信息有误、不完整而导致奖品未能及时获得、无法正常发放,或活动结束用户仍未领取奖品,则视为用户放弃该奖品。</li>-->
|
||||
<!-- <li class='content'>用户参加活动即视为理解并同意本活动规则。</li>-->
|
||||
<!-- <li class='content'>对活动有任何疑问,请点击活动首页左侧的客服图标进行咨询,也可联系中国人寿在线客服(关注“中国人寿保险”微信公众号,在对话框输入“0”,再输入“2”即可)。</li>-->
|
||||
<!-- <li class='content'>理财产品包括养老保障、现金宝、鑫享宝及其他基金产品。</li>-->
|
||||
<!-- <li class='content'>在参与活动的过程中,如出现违规操作行为或违反活动规则进行恶意套利的用户,中国人寿有权追回奖励、取消其参与本次活动的资格并追究其法律责任。</li>-->
|
||||
<!-- <li class='content'>本活动最终解释权归中国人寿电子商务有限公司所有,中国人寿电子商务有限公司保留修改上述条款和条件的权利,所有条款和条件将在法律允许的最大程度内使用。</li>-->
|
||||
<!-- <li class='content'>本活动与苹果公司无关。</li>-->
|
||||
<!-- <li class='content'>奖品数量有限,先到先得。</li>-->
|
||||
<!-- <li class='content'><EFBFBD>ʱ<EFBFBD>䣺2020<EFBFBD><EFBFBD>10<EFBFBD><EFBFBD>29<EFBFBD><EFBFBD>-12<EFBFBD><EFBFBD>31<EFBFBD>ա<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD>ڼ䣬<EFBFBD>ͻ<EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD>ͻ<EFBFBD>ʹ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɷѣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɻ<EFBFBD><EFBFBD>һ<EFBFBD>κ<EFBFBD><EFBFBD><EFBFBD>齱<EFBFBD><EFBFBD><EFBFBD>ᣬ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>100%<25><><EFBFBD>齱<EFBFBD><E9BDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD>ڽ<EFBFBD>ֹ<EFBFBD><D6B9>2021<32><31>1<EFBFBD><31>15<31>ա<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD>Ʒ<EFBFBD>ֽ<EFBFBD><EFBFBD><EFBFBD>29400<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>100%<25><><EFBFBD>н<EFBFBD><D0BD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF>У<EFBFBD><D0A3>뼰ʱ<EBBCB0><CAB1><EFBFBD>ա<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Իʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؽ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>罱Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>齱<EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD>ʾ<EFBFBD><EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>輰ʱ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>콱<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD>Ʒδ<EFBFBD>ܼ<EFBFBD>ʱ<EFBFBD><EFBFBD>á<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD>Ʒ<EFBFBD><EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD>û<EFBFBD><EFBFBD>μӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>Ⲣͬ<EFBFBD>Ȿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD>Ŀͷ<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD>ա<EFBFBD><EFBFBD>Ź<EFBFBD><EFBFBD>ںţ<EFBFBD><EFBFBD>ڶԻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롰0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롰2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><EFBFBD><EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD>Ʋ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD>ֽ𱦡<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뱾<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>䷨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ρ<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>á<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾<EFBFBD>ء<EFBFBD></li>-->
|
||||
<!-- <li class='content'><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޣ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD>ȵá<EFBFBD></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
@ -146,14 +151,11 @@
|
|||
<img src="images/delect.png" class='popDelect ruleDelect'>
|
||||
<span style='clear: both;'></span>
|
||||
</div>
|
||||
<script src="js/jquery-1.9.1.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/scroll.js"></script>
|
||||
<script src="../../common/taglibs.js"></script>
|
||||
<script src="js/util.js"></script>
|
||||
<script src="js/draw.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="../../js/mobile/login_register/login.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
var num = 0;
|
||||
|
|
@ -167,11 +169,11 @@
|
|||
$('.num').text(num);
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置推广内容高度
|
||||
// 设置推广内容高度
|
||||
function innerHeight() {
|
||||
if(!$('.promotion_main_1').is(':hidden')) {
|
||||
var arr = [];
|
||||
|
|
@ -191,14 +193,14 @@
|
|||
|
||||
|
||||
$('.myscroll').myScroll({
|
||||
speed: 80, //数值越大,速度越慢
|
||||
rowHeight: 24//li的高度
|
||||
speed: 80, //数值越大,速度越慢
|
||||
rowHeight: 24//li的高度
|
||||
});
|
||||
|
||||
// 设置初始的中奖状态 success-中奖 fail-未中奖 no_chance-没有抽奖机会
|
||||
// 设置初始的中奖状态 success-中奖 fail-未中奖 no_chance-没有抽奖机会
|
||||
var status = '';
|
||||
|
||||
// 刮奖效果 -zk
|
||||
// 刮奖效果 -zk
|
||||
window.onload = function(){
|
||||
// let list = $('.scratch_off_box');
|
||||
// setTimeout(()=>{
|
||||
|
|
@ -216,8 +218,8 @@
|
|||
var style = window.getComputedStyle(canvas, null);
|
||||
var cssWidth = parseFloat(style["width"]);
|
||||
var cssHeight = parseFloat(style["height"]);
|
||||
var scaleX = canvas.width / cssWidth; // 水平方向的缩放因子
|
||||
var scaleY = canvas.height / cssHeight; // 垂直方向的缩放因子
|
||||
var scaleX = canvas.width / cssWidth; // 水平方向的缩放因子
|
||||
var scaleY = canvas.height / cssHeight; // 垂直方向的缩放因子
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
ctx.strokeStyle = 'red';
|
||||
|
|
@ -238,9 +240,9 @@
|
|||
var rect = canvas.getBoundingClientRect();
|
||||
var time = 0;
|
||||
var running = false;
|
||||
// 新增-2020-8-20-初始化 中奖状态
|
||||
// 新增-2020-8-20-初始化 中奖状态
|
||||
canvas.addEventListener('touchstart',function(){
|
||||
// success-中奖 fail-未中奖 no_chance-没有抽奖机会
|
||||
// success-中奖 fail-未中奖 no_chance-没有抽奖机会
|
||||
if (running) {
|
||||
console.log('running...');
|
||||
return;
|
||||
|
|
@ -259,8 +261,8 @@
|
|||
|
||||
x -= rect.left;
|
||||
y -= rect.top;
|
||||
x *= scaleX; // 修正水平方向的坐标
|
||||
y *= scaleY; // 修正垂直方向的坐标
|
||||
x *= scaleX; // 修正水平方向的坐标
|
||||
y *= scaleY; // 修正垂直方向的坐标
|
||||
// ctx.clearRect(x,y,15,15)
|
||||
clearArcFun(x,y,15,ctx);
|
||||
isArea();
|
||||
|
|
@ -268,9 +270,9 @@
|
|||
})
|
||||
|
||||
function isArea(){
|
||||
//判断刮开面积是否到达百分之六十
|
||||
console.log('执行isArea效果')
|
||||
var data = ctx.getImageData(0,0,canvas.width,canvas.height).data;//获取画布的信息
|
||||
//判断刮开面积是否到达百分之六十
|
||||
console.log('执行isArea效果')
|
||||
var data = ctx.getImageData(0,0,canvas.width,canvas.height).data;//获取画布的信息
|
||||
var n = 0 ;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i] == 0) {
|
||||
|
|
@ -278,15 +280,15 @@
|
|||
};
|
||||
};
|
||||
if (n >= data.length * 0.6) {
|
||||
ctx.globalCompositeOperation = 'destination-over';//重点
|
||||
ctx.globalCompositeOperation = 'destination-over';//重点
|
||||
// ctx.canvas.style.opacity = 0;
|
||||
ctx.clearRect(0,0,canvas.width,canvas.height);
|
||||
$('#canvas').css('pointer-events','none')
|
||||
}
|
||||
}
|
||||
|
||||
function clearArcFun(x,y,r,cxt){ //(x,y)为要清除的圆的圆心,r为半径,cxt为context
|
||||
var stepClear=1;//别忘记这一步
|
||||
function clearArcFun(x,y,r,cxt){ //(x,y)为要清除的圆的圆心,r为半径,cxt为context
|
||||
var stepClear=1;//别忘记这一步
|
||||
clearArc(x,y,r);
|
||||
function clearArc(x,y,radius){
|
||||
var calcWidth=radius-stepClear;
|
||||
|
|
@ -306,11 +308,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 再抽一次
|
||||
// 再抽一次
|
||||
$('.again_btn').click(function(){
|
||||
if(num<1) {
|
||||
$('.no_chance').show().siblings('.scratch_off_box').hide();
|
||||
console.log('抽奖次数不足')
|
||||
console.log('抽奖次数不足')
|
||||
return;
|
||||
}
|
||||
drawimage();
|
||||
|
|
@ -336,7 +338,7 @@
|
|||
}
|
||||
if(respCode == 'GT00007') {
|
||||
$('.no_chance').show().siblings('.scratch_off_box').hide();
|
||||
console.log('抽奖次数不足');
|
||||
console.log('抽奖次数不足');
|
||||
return;
|
||||
}
|
||||
running = false;
|
||||
|
|
@ -358,7 +360,7 @@
|
|||
setPrizeInfo(prizeType, prizeCode, data.cue, data.gatewayFlow);
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
console.log('网络异常', textStatus, errorThrown);
|
||||
running = false;
|
||||
}
|
||||
});
|
||||
|
|
@ -370,6 +372,7 @@
|
|||
})();
|
||||
prizes();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -119,7 +119,9 @@
|
|||
callback: function () { //回调
|
||||
console.log(txt);
|
||||
if ('materialObject' == prizeType) {
|
||||
|
||||
$('.goods').show();
|
||||
window.location.href='address.html?drawCode='+drawCode;
|
||||
} else {
|
||||
$('.winPrize').show();
|
||||
}
|
||||
|
|
@ -389,11 +391,8 @@
|
|||
<div>恭喜您获得</div>
|
||||
<div class="cue">戴森吸尘器</div>
|
||||
<div>请留下收货信息,我们奖品将在活动结束后四十个工作日寄送</div>
|
||||
<input class="uname" type="text" value="" placeholder="请输入收货人姓名"/>
|
||||
<input class="phone" type="text" value="" placeholder="请输入收货人手机号码" maxlength="11"/>
|
||||
<textarea class="addr" rows="" cols="" placeholder="请输入收货地址"></textarea>
|
||||
<input class="flow" type="hidden" value="">
|
||||
<img src="images/btn1.png" class='popBtn popBtn3' onclick="saveAddr()">
|
||||
<div type="button" class='button' onclick="qrCode()">确认</div>
|
||||
</div>
|
||||
<div class='right'></div>
|
||||
</div>
|
||||
|
|
@ -444,6 +443,10 @@
|
|||
<script src="js/common.js"></script>
|
||||
<script>
|
||||
prizes();
|
||||
|
||||
function qrCode(){
|
||||
window.location.href='../act/address.html?drawCode='+drawCode;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,18 @@ public class DrawRecord extends BaseEntity
|
|||
/** 扩展域 */
|
||||
@Excel(name = "扩展域")
|
||||
private String EXTAREA;
|
||||
/** 奖品名称*/
|
||||
private String PRIZENAME;
|
||||
|
||||
public void setDRAWRECORDID(String DRAWRECORDID)
|
||||
public String getPRIZENAME() {
|
||||
return PRIZENAME;
|
||||
}
|
||||
|
||||
public void setPRIZENAME(String PRIZENAME) {
|
||||
this.PRIZENAME = PRIZENAME;
|
||||
}
|
||||
|
||||
public void setDRAWRECORDID(String DRAWRECORDID)
|
||||
{
|
||||
this.DRAWRECORDID = DRAWRECORDID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
package com.sinosoft.activity.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 用户信息收集页面对象 draw_user_info
|
||||
*
|
||||
* @author xlh
|
||||
* @date 2021-04-20
|
||||
*
|
||||
*/
|
||||
public class DrawUserInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long awarDrecordId;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String mobile;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 地址 */
|
||||
@Excel(name = "地址")
|
||||
private String address;
|
||||
|
||||
/** 代理人姓名 */
|
||||
@Excel(name = "代理人姓名")
|
||||
private String agentName;
|
||||
|
||||
/** 代理人手机号 */
|
||||
@Excel(name = "代理人手机号")
|
||||
private String agentMobile;
|
||||
|
||||
/** 代理人性别 */
|
||||
@Excel(name = "代理人性别")
|
||||
private String agentGender;
|
||||
|
||||
/** 代理人工号 */
|
||||
@Excel(name = "代理人工号")
|
||||
private String agentNo;
|
||||
|
||||
public void setAwarDrecordId(Long awarDrecordId)
|
||||
{
|
||||
this.awarDrecordId = awarDrecordId;
|
||||
}
|
||||
|
||||
public Long getAwarDrecordId()
|
||||
{
|
||||
return awarDrecordId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setMobile(String mobile)
|
||||
{
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getMobile()
|
||||
{
|
||||
return mobile;
|
||||
}
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setAgentName(String agentName)
|
||||
{
|
||||
this.agentName = agentName;
|
||||
}
|
||||
|
||||
public String getAgentName()
|
||||
{
|
||||
return agentName;
|
||||
}
|
||||
public void setAgentMobile(String agentMobile)
|
||||
{
|
||||
this.agentMobile = agentMobile;
|
||||
}
|
||||
|
||||
public String getAgentMobile()
|
||||
{
|
||||
return agentMobile;
|
||||
}
|
||||
public void setAgentGender(String agentGender)
|
||||
{
|
||||
this.agentGender = agentGender;
|
||||
}
|
||||
|
||||
public String getAgentGender()
|
||||
{
|
||||
return agentGender;
|
||||
}
|
||||
public void setAgentNo(String agentNo)
|
||||
{
|
||||
this.agentNo = agentNo;
|
||||
}
|
||||
|
||||
public String getAgentNo()
|
||||
{
|
||||
return agentNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("awarDrecordId", getAwarDrecordId())
|
||||
.append("userName", getUserName())
|
||||
.append("mobile", getMobile())
|
||||
.append("gender", getGender())
|
||||
.append("address", getAddress())
|
||||
.append("agentName", getAgentName())
|
||||
.append("agentMobile", getAgentMobile())
|
||||
.append("agentGender", getAgentGender())
|
||||
.append("agentNo", getAgentNo())
|
||||
.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.sinosoft.activity.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.sinosoft.activity.domain.DrawRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 抽奖记录信息Mapper接口
|
||||
|
|
@ -59,4 +60,19 @@ public interface DrawRecordMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawRecordByIds(String[] DRAWRECORDIDs);
|
||||
|
||||
/**
|
||||
*查询抽奖记录信息
|
||||
* @param drawCode
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<DrawRecord> selectDrawRecordCodeUserList(@Param("drawCode") String drawCode,@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 查询抽奖记录信息
|
||||
* @param drawCode
|
||||
* @return
|
||||
*/
|
||||
List<DrawRecord> selectDrawRecordCodeList(String drawCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.sinosoft.activity.mapper;
|
||||
|
||||
import com.sinosoft.activity.domain.DrawUserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户信息收集页面Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-04-20
|
||||
*/
|
||||
public interface DrawUserInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户信息收集页面
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 用户信息收集页面
|
||||
*/
|
||||
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId);
|
||||
|
||||
/**
|
||||
* 查询用户信息收集页面列表
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 用户信息收集页面集合
|
||||
*/
|
||||
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 新增用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDrawUserInfo(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 修改用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDrawUserInfo(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 删除用户信息收集页面
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawUserInfoById(Long awarDrecordId);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息收集页面
|
||||
*
|
||||
* @param awarDrecordIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawUserInfoByIds(String[] awarDrecordIds);
|
||||
}
|
||||
|
|
@ -59,4 +59,6 @@ public interface IDrawRecordService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawRecordById(String DRAWRECORDID);
|
||||
|
||||
List<DrawRecord> selectDrawRecordCodeList(String drawCode, String userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.sinosoft.activity.service;
|
||||
|
||||
import com.sinosoft.activity.domain.DrawUserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户信息收集页面Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-04-20
|
||||
*/
|
||||
public interface IDrawUserInfoService
|
||||
{
|
||||
/**
|
||||
* 查询用户信息收集页面
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 用户信息收集页面
|
||||
*/
|
||||
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId);
|
||||
|
||||
/**
|
||||
* 查询用户信息收集页面列表
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 用户信息收集页面集合
|
||||
*/
|
||||
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 新增用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDrawUserInfo(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 修改用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDrawUserInfo(DrawUserInfo drawUserInfo);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息收集页面
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawUserInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除用户信息收集页面信息
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDrawUserInfoById(Long awarDrecordId);
|
||||
}
|
||||
|
|
@ -96,4 +96,13 @@ public class DrawRecordServiceImpl implements IDrawRecordService
|
|||
{
|
||||
return drawRecordMapper.deleteDrawRecordById(DRAWRECORDID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DrawRecord> selectDrawRecordCodeList(String drawCode, String userId) {
|
||||
if(!(userId==null || "".equals(userId))){
|
||||
return drawRecordMapper.selectDrawRecordCodeUserList(drawCode ,userId);
|
||||
}else{
|
||||
return drawRecordMapper.selectDrawRecordCodeList(drawCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
package com.sinosoft.activity.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.sinosoft.activity.domain.DrawUserInfo;
|
||||
import com.sinosoft.activity.mapper.DrawUserInfoMapper;
|
||||
import com.sinosoft.activity.service.IDrawUserInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户信息收集页面Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-04-20
|
||||
*/
|
||||
@Service
|
||||
public class DrawUserInfoServiceImpl implements IDrawUserInfoService
|
||||
{
|
||||
@Autowired
|
||||
private DrawUserInfoMapper drawUserInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询用户信息收集页面
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 用户信息收集页面
|
||||
*/
|
||||
@Override
|
||||
public DrawUserInfo selectDrawUserInfoById(Long awarDrecordId)
|
||||
{
|
||||
return drawUserInfoMapper.selectDrawUserInfoById(awarDrecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户信息收集页面列表
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 用户信息收集页面
|
||||
*/
|
||||
@Override
|
||||
public List<DrawUserInfo> selectDrawUserInfoList(DrawUserInfo drawUserInfo)
|
||||
{
|
||||
return drawUserInfoMapper.selectDrawUserInfoList(drawUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDrawUserInfo(DrawUserInfo drawUserInfo)
|
||||
{
|
||||
drawUserInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return drawUserInfoMapper.insertDrawUserInfo(drawUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户信息收集页面
|
||||
*
|
||||
* @param drawUserInfo 用户信息收集页面
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDrawUserInfo(DrawUserInfo drawUserInfo)
|
||||
{
|
||||
drawUserInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return drawUserInfoMapper.updateDrawUserInfo(drawUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户信息收集页面对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDrawUserInfoByIds(String ids)
|
||||
{
|
||||
return drawUserInfoMapper.deleteDrawUserInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户信息收集页面信息
|
||||
*
|
||||
* @param awarDrecordId 用户信息收集页面ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDrawUserInfoById(Long awarDrecordId)
|
||||
{
|
||||
return drawUserInfoMapper.deleteDrawUserInfoById(awarDrecordId);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="SOURCE" column="SOURCE" />
|
||||
<result property="PHONE" column="PHONE" />
|
||||
<result property="EXTAREA" column="EXTAREA" />
|
||||
<result property="PRIZENAME" column="PRIZENAME" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDrawRecordVo">
|
||||
|
|
@ -78,7 +79,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectDrawRecordVo"/>
|
||||
where DRAWRECORDID = #{DRAWRECORDID}
|
||||
</select>
|
||||
|
||||
<select id="selectDrawRecordCodeUserList" parameterType="String" resultMap="DrawRecordResult">
|
||||
SELECT
|
||||
dr.*, pi.PRIZENAME
|
||||
FROM
|
||||
draw_record dr
|
||||
LEFT JOIN draw_prize_info pi ON dr.PRIZECODE = pi.PRIZECODE
|
||||
|
||||
WHERE
|
||||
dr.drawResult != '0'
|
||||
AND dr.DRAWCODE = #{drawCode}
|
||||
AND dr.USERID = #{userId}
|
||||
order by dr.CREATETIMESTAMP desc
|
||||
|
||||
</select>
|
||||
<select id="selectDrawRecordCodeList" parameterType="String" resultMap="DrawRecordResult">
|
||||
SELECT
|
||||
dr.*, pi.PRIZENAME
|
||||
FROM
|
||||
draw_record dr
|
||||
LEFT JOIN draw_prize_info pi ON dr.PRIZECODE = pi.PRIZECODE
|
||||
WHERE
|
||||
dr.DRAWRESULT != '0'
|
||||
AND dr.DRAWCODE = #{drawCode}
|
||||
order by dr.CREATETIMESTAMP desc
|
||||
LIMIT 100
|
||||
</select>
|
||||
|
||||
<insert id="insertDrawRecord" parameterType="DrawRecord">
|
||||
insert into draw_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sinosoft.activity.mapper.DrawUserInfoMapper">
|
||||
|
||||
<resultMap type="DrawUserInfo" id="DrawUserInfoResult">
|
||||
<result property="awarDrecordId" column="awarDrecordId" />
|
||||
<result property="userName" column="userName" />
|
||||
<result property="mobile" column="mobile" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="address" column="address" />
|
||||
<result property="agentName" column="agentName" />
|
||||
<result property="agentMobile" column="agentMobile" />
|
||||
<result property="agentGender" column="agentGender" />
|
||||
<result property="agentNo" column="agentNo" />
|
||||
<result property="createTime" column="createTime" />
|
||||
<result property="updateTime" column="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDrawUserInfoVo">
|
||||
select awarDrecordId, userName, mobile, gender, address, agentName, agentMobile, agentGender, agentNo, createTime, updateTime from draw_user_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDrawUserInfoList" parameterType="DrawUserInfo" resultMap="DrawUserInfoResult">
|
||||
<include refid="selectDrawUserInfoVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and userName like concat('%', #{userName}, '%')</if>
|
||||
<if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
|
||||
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="agentName != null and agentName != ''"> and agentName like concat('%', #{agentName}, '%')</if>
|
||||
<if test="agentMobile != null and agentMobile != ''"> and agentMobile = #{agentMobile}</if>
|
||||
<if test="agentGender != null and agentGender != ''"> and agentGender = #{agentGender}</if>
|
||||
<if test="agentNo != null "> and agentNo = #{agentNo}</if>
|
||||
<if test="createTime != null "> and createTime = #{createTime}</if>
|
||||
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDrawUserInfoById" parameterType="Long" resultMap="DrawUserInfoResult">
|
||||
<include refid="selectDrawUserInfoVo"/>
|
||||
where awarDrecordId = #{awarDrecordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDrawUserInfo" parameterType="DrawUserInfo">
|
||||
insert into draw_user_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null">userName,</if>
|
||||
<if test="mobile != null">mobile,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="agentName != null">agentName,</if>
|
||||
<if test="agentMobile != null">agentMobile,</if>
|
||||
<if test="agentGender != null">agentGender,</if>
|
||||
<if test="agentNo != null">agentNo,</if>
|
||||
<if test="createTime != null">createTime,</if>
|
||||
<if test="updateTime != null">updateTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="mobile != null">#{mobile},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="agentName != null">#{agentName},</if>
|
||||
<if test="agentMobile != null">#{agentMobile},</if>
|
||||
<if test="agentGender != null">#{agentGender},</if>
|
||||
<if test="agentNo != null">#{agentNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDrawUserInfo" parameterType="DrawUserInfo">
|
||||
update draw_user_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null">userName = #{userName},</if>
|
||||
<if test="mobile != null">mobile = #{mobile},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="agentName != null">agentName = #{agentName},</if>
|
||||
<if test="agentMobile != null">agentMobile = #{agentMobile},</if>
|
||||
<if test="agentGender != null">agentGender = #{agentGender},</if>
|
||||
<if test="agentNo != null">agentNo = #{agentNo},</if>
|
||||
<if test="createTime != null">createTime = #{createTime},</if>
|
||||
<if test="updateTime != null">updateTime = #{updateTime},</if>
|
||||
</trim>
|
||||
where awarDrecordId = #{awarDrecordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDrawUserInfoById" parameterType="Long">
|
||||
delete from draw_user_info where awarDrecordId = #{awarDrecordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDrawUserInfoByIds" parameterType="String">
|
||||
delete from draw_user_info where awarDrecordId in
|
||||
<foreach item="awarDrecordId" collection="array" open="(" separator="," close=")">
|
||||
#{awarDrecordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue