|
@@ -2,7 +2,7 @@
|
|
<html>
|
|
<html>
|
|
<head>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta charset="utf-8">
|
|
- <title></title>
|
|
|
|
|
|
+ <title>活动</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
<link href="css/mui.css" rel="stylesheet" />
|
|
<link href="css/mui.css" rel="stylesheet" />
|
|
<link href="css/mui.picker.css" rel="stylesheet" />
|
|
<link href="css/mui.picker.css" rel="stylesheet" />
|
|
@@ -721,6 +721,14 @@
|
|
padding: 0 35rem;
|
|
padding: 0 35rem;
|
|
width: 100%;
|
|
width: 100%;
|
|
margin: 0;
|
|
margin: 0;
|
|
|
|
+ font-size: 14rem;
|
|
|
|
+ }
|
|
|
|
+ .textarea_placeHolder {
|
|
|
|
+ color: #999999;
|
|
|
|
+ font-size: 14rem;
|
|
|
|
+ padding: 0 35rem;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 42rem;
|
|
}
|
|
}
|
|
.photo-btn {
|
|
.photo-btn {
|
|
width: 80rem;
|
|
width: 80rem;
|
|
@@ -766,6 +774,9 @@
|
|
margin-right: 35rem;
|
|
margin-right: 35rem;
|
|
color: #999;
|
|
color: #999;
|
|
}
|
|
}
|
|
|
|
+ input {
|
|
|
|
+ font-size: 14rem;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|
|
<body>
|
|
<body>
|
|
<div id="collectPage">
|
|
<div id="collectPage">
|
|
@@ -792,7 +803,10 @@
|
|
<div class="dialog-body">
|
|
<div class="dialog-body">
|
|
<div class="text_bg">
|
|
<div class="text_bg">
|
|
<img class="close-text" id="closeText" src="./img/close-text.png" mode="widthFix" />
|
|
<img class="close-text" id="closeText" src="./img/close-text.png" mode="widthFix" />
|
|
- <textarea class="textarea_style" id="textarea" placeHolder="说出您和宝骏汽车的故事,为宝骏云海新车上市送上祝福"></textarea>
|
|
|
|
|
|
+ <div style="position: relative;">
|
|
|
|
+ <textarea class="textarea_style" id="textarea"></textarea>
|
|
|
|
+ <div class="textarea_placeHolder" id="textareaPlaceHolder">说出您和宝骏汽车的故事,为宝骏云海新车上市送上祝福</div>
|
|
|
|
+ </div>
|
|
<div class="img_list">
|
|
<div class="img_list">
|
|
<div id="imageGallery" class="imageGallery">
|
|
<div id="imageGallery" class="imageGallery">
|
|
<img class="photo-btn" id="photoBtn" src="./img/photo-btn.png" mode="widthFix" onclick="uploadImage()" />
|
|
<img class="photo-btn" id="photoBtn" src="./img/photo-btn.png" mode="widthFix" onclick="uploadImage()" />
|
|
@@ -1108,6 +1122,8 @@
|
|
success:function(res){
|
|
success:function(res){
|
|
if (res.data) {
|
|
if (res.data) {
|
|
window.location.replace(res.data)
|
|
window.location.replace(res.data)
|
|
|
|
+ } else {
|
|
|
|
+ mui.toast(res.msg);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error:function(error){
|
|
error:function(error){
|
|
@@ -1181,9 +1197,13 @@
|
|
dataType:'json',//服务器返回json格式数据
|
|
dataType:'json',//服务器返回json格式数据
|
|
type:'get',//HTTP请求类型
|
|
type:'get',//HTTP请求类型
|
|
success:function(res){
|
|
success:function(res){
|
|
- itemList = res.data||[]
|
|
|
|
- itemIndex = 0
|
|
|
|
- onShowItem()
|
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
+ itemList = res.data||[]
|
|
|
|
+ itemIndex = 0
|
|
|
|
+ onShowItem()
|
|
|
|
+ } else {
|
|
|
|
+ mui.toast(res.msg);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
error:function(error){
|
|
error:function(error){
|
|
//异常处理;
|
|
//异常处理;
|
|
@@ -1258,6 +1278,14 @@
|
|
document.getElementById("textarea").value = "";
|
|
document.getElementById("textarea").value = "";
|
|
onShowItem()
|
|
onShowItem()
|
|
});
|
|
});
|
|
|
|
+ document.getElementById('textarea').addEventListener('focus', function() {
|
|
|
|
+ document.getElementById('textareaPlaceHolder').innerHTML = '';
|
|
|
|
+ });
|
|
|
|
+ document.getElementById('textarea').addEventListener('blur', function() {
|
|
|
|
+ if(document.getElementById('textarea').value == ''){
|
|
|
|
+ document.getElementById('textareaPlaceHolder').innerHTML = '说出您和宝骏汽车的故事,为宝骏云海新车上市送上祝福';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// 截取url中的数据
|
|
// 截取url中的数据
|
|
function getQueryParam(paramName) {
|
|
function getQueryParam(paramName) {
|
|
// 获取当前URL的查询字符串部分
|
|
// 获取当前URL的查询字符串部分
|
|
@@ -1318,6 +1346,7 @@
|
|
dataType:'json',//服务器返回json格式数据
|
|
dataType:'json',//服务器返回json格式数据
|
|
type:'get',//HTTP请求类型
|
|
type:'get',//HTTP请求类型
|
|
success:function(res){
|
|
success:function(res){
|
|
|
|
+ if (res.code === 1) {
|
|
lotteryStatus = res.data.status
|
|
lotteryStatus = res.data.status
|
|
gridList = res.data.prizes
|
|
gridList = res.data.prizes
|
|
document.getElementById("tab1").innerHTML = res.data.activityInfo
|
|
document.getElementById("tab1").innerHTML = res.data.activityInfo
|
|
@@ -1354,6 +1383,9 @@
|
|
buttons.addEventListener('click', function() {
|
|
buttons.addEventListener('click', function() {
|
|
handleLottery();
|
|
handleLottery();
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ mui.toast(res.msg);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
error:function(error){
|
|
error:function(error){
|
|
//异常处理;
|
|
//异常处理;
|
|
@@ -1460,19 +1492,23 @@
|
|
type:'post',//HTTP请求类型
|
|
type:'post',//HTTP请求类型
|
|
headers:{'Content-Type':'application/json'},
|
|
headers:{'Content-Type':'application/json'},
|
|
success:function(res){
|
|
success:function(res){
|
|
- const recordList = document.getElementById('recordList');
|
|
|
|
- recordList.innerHTML = ''
|
|
|
|
- res.data.records.forEach(record => {
|
|
|
|
- recordList.innerHTML += `
|
|
|
|
- <div class="record-item">
|
|
|
|
- <img class="prize-img" src="${record.img}" mode="widthFix" />
|
|
|
|
- <div>
|
|
|
|
- <div class="prize-name">${record.name}</div>
|
|
|
|
- <div class="prize-time">${timeFormat(record.raffleTime)}</div>
|
|
|
|
- </div>
|
|
|
|
- <button id="toggleButton" ${(record.status==-1 || record.status==1) ? 'disabled' : ''} class="get-btn" onclick="handleOpenForm(${record.id})">${record.status==1 ? '已领取' : (record.status==-1 ? '审核中' : '领取')}</button>
|
|
|
|
- </div>`
|
|
|
|
- });
|
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
+ const recordList = document.getElementById('recordList');
|
|
|
|
+ recordList.innerHTML = ''
|
|
|
|
+ res.data.records.forEach(record => {
|
|
|
|
+ recordList.innerHTML += `
|
|
|
|
+ <div class="record-item">
|
|
|
|
+ <img class="prize-img" src="${record.img}" mode="widthFix" />
|
|
|
|
+ <div>
|
|
|
|
+ <div class="prize-name">${record.name}</div>
|
|
|
|
+ <div class="prize-time">${timeFormat(record.raffleTime)}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <button id="toggleButton" ${(record.status==-1 || record.status==1) ? 'disabled' : ''} class="get-btn" onclick="handleOpenForm(${record.id})">${record.status==1 ? '已领取' : (record.status==-1 ? '审核中' : '领取')}</button>
|
|
|
|
+ </div>`
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ mui.toast(res.msg);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
error:function(error){
|
|
error:function(error){
|
|
//异常处理
|
|
//异常处理
|