Ver código fonte

送礼物日志

lizhen_gitee 1 ano atrás
pai
commit
80b91bfdf7
1 arquivos alterados com 5 adições e 20 exclusões
  1. 5 20
      application/api/controller/Gift.php

+ 5 - 20
application/api/controller/Gift.php

@@ -20,6 +20,7 @@ class Gift extends Api
         $this->gifttypeModel = new \app\common\model\GiftType();
     }
 
+    //仅用来测试
     public function test2(){
         $user_id = $this->auth->id;
         $gift_id = input('gift_id');
@@ -35,6 +36,7 @@ class Gift extends Api
     }
 
     //gift_id必须是爆币礼物才可以
+    //仅用来测试
     public function baobi($user_id,$gift_id,$pay_total){
 
         //奖项参数
@@ -219,24 +221,6 @@ class Gift extends Api
         $this->success("获取成功!", $list);
     }
 
-    /**
-     * 获取我的礼物墙
-     */
-    public function getMyGiftWall_typing() {
-        $user_id = input("user_id", 0);
-
-        $userid = $user_id ? $user_id : $this->auth->id;
-
-        $list = Db::name('gift_user_typing')->alias('log')
-            ->join('gift', 'gift.id = log.gift_id', 'LEFT')
-            ->field('log.*,sum(number) as number,gift.name,gift.image,gift.special')
-            ->where(['log.user_to_id' => $userid])
-            ->group('log.gift_id')
-            ->order('gift.price desc')
-            ->select();
-        $list = list_domain_image($list,['image','special']);
-        $this->success("获取成功!", $list);
-    }
 
     /**
      * 获取我的收送礼明细
@@ -266,9 +250,9 @@ class Gift extends Api
 
         foreach($list as $key => $val){
             if($type == 1){
-                $remark = '赠送'.$val['nickname'].','.$val['gift_name'].'*'.$val['number'].',价值'.$val['value'].'钻石';
+                $remark = '送给Ta '.$val['gift_name'].'*'.$val['number'];
             }else{
-                $remark = $val['nickname'].'赠送,'.$val['gift_name'].'*'.$val['number'].',价值'.$val['value'].'钻石';
+                $remark = '送给你 '.$val['gift_name'].'*'.$val['number'];
             }
             $rs[] = [
                 'id'         => $val['id'],
@@ -278,6 +262,7 @@ class Gift extends Api
                 'nickname'    => $val['nickname'],
                 'avatar'     => $val['avatar'],
                 'gender'     => $val['gender'],
+                'user_id'    => $type == 1 ? $val['user_to_id'] : $val['user_id'],
             ];
         }
         $this->success(1,$rs);