| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace pt\controllers;
- use bizHd\ljh\classes\LjhApplyClass;
- use common\components\dict;
- use common\components\miniUtil;
- use bizHd\wx\classes\WxOpenClass;
- use Yii;
- class LjhController extends BaseController
- {
- public $guestAccess = ['list'];
- //申请列表
- public function actionList()
- {
- ini_set('memory_limit', '2045M');
- set_time_limit(0);
- $list = LjhApplyClass::getAllByCondition(['status' => 2], 'payTime DESC', '*');
- if (empty($list)) {
- echo '暂无报名';
- }
- $apiHost = Yii::$app->params['hdImgHost'];
- echo "<div style='text-align:center;'>";
- echo "<table style='border:1px solid #CCCCCC;margin:0 auto;'>";
- echo "<tr><th>编号</th><th>订单号</th><th>花店名称</th><th>姓名</th><th>手机号</th><th>头像</th><th>报名费</th><th>支付时间</th><th>地址</th></tr>";
- foreach ($list as $key => $custom) {
- $shopName = $custom['name'] ?? '';
- $adminName = $custom['adminName'] ?? '';
- $mobile = $custom['mobile'] ?? '';
- $cover = $custom['cover'] ?? '';
- $actPrice = $custom['actPrice'] ?? 0;
- $address = $custom['address'] ?? '';
- $url = $apiHost . $cover;
- $no = bcadd($key, 1);
- $payTime = $custom['payTime'] ?? '';
- $orderSn = $custom['orderSn'] ?? '';
- $time = date("m-d H:i", strtotime($payTime));
- echo "<tr><td>{$no}</td><td>{$orderSn}</td>";
- echo "<td>{$shopName}</td><td>{$adminName}</td><td>{$mobile}</td>";
- echo "<td><img src='{$url}' style='width:100px;height:auto;' /></td><td>¥{$actPrice}</td><td>{$time}</td>";
- echo "<td>{$address}</td>";
- echo "</tr>";
- }
- echo "</table>";
- echo "</div>";
- echo '<style>td,th{border:1px solid #CCCCCC;}</style>';
- }
- }
|