LjhController.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace pt\controllers;
  3. use bizHd\ljh\classes\LjhApplyClass;
  4. use common\components\util;
  5. use Yii;
  6. class LjhController extends BaseController
  7. {
  8. public $guestAccess = ['list'];
  9. //申请列表
  10. public function actionList()
  11. {
  12. ini_set('memory_limit', '2045M');
  13. set_time_limit(0);
  14. $list = LjhApplyClass::getAllByCondition(['status' => 2], 'payTime DESC', '*');
  15. if (empty($list)) {
  16. echo '暂无报名';
  17. }
  18. $apiHost = Yii::$app->params['hdImgHost'];
  19. echo "<table style='border:1px solid #CCCCCC;'>";
  20. echo "<tr><th>编号</th><th>花店名称</th><th>姓名</th><th>手机号</th><th>头像</th><th>报名费</th><th>支付时间</th><th>地址</th></tr>";
  21. foreach ($list as $key => $custom) {
  22. $shopName = $custom['name'] ?? '';
  23. $adminName = $custom['adminName'] ?? '';
  24. $mobile = $custom['mobile'] ?? '';
  25. $cover = $custom['cover'] ?? '';
  26. $actPrice = $custom['actPrice'] ?? 0;
  27. $address = $custom['address'] ?? '';
  28. $url = $apiHost . $cover;
  29. $no = bcadd($key, 1);
  30. $payTime = $custom['payTime'] ?? '';
  31. $time = date("m-d H:i", strtotime($payTime));
  32. echo "<tr style='border:1px solid #CCCCCC;'><td>{$no}</td>";
  33. echo "<td>{$shopName}</td><td>{$adminName}</td><td>{$mobile}</td>";
  34. echo "<td><img src='{$url}' style='width:100px;height:auto;' /></td><td>{$actPrice}</td><td>{$time}</td>";
  35. echo "<td>{$address}</td>";
  36. echo "</tr>";
  37. }
  38. echo "</table>";
  39. }
  40. }