[8] ErrorException in Shops.php line 107

未定义数组索引: shopHomeTheme

  1. */
  2. public function productCenter(){
  3. $shopId = (int)input("param.shopId/d");
  4. $catId = (int)input("param.catId/d");
  5. $s = model('shops');
  6. $data['shop'] = $s->getShopInfo($shopId);
  7. $this->assign('data',$data);
  8. $this->assign('catId',$catId);
  9. $templateHtml=$data['shop']["shopHomeTheme"];
  10. $templateHtml = str_replace("index","product_center",$templateHtml);
  11. return $this->fetch($templateHtml);
  12. }
  13. /**
  14. * 异步获取产品数据
  15. */
  16. public function ajaxProductList(){
  17. $shopId = (int)input("param.shopId/d");

Call Stack

  1. in Shops.php line 107
  2. at Error::appError(8, 'Undefined index: sho...', 'D:\wwwroot\qihaonet\...', 107, ['shopId' => 67, 'catId' => 289, 's' => object(Shops), ...]) in Shops.php line 107
  3. at Shops->productCenter()
  4. at ReflectionMethod->invokeArgs(object(Shops), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Shops), object(ReflectionMethod), ['shopId' => '67', 'catId' => '289', 'convert' => false]) in Module.php line 132
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request))
  9. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  10. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  11. at Module->exec() in Dispatch.php line 168
  12. at Dispatch->run() in App.php line 432
  13. at App->think\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request)) in App.php line 435
  18. at App->run() in index.php line 28