<?php


namespace app\api\controller;

use app\common\controller\Common;
use app\common\controller\Jpush;
use think\facade\Db;
use think\facade\Request;

class Village extends Base
{
    //搜索小区

    public function test() {
//        $phone = "135883180489";
//        $content = "新版本推送";
//        Jpush::push_oppo($phone,$content);

        $arr=[2,1,4,24,57,1,31,434,762];
        $length = count($arr);
        for($i=0;$i<$length;$i++){
            for($j=0;$j<$length-$i-1;$j++) {
                if($arr[$j] < $arr[$j+1]) {
                    $tem = $arr[$j+1];
                    $arr[$j+1] = $arr[$j];
                    $arr[$j] = $tem;
                }
            }
        }

        return $this->returnJson($arr);
    }


}