wupengfei 3 years ago
parent
commit
fefd1cca50

+ 6 - 0
application/market/controller/Goods.php

@@ -40,6 +40,12 @@ class Goods extends Controller
     }
 
 
+    public function detail()
+    {
+        $this->title = '查看详情';
+        $this->_form($this->table, 'form');
+    }
+
 
 
 

+ 43 - 0
application/market/view/goods/form.html

@@ -0,0 +1,43 @@
+<style>
+    .layui-card-body
+    {
+        height: 60%;
+    }
+</style>
+<div class="layui-card-body">
+    <div class="layui-form-item">
+        <label class="layui-form-label label-required">商品</label>
+        <div class="layui-input-block">
+            <table class="layui-table margin-top-10" lay-skin="line">
+                <thead>
+                <tr>
+                    <th class='text-left nowrap'>名称</th>
+                    <th class='text-left nowrap'>图片</th>
+                    <th class='text-left nowrap'>数量</th>
+                    <th class='text-left nowrap'>圆币</th>
+                </tr>
+                </thead>
+                <tbody class="no_html">
+                {foreach :json_decode($vo.pro_info,true) as $sk=>$sv}
+                <tr class="no_detail">
+                    <td class='text-left nowrap'>
+                        <input class='layui-input' readonly style="background-color: #e6e6e6" value="{$sv['case_name']}"/>
+                    </td>
+                    <td class='text-left nowrap'><img  src="{$vo.case_cover|default=''}" width="30px"></td>
+                    <td class='text-left nowrap'>
+                        <input class='layui-input'  readonly style="background-color: #e6e6e6" value="{$sv['num']}"/>
+                    </td>
+                    <td class='text-left nowrap'>
+                        <input class='layui-input'  readonly style="background-color: #e6e6e6" value="{$sv['crystal']}"/>
+                    </td>
+                </tr>
+                {/foreach}
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+
+<script>
+    window.form.render();
+</script>

+ 1 - 15
application/market/view/goods/index.html

@@ -28,7 +28,7 @@
             <td class='text-left nowrap'>{$vo.stock|default=''}</td>
             <td class='text-left nowrap'>{$vo.create_at|format_datetime}</td>
             <td class='text-left nowrap'>
-                <a data-title="编辑分类" class="layui-btn layui-btn-sm" data-modal='{:url("detail")}?id={$vo.id}'>查 看</a>
+                <a data-title="查 看" class="layui-btn layui-btn-sm" data-modal='{:url("detail")}?id={$vo.id}'>查 看</a>
             </td>
         </tr>
         {/foreach}
@@ -37,20 +37,6 @@
     {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
 </div>
 <script>
-    $('.video_player').click(function () {
-        vUrl = $(this).data('src');  //获取到播放的url
-        var loadstr = '<video width="100%" height="100%"  controls="controls" autobuffer="autobuffer"  autoplay="autoplay" loop="loop">' +
-            '<source src='+vUrl+' type="video/mp4"></source></video>';
-        layer.open({
-            type: 1,
-            title: false,
-            area: ['730px', '500px'],
-            shade: [0.8, 'rgb(14, 16, 22)'],
-            skin: 'demo-class',
-            content: loadstr
-        });
-    });
-
     function btn_confirm(msg,fun,id) {
         layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
             var url = "/store/integral_goods/"+fun;