chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
 
 
class friendhelp_controller extends common{
    //获取当前任务权益 或 系统默认权益
    function nowpackage_action(){
    
        $helpM        =    $this -> MODEL('friendhelp');
 
        $package    =    $helpM -> getPackageInfo($this -> uid);
        
        if($package){
            echo json_encode($package);
        }    
        
    
    }
 
    //邀请好友助力
    function addhelp_action(){
    
        if($this -> config['sy_help_open'] !='1'){
 
            $this->layer_msg('暂未开启好友助力!', 8, 0);
        }
        
        $helpM    =    $this -> MODEL('friendhelp');
 
        $return    =    $helpM -> addHelp($this->uid);
        
        echo json_encode($return);
        
    
    }
 
    //邀请好友助力-获取二维码
    function gethelpcode_action(){
        
        if($_GET['id'] && $_GET['token']){
 
            $url    =     Url('wap').'index.php?c=friendhelp&a=show&id='.intval($_GET['id']).'&token='.rawurlencode($_GET['token']);
            
 
            include_once LIB_PATH."yunqrcode.class.php";
            YunQrcode::generatePng2($url,4);
        }
    }
    
}
?>