panlumeng 2 years ago
parent
commit
f0933f55d9
2 changed files with 6 additions and 2 deletions
  1. 1 1
      .env
  2. 5 1
      app/admin/controller/Listcustomer.php

+ 1 - 1
.env

@@ -1 +1 @@
-APP_DEBUG = false
[APP]
DEFAULT_TIMEZONE = Asia/Shanghai


[LANG]
default_lang = zh-cn
+APP_DEBUG = true
[APP]
DEFAULT_TIMEZONE = Asia/Shanghai


[LANG]
default_lang = zh-cn

+ 5 - 1
app/admin/controller/Listcustomer.php

@@ -41,7 +41,11 @@ class Listcustomer extends BaseController
        $count = Db::name('customer_info')->where($where)->count();
        $total = ceil($count/$size);
        $page = $page >= $total ? $total : $page;
-       $item = Db::name('customer_info')->where($where)->order("addtime desc")->page($page,$size)->select();
+       $item = Db::name('customer_info')->where($where)
+           ->field("id,companyNO,companyName,parent,itemid,area,comdepart,commobile,comtel,contactor,depart,
+           mobile,invoice_title,invoice_people,invoice_addr,invoice_mobile,invoice_code,invoice_bank,invoice_bankNo,
+           companyCode,status,sales_name,sales_depart,branch,middle,country,is_del,creater,modifier,addtime,updatetime,
+           LENGTH(companyName) as weight")->order("weight asc")->page($page,$size)->select();
        return app_show(0,"获取成功",['item'=>$item,'count'=>$count]);
     }
 }