LjhController.php 1.9 KB

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