Commit a5a905b1 authored by Edwise's avatar Edwise 🍷

nice

parent fe271968
......@@ -44,6 +44,13 @@ Component({
for (let i = 0; i < data.list.length; i++) {
data.list[i].createTime = this.getTime1(parseInt(data.list[i].createTime));
console.log(data.list[i].createTime)
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)
}
}
console.log(data.list);
this.setData({
......
......@@ -155,7 +155,7 @@
font-weight: bolder;
}
.task .task_item .task_award {
width: 118rpx;
width: 140rpx;
height: 24rpx;
opacity: 1;
left: 138rpx;
......
......@@ -71,7 +71,8 @@ Component({
} = e.target.dataset;
const {
taskType,
sellerId
sellerId,
rewards
} = item;
const {
success,
......@@ -101,12 +102,12 @@ Component({
// }
console.log('taskType', taskType)
if (taskType == 'invites')
str = `成功邀请${data.times}名好友,奖励为精力值+${data.energy}`
// if (taskType == 'invites')
str = `任务完成,增加${rewards}个温暖值`
commonToast(str || '领取成功');
}
/**领取成功,增加温暖值 */
my.__updateWarms&&my.__updateWarms();
await this.getTaskList()
flag = 0;
},
......@@ -137,7 +138,7 @@ Component({
setTimeout(() => {
flag = 0;
}, 1000);
await this.handleGoFollow(sellerId);
await this.handleGoFollow(3035493001);
await this.getTaskList();
break;
case 'sign':
......
......@@ -17,7 +17,7 @@
<image class="task_favoricon " a:if="{{item.taskType=='collectGoods'}}" src={{resList['a03d17c7-c4f0-42e0-9430-be61f5eb68d5'].url}} />
<label class="task_title " a:if="{{item.taskType!='sign'}}">{{item.title}}</label>
<label class="task_title " a:if="{{item.taskType=='sign'}}">{{item.title}}({{item.todayCompleteTimes}}/{{item.times}})</label>
<label class="task_title " a:if="{{item.taskType=='sign'||item.taskType=='collectGoods'}}">{{item.title}}({{item.todayCompleteTimes}}/{{item.times}})</label>
<label class="task_award ">温暖值 +{{item.rewards}}</label>
<block>
<!-- <label class="task_progress " a:if="{{item.taskType=='invites'}}">(不限次数)</label>
......
......@@ -128,7 +128,7 @@ Component({
}, () => {
if (this.data.usePercent >= 10) {
console.log(this.data.usePercent)
this.props.onCompleteTask(taskType)
this.props.onCompleteTask(taskType,1)
clearInterval(this.timer)
}
})
......
......@@ -198,7 +198,7 @@ Page({
// console.log('查询关注店铺状态失败', err);
// });
my.tb.checkShopFavoredStatus({
id: 702037595,
id: 3035493001,
success: (res) => {
if(res.isFavor){
this.favoredStatus = true
......
......@@ -85,6 +85,15 @@ Page({
// 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)
}
this.setData({
rankList: data.list,
myRankInfo: data.myRankInfo,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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