zoukankan      html  css  js  c++  java
  • ThinkPHP之跨模块调用页面找不到的问题

    今天在做跨模块的时候,发现始终出问题,页面找不到,后来发现需要这么改。

    比如A模块调用B模块的index方法

    <?php
    import("@.Action.Admin.CustomerAction");

    class TransactionAction extends AdminCommAction{
    public function index(){
    $transaction_id = Session::get("transaction_id");
    $station_id = getStationId();
    $customer_id = Session::get("cur_customer");
    if(!isset($customer_id)){
    R("Customer", "index", "Admin");
    }

    if(!isset($transactionId)){
    $data['store_id'] = $this->store_id;

    }
    //$this->display("point-of-sale");
    }
    }
    ?>

    另一个模块中

    <?
    public function index(){
    $customerModel = D('customer');
    $where['enable']=1;
    $getPage=changePage($customerModel,$where,9);

    $resultlist = $customerModel->where("enable = 1")->page($getPage. ',9')->select();
    foreach($resultlist as $key=>$value){
    $customer_id = $resultlist[$key]['customer_id'];
    $resultlist[$key]['itemsold'] = Count::getTotalItemSold($customer_id);
    $resultlist[$key]['orderd'] = Count::getOrderd($customer_id);
    $resultlist[$key]['latefees'] = Count::getLateFeesOutstanding($customer_id);
    $resultlist[$key]['totalorder'] = Count::getTotalOrderNumber($customer_id);
    }

    $total = $customerModel->where("enable = 1")->count();
    $Page = new Page($total,9);
    $this->assign("resultList",$resultlist);
    $this->assign("page",$Page->show());
    $this->display("Customer/CustomerMan"); //这个很重要,否则会找不到页面
    }
    ?>




  • 相关阅读:
    angularJs之http后台访问数据
    angularJ之$filter过滤器
    angularJs之service
    下拉列表select显示ng-options
    angularJs非空校验requied
    angularJs禁用或启用输入框指令ng-disabled="true"
    angularJS支持的事件
    angularJ表单验证
    angularJs之template指令
    angularJs自定义指令.directive==类似自定义标签
  • 原文地址:https://www.cnblogs.com/hongchenok/p/2186559.html
Copyright © 2011-2022 走看看