binbinyouli пре 5 година
родитељ
комит
13f98ee756

+ 48 - 13
public/themes/admin_simpleboot3/admin/market/marketoneuser.html

@@ -4,7 +4,13 @@
 <div class="wrap js-check-wrap">
     <ul class="nav nav-tabs">
         <li class="active">
-        <a> 一级分销用户</a>
+          <if condition="$Request.action eq 'marketuser' ">
+           <a> 分销用户</a>
+           <elseif condition="$Request.action eq 'marketoneuser' ">
+            <a>{$Request.param.user_nickname}下所属分销用户</a>
+           <elseif condition="$Request.action eq 'markettwouser' ">
+            <a> 二级分销用户</a>
+         </if>
         </li>
     </ul>
 
@@ -185,6 +191,11 @@
                 <th>爱心</th>
           
                 <th style="text-align: center;">是否推荐</th>
+                <th style="text-align: center;">推荐人</th>
+                <th style="text-align: center;">下级用户数</th>
+                <th style="text-align: center;">可提佣金</th>
+               <!--  <th>等级</th> -->
+
                 <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
                   <th>冻结原因</th>
                 <else/>
@@ -201,10 +212,9 @@
                 <else/>
                 <th>{:lang('REGISTRATION_TIME')}</th>
                 </if>
-                <th>登录时间</th>
-                <th>身份证</th>
-                <th>职位</th>
-                <th>学历</th>
+              <!--   <th>登录时间</th> -->
+              
+         
                 <th>{:lang('STATUS')}</th>
                 <th>{:lang('ACTIONS')}</th>
             </tr>
@@ -235,6 +245,31 @@
                       </switch>
 
                     </td>
+
+                    <td style="text-align: center;">
+                      <if condition="$vo.marketusername.user_nickname eq ''">
+                        <span style="color: red">无</span>
+                         <else/>
+                        <span style="color: blue">{$vo.marketusername.user_nickname}</span>
+                      </if>
+
+                    </td>
+
+                   <td style="text-align: center;">
+                     <if condition="$vo.marketcount eq 0">
+                    <a href="#">{$vo.marketcount}</a>
+                    <else/>
+                    <a href="{:url('Market/marketoneuser')}">{$vo.marketcount}</a>
+                    </if>
+                    </td>
+                    <td style="text-align: center;">
+                    {$vo.balance}
+                    </td>
+
+
+                  <!-- <td>{$vo.level}</td> -->
+                 
+
                     <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
                        <td><span style="color:red">{$vo.freezing}</span></td>
                     <else/>
@@ -252,8 +287,9 @@
                         <else/> 
                          <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
                     </if>
-                    <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td>
-                    <td>
+                   
+               <!--        <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td> -->
+                   <!--  <td>
                          <switch name="vo.idcard_check">
                             <case value="1">
                                <span style="color:red">未审</span>
@@ -307,7 +343,7 @@
                             </case>
                         </switch>
 
-                    </td>
+                    </td> -->
                   
                     <td>
 
@@ -367,7 +403,7 @@
 
                           </neq>
 
-                      
+                        
                           <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
 
                             <else/>
@@ -378,7 +414,7 @@
                              </if>
                           </if>
 
-                 
+                       
                             <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e"  onclick="getPaike2({$vo['id']})">奖励充值</a>
 
                           <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
@@ -403,6 +439,7 @@
 <script src="__STATIC__/js/clipboard.min.js"></script>
 <script src="__STATIC__/js/layer/layer.js"></script>
 
+
 <script>
     function doDelete() {
         // Wind.use('artDialog', function () {
@@ -470,8 +507,7 @@
         }, time)
     }*/
 </script>
-
-  <script >
+<script >
 
     function getPaike2(id){
           openIframeLayer("{:url('market/marketshowreward')}?id=" + id , "", {
@@ -480,6 +516,5 @@
           })
       }
   </script>
-
 </body>
 </html>

+ 3 - 3
public/themes/admin_simpleboot3/admin/market/marketuser.html

@@ -194,7 +194,7 @@
                 <th style="text-align: center;">推荐人</th>
                 <th style="text-align: center;">下级用户数</th>
                 <th style="text-align: center;">可提佣金</th>
-                <th>等级</th>
+               <!--  <th>等级</th> -->
 
                 <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
                   <th>冻结原因</th>
@@ -259,7 +259,7 @@
                      <if condition="$vo.marketcount eq 0">
                     <a href="#">{$vo.marketcount}</a>
                     <else/>
-                    <a href="{:url('Market/marketoneuser')}">{$vo.marketcount}</a>
+                    <a href="{:url('Market/marketoneuser',array('id'=>$vo.id,'user_nickname'=>$vo.user_nickname))}">{$vo.marketcount}</a>
                     </if>
                     </td>
                     <td style="text-align: center;">
@@ -267,7 +267,7 @@
                     </td>
 
 
-                  <td>{$vo.level}</td>
+                  <!-- <td>{$vo.level}</td> -->
                  
 
                     <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">

+ 13 - 5
vendor/thinkcmf/cmf-app/src/admin/controller/MarketController.php

@@ -403,7 +403,7 @@ class MarketController extends AdminBaseController
         // 修改 end
 
         //var_dump($data);die;
-        $list = Db::name('user')->field('u.id,u.user_login,u.user_nickname,u.real_name,u.redheart,u.is_tuijian,u.create_time,u.is_heart,u.user_status,u.mobile,u.freezing,u.updated_at,last_login_time,up.idcard,
+        $list = Db::name('user')->field('u.id,u.user_login,u.user_nickname,u.real_name,u.redheart,u.is_tuijian,u.parent_id,u.create_time,u.is_heart,u.user_status,u.balance,u.mobile,u.level,u.freezing,u.updated_at,last_login_time,up.idcard,
             up.idcard_check,up.position_check,up.education_check')
             ->alias('u')
             ->join('user_profile up','u.id=up.userid','left')
@@ -411,7 +411,7 @@ class MarketController extends AdminBaseController
             ->where(function (Query $query) use($data){
                 $query->where('u.user_type', 2);
                 $query->where('u.openid', 'not in','');
-                $query->where('u.agent_type',1);
+                $query->where('u.parent_id',$data['id']);
 
                 //代表是否付费定制
                 ($this->request->action()=='custom' || $this->request->param('u')==2)?$query->where('u.is_vip', 1):$query->where('u.is_vip', 0);
@@ -527,8 +527,16 @@ class MarketController extends AdminBaseController
 
             //待审核
             ->order("u.create_time DESC")
-            ->paginate(10,false,['query'=>request()->param()]);
-       // echo Db::name('user')->getLastSql();die;
+            ->paginate(10,false,['query'=>request()->param()])
+            ->each(function($item,$key){
+                $item['marketusername'] = Db::name('user')->where('id',$item['parent_id'])->field('real_name,user_nickname')->find();
+                $item['marketcount'] = Db::name('user')->where('parent_id',$item['id'])->count('id');
+
+
+                return $item;
+            })
+            ;
+    // echo Db::name('user')->getLastSql();die;
         // 获取分页显示
         $page = $list->render();
         $this->assign('list', $list);
@@ -541,7 +549,7 @@ class MarketController extends AdminBaseController
     }
 
 
-    //分二级用户显示
+    //显示子级用户显示
     public function Markettwouser(){
 
         $data = $this->request->param();