widget在linux上无法调用

浏览:371 发布日期:2018/02/05
5.0.0 - 严重 - 未处理
linux版本为debian 8 ,无法访问widget,无输出1,无输出html无报错,无提示;
win7正常

换大小写没用//控制器
<?php 
namespace app\frontend\Widget;
use Think\Controller;
use Think\Db;
class Bonus extends Controller{
    public function bonus(){
        $bonus_type = input('param.bonus_type',1);
        //平台礼包
        $BonusService = new \app\admin\service\BonusService;
        $bonusInfo = $BonusService->getBonusInfo(['bonus_type'=>1,'status'=>1]);

        $couponList = [];
        $item_coupon_ids = [];
        if($bonusInfo){
            $res = $bonusInfo->toArray();
            $ItemCoupon = new \app\model\ItemCoupon;
            $couponList = $ItemCoupon->where(['target_type'=>-1,'target_id'=>$bonusInfo['id'],'status'=>1])->select();
            foreach ($couponList as $key => $value) {
                $item_coupon_ids[] = $value['id'];
            }
            echo 1;
            // $this->assign('isBonus',$isBonus);
            $this->assign('item_coupon_ids',json_encode($item_coupon_ids));
            $this->assign('couponList',$couponList);
            $this->assign('bonusInfo',$bonusInfo);
            // return $this->fetch('Widget:bonus');
            return $this->fetch('Widget/Bonus');
        }
        
    }
}

//前端调用,前端地址为frontend/index/index
{:widget('Bonus/bonus',['bonus_type'=>1])} 
//或者frontend/index/index
{:action('Bonus/bonus',['bonus_type'=>1],'widget')} 
//目录结构
评论(
后面还有条评论,点击查看>>