| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- {extend name="layout:home" /}
- {block name="container"}
- <div class="layui-tab layui-tab-card">
- <div class="layui-tab-content page-tab-content">
- <table class="layui-table lay-even">
- <colgroup>
- <col width="150">
- <col width="200">
- <col>
- </colgroup>
- <thead>
- <tr>
- <th>标题</th>
- <th>内容</th>
- <th>图片</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- {if count($productInfo)}
- {volist name="productInfo" id="value"}
- <tr>
- <td>{$value.productInfo_title}</td>
- <td><?php echo mb_substr($value->productInfo_content,0,30, 'utf-8');?>...</td>
- <td>
- {if $value.productInfo_img}
- <img src="{$Think.UPLOADS_ROOT}{$value.productInfo_img}" style="width: 100px;height: 100px">
- {/if}
- </td>
- <td>
- <a href="javascript:dsLayerOpen('{:url('Server/editInfo',['productInfo_id'=>$value.productInfo_id])}','编辑-{$value.productInfo_title}')"
- class="layui-btn layui-btn-xs"><i class="layui-icon layui-icon-edit"></i>{$Think.lang.ds_edit}</a>
- <a href="javascript:dsLayerConfirm('{:url('Server/deleteInfo',['productInfo_id'=>$value.productInfo_id])}','{$Think.lang.ds_confirm_cancel}')"
- class="layui-btn layui-btn-danger layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>{$Think.lang.ds_del}</a>
- </td>
- </tr>
- {/volist}
- {else}
- <td colspan="99" style="text-align: center">无数据</td>
- {/if}
- </tbody>
- </table>
- </div>
- </div>
- <script>
- const myHost = "http://" + window.location.host;
- let current = $("#id").val();
- $("#li-" + current).attr("class","layui-this")
- function showCurrent(id) {
- window.location.href = myHost + "/Admin/Server/index.html?id=" + id;
- }
- layui.use('laydate', function(){
- var laydate = layui.laydate;
- //执行一个laydate实例
- laydate.render({
- elem: '#creatTime' //指定元素
- });
- laydate.render({
- elem:'#timeRang',
- range:true,
- format: 'yyyy/MM/dd',
- done: function(value, date){
- /* 时间选择完成后的回调 */
- }
- })
- });
- </script>
- {/block}
|