chenhao 4 jaren geleden
bovenliggende
commit
561e6266e1

+ 3 - 3
application/admin/controller/Userorder.php

@@ -46,9 +46,9 @@ class Userorder extends Controller
      */
     protected function _index_page_filter(&$data)
     {
-//        foreach ($data as &$v) {
-//            $v['images'] = explode('|',$v['image']);
-//        }
+        foreach ($data as &$v) {
+            $v['images'] = explode('|',$v['image']);
+        }
 
     }
     /**

+ 12 - 0
application/admin/controller/Uuser.php

@@ -303,6 +303,18 @@ class Uuser extends Controller
      */
     public function remove()
     {
+        $id = $this->request->post('id');
+
+        $del = Db::name('user')->where('id',$id)->delete();
+
+        if ($del) {
+
+            Db::name('user_appointment')->where('uid',$id)->delete();
+            Db::name('user_weixiu_baobei')->where('uid',$id)->delete();
+            return $this->success('删除成功');
+        } else {
+            return $this->error('删除失败');
+        }
         if (in_array('10000', explode(',', $this->request->post('id')))) {
             $this->error('系统超级账号禁止删除!');
         }

+ 22 - 4
application/admin/view/userorder/form.html

@@ -3,21 +3,39 @@
 
 
         <div class="layui-card-body padding-left-40">
+<!--            <div class="layui-form-item">-->
+<!--                <span class="color-green label-required-prev">商品图片</span>-->
+
+<!--                <table class="layui-table">-->
+<!--                    <thead>-->
+<!--                    <tr>-->
+<!--                       <th class="text-center">商品图</th>-->
+<!--                    </tr>-->
+<!--                    <tr>-->
+<!--                        <td width="90px" class="text-center"><input name="image" type="hidden" value="{$vo.image|default=''}"></td>-->
+<!--                    </tr>-->
+<!--                    </thead>-->
+<!--                </table>-->
+
+<!--                <script>$('[name="image"]').uploadOneImage()</script>-->
+<!--            </div>-->
             <div class="layui-form-item">
-                <span class="color-green label-required-prev">商品图片</span>
+                <span class="color-green label-required-prev">图片</span>
 
                 <table class="layui-table">
                     <thead>
                     <tr>
-                       <th class="text-center">商品图</th>
+<!--                        <th class="text-center">视频</th>-->
+                        <th class="text-left">图片</th>
                     </tr>
                     <tr>
-                        <td width="90px" class="text-center"><input name="image" type="hidden" value="{$vo.image|default=''}"></td>
+<!--                        <td width="90px" class="text-center"><input name="video" type="hidden" value="{$vo.video|default=''}"></td>-->
+                        <td width="auto" class="text-left"><input name="image" type="hidden" value="{$vo.image|default=''}"></td>
                     </tr>
                     </thead>
                 </table>
 
-                <script>$('[name="image"]').uploadOneImage()</script>
+                <script> $('[name="image"]').uploadMultipleImage()</script>
             </div>
             <div class="layui-form-item">
                 <label class="relative block">

+ 3 - 1
application/admin/view/userorder/index.html

@@ -39,7 +39,9 @@
             </td>
             <td class='text-left nowrap'>{$vo.name}</td>
             <td class='text-left nowrap'>
-                <img data-tips-image style="width:60px;height:60px" src="{$vo.image|default=''}" class="margin-right-5 text-top">
+                {foreach $vo.images as $k=>$v}
+                <img data-tips-image style="width:60px;height:60px" src="{$v|default=''}" class="margin-right-5 text-top">
+                {/foreach}
             </td>
             <td class='text-left nowrap'>{$vo.number}</td>
 

+ 3 - 0
application/index/controller/User.php

@@ -246,6 +246,9 @@ class User extends Api
 
         $data = Db::name('user_order')->where('uid',$user['id'])->order('create_time')->select();
 
+        foreach ($data as &$v) {
+            $v['images'] = explode('|',$v['image']);
+        }
         return $this->success('',$data);
     }