lizhen_gitee 1 år sedan
förälder
incheckning
b4c583d03a

+ 3 - 7
application/api/controller/Gift.php

@@ -32,7 +32,7 @@ class Gift extends Api
             $where['type'] = $type;
         }
 
-        $giftList = Db::name('gift')->where($where)->order("sort","asc")->select();
+        $giftList = Db::name('gift')->field('id,name,price,image,special')->where($where)->order("sort","asc")->select();
         $giftList = list_domain_image($giftList,['image','special']);
         $this->success("获取成功!",$giftList);
     }
@@ -53,14 +53,10 @@ class Gift extends Api
      */
     public function getMyBackGift() {
 
-        $userid = $this->request->request("user_id", $this->auth->id);
-        //$page = $this->request->request('page',1); // 分页
-        //$pageNum = $this->request->request('pageNum',10); // 分页
+        $userid = input("user_id", $this->auth->id);
         // 分页搜索构建
-        //$pageStart = ($page-1)*$pageNum;
         $list = \app\common\model\GiftBack::field("id,name,image,gif_image,value,sum(number) as number")
             ->where(["user_id"=>$userid,"is_use"=>0])
-          //  ->limit($pageStart,$pageNum)
             ->group("name")
             ->select();
         $this->success("获取成功!",$list);
@@ -87,7 +83,7 @@ class Gift extends Api
      * 获取我的礼物墙
      */
     public function getMyGiftWall_typing() {
-        $user_id = $this->request->request("user_id", 0);
+        $user_id = input("user_id", 0);
 
         $userid = $user_id ? $user_id : $this->auth->id;
 

+ 1 - 0
application/api/controller/Partytest.php

@@ -35,6 +35,7 @@ class Party extends Common
 
     /**
      * 全麦/单独赠送礼物
+     * 优化之前的送礼物
      */
     public function giveGiftToYou() {
         // 是否背包赠送: 1=是,0=否

+ 4 - 4
application/extra/wallet.php

@@ -5,15 +5,15 @@
 return [
     'logtype' => [
         //jewel, 从原有代码里找出来的
-        0  => '下单',   //减少
+        0  => '下单',   //减少    用不到了
         1  => '充值',  //增加
         2  => '购买锤子',  //减少  用不到了
         3  => '赠送礼物',   //减少
         4  => '声币兑换钻石',  //增加  用不到了
-        5  => '开通贵族',    //减少
-        15 => '开通贵族赠送', //增加
+        5  => '开通贵族',    //减少   用不到了
+        15 => '开通贵族赠送', //增加   用不到了
         6  => '购买装扮',    //减少
-        7  => '拒绝订单返还',    //增加
+        7  => '拒绝订单返还',    //增加  用不到了
         8  => '完成用户订单获得收益',    //增加  用不到了,改成106了
         9  => '获赠礼物', //增加     api/Live.php大概率废弃了
         11 => '私聊转账',  //减少