Пример #1
0
 public function week()
 {
     $userdata = ModelFactory::User()->check_login();
     $id = $userdata['id'];
     $price_list = $this->cache()->get('price_list');
     if (!$price_list) {
         $price_list = ModelFactory::Pricelist()->get_list([]);
         if ($price_list) {
             $this->cache()->save('price_list', $price_list, 600);
         } else {
             $this->cache()->save('price_list', [], 5);
         }
     }
     $silver_get = 0;
     if ($id) {
         $silver_get = $this->getUserTask($userdata, CONSTFILE::USER_TASK_HUODONG_SILVER_CION);
     }
     $userdata['qqshare'] = site_url('share?' . http_build_query(['type' => 'qq', 'from' => 'xiaobai']));
     $userdata['qqzshare'] = site_url('share?' . http_build_query(['type' => 'qqz', 'from' => 'xiaobai']));
     $userdata['sinashare'] = site_url('share?' . http_build_query(['type' => 'sina', 'from' => 'xiaobai']));
     $userdata['invate_url'] = base_url('/share/people?' . http_build_query(['trace' => base64_encode($id), 'from_invite' => 1]));
     $userdata['silver_get'] = $silver_get;
     $userdata['price_list'] = $price_list;
     $userdata['me'] = $this->me;
     $this->load->view("help/week.php", $userdata);
 }