[8] ErrorException in Shops.php line 91

未定义数组索引: shopHomeTheme

  1. public function aboutUs(){
  2. $shopId = (int)input("param.shopId/d");
  3. hook("homeBeforeGoShopHome",["shopId"=>$shopId,"params"=>input()]);
  4. $s = model('shops');
  5. $data['shop'] = $s->getShopInfo($shopId);
  6. $this->assign('data',$data);
  7. //页面跳转
  8. $templateHtml=$data['shop']["shopHomeTheme"];
  9. $templateHtml = str_replace("index","about_us",$templateHtml);
  10. return $this->fetch($templateHtml);
  11. }
  12. /**
  13. * 商品中心
  14. */
  15. public function productCenter(){
  16. $shopId = (int)input("param.shopId/d");

Call Stack

  1. in Shops.php line 91
  2. at Error::appError(8, 'Undefined index: sho...', 'D:\wwwroot\qihaonet\...', 91, ['shopId' => 113, 's' => object(Shops), 'data' => ['shop' => []]]) in Shops.php line 91
  3. at Shops->aboutUs()
  4. at ReflectionMethod->invokeArgs(object(Shops), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(Shops), object(ReflectionMethod), ['shopId' => '113', '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