[8] ErrorException in Shops.php line 142

未定义数组索引: shopHomeTheme

  1. * 联系我们
  2. */
  3. public function contactUs(){
  4. $shopId = (int)input("param.shopId/d");
  5. hook("homeBeforeGoShopHome",["shopId"=>$shopId,"params"=>input()]);
  6. $s = model('shops');
  7. $data['shop'] = $s->getShopInfo($shopId);
  8. $this->assign('data',$data);
  9. $templateHtml=$data['shop']["shopHomeTheme"];
  10. $templateHtml = str_replace("index","contact_us",$templateHtml);
  11. return $this->fetch($templateHtml);
  12. }
  13. public function qrcode(){
  14. $shopId = (int)input("param.shopId/d");
  15. require Env::get('root_path') . 'extend/phpqrcode/phpqrcode.php';
  16. $data = get_http_type().'://'.$_SERVER['SERVER_NAME'].'/mshop-'.$shopId.'.html';
  17. $level = 'L';

Call Stack

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