Commit 0b881d58 authored by zhangjinzhou's avatar zhangjinzhou

Merge branch 'jiaoneiqunuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into jiaoneiqunuan

parents 16ef4fac 0b78ea6b
......@@ -127,7 +127,7 @@
left: 82rpx;
top: 613rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.pksuccessmodal .pksuccessmodalclose {
width: 72rpx;
......@@ -136,7 +136,7 @@
left: 227rpx;
top: 791rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.pksuccessmodal .pkPrizeImg {
width: 260rpx;
......
......@@ -11,7 +11,7 @@
<label class="pkfailedtitle" a:if="{{!isWin}}">继续加油,蕉内送您一份小礼物</label>
</view>
<image class="pksuccessmodalbtn " onTap="redirectToIndex" src={{resList['75801bab-c16e-4814-ab19-081933e4abc5'].url}} />
<image class="pksuccessmodalclose " onTap="redirectToIndex" src={{resList['5eee69bb-482c-4ce0-beb1-c7c38cdb6fe4'].url}} />
<image class="pksuccessmodalbtn btn" onTap="redirectToIndex" src={{resList['75801bab-c16e-4814-ab19-081933e4abc5'].url}} />
<image class="pksuccessmodalclose btn" onTap="redirectToIndex" src={{resList['5eee69bb-482c-4ce0-beb1-c7c38cdb6fe4'].url}} />
<image class="pkPrizeImg " src={{prizeImg}} />
</view>
......@@ -19,15 +19,15 @@ Component({
props: {
percent: 10,
usePercent:0,
countTime: 10,
countTime: 20,
styleType: '01',//browse_txt_bg count_bg_02
data: {
text: '浏览商品10s,获得任务奖励',
text: '浏览商品20s,获得任务奖励',
textBg: '//yun.dui88.com/taobaomini/clientCTest/count_bg_02@2x.png',
progressWidth:'130',
progressHeight:'18',
clock_bg: '//yun.dui88.com/taobaomini/clientCTest/clock@2x.png',
countTxt: '10',
countTxt: '20',
countTxtColor: '#1CA4ED',
countTxtSize: '32'
}
......
......@@ -68,7 +68,7 @@ Component({
if (taskType == 'browseGoods') {
this.browseGoodsTimes()
}
console.log(10 - this.usePercent)
console.log(20 - this.usePercent)
}
}
},
......@@ -129,7 +129,7 @@ Component({
this.setData({
usePercent: this.data.usePercent + 1
}, () => {
if (this.data.usePercent >= 10) {
if (this.data.usePercent >= 20) {
console.log(this.data.usePercent)
this.props.onCompleteTask(taskType)
clearInterval(this.timer)
......
......@@ -13,42 +13,42 @@ const {
getSystemInfo
} = tbcc.tb;
Page({
changeStr:'***',
changeStr: '***',
data: {
rankList: [],
myRankInfo: {},
myRank: '',
activtyTime: '',
rankPrize: [{
id:1,
name:'2999元购物金',
w:63,
left:55
id: 1,
name: '2999元购物金',
w: 63,
left: 55
}, {
id:2,
name:'1111元购物金',
w:94,
left:40
id: 2,
name: '1111元购物金',
w: 94,
left: 40
}, {
id:3,
name:'蕉内热皮套装',
w:102,
left:32
id: 3,
name: '蕉内热皮套装',
w: 102,
left: 32
}, {
id:4,
name:'蕉内家居服',
w:110,
left:28
id: 4,
name: '蕉内家居服',
w: 110,
left: 28
}, {
id:5,
name:'蕉内袜子礼盒',
w:125,
left:24
id: 5,
name: '蕉内袜子礼盒',
w: 125,
left: 24
}, {
id:6,
name:'蕉内睡眠眼罩',
w:140,
left:12
id: 6,
name: '蕉内睡眠眼罩',
w: 140,
left: 12
}]
},
......@@ -72,34 +72,35 @@ Page({
}) || {};
if (success) {
my.hideLoading();
if (data.myRankInfo && data.myRankInfo.rank) {
let myrank = data.myRankInfo.rank >= 500 ? '500+' : data.myRankInfo.rank;
for(let i=0;i<data.list.length;i++){
let len = data.list[i].userNick.length;
let str = data.list[i].userNick;
if(len<=4){
data.list[i].userNick = str.substr(0,0)+this.changeStr+str.substr(len-1,len-1);
}else{
data.list[i].userNick = str.substr(0,Math.floor((len-3)/2))+this.changeStr+str.substr(len-Math.floor((len-3)/2)-1,len-1)
}
// substr
}
let str = data.myRankInfo.userNick;
let len = str.length;
if(len<=4){
data.myRankInfo.userNick = str.substr(0,0)+this.changeStr+str.substr(len-1,len-1);
}else{
data.myRankInfo.userNick = str.substr(0,Math.floor((len-3)/2))+this.changeStr+str.substr(len-Math.floor((len-3)/2)-1,len-1)
if (len <= 4) {
data.myRankInfo.userNick = str.substr(0, 0) + this.changeStr + str.substr(len - 1, len - 1);
} else {
data.myRankInfo.userNick = str.substr(0, Math.floor((len - 3) / 2)) + this.changeStr + str.substr(len - Math.floor((len - 3) / 2) - 1, len - 1)
}
this.setData({
rankList: data.list,
myRankInfo: data.myRankInfo,
myRank: myrank
})
}
for (let i = 0; i < data.list.length; i++) {
let len = data.list[i].userNick.length;
let str = data.list[i].userNick;
if (len <= 4) {
data.list[i].userNick = str.substr(0, 0) + this.changeStr + str.substr(len - 1, len - 1);
} else {
data.list[i].userNick = str.substr(0, Math.floor((len - 3) / 2)) + this.changeStr + str.substr(len - Math.floor((len - 3) / 2) - 1, len - 1)
}
}
this.setData({
rankList: data.list,
})
}
},
/**获取活动时间 */
......@@ -122,7 +123,11 @@ Page({
const dd = new Date(time).getDate() + '';
let m = mm.padStart(2, '0');
let d = dd.padStart(2, '0');
const t1 = `${yy}.${m}.${d} `;
const t2 = new Date(time).getHours() + ''; //获取时
const t3 = new Date(time).getMinutes() + ''; //获取分
const t4 = new Date(time).getMilliseconds() + ''; //获取秒
console.log(time, new Date(time + 48 * 60 * 60 * 1000).toLocaleString(), 'time');
const t1 = `${yy}.${m}.${d} `+ t2.padStart(2, '0') + ":" + t3.padStart(2, '0');
let date = t1;
return date;
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment