//$arr 数组 //$pid 默认值 private function get_attr($arr,$pid='0'){         $tree = array();                                //每次都声明一个新数组用来放子元素         foreach($arr as $v){             if($v['pid'] == $pid){                      //匹配子记录                 $v['children'] = $this->get_attr($arr,$v['id']); //递归获取子记录       ?

后台有个权重字段,默然生成了一个可以拖动的图标。现在我想把这个图标去除?怎么搞? 移除weigh字段,或者将dragsort_url置为空。 ====================================== 我的解决方案是 : 将dragsort_url置为空。 因为我需要weigh字段排序,如果js文件没有dragsort_url,加上  dragsort_url: '',   在  这个下面 multi_url: 'process/multi', dragsort_url: '',

<?php namespace app\index\model; use think\Model; class User extends Model { public function profile() { return $this->hasOne('Profile','uid')->bind([ 'email', 'truename' => 'nickname', 'profile_id' => 'id', ]); } }

效果图: 代码:    // 点击添加选择   chooseSource: function () {     var _this = this;     wx.showActionSheet({       itemList: ["拍照", "从相册中选择"],       itemColor: "#000000",       success: function (res) {         if (!res.cancel) {           if (res.tapIndex == 0) {             _this.imgWShow("camera")        //拍照           } e

//使用array_intersect函数 <?php $a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow"); $a2=array("e"=>"red","f"=>"green","g"=>"blue");   $result=array_intersect($a1,$a2); print_r($result);   // Array ( [a] => red [b] => green [c] => blue )

#80配置如下 server { listen 80; server_name ceshi.jifengyinyue.com; root "C:/Users/Administrator/Desktop/testmonsoont/public"; location / { index index.php index.html error/index.html; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } error_page 400 /error/400.html; error_page 403 /error/403.html; error_page 404 /error/404.html;

直接上代码:  //删除重复数组     private function array_unique_fb($arr)     {            $ee=[];            $ff=[];            foreach ($arr as $k => $v) {                if (!in_array($v['user_id'],$ee)) {                    $ff[]=$v;                    $ee[]=$v['user_id'];                }            }            return $ff;     } 

只需要在 $this->buildparams('user.mobile');加入搜索字段就可以了,user.mobile是关联搜索user表手机号     /**      * 查看      */     public function index()     {         //当前是否为关联查询         $this->relationSearch = true;         //设置过滤方法         $this->request->filter(['strip_tags', 'trim']);         if ($this->request->isAjax()) {           ?