getChannelId(); } public function common() { $result = [ "short_link" => '', // 推广锻炼(下载地址) "activity_status" => $this->activity_status, "activity_status_msg" => $this->activity_status_msg, "start_time" => $this->expiration_date['start'], "end_time" => $this->expiration_date['end'], ]; $short_link = model('promotion_short_link')->where(['game_id' => 344, 'channel_id' => $this->channel_id, 'type' => 1])->value('short_link'); if($short_link){ $result['short_link'] = T_DOMAIN . '/' . $short_link; } return $this->resultSuccess($result); } // 礼包码导入 public function importGift(){ $mark_code = input('mark_code', ''); $codeLists = input('codes'); if(!$mark_code || !$codeLists){ return $this->resultFail('参数有误!'); } $codeLists = explode(',', $codeLists); // 去除重复已存在 $res = Db::table('lr_prize_gift')->where(['code' => ['in', $codeLists]])->column('code'); $newArray = array_values(array_diff($codeLists, $res)); if(count($newArray) <= 0){ return ['code' => -102, 'msg' => '导入码为空!', 'data' => []]; } $res = (new \app\api\service\mlbb\HandleService())->importGift($mark_code, $newArray); if($res['code'] != 200){ return $this->resultFail($res['msg']); } return $this->resultSuccess([], '导入成功!'); } public function getTest(){ $mark_code = input('mark_code', ''); // $result = (new LvRenSdk())->getRoleList(); // $result = (new LvRenSdk())->getTagAndValByRole(); // $result = (new \app\api\service\mlbb\HandleService())->getCacheGiftNum(); // // dump($result); // return $this->resultSuccess($result['data']); } }