|
@@ -205,7 +205,7 @@
|
|
|
url = url.split('/');
|
|
|
var topVal = -0.5;
|
|
|
let obj = {};
|
|
|
- var baseUrl = 'https://test.androidscloud.com'
|
|
|
+ // var baseUrl = 'https://test.androidscloud.com'
|
|
|
var loc = window.location.search,
|
|
|
n1 = loc.length,//地址的总长度
|
|
|
n2 = loc.indexOf("="),//取得=号的位置
|
|
@@ -226,9 +226,9 @@
|
|
|
let key = arr[0];
|
|
|
obj[key] = arr[1];
|
|
|
})
|
|
|
- if(!obj.money){ //从app过来
|
|
|
+ // if(!obj.money){ //从app过来
|
|
|
getActivityTime();
|
|
|
- }
|
|
|
+ // }
|
|
|
if(obj.money){ //从小程序过来
|
|
|
receiveRedEnvelope();
|
|
|
}
|
|
@@ -312,7 +312,7 @@
|
|
|
phoneNumber = res.data;
|
|
|
let node = `<div class="packet">
|
|
|
<img class="fxhb" src="../static/img/doubleElevenActivity/fxhb.png" />
|
|
|
- <div class="money"><span class="money-mark">¥</span><span class="money-val">${obj.money}</span></div>
|
|
|
+ <div class="money"><span class="money-mark">¥</span><span class="money-val">${parseInt(obj.money)}</span></div>
|
|
|
<div class="packet-title">云手机无门槛抵扣券</div>
|
|
|
<div class="packet-time">${obj.startTime.substring(5,7)}月${obj.startTime.substring(8,10)}-${obj.endTime.substring(5,7)}月${obj.endTime.substring(8,10)}日有效</div>
|
|
|
</div>
|
|
@@ -366,11 +366,11 @@
|
|
|
<img class="head-img" src="../static/img/doubleElevenActivity/touxiang_da_icon.png" />
|
|
|
<div class="user-info">
|
|
|
<div class="user-name">${item.receiveUserPhone}</div>
|
|
|
- <div class="user-time">${item.createTime}</div>
|
|
|
+ <div class="user-time">${item.createTime.substring(5,7)}月${item.createTime.substring(8,11)}日${item.createTime.substring(11,19)}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="meal">${item.state === 0?totalMoney/quantity+'元红包':getReceivePhoneDuration(item)}</div>
|
|
|
- <div class="${['receive no-user','receive',' receive usered'][item.state]}" data-state=${item.state} data-id=${item.id}>${['未使用','领取','已领取'][item.state]}</div>
|
|
|
+ <div class="${['receive no-user','receive',' receive usered'][item.state]}" data-type=${item.receivePhoneType} data-state=${item.state} data-id=${item.id}>${['未使用','领取','已领取'][item.state]}</div>
|
|
|
</div>`
|
|
|
})
|
|
|
str += `<div class="packet">
|
|
@@ -444,8 +444,6 @@
|
|
|
console.log($('.user-list').eq(index))
|
|
|
$('.user-list').eq(index).toggle();
|
|
|
const flag = $('.user-list').eq(index).attr('flag');
|
|
|
- // let dataList = JSON.parse(e.target.dataset.dataList);
|
|
|
- console.log(e.target.dataset)
|
|
|
if(flag === '1'){
|
|
|
$('.icon').eq(index).attr('src','../static/img/doubleElevenActivity/icon_up.png');
|
|
|
$('.user-list').eq(index).attr('flag','2');
|
|
@@ -470,6 +468,7 @@
|
|
|
$('.red-packet-next')[0].addEventListener('click',(e)=>{
|
|
|
var state = e.target.dataset.state;
|
|
|
let id = e.target.dataset.id;
|
|
|
+ let type = e.target.dataset.type;
|
|
|
if(state == 0){
|
|
|
stopManyClick(() => {
|
|
|
toastr.error('赶紧让你的好友使用红包购买云机吧!');
|
|
@@ -478,7 +477,7 @@
|
|
|
if(e.target.className === 'receive'){
|
|
|
e.stopPropagation();
|
|
|
if (isAndroid) {
|
|
|
- window.native.activatePhone(id);
|
|
|
+ window.native.activatePhone(id, type);
|
|
|
}
|
|
|
}
|
|
|
}
|