1、thinkphp\library\think\Request.php

        public function method($method = false)
改为
    public function method($method = false)
    {
        if (true === $method) {
            // 获取原始请求类型
            return $this->server('REQUEST_METHOD') ?: 'GET';
        } elseif (!$this->method) {
            if (isset($_POST[Config::get('var_method')])) {
                $method = strtoupper($_POST[Config::get('var_method')]);
                if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
                    $this->method = $method;
                    $this->{$this->method}($_POST);
                } else {
                    $this->method = 'POST';
                }
                unset($_POST[Config::get('var_method')]);
            } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
                $this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
            } else {
                $this->method = $this->server('REQUEST_METHOD') ?: 'GET';
            }
        }
        return $this->method;
    }

2、thinkphp\library\think\App.php

public static function module(
        // 获取控制器名
        $controller = strip_tags($result[1] ?: $config['default_controller']);
改为
                // 获取控制器名
        $controller = strip_tags($result[1] ?: $config['default_controller']);

        if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
            throw new HttpException(404, 'controller not exists:' . $controller);
        }

3、thinkphp\library\think\Route.php

public static function parseUrl
                    // 解析控制器
              $controller = !empty($path) ? array_shift($path) : null;
          }
改为
                // 解析控制器
                $controller = !empty($path) ? array_shift($path) : null;
            }
            if ($controller && !preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
                throw new HttpException(404, 'controller not exists:' . $controller);
            }

拿到接口返回的数据,赋值给数组A,再赋值给数组B,这时候不论改A的值还是B的值,这俩都会同步变动,小程序里这样赋值貌似是值的传递,所以导致同步了,只需要赋值给B的时候先转成字符串再转回来就行了(真tm变态。。。)。如下:

this.setData({
    aaa: resdata,
    //变态一下
    bbb: JSON.parse(JSON.stringify(resdata))
})

<script>
    var unSelected = "#999";
    var selected = "#333";
    $(function () {
        $("select").css("color", unSelected);
        $("option").css("color", selected);
        $("select").change(function () {
            var selItem = $(this).val();
            if (selItem == $(this).find('option:first').val()) {
                $(this).css("color", unSelected);
            } else {
                $(this).css("color", selected);
            }
        });
    })
 
</script>