<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品详情</title>
    <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body" pad15>
               <div class="layui-tab layui-tab-card">
                   <ul class="layui-tab-title">
                       <li class="layui-this">活动信息</li>
                       <li>活动介绍</li>
                   </ul>
                   <div class="layui-tab-content">
                       <div class="layui-tab-item layui-show">
                           <table class="layui-table">
                               <tr>
                                   <th style="width: 80px;">标题</th>
                                   <td id="title" class="cell"></td>
                               </tr>
                               <tr>
                                   <th>截止日期</th>
                                   <td id="end_date" class="cell"></td>
                               </tr>
                               <tr>
                                   <th>备注</th>
                                   <td id="notes" class="cell"></td>
                               </tr>
                               <tr>
                                   <th>添加人</th>
                                   <td id="create_user_t" class="cell"></td>
                               </tr>
                               <tr>
                                   <th>添加时间</th>
                                   <td id="create_time" class="cell"></td>
                               </tr>
                               <tr>
                                   <th>封面图</th>
                                   <td>
                                       <a id="cover_a" href="#" target="">
                                       <img class="layui-upload-img" id="cover_url" target="_blank" style="max-height: 250px;">
                                       </a>
                                   </td>
                               </tr>

                           </table>
                       </div>
                       <div class="layui-tab-item">
                            <div id="describe">
                           </div>
                       </div>
                   </div>
               </div>
            </div>
        </div>
    </div>

    <script src="../../layuiadmin/layui/layui.js?t=1"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table','laydate', 'utils'], function () {
            var $ = layui.$;
            var admin = layui.admin;

            var id = layui.view.getParameterByName('id');
            var editdata = JSON.parse(JSON.stringify(parent.layui.table.editdata));
            if (editdata.cover_url) {
                $('#cover_url').attr('src', editdata.cover_url);
                $('#cover_a').attr('href', editdata.cover_url);
                $('#cover_a').attr('target', '_blank');
            }

            $('.cell').each(function (index, element) {
                element.innerHTML =  (editdata[element.id])
            });

            if (editdata.describe) {
                $('#describe').html(editdata.describe)
            }
        })
    </script>
</body>
</html>