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"); //这个很重要,否则会找不到页面
}
?>




转载于:https://www.cnblogs.com/hongchenok/archive/2011/09/23/2186559.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值