陈德本 5 gadi atpakaļ
vecāks
revīzija
60020bac1a
1 mainītis faili ar 39 papildinājumiem un 31 dzēšanām
  1. 39 31
      App/Api/Template/Message.phtml

+ 39 - 31
App/Api/Template/Message.phtml

@@ -20,44 +20,52 @@
     <div class="well  panel-info">
         <div class="panel-heading panel-title"> 当前号码:<?php
             echo $this->number_info['country'] . " " . $this->number_info['phone'];
-            if ($_GET['debug']==1){
-                echo " 页面耗时".(microtime_float()-PAGE_START);
-                echo " 使用代理【".USE_HOME."】";
+            if ($_GET['debug'] == 1) {
+                echo " 页面耗时" . (microtime_float() - PAGE_START);
+                echo " 使用代理【" . USE_HOME . "】";
             }
-             ?></div>
+            ?></div>
         <div class="panel-body ">
-            <table class="table table-hover">
-                <thead>
-                <tr>
-                    <th width="3%"> #</th>
-                    <th width="12%"> 电话号码</th>
-                    <th width="70%"> 短信内容</th>
-                    <th width="15%"> 发送时间</th>
-                </tr>
-                </thead>
-                <tbody>
-                <?php
-                $i = 1;
-                foreach ($this->message as $item) {
-                    ?>
+            <?php
+            if (!$this->message) {
+                echo "<span>当前网络异常,请刷新页面重试!</span>";
+            } else {
+                ?>
+                <table class="table table-hover">
+                    <thead>
                     <tr>
-                        <td><?php echo $i++; ?></td>
-
-                        <td> <?php echo $item['from']; ?> </td>
-
-                        <td> <?php echo $item['message']; ?> </td>
-                        <td>
-                            <time><?php echo $item['time']; ?></time>
-                        </td>
+                        <th width="3%"> #</th>
+                        <th width="12%"> 电话号码</th>
+                        <th width="70%"> 短信内容</th>
+                        <th width="15%"> 发送时间</th>
                     </tr>
+                    </thead>
+                    <tbody>
                     <?php
-                }
-                ?>
+                    $i = 1;
+                    foreach ($this->message as $item) {
+                        ?>
+                        <tr>
+                            <td><?php echo $i++; ?></td>
 
-                </tbody>
-            </table>
+                            <td> <?php echo $item['from']; ?> </td>
+
+                            <td> <?php echo $item['message']; ?> </td>
+                            <td>
+                                <time><?php echo $item['time']; ?></time>
+                            </td>
+                        </tr>
+                        <?php
+                    }
+                    ?>
+
+                    </tbody>
+                </table>
+                <?php
+            }
+            ?>
         </div>
-       </div>
+    </div>
 
 </div>
 </body>