#0 [8]ErrorException in Product.php line 180

未定义变量: map

  1. $categoryList = Db::name('category')->query('select c.id,c.name,count(c.id) count from lm_product as p left join lm_category c on p.category = c.id group by c.id ');
  2. View::assign('categoryList',$categoryList);
  3. $factoryList = FactoryModel::select();
  4. View::assign('factoryList',$factoryList);
  5. $page = Request::get('page');
  6. $productList = Db::name('product')->alias('p')->join('factory f','p.factory = f.id','left')->field('p.*,f.name as factory_name')->where($map)->order($order, $sort)->paginate([
  7. 'list_rows'=> 16, //每页显示多少条数据
  8. 'page'=>$page, //分页参数
  9. // 'query'=>['type'=>$type], //查询附加条件需重新定义
  10. 'var_page' => 'page',
  11. ]);
  12. // $sql = getLastSql();
  13. // var_dump(getLastSql());
  14. // 获取分页显示

Call Stack

  1. in Product.php line 180
  2. at Error->appError(8, 'Undefined variable: ...', 'D:\wwwroot\juyuan\ap...', 180, ['category_id' => '', 'factory_id' => '', 'sort_type' => '1', ...]) in Product.php line 180
  3. at Product->searchProductList()
  4. at ReflectionMethod->invokeArgs(object(Product), []) in Container.php line 342
  5. at Container->invokeReflectMethod(object(Product), object(ReflectionMethod), ['sort_type' => '1']) in Controller.php line 105
  6. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  7. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  8. at Pipeline->then(object(Closure)) in Controller.php line 108
  9. at Controller->exec() in Dispatch.php line 96
  10. at Dispatch->run() in Route.php line 747
  11. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  12. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  13. at Pipeline->then(object(Closure)) in Route.php line 748
  14. at Route->dispatch(object(Request), object(Closure)) in Http.php line 213
  15. at Http->dispatchToRoute(object(Request)) in Http.php line 203
  16. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  17. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  18. at SessionInit->handle(object(Request), object(Closure), null)
  19. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  20. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  21. at Pipeline->think\{closure}(object(Request)) in LoadLangPack.php line 59
  22. at LoadLangPack->handle(object(Request), object(Closure), null)
  23. at call_user_func([object(LoadLangPack), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  24. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  25. at Pipeline->think\{closure}(object(Request)) in MultiApp.php line 71
  26. at MultiApp->think\app\{closure}(object(Request)) in Pipeline.php line 59
  27. at Pipeline->think\{closure}(object(Request)) in Throttle.php line 174
  28. at Throttle->handle(object(Request), object(Closure), null)
  29. at call_user_func([object(Throttle), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  30. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  31. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  32. at SessionInit->handle(object(Request), object(Closure), null)
  33. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  34. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  35. at Pipeline->think\{closure}(object(Request)) in LoadLangPack.php line 59
  36. at LoadLangPack->handle(object(Request), object(Closure), null)
  37. at call_user_func([object(LoadLangPack), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  38. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  39. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  40. at Pipeline->then(object(Closure)) in MultiApp.php line 72
  41. at MultiApp->handle(object(Request), object(Closure), null)
  42. at call_user_func([object(MultiApp), 'handle'], object(Request), object(Closure), null) in Middleware.php line 142
  43. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  44. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  45. at Pipeline->then(object(Closure)) in Http.php line 204
  46. at Http->runWithRequest(object(Request)) in Http.php line 162
  47. at Http->run() in index.php line 26

Environment Variables

GET Data
sort_type 1
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\phpstudy_pro\Extensions\php\php7.1.9nts\
SYSTEMROOT C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
PHPRC D:/phpstudy_pro/Extensions/php/php7.1.9nts
_FCGI_SHUTDOWN_EVENT_ 10152
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /index/Product/searchProductList.html?sort_type=1
QUERY_STRING sort_type=1
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING sort_type=1
REDIRECT_URL /index/Product/searchProductList.html
REMOTE_PORT 45926
SCRIPT_FILENAME D:/wwwroot/juyuan/public/index.php
SERVER_ADMIN admin@example.com
CONTEXT_DOCUMENT_ROOT D:/wwwroot/juyuan/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT D:/wwwroot/juyuan/public
REMOTE_ADDR 3.237.46.120
SERVER_PORT 80
SERVER_ADDR 58.244.255.22
SERVER_NAME hrqxh.com
SERVER_SOFTWARE Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02
SERVER_SIGNATURE
SystemRoot C:\Windows
HTTP_HOST hrqxh.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
REDIRECT_PATH_INFO index/Product/searchProductList.html
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711642058.0144
REQUEST_TIME 1711642058
Environment Variables
APP_DEBUG 1
APP_DEFAULT_TIMEZONE Asia/Shanghai
DATABASE_TYPE mysql
DATABASE_HOSTNAME 127.0.0.1
DATABASE_DATABASE juyuan
DATABASE_USERNAME root
DATABASE_PASSWORD znyanfa
DATABASE_HOSTPORT 3306
DATABASE_CHARSET utf8mb4
DATABASE_DEBUG 1
LANG_DEFAULT_LANG zh-cn
ThinkPHP Constants
PHP_OS_FAMILY Windows
U_IDNA_PROHIBITED_ERROR 66560
U_IDNA_ERROR_START 66560
U_IDNA_UNASSIGNED_ERROR 66561
U_IDNA_CHECK_BIDI_ERROR 66562
U_IDNA_STD3_ASCII_RULES_ERROR 66563
U_IDNA_ACE_PREFIX_ERROR 66564
U_IDNA_VERIFICATION_ERROR 66565
U_IDNA_LABEL_TOO_LONG_ERROR 66566
U_IDNA_ZERO_LENGTH_LABEL_ERROR 66567
U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR 66568
U_IDNA_ERROR_LIMIT 66569
U_STRINGPREP_PROHIBITED_ERROR 66560
U_STRINGPREP_UNASSIGNED_ERROR 66561
U_STRINGPREP_CHECK_BIDI_ERROR 66562
IDNA_DEFAULT 0
IDNA_ALLOW_UNASSIGNED 1
IDNA_USE_STD3_RULES 2
IDNA_CHECK_BIDI 4
IDNA_CHECK_CONTEXTJ 8
IDNA_NONTRANSITIONAL_TO_ASCII 16
IDNA_NONTRANSITIONAL_TO_UNICODE 32
INTL_IDNA_VARIANT_2003 0
INTL_IDNA_VARIANT_UTS46 1
IDNA_ERROR_EMPTY_LABEL 1
IDNA_ERROR_LABEL_TOO_LONG 2
IDNA_ERROR_DOMAIN_NAME_TOO_LONG 4
IDNA_ERROR_LEADING_HYPHEN 8
IDNA_ERROR_TRAILING_HYPHEN 16
IDNA_ERROR_HYPHEN_3_4 32
IDNA_ERROR_LEADING_COMBINING_MARK 64
IDNA_ERROR_DISALLOWED 128
IDNA_ERROR_PUNYCODE 256
IDNA_ERROR_LABEL_HAS_DOT 512
IDNA_ERROR_INVALID_ACE_LABEL 1024
IDNA_ERROR_BIDI 2048
IDNA_ERROR_CONTEXTJ 4096
ADDON_INIT lemo\addons\