更新
This commit is contained in:
@@ -301,13 +301,13 @@ class UserZone extends Model
|
||||
return ['code' => 0, 'msg' => '请重试,', 'data' => null];
|
||||
}
|
||||
//评论別人的帖子- 每天第一条奖励【完成任务】
|
||||
if($info['user_id'] != $uid){
|
||||
// if($info['user_id'] != $uid){
|
||||
//今天的第一条评论奖励
|
||||
$first_comment = db::name('user_zone_comment')->where(['user_id' => $uid, 'createtime' => ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]])->count();
|
||||
if ($first_comment ==1) {
|
||||
model('DailyTasks')->tasks_complete($uid,5);
|
||||
}
|
||||
}
|
||||
// }
|
||||
//增加评论数量
|
||||
$reslut = db::name('user_zone')->where('id', $zid)->setInc('comment_num', 1);
|
||||
if (!$reslut) {
|
||||
@@ -641,9 +641,10 @@ class UserZone extends Model
|
||||
//获取字符串的长度和 判断字符串里面是否有,
|
||||
if((mb_strlen($v['loginip'], 'utf-8') > 8 && mb_strpos($v['loginip'], ',') !== false)){
|
||||
$ipd = explode(',', $v['loginip']);
|
||||
// $v['loginip'] = $ipd[0].' · '.$ipd[1];//省·市
|
||||
$sheng = $ipd[0] =='(null)' ? '' : $ipd[0];
|
||||
$shi = $ipd[1] ?? '';
|
||||
$v['loginip'] = $sheng.' '.$shi;//省·市
|
||||
$v['loginip'] = $sheng.' '.$shi;//省·市
|
||||
}else{
|
||||
$v['loginip'] = '未知';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user