qc.ifish7.com/Application/Member/Controller/BaseController.class.php

14 lines
483 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace Member\Controller;
use Think\Controller;
class BaseController extends \Home\Controller\BaseController{
public function _initialize(){
$this->error("未开放会员注册");
$member_id = session("member.member_id");
if(!$member_id){
$this->error("请先登录",U('Member/Public/login'));
}
//这里要调用一下home下的_initialize方法否则无法显示购物数量
parent::_initialize();
}
}