當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DateUtil::buildDays方法代碼示例

本文整理匯總了PHP中DateUtil::buildDays方法的典型用法代碼示例。如果您正苦於以下問題:PHP DateUtil::buildDays方法的具體用法?PHP DateUtil::buildDays怎麽用?PHP DateUtil::buildDays使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DateUtil的用法示例。


在下文中一共展示了DateUtil::buildDays方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index($projectId)
 {
     $project = (new ProjectModel())->readOne($projectId + 0);
     if (!$project) {
         $this->message('項目不存在!');
     }
     $shops = (new ShopModel())->getAllShops();
     $beauticians = (new BeauticianModel())->getAllBeauticians();
     $days = DateUtil::buildDays();
     $this->view('offline/appointment', array('beauticians' => $beauticians, 'shops' => $shops, 'days' => $days, 'project' => $project));
 }
開發者ID:guohao214,項目名稱:xinya,代碼行數:11,代碼來源:OfflineAppointment.php

示例2: index

 /**
  * 展示預約頁麵
  * 選擇美容師與預約時間
  * 此處要驗證授權
  *
  * @param $shopId 店鋪ID
  */
 public function index($shopId)
 {
     $weixinUtil = new WeixinUtil();
     // 驗證是否已授權
     $weixinUtil->authorize("appointment/index/{$shopId}");
     // 獲得預約項目
     $projectId = (new CartUtil())->cart();
     $projectId += 0;
     if (!$projectId) {
         $this->message('預約項目不存在!');
     }
     $openId = $weixinUtil->getOpenId();
     if ((new ProjectPropertyModel())->projectOnlyForNewUser($projectId, $openId)) {
         $this->message('此美容項目隻針對新用戶!');
     }
     //是否已經選擇了店鋪,並且店鋪是有效的
     $shops = (new ShopModel())->getAllShops();
     if (is_numeric($shopId) && array_key_exists($shopId, $shops)) {
         // 獲得項目信息
         $project = (new ProjectModel())->readOne($projectId);
         if (!$project) {
             $this->message('預約項目不存在!');
         }
         // 跳轉到 選擇 美容師
         $beauticians = (new BeauticianModel())->getAllBeauticians();
         $lastOrder = (new OrderModel())->getLastOrder($openId);
         $days = DateUtil::buildDays();
         $coupons = array();
         if ($project['can_use_coupon']) {
             // 查詢優惠券
             $coupons = (new CustomerCouponModel())->getCustomerNotUseCouponList($openId);
         }
         $this->load->view('frontend/appointment/beautician', array('beauticians' => $beauticians, 'project' => $project, 'shopId' => $shopId, 'days' => $days, 'lastOrder' => $lastOrder, 'coupons' => $coupons));
     } else {
         // 跳轉到選擇店鋪
         $returnUrl = urlencode(UrlUtil::createUrl('appointment/index'));
         ResponseUtil::redirect(UrlUtil::createUrl("shop/index?returnUrl={$returnUrl}"));
     }
 }
開發者ID:guohao214,項目名稱:xinya,代碼行數:46,代碼來源:Appointment.php


注:本文中的DateUtil::buildDays方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。