123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509 |
- <?php
- namespace app\api\controller;
- use think\cache\driver\Redis;
- use think\Db;
- use EasyWeChat\Factory;
- use think\Exception;
- use think\Session;
- /**
- * @title 多人pk商城
- * @controller MultiPkMall
- * @group base
- */
- class MultiPkMall extends Base
- {
- public $crit_rate = 0;//暴击率
- public function initialize()
- {
- parent::initialize();
- //parent::check_login();
- }
- /**
- * @title 立即购买
- * @desc 立即购买
- * @author qc
- * @url /api/Multi_pk_mall/payOrderImmediately
- * @method POST
- * @header name:Authorization require:1 desc:Token
- * @param name:goods_id type:int require:1 default:-- desc:商品id
- * @param name:place type:int require:1 default:0 desc:位置(1红1,2红2,3橙1,4橙2)
- * @param name:pay_type type:int require:1 default:1 desc:支付方式(1明信片,2余额,3混合)
- * @return name:order_id type:int require:0 default:0 desc:成功时返回订单id
- * @return name:is_crit type:int require:0 default:0 desc:是否暴击
- * @return name:can_pk type:array require:0 default:0 desc:可以pk的记录
- * @return name:can_pk.create_at type:string require:0 default:'' desc:时间
- * @return name:can_pk.case_name type:string require:0 default:'' desc:抽中商品
- * @return name:can_pk.case_cover type:string require:0 default:'' desc:抽中商品封面
- * @return name:can_pk.goods_title type:string require:0 default:'' desc:标题
- * @return name:can_pk.color type:string require:0 default:'' desc:颜色(0黑色,1红色,2金色)
- * @return name:can_pk.crystal type:string require:0 default:'' desc:明信片
- * @return name:pk_log type:array require:0 default:0 desc:pk胜利记录
- * @return name:pk_log.win_data type:array require:0 default:0 desc:详情
- * @return name:pk_log.win_data.case_name type:string default:-- desc:奖励名称
- * @return name:pk_log.win_data.case_cover type:string default:-- desc:封面
- * @return name:pk_log.win_data.crystal type:string default:-- desc:明信片价值
- * @return name:pk_log.win_data.code type:int default:-- desc:编码
- * @return name:pk_log.win_data.user_name type:int default:-- desc:会员名称
- * @return name:pk_log.win_data.headimg type:int default:-- desc:会员头像
- * @return name:pk_log.lost_data type:array require:0 default:0 desc:失败详情
- * @return name:pk_log.lost_data.case_name type:string default:-- desc:奖励名称
- * @return name:pk_log.lost_data.case_cover type:string default:-- desc:封面
- * @return name:pk_log.lost_data.crystal type:string default:-- desc:明信片价值
- * @return name:pk_log.lost_data.code type:int default:-- desc:编码
- * @return name:pk_log.lost_data.user_name type:int default:-- desc:会员名称
- * @return name:pk_log.lost_data.headimg type:int default:-- desc:会员头像
- *
- */
- public function payOrderImmediately()
- {
- Db::startTrans();
- $msg= '';$com=true;
- try{
- $goods_id = input("post.goods_id");
- $num = input("post.num",1);
- $place = input("post.place");
- $pay_type = input("post.pay_type",1);
- $place_arr = [1,2,3,4];
- if(!in_array($place,$place_arr)) throw new Exception('请选择位置!');
- $goods_info = Db::table('pk_goods')->where(['id'=>$goods_id,'status'=>1,'is_deleted'=>0])->find();
- $price_total = bcmul($goods_info['goods_price'],$num,2);
- if(empty($goods_info)) throw new Exception('商品已下架');
- // if(!$goods_info['end_time'] || strtotime($goods_info['end_time']) < time()) throw new Exception('商品售卖时间已结束');
- if( $goods_info['stock'] < $num) throw new Exception('商品库存不足无法进行pk');
- if($price_total <= 0) throw new Exception('金额有误');
- $user_info = Db::table('store_member')->find($this->uid);
- if($pay_type == 1 && $user_info['crystal'] < $price_total) throw new Exception('明信片不足!');
- if($pay_type == 2 && $user_info['crystal_cash'] < $price_total) throw new Exception('余额不足!');
- if($pay_type == 3 && $price_total > 0 && bcadd($user_info['crystal'],$user_info['crystal_cash'],2) < $price_total) throw new Exception('余额不足!');
- // 验证待pk位置,最多3个
- $check_num = Db::table('pk_draw')->where(['goods_id'=>$goods_id,'pk_status'=>0,'full_num'=>4,'place'=>$place])->count();
- if($check_num >= 3 ) throw new Exception('该位置已满!');
- // pk 防截胡
- $limit_fifty = Db::table('pk_draw')->field('id,user_id')->where('goods_id',$goods_id)->where('full_num',4)->limit(0,50)->select();
- $buy_num = 0;
- if($goods_info['base_stock'] - $goods_info['stock'] > 50){
- foreach ($limit_fifty as $fv){
- if($fv['user_id'] == $this->uid) $buy_num++;
- }
- if($buy_num < 5 ) throw new Exception('购物买权限不足!');
- }else if($goods_info['base_stock']- $goods_info['stock'] - $num > 50) {
- $num = $goods_info['base_stock']- $goods_info['stock'] - $num - 50 ;
- foreach ($limit_fifty as $fv){
- if($fv['user_id'] == $this->uid) $buy_num++;
- }
- if((50 - count($limit_fifty) + $buy_num) < 5 ) throw new Exception('试试少买几个~!!~');
- }
- // pk 防截胡end
- // 订单数据 && 生成订单
- $order_info =[
- 'uid' =>$this->uid,
- 'order_no' => get_order_sn(),
- 'price_total' => $price_total,
- 'goods_num' => $num,
- 'goods_id' => $goods_id,
- 'goods_cover' => $goods_info['cover'],
- 'goods_name' => $goods_info['name'],
- 'create_at' => date('Y-m-d H:i:s'),
- 'pay_time' => date('Y-m-d H:i:s'),
- 'pay_type' => $pay_type,
- 'pay_state' => 1,
- 'status' => 1,
- 'full_num' => 4,
- 'pay_no' => get_order_sn()
- ];
- Db::table('pk_order')->insert($order_info);
- $order_id = Db::getLastInsID();
- $order_info['id'] = $order_id;
- // 扣除余额
- if($order_info['price_total'] > 0){
- // 扣除余额
- if($pay_type == 1) {
- Db::table('store_member')->where(['id'=>$this->uid])->update([
- 'crystal'=>bcsub($user_info['crystal'],$order_info['price_total'],2),
- ]);
- crystal_log($this->uid,$order_info['price_total'],'明信片支付',6);
- }else if($pay_type == 2){
- Db::table('store_member')->where(['id'=>$this->uid])->update([
- 'crystal_cash'=>bcsub($user_info['crystal_cash'],$order_info['price_total'],2),
- ]);
- balance_log($this->uid,$order_info['price_total'],'余额支付',6);
- }else{
- $user_up = [];
- if($user_info['crystal_cash'] >= $order_info['price_total'] ){
- $user_up['crystal_cash'] = bcsub($user_info['crystal_cash'],$order_info['price_total'],2);
- balance_log($this->uid,$order_info['price_total'],'余额支付',6);
- }else{
- $user_up['crystal_cash'] = 0;
- $user_up['crystal'] = bcsub( $user_info['crystal_cash'] + $user_info['crystal'],$order_info['price_total'],2);
- crystal_log($this->uid,$user_info['crystal'] - $user_up['crystal'] ,'明信片支付',6);
- }
- Db::table('store_member')->where(['id'=>$this->uid])->update($user_up);
- }
- }
- // 扣除余额end
- $magic_day = intval(sysconf('magic_days'));// 获取设置天数
- $base_award = json_decode($goods_info['base_award'],true);
- // 抽奖设置
- $goods_spec = json_decode($goods_info['spec'],true);
- $draw_data = point_lottery($goods_spec,'store_num',1);
- // 抽奖详情
- $draw_info = [];
- foreach ($draw_data as $dk=>$dv) {
- $goods_spec[$dk]['store_num'] -= $dv;
- $draw_info = [
- 'user_id' => $this->uid,
- 'create_at' => date('Y-m-d H:i:s'),
- 'goods_id' => $goods_id,
- 'order_id' => $order_id,
- 'case_name' => $goods_spec[$dk]['award_name'],
- 'goods_title'=> $goods_spec[$dk]['award_title'],
- 'case_cover'=> $goods_spec[$dk]['spec_img'],
- 'num' => 1,
- 'spec_key' => $dk,
- 'crystal' => $goods_spec[$dk]['crystal'],
- 'code' => $goods_spec[$dk]['code'],
- 'color' => $goods_spec[$dk]['color'],
- 'place' => $place,
- 'full_num' => $goods_info['full_num'],
- ];
- }
- Db::table('pk_draw')->insert($draw_info);
- $draw_info['id'] = Db::getLastInsID();
- // 位置查询
- $full_draw = [];
- foreach ($place_arr as $plv)
- {
- if($place != $plv) {
- $ck_draw = Db::table('pk_draw')
- ->where(['goods_id'=>$goods_id,'pk_status'=>0,'full_num'=>4,'place'=>$plv])
- ->limit(0,1)
- ->order('id asc')
- ->select();
- if(!empty($ck_draw)) $full_draw[] = $ck_draw[0];
- }else{
- $full_draw[] = $draw_info;
- }
- }
- $goods_update = [];
- // 能pk
- if(count($full_draw) == 4) {
- array_multisort(array_column($full_draw,'place'), SORT_ASC, $full_draw);// 按位置升序排序
- $red_team = [$full_draw[0], $full_draw[1]];// 红队id
- $orange_team = [$full_draw[3], $full_draw[4]];// 橙队id
- // 抽中金额、编码 排序
- $rank_draw = Db::table('pk_draw')
- ->where('id','in',array_column($full_draw,'id'))
- ->order('crystal desc ,code desc , id desc')
- ->select();
- $red_win = 1;// 是否是红队赢
- // 红队赢
- if(in_array($rank_draw[0]['id'],array_column($red_team,'id'))) {
- // 红1最大
- if($rank_draw[0]['id'] == $red_team[0]['id']){
- $win_magic = [
- $this->getWinData($red_team,0,0,$goods_id,$rank_draw,$magic_day),
- $this->getWinData($red_team,1,1,$goods_id,$rank_draw,$magic_day),
- ];
- }else{
- $win_magic = [
- $this->getWinData($red_team,0,1,$goods_id,$rank_draw,$magic_day),
- $this->getWinData($red_team,1,0,$goods_id,$rank_draw,$magic_day),
- ];
- }
- Db::table('magic_case')->insertAll($win_magic);
- // pk 输了是否有安慰奖
- if($base_award['base_crystal'] > 0 && $base_award['base_goods']) {
- $lose_case = [];
- array_map(function ($val)use(&$lose_case,$goods_id,$magic_day,$base_award){
- $lose_case[] = [
- 'order_id' => $val['order_id'],
- 'goods_id' => $goods_id,
- 'user_id' => $val['user_id'],
- 'create_at' => date('Y-m-d H:i:s'),
- 'num' => 1,
- 'base_num' => 1,
- 'source' => 0,
- 'crystal' => $base_award['base_crystal'],
- 'case_name' => $base_award['base_goods'],
- 'case_cover' => $base_award['base_cover'],
- 'past_at' => date('Y-m-d H:i:s',strtotime("+$magic_day days")),
- 'past_int' => strtotime("+$magic_day days"),
- 'draw_id' => $val['id'],
- 'from' => 3,
- ];
- },$orange_team);
- Db::table('magic_case')->insertAll($lose_case);
- }else{
- $lose_case=[
- ['user_id'=>$orange_team[0]['user_id'],'order_id'=>$orange_team[0]['order_id'],'case_name'=>''],
- ['user_id'=>$orange_team[1]['user_id'],'order_id'=>$orange_team[1]['order_id'],'case_name'=>''],
- ];
- }
- }else{
- // 橙队获胜
- $red_win = 0;
- // 橙1最大
- if($rank_draw[0]['id'] == $orange_team[0]['id']){
- $win_magic = [
- $this->getWinData($orange_team,0,0,$goods_id,$rank_draw,$magic_day),
- $this->getWinData($orange_team,1,1,$goods_id,$rank_draw,$magic_day),
- ];
- }else{
- $win_magic = [
- $this->getWinData($orange_team,0,1,$goods_id,$rank_draw,$magic_day),
- $this->getWinData($orange_team,1,0,$goods_id,$rank_draw,$magic_day),
- ];
- }
- Db::table('magic_case')->insertAll($win_magic);
- // pk 输了是否有安慰奖
- if($base_award['base_crystal'] > 0 && $base_award['base_goods']) {
- $lose_case = [];
- array_map(function ($val)use(&$lose_case,$goods_id,$magic_day,$base_award){
- $lose_case[] = [
- 'order_id' => $val['order_id'],
- 'goods_id' => $goods_id,
- 'user_id' => $val['user_id'],
- 'create_at' => date('Y-m-d H:i:s'),
- 'num' => 1,
- 'base_num' => 1,
- 'source' => 0,
- 'crystal' => $base_award['base_crystal'],
- 'case_name' => $base_award['base_goods'],
- 'case_cover' => $base_award['base_cover'],
- 'past_at' => date('Y-m-d H:i:s',strtotime("+$magic_day days")),
- 'past_int' => strtotime("+$magic_day days"),
- 'draw_id' => $val['id'],
- 'from' => 3,
- ];
- },$red_team);
- Db::table('magic_case')->insertAll($lose_case);
- }else{
- $lose_case=[
- ['user_id'=>$red_team[0]['user_id'],'order_id'=>$red_team[0]['order_id'],'case_name'=>''],
- ['user_id'=>$red_team[1]['user_id'],'order_id'=>$red_team[1]['order_id'],'case_name'=>''],
- ];
- }
- }
- $multi_info = [
- 'create_at' => date('Y-m-d H:i:s'),
- 'goods_id' => $goods_id,
- 'red_team' => $red_win ? json_encode($win_magic):json_encode($lose_case),
- 'orange_team' => $red_win ? json_encode($lose_case):json_encode($win_magic),
- 'base_data' => json_encode($base_award),
- 'red_win' => $red_win,
- 'win_order1' => $win_magic[0]['order_id'],
- 'win_order2' => $win_magic[1]['order_id'],
- 'win_user1' => $win_magic[0]['user_id'],
- 'win_user2' => $win_magic[2]['user_id'],
- 'lose_order1' => $lose_case[0]['order_id'],
- 'lose_order2' => $lose_case[1]['order_id'],
- 'lose_user1' => $lose_case[0]['user_id'],
- 'lose_user2' => $lose_case[2]['user_id'],
- 'full_draw' => json_encode($full_draw),
- ];
- Db::table('pk_multi_info')->insert($multi_info);
- // 更新PK抽奖记录
- Db::table('pk_draw')->where('id','in',[$rank_draw[0]['id'],$rank_draw[1]['id']])->update(['pk_status'=>$red_win?2:1]);
- Db::table('pk_draw')->where('id','in',[$rank_draw[2]['id'],$rank_draw[3]['id']])->update(['pk_status'=>$red_win?1:2]);
- foreach ($rank_draw as $fk=>$fv) {
- if(in_array($fk,[0,1])) continue;
- // 恢复库存
- $goods_spec[$fv['spec_key']]['store_num']++;
- $goods_info['stock']++;
- }
- $goods_update['pk_num'] = $goods_info['pk_num'] + 1;
- }
- // 更新库存 && 规格详情
- $goods_update['spec'] = json_encode($goods_spec);
- $goods_update['stock'] = $goods_info['stock'] - 1;
- Db::table('pk_goods')->where('id',$goods_info['id'])->update($goods_update);
- Db::commit();
- }catch (\Exception $e){
- Db::rollback();
- $com=false;
- $msg = $e->getMessage();
- }
- if($com) {
- $can_pk = Db::table('pk_draw')->where(['order_id'=>$order_id,'pk_status'=>0,'full_num'=>4])->select();//可以PK数据
- $pk_log = Db::table('pk_info')->where(['lose_order|win_order'=>$order_id])->select();
- foreach ($pk_log as &$lv){
- $lv['base_data'] = json_decode($lv['base_data'],true);
- $win_data = json_decode($lv['win_data'],true);
- $lose_data = json_decode($lv['lose_data'],true);
- $win_user = Db::table('store_member')->field('headimg,name')->where('id',$lv['win_user'])->find();
- $lose_user = Db::table('store_member')->field('headimg,name')->where('id',$lv['lose_user'])->find();
- $win_data['headimg'] =$win_user['headimg'];
- $win_data['user_name'] =$win_user['name'];
- $lose_data['headimg'] =$lose_user['headimg'];
- $lose_data['user_name'] =$lose_user['name'];
- $lv['win_data'] = $win_data;
- $lv['lose_data'] = $lose_data;
- }
- $this->success('ok',['order_id'=>$order_id ? : 0,'can_pk'=>$can_pk,'pk_log'=>$pk_log]);
- }else{
- $this->error($msg);
- }
- }
- // 获取pk胜利数据
- public function getWinData($team,$win_key,$award_key,$goods_id,$rank_draw,$magic_day,$place = 0)
- {
- return [
- 'order_id' => $team[$win_key]['order_id'],
- 'goods_id' => $goods_id,
- 'user_id' => $team[$win_key]['user_id'],
- 'create_at' => date('Y-m-d H:i:s'),
- 'num' => 1,
- 'base_num' => 1,
- 'source' => 0,
- 'crystal' => $rank_draw[$award_key]['crystal'],
- 'case_name' => $rank_draw[$award_key]['case_name'],
- 'case_cover'=> $rank_draw[$award_key]['case_cover'],
- 'past_at' => date('Y-m-d H:i:s',strtotime("+$magic_day days")),
- 'past_int' => strtotime("+$magic_day days"),
- 'color' => $rank_draw[$award_key]['color'],
- 'draw_id' => $rank_draw[$award_key]['id'],
- 'from' => 3,
- 'place' => $place
- ];
- }
- /**
- * @title 取消PK
- * @desc 取消PK
- * @author qc
- * @url /api/Multi_pk_mall/cancelPk
- * @method POST
- * @header name:Authorization require:1 desc:Token
- * @param name:goods_id type:int require:1 default:-- desc:商品id
- */
- public function cancelPk()
- {
- $goods_id = input('post.goods_id');
- Db::startTrans();
- $msg = '取消成功!';
- try {
- $cancel_data = Db::table('pk_draw')
- ->where(['user_id'=>$this->uid,'goods_id'=>$goods_id,'pk_status'=>0,'full_num'=>4])
- ->select();
- if(empty($cancel_data)) throw new Exception('PK已完成');
- $goods_info = Db::table('pk_goods')->find($goods_id);
- $goods_spec = json_decode($goods_info['spec'],true);
- foreach ($cancel_data as $cv) {
- $goods_spec[$cv['spec_key']]['store_num']++;
- $order_info = Db::table('pk_order')->field('id,pay_type')->find($cv['order_id']);
- $user_info = Db::table('store_member')->find($this->uid);
- if($order_info['pay_type'] == 1){
- Db::table('store_member')->where('id',$this->uid)->update(['crystal'=>$user_info['crystal']+$goods_info['goods_price']]);
- crystal_log($this->uid,$goods_info['goods_price'],'PK订单取消',9,$cv['order_id']);
- }else{
- Db::table('store_member')->where('id',$this->uid)->update(['crystal_cash'=>$user_info['crystal_cash']+$goods_info['goods_price']]);
- balance_log($this->uid,$goods_info['goods_price'],'PK订单取消',9,$cv['order_id']);
- }
- }
- // 恢复商品库存
- Db::table('pk_goods')->where('id',$goods_id)->update(['spec'=>json_encode($goods_spec),'stock'=>$goods_info['stock']+count($cancel_data)]);
- // 取消记录
- Db::table('pk_draw')->where(['user_id'=>$this->uid,'goods_id'=>$goods_id,'pk_status'=>0,'full_num'=>4])->update(['pk_status'=>3]);
- Db::commit();
- }catch (\Exception $e){
- $msg = $e->getMessage();
- Db::rollback();
- }
- $this->success($msg);
- }
- /**
- * @title 获取已pk记录
- * @desc 获取已pk记录
- * @author qc
- * @url /api/Multi_pk_mall/getAllPkLog
- * @method GET
- * @header name:Authorization require:1 desc:Token
- * @param name:page type:int default:1 desc:页数
- * @param name:page_num type:int : default:20 desc:每页数
- * @param name:goods_id type:string require:1 default:-- desc:商品id
- * @param name:is_win type:string require:1 default:-- desc:pk输赢(0输1赢)
- * @return name:draw_info type:array default:-- desc:抽中数据
- * @return name:draw_info.case_name type:string default:-- desc:奖励名称
- * @return name:draw_info.case_cover type:string default:-- desc:封面
- * @return name:draw_info.crystal type:string default:-- desc:明信片价值
- * @return name:draw_info.code type:int default:-- desc:编码
- * @return name:draw_info.user_name type:int default:-- desc:会员名称
- * @return name:draw_info.headimg type:int default:-- desc:会员头像
- * @return name:win_user type:int default:-- desc:pk胜利会员id
- * @return name:lose_user type:int default:-- desc:pk失败会员id
- * @return name:win_order type:int default:-- desc:pk胜利会员订单id
- * @return name:lose_order type:int default:-- desc:pk失败会员订单id
- * @return name:goods_status type:int default:-- desc:商品上下架状态(0下架1上架)
- * @return name:goods_deleted type:int default:-- desc:商品删除状态(0未删除1删除)
- * @return name:goods_name type:int default:-- desc:商品名称
- */
- public function getAllPkLog()
- {
- $user_info = Db::table('store_member')->find($this->uid);
- $list = Db::table('pk_info')->alias('p')
- ->field('p.id,p.goods_id,p.create_at,p.win_data,p.lose_data,p.win_user,p.lose_user,g.status as goods_status,g.is_deleted as goods_deleted,g.name as goods_name')
- ->where('win_user|lose_user',$this->uid)
- ->join('pk_goods g','g.id = p.goods_id','LEFT')
- ->order('p.id desc ')
- ->limit($this->off_set,$this->page_num)
- ->select();
- foreach ($list as &$lv) {
- $lv['is_win'] = $lv['win_user'] == $this->uid ? 1:0;
- $win_data = json_decode($lv['win_data'],true);
- $lose_data = json_decode($lv['lose_data'],true);
- $lv['draw_info'] = $lv['win_user'] == $this->uid ?$win_data:$lose_data;
- $lv['user_name'] = $user_info['name'];
- $lv['headimg'] = $user_info['headimg'];
- $lv['win_data'] =$win_data;
- $lv['lose_data'] =$lose_data;
- }
- $this->success('ok',['list'=>$list]);
- }
- /**
- * @title 获取待pk记录(pk商品)
- * @desc 获取待pk记录(pk商品)
- * @author qc
- * @url /api/Multi_pk_mall/getCanPkLog
- * @method GET
- * @header name:Authorization require:1 desc:Token
- * @return name:list type:array default:-- desc:待PK记录
- * @return name:list.headimg type:string default:-- desc:会员头像
- * @return name:list.user_name type:string default:-- desc:会员名称
- * @return name:list.create_at type:string default:-- desc:时间
- */
- public function getCanPkLog()
- {
- $user_info = Db::table('store_member')->find($this->uid);
- $list = Db::table('pk_draw')->alias('p')
- ->field('p.id,p.user_id,p.goods_id,p.create_at,g.status,g.name as goods_name')
- ->where(['user_id'=>$this->uid,'pk_status'=>0,'full_num'=>4])
- ->join('pk_goods g','g.id = p.goods_id','LEFT')
- ->order('p.id desc')
- ->select();
- foreach ($list as &$lv){
- $lv['headimg'] = $user_info['headimg'];
- $lv['user_name'] = $user_info['name'];
- }
- $this->success('ok',['list'=>$list]);
- }
- }
|