123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>短信列表</title>
- <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
- <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
- <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </head>
- <body>
- <table class="table table-striped">
- <caption>短信列表</caption>
- <p id="text_not">定时状态</p>
- <thead>
- <tr>
- <th> id </th>
- <th> 来源</th>
- <th> 手机号</th>
- <th> 短信</th>
- <th> 时间</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($CodeList as $Code)
- <tr id="list_tr" class="table-danger">
- <td> {{$Code->id}} </td>
- <td> {{$Code->fromNumber}} </td>
- <td> {{$Code->toPhone}} </td>
- <td> {{$Code->codetext}} </td>
- <td> {{$Code->created_at}} </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <script type="text/javascript">
- // function Push() {
- // $.ajax({
- // type: "get",
- // url: "https://api.ruanjian.buzz/api/client/code/getcode",
- // dataType : 'json',
- // beforeSend: function () {
- // },
- // success: function (data) {
- //
- // if(data.ret !== 1){
- // return
- // }
- // console.log(data.code)
- //
- // if(!isUndefined(data.code)){
- //
- // data.code.forEach((elem, index) => {
- // console.log(elem.codetext, index);
- // // $("#list_tr").append("<td>elem.id</td><td>elem.fromNumber</td><td>elem.codetext</td><td>elem.codetime</td>");
- // // $('#list_tr').each(function(i){ // 遍历 tr
- // // console.log("第"+(i+1)+"行,第"+(j+1)+"个td的值:"+$(this).text()+"。");
- // // });
- //
- // });
- // // obj.code.each(function (i){
- // //
- // //
- // //
- // // //$("#list_tr").append("<td>(i+1)</td><td>(i+1))</td></tr>");
- // // })
- //
- // }
- //
- //
- //
- // // const obj = eval("(" + data + ")");
- // // alert(obj.codetext);
- // }
- //
- // })
- // }
- //判断数值是否为空
- function isUndefined(value){
- return value===undefined || $.trim(value).length===0;
- }
- $(document).ready(function() {
- /*第一次读取最新通知*/
- // setTimeout(function () {Push();}, 200);
- /*30轮询读取函数*/
- setInterval(function () {
- //通知
- //Push();
- $('#text_not').text("正在定时刷新...")
- location.reload();
- },30000);//30000
- })
- </script>
- </body>
- </html>
- {{--@extends('down.layoutsb')--}}
- {{--@section('css')--}}
- {{-- <link href="/assets/global/fonts/themify/themify.min.css" rel="stylesheet">--}}
- {{-- <link href="/assets/custom/range.min.css" rel="stylesheet"--}}
- {{--@endsection--}}
- {{--@section('content')--}}
- {{-- <div class="page-content container-fluid">--}}
- {{-- <div class="panel">--}}
- {{-- <div class="panel-body">--}}
- {{-- <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">--}}
- {{-- <thead class="thead-default">--}}
- {{-- <tr>--}}
- {{-- </tr>--}}
- {{-- </thead>--}}
- {{-- <tbody>--}}
- {{-- </tbody>--}}
- {{-- </table>--}}
- {{-- </div>--}}
- {{-- </div>--}}
- {{-- </div>--}}
- {{--@endsection--}}
- {{--@section('javascript')--}}
- {{-- <script src="/assets/custom/clipboardjs/clipboard.min.js"></script>--}}
- {{-- <script src="/assets/global/js/Plugin/responsive-tabs.js"></script>--}}
- {{-- <script src="/assets/global/js/Plugin/tabs.js"></script>--}}
- {{-- <script src="/assets/custom/jump-tab.js"></script>--}}
- {{-- <script src="/assets/global/vendor/aspieprogress/jquery-asPieProgress.min.js"></script>--}}
- {{-- <script src="/assets/global/vendor/matchheight/jquery.matchHeight-min.js"></script>--}}
- {{-- <script src="/assets/global/vendor/chart-js/Chart.min.js"></script>--}}
- {{-- <script src="/assets/global/vendor/bootstrap-select/bootstrap-select.min.js"></script>--}}
- {{-- <script src="/assets/global/js/Plugin/aspieprogress.js"></script>--}}
- {{-- <script src="/assets/global/js/Plugin/matchheight.js"></script>--}}
- {{-- <script src="/assets/global/js/Plugin/bootstrap-select.js"></script>--}}
- {{--@endsection--}}
|